2008-04-17 04:52:37 +02:00
|
|
|
#
|
2011-01-14 14:41:20 +01:00
|
|
|
# spec file for package rpmlint
|
2008-04-17 04:52:37 +02:00
|
|
|
#
|
2019-12-10 15:48:51 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-04-17 04:52:37 +02:00
|
|
|
#
|
2008-08-06 01:56:12 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-11-28 13:04:28 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-04-17 04:52:37 +02:00
|
|
|
#
|
|
|
|
|
2012-01-11 18:32:22 +01:00
|
|
|
|
2008-04-17 04:52:37 +02:00
|
|
|
Name: rpmlint
|
2019-01-13 15:33:18 +01:00
|
|
|
Version: 1.11
|
2017-10-01 14:53:30 +02:00
|
|
|
Release: 0
|
2017-10-24 15:44:17 +02:00
|
|
|
Summary: RPM file correctness checker
|
2018-03-26 12:30:54 +02:00
|
|
|
License: GPL-2.0-or-later
|
2011-12-13 18:13:54 +01:00
|
|
|
Group: System/Packages
|
2019-11-28 13:04:28 +01:00
|
|
|
URL: https://github.com/rpm-software-management/rpmlint
|
2015-11-26 11:24:13 +01:00
|
|
|
Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz
|
2015-10-14 16:27:51 +02:00
|
|
|
Source1: rpmlint-checks-master.tar.xz
|
2012-09-26 15:45:06 +02:00
|
|
|
Source2: config
|
|
|
|
Source11: pie.config
|
|
|
|
Source12: licenses.config
|
2014-01-30 14:29:11 +01:00
|
|
|
Source99: README.packaging.txt
|
2008-04-17 04:52:37 +02:00
|
|
|
Source100: syntax-validator.py
|
2015-04-10 16:35:46 +02:00
|
|
|
Patch00: rpmlint-suse.diff
|
|
|
|
Patch01: suse-checks.diff
|
|
|
|
Patch02: suse-version.diff
|
|
|
|
Patch03: suse-url-check.diff
|
|
|
|
Patch04: suse-python3-naming-policy.diff
|
2017-09-28 13:35:09 +02:00
|
|
|
Patch05: suse-tests-without-badness.patch
|
2015-04-10 16:35:46 +02:00
|
|
|
Patch06: suse-pkg-config-check.diff
|
|
|
|
Patch07: suse-binarieschecks.diff
|
|
|
|
Patch08: no-doc-for-lib.diff
|
|
|
|
Patch09: suse-filter-exception.diff
|
2016-04-06 16:18:58 +02:00
|
|
|
Patch10: suse-spdx-license-exceptions.patch
|
2017-09-28 20:23:54 +02:00
|
|
|
Patch11: suse-skip-macro-expansion.diff
|
2016-04-06 16:18:58 +02:00
|
|
|
Patch23: suse-filter-more-verbose.diff
|
|
|
|
Patch24: docdata-examples.diff
|
|
|
|
Patch25: yast-provides.diff
|
|
|
|
Patch29: rpmgroup-checks.diff
|
|
|
|
Patch30: devel-provide-is-devel-package.diff
|
|
|
|
Patch31: only-reg-files-are-scripts.diff
|
2019-02-02 09:28:03 +01:00
|
|
|
Patch32: 0001-ZipCheck-Also-ignore-RuntimeError.patch
|
2016-04-06 16:18:58 +02:00
|
|
|
Patch40: no-badness-return.diff
|
|
|
|
Patch41: suse-shlib-devel-dependency.diff
|
|
|
|
Patch49: extend-suse-conffiles-check.diff
|
|
|
|
Patch51: suse-speccheck-utf8.diff
|
|
|
|
Patch54: suse-ignore-specfile-errors.diff
|
|
|
|
Patch55: invalid-filerequires.diff
|
|
|
|
Patch57: check-for-self-provides.diff
|
2017-09-30 10:27:35 +02:00
|
|
|
Patch58: remove-ghostfile-checks.diff
|
2017-09-30 16:55:07 +02:00
|
|
|
Patch63: fix-diag-sortorder.diff
|
2017-11-16 11:51:37 +01:00
|
|
|
Patch72: rpmlint-slpp-NUM-NUM.patch
|
2018-07-11 11:09:56 +02:00
|
|
|
Patch77: suse-rpmlint-all-pie.patch
|
2019-07-24 11:18:26 +02:00
|
|
|
Patch78: add-check-for-a-non-zero-.text-segment-in-.a-archive.patch
|
2019-10-17 15:46:28 +02:00
|
|
|
Patch79: rpm415-workaround.diff
|
2019-01-23 22:53:50 +01:00
|
|
|
BuildRequires: desktop-file-utils
|
2017-10-01 14:53:30 +02:00
|
|
|
BuildRequires: obs-service-format_spec_file
|
|
|
|
BuildRequires: python3-flake8
|
2019-01-23 22:53:50 +01:00
|
|
|
BuildRequires: python3-magic
|
2017-10-01 14:53:30 +02:00
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-rpm
|
|
|
|
BuildRequires: xz
|
|
|
|
#!BuildIgnore: rpmlint-mini
|
|
|
|
Requires: %{_bindir}/readelf
|
|
|
|
Requires: bash
|
|
|
|
Requires: checkbashisms
|
|
|
|
Requires: cpio
|
|
|
|
Requires: dash
|
|
|
|
Requires: desktop-file-utils
|
|
|
|
Requires: file
|
|
|
|
Requires: findutils
|
|
|
|
Requires: python3-magic
|
|
|
|
Requires: python3-pybeam
|
|
|
|
Requires: python3-rpm
|
|
|
|
Requires: python3-xml
|
2015-04-10 16:35:46 +02:00
|
|
|
BuildArch: noarch
|
2012-12-07 18:20:22 +01:00
|
|
|
|
2008-04-17 04:52:37 +02:00
|
|
|
%description
|
2017-10-24 15:44:17 +02:00
|
|
|
rpmlint is a tool to check common errors on RPM packages. Binary and
|
2008-04-17 04:52:37 +02:00
|
|
|
source packages can be checked.
|
|
|
|
|
|
|
|
%prep
|
2015-11-26 11:24:13 +01:00
|
|
|
%autosetup -n rpmlint-rpmlint-%{version} -a1 -p1
|
2015-06-30 10:52:30 +02:00
|
|
|
|
2012-09-26 15:45:06 +02:00
|
|
|
cp -p %{SOURCE2} .
|
2017-10-01 13:59:23 +02:00
|
|
|
chmod a-x rpmlint-checks-master/*.py
|
2017-10-01 14:53:30 +02:00
|
|
|
# Only move top-level python files
|
2012-09-26 15:45:06 +02:00
|
|
|
mv rpmlint-checks-master/*.py .
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
%build
|
2017-10-01 14:53:30 +02:00
|
|
|
make %{?_smp_mflags} PYTHON=%{_bindir}/python3
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
%install
|
2017-10-24 15:44:17 +02:00
|
|
|
%make_install PYTHON=%{_bindir}/python3
|
2008-09-26 15:19:50 +02:00
|
|
|
# the provided bash-completion does not work and only prints bash errors
|
2017-10-01 14:53:30 +02:00
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
|
|
|
|
mv %{buildroot}%{_sysconfdir}/rpmlint/config %{buildroot}%{_datadir}/rpmlint/config
|
|
|
|
head -n 8 %{buildroot}%{_datadir}/rpmlint/config > %{buildroot}%{_sysconfdir}/rpmlint/config
|
2008-04-17 04:52:37 +02:00
|
|
|
# make sure that the package is sane
|
2017-10-01 14:53:30 +02:00
|
|
|
for f in %{buildroot}%{_datadir}/rpmlint/*.py %{buildroot}%{_datadir}/rpmlint/config; do
|
2017-09-30 09:51:17 +02:00
|
|
|
echo $f
|
|
|
|
env LC_ALL=C.utf8 python3 -tt %{SOURCE100} $f
|
|
|
|
done
|
2017-10-01 14:53:30 +02:00
|
|
|
install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
|
2011-12-19 10:45:15 +01:00
|
|
|
|
2012-09-26 15:45:06 +02:00
|
|
|
cp %{SOURCE12} licenses.config
|
2011-12-19 10:45:15 +01:00
|
|
|
# note there is a tab character behind the -d, so don't copy&paste lightly
|
2017-10-01 14:53:30 +02:00
|
|
|
cut '-d ' -f1 %{_prefix}/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
|
2011-12-19 10:45:15 +01:00
|
|
|
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
|
|
|
done
|
2018-02-15 12:45:31 +01:00
|
|
|
# add some deprecated licenses we allow for now
|
2018-02-20 11:07:31 +01:00
|
|
|
for l in AGPL-3.0 AGPL-3.0+ GFDL-1.1 GFDL-1.1+ GFDL-1.2 GFDL-1.2+ GFDL-1.3 GFDL-1.3+ GPL-3.0-with-GCC-exception \
|
2018-02-20 14:11:54 +01:00
|
|
|
GPL-2.0-with-classpath-exception GPL-2.0-with-font-exception SUSE-LGPL-2.1+-with-GCC-exception SUSE-NonFree \
|
2018-02-20 11:07:31 +01:00
|
|
|
GPL-1.0+ GPL-1.0 GPL-2.0+ GPL-2.0 GPL-3.0+ GPL-3.0 LGPL-2.0 LGPL-2.0+ LGPL-2.1+ LGPL-2.1 LGPL-3.0+ LGPL-3.0; do
|
2018-02-15 12:45:31 +01:00
|
|
|
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
|
|
|
done
|
2017-10-01 14:53:30 +02:00
|
|
|
install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2016-01-28 08:20:40 +01:00
|
|
|
%check
|
2017-10-01 14:53:30 +02:00
|
|
|
env PYTHON=%{_bindir}/python3 ./test.sh
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
%files
|
2017-10-01 14:53:30 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc README*
|
|
|
|
%{_bindir}/rpmlint
|
|
|
|
%{_bindir}/rpmdiff
|
|
|
|
%{_datadir}/rpmlint
|
|
|
|
%config(noreplace) %{_sysconfdir}/rpmlint/config
|
2011-05-10 13:44:35 +02:00
|
|
|
%config %{_sysconfdir}/rpmlint/pie.config
|
2011-11-29 13:08:58 +01:00
|
|
|
%config %{_sysconfdir}/rpmlint/licenses.config
|
2017-10-01 14:53:30 +02:00
|
|
|
%dir %{_sysconfdir}/rpmlint
|
|
|
|
%{_mandir}/man1/rpmlint.1%{ext_man}
|
|
|
|
%{_mandir}/man1/rpmdiff.1%{ext_man}
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
%changelog
|