diff --git a/700.patch b/700.patch deleted file mode 100644 index 6ca702a..0000000 --- a/700.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b03a6c261f9a85d3b29a8801dc9bf51661ee2b47 Mon Sep 17 00:00:00 2001 -From: Martin Liska -Date: Sun, 5 Sep 2021 20:40:22 +0200 -Subject: [PATCH] Skip .cargo-checksum.json files in `hidden-file-or-dir`. - -Fixes #699. ---- - rpmlint/checks/FilesCheck.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/rpmlint/checks/FilesCheck.py b/rpmlint/checks/FilesCheck.py -index d1f1e6ed..c2aa30b7 100644 ---- a/rpmlint/checks/FilesCheck.py -+++ b/rpmlint/checks/FilesCheck.py -@@ -540,7 +540,8 @@ def check(self, pkg): - self.output.add_info('E', pkg, 'version-control-internal-file', f) - elif f.endswith('/.htaccess'): - self.output.add_info('E', pkg, 'htaccess-file', f) -- elif hidden_file_regex.search(f) and not f.startswith('/etc/skel/') and not f.endswith('/.build-id'): -+ elif (hidden_file_regex.search(f) and not f.startswith('/etc/skel/') and -+ not f.endswith('/.build-id') and not f.endswith('/.cargo-checksum.json')): - self.output.add_info('W', pkg, 'hidden-file-or-dir', f) - elif manifest_perl_regex.search(f): - self.output.add_info('W', pkg, 'manifest-in-perl-module', f) diff --git a/rpmlint-2.1.0-fix-rpmlintrc-load-from-cmdline-v3.patch b/rpmlint-2.1.0-fix-rpmlintrc-load-from-cmdline-v3.patch deleted file mode 100644 index a5fd56e..0000000 --- a/rpmlint-2.1.0-fix-rpmlintrc-load-from-cmdline-v3.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -up rpmlint-2.1.0/rpmlint/cli.py.fix-rpmlintrc-load-from-cmdline rpmlint-2.1.0/rpmlint/cli.py ---- rpmlint-2.1.0/rpmlint/cli.py.fix-rpmlintrc-load-from-cmdline 2021-09-17 10:07:00.599255215 -0400 -+++ rpmlint-2.1.0/rpmlint/cli.py 2021-09-17 10:08:29.337741059 -0400 -@@ -83,7 +83,7 @@ def process_lint_args(argv): - parser.add_argument('-V', '--version', action='version', version=__version__, help='show package version and exit') - parser.add_argument('-c', '--config', type=_validate_conf_location, help='load up additional configuration data from specified path (file or directory with *.toml files)') - parser.add_argument('-e', '--explain', nargs='+', default='', help='provide detailed explanation for one specific message id') -- parser.add_argument('-r', '--rpmlintrc', type=Path, help='load up specified rpmlintrc file') -+ parser.add_argument('-r', '--rpmlintrc', type=_is_file_path, help='load up specified rpmlintrc file') - parser.add_argument('-v', '--verbose', '--info', action='store_true', help='provide detailed explanations where available') - parser.add_argument('-p', '--print-config', action='store_true', help='print the settings that are in effect when using the rpmlint') - parser.add_argument('-i', '--installed', nargs='+', default='', help='installed packages to be validated by rpmlint') -@@ -164,6 +164,13 @@ def _validate_conf_location(string): - return config_paths - - -+def _is_file_path(path): -+ p = Path(path) -+ if not p.is_file(): -+ raise argparse.ArgumentTypeError(f'{path} is not a valid file path') -+ return p -+ -+ - def lint(): - """ - Main wrapper for lint command processing -diff -up rpmlint-2.1.0/rpmlint/lint.py.fix-rpmlintrc-load-from-cmdline rpmlint-2.1.0/rpmlint/lint.py ---- rpmlint-2.1.0/rpmlint/lint.py.fix-rpmlintrc-load-from-cmdline 2021-08-17 09:31:56.000000000 -0400 -+++ rpmlint-2.1.0/rpmlint/lint.py 2021-09-17 10:11:13.989642586 -0400 -@@ -35,6 +35,9 @@ class Lint(object): - self.profile.enable() - else: - self.profile = None -+ -+ if options['rpmlintrc']: -+ options['rpmlintrc'] = [options['rpmlintrc']] - self._load_rpmlintrc() - if options['verbose']: - self.config.info = options['verbose'] -@@ -161,6 +164,9 @@ class Lint(object): - Load rpmlintrc from argument or load up from folder - """ - if self.options['rpmlintrc']: -+ # Right now, we allow loading of just a single file, but the 'opensuse' -+ # branch contains auto-loading mechanism that can eventually load -+ # multiple files. - for rcfile in self.options['rpmlintrc']: - self.config.load_rpmlintrc(rcfile) - else: -diff -up rpmlint-2.1.0/test/test_lint.py.fix-rpmlintrc-load-from-cmdline rpmlint-2.1.0/test/test_lint.py ---- rpmlint-2.1.0/test/test_lint.py.fix-rpmlintrc-load-from-cmdline 2021-08-17 09:31:56.000000000 -0400 -+++ rpmlint-2.1.0/test/test_lint.py 2021-09-17 10:06:40.937147554 -0400 -@@ -410,7 +410,7 @@ def test_run_rpmlintrc_multiple(capsys, - def test_run_rpmlintrc_single_file(capsys, packages): - additional_options = { - 'rpmfile': [packages], -- 'rpmlintrc': [TEST_RPMLINTRC] -+ 'rpmlintrc': TEST_RPMLINTRC - } - options = {**options_preset, **additional_options} - linter = Lint(options) diff --git a/rpmlint-2.1.0-include-iso-639-2-collective-language-codes.patch b/rpmlint-2.1.0-include-iso-639-2-collective-language-codes.patch deleted file mode 100644 index 4dab4d7..0000000 --- a/rpmlint-2.1.0-include-iso-639-2-collective-language-codes.patch +++ /dev/null @@ -1,526 +0,0 @@ -diff -up rpmlint-2.1.0/rpmlint/__isocodes__.py.spot rpmlint-2.1.0/rpmlint/__isocodes__.py ---- rpmlint-2.1.0/rpmlint/__isocodes__.py.spot 2021-08-17 09:31:56.000000000 -0400 -+++ rpmlint-2.1.0/rpmlint/__isocodes__.py 2021-08-17 17:19:43.068675456 -0400 -@@ -111,6 +111,7 @@ LANGUAGES = set( - 'aey', - 'aez', - 'af', -+ 'afa', - 'afb', - 'afd', - 'afe', -@@ -226,6 +227,7 @@ LANGUAGES = set( - 'ald', - 'ale', - 'alf', -+ 'alg', - 'alh', - 'ali', - 'alj', -@@ -316,6 +318,7 @@ LANGUAGES = set( - 'aou', - 'aox', - 'aoz', -+ 'apa', - 'apb', - 'apc', - 'apd', -@@ -366,6 +369,7 @@ LANGUAGES = set( - 'arq', - 'arr', - 'ars', -+ 'art', - 'aru', - 'arv', - 'arw', -@@ -404,6 +408,7 @@ LANGUAGES = set( - 'atd', - 'ate', - 'atg', -+ 'ath', - 'ati', - 'atj', - 'atk', -@@ -438,6 +443,7 @@ LANGUAGES = set( - 'aup', - 'auq', - 'aur', -+ 'aus', - 'aut', - 'auu', - 'auw', -@@ -519,10 +525,12 @@ LANGUAGES = set( - 'baa', - 'bab', - 'bac', -+ 'bad', - 'bae', - 'baf', - 'bag', - 'bah', -+ 'bai', - 'baj', - 'bal', - 'ban', -@@ -530,6 +538,7 @@ LANGUAGES = set( - 'bap', - 'bar', - 'bas', -+ 'bat', - 'bau', - 'bav', - 'baw', -@@ -628,6 +637,7 @@ LANGUAGES = set( - 'beo', - 'bep', - 'beq', -+ 'ber', - 'bes', - 'bet', - 'beu', -@@ -686,6 +696,7 @@ LANGUAGES = set( - 'bgx', - 'bgy', - 'bgz', -+ 'bh', - 'bha', - 'bhb', - 'bhc', -@@ -853,6 +864,7 @@ LANGUAGES = set( - 'bnq', - 'bnr', - 'bns', -+ 'bnt', - 'bnu', - 'bnv', - 'bnw', -@@ -991,6 +1003,7 @@ LANGUAGES = set( - 'bth', - 'bti', - 'btj', -+ 'btk', - 'btm', - 'btn', - 'bto', -@@ -1161,6 +1174,7 @@ LANGUAGES = set( - 'caf', - 'cag', - 'cah', -+ 'cai', - 'caj', - 'cak', - 'cal', -@@ -1171,6 +1185,7 @@ LANGUAGES = set( - 'caq', - 'car', - 'cas', -+ 'cau', - 'cav', - 'caw', - 'cax', -@@ -1225,6 +1240,7 @@ LANGUAGES = set( - 'ceb', - 'ceg', - 'cek', -+ 'cel', - 'cen', - 'cet', - 'cfa', -@@ -1311,6 +1327,7 @@ LANGUAGES = set( - 'clw', - 'cly', - 'cma', -+ 'cmc', - 'cme', - 'cmg', - 'cmi', -@@ -1361,10 +1378,13 @@ LANGUAGES = set( - 'cpa', - 'cpb', - 'cpc', -+ 'cpe', -+ 'cpf', - 'cpg', - 'cpi', - 'cpn', - 'cpo', -+ 'cpp', - 'cps', - 'cpu', - 'cpx', -@@ -1385,6 +1405,7 @@ LANGUAGES = set( - 'crm', - 'crn', - 'cro', -+ 'crp', - 'crq', - 'crr', - 'crs', -@@ -1447,6 +1468,7 @@ LANGUAGES = set( - 'cup', - 'cuq', - 'cur', -+ 'cus', - 'cut', - 'cuu', - 'cuv', -@@ -1490,6 +1512,7 @@ LANGUAGES = set( - 'dav', - 'daw', - 'dax', -+ 'day', - 'daz', - 'dba', - 'dbb', -@@ -1675,6 +1698,7 @@ LANGUAGES = set( - 'doy', - 'doz', - 'dpp', -+ 'dra', - 'drb', - 'drc', - 'drd', -@@ -1919,6 +1943,7 @@ LANGUAGES = set( - 'fip', - 'fir', - 'fit', -+ 'fiu', - 'fiw', - 'fj', - 'fkk', -@@ -2068,6 +2093,7 @@ LANGUAGES = set( - 'gej', - 'gek', - 'gel', -+ 'gem', - 'geq', - 'ges', - 'gev', -@@ -2367,6 +2393,7 @@ LANGUAGES = set( - 'hij', - 'hik', - 'hil', -+ 'him', - 'hio', - 'hir', - 'hit', -@@ -2558,6 +2585,7 @@ LANGUAGES = set( - 'ije', - 'ijj', - 'ijn', -+ 'ijo', - 'ijs', - 'ik', - 'ike', -@@ -2593,6 +2621,8 @@ LANGUAGES = set( - 'ims', - 'imy', - 'inb', -+ 'inc', -+ 'ine', - 'ing', - 'inh', - 'inj', -@@ -2612,11 +2642,13 @@ LANGUAGES = set( - 'ipo', - 'iqu', - 'iqw', -+ 'ira', - 'ire', - 'irh', - 'iri', - 'irk', - 'irn', -+ 'iro', - 'irr', - 'iru', - 'irx', -@@ -2822,6 +2854,7 @@ LANGUAGES = set( - 'kao', - 'kap', - 'kaq', -+ 'kar', - 'kav', - 'kaw', - 'kax', -@@ -2983,6 +3016,7 @@ LANGUAGES = set( - 'khf', - 'khg', - 'khh', -+ 'khi', - 'khj', - 'khk', - 'khl', -@@ -3242,6 +3276,7 @@ LANGUAGES = set( - 'krl', - 'krm', - 'krn', -+ 'kro', - 'krp', - 'krr', - 'krs', -@@ -3808,6 +3843,7 @@ LANGUAGES = set( - 'mak', - 'mam', - 'man', -+ 'map', - 'maq', - 'mas', - 'mat', -@@ -4050,6 +4086,7 @@ LANGUAGES = set( - 'mke', - 'mkf', - 'mkg', -+ 'mkh', - 'mki', - 'mkj', - 'mkk', -@@ -4131,6 +4168,7 @@ LANGUAGES = set( - 'mnl', - 'mnm', - 'mnn', -+ 'mno', - 'mnp', - 'mnq', - 'mnr', -@@ -4302,6 +4340,7 @@ LANGUAGES = set( - 'muk', - 'mul', - 'mum', -+ 'mun', - 'muo', - 'mup', - 'muq', -@@ -4400,6 +4439,7 @@ LANGUAGES = set( - 'myk', - 'myl', - 'mym', -+ 'myn', - 'myo', - 'myp', - 'myr', -@@ -4442,6 +4482,8 @@ LANGUAGES = set( - 'nae', - 'naf', - 'nag', -+ 'nah', -+ 'nai', - 'naj', - 'nak', - 'nal', -@@ -4608,6 +4650,7 @@ LANGUAGES = set( - 'nhz', - 'nia', - 'nib', -+ 'nic', - 'nid', - 'nie', - 'nif', -@@ -4838,6 +4881,7 @@ LANGUAGES = set( - 'nty', - 'ntz', - 'nua', -+ 'nub', - 'nuc', - 'nud', - 'nue', -@@ -5072,6 +5116,7 @@ LANGUAGES = set( - 'otl', - 'otm', - 'otn', -+ 'oto', - 'otq', - 'otr', - 'ots', -@@ -5094,6 +5139,7 @@ LANGUAGES = set( - 'oyy', - 'ozm', - 'pa', -+ 'paa', - 'pab', - 'pac', - 'pad', -@@ -5194,6 +5240,7 @@ LANGUAGES = set( - 'phd', - 'phg', - 'phh', -+ 'phi', - 'phk', - 'phl', - 'phm', -@@ -5343,6 +5390,7 @@ LANGUAGES = set( - 'ppu', - 'pqa', - 'pqm', -+ 'pra', - 'prb', - 'prc', - 'prd', -@@ -5437,6 +5485,7 @@ LANGUAGES = set( - 'pyx', - 'pyy', - 'pzn', -+ 'qaa-qtz', - 'qu', - 'qua', - 'qub', -@@ -5601,6 +5650,7 @@ LANGUAGES = set( - 'rnr', - 'rnw', - 'ro', -+ 'roa', - 'rob', - 'roc', - 'rod', -@@ -5664,8 +5714,10 @@ LANGUAGES = set( - 'sae', - 'saf', - 'sah', -+ 'sai', - 'saj', - 'sak', -+ 'sal', - 'sam', - 'sao', - 'saq', -@@ -5756,6 +5808,7 @@ LANGUAGES = set( - 'sej', - 'sek', - 'sel', -+ 'sem', - 'sen', - 'seo', - 'sep', -@@ -5785,6 +5838,7 @@ LANGUAGES = set( - 'sgj', - 'sgk', - 'sgm', -+ 'sgn', - 'sgp', - 'sgr', - 'sgs', -@@ -5833,10 +5887,12 @@ LANGUAGES = set( - 'sik', - 'sil', - 'sim', -+ 'sio', - 'sip', - 'siq', - 'sir', - 'sis', -+ 'sit', - 'siu', - 'siv', - 'siw', -@@ -5886,6 +5942,7 @@ LANGUAGES = set( - 'sky', - 'skz', - 'sl', -+ 'sla', - 'slc', - 'sld', - 'sle', -@@ -5915,6 +5972,7 @@ LANGUAGES = set( - 'smf', - 'smg', - 'smh', -+ 'smi', - 'smj', - 'smk', - 'sml', -@@ -5967,6 +6025,7 @@ LANGUAGES = set( - 'soj', - 'sok', - 'sol', -+ 'son', - 'soo', - 'sop', - 'soq', -@@ -6035,6 +6094,7 @@ LANGUAGES = set( - 'sry', - 'srz', - 'ss', -+ 'ssa', - 'ssb', - 'ssc', - 'ssd', -@@ -6179,6 +6239,7 @@ LANGUAGES = set( - 'tae', - 'taf', - 'tag', -+ 'tai', - 'taj', - 'tak', - 'tal', -@@ -6607,8 +6668,10 @@ LANGUAGES = set( - 'tum', - 'tun', - 'tuo', -+ 'tup', - 'tuq', - 'tus', -+ 'tut', - 'tuu', - 'tuv', - 'tux', -@@ -6919,6 +6982,7 @@ LANGUAGES = set( - 'wah', - 'wai', - 'waj', -+ 'wak', - 'wal', - 'wam', - 'wan', -@@ -6965,6 +7029,7 @@ LANGUAGES = set( - 'weh', - 'wei', - 'wem', -+ 'wen', - 'weo', - 'wep', - 'wer', -@@ -7594,6 +7659,7 @@ LANGUAGES = set( - 'ypb', - 'ypg', - 'yph', -+ 'ypk', - 'ypm', - 'ypn', - 'ypo', -@@ -7772,6 +7838,7 @@ LANGUAGES = set( - 'zmy', - 'zmz', - 'zna', -+ 'znd', - 'zne', - 'zng', - 'znk', -diff -up rpmlint-2.1.0/tools/generate-isocodes.py.spot rpmlint-2.1.0/tools/generate-isocodes.py ---- rpmlint-2.1.0/tools/generate-isocodes.py.spot 2021-08-17 17:06:21.635053616 -0400 -+++ rpmlint-2.1.0/tools/generate-isocodes.py 2021-08-17 17:16:44.650646524 -0400 -@@ -11,8 +11,9 @@ import sys - from urllib.request import urlopen - - --iso_3166_1_url = os.environ.get('ISO_3166_1_URL', 'https://salsa.debian.org/iso-codes-team/iso-codes/raw/master/data/iso_3166-1.json') --iso_639_3_url = os.environ.get('ISO_639_3_URL', 'https://salsa.debian.org/iso-codes-team/iso-codes/raw/master/data/iso_639-3.json') -+iso_3166_1_url = os.environ.get('ISO_3166_1_URL', 'https://salsa.debian.org/iso-codes-team/iso-codes/raw/main/data/iso_3166-1.json') -+iso_639_3_url = os.environ.get('ISO_639_3_URL', 'https://salsa.debian.org/iso-codes-team/iso-codes/raw/main/data/iso_639-3.json') -+iso_639_2_url = os.environ.get('ISO_639_2_URL', 'https://salsa.debian.org/iso-codes-team/iso-codes/raw/main/data/iso_639-2.json') - - langs = set() - countries = set() -@@ -28,6 +29,13 @@ with urlopen(iso_639_3_url) as f: - data = json.load(codecs.getreader('utf-8')(f)) - for entry in data['639-3']: - langs.add(entry.get('alpha_2') or entry['alpha_3']) -+# Need to check iso-639-2 for collective language codes not in iso-639-3 -+with urlopen(iso_639_2_url) as f: -+ data = json.load(codecs.getreader('utf-8')(f)) -+ for entry in data['639-2']: -+ entry_code = entry.get('alpha_2') or entry['alpha_3'] -+ if entry_code not in langs: -+ langs.add(entry_code) - - # Note that we are not pprint()ing the set directly because with - # Python 3 it results in curly brace set initializers that are not diff --git a/rpmlint.spec b/rpmlint.spec index 9f4a21a..40b4634 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,8 +1,8 @@ %bcond_with tests Name: rpmlint -Version: 2.1.0 -Release: 6%{?dist} +Version: 2.2.0 +Release: 1%{?dist} Summary: Tool for checking common errors in RPM packages License: GPLv2 URL: https://github.com/rpm-software-management/rpmlint @@ -13,12 +13,7 @@ Source2: licenses.toml Source3: scoring.toml Source4: users-groups.toml Source5: warn-on-functions.toml -Patch0: rpmlint-2.1.0-include-iso-639-2-collective-language-codes.patch -# Ignore hidden-file-or-dir for .cargo-checksum.json, merged upstream -Patch1: https://github.com/rpm-software-management/rpmlint/pull/700.patch -# Fix rpmlintrc load from cmdline -# v3 reflects final upstream commits -Patch2: rpmlint-2.1.0-fix-rpmlintrc-load-from-cmdline-v3.patch + BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} @@ -46,9 +41,6 @@ and source packages as well as spec files can be checked. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -b .iso-639-2 -%patch1 -p1 -b .700 -%patch2 -p1 -b .fix-rpmlintrc-load-from-cmdline # Don't lint the code or measure coverage in %%check sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' setup.cfg @@ -76,6 +68,9 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysc %{python3_sitelib}/rpmlint* %changelog +* Thu Dec 09 2021 Stephen Smoogen - 2.2.0-1 +- Update to upstream 2.2.0 + * Tue Dec 07 2021 Neal Gompa - 2.1.0-6 - Fix some rpmlint policy issues diff --git a/sources b/sources index 67a9198..70f11e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpmlint-2.1.0.tar.gz) = 75df896259b5c340c528357309b2e5e1ce574b7e5e55dff573a1a7808faa3617da799df37e7e65064952a16549225beb16c1e12ba22f2fe4976a69696ed66f46 +SHA512 (rpmlint-2.2.0.tar.gz) = 728f79384fbf927831da154777c7f5af70eafaef738f4796bf6b059b5eb718047d0d729bffef0b7544097895c84aed16d6d8a1ca11d7b0e0f80b5887747b9133