From 0bcdf73271be4a4f9ca8c849c426b521365dcf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 6 Nov 2017 08:23:58 +0100 Subject: Rename myrepo-cert to just myrepo --- build_repo.sh | 2 +- myrepo-cert/Makefile | 35 ----------------------------------- myrepo-cert/files/key.pub | 2 -- myrepo-cert/files/key.sec | 2 -- myrepo-cert/files/updater.lua | 10 ---------- myrepo/Makefile | 35 +++++++++++++++++++++++++++++++++++ myrepo/files/key.pub | 2 ++ myrepo/files/key.sec | 2 ++ myrepo/files/updater.lua | 12 ++++++++++++ omnia.lua | 2 +- 10 files changed, 53 insertions(+), 51 deletions(-) delete mode 100644 myrepo-cert/Makefile delete mode 100644 myrepo-cert/files/key.pub delete mode 100644 myrepo-cert/files/key.sec delete mode 100644 myrepo-cert/files/updater.lua create mode 100644 myrepo/Makefile create mode 100644 myrepo/files/key.pub create mode 100644 myrepo/files/key.sec create mode 100644 myrepo/files/updater.lua diff --git a/build_repo.sh b/build_repo.sh index e57a779..130e239 100755 --- a/build_repo.sh +++ b/build_repo.sh @@ -67,7 +67,7 @@ deploy() { local TARGET="cynerd.cz:/var/www/myrepo" ssh cynerd.cz -- mkdir -p "/var/www/myrepo/$1" # Make sure that directory exists echo -e "\e[1;34mSign and deploy $1\e[0m" - SEC=myrepo-cert/files/key.sec + SEC=myrepo/files/key.sec pushd .$1-sdk staging_dir/host/bin/usign -S -s ../$SEC -m bin/$2/packages/base/Packages scp bin/$2/packages/base/* "$TARGET/$1/" diff --git a/myrepo-cert/Makefile b/myrepo-cert/Makefile deleted file mode 100644 index c8ce9d6..0000000 --- a/myrepo-cert/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -## Copyright (C) 2016-2017 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:=myrepo-cert -PKG_VERSION:=3 -PKG_MAINTAINER:=Karel Koci -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/myrepo-cert - TITLE:=myrepo-cert -endef - -define Build/Compile - true -endef - -define Package/myrepo-cert/install - $(INSTALL_DIR) $(1)/etc/opkg/keys - $(INSTALL_DIR) $(1)/etc/updater/keys - $(INSTALL_DATA) ./files/key.pub $(1)/etc/opkg/keys/cfb977a0d53c5424 - $(INSTALL_DATA) ./files/key.pub $(1)/etc/updater/keys/myrepo.pub - - $(INSTALL_DIR) $(1)/etc/updater/conf.d - $(INSTALL_CONF) ./files/updater.lua $(1)/etc/updater/conf.d/myrepo.lua -endef - -$(eval $(call BuildPackage,myrepo-cert)) diff --git a/myrepo-cert/files/key.pub b/myrepo-cert/files/key.pub deleted file mode 100644 index 4173ed5..0000000 --- a/myrepo-cert/files/key.pub +++ /dev/null @@ -1,2 +0,0 @@ -untrusted comment: private key cfb977a0d53c5424 -RWTPuXeg1TxUJC6EOmawdomx+1cuPaBx5g6B1A2nq0TI6Gf8mbRoU2w6 diff --git a/myrepo-cert/files/key.sec b/myrepo-cert/files/key.sec deleted file mode 100644 index 5731869..0000000 --- a/myrepo-cert/files/key.sec +++ /dev/null @@ -1,2 +0,0 @@ -untrusted comment: public key cfb977a0d53c5424 -RWRCSwAAAAC/rGfdjaQn9ZWPHvtqQrzm9dkd/bHNF4XPuXeg1TxUJCiZuBFQLxqoolLnufYHIHHGvgFbJpjnT1v8X2W831l+LoQ6ZrB2ibH7Vy49oHHmDoHUDaerRMjoZ/yZtGhTbDo= diff --git a/myrepo-cert/files/updater.lua b/myrepo-cert/files/updater.lua deleted file mode 100644 index f68f585..0000000 --- a/myrepo-cert/files/updater.lua +++ /dev/null @@ -1,10 +0,0 @@ -local board -if model:match('[Oo]mnia') then - board = "omnia" -else - board = "turris" -end - -Script("myrepo", "http://cynerd.cz/myrepo/" .. board .. ".lua", { - pubkey = "file:///etc/updater/keys/myrepo.pub" -}) diff --git a/myrepo/Makefile b/myrepo/Makefile new file mode 100644 index 0000000..ac252cc --- /dev/null +++ b/myrepo/Makefile @@ -0,0 +1,35 @@ +# +## Copyright (C) 2016-2017 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:=myrepo +PKG_VERSION:=1 +PKG_MAINTAINER:=Karel Koci +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/myrepo + TITLE:=myrepo +endef + +define Build/Compile + : +endef + +define Package/myrepo/install + $(INSTALL_DIR) $(1)/etc/opkg/keys + $(INSTALL_DIR) $(1)/etc/updater/keys + $(INSTALL_DATA) ./files/key.pub $(1)/etc/opkg/keys/cfb977a0d53c5424 + $(INSTALL_DATA) ./files/key.pub $(1)/etc/updater/keys/myrepo.pub + + $(INSTALL_DIR) $(1)/etc/updater/conf.d + $(INSTALL_CONF) ./files/updater.lua $(1)/etc/updater/conf.d/myrepo.lua +endef + +$(eval $(call BuildPackage,myrepo)) diff --git a/myrepo/files/key.pub b/myrepo/files/key.pub new file mode 100644 index 0000000..4173ed5 --- /dev/null +++ b/myrepo/files/key.pub @@ -0,0 +1,2 @@ +untrusted comment: private key cfb977a0d53c5424 +RWTPuXeg1TxUJC6EOmawdomx+1cuPaBx5g6B1A2nq0TI6Gf8mbRoU2w6 diff --git a/myrepo/files/key.sec b/myrepo/files/key.sec new file mode 100644 index 0000000..5731869 --- /dev/null +++ b/myrepo/files/key.sec @@ -0,0 +1,2 @@ +untrusted comment: public key cfb977a0d53c5424 +RWRCSwAAAAC/rGfdjaQn9ZWPHvtqQrzm9dkd/bHNF4XPuXeg1TxUJCiZuBFQLxqoolLnufYHIHHGvgFbJpjnT1v8X2W831l+LoQ6ZrB2ibH7Vy49oHHmDoHUDaerRMjoZ/yZtGhTbDo= diff --git a/myrepo/files/updater.lua b/myrepo/files/updater.lua new file mode 100644 index 0000000..b9946c0 --- /dev/null +++ b/myrepo/files/updater.lua @@ -0,0 +1,12 @@ +local board +if model:match('[Oo]mnia') then + board = "omnia" +else + board = "turris" +end + +Script("myrepo", "http://cynerd.cz/myrepo/" .. board .. ".lua", { + pubkey = "file:///etc/updater/keys/myrepo.pub" +}) + +Install("myrepo") diff --git a/omnia.lua b/omnia.lua index a494368..0225da8 100644 --- a/omnia.lua +++ b/omnia.lua @@ -4,4 +4,4 @@ Repository("myrepo", "http://cynerd.cz/myrepo/omnia/", { priority = 50, pubkey = "file:///etc/updater/keys/myrepo.pub" }) -Install("myrepo-cert", {critical=true}) +Install("myrepo", {critical=true}) -- cgit v1.2.3