Skip to content

Commit

Permalink
base-files: fix build for /sbin/pkg_check
Browse files Browse the repository at this point in the history
Setting CONFIG_IPK_FILES_CHECKSUMS=y causes sha256 checksum files to be
included with the packages to check for corruption. This commit fixes two
issues:
- /sbin/pkg_check was being removed incorrectly if IPK_FILES_CHECKSUMS=y
- checksums were being saved in the wrong file

Signed-off-by: Xu Wang <[email protected]>
  • Loading branch information
xwang1498 authored and jow- committed Jan 14, 2020
1 parent 3c77e4a commit 44304c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/package-ipkg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ $(_endef)
(cd $$(IDIR_$(1)); \
( \
find . -type f \! -path ./CONTROL/\* -exec sha256sum \{\} \; 2> /dev/null | \
sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-sha256 \
sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \
) || true \
)
endif
Expand Down
4 changes: 2 additions & 2 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ define Package/base-files/install
mkdir -p $(1)/etc/opkg; \
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
$(if $(CONFIG_IPK_FILES_CHECKSUMS), \
rm -f $(1)/sbin/pkg_check,)
$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
rm -f $(1)/sbin/pkg_check)
endef

ifneq ($(DUMP),1)
Expand Down

0 comments on commit 44304c1

Please sign in to comment.