From 195bf10c292897a62a366dd4679b51bed476b726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 28 Nov 2017 16:21:05 +0100 Subject: Updater-ng-auto update to newest version --- updater-ng-auto/Makefile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'updater-ng-auto') diff --git a/updater-ng-auto/Makefile b/updater-ng-auto/Makefile index 8ea0c76..051d04c 100644 --- a/updater-ng-auto/Makefile +++ b/updater-ng-auto/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=updater-ng -PKG_VERSION:=59.3 +PKG_VERSION:=60.0.2 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater.git @@ -64,14 +64,13 @@ endif $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/init $(1)/etc/init.d/updater $(INSTALL_DIR) $(1)/etc/cron.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/cron $(1)/etc/cron.d/updater + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/cron $(1)/etc/cron.d/updater $(INSTALL_DIR) $(1)/etc/ssl $(INSTALL_DATA) $(PKG_BUILD_DIR)/updater.pem $(1)/etc/ssl/updater.pem endef define Package/$(PKG_NAME)/conffiles -/etc/updater/conf.d/base.lua /etc/updater/conf.d/example.lua /etc/config/updater endef @@ -93,10 +92,11 @@ sed -E '/^(Install|Package) +[^(]/{ # Note: Edit in place in busybox limits regexp syntax so we are using our temporally file mv "$$AUTOTMP" "$$IPKG_INSTROOT/etc/updater/auto.lua" -# With updater version 60 all configurations were moved to /etc/updater/conf.d/ +# With updater version 60.0 all configurations were moved to /etc/updater/conf.d/ conf_move() { - [ ! -f "$$IPKG_INSTROOT/etc/updater/$$1" ] || \ + if [ -f "$$IPKG_INSTROOT/etc/updater/$$1" -a ! -f "$$IPKG_INSTROOT/etc/updater/conf.d/$$2" ]; then mv "$$IPKG_INSTROOT/etc/updater/$$1" "$$IPKG_INSTROOT/etc/updater/conf.d/$$2" + fi } conf_move user.lua user.lua conf_move auto.lua opkg-auto.lua @@ -141,14 +141,18 @@ endef define Package/$(PKG_NAME)-opkg/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/opkg-wrapper/opkg $(1)/usr/bin/opkg-pkgupdate-wrapper.sh - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/content2localrepo $(1)/usr/bin/updater-ng-opkg-content2localrepo.sh + $(INSTALL_DIR) $(1)/usr/share/updater + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/content2localrepo $(1)/usr/share/updater/opkg-content2localrepo.sh $(INSTALL_DIR) $(1)/etc/updater/conf.d $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/opkg-wrapper/opkg.lua $(1)/etc/updater/conf.d/opkg.lua endef +# We are calling migration to localrepo from updater-ng-opkg package posinst as +# this one is called after updater-ng-localrepo one and script expect both of +# these packages. define Package/$(PKG_NAME)-opkg/postinst [ -n "$$IPKG_INSTROOT" ] || { - /usr/bin/updater-ng-opkg-content2localrepo.sh + /usr/share/updater/opkg-content2localrepo.sh } endef @@ -171,8 +175,19 @@ define Package/opkg-trans/install true endef +# This is same case as opkg-trans. Updater is package with originally obsolete +# updater version. +define Package/updater + TITLE:=Dummy updater package +endef + +define Package/updater/install + true +endef + $(eval $(call BuildPackage,updater-ng)) $(eval $(call BuildPackage,updater-ng-localrepo)) $(eval $(call BuildPackage,updater-ng-opkg)) $(eval $(call BuildPackage,opkg-trans)) +$(eval $(call BuildPackage,updater)) $(eval $(call HostBuild)) -- cgit v1.2.3