From 27bfde9c9f789dbfabebf13047e8b042c27cdeef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Mon, 20 May 2019 16:38:33 +0200 Subject: [PATCH] base-files: move urandom seed bits into separate package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So it's possible to install or remove it as needed. Tested-by: Lucian Cristian Signed-off-by: Petr Å tetiar --- package/base-files/Makefile | 11 ++++++- package/system/urandom-seed/Makefile | 32 +++++++++++++++++++ .../files/etc/init.d/urandom_seed | 0 .../files/lib/preinit/81_urandom_seed | 0 .../urandom-seed}/files/sbin/urandom_seed | 0 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 package/system/urandom-seed/Makefile rename package/{base-files => system/urandom-seed}/files/etc/init.d/urandom_seed (100%) rename package/{base-files => system/urandom-seed}/files/lib/preinit/81_urandom_seed (100%) rename package/{base-files => system/urandom-seed}/files/sbin/urandom_seed (100%) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 609ffa2c38..91d677acb3 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -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 diff --git a/package/system/urandom-seed/Makefile b/package/system/urandom-seed/Makefile new file mode 100644 index 0000000000..6bde2e0b8a --- /dev/null +++ b/package/system/urandom-seed/Makefile @@ -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)) diff --git a/package/base-files/files/etc/init.d/urandom_seed b/package/system/urandom-seed/files/etc/init.d/urandom_seed similarity index 100% rename from package/base-files/files/etc/init.d/urandom_seed rename to package/system/urandom-seed/files/etc/init.d/urandom_seed diff --git a/package/base-files/files/lib/preinit/81_urandom_seed b/package/system/urandom-seed/files/lib/preinit/81_urandom_seed similarity index 100% rename from package/base-files/files/lib/preinit/81_urandom_seed rename to package/system/urandom-seed/files/lib/preinit/81_urandom_seed diff --git a/package/base-files/files/sbin/urandom_seed b/package/system/urandom-seed/files/sbin/urandom_seed similarity index 100% rename from package/base-files/files/sbin/urandom_seed rename to package/system/urandom-seed/files/sbin/urandom_seed -- 2.25.1