diff options
author | Karel Kočí <karel.koci@nic.cz> | 2018-01-31 13:08:26 +0100 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2018-01-31 13:08:26 +0100 |
commit | 487926eb9eaf5e909b3f81b28cac2a1c74de3699 (patch) | |
tree | 211026313e4ef1e1093b018341a4969365b783d4 /updater-ng-auto | |
parent | 479cf83fc7f5933ceaa71119142d712c7d80c266 (diff) | |
download | turris-myrepo-487926eb9eaf5e909b3f81b28cac2a1c74de3699.tar.gz turris-myrepo-487926eb9eaf5e909b3f81b28cac2a1c74de3699.tar.bz2 turris-myrepo-487926eb9eaf5e909b3f81b28cac2a1c74de3699.zip |
Update updater-ng to latest version of package
Diffstat (limited to 'updater-ng-auto')
-rw-r--r-- | updater-ng-auto/Makefile | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/updater-ng-auto/Makefile b/updater-ng-auto/Makefile index 051d04c..7bf4782 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:=60.0.2 +PKG_VERSION:=60.0.7 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater.git @@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/host-build.mk define Package/$(PKG_NAME) TITLE:=The next generation updater - DEPENDS:=+liblua +libevent2 +usign +libcurl +vixie-cron + DEPENDS:=+liblua +libevent2 +usign +libcurl +vixie-cron +ca-certificates endef define Package/$(PKG_NAME)/install @@ -77,20 +77,24 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh -[ -n "$$IPKG_INSTROOT" ] || { +if [ -z "$$IPKG_INSTROOT" ]; then /etc/init.d/updater enable || true -} +fi # Remove morphered syntax from auto.lua # This matches all Install and Package commands not followed by brackets. Whole # line is enclosed with brackets and between strings and tables are added commas. -AUTOTMP="$$(mktemp)" -sed -E '/^(Install|Package) +[^(]/{ - s/(Install|Package) +(.*)/\1(\2)/; - s/("|\}) ("|\{)/\1, \2/g - }' "$$IPKG_INSTROOT/etc/updater/auto.lua" > "$$AUTOTMP" -# Note: Edit in place in busybox limits regexp syntax so we are using our temporally file -mv "$$AUTOTMP" "$$IPKG_INSTROOT/etc/updater/auto.lua" +# Note: we don't have to check opkg-auto.lua as we do this migration before we +# move auto.lua to that name. +if [ -f "$$IPKG_INSTROOT/etc/updater/auto.lua" ]; then + AUTOTMP="$$(mktemp)" + sed -E '/^(Install|Package) +[^(]/{ + s/(Install|Package) +(.*)/\1(\2)/; + s/("|\}) ("|\{)/\1, \2/g + }' "$$IPKG_INSTROOT/etc/updater/auto.lua" > "$$AUTOTMP" + # Note: Edit in place in busybox limits regexp syntax so we are using our temporally file + mv "$$AUTOTMP" "$$IPKG_INSTROOT/etc/updater/auto.lua" +fi # With updater version 60.0 all configurations were moved to /etc/updater/conf.d/ conf_move() { @@ -132,6 +136,15 @@ define Package/$(PKG_NAME)-localrepo/install $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/localrepo/localrepo.lua $(1)/etc/updater/conf.d/localrepo.lua endef +# Repository should be consistent when updater is executed successfully but this +# ensures that we will fix any problems that can be caused by older version of +# localrepo +define Package/$(PKG_NAME)-localrepo/postinst +[ -n "$$IPKG_INSTROOT" ] || { + localrepo check --fix +} +endef + define Package/$(PKG_NAME)-opkg TITLE:=OPKG compatibility wrapper for next generation updater |