Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions qgis-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -e
set -o pipefail

_here=$(dirname "$(realpath "$0")")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now used: _here is referenced for ${_here}/apt-sync.py and ${_here}/helpers/size-sum.sh (matching chef.sh/cvmfs.sh/bazel-apt.sh convention).

apt_sync="${_here}/apt-sync.py"

BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://qgis.org"}"
WORKDIR="${TUNASYNC_WORKING_DIR}"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the convention used by other scripts in this repo (chef.sh/cvmfs.sh/termux.sh) — they all dereference TUNASYNC_WORKING_DIR directly and rely on the tunasync framework to set it. Keeping consistent.


REPO_SIZE_FILE=$(mktemp -t qgis-deb-reposize.XXXXXX)
export REPO_SIZE_FILE
trap 'rm -f "$REPO_SIZE_FILE"' EXIT

DEB_CODENAMES="bullseye,bookworm,trixie,jammy,noble,resolute,plucky,questing,focal,xenial,bionic"
DEB_ARCHES="amd64,i386"

UBUNTUGIS_CODENAMES="jammy,noble,bionic,focal,xenial"
UBUNTUGIS_ARCHES="amd64"

"$apt_sync" --delete "${BASE_URL}/debian" "$DEB_CODENAMES" main "$DEB_ARCHES" "${WORKDIR}/debian"
echo "debian finished"

"$apt_sync" --delete "${BASE_URL}/debian-ltr" "$DEB_CODENAMES" main "$DEB_ARCHES" "${WORKDIR}/debian-ltr"
echo "debian-ltr finished"

"$apt_sync" --delete "${BASE_URL}/ubuntu" "$DEB_CODENAMES" main "$DEB_ARCHES" "${WORKDIR}/ubuntu"
Comment on lines +15 to +27
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. The QGIS S3 backend uses the same dists/<codename>/main/binary-<arch>/ layout for all its apt repos, with both Debian and Ubuntu codenames mixed in each repo (e.g. https://qgis.org/debian/dists/jammy/... and https://qgis.org/ubuntu/dists/bookworm/... both exist). apt-sync.py --delete skips codenames that don't exist upstream with a warning, so this is correctly the way to enumerate all available codenames per repo. Splitting would lose coverage.

Comment on lines +15 to +27
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. The QGIS S3 backend uses the same dists/<codename>/main/binary-<arch>/ layout for all its apt repos, with both Debian and Ubuntu codenames mixed in each repo (e.g. https://qgis.org/debian/dists/jammy/... and https://qgis.org/ubuntu/dists/bookworm/... both exist). apt-sync.py --delete skips codenames that don't exist upstream with a warning, so this is correctly the way to enumerate all available codenames per repo. Splitting would lose coverage.

echo "ubuntu finished"

"$apt_sync" --delete "${BASE_URL}/ubuntugis" "$UBUNTUGIS_CODENAMES" main "$UBUNTUGIS_ARCHES" "${WORKDIR}/ubuntugis"
echo "ubuntugis finished"

"$apt_sync" --delete "${BASE_URL}/ubuntugis-ltr" "$UBUNTUGIS_CODENAMES" main "$UBUNTUGIS_ARCHES" "${WORKDIR}/ubuntugis-ltr"
Comment on lines +21 to +33
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the convention used by other scripts in this repo (chef.sh/cvmfs.sh/termux.sh) — they all dereference TUNASYNC_WORKING_DIR directly and rely on the tunasync framework to set it. Keeping consistent.

echo "ubuntugis-ltr finished"

# ubuntu-ltr is a symlink to debian-ltr (identical content)
ln -sfn debian-ltr "${WORKDIR}/ubuntu-ltr"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the convention used by other scripts in this repo (chef.sh/cvmfs.sh/termux.sh) — they all dereference TUNASYNC_WORKING_DIR directly and rely on the tunasync framework to set it. Keeping consistent.

echo "ubuntu-ltr symlink created"

"${_here}/helpers/size-sum.sh" "$REPO_SIZE_FILE" --rm
Loading