diff options
author | John Crispin <blogic@openwrt.org> | 2014-08-06 18:18:47 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-08-06 18:18:47 +0000 |
commit | 63cb54edd5e55ad7f89eea303deb34a2e38cf874 (patch) | |
tree | b3367ee4159104d807163e570c66d52f131db791 /package | |
parent | ae669a075f4c0d41f62fc0d73fa37cea9f64ea10 (diff) | |
download | upstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.tar.gz upstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.tar.bz2 upstream-63cb54edd5e55ad7f89eea303deb34a2e38cf874.zip |
build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Backport of r42002
git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@42016 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/Makefile | 21 | ||||
-rw-r--r-- | package/base-files/image-config.in | 11 | ||||
-rw-r--r-- | package/system/opkg/Makefile | 8 | ||||
-rw-r--r-- | package/system/opkg/files/opkg-smime.conf | 1 | ||||
-rw-r--r-- | package/system/opkg/files/opkg.conf | 1 |
5 files changed, 36 insertions, 6 deletions
diff --git a/package/Makefile b/package/Makefile index 1930d27cf8..bf1b16fc9a 100644 --- a/package/Makefile +++ b/package/Makefile @@ -7,6 +7,8 @@ curdir:=package +include $(INCLUDE_DIR)/feeds.mk + -include $(TMP_DIR)/.packagedeps $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m)) $(curdir)/builddirs-install:=. @@ -127,11 +129,19 @@ ifndef CONFIG_OPKGSMIME_PASSPHRASE endif endif +PACKAGE_SUBDIRS=. +ifneq ($(CONFIG_PER_FEED_REPO),) + PACKAGE_SUBDIRS=base $(FEEDS_ENABLED) +endif + $(curdir)/index: FORCE @echo Generating package index... - @(cd $(PACKAGE_DIR); \ + @for d in $(PACKAGE_SUBDIRS); do ( \ + [ -d $(PACKAGE_DIR)/$$d ] && \ + cd $(PACKAGE_DIR)/$$d || continue; \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ - gzip -9c Packages > Packages.gz ) + gzip -9c Packages > Packages.gz; \ + ); done ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_KEY)),) @echo Signing key has not been configured else @@ -139,12 +149,15 @@ ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_CERT)),) @echo Certificate has not been configured else @echo Signing package index... - @(cd $(PACKAGE_DIR); \ + @for d in $(PACKAGE_SUBDIRS); do ( \ + [ -d $(PACKAGE_DIR)/$$d ] && \ + cd $(PACKAGE_DIR)/$$d || continue; \ openssl smime -binary -in Packages.gz \ -out Packages.sig -outform PEM -sign \ -signer $(CONFIG_OPKGSMIME_CERT) \ -inkey $(CONFIG_OPKGSMIME_KEY) \ - $(PASSOPT) $(PASSARG) ) + $(PASSOPT) $(PASSARG); \ + ); done endif endif diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 66134aad3c..d745369a2c 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -208,6 +208,17 @@ if VERSIONOPT Useful for OEMs building OpenWrt based firmware endif + +menuconfig PER_FEED_REPO + bool "Separate feed repositories" if IMAGEOPT + default n + help + If set, a separate repository is generated within bin/*/packages/ + for the core packages and each enabled feed. + +source "tmp/.config-feeds.in" + + menuconfig SMIMEOPT bool "Package signing options" if IMAGEOPT default n diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 857fe561d8..5dfabc2ca2 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk +include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=opkg PKG_REV:=9c97d5ecd795709c8584e972bfdf3aee3a5b846d @@ -104,6 +105,13 @@ define Package/opkg/Default/install $(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/etc $(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf + ifeq ($(CONFIG_PER_FEED_REPO),) + echo "src/gz %n %U" >> $(1)/etc/opkg.conf + else + for d in base $(FEEDS_ENABLED); do \ + echo "src/gz %n_$$$$d %U/$$$$d" >> $(1)/etc/opkg.conf; \ + done + endif $(VERSION_SED) $(1)/etc/opkg.conf $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg endef diff --git a/package/system/opkg/files/opkg-smime.conf b/package/system/opkg/files/opkg-smime.conf index 849bb65b20..fd2cade1f8 100644 --- a/package/system/opkg/files/opkg-smime.conf +++ b/package/system/opkg/files/opkg-smime.conf @@ -1,4 +1,3 @@ -src/gz %n %U dest root / dest ram /tmp lists_dir ext /var/opkg-lists diff --git a/package/system/opkg/files/opkg.conf b/package/system/opkg/files/opkg.conf index 6fb42b7fa4..d8d3a2d693 100644 --- a/package/system/opkg/files/opkg.conf +++ b/package/system/opkg/files/opkg.conf @@ -1,4 +1,3 @@ -src/gz %n %U dest root / dest ram /tmp lists_dir ext /var/opkg-lists |