Merge ~racb/git-ubuntu:core24.v2 into git-ubuntu:main

Proposed by Robie Basak
Status: Merged
Merge reported by: Robie Basak
Merged at revision: 0e4b05960a2981c1c81f9f7a206406fc36974032
Proposed branch: ~racb/git-ubuntu:core24.v2
Merge into: git-ubuntu:main
Diff against target: 380 lines (+84/-64)
21 files modified
bin/self-test (+9/-3)
gitubuntu/importer.py (+1/-1)
snap-wrappers/wrappers/arch-specific (+1/-1)
snap-wrappers/wrappers/dch (+1/-1)
snap-wrappers/wrappers/dpkg-mergechangelogs (+1/-1)
snap-wrappers/wrappers/dpkg-parsechangelog (+1/-1)
snap-wrappers/wrappers/dpkg-source (+1/-1)
snap-wrappers/wrappers/experimental (+1/-1)
snap-wrappers/wrappers/gbp (+1/-1)
snap-wrappers/wrappers/git-ubuntu (+1/-1)
snap-wrappers/wrappers/merge-changelogs (+1/-1)
snap-wrappers/wrappers/pristine-bz2 (+1/-1)
snap-wrappers/wrappers/pristine-gz (+1/-1)
snap-wrappers/wrappers/pristine-tar (+1/-1)
snap-wrappers/wrappers/pristine-xz (+1/-1)
snap-wrappers/wrappers/quilt (+1/-1)
snap-wrappers/wrappers/reconstruct-changelog (+1/-1)
snap-wrappers/wrappers/self-test (+1/-1)
snap-wrappers/wrappers/ssh (+1/-1)
snap.sh (+5/-2)
snap/snapcraft.yaml (+52/-41)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Canonical Server Reporter Pending
Review via email: mp+475009@code.launchpad.net

This proposal supersedes a proposal from 2024-10-14.

Description of the change

This is likely to fail CI, since I think CI is hardcoded to Focal-ness. I tested this locally using a fresh Noble VM using the same hooks that CI uses. Before landing, I intend to switch CI over from Focal to Noble, but that of course will cause CI for anything prior to this branch merged to fail. So I'll wait to do this until just before merging. Please review first!

It doesn't seem worth parameterising this in CI for an event that occurs not more than once every two years (four in this case).

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:cab5296d075c3a959317097c264eba33bc9bc6c1
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/55/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/55//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote :

I realised I'd left "wip: snap: temporarily disable deb tests" so I dropped that, pushed a new branch core24.v2, and superseded the old MP. This way the old branch is preserved as that's the one that users are testing via latest/edge/core24. This change won't invalidate their tests though, and I'll make sure the same tests but deb-based are also passing before landing this.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:0e4b05960a2981c1c81f9f7a206406fc36974032
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/56/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

Click here to trigger a rebuild:
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/56//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote :

> I'll make sure the same tests but deb-based are also passing before landing this.

I confirmed that the tests still pass with this branch (0e4b059) with the deb build self-test invocation restored.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:0e4b05960a2981c1c81f9f7a206406fc36974032
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/57/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    SUCCESS: VM Reset
    SUCCESS: Unit Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.canonical.com/server-team/job/git-ubuntu-ci/57//rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/self-test b/bin/self-test
