# # spec file for package rpmlint # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # #!BuildIgnore: rpmlint-mini Name: rpmlint BuildRequires: obs-service-format_spec_file BuildRequires: rpm-python BuildRequires: xz Summary: Rpm correctness checker License: GPL-2.0+ Group: System/Packages Version: 1.5 Release: 0 Source0: https://downloads.sourceforge.net/project/rpmlint/rpmlint-%{version}.tar.xz Source1: rpmlint-checks-master.tar.gz Source2: config Source3: config.in Source10: rpmgroups.config Source11: pie.config Source12: licenses.config Source100: syntax-validator.py Url: https://sourceforge.net/projects/rpmlint/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: /usr/bin/readelf Requires: bash Requires: checkbashisms Requires: cpio Requires: dash Requires: desktop-file-utils Requires: file Requires: findutils Requires: python-magic Requires: rpm-python BuildArch: noarch # # Read README.packaging.txt before making any changes to this # package # Patch0: rpmlint-suse.diff Patch1: suse-checks.diff Patch2: suse-version.diff Patch3: suse-url-check.diff Patch4: invalid-filerequires.diff Patch5: suse-python3-naming-policy.diff Patch6: suse-filesystem.diff Patch7: suse-pkg-config-check.diff Patch8: suse-binarieschecks.diff Patch9: no-doc-for-lib.diff Patch10: add-scoring-support.diff Patch11: suse-filter-exception.diff Patch12: usr-arch.diff Patch13: script-interpreter-only-for-exec-scripts.diff Patch14: sourced-dirs.diff Patch15: suse-filter-more-verbose.diff Patch17: docdata-examples.diff Patch19: yast-provides.diff Patch20: xdg-paths-update.diff Patch22: better-wrong-script.diff Patch23: buildroot-doc.diff Patch24: sysv5-init-checks.diff Patch26: ignore-non-readable-in-etc.diff Patch29: rpmgroup-checks.diff Patch30: devel-provide-is-devel-package.diff Patch31: only-reg-files-are-scripts.diff Patch33: check-buildroot-during-install.diff Patch34: verify-buildrequires.diff Patch35: fix-versioned-prereq.diff Patch37: buildroot-in-scripts.diff Patch39: libtool-wrapper-check.diff Patch41: perl-versioned-rpath-deps.diff Patch42: suse-check-optional-dependencies.diff Patch46: locale-support.diff # not is also in CheckFilelist.py Patch47: noarch-lib64.diff Patch49: stricter-tags-check.diff Patch50: suse-no-run-ldconfig.diff Patch51: description-check.diff # this is the wrong place here Patch52: suppress-for-perl-python.diff Patch54: locale-update.diff Patch57: suse-mono-deps-checks.diff Patch58: add-weak-dependencies.diff Patch60: selfconflicts-provide.diff Patch62: no-badness-return.diff Patch65: suse-shlib-devel-dependency.diff Patch67: suse-required-lsb-tags.diff Patch68: more-verbose-lsb-check.diff Patch71: suse-binary-info-compile-opts.diff Patch72: version-control-internal-file.diff Patch73: avoid-mismatched-libregex.diff Patch74: filename-non-utf8-exception.diff Patch75: stricter-interpreter-check.diff Patch76: confusing-invalid-spec-name.patch Patch77: rpmlint-pkg-quoting.diff Patch78: suse-g-ir-chech.diff Patch80: remove-expand-macros.diff Patch81: suse-whitelist-opensuse.diff Patch84: extend-suse-conffiles-check.diff Patch85: suse-changelog.patch Patch86: suse-rclink-check.diff Patch87: compressed-backup-regex.diff # accepted upstream Patch88: suse-speccheck-utf8.diff Patch89: suse-python-abi-check.diff # PATCH-FIX-OPENSUSE: saschpe@suse.de - Don't complain about missing man-pages for rc-scripts Patch91: suse-manpages-for-rc-scripts.patch %py_requires %description Rpmlint is a tool to check common errors on rpm packages. Binary and source packages can be checked. %prep %setup -q -n rpmlint-%{version} -a1 %patch0 %patch1 %patch2 %patch3 %patch4 %patch5 %patch6 %patch7 %patch8 %patch9 #%patch10 %patch11 %patch12 %patch13 %patch14 %patch15 %patch17 %patch19 %patch20 %patch22 %patch23 %patch24 #%patch26 %patch29 %patch30 %patch31 # needs rediff #%patch33 #%patch34 #%patch35 %patch37 %patch39 #%patch41 %patch42 #%patch46 %patch47 #%patch49 %patch50 %patch51 #%patch52 ### rediff! #%patch54 #%patch57 %patch58 %patch60 %patch62 %patch65 #%patch67 #%patch68 #%patch71 %patch72 %patch73 %patch74 %patch75 %patch76 -p1 %patch77 %patch78 %patch80 %patch81 %patch84 %patch85 %patch86 %patch87 %patch88 %patch89 %patch91 -p1 cp -p %{SOURCE2} . # Only move top-level python files chmod 0755 rpmlint-checks-master/*.py mv rpmlint-checks-master/*.py . %build make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT # the provided bash-completion does not work and only prints bash errors rm -rf $RPM_BUILD_ROOT/etc/bash_completion.d mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config # make sure that the package is sane python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config %__install -m 644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/rpmlint/ %__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/ cp %{SOURCE12} licenses.config # note there is a tab character behind the -d, so don't copy&paste lightly cut '-d ' -f1 /usr/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config done %__install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,0755) %doc COPYING ChangeLog INSTALL README* %{_prefix}/bin/* %{_prefix}/share/rpmlint %config(noreplace) /etc/rpmlint/config %config %{_sysconfdir}/rpmlint/rpmgroups.config %config %{_sysconfdir}/rpmlint/pie.config %config %{_sysconfdir}/rpmlint/licenses.config %dir /etc/rpmlint /usr/share/man/man1/rpmlint.1.gz %changelog