mirror of
				https://github.com/openwrt/openwrt.git
				synced 2025-11-04 08:17:24 +08:00 
			
		
		
		
	apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG
Limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG as APK have different way to validate package integrity (apk audit) Link: https://github.com/openwrt/openwrt/pull/15543 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
		@ -226,15 +226,6 @@ endif
 | 
			
		||||
 | 
			
		||||
	$(RSTRIP) $$(IDIR_$(1))
 | 
			
		||||
 | 
			
		||||
    ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),)
 | 
			
		||||
	(cd $$(IDIR_$(1)); \
 | 
			
		||||
		( \
 | 
			
		||||
			find . -type f \! -path ./CONTROL/\* -exec $(MKHASH) sha256 -n \{\} \; 2> /dev/null | \
 | 
			
		||||
			sed 's|\([[:blank:]]\)\./| \1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \
 | 
			
		||||
		) || true \
 | 
			
		||||
	)
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifneq ($$(KEEP_$(1)),)
 | 
			
		||||
		@( \
 | 
			
		||||
			keepfiles=""; \
 | 
			
		||||
@ -329,6 +320,10 @@ else
 | 
			
		||||
		rm -rf $$(IDIR_$(1))/CONTROL/conffiles; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
    ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),)
 | 
			
		||||
	if [ -f $$(IDIR_$(1))/CONTROL/files-sha256sum ]; then mv -f $$(IDIR_$(1))/CONTROL/files-sha256sum $$(IDIR_$(1))/lib/apk/packages/$(1).files-sha256sum; fi
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
	if [ -z "$$$$(ls -A $$(IDIR_$(1))/CONTROL 2>/dev/null)" ]; then \
 | 
			
		||||
		rm -rf $$(IDIR_$(1))/CONTROL; \
 | 
			
		||||
	else \
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user