diff options
author | Karel Kočí <karel.koci@nic.cz> | 2019-06-18 14:14:08 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2019-06-18 14:14:08 +0200 |
commit | 2e3e616bf96c08083cde8748c04f2e6d2ed263e1 (patch) | |
tree | 1469c53d3b4676e56caacc37f2514b67c21f45b4 | |
parent | 63bdb87a3a269ed0c5cb7fdfb8b9c0a8e4ae76bf (diff) | |
download | openwrt-personal-pkgs-2e3e616bf96c08083cde8748c04f2e6d2ed263e1.tar.gz openwrt-personal-pkgs-2e3e616bf96c08083cde8748c04f2e6d2ed263e1.tar.bz2 openwrt-personal-pkgs-2e3e616bf96c08083cde8748c04f2e6d2ed263e1.zip |
Drop rolling updater for now
-rw-r--r-- | localrepo/Makefile | 41 | ||||
-rw-r--r-- | updater-ng/Makefile | 97 | ||||
-rw-r--r-- | updater-ng/files/turris.lua | 95 | ||||
-rw-r--r-- | updater-ng/files/updater.config | 4 | ||||
-rw-r--r-- | updater-opkg-wrapper/Makefile | 34 | ||||
-rw-r--r-- | updater-supervisor/Makefile | 41 |
6 files changed, 0 insertions, 312 deletions
diff --git a/localrepo/Makefile b/localrepo/Makefile deleted file mode 100644 index c01f6cc..0000000 --- a/localrepo/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -## Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) -# -## This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=localrepo -PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/localrepo.git -PKG_SOURCE_BRANCH:=master -PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz> - -include $(INCLUDE_DIR)/autopkg-branch.mk -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - TITLE:=Next generation updater local repository manager - DEPENDS:=+python3-light -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/localrepo $(1)/usr/bin/localrepo - $(INSTALL_DIR) $(1)/etc/updater/conf.d - $(INSTALL_CONF) $(PKG_BUILD_DIR)/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)/postinst -[ -n "$$IPKG_INSTROOT" ] || { - localrepo check --fix -} -endef - -Build/Compile:= - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/updater-ng/Makefile b/updater-ng/Makefile deleted file mode 100644 index a621c9c..0000000 --- a/updater-ng/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -## Copyright (C) 2016-2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) -# -## This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=updater-ng -PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/updater.git -PKG_SOURCE_BRANCH:=master -PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz> - -HOST_BUILD_DEPENDS:= \ - curl/host \ - libevent2/host \ - lua/host \ - uriparser/host \ - libb64/host \ - uthash/host -PKG_BUILD_DEPENDS:=busybox libb64 uthash argp-standalone - -include $(INCLUDE_DIR)/autopkg-branch.mk -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - TITLE:=The next generation updater - DEPENDS:=\ - +liblua \ - +libuci-lua \ - +libevent2 \ - +libcurl \ - +liburiparser \ - +usign \ - +ca-certificates -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libupdater.so $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/pkgupdate $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/pkgtransaction $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/updater - $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/conf.lua $(1)/etc/updater - $(INSTALL_DIR) $(1)/etc/updater/conf.d - $(INSTALL_CONF) ./files/turris.lua $(1)/etc/updater/conf.d/turris.lua - $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/example.lua $(1)/etc/updater/conf.d/example.lua - - $(INSTALL_DIR) $(1)/etc/updater/hook_preupdate - touch $(1)/etc/updater/hook_preupdate/.keep - $(INSTALL_DIR) $(1)/etc/updater/hook_postupdate - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/hook_postupdate/update_alternatives.sh $(1)/etc/updater/hook_postupdate/20_update_alternatives.sh - $(INSTALL_DIR) $(1)/etc/updater/hook_reboot_required - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/hook_reboot_required/50-create-notification.sh $(1)/etc/updater/hook_reboot_required/50-create-notification.sh - - # Note: this file is not ever used as appropriate one is generated to medkit - # it is here only for reference and to make sure that it exists. - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/updater.config $(1)/etc/config/updater -endef - -define Package/$(PKG_NAME)/conffiles -/etc/updater/conf.d/example.lua -/etc/config/updater -endef - - -define Build/Compile - $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) \ - NO_DOC=1 LUA_COMPILE:=no \ - BUSYBOX_EXEC=$(STAGING_DIR)/bin/busybox-static \ - ARGP_STANDALONE=y \ - UPDATER_VERSION:=$(PKG_VERSION) -endef - -define Host/Compile - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) $(HOST_MAKE_FLAGS) \ - NO_DOC=1 LUA_COMPILE:=no \ - UPDATER_VERSION:=$(PKG_VERSION) -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/lib/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/libupdater.so $(STAGING_DIR_HOST)/usr/lib/ - - $(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgupdate $(STAGING_DIR_HOST)/usr/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/pkgtransaction $(STAGING_DIR_HOST)/usr/bin/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/updater-ng/files/turris.lua b/updater-ng/files/turris.lua deleted file mode 100644 index 404c163..0000000 --- a/updater-ng/files/turris.lua +++ /dev/null @@ -1,95 +0,0 @@ ---[[ -This file is part of updater-ng. Don't edit it. -]] - -local uci_cursor = nil -if uci then - uci_cursor = uci.cursor(root_dir .. "/etc/config") -else - ERROR("UCI library is not available. Configuration not used.") -end -local function uci_cnf(name, default) - if uci_cursor then - return uci_cursor:get("updater", "turris", name) or default - else - return default - end -end - --- Configuration variables -local mode = uci_cnf("mode", "branch") -- should we follow branch or version? -local branch = uci_cnf("branch", "hbs") -- which branch to follow -local version = uci_cnf("version", nil) -- which version to follow -local pkglists = uci_cnf("pkglists", {}) -- what additional lists should we use - --- Verify that we have sensible configuration -if mode == "version" and not version then - WARN("Mode configured to be 'version' but no version provided. Changing mode to 'branch' instead.") - mode = "branch" -end - --- Convert pkglists to set set of lists (ensures uniqueness) -if type(pkglists) == "string" then -- if there is single list then uci returns just a string - pkglists = {pkglists} -end -local lists = {} -for _, list in pairs(pkglists) do - lists["pkglists/" .. list] = true -end - --- Load lists forced by boot arguments -if root_dir == "/" then - local cmdf = io.open("/proc/cmdline") - if cmdf then - for cmdarg in cmdf:read():gmatch('[^ ]+') do - local key, value = cmdarg:match('([^=]+)=(.*)') - if key == "turris_lists" then - for list in value:gmatch('[^,]+') do - lists[list] = true - end - end - end - cmdf:close() - end -end - --- Detect host board -local product = os_release["LEDE_DEVICE_PRODUCT"] -if product:match("[Mm]ox") then - board = "mox" -elseif product:match("[Oo]mnia") then - board = "omnia" -elseif product:match("[Tt]urris 1.x") then - board = "turris1x" -else - DIE("Unsupported Turris board: " .. tostring(product)) -end -Export('board') - --- Common URI to Turris OS lists -local base_url -if mode == "branch" then - base_url = "https://repo.turris.cz/" .. branch .. "/" .. board .. "/lists/" -elseif mode == "version" then - base_url = "https://repo.turris.cz/archive/" .. version .. "/" .. board .. "/lists/" -else - DIE("Invalid updater.turris.mode specified: " .. mode) -end - --- Common connection settings for Turris OS scripts -local script_options = { - security = "Remote", - pubkey = { - "file:///etc/updater/keys/release.pub", - "file:///etc/updater/keys/standby.pub", - "file:///etc/updater/keys/test.pub" -- It is normal for this one to not be present in production systems - } -} - --- The distribution base script. It contains the repository and bunch of basic packages -Script(base_url .. "base.lua", script_options) - --- Additional enabled distribution lists -for l in pairs(lists) do - Script(base_url .. l .. ".lua", script_options) -end diff --git a/updater-ng/files/updater.config b/updater-ng/files/updater.config deleted file mode 100644 index 82e220e..0000000 --- a/updater-ng/files/updater.config +++ /dev/null @@ -1,4 +0,0 @@ - -config turris 'turris' - option mode 'branch' - diff --git a/updater-opkg-wrapper/Makefile b/updater-opkg-wrapper/Makefile deleted file mode 100644 index 2c795f9..0000000 --- a/updater-opkg-wrapper/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -## Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) -# -## This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=updater-opkg-wrapper -PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/opkg-wrapper.git -PKG_SOURCE_BRANCH:=master -PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz> - -include $(INCLUDE_DIR)/autopkg-branch.mk -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - TITLE:=OPKG compatibility wrapper for next generation updater - DEPENDS:=+opkg +updater-ng +localrepo -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/opkg $(1)/usr/bin/opkg-pkgupdate-wrapper.sh - $(INSTALL_DIR) $(1)/etc/updater/conf.d - $(INSTALL_CONF) $(PKG_BUILD_DIR)/opkg.lua $(1)/etc/updater/conf.d/opkg.lua - $(INSTALL_DIR) $(1)/etc/updater/opkg-ignore - touch $(1)/etc/updater/opkg-ignore/.keep -endef - -Build/Compile:= - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/updater-supervisor/Makefile b/updater-supervisor/Makefile deleted file mode 100644 index 30f1d42..0000000 --- a/updater-supervisor/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -## Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/) -# -## This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=updater-supervisor -PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/supervisor.git -PKG_SOURCE_BRANCH:=master -PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz> - -include $(INCLUDE_DIR)/autopkg-branch.mk -include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk - - -define Package/$(PKG_NAME) - TITLE:=Next generation updater supervisor and its library - DEPENDS:=+updater-ng +python3-light +python3-uci +pkglists +l10n_supported - VARIANT:=python3 -endef - -define Py3Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/immediate_reboot.init $(1)/etc/init.d/updater-journal-recover - $(INSTALL_DIR) $(1)/etc/cron.d - $(INSTALL_CONF) $(PKG_BUILD_DIR)/files/cron $(1)/etc/cron.d/updater - $(INSTALL_DIR) $(1)/etc/updater/hook_postupdate - $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/hook_postupdate $(1)/etc/updater/hook_postupdate/99_approvals_cleanup -endef - - -$(eval $(call Py3Package,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME)-src)) |