~racb/git-ubuntu:core20-fixes

Last commit made on 2021-04-09
Get this branch:
git clone -b core20-fixes https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
core20-fixes
Repository:
lp:~racb/git-ubuntu

Recent commits

f3f8bd7... by Robie Basak

Drop GPG key ID workaround

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.

d684941... by Robie Basak

Add ubuntu-dev-tools for update-maintainer

update-maintainer is used by "git ubuntu merge", so this is a dependency
and needs adding to both the deb and the snap.

See LP: #1918999 for details on why it has to also be added to
stage-packages explicitly.

7b156d3... by Robie Basak

Merge branch 'core20'

f994cd5... by Robie Basak

Also add ansible-base to whitelist

de87461... by Robie Basak

Fix tests when run in non-UTC timezones

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.

6b07719... by Robie Basak

Add recent whitelist requests

75fbf95... by Bryce Harrington

Whitelist *ruby* packages from main and universe

Similarly as php, for ruby. Having all the ruby packages in git ubuntu
will make handling them more consistent with other things we maintain.

Most of these packages are modest and change infrequently.

This list was generated in a hirsute container, via:

    $ egrep "^Package: .*ruby" /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_hirsute_*_source_Sources | awk '{print $2}' | sort -u > /tmp/ruby.lst
    $ for pkg in $(cat /tmp/ruby.lst); do if ! grep -q $pkg gitubuntu/source-package-whitelist.txt; then echo "$pkg"; fi; done

The result was lightly pruned to remove things like jruby* and
other things that aren't really Ruby stack components.

87737b5... by Bryce Harrington

Whitelist *php* packages from main and universe

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.

bc6b4fa... by Robie Basak

Update packaging to be based on 20.04

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.

b26b49d... by Robie Basak

Add missing dependency on ubuntutools

We use ubuntutools in source_information.py and in dsc.py, so declare
this correctly.