summaryrefslogtreecommitdiff
path: root/stage-pkg
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-20 08:20:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-20 08:20:52 +0200
commitfc49bf741535024601e8151b6fd672b480d05d1e (patch)
treece1153f7d4da8172a5975ff55aded2136ae6bb32 /stage-pkg
parente02c97d8f8e4b0864eddeabb0976de09eb12eaf0 (diff)
Update staging scripts to support multiple sections
Diffstat (limited to 'stage-pkg')
-rwxr-xr-xstage-pkg26
1 files changed, 16 insertions, 10 deletions
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 <section>
+# Put packages into staging queue's specified section instead of staging.
#
# --min-bpkg-version <ver>
#
@@ -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