2index e7ae13a..a0b33b4 100755
3--- a/bin/self-test
4+++ b/bin/self-test
5@@ -1,4 +1,5 @@
6-#!/bin/bash
7+#!/bin/bash --noprofile --norc
8+unset command_not_found_handle
9
10 function die() {
11 echo "Error: ${*}" 1>&2
12@@ -127,8 +128,8 @@ if [ -z "$TEST_SYSTEM_TREE" ]; then
13 then
14 echo "pip3 found all required dependencies"
15 else
16- echo "pip check failed; self test will fail"
17- retval=1
18+ echo "pip check failed but ignoring due to LP: #2084358"
19+ # retval=1
20 fi
21 fi
22
23@@ -196,4 +197,9 @@ else
24 retval=1
25 fi
26
27+if [ "$retval" -eq 0 ]; then
28+ echo "Overall self-test: PASS"
29+else
30+ echo "Overall self-test: FAIL"
31+fi
32 exit ${retval}
33diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py
34index a50c3e6..0a51b38 100644
35--- a/gitubuntu/importer.py
36+++ b/gitubuntu/importer.py
37@@ -796,9 +796,9 @@ def import_orig(repo, dsc, namespace, version, dist):
38 raise GitUbuntuImportOrigError('Unable to find tarball: '
39 '%s' % [p for p in orig_paths if not os.path.exists(p)])
40
41+ oldcwd = os.getcwd()
42 try:
43 with repo.pristine_tar_branches(dist, namespace):
44- oldcwd = os.getcwd()
45 # gbp does not support running from arbitrary git trees or
46 # working directories
47 # https://github.com/agx/git-buildpackage/pull/16
48diff --git a/snap-wrappers/wrappers/arch-specific b/snap-wrappers/wrappers/arch-specific
49index 3adc943..aab4bea 100644
50--- a/snap-wrappers/wrappers/arch-specific
51+++ b/snap-wrappers/wrappers/arch-specific
52@@ -18,4 +18,4 @@ case "$SNAP_ARCH" in
53 ;;
54 esac
55
56-export PERL5LIB="$SNAP/usr/share/perl5:$SNAP/usr/share/perl/5.30:$SNAP/usr/lib/$triplet/perl-base:$SNAP/usr/lib/$triplet/perl/5.30.0:$SNAP/usr/lib/$triplet/perl5/5.30"
57+export PERL5LIB="$SNAP/usr/share/perl5:$SNAP/usr/share/perl/5.38:$SNAP/usr/lib/$triplet/perl-base:$SNAP/usr/lib/$triplet/perl/5.38:$SNAP/usr/lib/$triplet/perl5/5.38"
58diff --git a/snap-wrappers/wrappers/dch b/snap-wrappers/wrappers/dch
59index ebac1a5..012a99b 100755
60--- a/snap-wrappers/wrappers/dch
61+++ b/snap-wrappers/wrappers/dch
62@@ -1,4 +1,4 @@
63-#!/snap/git-ubuntu/current/bin/bash
64+#!/snap/git-ubuntu/current/usr/bin/sh
65
66 . "$SNAP/wrappers/arch-specific"
67
68diff --git a/snap-wrappers/wrappers/dpkg-mergechangelogs b/snap-wrappers/wrappers/dpkg-mergechangelogs
69index 7974915..0d942e4 100755
70--- a/snap-wrappers/wrappers/dpkg-mergechangelogs
71+++ b/snap-wrappers/wrappers/dpkg-mergechangelogs
72@@ -1,4 +1,4 @@
73-#!/snap/git-ubuntu/current/bin/bash
74+#!/snap/git-ubuntu/current/usr/bin/sh
75
76 . "$SNAP/wrappers/arch-specific"
77
78diff --git a/snap-wrappers/wrappers/dpkg-parsechangelog b/snap-wrappers/wrappers/dpkg-parsechangelog
79index 7f92bdd..473d815 100755
80--- a/snap-wrappers/wrappers/dpkg-parsechangelog
81+++ b/snap-wrappers/wrappers/dpkg-parsechangelog
82@@ -1,4 +1,4 @@
83-#!/snap/git-ubuntu/current/bin/bash
84+#!/snap/git-ubuntu/current/usr/bin/sh
85
86 . "$SNAP/wrappers/arch-specific"
87
88diff --git a/snap-wrappers/wrappers/dpkg-source b/snap-wrappers/wrappers/dpkg-source
89index 203bc37..f63daff 100755
90--- a/snap-wrappers/wrappers/dpkg-source
91+++ b/snap-wrappers/wrappers/dpkg-source
92@@ -1,4 +1,4 @@
93-#!/snap/git-ubuntu/current/bin/bash
94+#!/snap/git-ubuntu/current/usr/bin/sh
95
96 . "$SNAP/wrappers/arch-specific"
97
98diff --git a/snap-wrappers/wrappers/experimental b/snap-wrappers/wrappers/experimental
99index 78be239..8b77a8e 100755
100--- a/snap-wrappers/wrappers/experimental
101+++ b/snap-wrappers/wrappers/experimental
102@@ -1,4 +1,4 @@
103-#!/snap/git-ubuntu/current/bin/bash
104+#!/snap/git-ubuntu/current/usr/bin/sh
105
106 . "$SNAP/wrappers/arch-specific"
107
108diff --git a/snap-wrappers/wrappers/gbp b/snap-wrappers/wrappers/gbp
109index 453ceca..0e29acf 100755
110--- a/snap-wrappers/wrappers/gbp
111+++ b/snap-wrappers/wrappers/gbp
112@@ -1,4 +1,4 @@
113-#!/snap/git-ubuntu/current/bin/bash
114+#!/snap/git-ubuntu/current/usr/bin/sh
115
116 . "$SNAP/wrappers/arch-specific"
117
118diff --git a/snap-wrappers/wrappers/git-ubuntu b/snap-wrappers/wrappers/git-ubuntu
119index 0f2c241..318dab8 100755
120--- a/snap-wrappers/wrappers/git-ubuntu
121+++ b/snap-wrappers/wrappers/git-ubuntu
122@@ -1,4 +1,4 @@
123-#!/snap/git-ubuntu/current/bin/bash
124+#!/snap/git-ubuntu/current/usr/bin/sh
125
126 . "$SNAP/wrappers/arch-specific"
127
128diff --git a/snap-wrappers/wrappers/merge-changelogs b/snap-wrappers/wrappers/merge-changelogs
129index 4823e70..fb505f1 100755
130--- a/snap-wrappers/wrappers/merge-changelogs
131+++ b/snap-wrappers/wrappers/merge-changelogs
132@@ -1,4 +1,4 @@
133-#!/snap/git-ubuntu/current/bin/bash
134+#!/snap/git-ubuntu/current/usr/bin/sh
135
136 . "$SNAP/wrappers/arch-specific"
137
138diff --git a/snap-wrappers/wrappers/pristine-bz2 b/snap-wrappers/wrappers/pristine-bz2
139index e6f10c7..1d01dca 100755
140--- a/snap-wrappers/wrappers/pristine-bz2
141+++ b/snap-wrappers/wrappers/pristine-bz2
142@@ -1,4 +1,4 @@
143-#!/snap/git-ubuntu/current/bin/bash
144+#!/snap/git-ubuntu/current/usr/bin/sh
145
146 . "$SNAP/wrappers/arch-specific"
147
148diff --git a/snap-wrappers/wrappers/pristine-gz b/snap-wrappers/wrappers/pristine-gz
149index 3876e7a..fa441c3 100755
150--- a/snap-wrappers/wrappers/pristine-gz
151+++ b/snap-wrappers/wrappers/pristine-gz
152@@ -1,4 +1,4 @@
153-#!/snap/git-ubuntu/current/bin/bash
154+#!/snap/git-ubuntu/current/usr/bin/sh
155
156 . "$SNAP/wrappers/arch-specific"
157
158diff --git a/snap-wrappers/wrappers/pristine-tar b/snap-wrappers/wrappers/pristine-tar
159index 2b163a9..e25ef2f 100755
160--- a/snap-wrappers/wrappers/pristine-tar
161+++ b/snap-wrappers/wrappers/pristine-tar
162@@ -1,4 +1,4 @@
163-#!/snap/git-ubuntu/current/bin/bash
164+#!/snap/git-ubuntu/current/usr/bin/sh
165
166 . "$SNAP/wrappers/arch-specific"
167
168diff --git a/snap-wrappers/wrappers/pristine-xz b/snap-wrappers/wrappers/pristine-xz
169index 4250bbb..334397c 100755
170--- a/snap-wrappers/wrappers/pristine-xz
171+++ b/snap-wrappers/wrappers/pristine-xz
172@@ -1,4 +1,4 @@
173-#!/snap/git-ubuntu/current/bin/bash
174+#!/snap/git-ubuntu/current/usr/bin/sh
175
176 . "$SNAP/wrappers/arch-specific"
177
178diff --git a/snap-wrappers/wrappers/quilt b/snap-wrappers/wrappers/quilt
179index 55a9bd1..12646c7 100755
180--- a/snap-wrappers/wrappers/quilt
181+++ b/snap-wrappers/wrappers/quilt
182@@ -1,4 +1,4 @@
183-#!/snap/git-ubuntu/current/bin/bash
184+#!/snap/git-ubuntu/current/usr/bin/sh
185
186 . "$SNAP/wrappers/arch-specific"
187
188diff --git a/snap-wrappers/wrappers/reconstruct-changelog b/snap-wrappers/wrappers/reconstruct-changelog
189index cd1bcad..54be9f0 100755
190--- a/snap-wrappers/wrappers/reconstruct-changelog
191+++ b/snap-wrappers/wrappers/reconstruct-changelog
192@@ -1,4 +1,4 @@
193-#!/snap/git-ubuntu/current/bin/bash
194+#!/snap/git-ubuntu/current/usr/bin/sh
195
196 . "$SNAP/wrappers/arch-specific"
197
198diff --git a/snap-wrappers/wrappers/self-test b/snap-wrappers/wrappers/self-test
199index 9a37958..7495f89 100755
200--- a/snap-wrappers/wrappers/self-test
201+++ b/snap-wrappers/wrappers/self-test
202@@ -1,4 +1,4 @@
203-#!/snap/git-ubuntu/current/bin/bash
204+#!/snap/git-ubuntu/current/usr/bin/sh
205
206 . "$SNAP/wrappers/arch-specific"
207
208diff --git a/snap-wrappers/wrappers/ssh b/snap-wrappers/wrappers/ssh
209index 0cc8986..79ca149 100755
210--- a/snap-wrappers/wrappers/ssh
211+++ b/snap-wrappers/wrappers/ssh
212@@ -1,4 +1,4 @@
213-#!/snap/git-ubuntu/current/bin/bash
214+#!/snap/git-ubuntu/current/usr/bin/sh
215
216 . "$SNAP/wrappers/arch-specific"
217
218diff --git a/snap.sh b/snap.sh
219index bf7b689..7817f56 100644
220--- a/snap.sh
221+++ b/snap.sh
222@@ -27,6 +27,7 @@ sudo apt-get install -y --no-install-recommends \
223 apt-utils \
224 devscripts \
225 equivs \
226+ fakeroot \
227 python3 \
228 python3-yaml
229 sudo snap install --classic snapcraft
230@@ -47,7 +48,7 @@ mk-build-deps
231 # --allow-downgrades is helpful for development of this script because it
232 # ensures that the build dependency package gets updated regardless of the
233 # previous version used. In production it is a no-op.
234-sudo apt-get install -y --allow-downgrades ./git-ubuntu-build-deps_${deb_version}_all.deb
235+sudo apt-get install -y --allow-downgrades --no-install-recommends ./git-ubuntu-build-deps_${deb_version}_all.deb
236 debian/rules build
237 fakeroot debian/rules binary
238
239@@ -101,4 +102,6 @@ with open('snap/snapcraft.yaml', 'w') as f:
240 EOT
241
242 # Build the snap itself
243-snapcraft --destructive-mode
244+# Using sudo as a workaround for
245+# https://github.com/canonical/snapcraft/issues/5113
246+sudo snapcraft --destructive-mode
247diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
248index ec194d2..1d57584 100644
249--- a/snap/snapcraft.yaml
250+++ b/snap/snapcraft.yaml
251@@ -4,7 +4,7 @@ summary: Ubuntu development git tooling
252 description: Maintain an Ubuntu source package in a git tree
253 confinement: classic
254 grade: stable
255-base: core20
256+base: core24
257
258 environment:
259 DPKG_DATADIR: "$SNAP/usr/share/dpkg"
260@@ -33,65 +33,68 @@ apps:
261
262 parts:
263 git-ubuntu:
264+ build-attributes: [enable-patchelf]
265 plugin: nil
266- override-prime: |
267- snapcraftctl prime
268- ln -s mawk usr/bin/awk
269+ # bash chmod is a workaround for
270+ # https://github.com/canonical/snapcraft/issues/5114
271+ override-stage: |
272+ craftctl default
273+ chmod 755 bin/bash
274 stage:
275 # Remove etc/rmt due to:
276 # The store was unable to accept this snap.
277 # - package contains external symlinks: etc/rmt
278 - -etc/rmt
279 stage-packages:
280- - perl-base
281- - git-ubuntu
282+ - awk
283+ - bash
284+ - bzip2
285+ - coreutils
286+ - dash
287 - debian-keyring
288+ - dpkg
289+ - dpkg-dev
290+ - findutils
291 - git
292 - git-buildpackage
293+ - git-ubuntu
294+ - gpgv
295+ - grep
296+ - gzip
297+ - libpython3-stdlib
298+ - libpython3.12-minimal
299+ - libpython3.12-stdlib
300+ - mawk
301+ - perl-base
302 - pristine-tar
303 - pylint
304- - quilt
305- - ubuntu-dev-tools
306- - ubuntu-keyring
307- - libpython3-stdlib
308- - libpython3.8-stdlib
309- - libpython3.8-minimal
310- - python3-pip
311- - python3-setuptools
312- - python3-wheel
313- - python3-venv
314- - python3-minimal
315- - python3-distutils
316- - python3-pkg-resources
317- - python3.8-minimal
318- - python3-six
319- - python3-chardet
320- - python3-oauthlib
321- - python3-cffi-backend
322 - python3-attr
323- - python3-more-itertools
324+ - python3-cairo # required by python3-gi
325+ - python3-cffi-backend
326+ - python3-chardet
327 - python3-cryptography # required by python3-secretstorage
328 - python3-gi # required by python3-secretstorage
329- - python3-cairo # required by python3-gi
330+ - python3-minimal
331+ - python3-more-itertools
332+ - python3-oauthlib
333+ - python3-pbr # required by python3-tenacity
334+ - python3-pip
335+ - python3-pkg-resources
336 - python3-secretstorage
337- - python3-testresources
338+ - python3-setuptools
339+ - python3-six
340 - python3-tenacity
341- - python3-pbr # required by python3-tenacity
342- - grep
343- - coreutils
344- - gzip
345- - bzip2
346- - xz-utils
347- - tar
348+ - python3-testresources
349+ - python3-venv
350+ - python3-wheel
351+ - python3.12-minimal
352+ - quilt
353 - sed
354- - bash
355+ - tar
356+ - ubuntu-dev-tools
357+ - ubuntu-keyring
358 - util-linux
359- - awk
360- - mawk
361- - findutils
362- - dpkg
363- - dpkg-dev
364- - gpgv
365+ - xz-utils
366 wrappers:
367 source: snap-wrappers/
368 plugin: dump
369@@ -108,3 +111,11 @@ parts:
370 wrappers/pristine-gz: usr/local/bin/pristine-gz
371 wrappers/pristine-bz2: usr/local/bin/pristine-bz2
372 wrappers/dch: usr/local/bin/dch
373+ awk-symlink:
374+ plugin: nil
375+ override-stage: |
376+ craftctl default
377+ mkdir -p usr/bin
378+ ln -s mawk usr/bin/awk
379+ prime:
380+ - usr/bin/awk

Subscribers

People subscribed via source and target branches