With LP: #1918967 fixed in snapcraft, we must match and change the
substring of the fingerprint used for the public key file supplied to
snapcraft; otherwise the build fails.
There were a few places where we were mocking with timezone-naive
objects when in reality they would be timezone-aware objects. This
caused spurious test failures when the tests were run in a non-UTC
environment. Fix these to be timezone-aware.
These failures aren't picked up by our CI since it runs in UTC. As these
were bugs in tests, it seems sufficient to just fix them without adding
tests for the tests.
While the server team is not directly responsible for or particularly
interested in the entire php stack, invariably we see random php
packages pop up as migration blockers. Having them imported to
git-ubuntu will provide procedural consistency with other things we
maintain (review by MP, git ubuntu merge, etc.)
Most of these packages are modest and change infrequently.
This list was generated in a hirsute container, via:
$ egrep "^Package: .*php" /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hirsute_*_source_Sources | awk '{print $2}' | sort -u > /tmp/php.lst
$ for pkg in $(cat /tmp/php.lst); do if ! grep -q $pkg gitubuntu/source-package-whitelist.txt; then echo "$pkg"; fi; done
The list was then lightly pruned to remove packages that had "php" in
their name but were actually not PHP (e.g. perl and python modules that
interface to stuff like phpwiki). I've probably missed some packages
that don't mention php in the name, but we can add those remnants on a
case-by-case basis.
This is a big change. If I split it further, then it would be broken at the
intermediary points. Since it's mostly entirely renames, new files and removed
files, it shouldn't be much different to review as a big diff anyway, so I've
presented it as a whole.
The main change is that the snap packaging is updated to be based on core20.
This allows most of the previous snap parts to be removed since the required
versions are available in 20.04. This results in an effective rewrite of
snapcraft.yaml.
To make development easier, we also ship git-ubuntu as a deb, and then base the
snap on installation of that deb. Hence the addition of the debian/ directory.
The self-test script that was in snap-wrappers/wrappers/ is made more general
to function both for the deb and the snap, so is moved to bin/ and installed
into usr/share/git-ubuntu by the deb (and therefore shipped in the same
location as the snap).
The snap subcommands man, import-source-packages, source-package-walker and
update-repository-alias are removed as I don't think anyone was using these
from the snap itself anyway. They are still available in the deb (apart from
man, because that's unnecessary in the deb) and can be easily restored if
necessary. The corresponding wrappers are removed.
We no longer use the core snap at all, as this has proven to be problematic;
everything is installed into the git-ubuntu classic snap. This means that we no
longer need the awk and quilt wrappers.
The ssh wrapper remains in order to chain to the host ssh (see LP: #1871827).
To make sure we use interpreters from our snap and not the host, we must wrap
scripts with shebangs that point into our snap. The git-ubuntu,
merge-changelogs, reconstruct-changelog, quilt and gbp wrappers do this. There
may be other cases that will have to be discovered through testing.
Since snapcraft doesn't support building a Debian package first
(LP: #1918968), we achieve that using snap.sh ourselves. CI will need to
be tweaked to match.