diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
commit | 618c9f615c23c8463dea6778481ccfa21dc874b7 (patch) | |
tree | 0ab9c8b9f692feb0c0b83851cc68a2c88474b1f0 | |
parent | Adding upstream version 6.13.1. (diff) | |
download | ansible-lint-618c9f615c23c8463dea6778481ccfa21dc874b7.tar.xz ansible-lint-618c9f615c23c8463dea6778481ccfa21dc874b7.zip |
Adding debian version 6.13.1-1.debian/6.13.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/NEWS | 12 | ||||
-rw-r--r-- | debian/README.Debian | 9 | ||||
-rw-r--r-- | debian/ansible-lint.1 | 149 | ||||
-rw-r--r-- | debian/ansible-lint.1.asciidoc.in | 121 | ||||
-rw-r--r-- | debian/changelog | 206 | ||||
-rw-r--r-- | debian/clean | 1 | ||||
-rw-r--r-- | debian/control | 43 | ||||
-rw-r--r-- | debian/copyright | 42 | ||||
-rw-r--r-- | debian/docs | 1 | ||||
-rw-r--r-- | debian/gbp.conf | 19 | ||||
-rw-r--r-- | debian/manpages | 1 | ||||
-rw-r--r-- | debian/patches/remove_vendored_code.patch | 67 | ||||
-rw-r--r-- | debian/patches/remove_version_check.patch | 74 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rwxr-xr-x | debian/rules | 8 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/source/options | 1 | ||||
-rw-r--r-- | debian/upstream/metadata | 4 | ||||
-rw-r--r-- | debian/watch | 6 |
19 files changed, 767 insertions, 0 deletions
diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..97fef07 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,12 @@ +ansible-lint (5.4.0-1) unstable; urgency=medium + + Starting with version 5.x, ansible-lint will try and download + the roles and collections found in requirements.yml (if it exists) + using ansible-galaxy. + The download contents will be placed into a temporary folder. + Without this, ansible-lint would error out for that given project. + + If you want to disable this behavior, you can pass "--offline" to the CLI + commands or even set "offline: false" in ansible-lint's configuration. + + -- Samuel Henrique <samueloph@debian.org> Sat, 26 Feb 2022 00:30:15 +0000 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..9b15676 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,9 @@ +ansible-lint for Debian +----------------------- + +manpage ansible-lint.1 is generated via: +# apt install asciidoc xsltproc +$ a2x -d manpage -f manpage ansible-lint.1.asciidoc.in + + -- Gregory Colpart <reg@debian.org> Sat, 12 Aug 2017 12:29:55 -0400 + diff --git a/debian/ansible-lint.1 b/debian/ansible-lint.1 new file mode 100644 index 0000000..b557622 --- /dev/null +++ b/debian/ansible-lint.1 @@ -0,0 +1,149 @@ +'\" t +.\" Title: ansible-lint +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 08/12/2017 +.\" Manual: System administration commands +.\" Source: ansible-lint +.\" Language: English +.\" +.TH "ANSIBLE\-LINT" "1" "08/12/2017" "ansible\-lint" "System administration commands" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ansible-lint \- lint tool for Ansible playbooks +.SH "SYNOPSIS" +.sp +ansible\-lint [\-M module_path] [\-l] [\-s] [module\&...] +.SH "DESCRIPTION" +.sp +\fBansible\-lint\fR checks Ansible playbooks for practices and behaviour that could potentially be improved\&. +.SH "OPTIONS" +.sp +\fB\-\-version\fR: +.sp +show program\(cqs version number and exit +.PP +\fB\-M\fR \fIDIRECTORY\fR, \fB\-\-module\-path=\fR\fIDIRECTORY\fR +.RS 4 +the +\fIDIRECTORY\fR +search path to load modules from\&. The default is +\fI/usr/share/ansible\fR\&. This can also be set with the ANSIBLE_LIBRARY environment variable\&. +.RE +.PP +\fB\-s\fR, \fB\-\-snippet=\fR +.RS 4 +Produce a snippet which can be copied into a playbook for modification, like a kind of task template\&. +.RE +.PP +\fB\-l\fR, \fB\-\-list=\fR +.RS 4 +Produce a terse listing of modules and a short description of each\&. +.RE +.PP +\fB\-h\fR, \fB\-\-help\fR +.RS 4 +show this help message and exit +.RE +.PP +\fB\-L\fR +.RS 4 +list all the rules +.RE +.PP +\fB\-q\fR +.RS 4 +quieter, although not silent output +.RE +.PP +\fB\-p\fR +.RS 4 +parseable output in the format of pep8 +.RE +.PP +\fB\-r\fR \fIRULESDIR\fR +.RS 4 +specify one or more rules directories using one or more +\fB\-r\fR +arguments\&. Any +\fB\-r\fR +flags override the default rules in +\fI/usr/lib/python3/dist\-packages/ansiblelint/rules\fR, +unless +\fB\-R\fR +is also used\&. +.RE +.PP +\fB\-R\fR +.RS 4 +Use default rules in +\fI/usr/lib/python3/dist\-packages/ansiblelint/rules\fR +in addition to any extra rules directories specified with +\fB\-r\fR\&. There is no need to specify this if no +\fB\-r\fR +flags are used +.RE +.PP +\fB\-t\fR \fITAGS\fR +.RS 4 +only check rules whose id/tags match these values +.RE +.PP +\fB\-T\fR +.RS 4 +list all the tags +.RE +.PP +\fB\-v\fR +.RS 4 +Increase verbosity level +.RE +.PP +\fB\-x\fR \fISKIP_LIST\fR +.RS 4 +only check rules whose id/tags do not match these values +.RE +.PP +\fB\-\-nocolor\fR +.RS 4 +disable colored output +.RE +.PP +\fB\-\-force\-color\fR +.RS 4 +Try force colored output (relying on ansible\(cqs code) +.RE +.PP +\fB\-\-exclude=\fR\fIEXCLUDE_PATHS\fR +.RS 4 +path to directories or files to skip\&. This option is repeatable\&. +.RE +.SH "AUTHOR" +.sp +ansible\-lint was originally written by Will Thames +.SH "COPYRIGHT" +.sp +Copyright \(co 2013\-2016 Will Thames <will@thames\&.id\&.au> +.sp +ansible\-lint is released under the terms of the MIT License\&. +.SH "SEE ALSO" +.sp +\fBansible\-playbook\fR(1), \fBansible\fR(1) diff --git a/debian/ansible-lint.1.asciidoc.in b/debian/ansible-lint.1.asciidoc.in new file mode 100644 index 0000000..47ec146 --- /dev/null +++ b/debian/ansible-lint.1.asciidoc.in @@ -0,0 +1,121 @@ +ansible-lint(1) +=============== +:doctype: manpage +:man source: ansible-lint +:man manual: System administration commands + +NAME +---- +ansible-lint - lint tool for Ansible playbooks + + +SYNOPSIS +-------- +ansible-lint [-M module_path] [-l] [-s] [module...] + + +DESCRIPTION +----------- + +*ansible-lint* checks Ansible playbooks for practices and behaviour +that could potentially be improved. + + +OPTIONS +------- + +**--version**: + +show program's version number and exit + +*-M* 'DIRECTORY', *--module-path=*'DIRECTORY':: + +the 'DIRECTORY' search path to load modules from. The default is +'/usr/share/ansible'. This can also be set with the ANSIBLE_LIBRARY +environment variable. + +*-s*, *--snippet=*:: + +Produce a snippet which can be copied into a playbook for modification, like +a kind of task template. + +*-l*, *--list=*:: + +Produce a terse listing of modules and a short description of each. + + +*-h*, *--help*:: + +show this help message and exit + +*-L*:: + +list all the rules + +*-q*:: + +quieter, although not silent output + +*-p*:: + +parseable output in the format of pep8 + +*-r* 'RULESDIR':: + +specify one or more rules directories using one or more *-r* arguments. Any *-r* +flags override the default rules in '/usr/lib/python3/dist-packages/ansiblelint/rules', +unless *-R* is also used. + +*-R*:: + +Use default rules in '/usr/lib/python3/dist-packages/ansiblelint/rules' in addition to any extra +rules directories specified with *-r*. There is no need to specify this if no *-r* flags are used + +*-t* 'TAGS':: + +only check rules whose id/tags match these values + +*-T*:: + +list all the tags + +*-v*:: + +Increase verbosity level + +*-x* 'SKIP_LIST':: + +only check rules whose id/tags do not match these values + +*--nocolor*:: + +disable colored output + +*--force-color*:: + +Try force colored output (relying on ansible's code) + +*--exclude=*'EXCLUDE_PATHS':: + +path to directories or files to skip. This option is repeatable. + + +AUTHOR +------ + +ansible-lint was originally written by Will Thames + + +COPYRIGHT +--------- + +Copyright © 2013-2016 Will Thames <will@thames.id.au> + +ansible-lint is released under the terms of the MIT License. + + +SEE ALSO +-------- + +*ansible-playbook*(1), *ansible*(1) + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0e292f8 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,206 @@ +ansible-lint (6.13.1-1) unstable; urgency=medium + + * New upstream version 6.13.1 + * d/p/remove_version_check.patch: Refresh patch + + -- Samuel Henrique <samueloph@debian.org> Sun, 26 Feb 2023 11:49:21 +0000 + +ansible-lint (6.12.2-1) unstable; urgency=medium + + * New upstream version 6.12.2 + * d/p/remove_version_check.patch: Refresh patch + * d/p/remove_vendored_code.patch: New patch to remove vendored code usage + + -- Samuel Henrique <samueloph@debian.org> Fri, 10 Feb 2023 23:03:31 +0000 + +ansible-lint (6.12.1-1) unstable; urgency=medium + + * New upstream version 6.12.1 + + -- Samuel Henrique <samueloph@debian.org> Wed, 08 Feb 2023 18:52:46 +0000 + +ansible-lint (6.11.0-1) unstable; urgency=medium + + * New upstream version 6.11.0 + * d/control: Add new dependencies: black, git and python3-jinja2 + * d/p/remove_version_check.patch: Refresh patch + + -- Samuel Henrique <samueloph@debian.org> Fri, 20 Jan 2023 22:44:05 +0000 + +ansible-lint (6.9.1-1) unstable; urgency=medium + + * New upstream version 6.9.1 + * Bump Standards-Version to 4.6.2 + * d/control: Add new dependency python3-filelock and bump jsonschema + requirement to 4.10.0 + * d/p/disable_scm_version.patch: Drop patch in favor of using + python3-setuptools-scm + * d/p/remove_version_check.patch: New patch to disable external version + check + + -- Samuel Henrique <samueloph@debian.org> Sun, 15 Jan 2023 21:56:11 +0000 + +ansible-lint (6.7.0-1) unstable; urgency=medium + + * New upstream version 6.7.0 + * Bump Standards-Version to 4.6.1. + * d/control: Bump version requirement of jsonschema to 4.9.0. + * d/tests: Drop autopkgtests, they were never too good and the maintenance + cost is too high. + * d/watch: Update file to drop alpha and beta releases, also use GitHub's + API. + + -- Samuel Henrique <samueloph@debian.org> Sat, 17 Dec 2022 20:22:48 +0000 + +ansible-lint (6.3.0-2) unstable; urgency=medium + + * Upload to unstable + * d/tests/control: Disable nomatch test, broken upstream + + -- Samuel Henrique <samueloph@debian.org> Sun, 17 Jul 2022 16:28:05 +0200 + +ansible-lint (6.3.0-1) experimental; urgency=medium + + * New upstream version 6.3.0 (closes: #1012366) + - This upload is blocked from going to unstable until + python3-jsonschema >= 4.6.0 gets uploaded to it. + * Move package maintenance under the Python's team + * d/control: + - New dependencies python3-ansible-compat and python3-jsonschema + - Drop ansible in favor of ansible-core (closes: #982653) + * d/copyright: Remove entry for deleted file 'NoLogPasswordsRule.py' + * d/docs: + - Stop installing examples folder (they're actually ansible test data) + - Rename README.rst to README.md + * d/p/disable_scm_version.patch: Update patch + + -- Samuel Henrique <samueloph@debian.org> Sat, 18 Jun 2022 18:55:02 +0100 + +ansible-lint (5.4.0-2) unstable; urgency=medium + + * d/watch: Fix URL regression/typo from last upload + + -- Samuel Henrique <samueloph@debian.org> Sat, 26 Feb 2022 17:52:12 +0000 + +ansible-lint (5.4.0-1) unstable; urgency=medium + + * New upstream version 5.4.0 + * Bump Standards-Version to 4.6.0 + * Update upstream URLs + * d/NEWS: Create news file and warn about new "--offline" flag, + without it, ansible-lint will try and download roles and collections set + in requirements.yml (if the file exists), using ansible-galaxy, into a + temporary folder. + * d/control: + - Add ansible-core as an alternative dependency (will become the default + once #1001040 is fixed) + - Update dependencies list according to upstream and + wrap-and-sort + * d/copyright: + - Update copyright info (upstream is both GPL-3 and Expat) + - Update debian/ years and remove deleted file + * d/p/disable_scm_version.patch: Update patch + * d/salsa-ci.yml: Remove file in favor of using default CI settings + * d/t/tests + - Ignore experimental findings in tests and use package + provided files + - Don't call tests from source code root to avoid parsing upstream's + .yamllint + + -- Samuel Henrique <samueloph@debian.org> Sat, 26 Feb 2022 00:30:15 +0000 + +ansible-lint (4.3.7-1) unstable; urgency=medium + + * New upstream version 4.3.7 + * d/p/fix-examples.patch: Remove patch, merged upstream + + -- Samuel Henrique <samueloph@debian.org> Wed, 04 Nov 2020 19:37:49 +0000 + +ansible-lint (4.3.5-1) unstable; urgency=medium + + * New upstream version 4.3.5 + * Add d/salsa-ci.yml + * d/t/lots-of-warnings: Update test + + -- Samuel Henrique <samueloph@debian.org> Sat, 03 Oct 2020 18:23:01 +0100 + +ansible-lint (4.3.1-1) unstable; urgency=medium + + * New upstream version 4.3.1 + * Bump DH to 13 + * Bump Standards-Version to 4.5.0 + * Add d/gbp.conf + * d/p/fix-examples.patch: new patch to fix example used on autopkgtest + * d/t/lots-of-warnings: Update test + * d/copyright: Remove Files-Excluded field as there's no repackaging anymore + + [ Debian Janitor ] + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + + -- Samuel Henrique <samueloph@debian.org> Sat, 03 Oct 2020 17:30:44 +0100 + +ansible-lint (4.2.0-1) unstable; urgency=medium + + * New upstream version 4.2.0 + * Update Standards-Version to 4.4.1 + * Use debhelper-compat + * The upstream tarball is now dfsg compliant as it does not ship the "docs" + directory anymore. + * d/control: + - Add Dependency python3-ruamel.yaml + - Add Rules-Requires-Root: no + - Remove Build-Dependency python3-setuptools-scm-git-archive + * d/patches: + - add_setup_py.patch: New patch to add setup_py + - disable_scm_version.patch: + ~ Set version on setup.cfg without using scm module + ~ Update patch + * d/tests/lots-of-warnings: Get a predictable output for different test envs + + -- Samuel Henrique <samueloph@debian.org> Sun, 08 Dec 2019 20:39:41 +0000 + +ansible-lint (4.1.0+dfsg.1-2) unstable; urgency=medium + + [ Ryo IGARASHI ] + * Fix rules location in manpage (closes: #934011) + + [ Samuel Henrique ] + * Bump Standards-Version to 4.4.0 + * Remove underline of runtime test name + * Add missing dependency of python3-pkg-resources + + -- Samuel Henrique <samueloph@debian.org> Wed, 04 Sep 2019 01:01:45 +0100 + +ansible-lint (4.1.0+dfsg.1-1) unstable; urgency=medium + + * New upstream version 4.1.0+dfsg.1 (closes: #918783) + - dfsg.1: Remove docs dir, which contains non-free code + and we don't use any of it anyway. + * Use python3 instead of python2 (closes: #921030) + * Bump DH level to 12 + * Bump Standards-Version to 4.3.0 + * Add myself as an uploader + * Move packaging to salsa + * Add autopkgtests + * d/docs: update docs of new release + * d/control: add new build dependencies of latest release + * d/copyright: update all entries + * d/p/disable_scm_version.patch: new patch to disable usage of pypi + * d/rules: use pybuild instead of distutils + * d/watch: create file and point to GitHub + * wrap-and-sort -a + + -- Samuel Henrique <samueloph@debian.org> Sun, 24 Feb 2019 12:30:38 +0000 + +ansible-lint (3.4.20+git.20180203-1) unstable; urgency=medium + + * New upstream release (Closes: #882066) + + -- Gregory Colpart <reg@debian.org> Sat, 03 Feb 2018 18:50:23 +0100 + +ansible-lint (3.4.13+git.20170811-1-1) unstable; urgency=medium + + * Initial release (Closes: #799144) + + -- Gregory Colpart <reg@debian.org> Fri, 11 Aug 2017 16:56:58 -0400 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..35751c3 --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +lib/ansible_lint.egg-info/ diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9d3ec40 --- /dev/null +++ b/debian/control @@ -0,0 +1,43 @@ +Source: ansible-lint +Section: misc +Priority: optional +Maintainer: Debian Python Team <team+python@tracker.debian.org> +Uploaders: Samuel Henrique <samueloph@debian.org>, Gregory Colpart <reg@debian.org> +Build-Depends: debhelper-compat (= 13), + dh-python, + pybuild-plugin-pyproject, + python3-all, + python3-setuptools, + python3-setuptools-scm, +Standards-Version: 4.6.2 +Rules-Requires-Root: no +Homepage: https://github.com/ansible-community/ansible-lint +Vcs-Browser: https://salsa.debian.org/python-team/packages/ansible-lint +Vcs-Git: https://salsa.debian.org/python-team/packages/ansible-lint.git + +Package: ansible-lint +Architecture: all +Depends: ansible-core, + black, + git, + python3-ansible-compat, + python3-enrich, + python3-filelock, + python3-jinja2, + python3-jsonschema (>= 4.10.0), + python3-packaging, + python3-rich, + python3-ruamel.yaml, + python3-tenacity, + python3-wcmatch, + python3-yaml, + yamllint, + ${misc:Depends}, + ${python3:Depends} +Description: lint tool for Ansible playbooks + Ansible playbooks express configuration, deployment and orchestration in YAML + format. They can describe a policy you want your remote systems to enforce, + or a set of steps in a general IT process. + . + ansible-lint checks Ansible playbooks for practices and behaviour that could + potentially be improved. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..04ae728 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,42 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ansible-lint +Source: https://github.com/ansible-community/ansible-lint + +Files: * +Copyright: 2016 Tsukinowa Inc. <info@tsukinowa.jp> + 2013-2018 Will Thames <will@thames.id.au> + 2018-2021 Ansible Project +License: Expat and GPL-3 +Comment: The ansible-lint project is distributed as GPLv3 due to use of + GPLv3 runtime dependencies, like ansible and yamllint. + For historical reasons, its own code-base remains licensed + under a more liberal MIT license and any contributions made + are accepted as being made under original MIT license. + +Files: debian/* +Copyright: 2017-2018 Gregory Colpart <reg@debian.org> + 2019-2022 Samuel Henrique <samueloph@debian.org> +License: Expat + +License: GPL-3 + On Debian systems the full text of the GPL-3 license can be found in + /usr/share/common-licenses/GPL-3 + +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/docs b/debian/docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.md diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..6cbc70d --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,19 @@ +[DEFAULT] +debian-branch=debian/master +pristine-tar = True +cleaner = /bin/true + +[buildpackage] +sign-tags = True +export-dir = ../build-area/ +ignore-branch = True + +[import-orig] +filter-pristine-tar = True + +[pq] +patch-numbers = False + +[dch] +multimaint-merge = True +ignore-branch = True diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..5ced7db --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +debian/ansible-lint.1 diff --git a/debian/patches/remove_vendored_code.patch b/debian/patches/remove_vendored_code.patch new file mode 100644 index 0000000..c494771 --- /dev/null +++ b/debian/patches/remove_vendored_code.patch @@ -0,0 +1,67 @@ +Index: ansible-lint/src/ansiblelint/_vendor/__init__.py +=================================================================== +--- ansible-lint.orig/src/ansiblelint/_vendor/__init__.py ++++ /dev/null +@@ -1,48 +0,0 @@ +-import os +-import pkgutil +-import sys +-import warnings +- +-# This package exists to host vendored top-level Python packages for downstream packaging. Any Python packages +-# installed beneath this one will be masked from the Ansible loader, and available from the front of sys.path. +-# It is expected that the vendored packages will be loaded very early, so a warning will be fired on import of +-# the top-level ansible package if any packages beneath this are already loaded at that point. +-# +-# Python packages may be installed here during downstream packaging using something like: +-# pip install --upgrade -t (path to this dir) cryptography pyyaml packaging jinja2 +- +-# mask vendored content below this package from being accessed as a subpackage +-__path__ = [] +- +- +-def _ensure_vendored_path_entry() -> None: +- """ +- Ensure that any downstream-bundled content beneath this package is available at the top of sys.path +- """ +- # patch our vendored dir onto sys.path +- vendored_path_entry = os.path.dirname(__file__) +- vendored_module_names = { +- m[1] for m in pkgutil.iter_modules([vendored_path_entry], "") +- } # m[1] == m.name +- +- if vendored_module_names: +- # patch us early to load vendored deps transparently +- if vendored_path_entry in sys.path: +- # handle reload case by removing the existing entry, wherever it might be +- sys.path.remove(vendored_path_entry) +- sys.path.insert(0, vendored_path_entry) +- +- already_loaded_vendored_modules = set(sys.modules.keys()).intersection( +- vendored_module_names +- ) +- +- if already_loaded_vendored_modules: +- warnings.warn( +- "One or more Python packages bundled by this ansible-lint distribution were already " +- "loaded ({}). This may result in undefined behavior.".format( +- ", ".join(sorted(already_loaded_vendored_modules)) +- ) +- ) +- +- +-_ensure_vendored_path_entry() +Index: ansible-lint/src/ansiblelint/__init__.py +=================================================================== +--- ansible-lint.orig/src/ansiblelint/__init__.py ++++ ansible-lint/src/ansiblelint/__init__.py +@@ -20,7 +20,8 @@ + """Main ansible-lint package.""" + from __future__ import annotations + +-import ansiblelint._vendor ++# Patched on Debian to remove vendored code. ++#import ansiblelint._vendor + from ansiblelint.version import __version__ + + # make vendored top-level modules accessible EARLY diff --git a/debian/patches/remove_version_check.patch b/debian/patches/remove_version_check.patch new file mode 100644 index 0000000..8935b30 --- /dev/null +++ b/debian/patches/remove_version_check.patch @@ -0,0 +1,74 @@ +Description: Remove version check at runtime +Author: Samuel Henrique <samueloph@debian.org> +Forwarded: not-needed +Index: ansible-lint/src/ansiblelint/config.py +=================================================================== +--- ansible-lint.orig/src/ansiblelint/config.py ++++ ansible-lint/src/ansiblelint/config.py +@@ -216,51 +216,5 @@ def guess_install_method() -> str: + + + def get_version_warning() -> str: +- """Display warning if current version is outdated.""" +- # 0.1dev1 is special fallback version +- if __version__ == "0.1.dev1": # pragma: no cover +- return "" +- +- msg = "" +- data = {} +- current_version = Version(__version__) +- +- if not os.path.exists(CACHE_DIR): # pragma: no cover +- os.makedirs(CACHE_DIR) +- cache_file = f"{CACHE_DIR}/latest.json" +- refresh = True +- if os.path.exists(cache_file): +- age = time.time() - os.path.getmtime(cache_file) +- if age < 24 * 60 * 60: +- refresh = False +- with open(cache_file, encoding="utf-8") as f: +- data = json.load(f) +- +- if refresh or not data: +- release_url = ( +- "https://api.github.com/repos/ansible/ansible-lint/releases/latest" +- ) +- try: +- with urllib.request.urlopen(release_url) as url: +- data = json.load(url) +- with open(cache_file, "w", encoding="utf-8") as f: +- json.dump(data, f) +- except (URLError, HTTPError) as exc: # pragma: no cover +- _logger.debug( +- "Unable to fetch latest version from %s due to: %s", release_url, exc +- ) +- return "" +- +- html_url = data["html_url"] +- new_version = Version(data["tag_name"][1:]) # removing v prefix from tag +- +- if current_version > new_version: +- msg = "[dim]You are using a pre-release version of ansible-lint.[/]" +- elif current_version < new_version: +- msg = f"""[warning]A new release of ansible-lint is available: [red]{current_version}[/] → [green][link={html_url}]{new_version}[/][/][/]""" +- +- pip = guess_install_method() +- if pip: +- msg += f" Upgrade by running: [info]{pip}[/]" +- +- return msg ++ """Patched on Debian to not download release information from third parties""" ++ return "" +Index: ansible-lint/test/test_main.py +=================================================================== +--- ansible-lint.orig/test/test_main.py ++++ ansible-lint/test/test_main.py +@@ -46,7 +46,7 @@ def test_call_from_outside_venv(expected + warning_found = "PATH altered to include" in proc.stderr + assert warning_found is expected_warning + +- ++@pytest.mark.skip(reason="This functionality is disabled on Debian") + @pytest.mark.parametrize( + ("ver_diff", "found", "check", "outlen"), + ( diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..e2ec076 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +remove_version_check.patch +remove_vendored_code.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..24db829 --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/pkg-info.mk + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_auto_test: 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/source/options b/debian/source/options new file mode 100644 index 0000000..cb61fa5 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..d0fc2e1 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/ansible/ansible-lint/issues +Bug-Submit: https://github.com/ansible/ansible-lint/issues/new +Repository: https://github.com/ansible/ansible-lint.git +Repository-Browse: https://github.com/ansible/ansible-lint diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..ba95a1f --- /dev/null +++ b/debian/watch @@ -0,0 +1,6 @@ +version=4 +opts="searchmode=plain,\ +filenamemangle=s%v?@ANY_VERSION@%@PACKAGE@-$1.tar.xz%,\ +uversionmangle=s/(\d)[_\.\-\+]?(\d)[_\.\-\+]?(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|a|b)\d*)$/$1~$2/" \ +https://api.github.com/repos/ansible-community/ansible-lint/releases?per_page=30 \ +https://api.github.com/repos/[^/]+/[^/]+/tarball/v?@ANY_VERSION@ |