Merge ~racb/git-ubuntu:core20 into git-ubuntu:master

Proposed by Robie Basak
Status: Merged
Merged at revision: 7b156d318055f4b683c4c3c3a000b9876a56f0a2
Proposed branch: ~racb/git-ubuntu:core20
Merge into: git-ubuntu:master
Diff against target: 1566 lines (+389/-618)
36 files modified
bin/self-test (+29/-16)
debian/bash-completion (+1/-0)
debian/changelog (+5/-0)
debian/control (+38/-0)
debian/copyright (+6/-0)
debian/extra/git-ubuntu.self-test (+3/-0)
debian/install (+9/-0)
debian/manpages (+1/-0)
debian/py3dist-overrides (+2/-0)
debian/rules (+4/-0)
debian/source/format (+1/-0)
debian/tests/control (+2/-0)
dev/null (+0/-18)
gitubuntu/__main__.py (+2/-12)
gitubuntu/build.py (+4/-12)
gitubuntu/clone.py (+2/-8)
gitubuntu/dsc.py (+1/-6)
gitubuntu/exportorig.py (+1/-6)
gitubuntu/git_repository.py (+16/-22)
gitubuntu/importer.py (+14/-19)
gitubuntu/importer_test.py (+19/-3)
gitubuntu/rich_history.py (+2/-2)
gitubuntu/source_builder_test.py (+2/-1)
gitubuntu/source_information.py (+7/-15)
gitubuntu/submit.py (+1/-6)
gitubuntu/test_fixtures.py (+21/-0)
gitubuntu/versioning.py (+5/-11)
setup.py (+1/-0)
snap-wrappers/wrappers/gbp (+1/-7)
snap-wrappers/wrappers/git-ubuntu (+1/-1)
snap-wrappers/wrappers/merge-changelogs (+3/-0)
snap-wrappers/wrappers/quilt (+1/-6)
snap-wrappers/wrappers/reconstruct-changelog (+3/-0)
snap-wrappers/wrappers/self-test (+3/-0)
snap.sh (+101/-0)
snap/snapcraft.yaml (+77/-447)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Bryce Harrington Approve
Review via email: mp+399511@code.launchpad.net

Commit message

Make Jenkins happy

Description of the change

This branch is unlikely to initially pass CI as the CI build and test scripts will need to be fixed first to work against it.

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:80dd55aadfbb53e194f9d38233977126b05959ab
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/14/
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.ubuntu.com/server/job/git-ubuntu-ci/14//rebuild

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

PASSED: Continuous integration, rev:80dd55aadfbb53e194f9d38233977126b05959ab
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/15/
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.ubuntu.com/server/job/git-ubuntu-ci/15//rebuild

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

PASSED: Continuous integration, rev:70305eb4eb39e41bd105f28bd2915da7e37b04e1
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/16/
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.ubuntu.com/server/job/git-ubuntu-ci/16//rebuild

review: Approve (continuous-integration)
Revision history for this message
Bryce Harrington (bryce) wrote :

This looks great! A few minor comments/questions below but not really anything substantial. You know I love patches that have more removal than addition, and being able to build this as a deb will be awesome.

I had meant to play with building this manually but have no doubt it works and am unfortunately running against EOD; I'm sure I'll get a chance some day, so no worries.

The one notable piece is the snap.sh's big warning comment about it being destructive to the host. If you're actually worried someone might run it (it's in the root of the repository after all), you might have it echo that message to stderr prior to the sudo prompt. It doesn't sound to me like it would be irreversibly destructive, just that it modifies apt and installs some things.

Anyway, nice work, looking forward to seeing this go in. :-)

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

PASSED: Continuous integration, rev:bc6b4fa5e0ecad8730121b7467c22f2a4ddaf083
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/17/
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.ubuntu.com/server/job/git-ubuntu-ci/17//rebuild

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

