base-files: move urandom seed bits into separate package
So it's possible to install or remove it as needed. Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
		
							parent
							
								
									9b4de712ca
								
							
						
					
					
						commit
						27bfde9c9f
					
				@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 | 
			
		||||
include $(INCLUDE_DIR)/feeds.mk
 | 
			
		||||
 | 
			
		||||
PKG_NAME:=base-files
 | 
			
		||||
PKG_RELEASE:=197
 | 
			
		||||
PKG_RELEASE:=198
 | 
			
		||||
PKG_FLAGS:=nonshared
 | 
			
		||||
 | 
			
		||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 | 
			
		||||
@ -43,6 +43,15 @@ define Package/base-files
 | 
			
		||||
  VERSION:=$(PKG_RELEASE)-$(REVISION)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define Package/urandom-seed
 | 
			
		||||
  SECTION:=base
 | 
			
		||||
  CATEGORY:=Base system
 | 
			
		||||
  DEPENDS:=+libc +ubox-getrandom
 | 
			
		||||
  TITLE:=/etc/urandom.seed handling for OpenWrt
 | 
			
		||||
  URL:=http://openwrt.org/
 | 
			
		||||
  VERSION:=$(PKG_RELEASE)-$(REVISION)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define Package/base-files/conffiles
 | 
			
		||||
/etc/config/
 | 
			
		||||
/etc/config/network
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										32
									
								
								package/system/urandom-seed/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								package/system/urandom-seed/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,32 @@
 | 
			
		||||
include $(TOPDIR)/rules.mk
 | 
			
		||||
 | 
			
		||||
PKG_NAME:=urandom-seed
 | 
			
		||||
PKG_VERSION:=1.0
 | 
			
		||||
PKG_RELEASE:=1
 | 
			
		||||
PKG_LICENSE:=GPL-2.0
 | 
			
		||||
 | 
			
		||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 | 
			
		||||
 | 
			
		||||
include $(INCLUDE_DIR)/package.mk
 | 
			
		||||
 | 
			
		||||
define Package/$(PKG_NAME)
 | 
			
		||||
  SECTION:=base
 | 
			
		||||
  CATEGORY:=Base system
 | 
			
		||||
  DEPENDS:=+getrandom
 | 
			
		||||
  TITLE:=/etc/urandom.seed handling for OpenWrt
 | 
			
		||||
  URL:=http://openwrt.org/
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define Build/Prepare
 | 
			
		||||
	mkdir -p $(PKG_BUILD_DIR)
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
define Build/Compile/Default
 | 
			
		||||
endef
 | 
			
		||||
Build/Compile = $(Build/Compile/Default)
 | 
			
		||||
 | 
			
		||||
define Package/$(PKG_NAME)/install
 | 
			
		||||
	$(CP) ./files/* $(1)/
 | 
			
		||||
endef
 | 
			
		||||
 | 
			
		||||
$(eval $(call BuildPackage,urandom-seed))
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user