Skip to content
Merged
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
15 changes: 8 additions & 7 deletions deb/build-deb
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,23 @@ debSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' debian/control)"
debMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)"
debDate="$(date --rfc-2822)"

# Include an extra `.0` in the version, in case we ever would have to re-build an
# Include an extra `1` in the version, in case we ever would have to re-build an
# already published release with a packaging-only change.
pkgRevision=0
pkgRevision=1

# Generate changelog. The version/name of the generated packages are based on this.
#
# Resulting packages are formatted as;
#
# - name of the package (e.g., "docker-ce")
# - version (e.g., "23.0.0~beta.0")
# - "-0" (mostly "best practice", and allows updating for specific situations)
# - pkgRevision (usually "-0", see above), which allows updating packages with
# packaging-only changes (without a corresponding release of the software
# that's packaged).
# - distro (e.g., "ubuntu")
# - VERSION_ID (e.g. "22.04" or "11") this must be "sortable" to make sure that
# packages are upgraded when upgrading to a newer distro version ("codename"
# cannot be used for this, as they're not sorted)
# - pkgRevision (usually "0", see above)
# - SUITE ("codename"), e.g. "jammy" or "bullseye". This is mostly for convenience,
# because some places refer to distro versions by codename, others by version.
# we prefix the codename with a tilde (~), which effectively excludes it from
Expand All @@ -71,10 +72,10 @@ pkgRevision=0
#
# Examples:
#
# docker-ce_23.0.0~beta.0-0~debian.11.0~bullseye_amd64.deb
# docker-ce_23.0.0~beta.0-0~ubuntu.22.04.0~jammy_amd64.deb
# docker-ce_23.0.0~beta.0-1~debian.11~bullseye_amd64.deb
# docker-ce_23.0.0~beta.0-1~ubuntu.22.04~jammy_amd64.deb
cat > "debian/changelog" <<-EOF
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-0~${DISTRO}.${VERSION_ID}.${pkgRevision}~${SUITE}) $SUITE; urgency=low
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-${pkgRevision}~${DISTRO}.${VERSION_ID}~${SUITE}) $SUITE; urgency=low
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Discussing with Tianon; we can use 1 as default, which would align with the _release in the RPM packages (which are 1-based)

* Version: $VERSION
-- $debMaintainer $debDate
EOF
Expand Down