diff -Nru lintian-brush-0.59ubuntu1/debian/changelog lintian-brush-0.60ubuntu1/debian/changelog --- lintian-brush-0.59ubuntu1/debian/changelog 2020-03-08 07:51:40.000000000 +0000 +++ lintian-brush-0.60ubuntu1/debian/changelog 2020-04-06 13:42:19.000000000 +0000 @@ -1,3 +1,30 @@ +lintian-brush (0.60ubuntu1) focal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Skip a test, dch -i is different than on Debian. + + -- Gianfranco Costamagna Mon, 06 Apr 2020 15:42:19 +0200 + +lintian-brush (0.60) unstable; urgency=medium + + * missing-build-dependency-for-dh_-command: Don't break on empty + lines. Closes: #953392 + * Fix bug in detection of secure versions of Vcs-* URLs. Closes: + #954034 + * Fix a corner case removing items from --with arguments. + * In verbose mode, report when the fixer script made changes but they + were not high enough certainty. + * debian/watch: Strip leading spaces in version > 3. + * Add gitlab.labs.nic.cz to list of GitLab hosting sites. + * missing-build-dependency-for-dh_-command: Don't add unnecessary + build deps. + * List git.openstack.org as known hosting site. + * Scan debian/rules for hints of upstream repository URL. + * Support finding upstream KDE repositories. + * Some improvements to creating of watch files from GitHub projects. + + -- Jelmer Vernooij Sat, 04 Apr 2020 17:11:01 +0000 + lintian-brush (0.59ubuntu1) focal; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru lintian-brush-0.59ubuntu1/fixers/debian-control-has-obsolete-dbg-package.py lintian-brush-0.60ubuntu1/fixers/debian-control-has-obsolete-dbg-package.py --- lintian-brush-0.59ubuntu1/fixers/debian-control-has-obsolete-dbg-package.py 2020-03-07 21:15:11.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/debian-control-has-obsolete-dbg-package.py 2020-04-04 17:11:01.000000000 +0000 @@ -3,7 +3,7 @@ import sys from lintian_brush.control import ( ensure_minimum_debhelper_version, - update_control, + ControlUpdater, ) from lintian_brush.rules import ( check_cdbs, @@ -13,33 +13,28 @@ minimum_version = "9.20160114" -def bump_debhelper(control): - control["Build-Depends"] = ensure_minimum_debhelper_version( - control.get("Build-Depends", ""), minimum_version) - - dbg_packages = set() dbg_migration_done = set() -def del_dbg(control): - # Delete the freeradius-dbg package from debian/control - package = control["Package"] - if package.endswith('-dbg'): - if package.startswith('python'): - # -dbgsym packages don't include _d.so files for the python - # interpreter - return - dbg_packages.add(control["Package"]) - control.clear() - - -update_control(binary_package_cb=del_dbg) -if not dbg_packages: - # no debug packages found to remove - sys.exit(0) +with ControlUpdater() as updater: + for control in updater.binaries: + # Delete the freeradius-dbg package from debian/control + package = control["Package"] + if package.endswith('-dbg'): + if package.startswith('python'): + # -dbgsym packages don't include _d.so files for the python + # interpreter + continue + dbg_packages.add(control["Package"]) + control.clear() + + if not dbg_packages: + # no debug packages found to remove + sys.exit(0) -update_control(source_package_cb=bump_debhelper) + updater.source["Build-Depends"] = ensure_minimum_debhelper_version( + updater.source.get("Build-Depends", ""), minimum_version) current_version = os.environ["CURRENT_VERSION"] diff -Nru lintian-brush-0.59ubuntu1/fixers/debian-watch-file-is-missing.py lintian-brush-0.60ubuntu1/fixers/debian-watch-file-is-missing.py --- lintian-brush-0.59ubuntu1/fixers/debian-watch-file-is-missing.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/debian-watch-file-is-missing.py 2020-04-04 17:11:01.000000000 +0000 @@ -6,7 +6,11 @@ import sys from urllib.request import urlopen, Request -from lintian_brush import USER_AGENT, DEFAULT_URLLIB_TIMEOUT +from lintian_brush import ( + USER_AGENT, + DEFAULT_URLLIB_TIMEOUT, + certainty_to_confidence, + ) from lintian_brush.fixer import net_access_allowed from lintian_brush.watch import WatchFile, Watch @@ -15,13 +19,10 @@ # Nothing to do here.. sys.exit(0) +candidates = [] -certainty = 'possible' - -watch_contents = None -site = None -wf = WatchFile() if os.path.exists('setup.py'): + certainty = 'likely' try: lines = subprocess.check_output( ['python3', 'setup.py', '--name', '--version']).splitlines() @@ -61,19 +62,22 @@ 'project': project, 'fname_regex': filename_regex}) # TODO(jelmer): Add pgpsigurlmangle if has_sig==True w = Watch(url, opts=opts) - wf.entries.append(w) - site = "pypi" + candidates.append((w, 'pypi', certainty)) def guess_github_watch_entry(parsed_url, upstream_version): from breezy.branch import Branch import re if not net_access_allowed(): - return None + return None, None branch = Branch.open(code['Repository']) tags = branch.tags.get_tag_dict() POSSIBLE_PATTERNS = [r"v(\d\S+)", r"(\d\S+)"] version_pattern = None + # TODO(jelmer): Maybe use releases API instead? + # TODO(jelmer): Automatically added mangling for + # e.g. rc and beta + uversionmangle = [] for name in sorted(tags, reverse=True): for pattern in POSSIBLE_PATTERNS: m = re.match(pattern, name) @@ -85,54 +89,70 @@ if version_pattern: break else: - return None + return None, None (username, project) = parsed_url.path.strip('/').split('/') + if project.endswith('.git'): + project = project[:-4] download_url = 'https://github.com/%(user)s/%(project)s/tags' % { 'user': username, 'project': project} - matching_pattern = r'.*/%s\.tar\.gz' % version_pattern + matching_pattern = r'.*\/%s\.tar\.gz' % version_pattern opts = [] opts.append( r'filenamemangle=s/%(pattern)s/%(project)s-$1\.tar\.gz/' % { 'pattern': matching_pattern, 'project': project}) + if uversionmangle: + opts.append(r'uversionmangle=' + ';'.join(uversionmangle)) # TODO(jelmer): Check for GPG # opts.append( # r'pgpsigurlmangle=' # r's/archive\/%s\.tar\.gz/releases\/download\/$1\/$1\.tar\.gz\.asc/' % # version_pattern) - return Watch(download_url, matching_pattern, opts=opts) + return Watch(download_url, matching_pattern, opts=opts), 'certain' + + +try: + with open('debian/upstream/metadata', 'r') as f: + inp = f.read() +except FileNotFoundError: + pass +else: + import ruamel.yaml + code = ruamel.yaml.round_trip_load(inp, preserve_quotes=True) + from urllib.parse import urlparse + from debian.changelog import Version -if not wf.entries: try: - with open('debian/upstream/metadata', 'r') as f: - inp = f.read() - except FileNotFoundError: + parsed_url = urlparse(code['Repository']) + except KeyError: pass else: - import ruamel.yaml - code = ruamel.yaml.round_trip_load(inp, preserve_quotes=True) + upstream_version = Version( + os.environ['CURRENT_VERSION']).upstream_version + if parsed_url.hostname == 'github.com': + w, certainty = guess_github_watch_entry( + parsed_url, upstream_version) + if w: + candidates.append((w, 'github', certainty)) - from urllib.parse import urlparse - from debian.changelog import Version - try: - parsed_url = urlparse(code['Repository']) - except KeyError: - pass - else: - upstream_version = Version( - os.environ['CURRENT_VERSION']).upstream_version - if parsed_url.hostname == 'github.com': - w = guess_github_watch_entry(parsed_url, upstream_version) - if w: - site = 'github' - wf.entries.append(w) +if not candidates: + sys.exit(0) +winner = None +for candidate in candidates: + if winner is not None and ( + certainty_to_confidence(candidate[2]) >= + certainty_to_confidence(winner[2])): + continue + winner = candidate -if not wf.entries: - sys.exit(0) +wf = WatchFile() +(entry, site, certainty) = winner +wf.entries.append(winner[0]) +# TODO(jelmer): Find candidate with highest certainty with open('debian/watch', 'w') as f: wf.dump(f) diff -Nru lintian-brush-0.59ubuntu1/fixers/index.desc lintian-brush-0.60ubuntu1/fixers/index.desc --- lintian-brush-0.59ubuntu1/fixers/index.desc 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/index.desc 2020-04-04 17:11:01.000000000 +0000 @@ -212,6 +212,9 @@ Fix-Script: quilt-series-without-trailing-newline.sh Lintian-Tags: quilt-series-without-trailing-newline +Fix-Script: renamed-tag.py +Lintian-Tags: renamed-tag + Fix-Script: space-in-std-shortname-in-dep5-copyright.py Lintian-Tags: space-in-std-shortname-in-dep5-copyright diff -Nru lintian-brush-0.59ubuntu1/fixers/missing-build-dependency-for-dh_-command.py lintian-brush-0.60ubuntu1/fixers/missing-build-dependency-for-dh_-command.py --- lintian-brush-0.59ubuntu1/fixers/missing-build-dependency-for-dh_-command.py 2020-03-07 21:15:11.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/missing-build-dependency-for-dh_-command.py 2020-04-04 17:11:01.000000000 +0000 @@ -1,6 +1,12 @@ #!/usr/bin/python3 -from lintian_brush.control import update_control, add_dependency, get_relation +from lintian_brush.control import ( + ControlUpdater, + PkgRelation, + parse_relations, + add_dependency, + is_relation_implied, + ) from lintian_brush.lintian_overrides import override_exists from lintian_brush.rules import Makefile, Rule, dh_invoke_get_with import shlex @@ -35,7 +41,7 @@ continue try: executable = shlex.split(command.decode('utf-8', 'replace'))[0] - except ValueError: + except (ValueError, IndexError): continue try: dep = COMMAND_TO_DEP[executable] @@ -66,22 +72,16 @@ fixed_tags = set() -def add_missing_build_deps(source): +with ControlUpdater() as updater: for deps in need: - build_deps = source.get('Build-Depends', '') - for dep in deps.split('|'): - try: - get_relation(build_deps, dep.strip()) - except KeyError: - pass - else: + parsed = PkgRelation.parse(deps) + build_deps = updater.source.get('Build-Depends', '') + for unused1, existing, unused2 in parse_relations(build_deps): + if is_relation_implied(parsed, existing): break else: - source['Build-Depends'] = add_dependency(build_deps, deps) + updater.source['Build-Depends'] = add_dependency(build_deps, deps) fixed_tags.add(tags[deps]) - -update_control(source_package_cb=add_missing_build_deps) - print('Add missing build dependency on dh addon.') print('Fixed-Lintian-Tags: %s' % ', '.join(fixed_tags)) diff -Nru lintian-brush-0.59ubuntu1/fixers/renamed-tag.py lintian-brush-0.60ubuntu1/fixers/renamed-tag.py --- lintian-brush-0.59ubuntu1/fixers/renamed-tag.py 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/renamed-tag.py 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,40 @@ +#!/usr/bin/python3 + +import json +import os + +from lintian_brush.lintian_overrides import ( + update_overrides, + Override, + ) + + +def load_renamed_tags(): + path = os.path.abspath(os.path.join( + os.path.dirname(__file__), '..', 'renamed-tags.json')) + if not os.path.isfile(path): + import pkg_resources + path = pkg_resources.resource_filename( + __name__, 'lintian-brush/renamed-tags.json') + if not os.path.isfile(path): + # Urgh. + path = '/usr/share/lintian-brush/renamed-tags.json' + with open(path, 'rb') as f: + return json.load(f) + + +renames = load_renamed_tags() + + +def rename_override_tags(override): + if override.tag in renames: + return Override( + override.package, override.archlist, override.type, + renames[override.tag], override.info) + return override + + +update_overrides(rename_override_tags) + +print("Update renamed lintian tag names in lintian overrides.") +print("Fixed-Lintian-Tags: renamed-tag") diff -Nru lintian-brush-0.59ubuntu1/fixers/renamed-tag.py.DEBIAN lintian-brush-0.60ubuntu1/fixers/renamed-tag.py.DEBIAN --- lintian-brush-0.59ubuntu1/fixers/renamed-tag.py.DEBIAN 2020-01-31 11:29:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/renamed-tag.py.DEBIAN 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/usr/bin/python3 - -import json -import os - -from lintian_brush.lintian_overrides import ( - update_overrides, - Override, - ) - - -def load_renamed_tags(): - path = os.path.abspath(os.path.join( - os.path.dirname(__file__), '..', 'renamed-tags.json')) - if not os.path.isfile(path): - import pkg_resources - path = pkg_resources.resource_filename( - __name__, 'lintian-brush/renamed-tags.json') - if not os.path.isfile(path): - # Urgh. - path = '/usr/share/lintian-brush/renamed-tags.json' - with open(path, 'rb') as f: - return json.load(f) - - -renames = load_renamed_tags() - - -def rename_override_tags(override): - if override.tag in renames: - return Override( - override.package, override.archlist, override.type, - renames[override.tag], override.info) - return override - - -update_overrides(rename_override_tags) - -print("Update renamed lintian tag names in lintian overrides.") -print("Fixed-Lintian-Tags: renamed-tag") diff -Nru lintian-brush-0.59ubuntu1/fixers/vcs-field-bitrotted.py lintian-brush-0.60ubuntu1/fixers/vcs-field-bitrotted.py --- lintian-brush-0.59ubuntu1/fixers/vcs-field-bitrotted.py 2020-03-07 21:15:11.000000000 +0000 +++ lintian-brush-0.60ubuntu1/fixers/vcs-field-bitrotted.py 2020-04-04 17:11:01.000000000 +0000 @@ -86,7 +86,7 @@ response = urlopen( Request(vcs_url, headers=headers), timeout=DEFAULT_URLLIB_TIMEOUT) - except urllib.error.HTTPError: + except (urllib.error.HTTPError, urllib.error.URLError): pass except socket.timeout: pass diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/control.py lintian-brush-0.60ubuntu1/lintian_brush/control.py --- lintian-brush-0.59ubuntu1/lintian_brush/control.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/control.py 2020-04-04 17:11:01.000000000 +0000 @@ -72,12 +72,19 @@ return 'cdbs' except IsADirectoryError: return 'directory' + try: + with open('debian/rules', 'rb') as f: + for l in f: + if l.startswith(b'debian/control:'): + return 'rules' + except FileNotFoundError: + pass return None def _update_control_template(template_path, path, changes): template_type = guess_template_type(template_path) - if template_type is None: + if template_type is None or template_type == 'rules': raise GeneratedFile(path, template_path) with Deb822Updater(template_path) as updater: updater.apply_changes(changes) @@ -152,6 +159,8 @@ def by_key(ps): ret = {} for p in ps: + if not p: + continue if 'Source' in p: ret[('Source', p['Source'])] = p else: @@ -588,3 +597,55 @@ return None else: return int(str(relation.version[1])) + + +def is_dep_implied(dep, outer): + """Check if one dependency is implied by another. + """ + if dep.name != outer.name: + return False + if not dep.version: + return True + if outer.version == dep.version: + return True + if not outer.version: + return False + if dep.version[0] == '>=': + if outer.version[0] == '>>': + return Version(outer.version[1]) > Version(dep.version[1]) + elif outer.version[0] in ('>=', '='): + return Version(outer.version[1]) >= Version(dep.version[1]) + elif outer.version[0] in ('<<', '<='): + return False + else: + raise AssertionError('unsupported: %s' % outer.version[0]) + elif dep.version[0] == '=': + if outer.version[0] == '=': + return Version(outer.version[1]) == Version(dep.version[1]) + else: + return False + else: + raise AssertionError('unable to handle checks for %s' % dep.version[0]) + + +def is_relation_implied(inner, outer): + """Check if one relation implies another. + + Args: + inner: Inner relation + outer: Outer relation + Return: boolean + """ + if isinstance(inner, str): + inner = PkgRelation.parse(inner) + if isinstance(outer, str): + outer = PkgRelation.parse(outer) + + if inner == outer: + return True + + # "bzr >= 1.3" implied by "bzr >= 1.3 | libc6" + for inner_dep in inner: + if all(is_dep_implied(inner_dep, outer_dep) for outer_dep in outer): + return True + return False diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/__init__.py lintian-brush-0.60ubuntu1/lintian_brush/__init__.py --- lintian-brush-0.59ubuntu1/lintian_brush/__init__.py 2020-03-07 21:15:13.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/__init__.py 2020-04-04 17:11:01.000000000 +0000 @@ -50,7 +50,7 @@ from .reformatting import FormattingUnpreservable -__version__ = (0, 59) +__version__ = (0, 60) version_string = '.'.join(map(str, __version__)) SUPPORTED_CERTAINTIES = ['certain', 'confident', 'likely', 'possible', None] DEFAULT_MINIMUM_CERTAINTY = 'certain' @@ -63,6 +63,14 @@ """Script didn't make any changes.""" +class NotCertainEnough(NoChanges): + """Script made changes but with too low certainty.""" + + def __init__(self, certainty, minimum_certainty): + self.certainty = certainty + self.minimum_certainty = minimum_certainty + + class FixerFailed(Exception): """Base class for fixer script failures.""" @@ -744,7 +752,7 @@ raise if not certainty_sufficient(result.certainty, minimum_certainty): reset_tree(local_tree, dirty_tracker, subpath) - raise NoChanges("Certainty of script's changes not high enough") + raise NotCertainEnough(result.certainty, minimum_certainty) if dirty_tracker: relpaths = dirty_tracker.relpaths() # Sort paths so that directories get added before the files they @@ -928,6 +936,12 @@ if verbose: note('Fixer %r failed to run.', fixer.name) sys.stderr.write(str(e)) + except NotCertainEnough as e: + if verbose: + note('Fixer %r made changes but not high enough ' + 'certainty (was %r, needed %r). (took: %.2fs)', + fixer.name, e.certainty, e.minimum_certainty, + time.time() - start) except NoChanges: if verbose: note('Fixer %r made no changes. (took: %.2fs)', diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/multiarch_hints.py lintian-brush-0.60ubuntu1/lintian_brush/multiarch_hints.py --- lintian-brush-0.59ubuntu1/lintian_brush/multiarch_hints.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/multiarch_hints.py 2020-04-04 17:11:01.000000000 +0000 @@ -336,7 +336,7 @@ note("%s: Not a debian package.", wt.basedir) return 1 else: - for binary, description, certainty in result.changes: + for binary, hint, description, certainty in result.changes: note('%s: %s' % (binary['Package'], description)) diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/rules.py lintian-brush-0.60ubuntu1/lintian_brush/rules.py --- lintian-brush-0.59ubuntu1/lintian_brush/rules.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/rules.py 2020-04-04 17:11:01.000000000 +0000 @@ -407,14 +407,14 @@ line = re.sub( b"([ \t])--with([ =])" + with_argument + b",", b"\\1--with\\2", line) - # It's somewhere in the middle or at the end + # It's somewhere in the middle or the end line = re.sub( - b"([ \t])--with[ =]([^,]+)," + with_argument + b"([ ,])", - b"\\1--with=\\2\\3", line) + b"([ \t])--with([ =])(.+)," + with_argument + b"([ ,])", + b"\\1--with\\2\\3\\4", line) # It's at the end line = re.sub( - b"([ \t])--with[ =](.+)," + with_argument + b"$", - b"\\1--with=\\2", line) + b"([ \t])--with([ =])(.+)," + with_argument + b"$", + b"\\1--with\\2\\3", line) return line diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/tests/test_control.py lintian-brush-0.60ubuntu1/lintian_brush/tests/test_control.py --- lintian-brush-0.59ubuntu1/lintian_brush/tests/test_control.py 2020-03-07 21:15:13.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/tests/test_control.py 2020-04-04 17:11:01.000000000 +0000 @@ -30,6 +30,8 @@ ensure_some_version, get_relation, iter_relations, + is_relation_implied, + is_dep_implied, update_control, PkgRelation, format_relations, @@ -493,3 +495,62 @@ def test_only(self): self.assertEqual('a', delete_from_list('a', 'c')) self.assertEqual('', delete_from_list('a', 'a')) + + +class IsDepImpliedTests(TestCase): + + def parse(self, p): + [dep] = PkgRelation.parse(p) + return dep + + def test_no_version(self): + self.assertTrue( + is_dep_implied(self.parse('bzr'), self.parse('bzr'))) + self.assertTrue( + is_dep_implied(self.parse('bzr'), self.parse('bzr (>= 3)'))) + self.assertTrue( + is_dep_implied(self.parse('bzr'), self.parse('bzr (<< 3)'))) + + def test_wrong_package(self): + self.assertFalse( + is_dep_implied(self.parse('bzr'), self.parse('foo (<< 3)'))) + + def test_version(self): + self.assertFalse( + is_dep_implied(self.parse('bzr (>= 3)'), self.parse('bzr (<< 3)'))) + self.assertTrue( + is_dep_implied(self.parse('bzr (>= 3)'), self.parse('bzr (= 3)'))) + self.assertFalse( + is_dep_implied(self.parse('bzr (= 3)'), self.parse('bzr (>= 3)'))) + self.assertFalse( + is_dep_implied(self.parse('bzr (>= 3)'), self.parse('bzr (>> 3)'))) + self.assertFalse( + is_dep_implied(self.parse('bzr (= 3)'), self.parse('bzr (= 4)'))) + self.assertFalse( + is_dep_implied(self.parse('bzr (>= 3)'), self.parse('bzr (>= 2)'))) + self.assertTrue( + is_dep_implied(self.parse('bzr (>= 3)'), self.parse('bzr (>= 3)'))) + + +class IsRelationImpliedTests(TestCase): + + def test_unrelated(self): + self.assertFalse(is_relation_implied('bzr', 'bar')) + self.assertFalse(is_relation_implied('bzr (= 3)', 'bar')) + self.assertFalse(is_relation_implied('bzr (= 3) | foo', 'bar')) + + def test_too_old(self): + self.assertFalse(is_relation_implied('bzr (= 3)', 'bzr')) + self.assertFalse(is_relation_implied('bzr (= 3)', 'bzr (= 2)')) + self.assertFalse(is_relation_implied('bzr (= 3)', 'bzr (>= 2)')) + + def test_ors(self): + self.assertFalse(is_relation_implied('bzr (= 3)', 'bzr | foo')) + self.assertFalse(is_relation_implied('bzr', 'bzr | foo')) + self.assertTrue(is_relation_implied('bzr | foo', 'bzr | foo')) + + def test_implied(self): + self.assertTrue(is_relation_implied('bzr (= 3)', 'bzr (= 3)')) + self.assertTrue(is_relation_implied('bzr', 'bzr')) + self.assertTrue(is_relation_implied('bzr | foo', 'bzr')) + self.assertFalse(is_relation_implied('bzr (= 3)', 'bzr (>= 3)')) diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/tests/test_rules.py lintian-brush-0.60ubuntu1/lintian_brush/tests/test_rules.py --- lintian-brush-0.59ubuntu1/lintian_brush/tests/test_rules.py 2020-03-07 21:15:13.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/tests/test_rules.py 2020-04-04 17:11:01.000000000 +0000 @@ -244,10 +244,22 @@ b'dh --with=foo', dh_invoke_drop_with(b'dh --with=foo,blah', b'blah')) self.assertEqual( - b'dh $@ --verbose --with=autoreconf,cme-upgrade', + b'dh $@ --verbose --with autoreconf,cme-upgrade', dh_invoke_drop_with( b'dh $@ --verbose --with autoreconf,systemd,cme-upgrade', b'systemd')) + self.assertEqual( + b'dh $@ --with gir,python3,sphinxdoc --without autoreconf ' + b'--buildsystem=cmake', + dh_invoke_drop_with( + b'dh $@ --with gir,python3,sphinxdoc,systemd ' + b'--without autoreconf --buildsystem=cmake', + b'systemd')) + self.assertEqual( + b'dh $@', + dh_invoke_drop_with( + b'dh $@ --with systemd', + b'systemd')) class DhInvokeGetWithsTests(TestCaseWithTransport): diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/tests/test_watch.py lintian-brush-0.60ubuntu1/lintian_brush/tests/test_watch.py --- lintian-brush-0.59ubuntu1/lintian_brush/tests/test_watch.py 2020-03-07 21:15:13.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/tests/test_watch.py 2020-04-04 17:11:01.000000000 +0000 @@ -117,6 +117,30 @@ [Watch('https://samba.org/~jelmer', 'blah-(\\d+).tar.gz', opts=['pgpmode=mangle'])]) + def test_parse_continued_leading_spaces_4(self): + wf = parse_watch_file(StringIO("""\ +version=4 +opts=pgpmode=mangle,\\ + foo=bar https://samba.org/~jelmer blah-(\\d+).tar.gz +""")) + self.assertEqual(4, wf.version) + self.assertEqual( + wf.entries, + [Watch('https://samba.org/~jelmer', + 'blah-(\\d+).tar.gz', opts=['pgpmode=mangle', 'foo=bar'])]) + + def test_parse_continued_leading_spaces_3(self): + wf = parse_watch_file(StringIO("""\ +version=3 +opts=pgpmode=mangle,\\ + foo=bar blah-(\\d+).tar.gz +""")) + self.assertEqual(3, wf.version) + self.assertEqual( + wf.entries, + [Watch('foo=bar', + 'blah-(\\d+).tar.gz', opts=['pgpmode=mangle', ''])]) + def test_pattern_included(self): wf = parse_watch_file(StringIO("""\ version=4 diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/upstream_metadata.py lintian-brush-0.60ubuntu1/lintian_brush/upstream_metadata.py --- lintian-brush-0.59ubuntu1/lintian_brush/upstream_metadata.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/upstream_metadata.py 2020-04-04 17:11:01.000000000 +0000 @@ -20,6 +20,7 @@ import json import os import re +import socket import subprocess import tempfile import urllib.error @@ -35,6 +36,7 @@ certainty_sufficient, certainty_to_confidence, version_string, + min_certainty, ) from lintian_brush.vcs import ( browse_url_from_repo_url, @@ -45,9 +47,11 @@ ) from urllib.request import urlopen, Request +# Pecl is quite slow, so up the timeout a bit. +PECL_URLLIB_TIMEOUT = 8 ADDON_ONLY_FIELDS = ['Archive'] KNOWN_HOSTING_SITES = [ - 'code.launchpad.net', 'github.com', 'launchpad.net'] + 'code.launchpad.net', 'github.com', 'launchpad.net', 'git.openstack.org'] class UpstreamDatum(object): @@ -153,6 +157,10 @@ if parsed_url.netloc == 'download.gnome.org': if len(path_elements) >= 2 and path_elements[0] == 'sources': return 'https://gitlab.gnome.org/GNOME/%s.git' % path_elements[1] + if parsed_url.netloc == 'download.kde.org': + if len(path_elements) >= 2 and path_elements[0] in ( + 'stable', 'unstable'): + return 'https://anongit.kde.org/%s.git' % path_elements[1] if parsed_url.netloc == 'ftp.gnome.org': if (len(path_elements) >= 4 and [ e.lower() for e in path_elements[:3]] == [ @@ -200,8 +208,13 @@ if parsed_url.netloc in KNOWN_HOSTING_SITES: return url # Maybe it's already pointing at a VCS repo? - if net_access and probe_upstream_branch_url(url): + if parsed_url.netloc.startswith('svn.'): + # 'svn' subdomains are often used for hosting SVN repositories. return url + if net_access: + if probe_upstream_branch_url(url): + return url + return None return None @@ -272,6 +285,18 @@ return read_python_pkg_info(td) +def guess_from_debian_rules(path, trust_package): + from .rules import Makefile + mf = Makefile.from_path(path) + try: + upstream_git = mf.get_variable(b'UPSTREAM_GIT') + except KeyError: + pass + else: + yield UpstreamDatum( + "Repository", sanitize_vcs_url(upstream_git.decode()), "certain") + + def guess_from_debian_watch(path, trust_package): from lintian_brush.watch import ( parse_watch_file, @@ -453,16 +478,17 @@ "Contact", ','.join(header.upstream_contact), 'certain') if header.source: if ' 'in header.source: - from_url = re.split('[ ,]', header.source)[0] + from_urls = [u for u in re.split('[ ,\n]', header.source) if u] else: - from_url = header.source - repo_url = guess_repo_from_url(from_url) - if repo_url: - yield UpstreamDatum( - 'Repository', sanitize_vcs_url(repo_url), 'likely') - if (from_url.startswith('https://pecl.php.net/package/') or - from_url.startswith('http://pecl.php.net/package/')): - yield UpstreamDatum('X-Pecl-URL', from_url, 'certain') + from_urls = [header.source] + for from_url in from_urls: + repo_url = guess_repo_from_url(from_url) + if repo_url: + yield UpstreamDatum( + 'Repository', sanitize_vcs_url(repo_url), 'likely') + if (from_url.startswith('https://pecl.php.net/package/') or + from_url.startswith('http://pecl.php.net/package/')): + yield UpstreamDatum('X-Pecl-URL', from_url, 'certain') if "X-Upstream-Bugs" in header: yield UpstreamDatum( "Bug-Database", header["X-Upstream-Bugs"], 'certain') @@ -480,8 +506,9 @@ with open(path, 'rb') as f: lines = list(f.readlines()) for i, line in enumerate(lines): - if line.strip().startswith(b'git clone'): - line = line.strip() + line = line.strip() + if line.strip().lstrip(b'$').strip().startswith(b'git clone'): + line = line.strip().lstrip(b'$').strip() while line.endswith(b'\\'): line += lines[i+1] line = line.strip() @@ -516,6 +543,16 @@ if m: yield UpstreamDatum( 'Repository', line.strip().decode(), 'likely') + m = re.fullmatch(b'git://([^ ]+)', line) + if m: + yield UpstreamDatum( + 'Repository', line.strip().decode(), 'likely') + for m in re.finditer( + b'https://([^/]+)/([^ ]+)', line): + if is_gitlab_site(m.group(1).decode()): + yield UpstreamDatum( + 'Repository', + m.group(0).decode().rstrip(), 'likely') except IsADirectoryError: pass @@ -537,6 +574,10 @@ bug_db = bug_database_from_issue_url(forwarded.decode('utf-8')) if bug_db: yield UpstreamDatum('Bug-Database', bug_db, 'possible') + repo_url = repo_url_from_merge_request_url( + forwarded.decode('utf-8')) + if repo_url: + yield UpstreamDatum('Repository', repo_url, 'possible') def guess_from_meta_json(path, trust_package): @@ -572,7 +613,7 @@ """ import ruamel.yaml import ruamel.yaml.reader - with open(path, 'r') as f: + with open(path, 'rb') as f: try: data = ruamel.yaml.load(f, ruamel.yaml.SafeLoader) except ruamel.yaml.reader.ReaderError as e: @@ -756,6 +797,7 @@ CANDIDATES = [ ('debian/watch', guess_from_debian_watch), ('debian/control', guess_from_debian_control), + ('debian/rules', guess_from_debian_rules), ('setup.py', guess_from_setup_py), ('package.json', guess_from_package_json), ('package.xml', guess_from_package_xml), @@ -780,8 +822,9 @@ readme_filenames = [ n for n in os.listdir(path) - if n.startswith('README') and - os.path.splitext(n)[1] not in ('.html', '.pdf', '.xml')] + if any([n.startswith(p) + for p in ['README', 'HACKING', 'CONTRIBUTING']]) + and os.path.splitext(n)[1] not in ('.html', '.pdf', '.xml')] CANDIDATES.extend([(n, guess_from_readme) for n in readme_filenames]) try: @@ -865,8 +908,27 @@ return False +def _sf_git_extract_url(page): + from bs4 import BeautifulSoup + bs = BeautifulSoup(page, features='lxml') + el = bs.find(id='access_url') + if not el: + return None + value = el.get('value') + if value is None: + return None + access_command = value.split(' ') + if access_command[:2] != ['git', 'clone']: + return None + return access_command[2] + + def guess_from_sf(sf_project): - data = get_sf_metadata(sf_project) + try: + data = get_sf_metadata(sf_project) + except socket.timeout: + warn('timeout contacting launchpad, ignoring: %s' % sf_project) + return if data.get('name'): yield 'Name', data['name'] if data.get('external_homepage'): @@ -885,14 +947,20 @@ if len(vcs_tools) == 1: (kind, url) = vcs_tools[0] if kind == 'git': - url = urljoin('https://git.code.sf.net/', url) + url = urljoin('https://sourceforge.net/', url) + headers = {'User-Agent': USER_AGENT, 'Accept': 'text/html'} + http_contents = urlopen( + Request(url, headers=headers), + timeout=DEFAULT_URLLIB_TIMEOUT).read() + url = _sf_git_extract_url(http_contents) elif kind == 'svn': url = urljoin('https://svn.code.sf.net/', url) elif kind == 'hg': url = urljoin('https://hg.code.sf.net/', url) else: raise KeyError(kind) - yield 'Repository', url + if url is not None: + yield 'Repository', url def extend_from_external_guesser( @@ -958,6 +1026,27 @@ m = re.fullmatch('https?://(.*).(sf|sourceforge).net/?', url) if m: return m.group(1) + m = re.match('https://sourceforge.net/projects/([^/]+)', url) + if m: + return m.group(1) + + +def repo_url_from_merge_request_url(url): + parsed_url = urlparse(url) + if parsed_url.netloc == 'github.com': + path_elements = parsed_url.path.strip('/').split('/') + if len(path_elements) > 2 and path_elements[2] == 'issues': + return urlunparse( + ('https', 'github.com', '/'.join(path_elements[:3]), + None, None, None)) + if is_gitlab_site(parsed_url.netloc): + path_elements = parsed_url.path.strip('/').split('/') + if (len(path_elements) > 2 and + path_elements[-2] == 'merge_requests' and + path_elements[-1].isdigit()): + return urlunparse( + ('https', parsed_url.netloc, '/'.join(path_elements[:-2]), + None, None, None)) def bug_database_from_issue_url(url): @@ -968,6 +1057,14 @@ return urlunparse( ('https', 'github.com', '/'.join(path_elements[:3]), None, None, None)) + if is_gitlab_site(parsed_url.netloc): + path_elements = parsed_url.path.strip('/').split('/') + if (len(path_elements) > 2 and + path_elements[-2] == 'issues' and + path_elements[-1].isdigit()): + return urlunparse( + ('https', parsed_url.netloc, '/'.join(path_elements[:-2]), + None, None, None)) def guess_bug_database_url_from_repo_url(url): @@ -992,6 +1089,33 @@ return None +def bug_database_url_from_bug_submit_url(url): + parsed_url = urlparse(url) + path_elements = parsed_url.path.strip('/').split('/') + if parsed_url.netloc == 'github.com': + if len(path_elements) not in (3, 4): + return None + if path_elements[2] != 'issues': + return None + return urlunparse( + ('https', 'github.com', '/'.join(path_elements[:3]), + None, None, None)) + if parsed_url.netloc == 'bugs.launchpad.net': + if len(path_elements) >= 1: + return urlunparse( + parsed_url._replace(path='/%s' % path_elements[0])) + if is_gitlab_site(parsed_url.netloc): + if len(path_elements) < 2: + return None + if path_elements[-2] != 'issues': + return None + if path_elements[-1] == 'new': + path_elements.pop(-1) + return urlunparse( + parsed_url._replace(path='/'.join(path_elements))) + return None + + def bug_submit_url_from_bug_database_url(url): parsed_url = urlparse(url) path_elements = parsed_url.path.strip('/').split('/') @@ -1061,21 +1185,29 @@ repo = guess_repo_from_url( upstream_metadata['Homepage'].value, net_access=net_access) if repo: - return UpstreamDatum('Repository', repo, 'likely') + return UpstreamDatum( + 'Repository', repo, + min_certainty(['likely', upstream_metadata['Homepage'].certainty])) def _extrapolate_repository_from_download(upstream_metadata, net_access): repo = guess_repo_from_url( upstream_metadata['X-Download'].value, net_access=net_access) if repo: - return UpstreamDatum('Repository', repo, 'likely') + return UpstreamDatum( + 'Repository', repo, + min_certainty( + ['likely', upstream_metadata['X-Download'].certainty])) def _extrapolate_repository_from_bug_db(upstream_metadata, net_access): repo = guess_repo_from_url( upstream_metadata['Bug-Database'].value, net_access=net_access) if repo: - return UpstreamDatum('Repository', repo, 'likely') + return UpstreamDatum( + 'Repository', repo, + min_certainty( + ['likely', upstream_metadata['Bug-Database'].certainty])) def _extrapolate_repository_browse_from_repository( @@ -1104,7 +1236,10 @@ bug_db_url = guess_bug_database_url_from_repo_url( upstream_metadata['Repository'].value) if bug_db_url: - return UpstreamDatum('Bug-Database', bug_db_url, 'likely') + return UpstreamDatum( + 'Bug-Database', bug_db_url, + min_certainty( + ['likely', upstream_metadata['Repository'].certainty])) def _extrapolate_bug_submit_from_bug_db( @@ -1117,6 +1252,16 @@ upstream_metadata['Bug-Database'].certainty) +def _extrapolate_bug_db_from_bug_submit( + upstream_metadata, net_access): + bug_db_url = bug_database_url_from_bug_submit_url( + upstream_metadata['Bug-Submit'].value) + if bug_db_url: + return UpstreamDatum( + 'Bug-Database', bug_db_url, + upstream_metadata['Bug-Submit'].certainty) + + def _copy_bug_db_field(upstream_metadata, net_access): ret = UpstreamDatum( 'Bug-Database', @@ -1138,6 +1283,7 @@ ('Repository', 'Bug-Database', _extrapolate_bug_database_from_repository), ('Bug-Database', 'Bug-Submit', _extrapolate_bug_submit_from_bug_db), + ('Bug-Submit', 'Bug-Database', _extrapolate_bug_db_from_bug_submit), ('X-Download', 'Repository', _extrapolate_repository_from_download), ] @@ -1173,7 +1319,7 @@ pass else: extend_from_lp(upstream_metadata, minimum_certainty, package) - extend_from_aur(upstream_metadata, minimum_certainty, package) + extend_from_aur(upstream_metadata, minimum_certainty, package) pecl_url = upstream_metadata.get('X-Pecl-URL') if net_access and pecl_url: extend_from_pecl(upstream_metadata, pecl_url.value, pecl_url.certainty) @@ -1339,7 +1485,8 @@ url = 'https://pecl.php.net/packages/%s' % php_package.replace('-', '_') data = dict(guess_from_pecl_url(url)) try: - data['Repository'] = guess_repo_from_url(data['Repository-Browse']) + data['Repository'] = guess_repo_from_url( + data['Repository-Browse'], net_access=True) except KeyError: pass return data.items() @@ -1350,11 +1497,14 @@ try: f = urlopen( Request(url, headers=headers), - timeout=DEFAULT_URLLIB_TIMEOUT) + timeout=PECL_URLLIB_TIMEOUT) except urllib.error.HTTPError as e: if e.status != 404: raise return + except socket.timeout: + warn('timeout contacting pecl, ignoring: %s' % url) + return from bs4 import BeautifulSoup bs = BeautifulSoup(f.read(), features='lxml') tag = bs.find('a', text='Browse Source') @@ -1435,6 +1585,9 @@ if e.status != 404: raise return + except socket.timeout: + warn('timeout contacting launchpad, ignoring') + return productseries_url = sourcepackage_data.get('productseries_link') if not productseries_url: diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/vcs.py lintian-brush-0.60ubuntu1/lintian_brush/vcs.py --- lintian-brush-0.59ubuntu1/lintian_brush/vcs.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/vcs.py 2020-04-04 17:11:01.000000000 +0000 @@ -35,6 +35,7 @@ 'salsa.debian.org', 'gitlab.gnome.org', 'gitlab.freedesktop.org', + 'gitlab.labs.nic.cz', ] @@ -383,7 +384,7 @@ if net_access: secure_repo_url = parsed_repo_url._replace(scheme='https') insecure_branch = try_open_branch(repo_url, branch) - secure_branch = try_open_branch(urlunparse(parsed_repo_url), branch) + secure_branch = try_open_branch(urlunparse(secure_repo_url), branch) if secure_branch: if (not insecure_branch or secure_branch.last_revision() == diff -Nru lintian-brush-0.59ubuntu1/lintian_brush/watch.py lintian-brush-0.60ubuntu1/lintian_brush/watch.py --- lintian-brush-0.59ubuntu1/lintian_brush/watch.py 2020-03-07 21:15:12.000000000 +0000 +++ lintian-brush-0.60ubuntu1/lintian_brush/watch.py 2020-04-04 17:11:01.000000000 +0000 @@ -19,6 +19,7 @@ from io import StringIO import re +from warnings import warn from lintian_brush.reformatting import ( Updater, @@ -130,23 +131,25 @@ f: watch file to parse """ lines = [] - continued = '' + continued = [] for line in f: if line.startswith('#'): continue if not line.strip(): continue if line.rstrip('\n').endswith('\\'): - continued += line.rstrip('\n\\') + ' ' + continued.append(line.rstrip('\n\\')) else: - lines.append(continued + line) - continued = '' + continued.append(line) + lines.append(continued) + continued = [] if continued: # Hmm, broken line? - lines.append(continued) + warn('watchfile ended with \\; skipping last line') + lines.append([continued]) if not lines: return None - firstline = lines.pop(0) + firstline = ''.join(lines.pop(0)) try: key, value = firstline.split('=', 1) except ValueError: @@ -156,8 +159,10 @@ version = int(value.strip()) persistent_options = [] entries = [] - for line in lines: - line = line.strip() + for chunked in lines: + if version > 3: + chunked = [chunk.lstrip() for chunk in chunked] + line = ''.join(chunked).strip() if not line: continue if line.startswith('opts='): diff -Nru lintian-brush-0.59ubuntu1/README.md lintian-brush-0.60ubuntu1/README.md --- lintian-brush-0.59ubuntu1/README.md 2020-03-07 21:14:56.000000000 +0000 +++ lintian-brush-0.60ubuntu1/README.md 2020-04-04 17:11:01.000000000 +0000 @@ -115,6 +115,7 @@ * public-upstream-keys-in-multiple-locations * quilt-series-but-no-build-dep * quilt-series-without-trailing-newline +* renamed-tag * space-in-std-shortname-in-dep5-copyright * systemd-service-alias-without-extension * systemd-service-file-pidfile-refers-to-var-run diff -Nru lintian-brush-0.59ubuntu1/setup.py lintian-brush-0.60ubuntu1/setup.py --- lintian-brush-0.59ubuntu1/setup.py 2020-03-07 21:14:56.000000000 +0000 +++ lintian-brush-0.60ubuntu1/setup.py 2020-04-04 17:11:01.000000000 +0000 @@ -20,7 +20,7 @@ setup( name="lintian-brush", - version="0.59", + version="0.60", author="Jelmer Vernooij", author_email="jelmer@debian.org", packages=["lintian_brush"], diff -Nru lintian-brush-0.59ubuntu1/tests/debian-watch-file-is-missing/simple/message lintian-brush-0.60ubuntu1/tests/debian-watch-file-is-missing/simple/message --- lintian-brush-0.59ubuntu1/tests/debian-watch-file-is-missing/simple/message 2020-03-07 21:15:05.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/debian-watch-file-is-missing/simple/message 2020-04-04 17:11:01.000000000 +0000 @@ -1,3 +1,3 @@ Add debian/watch file, using pypi. -Certainty: possible +Certainty: likely Fixed-Lintian-Tags: debian-watch-file-is-missing diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/control lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/control --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/control 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,6 @@ +Source: blah +Build-Depends: libc6-dev, debhelper-compat (= 11) + +Package: python3-blah +Description: blah blah + blah diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/in/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,4 @@ +#!/usr/bin/make + +%: + dh $@ --with autoreconf diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/control lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/control --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/control 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,6 @@ +Source: blah +Build-Depends: libc6-dev, debhelper-compat (= 11) + +Package: python3-blah +Description: blah blah + blah diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists2/out/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,4 @@ +#!/usr/bin/make + +%: + dh $@ --with autoreconf diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/control lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/control --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/control 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,6 @@ +Source: blah +Build-Depends: libc6-dev, debhelper (>= 11) + +Package: python3-blah +Description: blah blah + blah diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/in/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,4 @@ +#!/usr/bin/make + +%: + dh $@ --with autoreconf diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/control lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/control --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/control 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,6 @@ +Source: blah +Build-Depends: libc6-dev, debhelper (>= 11) + +Package: python3-blah +Description: blah blah + blah diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/exists3/out/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,4 @@ +#!/usr/bin/make + +%: + dh $@ --with autoreconf diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/in/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/in/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/in/debian/rules 2020-03-07 21:15:06.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/in/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -4,4 +4,7 @@ dh $@ override_dh_build: + # The next line is empty + + dh_python3 diff -Nru lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/out/debian/rules lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/out/debian/rules --- lintian-brush-0.59ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/out/debian/rules 2020-03-07 21:15:06.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/missing-build-dependency-for-dh_-command/simple/out/debian/rules 2020-04-04 17:11:01.000000000 +0000 @@ -4,4 +4,7 @@ dh $@ override_dh_build: + # The next line is empty + + dh_python3 diff -Nru lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/in/debian/source/lintian-overrides lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/in/debian/source/lintian-overrides --- lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/in/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/in/debian/source/lintian-overrides 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,25 @@ +# This is a comment, and the next line is empty + +# The next line should be unaffected: +foo source: some-tag another exact match +foo source: some-tag wildcard * match + +# This is an example override that only applies to the i386 +# architecture. +foo [i386] binary: some-tag optional-extra + +# An architecture wildcard would look like: +foo [any-i386] binary: another-tag optional-extra + +# Negation also works +foo [!amd64 !i386] binary: some-random-tag optional-extra + +# Negation even works for wildcards +foo [!any-i386] binary: some-tag-not-for-i386 optional-extra + +# The package name and the package type is optional, so this +# also works +[linux-any]: tag-only-for-linux optional-extra. + +# This line will be rewritten: +debian-watch-may-check-gpg-signature diff -Nru lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/message lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/message --- lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/message 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/message 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,2 @@ +Update renamed lintian tag names in lintian overrides. +Fixed-Lintian-Tags: renamed-tag diff -Nru lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/out/debian/source/lintian-overrides lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/out/debian/source/lintian-overrides --- lintian-brush-0.59ubuntu1/tests/renamed-tag/simple/out/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ lintian-brush-0.60ubuntu1/tests/renamed-tag/simple/out/debian/source/lintian-overrides 2020-04-04 17:11:01.000000000 +0000 @@ -0,0 +1,25 @@ +# This is a comment, and the next line is empty + +# The next line should be unaffected: +foo source: some-tag another exact match +foo source: some-tag wildcard * match + +# This is an example override that only applies to the i386 +# architecture. +foo [i386] binary: some-tag optional-extra + +# An architecture wildcard would look like: +foo [any-i386] binary: another-tag optional-extra + +# Negation also works +foo [!amd64 !i386] binary: some-random-tag optional-extra + +# Negation even works for wildcards +foo [!any-i386] binary: some-tag-not-for-i386 optional-extra + +# The package name and the package type is optional, so this +# also works +[linux-any]: tag-only-for-linux optional-extra. + +# This line will be rewritten: +debian-watch-does-not-check-gpg-signature