From fc49bf741535024601e8151b6fd672b480d05d1e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Dec 2022 08:20:52 +0200 Subject: Update staging scripts to support multiple sections --- stage-pkg | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'stage-pkg') diff --git a/stage-pkg b/stage-pkg index fe876c6..898887b 100755 --- a/stage-pkg +++ b/stage-pkg @@ -18,8 +18,8 @@ # -q # Put packages into the queue instead of staging. Implies -d. # -# -Q -# Put packages into staging queue instead of staging. +# -Q
+# Put packages into staging queue's specified section instead of staging. # # --min-bpkg-version # @@ -43,7 +43,8 @@ bpkg --version >/dev/null bdep --version >/dev/null repo_name="STAGE.BUILD2.ORG" -repo_dir="staging/repository/1" +repo_root="staging/repository/1" +repo_dir="$repo_root" repo_host1="stage.build2.org:/var/bpkg/1" repo_host2= @@ -75,16 +76,19 @@ while [ $# -gt 0 ]; do ;; -q) #repo_name="CPPGET.ORG/QUEUE" - repo_dir="cppget.org/queue/1/alpha" + repo_root="cppget.org/queue/1" + repo_dir="$repo_root/alpha" #repo_host1="cppget.org:/var/bpkg/1/queue" #repo_host2="queue.cppget.org:/var/bpkg/1/queue" dist_only=true shift ;; -Q) + shift repo_name="QUEUE.STAGE.BUILD2.ORG" - repo_dir="staging/queue/1" - repo_host1="stage.build2.org:/var/bpkg/queue/1" + repo_root="staging/queue/1" + repo_dir="$repo_root/$1" + repo_host1="stage.build2.org:/var/pkg/1" shift ;; --min-bpkg-version) @@ -156,12 +160,14 @@ if [ -z "$pub_only" ]; then # Regenerate the repository. # + # --key "label_SIGN key" (OpenSSL 2) + # info "Insert $repo_name signing key and press Enter" read - etc/rep-update "$repo_dir/" "${rep_create_ops[@]}" \ + etc/rep-update "$repo_root/" "${rep_create_ops[@]}" \ --openssl-option -engine --openssl-option pkcs11 \ --openssl-option -keyform --openssl-option engine \ - --key "label_SIGN key" + --key "pkcs11:token=name:**build2.org;object=SIGN%20key" if [ -n "$gen_only" ]; then exit 0 @@ -174,8 +180,8 @@ fi # !pub_only info "Press Enter to start package upload" read -etc/rep-publish "$repo_dir/" "$repo_host1/" $rsync_ops +etc/rep-publish "$repo_root/" "$repo_host1/" $rsync_ops if [ -n "$repo_host2" ]; then - etc/rep-publish "$repo_dir/" "$repo_host2/" $rsync_ops + etc/rep-publish "$repo_root/" "$repo_host2/" $rsync_ops fi -- cgit v1.1