PASSED: Continuous integration, rev:de874618561760657fc95a8a6eadfbc9d8ff2e27
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/18/
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.ubuntu.com/server/job/git-ubuntu-ci/18//rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/snap-wrappers/wrappers/git-ubuntu-self-test b/bin/self-test
0similarity index 83%0similarity index 83%
1rename from snap-wrappers/wrappers/git-ubuntu-self-test1rename from snap-wrappers/wrappers/git-ubuntu-self-test
2rename to bin/self-test2rename to bin/self-test
index d5f1bda..e7ae13a 100755
--- a/snap-wrappers/wrappers/git-ubuntu-self-test
+++ b/bin/self-test
@@ -1,4 +1,4 @@
1#!/snap/git-ubuntu/current/bin/bash1#!/bin/bash
22
3function die() {3function die() {
4 echo "Error: ${*}" 1>&24 echo "Error: ${*}" 1>&2
@@ -57,10 +57,14 @@ snap_run() {
57 $exec snap run --shell "$snap" -c 'exec "$0" "$@"' "$@"57 $exec snap run --shell "$snap" -c 'exec "$0" "$@"' "$@"
58}58}
5959
60if [ -n "$SNAP" -a -z "$TEST_TREE" ]; then60if [ -n "$TEST_SYSTEM_TREE" ]; then
61 pkg_dir=${SNAP}/lib/python3.6/site-packages61 pkg_dir=$(dirname $(python3 -c 'import gitubuntu; print(gitubuntu.__path__[0])'))
62 snap_bin_dir="${SNAP}/bin"62 snap_bin_glob=/usr/bin/git-ubuntu.*
63 pylintrc_path="${SNAP}/etc/pylintrc"63 pylintrc_path=/usr/share/git-ubuntu/pylintrc
64elif [ -n "$SNAP" -a -z "$TEST_TREE" ]; then
65 pkg_dir=${SNAP}/usr/lib/python3/dist-packages
66 snap_bin_glob="${SNAP}/usr/bin/git-ubuntu.*"
67 pylintrc_path="${SNAP}/usr/share/git-ubuntu/pylintrc"
64 [ -d "$pkg_dir" ] ||68 [ -d "$pkg_dir" ] ||
65 { error "$pkg_dir is not a directory"; exit 1; }69 { error "$pkg_dir is not a directory"; exit 1; }
66else70else
@@ -86,7 +90,7 @@ else
86 snap_run --exec git-ubuntu "$0" "$@"90 snap_run --exec git-ubuntu "$0" "$@"
87 fi91 fi
88 pkg_dir=$( cd "${TEST_TREE%/}" && pwd )92 pkg_dir=$( cd "${TEST_TREE%/}" && pwd )
89 snap_bin_dir="${pkg_dir}/bin"93 snap_bin_glob="${pkg_dir}/bin/*.py"
90 pylintrc_path="$TEST_TREE/.pylintrc"94 pylintrc_path="$TEST_TREE/.pylintrc"
91fi95fi
9296
@@ -103,7 +107,11 @@ cd "${pkg_dir}" \
103ln -s "${pkg_dir}/gitubuntu" "${tmp_dir}" \107ln -s "${pkg_dir}/gitubuntu" "${tmp_dir}" \
104 || die "Could not create link to gitubuntu module in ${tmp_dir}"108 || die "Could not create link to gitubuntu module in ${tmp_dir}"
105109
106error "Inside git-ubuntu snap $SNAP_REVISION/$SNAP_VERSION."110if [ -n "$TEST_SYSTEM_TREE" ]; then
111 error "Testing git-ubuntu system installation."
112else
113 error "Inside git-ubuntu snap $SNAP_REVISION/$SNAP_VERSION."
114fi
107error "Testing tree in $pkg_dir/gitubuntu"115error "Testing tree in $pkg_dir/gitubuntu"
108error "Working dir $PWD"116error "Working dir $PWD"
109117
@@ -113,17 +121,22 @@ function cleanup() {
113}121}
114trap cleanup EXIT122trap cleanup EXIT
115123
116# Check dependencies are installed124if [ -z "$TEST_SYSTEM_TREE" ]; then
117if python3 -m pip check125 # Check dependencies are installed
118then126 if python3 -m pip check
119 echo "pip3 found all required dependencies"127 then
120else128 echo "pip3 found all required dependencies"
121 echo "pip check failed; self test will fail"129 else
122 retval=1130 echo "pip check failed; self test will fail"
131 retval=1
132 fi
123fi133fi
124134
125# Style check python modules135# Style check python modules
126if python3 -m pylint --rcfile "$pylintrc_path" -E gitubuntu/136# For some reason, pylint hangs indefinitely if used without a -j option (the
137# default is two) in the multiprocessing module. As a workaround for now, we
138# specify -j1, which seems to work.
139if python3 -m pylint --rcfile "$pylintrc_path" -E gitubuntu/ -j1
127then140then
128 echo "pylint passed!"141 echo "pylint passed!"
129else142else
@@ -172,7 +185,7 @@ while IFS= read -r -d '' script_source; do
172 else185 else
173 echo "SKIP (compilation) ${script}"186 echo "SKIP (compilation) ${script}"
174 fi187 fi
175done < <(find "${snap_bin_dir}" -name "*.py" -print0)188done < <(compgen -G "$snap_bin_glob")
176189
177# Run the unit testsuite190# Run the unit testsuite
178if COVERAGE_FILE="${tmp_dir}/coverage.txt" python3 -m pytest -p no:cacheprovider --cov=gitubuntu gitubuntu/*191if COVERAGE_FILE="${tmp_dir}/coverage.txt" python3 -m pytest -p no:cacheprovider --cov=gitubuntu gitubuntu/*
diff --git a/debian/bash-completion b/debian/bash-completion
179new file mode 100644192new file mode 100644
index 0000000..7c42e96
--- /dev/null
+++ b/debian/bash-completion
@@ -0,0 +1 @@
1doc/gitubuntu-completion.sh
diff --git a/debian/changelog b/debian/changelog
0new file mode 1006442new file mode 100644
index 0000000..24c1a2d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
1git-ubuntu (0) UNRELEASED; urgency=medium
2
3 * Initial packaging.
4
5 -- Robie Basak <robie.basak@ubuntu.com> Thu, 11 Mar 2021 15:23:18 +0000
diff --git a/debian/control b/debian/control
0new file mode 1006446new file mode 100644
index 0000000..6ad0540
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,38 @@
1Source: git-ubuntu
2Section: devel
3Priority: optional
4Standards-Version: 4.5.1
5Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
6Build-Depends: bash-completion,
7 debhelper-compat (= 12),
8 debian-archive-keyring,
9 dh-exec,
10 dh-python,
11 git,
12 git-buildpackage,
13 pristine-tar,
14 python3 (>= 3.6),
15 python3-cachetools,
16 python3-keyring,
17 python3-keyrings.alt,
18 python3-petname,
19 python3-pygit2,
20 python3-pytest,
21 python3-setuptools,
22 python3-systemd,
23 python3-ubuntutools,
24 python3-zmq,
25 quilt,
26 ubuntu-keyring
27
28Package: git-ubuntu
29Architecture: all
30Depends: debian-archive-keyring,
31 git,
32 git-buildpackage,
33 pristine-tar,
34 quilt,
35 ubuntu-keyring,
36 ${misc:Depends},
37 ${python3:Depends}
38Description: maintain an Ubuntu source package in a git tree
diff --git a/debian/copyright b/debian/copyright
0new file mode 10064439new file mode 100644
index 0000000..f3e8a64
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,6 @@
1Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2Upstream-Contact: ubuntu-devel-discuss@lists.ubuntu.com
3
4Files: *
5Copyright: 2014-2021 Canonical Ltd
6License: GPLv3
diff --git a/debian/extra/git-ubuntu.self-test b/debian/extra/git-ubuntu.self-test
0new file mode 1007557new file mode 100755
index 0000000..2d60632
--- /dev/null
+++ b/debian/extra/git-ubuntu.self-test
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3TEST_SYSTEM_TREE=1 exec /usr/share/git-ubuntu/self-test "$@"
diff --git a/debian/install b/debian/install
0new file mode 1007554new file mode 100755
index 0000000..e150a16
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,9 @@
1#!/usr/bin/dh-exec
2.pylintrc => usr/share/git-ubuntu/pylintrc
3bin/git-merge-changelogs => usr/bin/git-ubuntu.merge-changelogs
4bin/git-reconstruct-changelog => usr/bin/git-ubuntu.reconstruct-changelog
5bin/import-source-packages.py => usr/bin/git-ubuntu.import-source-packages
6bin/self-test => usr/share/git-ubuntu/self-test
7bin/source-package-walker.py => usr/bin/git-ubuntu.source-package-walker
8bin/update-repository-alias.py => usr/bin/git-ubuntu.update-repository-alias
9debian/extra/git-ubuntu.self-test => usr/bin/git-ubuntu.self-test
diff --git a/debian/manpages b/debian/manpages
0new file mode 10064410new file mode 100644
index 0000000..8a47eba
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
1man/man1/*.1
diff --git a/debian/py3dist-overrides b/debian/py3dist-overrides
0new file mode 1006442new file mode 100644
index 0000000..32f925e
--- /dev/null
+++ b/debian/py3dist-overrides
@@ -0,0 +1,2 @@
1zmq python3-zmq
2ubuntutools python3-ubuntutools
diff --git a/debian/rules b/debian/rules
0new file mode 1007553new file mode 100755
index 0000000..d602341
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
1#!/usr/bin/make -f
2
3%:
4 dh $@ --with bash-completion,python3 --buildsystem=pybuild
diff --git a/debian/source/format b/debian/source/format
0new file mode 1006445new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
13.0 (native)
diff --git a/debian/tests/control b/debian/tests/control
0new file mode 1006442new file mode 100644
index 0000000..4e00487
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
1Test-Command: git-ubuntu.self-test
2Restrictions: allow-stderr
diff --git a/gitubuntu/__main__.py b/gitubuntu/__main__.py
index 4bf96c1..0ad68bf 100644
--- a/gitubuntu/__main__.py
+++ b/gitubuntu/__main__.py
@@ -4,12 +4,7 @@ from collections import namedtuple
4import logging4import logging
5import sys5import sys
66
7try:7import pkg_resources
8 pkg = 'python3-pkg-resources'
9 import pkg_resources
10except:
11 logging.error('Is %s installed?', pkg)
12 sys.exit(1)
138
14TopLevelDefaults = namedtuple(9TopLevelDefaults = namedtuple(
15 'TopLevelDefaults',10 'TopLevelDefaults',
@@ -67,12 +62,7 @@ def main():
67 import textwrap62 import textwrap
68 from gitubuntu.run import run63 from gitubuntu.run import run
6964
70 try:65 import argcomplete
71 pkg = 'python3-argcomplete'
72 import argcomplete
73 except:
74 logging.error('Is %s installed?', pkg)
75 sys.exit(1)
7666
77 logging.getLogger('keyring').setLevel(logging.WARNING)67 logging.getLogger('keyring').setLevel(logging.WARNING)
7868
diff --git a/gitubuntu/build.py b/gitubuntu/build.py
index ab2467f..4606a6c 100644
--- a/gitubuntu/build.py
+++ b/gitubuntu/build.py
@@ -46,18 +46,10 @@ from gitubuntu.source_information import (
46 derive_codename_from_series,46 derive_codename_from_series,
47)47)
48from gitubuntu.test_util import get_test_changelog48from gitubuntu.test_util import get_test_changelog
49try:49from debian.debfile import PART_EXTS
50 pkg = 'python3-debian'50import petname
51 from debian.debfile import PART_EXTS51import pygit2
52 pkg = 'python3-petname'52import pytest
53 import petname
54 pkg = 'python3-pygit2'
55 import pygit2
56 pkg = 'python3-pytest'
57 import pytest
58except ImportError:
59 logging.error('Is %s installed?', pkg)
60 sys.exit(1)
6153
62from distro_info import DebianDistroInfo, UbuntuDistroInfo54from distro_info import DebianDistroInfo, UbuntuDistroInfo
6355
diff --git a/gitubuntu/clone.py b/gitubuntu/clone.py
index 0eca56e..2e0d48d 100644
--- a/gitubuntu/clone.py
+++ b/gitubuntu/clone.py
@@ -12,14 +12,8 @@ from gitubuntu.git_repository import (
12)12)
13from gitubuntu.run import decode_binary, run13from gitubuntu.run import decode_binary, run
1414
15try:15import pkg_resources
16 pkg = 'python3-pkg-resources'16import pygit2
17 import pkg_resources
18 pkg = 'python3-pygit2'
19 import pygit2
20except ImportError:
21 logging.error('Is %s installed?', pkg)
22 sys.exit(1)
2317
24def copy_hooks(src, dst):18def copy_hooks(src, dst):
25 try:19 try:
diff --git a/gitubuntu/dsc.py b/gitubuntu/dsc.py
index 1fc3129..786b744 100644
--- a/gitubuntu/dsc.py
+++ b/gitubuntu/dsc.py
@@ -2,12 +2,7 @@ import logging
2import os2import os
3import re3import re
4import sys4import sys
5try:5from ubuntutools.archive import Dsc
6 pkg = 'python3-ubuntutools'
7 from ubuntutools.archive import Dsc
8except ImportError:
9 logging.error('Is %s installed?', pkg)
10 sys.exit(1)
116
12orig_re = re.compile(r'.*\.orig\.tar\.[^.]+$')7orig_re = re.compile(r'.*\.orig\.tar\.[^.]+$')
13component_re = re.compile(r'^(?P<pkgname>.*)_(?P<version>.*)\.orig-(?P<component>[^.]+)\.tar\.[^.]+$')8component_re = re.compile(r'^(?P<pkgname>.*)_(?P<version>.*)\.orig-(?P<component>[^.]+)\.tar\.[^.]+$')
diff --git a/gitubuntu/exportorig.py b/gitubuntu/exportorig.py
index a04362c..be4ded2 100644
--- a/gitubuntu/exportorig.py
+++ b/gitubuntu/exportorig.py
@@ -6,12 +6,7 @@ import gitubuntu.build
6from gitubuntu.cache import CACHE_PATH6from gitubuntu.cache import CACHE_PATH
7import gitubuntu.git_repository7import gitubuntu.git_repository
88
9try:9import pygit2
10 pkg = 'python3-pygit2'
11 import pygit2
12except ImportError:
13 logging.error('Is %s installed?', pkg)
14 sys.exit(1)
1510
16def parse_args(subparsers=None, base_subparsers=None):11def parse_args(subparsers=None, base_subparsers=None):
17 kwargs = dict(12 kwargs = dict(
diff --git a/gitubuntu/git_repository.py b/gitubuntu/git_repository.py
index 2cfdf9a..8dc4d1f 100644
--- a/gitubuntu/git_repository.py
+++ b/gitubuntu/git_repository.py
@@ -31,17 +31,10 @@ from gitubuntu.run import (
31import gitubuntu.spec31import gitubuntu.spec
32from gitubuntu.test_util import get_test_changelog32from gitubuntu.test_util import get_test_changelog
33import gitubuntu.versioning33import gitubuntu.versioning
34try:34import debian.changelog
35 pkg = 'python3-debian'35import debian.debian_support
36 import debian.changelog36import pygit2
37 import debian.debian_support37import pytest
38 pkg = 'python3-pygit2'
39 import pygit2
40 pkg = 'python3-pytest'
41 import pytest
42except ImportError:
43 logging.error('Is %s installed?', pkg)
44 sys.exit(1)
4538
4639
47def _follow_symlinks_to_blob(repo, top_tree_object, search_path,40def _follow_symlinks_to_blob(repo, top_tree_object, search_path,
@@ -72,7 +65,7 @@ def _follow_symlinks_to_blob(repo, top_tree_object, search_path,
72 tail = None65 tail = None
7366
74 entry = _rel_tree[head]67 entry = _rel_tree[head]
75 if entry.type == 'tree':68 if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']:
76 return _follow_symlinks_to_blob(69 return _follow_symlinks_to_blob(
77 repo=repo,70 repo=repo,
78 top_tree_object=top_tree_object,71 top_tree_object=top_tree_object,
@@ -80,7 +73,7 @@ def _follow_symlinks_to_blob(repo, top_tree_object, search_path,
80 _rel_tree=repo.get(entry.id),73 _rel_tree=repo.get(entry.id),
81 _rel_path=posixpath.join(_rel_path, head),74 _rel_path=posixpath.join(_rel_path, head),
82 )75 )
83 elif entry.type == 'blob' and entry.filemode == pygit2.GIT_FILEMODE_LINK:76 elif entry.type in [pygit2.GIT_OBJ_BLOB, 'blob'] and entry.filemode == pygit2.GIT_FILEMODE_LINK:
84 # Found a symlink. Start again from the top with adjustment for symlink77 # Found a symlink. Start again from the top with adjustment for symlink
85 # following78 # following
86 target_tail = [decode_binary(repo.get(entry.id).data)]79 target_tail = [decode_binary(repo.get(entry.id).data)]
@@ -94,7 +87,7 @@ def _follow_symlinks_to_blob(repo, top_tree_object, search_path,
94 top_tree_object=top_tree_object,87 top_tree_object=top_tree_object,
95 search_path=search_path,88 search_path=search_path,
96 )89 )
97 elif entry.type == 'blob' and entry.filemode in NORMAL_BLOB_MODES:90 elif entry.type in [pygit2.GIT_OBJ_BLOB, 'blob'] and entry.filemode in NORMAL_BLOB_MODES:
98 return repo.get(entry.id)91 return repo.get(entry.id)
99 else:92 else:
100 # Found some special entry such as a "gitlink" (submodule entry)93 # Found some special entry such as a "gitlink" (submodule entry)
@@ -591,7 +584,7 @@ class Changelog:
591 @property584 @property
592 def _shell_version(self):585 def _shell_version(self):
593 parse_params = '-n1 -SVersion'586 parse_params = '-n1 -SVersion'
594 shell_cmd = 'grep -m1 \'^\S\' | sed \'s/.*(\(.*\)).*/\\1/\''587 shell_cmd = "grep -m1 '^\\S' | sed 's/.*(\\(.*\\)).*/\\1/'"
595 try:588 try:
596 raw_out = self._dpkg_parsechangelog(parse_params)589 raw_out = self._dpkg_parsechangelog(parse_params)
597 except CalledProcessError:590 except CalledProcessError:
@@ -627,7 +620,7 @@ class Changelog:
627 @property620 @property
628 def _shell_previous_version(self):621 def _shell_previous_version(self):
629 parse_params = '-n1 -o1 -SVersion'622 parse_params = '-n1 -o1 -SVersion'
630 shell_cmd = 'grep -m1 \'^\S\' | tail -1 | sed \'s/.*(\(.*\)).*/\\1/\''623 shell_cmd = "grep -m1 '^\\S' | tail -1 | sed 's/.*(\\(.*\\)).*/\\1/'"
631 try:624 try:
632 raw_out = self._dpkg_parsechangelog(parse_params)625 raw_out = self._dpkg_parsechangelog(parse_params)
633 except CalledProcessError:626 except CalledProcessError:
@@ -652,7 +645,7 @@ class Changelog:
652 @property645 @property
653 def _shell_maintainer(self):646 def _shell_maintainer(self):
654 parse_params = '-SMaintainer'647 parse_params = '-SMaintainer'
655 shell_cmd = 'grep -m1 \'^ --\' | sed \'s/ -- \(.*\) \(.*\)/\\1/\''648 shell_cmd = "grep -m1 '^ --' | sed 's/ -- \\(.*\\) \\(.*\\)/\\1/'"
656 try:649 try:
657 return self._dpkg_parsechangelog(parse_params)650 return self._dpkg_parsechangelog(parse_params)
658 except CalledProcessError:651 except CalledProcessError:
@@ -676,7 +669,7 @@ class Changelog:
676 @property669 @property
677 def _shell_date(self):670 def _shell_date(self):
678 parse_params = '-SDate'671 parse_params = '-SDate'
679 shell_cmd = 'grep -m1 \'^ --\' | sed \'s/ -- \(.*\) \(.*\)/\\2/\''672 shell_cmd = "grep -m1 '^ --' | sed 's/ -- \\(.*\\) \\(.*\\)/\\2/'"
680 try:673 try:
681 return self._dpkg_parsechangelog(parse_params)674 return self._dpkg_parsechangelog(parse_params)
682 except CalledProcessError:675 except CalledProcessError:
@@ -697,7 +690,7 @@ class Changelog:
697 @property690 @property
698 def _shell_all_versions(self):691 def _shell_all_versions(self):
699 parse_params = '--format rfc822 -SVersion --all'692 parse_params = '--format rfc822 -SVersion --all'
700 shell_cmd = 'grep \'^\S\' | sed \'s/.*(\(.*\)).*/\\1/\''693 shell_cmd = "grep '^\\S' | sed 's/.*(\\(.*\\)).*/\\1/'"
701 try:694 try:
702 version_lines = self._dpkg_parsechangelog(parse_params)695 version_lines = self._dpkg_parsechangelog(parse_params)
703 except CalledProcessError:696 except CalledProcessError:
@@ -734,7 +727,7 @@ class Changelog:
734 @property727 @property
735 def _shell_distribution(self):728 def _shell_distribution(self):
736 parse_params = '-SDistribution'729 parse_params = '-SDistribution'
737 shell_cmd = 'grep -m1 \'^\S\' | sed \'s/.*\ .*\ \(.*\);.*/\\1/\''730 shell_cmd = "grep -m1 '^\\S' | sed 's/.*\\ .*\\ \\(.*\\);.*/\\1/'"
738 try:731 try:
739 return self._dpkg_parsechangelog(parse_params)732 return self._dpkg_parsechangelog(parse_params)
740 except CalledProcessError:733 except CalledProcessError:
@@ -755,7 +748,7 @@ class Changelog:
755 @property748 @property
756 def _shell_srcpkg(self):749 def _shell_srcpkg(self):
757 parse_params = '-SSource'750 parse_params = '-SSource'
758 shell_cmd = 'grep -m1 \'^\S\' | sed \'s/\(.*\)\ .*\ .*;.*/\\1/\''751 shell_cmd = "grep -m1 '^\\S' | sed 's/\\(.*\\)\\ .*\\ .*;.*/\\1/'"
759 try:752 try:
760 return self._dpkg_parsechangelog(parse_params)753 return self._dpkg_parsechangelog(parse_params)
761 except CalledProcessError:754 except CalledProcessError:
@@ -1095,7 +1088,8 @@ class GitUbuntuRepository:
1095 # (for example in deriving the environment to use for calls to the git1088 # (for example in deriving the environment to use for calls to the git
1096 # CLI). This permits the behaviour to remain identical for now.1089 # CLI). This permits the behaviour to remain identical for now.
1097 # Eventually we can break previous behaviour and eliminate the need for1090 # Eventually we can break previous behaviour and eliminate the need for
1098 # this.1091 # this. See also: gitubuntu.test_fixtures.repo; the handling of EMAIL
1092 # there could be made cleaner when this is cleaned up.
1099 self._initial_env = os.environ.copy()1093 self._initial_env = os.environ.copy()
11001094
1101 self.set_git_attributes()1095 self.set_git_attributes()
diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py
index b2a9916..26908cb 100644
--- a/gitubuntu/importer.py
+++ b/gitubuntu/importer.py
@@ -71,14 +71,8 @@ from gitubuntu.source_information import (
71import gitubuntu.spec as spec71import gitubuntu.spec as spec
72from gitubuntu.version import VERSION72from gitubuntu.version import VERSION
73from gitubuntu.versioning import version_compare73from gitubuntu.versioning import version_compare
74try:74import pygit2
75 pkg = 'python3-pygit2'75from lazr.restfulclient.errors import NotFound, PreconditionFailed
76 import pygit2
77 pkg = 'python3-lazr.restfulclient'
78 from lazr.restfulclient.errors import NotFound, PreconditionFailed
79except ImportError:
80 logging.error('Is %s installed?', pkg)
81 sys.exit(1)
8276
8377
84class GitUbuntuImportError(Exception):78class GitUbuntuImportError(Exception):
@@ -844,7 +838,7 @@ def import_patches_applied_tree(repo, dsc_pathname):
844838
845 try:839 try:
846 if not is_dir_3_0_quilt(extracted_dir):840 if not is_dir_3_0_quilt(extracted_dir):
847 raise StopIteration()841 return
848842
849 while True:843 while True:
850 try:844 try:
@@ -906,7 +900,7 @@ def import_patches_applied_tree(repo, dsc_pathname):
906 # quilt returns 2 when done pushing900 # quilt returns 2 when done pushing
907 if e.returncode != 2:901 if e.returncode != 2:
908 raise902 raise
909 raise StopIteration()903 return
910 finally:904 finally:
911 os.chdir(oldcwd)905 os.chdir(oldcwd)
912 shutil.rmtree(extract_dir)906 shutil.rmtree(extract_dir)
@@ -1193,7 +1187,7 @@ def update_devel_branches(
1193 series_name_list=ubuntu_sinfo.all_series_name_list,1187 series_name_list=ubuntu_sinfo.all_series_name_list,
1194 ):1188 ):
1195 if commit is None:1189 if commit is None:
1196 logging.warn(1190 logging.warning(
1197 "Source package '%s' does not appear to have been published "1191 "Source package '%s' does not appear to have been published "
1198 "in Ubuntu. No %s created.",1192 "in Ubuntu. No %s created.",
1199 pkgname,1193 pkgname,
@@ -1509,7 +1503,7 @@ def validate_upload_tag(
1509 :returns: True if the upload tag validates; False otherwise.1503 :returns: True if the upload tag validates; False otherwise.
1510 """1504 """
1511 if upload_tag.peel().tree.id != import_tree.id:1505 if upload_tag.peel().tree.id != import_tree.id:
1512 logging.warn(1506 logging.warning(
1513 "Found upload tag %s, but the corresponding tree "1507 "Found upload tag %s, but the corresponding tree "
1514 "does not match the published version. Will import %s as "1508 "does not match the published version. Will import %s as "
1515 "normal, ignoring the upload tag.",1509 "normal, ignoring the upload tag.",
@@ -1526,7 +1520,7 @@ def validate_upload_tag(
1526 for commit in changelog_parents1520 for commit in changelog_parents
1527 )1521 )
1528 if not has_changelog_parent_ancestor:1522 if not has_changelog_parent_ancestor:
1529 logging.warn(1523 logging.warning(
1530 "Found upload tag %s, but no changelog parent is its ancestor. "1524 "Found upload tag %s, but no changelog parent is its ancestor. "
1531 "Will import %s as normal, ignoring the upload tag.",1525 "Will import %s as normal, ignoring the upload tag.",
1532 repo.tag_to_pretty_name(upload_tag),1526 repo.tag_to_pretty_name(upload_tag),
@@ -1999,9 +1993,7 @@ def import_applied_dsc(
1999 if repo.treeishs_identical(1993 if repo.treeishs_identical(
2000 unapplied_import_tree_hash, str(applied_tip_head.peel().id)1994 unapplied_import_tree_hash, str(applied_tip_head.peel().id)
2001 ):1995 ):
2002 logging.warn('%s is identical to %s',1996 logging.warning('%s is identical to %s', pretty_head_name, version)
2003 pretty_head_name, version
2004 )
2005 return1997 return
2006 applied_tip_version, _ = repo.get_changelog_versions_from_treeish(1998 applied_tip_version, _ = repo.get_changelog_versions_from_treeish(
2007 str(applied_tip_head.peel().id),1999 str(applied_tip_head.peel().id),
@@ -2025,9 +2017,12 @@ def import_applied_dsc(
2025 )2017 )
2026 else:2018 else:
2027 if version_compare(version, applied_tip_version) <= 0:2019 if version_compare(version, applied_tip_version) <= 0:
2028 logging.warn('Version to import (%s) is not after %s tip (%s)',2020 logging.warning(
2029 version, pretty_head_name, applied_tip_version2021 'Version to import (%s) is not after %s tip (%s)',
2030 )2022 version,
2023 pretty_head_name,
2024 applied_tip_version,
2025 )
20312026
20322027
2033 applied_changelog_parent_commits = get_changelog_parent_commits(2028 applied_changelog_parent_commits = get_changelog_parent_commits(
diff --git a/gitubuntu/importer_test.py b/gitubuntu/importer_test.py
index b09b71c..1848d76 100644
--- a/gitubuntu/importer_test.py
+++ b/gitubuntu/importer_test.py
@@ -1141,7 +1141,12 @@ def MockSPI(dsc_path, version):
1141 spi.dsc_pathname = dsc_path1141 spi.dsc_pathname = dsc_path
1142 spi.distribution_name = 'Ubuntu'1142 spi.distribution_name = 'Ubuntu'
1143 spi.version = version1143 spi.version = version
1144 spi.date_created = datetime.datetime(1970, 1, 1)1144 spi.date_created = datetime.datetime(
1145 1970,
1146 1,
1147 1,
1148 tzinfo=datetime.timezone.utc,
1149 )
1145 head_name = Mock(name='head_name')1150 head_name = Mock(name='head_name')
1146 head_name.return_value = 'importer/ubuntu/trusty'1151 head_name.return_value = 'importer/ubuntu/trusty'
1147 spi.head_name = head_name1152 spi.head_name = head_name
@@ -1795,7 +1800,15 @@ def test_authorship_date(repo, override, input_string, expected_result):
1795 head_name='ubuntu/focal',1800 head_name='ubuntu/focal',
1796 skip_orig=True,1801 skip_orig=True,
1797 parent_overrides={},1802 parent_overrides={},
1798 commit_date=datetime.datetime(1972, 3, 3, 12, 45, 57),1803 commit_date=datetime.datetime(
1804 1972,
1805 3,
1806 3,
1807 12,
1808 45,
1809 57,
1810 tzinfo=datetime.timezone.utc,
1811 ),
1799 changelog_date_overrides=(1812 changelog_date_overrides=(
1800 frozenset({'1-1'}) if override else frozenset()1813 frozenset({'1-1'}) if override else frozenset()
1801 ),1814 ),
@@ -1805,6 +1818,9 @@ def test_authorship_date(repo, override, input_string, expected_result):
1805 )1818 )
1806 commit = import_ref.peel(pygit2.Commit)1819 commit = import_ref.peel(pygit2.Commit)
1807 assert commit.author.time == int(1820 assert commit.author.time == int(
1808 datetime.datetime(*expected_result[:6]).timestamp()1821 datetime.datetime(
1822 *expected_result[:6],
1823 tzinfo=datetime.timezone.utc,
1824 ).timestamp()
1809 )1825 )
1810 assert commit.author.offset == expected_result[6]1826 assert commit.author.offset == expected_result[6]
diff --git a/gitubuntu/rich_history.py b/gitubuntu/rich_history.py
index b987b46..1ca61e0 100644
--- a/gitubuntu/rich_history.py
+++ b/gitubuntu/rich_history.py
@@ -140,9 +140,9 @@ def export_all(repo, path, namespace='importer'):
140 try:140 try:
141 export_upload_tag(repo, path, ref, commit_map)141 export_upload_tag(repo, path, ref, commit_map)
142 except MultipleParentError:142 except MultipleParentError:
143 logging.warn("Multiple parents exporting %s" % ref.name)143 logging.warning("Multiple parents exporting %s" % ref.name)
144 except BaseNotFoundError:144 except BaseNotFoundError:
145 logging.warn("No base found exporting %s" % ref.name)145 logging.warning("No base found exporting %s" % ref.name)
146146
147147
148def import_single(repo, path, version, namespace='importer'):148def import_single(repo, path, version, namespace='importer'):
diff --git a/gitubuntu/source_builder_test.py b/gitubuntu/source_builder_test.py
index 9131a98..ab36985 100644
--- a/gitubuntu/source_builder_test.py
+++ b/gitubuntu/source_builder_test.py
@@ -2,6 +2,7 @@ import os
2import subprocess2import subprocess
3import tempfile3import tempfile
44
5import pygit2
5import pytest6import pytest
67
7import gitubuntu.source_builder as target8import gitubuntu.source_builder as target
@@ -140,7 +141,7 @@ def test_source_quilt_no_patches(repo):
140 with target.Source(target.SourceSpec()) as dsc_path:141 with target.Source(target.SourceSpec()) as dsc_path:
141 top = dsc_path_to_tree(repo, dsc_path)142 top = dsc_path_to_tree(repo, dsc_path)
142 debian_entry = top['debian']143 debian_entry = top['debian']
143 assert debian_entry.type == 'tree'144 assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree']
144 debian = repo.raw_repo.get(debian_entry.id)145 debian = repo.raw_repo.get(debian_entry.id)
145 with pytest.raises(KeyError):146 with pytest.raises(KeyError):
146 debian['patches']147 debian['patches']
diff --git a/gitubuntu/source_information.py b/gitubuntu/source_information.py
index cf729b8..3cc11e7 100644
--- a/gitubuntu/source_information.py
+++ b/gitubuntu/source_information.py
@@ -10,20 +10,12 @@ _LP_LOGIN_AUTH = None
10_lp_service = 'production'10_lp_service = 'production'
11_lp_api_version = 'devel'11_lp_api_version = 'devel'
1212
13try:13import cachetools
14 pkg = 'python3-cachetools'14from distro_info import DebianDistroInfo, UbuntuDistroInfo
15 import cachetools15from launchpadlib.launchpad import Launchpad as LP
16 pkg = 'python3-distro-info'16from ubuntutools.archive import UbuntuSourcePackage, DebianSourcePackage, DownloadError
17 from distro_info import DebianDistroInfo, UbuntuDistroInfo17import ubuntutools.lp.lpapicache
18 pkg = 'python3-launchpadlib'18from ubuntutools.lp.lpapicache import SourcePackagePublishingHistory
19 from launchpadlib.launchpad import Launchpad as LP
20 pkg = 'python3-ubuntutools'
21 from ubuntutools.archive import UbuntuSourcePackage, DebianSourcePackage, DownloadError
22 import ubuntutools.lp.lpapicache
23 from ubuntutools.lp.lpapicache import SourcePackagePublishingHistory
24except ImportError:
25 logging.error('Is %s installed?', pkg)
26 sys.exit(1)
2719
28_ddi = DebianDistroInfo()20_ddi = DebianDistroInfo()
29_udi = UbuntuDistroInfo()21_udi = UbuntuDistroInfo()
@@ -637,7 +629,7 @@ class GitUbuntuSourceInformation(object):
637 )629 )
638 )630 )
639 yield spi631 yield spi
640 raise StopIteration()632 return
641633
642 @staticmethod634 @staticmethod
643 def interleave_launchpad_versions_published_after(635 def interleave_launchpad_versions_published_after(
diff --git a/gitubuntu/submit.py b/gitubuntu/submit.py
index 19e7678..aba426f 100644
--- a/gitubuntu/submit.py
+++ b/gitubuntu/submit.py
@@ -16,12 +16,7 @@ from gitubuntu.git_repository import (
16from gitubuntu.run import decode_binary, run16from gitubuntu.run import decode_binary, run
17from gitubuntu.source_information import GitUbuntuSourceInformation, launchpad_login_auth17from gitubuntu.source_information import GitUbuntuSourceInformation, launchpad_login_auth
1818
19try:19from lazr.restfulclient.errors import BadRequest
20 pkg = 'python3-lazr.restfulclient'
21 from lazr.restfulclient.errors import BadRequest
22except ImportError:
23 logging.error('Is %s installed?', pkg)
24 sys.exit(1)
2520
2621
27def parse_args(subparsers=None, base_subparsers=None):22def parse_args(subparsers=None, base_subparsers=None):
diff --git a/gitubuntu/test_fixtures.py b/gitubuntu/test_fixtures.py
index 60a5457..cef8b82 100644
--- a/gitubuntu/test_fixtures.py
+++ b/gitubuntu/test_fixtures.py
@@ -23,6 +23,15 @@ def repo():
23 except OSError:23 except OSError:
24 oldcwd = None24 oldcwd = None
2525
26 # The git CLI requires a valid email address to be available. Normally, we
27 # might expect this to be the git-ubuntu CLI caller's responsibility to
28 # set. However, in tests, since GitUbuntuRepository calls the git CLI for
29 # some operations that cannot currently be done through pygit2, it makes
30 # sense to set EMAIL temporarily so that the test suite is independent of
31 # the environment in which it is running.
32 old_email = os.environ.get('EMAIL')
33 os.environ['EMAIL'] = 'test@example.com'
34
26 with tempfile.TemporaryDirectory() as path:35 with tempfile.TemporaryDirectory() as path:
27 os.chdir(path)36 os.chdir(path)
28 try:37 try:
@@ -33,6 +42,18 @@ def repo():
33 if oldcwd:42 if oldcwd:
34 os.chdir(oldcwd)43 os.chdir(oldcwd)
3544
45 # Reset the EMAIL environment variable to what it was. This makes
46 # little practical difference, but may prevent confusion and a
47 # headache if in the future a different test is written that does
48 # not use this fixture but does rely somehow on the EMAIL
49 # environment variable not changing, as such a test would become
50 # non-deterministic depending on whether other tests have run that
51 # use this fixture.
52 if old_email is None:
53 del os.environ['EMAIL']
54 else:
55 os.environ['EMAIL'] = old_email
56
3657
37@pytest.fixture58@pytest.fixture
38def pygit2_repo():59def pygit2_repo():
diff --git a/gitubuntu/versioning.py b/gitubuntu/versioning.py
index bf58426..2d12cd5 100644
--- a/gitubuntu/versioning.py
+++ b/gitubuntu/versioning.py
@@ -9,17 +9,11 @@ from gitubuntu.source_information import (
9 NoPublicationHistoryException,9 NoPublicationHistoryException,
10)10)
1111
12try:12import debian
13 pkg = 'python3-debian'13# This effectively declares an interface for the type of Version
14 import debian14# object we want to use in the git-ubuntu code
15 # This effectively declares an interface for the type of Version15from debian.debian_support import NativeVersion as Version
16 # object we want to use in the git-ubuntu code16import pytest
17 from debian.debian_support import NativeVersion as Version
18 pkg = 'python3-pytest'
19 import pytest
20except ImportError:
21 logging.error('Is %s installed?', pkg)
22 sys.exit(1)
2317
24__all__ = [18__all__ = [
25 "next_development_version_string",19 "next_development_version_string",
diff --git a/setup.py b/setup.py
index 8262eed..8d8d68b 100644
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,7 @@ setup(name='gitubuntu',
39 'pytest==3.1.3',39 'pytest==3.1.3',
40 'pytest-cov==2.5.1',40 'pytest-cov==2.5.1',
41 'systemd-python',41 'systemd-python',
42 'ubuntutools',
42 'zmq',43 'zmq',
43 ]44 ]
44)45)
diff --git a/snap-wrappers/wrappers/awk b/snap-wrappers/wrappers/awk
45deleted file mode 10075546deleted file mode 100755
index 2d4abb7..0000000
--- a/snap-wrappers/wrappers/awk
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3CORE_SNAP="/snap/core/current"
4CORE_SNAP_PATH="$CORE_SNAP/usr/local/sbin:$CORE_SNAP/usr/local/bin:$CORE_SNAP/usr/sbin:$CORE_SNAP/usr/bin:$CORE_SNAP/sbin:$CORE_SNAP/bin"
5export PATH="$CORE_SNAP_PATH"
6export LD_LIBRARY_PATH="$CORE_SNAP/lib/x86_64-linux-gnu:$CORE_SNAP/usr/lib/x86_64-linux-gnu"
7exec "$CORE_SNAP/lib64/ld-linux-x86-64.so.2" "$CORE_SNAP/usr/bin/awk" "$@"
diff --git a/snap-wrappers/wrappers/gbp b/snap-wrappers/wrappers/gbp
index 77145d7..fef0928 100755
--- a/snap-wrappers/wrappers/gbp
+++ b/snap-wrappers/wrappers/gbp
@@ -1,9 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash1#!/snap/git-ubuntu/current/bin/bash
22
3CORE_SNAP="/snap/core/current"3exec "$SNAP/usr/bin/python3" "$SNAP/usr/bin/gbp" "$@"
4CORE_SNAP_PATH="$CORE_SNAP/usr/local/sbin:$CORE_SNAP/usr/local/bin:$CORE_SNAP/usr/sbin:$CORE_SNAP/usr/bin:$CORE_SNAP/sbin:$CORE_SNAP/bin"
5export PATH="$SNAP/bin/snap:$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
6export PYTHONPATH="$SNAP/lib/python3.6/site-packages"
7export PERL5LIB="$SNAP/usr/share/perl5:$SNAP/usr/share/perl/5.22"
8export DPKG_DATADIR="$SNAP/usr/share/dpkg"
9exec "$SNAP/usr/bin/python3" "$SNAP/bin/gbp" "$@"
diff --git a/snap-wrappers/wrappers/git-merge-changelogs b/snap-wrappers/wrappers/git-merge-changelogs
10deleted file mode 1007554deleted file mode 100755
index e78ce69..0000000
--- a/snap-wrappers/wrappers/git-merge-changelogs
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3set -e
4
5branch_base="$1"
6branch_a="$2"
7branch_b="$3"
8
9if [ ! -d debian ]; then
10 echo "$1: must be run from the top level of an unpacked Debian source package." >&2
11 exit 2
12fi
13
14file_base=`mktemp git-mergechangelogs.XXXXXXXXXX`
15file_a=`mktemp git-mergechangelogs.XXXXXXXXXX`
16file_b=`mktemp git-mergechangelogs.XXXXXXXXXX`
17cleanup() { rm -f "$file_base" "$file_a" "$file_b"; }
18trap cleanup EXIT
19
20filename=changelog
21git show "${branch_base}:debian/$filename" > "$file_base"
22git show "${branch_a}:debian/$filename" > "$file_a"
23git show "${branch_b}:debian/$filename" > "$file_b"
24dpkg-mergechangelogs "$file_base" "$file_a" "$file_b" > debian/$filename
diff --git a/snap-wrappers/wrappers/git-reconstruct-changelog b/snap-wrappers/wrappers/git-reconstruct-changelog
25deleted file mode 1007550deleted file mode 100755
index 8fbb9f9..0000000
--- a/snap-wrappers/wrappers/git-reconstruct-changelog
+++ /dev/null
@@ -1,18 +0,0 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3set -e
4
5tempfile=`mktemp --tmpdir git-reconstruct-changelog.XXXXXXXXXX`
6cleanup() { rm -f "$tempfile"; }
7trap cleanup EXIT
8
9dch PLACEHOLDER
10sed -n '1,/PLACEHOLDER/{/PLACEHOLDER/!p}' debian/changelog > "$tempfile"
11for rev in `git rev-list --reverse $1..HEAD`; do
12 if [ "`git diff --name-only $rev^ $rev`" = debian/changelog ]; then
13 continue
14 fi
15 git log --pretty=%B -n1 $rev|sed '/^$/d' >> "$tempfile"
16done
17sed -n '1,/PLACEHOLDER/!p' debian/changelog >> "$tempfile"
18mv "$tempfile" debian/changelog
diff --git a/snap-wrappers/wrappers/git-ubuntu-man b/snap-wrappers/wrappers/git-ubuntu
19similarity index 50%0similarity index 50%
20rename from snap-wrappers/wrappers/git-ubuntu-man1rename from snap-wrappers/wrappers/git-ubuntu-man
21rename to snap-wrappers/wrappers/git-ubuntu2rename to snap-wrappers/wrappers/git-ubuntu
index 623cdd2..138ffb7 100755
--- a/snap-wrappers/wrappers/git-ubuntu-man
+++ b/snap-wrappers/wrappers/git-ubuntu
@@ -1,3 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash1#!/snap/git-ubuntu/current/bin/bash
22
3man -M $SNAP/usr/share/man $@ 2>/dev/null || man $@3exec "$SNAP/usr/bin/python3" "$SNAP/usr/bin/git-ubuntu" "$@"
diff --git a/snap-wrappers/wrappers/merge-changelogs b/snap-wrappers/wrappers/merge-changelogs
4new file mode 1007554new file mode 100755
index 0000000..97f0a2a
--- /dev/null
+++ b/snap-wrappers/wrappers/merge-changelogs
@@ -0,0 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3exec "$SNAP/bin/bash" "$SNAP/usr/bin/git-ubuntu.merge-changelogs"
diff --git a/snap-wrappers/wrappers/quilt b/snap-wrappers/wrappers/quilt
index ed09371..49dea83 100755
--- a/snap-wrappers/wrappers/quilt
+++ b/snap-wrappers/wrappers/quilt
@@ -1,8 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash1#!/snap/git-ubuntu/current/bin/bash
22
3CORE_SNAP="/snap/core/current"3exec "$SNAP/bin/bash" "$SNAP/usr/bin/quilt" "$@"
4CORE_SNAP_PATH="$CORE_SNAP/usr/local/sbin:$CORE_SNAP/usr/local/bin:$CORE_SNAP/usr/sbin:$CORE_SNAP/usr/bin:$CORE_SNAP/sbin:$CORE_SNAP/bin"
5export PATH="$SNAP/bin/snap:$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
6export LD_LIBRARY_PATH="$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
7export QUILT_DIR="$SNAP/usr/share/quilt"
8exec "$SNAP/usr/bin/quilt" "$@"
diff --git a/snap-wrappers/wrappers/reconstruct-changelog b/snap-wrappers/wrappers/reconstruct-changelog
9new file mode 1007554new file mode 100755
index 0000000..4f72c77
--- /dev/null
+++ b/snap-wrappers/wrappers/reconstruct-changelog
@@ -0,0 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3exec "$SNAP/bin/bash" "$SNAP/usr/bin/git-ubuntu.reconstruct-changelog"
diff --git a/snap-wrappers/wrappers/self-test b/snap-wrappers/wrappers/self-test
0new file mode 1007554new file mode 100755
index 0000000..4e950e2
--- /dev/null
+++ b/snap-wrappers/wrappers/self-test
@@ -0,0 +1,3 @@
1#!/snap/git-ubuntu/current/bin/bash
2
3exec "$SNAP/bin/bash" "$SNAP/usr/share/git-ubuntu/self-test"
diff --git a/snap.sh b/snap.sh
0new file mode 1006444new file mode 100644
index 0000000..8d2bb89
--- /dev/null
+++ b/snap.sh
@@ -0,0 +1,101 @@
1#!/bin/sh
2set -e
3
4# This script is a workaround for LP: #1918968. A deb is built, added to an apt
5# repository, snapcraft.yaml adjusted to add a new "package-repositories"
6# section pointing to it, and then snapcraft is run to generate the snap based
7# on it.
8
9# NOTE: THIS SCRIPT IS "DESTRUCTIVE" TO THE HOST
10#
11# It will install deb and snap dependencies using "sudo" on your system as well
12# as install a temporariy git-ubuntu deb locally as built from this source tree
13# and add sources and keys to apt for this purpose. It is intended for use in a
14# temporary VM environment only.
15
16tmp_dir=$(mktemp -d)
17cleanup() { rm -rf "$tmp_dir"; }
18trap cleanup EXIT
19
20# Install dependencies of this script
21# apt-utils: needed for apt-ftparchive
22# devscripts: needed for mk-build-deps and dch
23# equivs: needed by mk-build-deps
24# python3 and python3-yaml: needed to modify snapcraft.yaml
25sudo apt-get update
26sudo apt-get install -y --no-install-recommends \
27 apt-utils \
28 devscripts \
29 equivs \
30 python3 \
31 python3-yaml
32sudo snap install --classic snapcraft
33
34# Set up debian/changelog with an appropriate version string
35snap_version=$(git describe)
36# Replace the hyphens appropriately to construct a valid Debian native version
37# string
38deb_version=$(echo $snap_version|sed 's/-/+/;s/-/./g')
39
40export DEBEMAIL=ubuntu-devel-discuss@lists.ubuntu.com
41export DEBFULLNAME="git-ubuntu snap.sh build script"
42dch -v "$deb_version" ''
43dch -r -D focal ''
44
45# Install deb build dependencies and build the deb
46mk-build-deps
47# --allow-downgrades is helpful for development of this script because it
48# ensures that the build dependency package gets updated regardless of the
49# previous version used. In production it is a no-op.
50sudo apt-get install -y --allow-downgrades ./git-ubuntu-build-deps_${deb_version}_all.deb
51debian/rules build
52fakeroot debian/rules binary
53
54# Workaround for LP: #1918969: temporary apt repository signing
55export GNUPGHOME="$tmp_dir/gpg"
56mkdir -m700 "$GNUPGHOME"
57gpg --batch --gen-key <<EOF
58%no-protection
59Key-Type:1
60Key-Length:2048
61Subkey-Type:1
62Subkey-Length:2048
63Name-Real: git-ubuntu build script apt repo
64Name-Email: ubuntu-devel-discuss@lists.ubuntu.com
65Expire-Date:0
66EOF
67key_id=$(gpg --list-keys --batch --with-colons|awk -F: '$1=="fpr"{print $10;exit}')
68mkdir -p snap/keys
69# 'expr substr "$key_id" 1 8' is a workaround for LP: #1918967
70gpg --batch -a -o snap/keys/$(expr substr "$key_id" 1 8).asc --export
71
72build_dir=$(pwd)
73repo_dir="$tmp_dir/repo"
74mkdir "$repo_dir"
75cd "$repo_dir"
76mv "$build_dir/../git-ubuntu_${deb_version}_all.deb" .
77apt-ftparchive packages . | tee Packages | gzip > Packages.gz
78apt-ftparchive release . > Release
79gpg --yes -o Release.gpg -ab Release
80cd "$build_dir"
81
82# Update snapcraft.yaml with a pointer to our temporary apt repository
83python3 <<EOT
84import yaml
85with open('snap/snapcraft.yaml') as f:
86 snapcraft = yaml.safe_load(f)
87# The version is tweaked here to avoid the snap version being marked "dirty"
88# just because we are modifying snapcraft.yaml with this script.
89snapcraft['version'] = '$snap_version'
90snapcraft['package-repositories'] = [{
91 'type': 'apt',
92 'url': 'file://' + '$repo_dir',
93 'path': '.',
94 'key-id': '$key_id',
95}]
96with open('snap/snapcraft.yaml', 'w') as f:
97 yaml.dump(snapcraft, f)
98EOT
99
100# Build the snap itself
101snapcraft --destructive-mode --enable-experimental-package-repositories
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 3edcd63..bb00454 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -3,456 +3,86 @@ version: git
3summary: Ubuntu development git tooling3summary: Ubuntu development git tooling
4description: Maintain an Ubuntu source package in a git tree4description: Maintain an Ubuntu source package in a git tree
5confinement: classic5confinement: classic
6grade: stable6grade: devel
7base: core20
78
8environment:9environment:
9 CORE_SNAP: "/snap/core/current"10 DPKG_DATADIR: "$SNAP/usr/share/dpkg"
10 CORE_SNAP_PATH: "$CORE_SNAP/usr/local/sbin:$CORE_SNAP/usr/local/bin:$CORE_SNAP/usr/sbin:$CORE_SNAP/usr/bin:$CORE_SNAP/sbin:$CORE_SNAP/bin"11 QUILT_DIR: "$SNAP/usr/share/quilt"
11 PERL5LIB: "$SNAP/usr/share/perl5:$SNAP/usr/share/perl/5.22"12 GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
12 DPKG_DATADIR: "$SNAP/usr/share/dpkg"13 GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
13 GIT_EXEC_PATH: "$SNAP/libexec/git-core"14 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin"
14 GIT_TEMPLATE_DIR: "$SNAP/share/git-core/templates"15 PERL5LIB: "$SNAP/usr/share/perl5:$SNAP/usr/share/perl/5.30"
16 PYTHONPATH: "$SNAP/usr/lib/python3/dist-packages"
1517
16apps:18apps:
17 git-ubuntu:19 git-ubuntu:
18 command: bin/git-ubuntu20 command: wrappers/git-ubuntu
19 environment:21 self-test:
20 ORIG_PATH: "$PATH"22 command: wrappers/self-test
21 PYTHONPATH: "$SNAP/lib/python3.6/site-packages"23 reconstruct-changelog:
22 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"24 command: wrappers/reconstruct-changelog
23 man:25 merge-changeloges:
24 command: wrappers/git-ubuntu-man26 command: wrappers/merge-changelogs
25 environment:
26 LD_LIBRARY_PATH: "$SNAP/usr/lib/man-db:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
27 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
28 reconstruct-changelog:
29 command: wrappers/git-reconstruct-changelog
30 environment:
31 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
32 merge-changelogs:
33 command: wrappers/git-merge-changelogs
34 environment:
35 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
36 self-test:
37 command: wrappers/git-ubuntu-self-test
38 environment:
39 PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
40 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
41 import-source-packages:
42 command: bin/import-source-packages.py
43 environment:
44 ORIG_PATH: "$PATH"
45 PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
46 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
47 source-package-walker:
48 command: bin/source-package-walker.py
49 environment:
50 PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
51 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
52 update-repository-alias:
53 command: bin/update-repository-alias.py
54 environment:
55 PYTHONPATH: "$SNAP/lib/python3.6/site-packages"
56 PATH: "$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
5727
58parts:28# package-repositories is inserted here by snap.sh
59 gbp:29# See LP: #1918968 and snap.sh
60 plugin: python
61 python-version: python3
62 # from https://github.com/agx/git-buildpackage/archive/debian/0.9.6.tar.gz
63 source: https://people.canonical.com/~rbasak/git-ubuntu/github-gbp-debian-0.9.6.tar.gz
64 source-type: tar
65 source-checksum: sha384/5c9be5a0cdcd0c2a89de2470617361d5f891befa854f32a40e96b2443668fef2068456bf6bcb5ac11c92a0487531a782
66 requirements: requirements.txt
67 stage:
68 - -usr/bin/py*
69 - -usr/bin/2to3*
70 - -usr/share/*python*
71 - -usr/lib/python3.5
72 - -usr/lib/python3.6
73 after: [git, pristine-tar, python3]
74 git:
75 plugin: autotools
76 # from https://github.com/git/git/archive/v2.14.3.tar.gz
77 source: https://people.canonical.com/~rbasak/git-ubuntu/github-git-v2.14.3.tar.gz
78 source-type: tar
79 source-checksum: sha384/0d28faa4cc66b81ab262f44433b24261cbd39851648723d6701dd5463ab8fb6989b18d46523a4e238a697a1ef78db938
80 build-packages:
81 - libz-dev
82 - gettext
83 - libpcre3-dev
84 - libcurl4-gnutls-dev
85 - libexpat1-dev
86 - libyaml-perl
87 - tcl
88 - libhttp-date-perl
89 - libcgi-pm-perl
90 - libdbd-sqlite3-perl
91 - unzip
92 - libio-pty-perl
93 dpkg:
94 plugin: autotools
95 # generated with, in a Bionic container:
96 # sudo apt update && sudo apt -y install autoconf autopoint pkg-config libtool libncursesw5-dev gettext po4a
97 # git clone https://anonscm.debian.org/git/dpkg/dpkg.git -b 1.18.24
98 # cd dpkg
99 # autoreconf -f -i
100 # ./configure
101 # make dist
102 source: https://people.canonical.com/~rbasak/git-ubuntu/dpkg-1.18.24.tar.xz
103 source-type: tar
104 source-checksum: sha384/54539fcf0f303ac4a2cff70f3f8fcf01325d2f84e757de02812d54d7603475c750b72380fab41b135930d5726c7dc541
105 configflags:
106 - --prefix=/usr
107 - --sysconfdir=/etc
108 - --sbindir=/sbinn
109 - --localstatedir=/var
110 - --libexecdir=${exec_prefix/lib}
111 build-packages:
112 - pkg-config
113 - libncursesw5-dev
114 xz-utils:
115 plugin: autotools
116 # from https://github.com/xz-mirror/xz/releases/download/v5.2.2/xz-5.2.2.tar.xz
117 source: https://people.canonical.com/~rbasak/git-ubuntu/xz-5.2.2.tar.xz
118 source-type: tar
119 source-checksum: sha384/ccb584d0325497eb4c7dbba930c0fff388efe2cbc3636507ba654084948965cc18325ca4835f972c8083db4e381fbbdc
120 configflags: [--prefix=/usr]
121 after: [dpkg]
122 tar:
123 plugin: x-tar
124 # from https://ftp.gnu.org/gnu/tar/tar-1.29.tar.xz
125 source: https://people.canonical.com/~rbasak/git-ubuntu/tar-1.29.tar.xz
126 source-type: tar
127 source-checksum: sha384/b7d517a81a74c649893cb56958a06edabca7e6c67df9ec5c9c67b974216a4ef2e0eb427dc6d1e1a80c91c89e0b6ac751
128 after: [xz-utils]
129 xdelta:
130 plugin: autotools
131 # generated with
132 # git clone https://anonscm.debian.org/git/users/lamont/xdelta.git -b v1.1.3-9
133 # cd xdelta
134 # git archive --prefix xdelta-$(git describe)/ -o ../xdelta-$(git describe).tar.gz HEAD
135 source: https://people.canonical.com/~rbasak/git-ubuntu/xdelta-v1.1.3-9.tar.gz
136 source-type: tar
137 source-checksum: sha384/441b051fb9a4941ffb49efb0e82184227c9a9299cdd63d5d814f27f0017bceb2ef624615448268d34edaf696604fe62e
138 build-packages:
139 - libtool-bin
140 - libglib2.0-dev
141 - zlib1g-dev
142 xdelta3:
143 plugin: autotools
144 # from https://github.com/jmacd/xdelta/archive/v3.0.11.tar.gz
145 source: https://people.canonical.com/~rbasak/git-ubuntu/github-jmacd-xdelta-v3.0.11.tar.gz
146 source-type: tar
147 source-checksum: sha384/c1c0b70aa064b5bd02857d3547720fb3581752882e1ebb7391afb8e270e10b654a8b7bcf114ac1073c2787c9a115c03b
148 build: |
149 cd xdelta3
150 ./run_release.sh || true
151 ./run_release.sh || true
152 autoreconf
153 ./configure --prefix=$SNAPCRAFT_PART_INSTALL/usr
154 make
155 install: |
156 cd xdelta3
157 make install
158 after: [xz-utils]
159 pristine-tar:
160 plugin: make
161 # generated with
162 # git clone https://anonscm.debian.org/cgit/collab-maint/pristine-tar.git -b 1.41
163 # cd pristine-tar
164 # # git describe can't be used due to upstream tag issue
165 # git archive --prefix pristine-tar-1.41/ -o ../pristine-tar-1.41.tar.gz HEAD
166 source: https://people.canonical.com/~rbasak/git-ubuntu/pristine-tar-1.41.tar.gz
167 source-type: tar
168 source-checksum: sha384/0c202500d368051711bd7e827a29a6d93f9eba37ddee4950e1b24d510d9347635111b4e7dc716bd837a7f5c4d40e6238
169 prepare: |
170 perl Makefile.PL PREFIX=/usr
171 after: [git, tar, xdelta3]
172 launchpadlib:
173 plugin: python
174 python-version: python3
175 # from https://launchpad.net/ubuntu/+source/python-launchpadlib/1.10.6-1
176 source: https://launchpad.net/ubuntu/+archive/primary/+files/python-launchpadlib_1.10.6.orig.tar.gz
177 source-type: tar
178 source-checksum: sha384/fd87f3f02e86179e8bc8e07f52ca8aad59db93c7dd53057198b77fe4591593cda4a29d935b6e8a8386f6f6ddb83d4762
179 build-packages:
180 - libffi-dev
181 stage:
182 - -usr/bin/py*
183 - -usr/bin/2to3*
184 - -usr/share/*python*
185 - -usr/lib/python3.5
186 - -usr/lib/python3.6
187 - -lib/python3.6/site-packages/keyring
188 after: [python3]
189 python2:
190 # from http://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz
191 source: https://people.canonical.com/~rbasak/git-ubuntu/Python-2.7.14.tar.xz
192 source-type: tar
193 source-checksum: sha384/b5f8304a9f3f368625798cb6c9ba0d1fa4b3142f83f5039d8de59e9f70a36c4250a734f27ec27c16268dc8f9502c007e
194 plugin: autotools
195 configflags: [--prefix=/usr]
196 build-packages:
197 - libssl-dev
198 - libsqlite3-dev
199 stage:
200 - -usr/bin/2to3*
201 - -usr/lib/python2.7/test
202 # need it at runtime, but want to build it using the stage
203 # packages
204 after: [ubuntutools-python2]
205 python3:
206 # from http://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
207 source: https://people.canonical.com/~rbasak/git-ubuntu/Python-3.6.3.tar.xz
208 source-type: tar
209 source-checksum: sha384/72597cc86c893031af194404c97c5e15114cfb75833fab0dc53b4bc08f5928b094d5b4d405edc9543087970944790f70
210 plugin: autotools
211 configflags: [--prefix=/usr]
212 build-packages:
213 - libssl-dev
214 - libsqlite3-dev
215 - libbz2-dev
216 - liblzma-dev
217 - libdb-dev
218 - libgdbm-dev
219 - libreadline-dev
220 stage:
221 - -usr/lib/python3.6/test
222 ubuntutools-python2:
223 plugin: python
224 python-version: python2
225 # generated with
226 # git clone https://git.launchpad.net/ubuntu-dev-tools -b 0.161
227 # cd ubuntu-dev-tools
228 # git archive --prefix ubuntu-dev-tools-$(git describe)/ -o ../ubuntu-dev-tools-$(git describe).tar.gz HEAD
229 source: https://people.canonical.com/~rbasak/git-ubuntu/ubuntu-dev-tools-0.161.tar.gz
230 source-checksum: sha384/98fe630d6f644155b49b15c57b5d4f9f47bd918cc074359f5b5ac3fa283506b8fc2d557127f1b47dd2bd66e681c17104
231 stage:
232 - -bin/*
233 - -usr/bin/*
234 - -share/man/*
235 - -share/ubuntu-dev-tools/enforced-editing-wrapper
236 - -usr/share/*python*
237 - -lib/python2.7/site-packages/oauth*
238 - -usr/lib/python2.7
239 ubuntutools-python3:
240 plugin: python
241 python-version: python3
242 # generated with
243 # git clone https://git.launchpad.net/ubuntu-dev-tools -b 0.176
244 # cd ubuntu-dev-tools
245 # git archive --prefix ubuntu-dev-tools-$(git describe)/ -o ../ubuntu-dev-tools-$(git describe).tar.gz HEAD
246 source: https://people.canonical.com/~rbasak/git-ubuntu/ubuntu-dev-tools-0.176.tar.gz
247 source-checksum: sha384/24c255fcebe48ad6bdc6aa4cf197753b4c1683bb70458c2170593f70e8820911d61632cd99ec48f540eadad3ba5a9f56
248 stage:
249 - -usr/bin/py*
250 - -usr/bin/2to3*
251 - -usr/share/*python*
252 - -lib/python3.5/site-packages/oauth*
253 - -lib/python3.6/site-packages/oauth*
254 - -usr/lib/python3.5
255 - -usr/lib/python3.6
256 after: [python3]
257 distro-info:
258 plugin: python
259 python-version: python3
260 # generated with
261 # git clone https://anonscm.debian.org/git/collab-maint/distro-info.git -b debian/0.17
262 # cd distro-info
263 # #can't use git describe because of the upstream tag names
264 # git archive --prefix distro-info-0.17/ -o ../distro-info-0.17.tar.gz HEAD
265 source: https://people.canonical.com/~rbasak/git-ubuntu/distro-info-0.17.tar.gz
266 source-checksum: sha384/2192b97c15a5c1669ac8acdcaa37766a3898b440b14156422bef322dc4f42b2159f2ec87e49e818801bde0f0c359cb38
267 source-subdir: python
268 stage:
269 - -usr/bin/py*
270 - -usr/bin/2to3*
271 - -usr/share/*python*
272 - -usr/lib/python3.5
273 - -usr/lib/python3.6
274 stage-packages:
275 - distro-info
276 after: [python3]
277 libgpg-error:
278 plugin: autotools
279 # from https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2
280 source: https://people.canonical.com/~rbasak/git-ubuntu/libgpg-error-1.27.tar.bz2
281 source-type: tar
282 source-checksum: sha384/cf2e9e7ce6b5ed993b3f8f1d45f1d72b07a30544533142c48f1515d9fc1638fe976c639febca0b838489f6c34dc2f36d
283 configflags: [--prefix=/usr]
284 stage:
285 - -usr/share/info
286 libgcrypt:
287 plugin: autotools
288 # from https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.1.tar.bz2
289 source: https://people.canonical.com/~rbasak/git-ubuntu/libgcrypt-1.8.1.tar.bz2
290 source-type: tar
291 source-checksum: sha384/823b1e4a0c8d5dad5aabe0b192a92734ed95ccb3ba468483b3b6cd2765157458b620db0b020739d15397ddad81a93a3e
292 configflags: [--prefix=/usr]
293 stage:
294 - -usr/share/info
295 libassuan:
296 plugin: autotools
297 # from https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.tar.bz2
298 source: https://people.canonical.com/~rbasak/git-ubuntu/libassuan-2.5.1.tar.bz2
299 source-type: tar
300 source-checksum: sha384/e9bf675bd385e5bbe3fa8edf5632715b2fad67877c185ed12777caa6e985b2b967ccd836132ac3d28a10319057874d3d
301 configflags: [--prefix=/usr]
302 after: [libgpg-error]
303 stage:
304 - -usr/share/info
305 libksba:
306 plugin: autotools
307 # from https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz2
308 source: https://people.canonical.com/~rbasak/git-ubuntu/libksba-1.3.5.tar.bz2
309 source-type: tar
310 source-checksum: sha384/7264394452d4ee0da9014949abd5b163d928a1c1216b7008653e04d6090d3cfad2a0a978e7159cee599a319cc5d7f574
311 configflags: [--prefix=/usr]
312 stage:
313 - -usr/share/info
314 npth:
315 plugin: autotools
316 # from https://gnupg.org/ftp/gcrypt/npth/npth-1.5.tar.bz2
317 source: https://people.canonical.com/~rbasak/git-ubuntu/npth-1.5.tar.bz2
318 source-type: tar
319 source-checksum: sha384/48533ecf32da9b02a0f627c074479c211b75ee2bc005aa75157ea9e119e6ede38fe7dadfc0f64eb5b937edfec033a8bc
320 configflags: [--prefix=/usr]
321 stage:
322 - -usr/share/info
323 gnupg2:
324 plugin: autotools
325 # from https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.4.tar.bz2
326 source: https://people.canonical.com/~rbasak/git-ubuntu/gnupg-2.2.4.tar.bz2
327 source-type: tar
328 source-checksum: sha384/94926c62260c2a9552015ca155935a61578b1f3b06d3dbf080414007b95ceb2008bf0f86f69e0ea22996d27974befd9c
329 configflags:
330 - --prefix=/usr
331 - --enable-gpg2-is-gpg
332 after:
333 - libgpg-error
334 - libgcrypt
335 - libassuan
336 - libksba
337 - npth
338 stage:
339 - -usr/share/info
340 devscripts:
341 plugin: nil
342 stage-packages:
343 - devscripts
344 stage:
345 - -usr/share/perl5/Dpkg*
346 - -usr/bin/dpkg*
347 - -usr/share/dpkg
348 - -usr/bin/py*
349 - -usr/bin/2to3*
350 - -usr/share/*python*
351 - -usr/lib/python3.5
352 - -usr/lib/python3.6
353 - -usr/bin/lzmainfo
354 - -usr/bin/xz
355 - -usr/bin/xzdiff
356 - -usr/bin/xzgrep
357 - -usr/bin/xzless
358 - -usr/bin/xzmore
359 after: [gnupg2]
360 git-ubuntu:
361 plugin: python
362 python-version: python3
363 source: .
364 build-packages:
365 - libsystemd-dev
366 stage-packages:
367 - bash
368 - fakeroot
369 - libffi-dev
370 - libssl-dev
371 - libgit2-dev
372 - libssh2-1-dev
373 - libzmq3-dev
374 - sendmail-bin
375 - quilt
376 - man-db
377 - pbzip2
378 - bzip2
379 - python3-systemd
380 stage:
381 - -usr/bin/py*
382 - -usr/bin/2to3*
383 - -usr/share/*python*
384 - -lib/python3.6/site-packages/oauth*
385 - -lib/python3.6/site-packages/launchpadlib*
386 - -lib/python3.6/site-packages/lazr/restfulclient*
387 - -usr/lib/python3.6
388 - -usr/bin/gpg-error*
389 - -usr/share/aclocal/gpg-error.m4
390 - -usr/lib/*/*gpg-error*
391 - -lib/*/*gpg-error*
392 - -usr/bin/dumpsexp
393 - -usr/bin/hmac256
394 - -usr/bin/libgcrypt-config
395 - -usr/lib/*/*libgcrypt*
396 - -lib/*/*libcrypt*
397 - -usr/bin/mpicalc
398 - -usr/include/gcrypt.h
399 - -usr/share/aclocal/libgcrypt.m4
400 - -lib/python3.6/site-packages/cryptography/hazmat/bindings/_constant_time.abi3.so
401 - -lib/python3.6/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
402 - -lib/python3.6/site-packages/cryptography/hazmat/bindings/_padding.abi3.so
403 prime:
404 - -usr/share/doc
405 install: |
406 # Make $SNAP/etc/pylintrc available to git-ubuntu.self-test
407 cp ../../../.pylintrc $SNAPCRAFT_PART_INSTALL/etc/pylintrc
40830
409 cp $SNAPCRAFT_PART_INSTALL/usr/bin/fakeroot-sysv $SNAPCRAFT_PART_INSTALL/usr/bin/fakeroot31parts:
410 after:32 git-ubuntu:
411 - gbp33 plugin: nil
412 - pristine-tar34 override-prime: |
413 - distro-info35 snapcraftctl prime
414 - ubuntutools-python236 ln -s mawk usr/bin/awk
415 - ubuntutools-python337 stage:
416 - python338 # Remove etc/rmt due to:
417 - devscripts39 # The store was unable to accept this snap.
418 - launchpadlib40 # - package contains external symlinks: etc/rmt
419 wrappers:41 - -etc/rmt
420 source: snap-wrappers/42 stage-packages:
421 plugin: dump43 - git-ubuntu
422 organize:44 - debian-keyring
423 wrappers/gbp: usr/local/bin/gbp45 - git
424 wrappers/quilt: usr/local/bin/quilt46 - git-buildpackage
425 wrappers/awk: usr/local/bin/awk47 - pristine-tar
426 wrappers/ssh: usr/local/bin/ssh48 - pylint
427 manpages:49 - quilt
428 source: man/50 - ubuntu-keyring
429 plugin: dump51 - libpython3-stdlib
430 organize:52 - libpython3.8-stdlib
431 man1: usr/share/man/man153 - libpython3.8-minimal
432 completion:54 - python3-pip
433 source: doc/55 - python3-setuptools
434 plugin: dump56 - python3-wheel
435 organize:57 - python3-venv
436 gitubuntu-completion.sh: etc/bash_completion.d/git-ubuntu58 - python3-minimal
437 scripts:59 - python3-distutils
438 source: bin/60 - python3-pkg-resources
439 plugin: dump61 - python3.8-minimal
440 organize:62 - python3-six
441 git-reconstruct-changelog: bin/git-reconstruct-changelog63 - python3-chardet
442 git-merge-changelogs: bin/git-merge-changelogs64 - python3-oauthlib
443 import-source-packages.py: bin/import-source-packages.py65 - python3-cffi-backend
444 source-package-walker.py: bin/source-package-walker.py66 - python3-attr
445 update-repository-alias.py: bin/update-repository-alias.py67 - python3-more-itertools
446 # Short-term workaround for the archive keyrings in older releases68 - python3-testresources
447 # not being updated. Once the keyring packages are SRU'd, this can be69 - grep
448 # dropped. LP: #175265670 - coreutils
449 debian-archive-keyring:71 - gzip
450 plugin: dump72 - tar
451 source: https://launchpad.net/ubuntu/+source/debian-archive-keyring/2019.1ubuntu2/+build/17235516/+files/debian-archive-keyring_2019.1ubuntu2_all.deb73 - sed
452 source-type: deb74 - bash
453 source-checksum: sha384/907e9ef7db90fdc456906ef4ac52f9e92b36f9528c8c1968ab63a5f0e87ea6bdfbebda66df84ca5265c56a55c68cd78c75 - util-linux
454 ubuntu-keyring:76 - awk
455 plugin: dump77 - mawk
456 source: https://launchpad.net/ubuntu/+source/ubuntu-keyring/2018.09.18.1/+build/15467225/+files/ubuntu-keyring_2018.09.18.1_all.deb78 - findutils
457 source-type: deb79 - dpkg
458 source-checksum: sha384/7dc92ccfeb9bb7fc8e0dfa80b96f9706438fd148683f6df092ba6f1a926aceb0e2aeb0e019625683d84022ba1413e5a480 - dpkg-dev
81 - gpgv
82 wrappers:
83 source: snap-wrappers/
84 plugin: dump
85 organize:
86 wrappers/ssh: usr/local/bin/ssh
87 wrappers/gbp: usr/local/bin/gbp
88 wrappers/quilt: usr/local/bin/quilt

Subscribers

People subscribed via source and target branches