diff options
| author | Ben Finney <bignose@debian.org> | 2022-11-23 16:34:25 +1100 |
|---|---|---|
| committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2022-11-23 10:33:04 +0000 |
| commit | c7be863456b246306e88da3f48d455102cb30584 (patch) | |
| tree | 2065df2d18b4459fef0ab8aa9c2649d46e7aa25e | |
| parent | 3716e34937f6e1d8de0ebe8ec7320f2bb741246c (diff) | |
| parent | 4897d8875246100b0b2199bb5548886c18cdc10f (diff) | |
0.4.2-2 (patches applied)applied/0.4.2-2applied/ubuntu/lunar-proposedapplied/ubuntu/lunar-develapplied/ubuntu/lunarapplied/debian/bookworm
Imported using git-ubuntu import.
| -rw-r--r-- | debian/.editorconfig | 4 | ||||
| -rw-r--r-- | debian/README.source | 117 | ||||
| -rw-r--r-- | debian/changelog | 18 | ||||
| -rw-r--r-- | debian/control | 7 | ||||
| -rw-r--r-- | debian/copyright | 2 | ||||
| -rwxr-xr-x | debian/rules | 2 | ||||
| -rw-r--r-- | debian/source/lintian-overrides | 15 | ||||
| -rw-r--r-- | debian/tests/control | 19 | ||||
| -rwxr-xr-x | debian/tests/smoke-python3 | 5 | ||||
| -rw-r--r-- | debian/tests/smoke_test.py | 54 | ||||
| -rw-r--r-- | debian/upstream/metadata | 3 |
11 files changed, 185 insertions, 61 deletions
diff --git a/debian/.editorconfig b/debian/.editorconfig index 61c0ee1..29b7cd0 100644 --- a/debian/.editorconfig +++ b/debian/.editorconfig @@ -34,10 +34,12 @@ insert_final_newline = true [{*.mk,Makefile,rules}] - indent_style = tab +[*.patch] +trim_trailing_whitespace = false + # Local variables: # coding: utf-8 diff --git a/debian/README.source b/debian/README.source index 77405a3..ccb3b68 100644 --- a/debian/README.source +++ b/debian/README.source @@ -2,44 +2,109 @@ Debian source package for ‘python-jsonext’ ========================================== -Build source package from VCS -============================= +:Author: Ben Finney <bignose@debian.org> +:Updated: 2022-11-23 -The source for the Debian packaging is managed in the ‘master’ branch -of the Git repository. -To build the source package from the Git VCS: +Package maintenance in VCS +========================== -* Get the upstream source:: +The source for the Debian packaging is managed in the ‘main’ branch of the +Git repository. - $ uscan --download-debversion - Ensure the upstream source is placed where Git-BuildPackage will - find it for building the Debian source package. +Work on a release in VCS +------------------------ -* Finalise the latest release in the Debian changelog:: +* Get the correct upstream source, using UScan:: - $ debchange --release "" + $ uscan --download - This is needed temporarily to build the source package with Debian - packaging tools. +* In the ‘main’ branch, create a new Debian changelog entry. - While developing the package, do not commit to the VCS any Debian - changelog that has any content in the release trailer for the latest - entry. + Because the release is not complete, many aspects have not been decided and + should not be recorded in the VCS: - Until that release is ready to finalise, it has not been uploaded to - Debian and so does not have a correct distribution, uploader, or - release timestamp. The header and trailer for the entry should - remain open during development to reflect this. + * The target destination (in the header) is “UNRELEASED”. -* Build the source package with Git-BuildPackage:: + * The person and timestamp of the release is undecided, so should be empty: + the signature line should have no content, just the “ --” leader. - $ gbp buildpackage +* While working on the package, temporarily finalise the signature line for + testing the build. - Git-BuildPackage is configured (via the ‘debian/gbp.conf’ file) to - build the source package by overlaying the Debian packaging files - onto the upstream source. + This ephemeral state should not be part of the VCS history, though, so do not + commit that finalised changelog entry; revert it to the above state to + continue development. - -- Ben Finney <bignose@debian.org>, Wed, 9 May 2018 10:03:49 +1000 +Build the source package from VCS +--------------------------------- + +* Ensure the ‘main’ branch contains all the changes that are intended for the + release to Debian. + +* Until the work is ready for release, do not commit a finalised Debian + changelog entry. The changelog entry should be in the state described in + “Work on a release in VCS”, above. + + This correctly leaves the decision of which destination for the upload, who + uploads and when, to the point in time where that decision is made: the time + of finalising the release. + +* Rebase a working branch, e.g. ‘wip/release/0.4.2-1’, from the HEAD of + ‘main’. + +* In this branch, finalise the ‘debian/changelog’: + + * Declare a release name, e.g. “* The “Ananta Bijoy Das” release.” + + * Set the target distribution, e.g. “unstable”. + + * Set the signature line containing the correct person and timestamp, + e.g. “Ben Finney <bignose@debian.org> Tue, 09 Aug 2016 06:05:28 +1000”. + + * Commit the finalised changelog with a commit message of the form + “Finalise release “0.4.2-1”.” + +* Test the source package: + + * Export the source package:: + + $ gbp buildpackage -S + + * Test the source package by building it in a SBuild or PBuilder + environment, with all Lintian checks enabled. + +* Only when the package builds satisfactorily from the source package: + + * Switch to the ‘main’ branch. + + * Pull the work-in-progress branch ‘wip/release/0.4.2-1’ to ‘main’. + + * Create and sign a tag for the release, ‘release/0.4.2-1’ with + the commit message “Debian release “0.4.2-1.”:: + + $ git tag --sign \ + --message "Debian release “0.4.2-1”." \ + "release/0.4.2-1" + +* Upload the successfully-built source package to Debian. + +* Prepare the ‘main’ branch for ongoing work: + + * Delete the work-in-progress branch ‘wip/release/0.4.2-1’. + + * Optionally: Create a new work-in-progress for an upcoming release, + as described in “Work on a release in VCS”, above. + + +.. + Local variables: + coding: utf-8 + mode: rst + mode: text + End: + vim: fileencoding=utf-8 filetype=rst : + + -- Ben Finney <bignose@debian.org>, Wed, 23 Nov 2022 16:11:40 +1100 diff --git a/debian/changelog b/debian/changelog index 9d6f418..1b4d9b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +python-jsonext (0.4.2-2) unstable; urgency=medium + + * Acknowledge non-maintainer upload “0.4.2-1.1”. + * Declare conformance to “Standards-Version: 4.6.1”. + No additional changes required. + * Declare Debhelper compatibility level 13. + * Rename default Git branch in official repository, to ‘main’. + * Update package source documentation for standard packaging tools. + * Specify the package build system does not require root privilege. + * Use current Homepage value for the upstream project. + * Remove obsolete field from DEP-12 metadata. + * Use only supported Python versions in the AutoPkgTest. + Closes: bug#954477. Thanks to Scott Kitterman for the report. + * Override false positive Lintian check for VCS-* field names. + * Explicitly mark a superficial AutoPkgTest case. + + -- Ben Finney <bignose@debian.org> Wed, 23 Nov 2022 16:34:25 +1100 + python-jsonext (0.4.2-1.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/control b/debian/control index 0aef4a8..dca71fc 100644 --- a/debian/control +++ b/debian/control @@ -9,11 +9,12 @@ Build-Depends: python3-setuptools, python3-all, dh-python, - debhelper-compat (= 12) -Standards-Version: 4.4.1 -Homepage: https://pypi.org/project/jsonext/ + debhelper-compat (= 13) +Standards-Version: 4.6.1 +Homepage: https://github.com/mbr/jsonext VCS-Git: https://salsa.debian.org/bignose/pkg-python-jsonext.git VCS-Browser: https://salsa.debian.org/bignose/pkg-python-jsonext/ +Rules-Requires-Root: no Package: python3-jsonext Architecture: all diff --git a/debian/copyright b/debian/copyright index 58d68fc..4d2d181 100644 --- a/debian/copyright +++ b/debian/copyright @@ -10,7 +10,7 @@ License: Expat Files: debian/* Copyright: - © 2009–2019 Ben Finney <bignose@debian.org> + © 2009–2022 Ben Finney <bignose@debian.org> License: GPL-3+ License-Grant: This is free software: you may copy, modify, and/or distribute this work diff --git a/debian/rules b/debian/rules index 263011b..cf1dceb 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,7 @@ override_dh_auto_clean: $(RM) -r ${GENERATED_FILES} -# Copyright © 2009–2019 Ben Finney <bignose@debian.org> +# Copyright © 2009–2022 Ben Finney <bignose@debian.org> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..660852d --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,15 @@ +# debian/source/lintian-overrides +# Overrides for Lintian checks of this source package. +# Documentation: ‘/usr/share/doc/lintian/lintian’ §2.4. + +# “VCS” is the canonical spelling of that initialism. +# Lintian should ignore case of control field names. Debian bug#1010241. +cute-field VCS-Browser vs Vcs-Browser [debian/control:*] +cute-field VCS-Git vs Vcs-Git [debian/control:*] + + +# Local variables: +# coding: utf-8 +# mode: conf-space +# End: +# vim: fileencoding=utf-8 filetype=conf : diff --git a/debian/tests/control b/debian/tests/control index 42389c5..b82ff66 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,16 +1,29 @@ # debian/tests/control # Control file for Debian ‘autopkgtests’. # Documentation: ‘/usr/share/doc/autopkgtest/README.package-tests.rst.gz’. +# +# This is free software, and you are welcome to redistribute it under +# certain conditions; see the end of this file for copyright +# information, grant of license, and disclaimer of warranty. Tests: smoke-python3 +Restrictions: + superficial Depends: python3-pkg-resources, - python3-jsonext, - python3-all + python3-all, + @ + + +# Copyright © 2016–2022 Ben Finney <bignose@debian.org> +# This is free software: you may copy, modify, and/or distribute this work +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; version 3 of that license or any later version. +# No warranty expressed or implied. # Local variables: # coding: utf-8 -# mode: conf +# mode: conf-space # End: # vim: fileencoding=utf-8 filetype=conf : diff --git a/debian/tests/smoke-python3 b/debian/tests/smoke-python3 index 9f89df6..ac5b3a2 100755 --- a/debian/tests/smoke-python3 +++ b/debian/tests/smoke-python3 @@ -24,21 +24,20 @@ for mod in ${MODULE_NAMES[@]} ; do test_opts="$test_opts --module=$mod" done -for py in $(py3versions -s) ; do +for py in $(py3versions --supported) ; do printf "Python command: %s\n" $py $py debian/tests/smoke_test.py $test_opts printf "\n" done -# Copyright © 2016–2019 Ben Finney <bignose@debian.org> +# Copyright © 2016–2022 Ben Finney <bignose@debian.org> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. # No warranty expressed or implied. - # Local variables: # coding: utf-8 # mode: shell-script diff --git a/debian/tests/smoke_test.py b/debian/tests/smoke_test.py index dc221dd..5c928da 100644 --- a/debian/tests/smoke_test.py +++ b/debian/tests/smoke_test.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # debian/tests/smoke_test.py # # This is free software, and you are welcome to redistribute it under @@ -8,8 +6,7 @@ """ Post-install Python smoke test for use in Debian autopkgtest. - Written for both Python 2 and Python 3, to test all installed - versions of a package. + Written to test all installed versions of a package. Smoke test the distribution:: --distribution=DISTRIBUTION @@ -18,9 +15,12 @@ --module=MODULE_FOO --module=MODULE_BAR --module=MODULE_BAZ """ -import sys import argparse import importlib +import importlib.metadata +import sys +import textwrap + import pkg_resources @@ -29,21 +29,23 @@ def emit_implementation(): :return: ``None``. """ - sys.stdout.write( - "Interpreter: {command}\n{version}\n".format( - command=sys.executable, version=sys.version)) + sys.stdout.write(textwrap.dedent("""\ + Interpreter: {command} + \t{version} + """).format(command=sys.executable, version=sys.version)) -def emit_distribution(name): - """ Get the distribution `name` and emit its representation. +def emit_distribution_metadata(name): + """ Get the distribution `name` and emit some metadata. :param name: Name of the distribution to retrieve. :return: ``None``. """ - distribution = pkg_resources.get_distribution(name) - sys.stdout.write( - "Distribution ‘{name}’:\n\t{distribution!r}\n".format( - name=name, distribution=distribution)) + metadata = importlib.metadata.metadata(name) + sys.stdout.write(textwrap.dedent("""\ + Distribution ‘{name}’: + \t{metadata[Name]} {metadata[Version]} + """).format(name=name, metadata=metadata)) def emit_module(name): @@ -53,9 +55,10 @@ def emit_module(name): :return: ``None``. """ module = importlib.import_module(name) - sys.stdout.write( - "Package ‘{name}’:\n\t{module!r}\n".format( - name=name, module=module)) + sys.stdout.write(textwrap.dedent("""\ + Package ‘{name}’: + \t{module!r} + """).format(name=name, module=module)) def suite(args): @@ -67,10 +70,11 @@ def suite(args): emit_implementation() if args.distribution_name: - emit_distribution(args.distribution_name) + emit_distribution_metadata(args.distribution_name) - for module_name in args.module_names: - emit_module(module_name) + if args.module_names: + for module_name in args.module_names: + emit_module(module_name) class SmokeTestArgumentParser(argparse.ArgumentParser): @@ -90,6 +94,14 @@ class SmokeTestArgumentParser(argparse.ArgumentParser): metavar="MODULE", help=( "Test the Python module named MODULE.")) + def parse_args(self, *args, **kwargs): + args = super().parse_args(*args, **kwargs) + + if (not any([args.distribution_name, args.module_names])): + self.error("one of DISTRIBUTION or MODULE is required") + + return args + def main(argv=None): """ Mainline code for this module. @@ -121,7 +133,7 @@ if __name__ == "__main__": sys.exit(exit_status) -# Copyright © 2016–2019 Ben Finney <bignose@debian.org> +# Copyright © 2016–2022 Ben Finney <bignose@debian.org> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 702b4e6..602284d 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -9,7 +9,6 @@ --- # <URL:https://wiki.debian.org/UpstreamMetadata> Name: jsonext -Homepage: https://github.com/mbr/jsonext Contact: Marc Brinkmann <git@marcbrinkmann.de> Archive: PyPI Bug-Database: https://github.com/mbr/jsonext/issues/ @@ -18,7 +17,7 @@ Repository: https://github.com/mbr/jsonext.git Repository-Browse: https://github.com/mbr/jsonext/ -# Copyright © 2018–2019 Ben Finney <bignose@debian.org> +# Copyright © 2018–2022 Ben Finney <bignose@debian.org> # # This is free software; you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License, version 3 or later. |
