~racb/git-ubuntu:core20-wip

Last commit made on 2021-04-08
Get this branch:
git clone -b core20-wip 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-wip
Repository:
lp:~racb/git-ubuntu

Recent commits

3c36aa9... by Robie Basak

Drop GPG key ID workaround

0abd90c... by Robie Basak

Add ubuntu-dev-tools for update-maintainer

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.

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.

6bfc89c... by Robie Basak

logging.warn() -> logging.warning()

The former has been deprecated a long time and now produces a
DeprecationWarning.

2d67fd1... by Robie Basak

Do not raise StopIteration() directly

The correct way to exit a generator is to simply return, not raise a
StopIteration manually. The latter was never correct and no longer works
in recent Python.

cfe5ffe... by Robie Basak

Handle git email address configuration fixture

git requires an email address to be available before its CLI will be
able to make commits. Normally this would be the responsibility of the
git-ubuntu user. For our tests, we can set this with the EMAIL
environment variable.

0a3859e... by Robie Basak

Fix Python string escaping

Newer Python produces a DeprecationWarning on spurious
backslash-escapes. We can simply convert these to Python's own normal
form using as generated using ascii().

0d9c4b6... by Robie Basak

Handle pygit2 type attribute API change

In newer versions of pygit2, the 'type' attribute is an enumeration
rather than a string. We can simply test for both cases to maintain
compatiblity across both API versions while we transition to a newer
version of pygit2.