scripts: Add two new variables: awssrpmurl and awsdebuginfourl to unify sync scripts.
authorDevrim Gunduz <devrim@gunduz.org>
Mon, 24 Nov 2025 08:34:18 +0000 (11:34 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Mon, 24 Nov 2025 08:34:18 +0000 (11:34 +0300)
scripts/buildserver/global.sh
scripts/buildserver/packagesync.sh
scripts/buildserver/packagesyncalphabeta.sh
scripts/buildserver/packagesynccommon.sh
scripts/buildserver/packagesyncextras.sh
scripts/buildserver/packagesyncnonfree.sh

index 4b79b7e69fe1e21ada4cc5ab98565f031a2792ba..46e06e0f04df27fff19ddc804a911f4cc656bfed 100755 (executable)
@@ -34,6 +34,8 @@ export GPG_TTY=$(tty)
 export GPG_PASSWORD=foobar
 
 export AWS_PAGER=""
+export awssrpmurl=s3://dnf-srpms.postgresql.org20250313103537584600000001              # s3://dnf-srpms.postgresql.org20250313103537584600000001 or s3://zypp-srpms.postgresql.org20250618120322107700000001
+export awsdebuginfourl=s3://dnf-debuginfo.postgresql.org20250312201116649700000001     # s3://dnf-debuginfo.postgresql.org20250312201116649700000001 or s3://zypp-debuginfo.postgresql.org20250312201116651400000002
 
 export CF_DEBUG_DISTRO_ID=XXXXXXXXXXXXXXXXXX
 export CF_SRPM_DISTRO_ID=XXXXXXXXXXXXXXXXXX
index 748311cf7d65122a06258cec3c742ef9e396c2f0..6d5b5810cefb2a2314fab2f9800715f5574dbf65 100755 (executable)
@@ -58,16 +58,16 @@ do
        echo $GPG_PASSWORD | /usr/bin/gpg2 -a --pinentry-mode loopback --detach-sign --batch --yes --passphrase-fd 0 $SRPM_DIR/repodata/repomd.xml
 
        # We currently pull packages from yonada, so skip the next line:
-       rsync --checksum -ave ssh --delete $RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch
+       rsync --checksum -ave ssh --delete $RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch
 
        # Sync SRPMs to S3 bucket:
-       aws s3 sync $SRPM_DIR s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch --exclude "*.html" --exclude "repodata"
-       aws s3 sync --delete $SRPM_DIR/repodata/ s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+       aws s3 sync $SRPM_DIR $awssrpmurl/srpms/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch --exclude "*.html" --exclude "repodata"
+       aws s3 sync --delete $SRPM_DIR/repodata/ $awssrpmurl/srpms/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
        aws cloudfront create-invalidation --distribution-id $CF_SRPM_DISTRO_ID --path /srpms/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/*
 
        # Sync debug* RPMs to S3 bucket:
-       aws s3 sync $DEBUG_RPM_DIR s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
-       aws s3 sync --delete $DEBUG_RPM_DIR/repodata/ s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+       aws s3 sync $DEBUG_RPM_DIR $awsdebuginfourl/debug/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
+       aws s3 sync --delete $DEBUG_RPM_DIR/repodata/ $awsdebuginfourl/debug/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
        aws cloudfront create-invalidation --distribution-id $CF_DEBUG_DISTRO_ID --path /debug/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/repodata/*
 done
 
index bb5a12ceabdd3aed82cb03142c310d75e22666e3..aa5731ebeb0e71790dc78e8e289375919a988be8 100755 (executable)
@@ -81,9 +81,9 @@ echo $GPG_PASSWORD | /usr/bin/gpg2 -a --pinentry-mode loopback --detach-sign --b
 # rsync --checksum -ave ssh --delete $TESTING_RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/testing/$packageSyncVersion/$osdistro/$os-$osarch
 
 # Sync SRPMs to S3 bucket:
-aws s3 sync $TESTING_SRPM_DIR s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/testing/$packageSyncVersion/$osdistro/$os-$osarch --exclude "*.html"
+aws s3 sync $TESTING_SRPM_DIR $awssrpmurl/srpms/testing/$packageSyncVersion/$osdistro/$os-$osarch --exclude "*.html"
 
 # Sync debug* RPMs to S3 bucket:
-aws s3 sync $TESTING_DEBUG_RPM_DIR s3://dnf-debuginfo.postgresql.org20250312201116649700000001/testing/debug/$packageSyncVersion/$osdistro/$os-$osarch/ --exclude "*.html"
+aws s3 sync $TESTING_DEBUG_RPM_DIR $awsdebuginfourl/testing/debug/$packageSyncVersion/$osdistro/$os-$osarch/ --exclude "*.html"
 
 exit 0
index 18b7cd5758023f909905f3c62347a497024b7df9..2a4f93354bd4bc462e81b2ec198048ef4a0fe939 100755 (executable)
@@ -46,13 +46,13 @@ echo $GPG_PASSWORD | /usr/bin/gpg2 -a --pinentry-mode loopback --detach-sign --b
 rsync --checksum -ave ssh --delete $COMMON_RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/common/$osdistro/$os.$osminversion-$osarch
 
 # Sync SRPMs to S3 bucket:
-aws s3 sync $COMMON_SRPM_DIR s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/common/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
-aws s3 sync --delete $COMMON_SRPM_DIR/repodata/ s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/common/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+aws s3 sync $COMMON_SRPM_DIR $awssrpmurl/srpms/common/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
+aws s3 sync --delete $COMMON_SRPM_DIR/repodata/ $awssrpmurl/srpms/common/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
 aws cloudfront create-invalidation --distribution-id $CF_SRPM_DISTRO_ID --path /srpms/common/$osdistro/$os.$osminversion-$osarch/repodata/*
 
 # Sync debug* RPMs to S3 bucket:
-aws s3 sync $COMMON_DEBUG_RPM_DIR s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/common/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
-aws s3 sync --delete $COMMON_DEBUG_RPM_DIR/repodata/ s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/common/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+aws s3 sync $COMMON_DEBUG_RPM_DIR $awsdebuginfourl/debug/common/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html" --exclude "repodata"
+aws s3 sync --delete $COMMON_DEBUG_RPM_DIR/repodata/ $awsdebuginfourl/debug/common/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
 aws cloudfront create-invalidation --distribution-id $CF_DEBUG_DISTRO_ID --path /debug/common/$osdistro/$os.$osminversion-$osarch/repodata/*
 
 exit 0
index c78032b695671079f9297477429908be8e321ada..562923fbb66facccf99ece90fed047fe8f040a46 100755 (executable)
@@ -51,17 +51,17 @@ echo $GPG_PASSWORD | /usr/bin/gpg2 -a --pinentry-mode loopback --detach-sign --b
 echo $GPG_PASSWORD | /usr/bin/gpg2 -a --pinentry-mode loopback --detach-sign --batch --yes --passphrase-fd 0 $EXTRAS_DEBUG_RPM_DIR/repodata/repomd.xml
 
 #  We currently pull packages from yonada, so skip the next line:
-rsync -ave ssh --delete $EXTRAS_RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch
+# rsync -ave ssh --delete $EXTRAS_RPM_DIR/ yumupload@yum.postgresql.org:yum/yum/extras/$osdistro/$os.$osminversion-$osarch
 
 # Sync SRPMs to S3 bucket:
-aws s3 sync $EXTRAS_SRPM_DIR s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch --exclude "*.html" --exclude "repodata"
-aws s3 sync --delete $EXTRAS_SRPM_DIR/repodata/ s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
-aws cloudfront create-invalidation --distribution-id $CF_SRPM_DISTRO_ID --path /srpms/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch/repodata/*
+aws s3 sync $EXTRAS_SRPM_DIR $awssrpmurl/srpms/extras/$osdistro/$os.$osminversion-$osarch --exclude "*.html" --exclude "repodata"
+aws s3 sync --delete $EXTRAS_SRPM_DIR/repodata/ $awssrpmurl/srpms/extras/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+aws cloudfront create-invalidation --distribution-id $CF_SRPM_DISTRO_ID --path /srpms/extras/$osdistro/$os.$osminversion-$osarch/repodata/*
 
 # Sync debug* RPMs to S3 bucket:
-aws s3 sync $EXTRAS_DEBUG_RPM_DIR s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html"
-aws s3 sync --delete $EXTRAS_DEBUG_RPM_DIR/repodata/ s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
-aws cloudfront create-invalidation --distribution-id $CF_DEBUG_DISTRO_ID --path /debug/common/pgdg-$osshort.$osminversion-extras/$osdistro/$os.$osminversion-$osarch/repodata/*
+aws s3 sync $EXTRAS_DEBUG_RPM_DIR $awsdebuginfourl/debug/extras/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html"
+aws s3 sync --delete $EXTRAS_DEBUG_RPM_DIR/repodata/ $awsdebuginfourl/debug/extras/$osdistro/$os.$osminversion-$osarch/repodata/ --exclude "*.html"
+aws cloudfront create-invalidation --distribution-id $CF_DEBUG_DISTRO_ID --path /debug/extras/$osdistro/$os.$osminversion-$osarch/repodata/*
 
 
 exit 0
index fb9951158e02bb9c907148c5d344151abea84bba..c43c5fc270ac70bd5373399da06737a3aba19721 100755 (executable)
@@ -83,10 +83,10 @@ do
        # rsync --checksum -ave ssh --delete $SRPM_DIR/ yumupload@yum.postgresql.org:yum/yum/srpms/non-free/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch
 
        # Sync SRPMs to S3 bucket:
-       aws s3 sync $SRPM_DIR s3://dnf-srpms.postgresql.org20250313103537584600000001/srpms/non-free/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch --exclude "*.html"
+       aws s3 sync $SRPM_DIR $awssrpmurl/srpms/non-free/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch --exclude "*.html"
 
        # Sync debug* RPMs to S3 bucket:
-       aws s3 sync $DEBUG_RPM_DIR s3://dnf-debuginfo.postgresql.org20250312201116649700000001/debug/non-free/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html"
+       aws s3 sync $DEBUG_RPM_DIR $awsdebuginfourl/debug/non-free/$packageSyncVersion/$osdistro/$os.$osminversion-$osarch/ --exclude "*.html"
 done
 
 exit 0