From 6900a5d79c81b4d0bb4db18ce9d8fc5d7a0ff0e2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 13 Feb 2025 05:55:58 +0100 Subject: [PATCH] Adding debian version 0.13.1-1. Signed-off-by: Daniel Baumann --- debian/changelog | 47 +++++++++++++++++++ debian/control | 35 ++++++++++++++ debian/copyright | 29 ++++++++++++ ...ith-Python2-read_file-function-to-fi.patch | 40 ++++++++++++++++ debian/patches/series | 1 + debian/rules | 17 +++++++ debian/source/format | 1 + debian/watch | 3 ++ 8 files changed, 173 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/patches/0001-replace-readfp-with-Python2-read_file-function-to-fi.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..e2d532e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,47 @@ +gitlint (0.13.1-1) unstable; urgency=medium + + * New maintainer (Closes: #933193). + * Updating homepage field. + * Updating package description. + * Updating years in copyright file. + * Sorting dh arguments in rules. + * Using execute_after targets in rules to be explicit what we're doing. + * Adding vcs fields. + * Sorting debian files. + + -- Daniel Baumann Thu, 19 Mar 2020 15:12:27 +0100 + +gitlint (0.13.1-0.1) unstable; urgency=medium + + * QA upload. + * New upstream release (Closes: #951996) + * Update std-version to 4.5.0, no changes required + + -- Gianfranco Costamagna Wed, 18 Mar 2020 10:38:21 +0100 + +gitlint (0.12.0-0.1) unstable; urgency=medium + + * QA upload. + * New upstream release (Closes: #896070) + * Compat level is now 12 + * Update std-version to 4.4.0, no changes required + * Switch to pylint + * Do not install qa directory, not in gitlint namespace + * Patch to replace readfp with read_file, since this package is Python3 + * Force arrow runtime dependency, to avoid a pybuild failure in picking + up the requirements.txt file + * Drop all patches, upstream + + -- Gianfranco Costamagna Thu, 26 Sep 2019 10:30:12 +0200 + +gitlint (0.9.0-2) unstable; urgency=medium + + * Add missing dependency python3-sh (Closes: #887789) + + -- Patrik Hagedorn Sun, 18 Feb 2018 22:48:41 +0100 + +gitlint (0.9.0-1) unstable; urgency=medium + + * Initial packaging (Closes: #886864) + + -- Patrik Hagedorn Mon, 15 Jan 2018 12:37:13 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..a7a1a28 --- /dev/null +++ b/debian/control @@ -0,0 +1,35 @@ +Source: gitlint +Section: utils +Priority: optional +Maintainer: Daniel Baumann +Build-Depends: + debhelper (>= 12.8~), + debhelper-compat (= 12), + dh-python, + git, + pylint, + python3-all, + python3-arrow, + python3-click, + python3-coverage, + python3-setuptools, + python3-sh, +Standards-Version: 4.5.0 +Homepage: https://jorisroovers.com/gitlint/ +Vcs-Browser: https://git.progress-linux.org/users/daniel.baumann/debian/packages/gitlint +Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/gitlint + +Package: gitlint +Architecture: all +Depends: + git, + python3-arrow, + python3-sh, + ${misc:Depends}, + ${python3:Depends}, +Description: Git commit message linter written in Python + Gitlint is a git commit message linter written in Python, it checks your commit + messages for style. + . + Great for use as a commit-msg git hook or as part of your gating script in a CI + pipeline (e.g. Jenkins). diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..32679c4 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/jorisroovers/gitlint + +Files: * +Copyright: 2015-2020 Joris Roovers +License: Expat + +Files: debian/* +Copyright: 2017-2018 Patrik Hagedorn +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/debian/patches/0001-replace-readfp-with-Python2-read_file-function-to-fi.patch b/debian/patches/0001-replace-readfp-with-Python2-read_file-function-to-fi.patch new file mode 100644 index 0000000..dde4da9 --- /dev/null +++ b/debian/patches/0001-replace-readfp-with-Python2-read_file-function-to-fi.patch @@ -0,0 +1,40 @@ +Forwarded: https://github.com/jorisroovers/gitlint/pull/104 +From 84145c703a25acad5f2378535c642c5abc299fbe Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Thu, 26 Sep 2019 10:48:14 +0200 +Subject: [PATCH] replace readfp with Python2 read_file function, to fix a test + failure: + +====================================================================== +FAIL: test_config_file (test_cli.CLITests) +Test for --config option +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/usr/lib/python3.7/unittest/mock.py", line 1248, in patched + return func(*args, **keywargs) + File "/<>/gitlint/tests/test_cli.py", line 372, in test_config_file + self.assertEqual(result.output, "") +AssertionError: "/<>/git[197 chars]od\n" != '' +- /<>/gitlint/config.py:366: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. +- parser.readfp(config_file, filename) # pylint: disable=deprecated-method +--- + gitlint/config.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gitlint/config.py b/gitlint/config.py +index fdc5e85..654523d 100644 +--- a/gitlint/config.py ++++ b/gitlint/config.py +@@ -428,8 +428,7 @@ class LintConfigBuilder(object): + parser = ConfigParser() + + with io.open(filename, encoding=DEFAULT_ENCODING) as config_file: +- # readfp() is deprecated in python 3.2+, but compatible with 2.7 +- parser.readfp(config_file, filename) # pylint: disable=deprecated-method ++ parser.read_file(config_file) + + for section_name in parser.sections(): + for option_name, option_value in parser.items(section_name): +-- +2.17.1 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..3fede26 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-replace-readfp-with-Python2-read_file-function-to-fi.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8ba7386 --- /dev/null +++ b/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +export LC_ALL=C.UTF-8 +export PYBUILD_TEST_ARGS=python{version} -m coverage run --omit='/usr/*,$(CURDIR)/gitlint/tests/*,$(CURDIR)/gitlint/qa/*' -m unittest discover -v -s $(CURDIR)/gitlint/tests + +%: + dh ${@} --buildsystem=pybuild --with python3 + +override_dh_auto_test: + PYBUILD_SYSTEM=custom dh_auto_test + +execute_after_dh_auto_install: + # we don't want them in the package? + rm -rf debian/gitlint/usr/lib/python*/dist-packages/qa + +execute_after_dh_fixperms: + find debian/gitlint/usr/lib -name commit-msg -exec chmod +x {} \; diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..1039372 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/gitlint-$1\.tar\.gz/ \ + https://github.com/jorisroovers/gitlint/releases .*/v?(\d\S+)\.tar\.gz