Skip to content

Commit

Permalink
bug-fix: Set correct and unique repo meta data
Browse files Browse the repository at this point in the history
When using unattended-upgrades at least the origin meta data in the
release file shoulb be unique across all registered package repos in
addition it's also good to set the label to something that clearly
identifies the software source.

With this commit the published Release file will look like this:

Origin: packages.fluentbit.io
Label: fluent-bit
Suite: bookworm
Codename: bookworm
  • Loading branch information
pluhmen committed Feb 15, 2025
1 parent c2b3d47 commit a6e3f33
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packaging/update-apt-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ APTLY_REPO_NAME="debify-$CODENAME"
APTLY_ROOTDIR=$(mktemp -d)
APTLY_CONFIG=$(mktemp)

# The origin and label fields seem to cover the base directory for the repo and codename.
# The docs seems to suggest these fields are optional and free-form: https://wiki.debian.org/DebianRepository/Format#Origin
# The origin and label fields are free text fields that should indicate the heritage of the package repository.
# They are used in an unattend-upgrade scenario and therefore they should be unique for each package source.
# Further information can be found here https://wiki.debian.org/DebianRepository/Format & https://wiki.debian.org/UnattendedUpgrades
# For fluent-bit a valid apt config entry for unattended upgrades is
# Unattended-Upgrade::Origins-Pattern {
# "origin=packages.fluentbit.io,codename=${distro_codename},label=fluent-bit"
# }
# They are security checks to verify if they have changed so we match the legacy server.
APTLY_ORIGIN=". $CODENAME"
APTLY_LABEL=". $CODENAME"
APTLY_ORIGIN="packages.fluentbit.io"
APTLY_LABEL="fluent-bit"
if [[ "$DEB_REPO" == "debian/bullseye" ]]; then
# For Bullseye, the legacy server had a slightly different setup we try to reproduce here
APTLY_ORIGIN="bullseye bullseye"
Expand Down

0 comments on commit a6e3f33

Please sign in to comment.