From f55ff444baeca19d1b0615d826b20350d3ff7990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 6 Apr 2018 16:58:43 +0200 Subject: Update updater-ng package to latest --- updater-ng/Makefile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'updater-ng/Makefile') diff --git a/updater-ng/Makefile b/updater-ng/Makefile index be5b4ff..b391b62 100644 --- a/updater-ng/Makefile +++ b/updater-ng/Makefile @@ -23,7 +23,7 @@ $(call include_mk, python3-package.mk) define Package/$(PKG_NAME) TITLE:=The next generation updater - DEPENDS:=+liblua +libevent2 +usign +libcurl +vixie-cron +ca-certificates + DEPENDS:=+liblua +libevent2 +usign +libcurl +ca-certificates endef define Package/$(PKG_NAME)/install @@ -33,6 +33,7 @@ define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/opkg-trans $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/pkgupdate $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/updater.sh $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/updater $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/entry.lua $(1)/etc/updater @@ -117,13 +118,12 @@ endef define Package/$(PKG_NAME)-supervisor TITLE:=Next generation updater supervisor - DEPENDS:=+updater-ng-py2-supervisor + DEPENDS:=+updater-ng-py2-supervisor +updater-ng +vixie-cron endef define Package/$(PKG_NAME)-supervisor/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/updater-supervisor $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/updater.sh $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/cron.d $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/supervisor/cron $(1)/etc/cron.d/updater @@ -221,6 +221,24 @@ define Package/updater/install true endef +# We are migrating away from Nuci for Foris. But during this migration there is +# a problem where updater update it self and then requests approval. But because +# we dropped some files nuci expects and Foris is not yet updated there is no way +# user can easily approve update. Solution is to have package providing those +# missing file and install it temporally just to fix that problem. +define Package/$(PKG_NAME)-migration-helper + TITLE:=Package for smoot migration of updater-ng +endef + +define Package/$(PKG_NAME)-migration-helper/install + $(INSTALL_DIR) $(1)/usr/bin + echo '#!/bin/sh' > $(1)/usr/bin/updater-unstuck.sh + chmod +x $(1)/usr/bin/updater-unstuck.sh + echo '#!/bin/sh' > $(1)/usr/bin/updater-wipe.sh + chmod +x $(1)/usr/bin/updater-wipe.sh +endef + + PKG_INSTALL_DIR_ORIG:="$(PKG_INSTALL_DIR)" PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py2" $(eval $(call PyPackage,updater-ng-py2-supervisor)) @@ -236,4 +254,5 @@ $(eval $(call BuildPackage,updater-ng-localrepo)) $(eval $(call BuildPackage,updater-ng-opkg)) $(eval $(call BuildPackage,opkg-trans)) $(eval $(call BuildPackage,updater)) +$(eval $(call BuildPackage,updater-ng-migration-helper)) $(eval $(call HostBuild)) -- cgit v1.2.3