diff options
author | Karel Kočí <karel.koci@nic.cz> | 2018-04-06 16:58:43 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2018-04-06 16:58:43 +0200 |
commit | f55ff444baeca19d1b0615d826b20350d3ff7990 (patch) | |
tree | 087973d8f5ee219e9d745fd4a246e4de287fb205 /updater-ng | |
parent | f7e52497c6d88253849ebd9bd32a0811c5d0bebc (diff) | |
download | turris-myrepo-f55ff444baeca19d1b0615d826b20350d3ff7990.tar.gz turris-myrepo-f55ff444baeca19d1b0615d826b20350d3ff7990.tar.bz2 turris-myrepo-f55ff444baeca19d1b0615d826b20350d3ff7990.zip |
Diffstat (limited to 'updater-ng')
-rw-r--r-- | updater-ng/Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
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)) |