diff --git a/rpmlint-1.9-fix-uep.patch b/rpmlint-1.9-fix-uep.patch new file mode 100644 index 0000000..4d70b1d --- /dev/null +++ b/rpmlint-1.9-fix-uep.patch @@ -0,0 +1,55 @@ +diff -up rpmlint-rpmlint-1.9/SpecCheck.py.fixuep rpmlint-rpmlint-1.9/SpecCheck.py +--- rpmlint-rpmlint-1.9/SpecCheck.py.fixuep 2017-02-08 16:54:24.055208215 -0500 ++++ rpmlint-rpmlint-1.9/SpecCheck.py 2017-02-08 16:56:05.012862286 -0500 +@@ -404,8 +404,9 @@ class SpecCheck(AbstractCheck.AbstractCh + if res: + provs = Pkg.parse_deps(res.group(1)) + for prov in unversioned(provs): +- printWarning(pkg, 'unversioned-explicit-provides', +- prov) ++ if not prov.startswith('/'): ++ printWarning(pkg, 'unversioned-explicit-provides', ++ prov) + if compop_regex.search(prov): + printWarning(pkg, + 'comparison-operator-in-deptoken', +@@ -415,8 +416,9 @@ class SpecCheck(AbstractCheck.AbstractCh + if res: + obses = Pkg.parse_deps(res.group(1)) + for obs in unversioned(obses): +- printWarning(pkg, 'unversioned-explicit-obsoletes', +- obs) ++ if not obs.startswith('/'): ++ printWarning(pkg, 'unversioned-explicit-obsoletes', ++ obs) + if compop_regex.search(obs): + printWarning(pkg, + 'comparison-operator-in-deptoken', +diff -up rpmlint-rpmlint-1.9/test/spec/SpecCheck.spec.fixuep rpmlint-rpmlint-1.9/test/spec/SpecCheck.spec +--- rpmlint-rpmlint-1.9/test/spec/SpecCheck.spec.fixuep 2017-02-08 16:56:28.492316699 -0500 ++++ rpmlint-rpmlint-1.9/test/spec/SpecCheck.spec 2017-02-08 16:56:57.105651818 -0500 +@@ -17,6 +17,8 @@ BuildRoot: %{_tmppath}/%{name}-%{ve + Provides: unversioned-provides, versioned-provides = 1.0 + Obsoletes: versioned-obsoletes < 2.0 + Obsoletes: unversioned-obsoletes ++Obsoletes: /usr/bin/unversioned-but-filename ++Provides: /sbin/another-unversioned-but-filename + + %description + SpecCheck test. +diff -up rpmlint-rpmlint-1.9/test/test.SpecCheck.py.fixuep rpmlint-rpmlint-1.9/test/test.SpecCheck.py +--- rpmlint-rpmlint-1.9/test/test.SpecCheck.py.fixuep 2017-02-08 16:57:15.938214210 -0500 ++++ rpmlint-rpmlint-1.9/test/test.SpecCheck.py 2017-02-08 16:57:54.448319360 -0500 +@@ -25,10 +25,12 @@ class TestSpecCheck(unittest.TestCase): + in out) + self.assertTrue("unversioned-explicit-provides versioned-provides" + not in out) ++ self.assertTrue("unversioned-explicit-provides /" not in out) + self.assertTrue("unversioned-explicit-obsoletes unversioned-obsoletes" + in out) + self.assertTrue("unversioned-explicit-obsoletes versioned-obsoletes" + not in out) ++ self.assertTrue("unversioned-explicit-obsoletes /" not in out) + self.assertTrue("setup-not-quiet" in out) + + if __name__ == '__main__': diff --git a/rpmlint.spec b/rpmlint.spec index 3345651..74e312f 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -16,7 +16,7 @@ Name: rpmlint Version: 1.9 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Tool for checking common errors in RPM packages Group: Development/Tools License: GPLv2 @@ -37,6 +37,8 @@ Patch0: rpmlint-1.9-unicodefix.patch # Python 3.6rc1 (3.6.0) bytecode magic value # https://github.com/rpm-software-management/rpmlint/pull/86 (hand-rediffed) Patch1: rpmlint-1.9-py36magic.patch +# https://github.com/rpm-software-management/rpmlint/commit/a81fdca0185d5ed9868a6ddafca1812082029714 +Patch2: rpmlint-1.9-fix-uep.patch BuildArch: noarch %if %{with python3} BuildRequires: python3-devel @@ -89,6 +91,7 @@ and source packages as well as spec files can be checked. %setup -q -n %{name}-%{name}-%{version} %patch0 -p1 -b .unicodefix %patch1 -p1 -b .py36magic +%patch2 -p1 -b .fixuep sed -i -e /MenuCheck/d Config.py cp -p config config.example install -pm 644 %{SOURCE3} config @@ -138,6 +141,9 @@ make check PYTHON=%{python} PYTEST=%{pytest} FLAKE8=%{flake8} %{_mandir}/man1/rpmlint.1* %changelog +* Wed Feb 8 2017 Tom Callaway - 1.9-7 +- apply upstream fix to not demand versioned filename Provides/Obsoletes + * Thu Dec 29 2016 Adam Williamson - 1.9-6 - Update Python 3.6 magic bytecode value (github PR #7)