Skip to content

Commit 5f9a899

Browse files
packaging: Revert "packaging: fix deb version detection and rename ubuntu-26.04 to ubuntu-26.10 (#17316)" (#17339)
This reverts commit 9fc13ce.
1 parent ccbc0c3 commit 5f9a899

29 files changed

Lines changed: 10 additions & 17 deletions

.github/workflows/deb-builds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
;;
5252
ubuntu-*)
5353
version="${target_system#ubuntu-}"
54-
if dpkg --compare-versions "$version" ge 26.10; then
55-
ln -sfn packaging/ubuntu-26.10 debian
54+
if dpkg --compare-versions "$version" ge 26.04; then
55+
ln -sfn packaging/ubuntu-26.04 debian
5656
else
5757
ln -sfn packaging/ubuntu-16.04 debian
5858
fi

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,12 @@ sudo apt build-dep .
418418
##### Steps
419419
420420
1. Check out the `release/<version>` branch
421-
2. Since the `debian` symlink was removed from the source, create the `debian` folder symlink. For stonking: `ln -sfn packaging/ubuntu-26.10 debian` and for all others: `ln -sfn packaging/ubuntu-16.04 debian`
421+
2. Since the `debian` symlink was removed from the source, create the `debian` folder symlink. For resolute: `ln -sfn packaging/ubuntu-26.04 debian` and for all others: `ln -sfn packaging/ubuntu-16.04 debian`
422422
3. Commit the changes, but **do not push**.
423423
4. Run `gbp buildpackage -S --git-ignore-branch --git-no-purge`. The `--git-no-purge` option is important so we correctly retain the source tree. You may also need to specify `--git-ignore-new` if you have untracked files in your local git repo. You should now have a `build-area` folder one directory up.
424424
5. For each target release, update the changelogs in `build-area/snapd-<version>` to reflect that target, then build the package.
425425
1. Check for the details of the most recent deb release https://launchpad.net/~snappy-dev/+archive/ubuntu/image/+packages?field.name_filter=snapd&field.status_filter=&field.series_filter=
426-
2. In `debian/changelog` change that entry to reflect the correct version (e.g. `snapd (2.75.1) xenial` -> `snapd (2.75.1+ubuntu26.10) resolute` when building for resolute). If the latest deb package on the PPA is not present in the changelog, add it at the appropriate place. Also change all later changelog entries to reflect the correct version.
426+
2. In `debian/changelog` change that entry to reflect the correct version (e.g. `snapd (2.75.1) xenial` -> `snapd (2.75.1+ubuntu26.04) resolute` when building for resolute). If the latest deb package on the PPA is not present in the changelog, add it at the appropriate place. Also change all later changelog entries to reflect the correct version.
427427
- *NOTE: If you did a re-spin and are releasing multiple versions, remove the `New upstream release` line in the version that never got released*
428428
3. Build the package from the directory `build-area/snapd-<version>` (`dpkg-buildpackage -S`)
429429
6. Create the source tarballs from the `build-area` directory: `../snapd/release-tools/repack-debian-tarball.sh ./snapd_<version>.tar.xz`

mkversion.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,7 @@ fi
6565
# switch to the real source dir for the changelog parsing
6666
: "${DPKG_PARSECHANGELOG=$(command -v dpkg-parsechangelog)}"
6767
if [ -n "$DPKG_PARSECHANGELOG" ]; then
68-
changelog_file="packaging/ubuntu-16.04/changelog"
69-
debian_path="$PKG_BUILDDIR/debian"
70-
if [ -L "$debian_path" ] &&
71-
debian_target=$(readlink "$debian_path") &&
72-
[ "${debian_target%/}" != "packaging/ubuntu-16.04" ]; then
73-
changelog_file="${debian_target%/}/changelog"
74-
fi
75-
version_from_changelog="$(cd "$PKG_BUILDDIR"; "$DPKG_PARSECHANGELOG" --file "$changelog_file" --show-field Version)";
68+
version_from_changelog="$(cd "$PKG_BUILDDIR"; "$DPKG_PARSECHANGELOG" --file packaging/ubuntu-16.04/changelog --show-field Version)";
7669
fi
7770

7871
# select version based on priority
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ubuntu 26.10 Packaging
1+
# Ubuntu 26.04 Packaging
22

33
This directory contains packaging for the Ubuntu distribution.
44

@@ -73,7 +73,7 @@ mkdir -p .build
7373
## Container Script
7474

7575
The build script has several sections. The source tree is copied to a writable
76-
location, the `debian/` directory is populated from `packaging/ubuntu-26.10/`,
76+
location, the `debian/` directory is populated from `packaging/ubuntu-26.04/`,
7777
Go modules are vendored, and then `dpkg-buildpackage` is invoked.
7878

7979
This is a native package (`3.0 (native)` format), so the version has no
@@ -101,7 +101,7 @@ DEBIAN_FRONTEND=noninteractive apt-get --yes install --no-install-recommends \
101101

102102
# Determine the version of the package.
103103
# Native package: no upstream/revision split, use the full version as-is.
104-
version=$(dpkg-parsechangelog --file /src/packaging/ubuntu-26.10/changelog --show-field Version)
104+
version=$(dpkg-parsechangelog --file /src/packaging/ubuntu-26.04/changelog --show-field Version)
105105

106106
# Copy the source tree to a temporary location, so that we can call go mod vendor.
107107
mkdir -p /src-rw
@@ -131,9 +131,9 @@ tar -C /src -c \
131131
# Unpack the source archive and install the packaging directory.
132132
tar -Jxf /build/snapd_"$version".no-vendor.tar.xz -C /build
133133
tar -Jxf /build/snapd_"$version".only-vendor.tar.xz -C /build
134-
# The ubuntu-26.10 directory contains .build/ which would be copied recursively, exclude it by using a glob.
134+
# The ubuntu-26.04 directory contains .build/ which would be copied recursively, exclude it by using a glob.
135135
mkdir /build/snapd-"$version"/debian
136-
cp -a /src/packaging/ubuntu-26.10/* /build/snapd-"$version"/debian
136+
cp -a /src/packaging/ubuntu-26.04/* /build/snapd-"$version"/debian
137137

138138
# Discover and install build dependencies.
139139
DEBIAN_FRONTEND=noninteractive apt-get --yes build-dep /build/snapd-"$version"

0 commit comments

Comments
 (0)