File rpmlint.spec of Package rpmlint

#
# spec file for package rpmlint (Version 0.84)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           rpmlint
BuildRequires:  rpm-python
Summary:        Rpm correctness checker
Version:        0.84
Release:        3.<RELEASE6>
Source0:        %{name}-%{version}.tar.bz2
Source1:        config
Source1001:     config.in
Source2:        DesktopTranslationCheck.py
Source3:        DuplicatesCheck.py
Source4:        CheckBuildRoot.py
Source5:        CheckExecDocs.py
Source6:        CheckPkgConfig.py
Source7:        LibraryPolicyCheck.py
Source8:        CheckCommonFiles.py
Source9:        CheckInitScripts.py
Source10:       CheckIconSizes.py
Source11:       BrandingPolicyCheck.py
Source12:       CheckKDE4Deps.py
Source13:       KMPPolicyCheck.py
Source14:       CheckSUIDPermissions.py
Source15:       CheckDBUSServices.py
Source100:      syntax-validator.py
Url:            http://rpmlint.zarb.org/
License:        GPL v2 or later
Group:          System/Packages
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       rpm-python, python, binutils, file, findutils, cpio, grep, bash
Requires:       desktop-file-utils
BuildArch:      noarch
Patch0:         rpmlint-suse.diff
Patch1:         old-rpm-compat.diff
Patch2:         suse-version.diff
Patch3:         disable-menu-check.diff
Patch4:         invalid-filerequires.diff
Patch5:         suse-bzip-bigger-than-100k.diff
Patch6:         suse-filesystem.diff
Patch7:         suse-checks.diff
Patch8:         suse-debuginfo.diff
Patch9:         no-doc-for-lib.diff
Patch10:        add-scoring-support.diff
Patch11:        suse-spec-bzip2.diff
Patch12:        usr-arch.diff
Patch13:        script-interpreter-only-for-exec-scripts.diff
Patch14:        sourced-dirs.diff
Patch16:        dependency-parsing.diff
Patch17:        docdata-examples.diff
Patch18:        suse-hide-unstripped-outside-build.diff
Patch19:        yast-provides.diff
Patch20:        xdg-paths-update.diff
Patch21:        fix-buildroot-test.diff
Patch22:        better-wrong-script.diff
Patch23:        buildroot-doc.diff
Patch24:        sysv5-init-checks.diff
Patch26:        ignore-non-readable-in-etc.diff
Patch27:        detailed-desktop-file-check.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
Patch38:        fix-patch-detection.diff
Patch39:        libtool-wrapper-check.diff
Patch41:        perl-versioned-rpath-deps.diff
Patch42:        check-cron-dependency.diff
Patch46:        locale-support.diff
Patch47:        noarch-lib64.diff
Patch49:        stricter-tags-check.diff
Patch50:        suse-no-run-ldconfig.diff
Patch51:        description-check.diff
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
Patch63:        suse-factory-config.diff
Patch65:        suse-shlib-devel-dependency.diff
Patch66:        suse-no-python-base.diff
Patch67:        suse-required-lsb-tags.diff
Patch68:        more-verbose-lsb-check.diff
Patch69:        useless-requires-doc.diff
Patch70:        subprocess-support.diff
Patch71:        suse-binary-info-compile-opts.diff
%py_requires

%description
Rpmlint is a tool to check common errors on rpm packages. Binary and
source packages can be checked.



Authors:
--------
    Frederic Lepied <flepied@mandriva.com>
    Gwenole Beauchesne <gbeauchesne@mandriva.com>

%prep
%setup -q -n rpmlint-%{version}
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14
%patch16
%patch17
%patch18
%patch19
%patch20
%patch21
%patch22
%patch23
%patch24
%patch26
%patch27
%patch29
%patch30
%patch31
%patch33
%patch34
%patch35
%patch37
%patch38
%patch39
%patch41
%patch42
%patch46
%patch47
%patch49
%patch50
%patch51
%patch52
%patch54
%patch57
%patch58
%patch60
%patch62
%patch63
%patch65
%patch66
%patch67
%patch68
%patch69
%patch70
%patch71
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
cp -p %{SOURCE4} .
cp -p %{SOURCE5} .
cp -p %{SOURCE6} .
cp -p %{SOURCE7} .
cp -p %{SOURCE8} .
cp -p %{SOURCE9} .
cp -p %{SOURCE10} .
cp -p %{SOURCE11} .
cp -p %{SOURCE12} .
cp -p %{SOURCE13} .
cp -p %{SOURCE14} .
cp -p %{SOURCE15} .

%build
make

%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

%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
%dir /etc/rpmlint
/usr/share/man/man1/rpmlint.1.gz

%changelog
* Tue Dec 16 2008 lnussel@suse.de
- add check for dbus services (bnc#459451)
* Thu Nov 20 2008 dmueller@suse.de
- only test for regular files in ChkPkgConfig check
* Fri Nov 07 2008 dmueller@suse.de
- add check for otherproviders() in branding packages
- correct kde4 related dependency checkers to not give false advises
- check for wrong-arch references in pkgconfig files (graphviz)
- lower false positives of untranslated-desktop files check
- support for checking .comment.SUSE.OPTs. real check has been
  left out for now
* Tue Nov 04 2008 lnussel@suse.de
- generate a different error for directories with setuid/setgid bit
* Tue Oct 28 2008 lnussel@suse.de
- add check for /etc/permissions violations
* Fri Oct 03 2008 dmueller@suse.de
- update to 0.84:
  * remove upstreamed patches
  * no significant changes
* Wed Sep 03 2008 dmueller@suse.de
- add description for useless-explicit-requires (bnc#405887)
* Wed Aug 20 2008 dmueller@suse.de
- rediff patch
* Mon Aug 18 2008 schwab@suse.de
- Fix name of completions file.
* Tue Aug 12 2008 dmueller@suse.de
- be more verbose in the lsb init script checks
* Mon Aug 04 2008 dmueller@suse.de
- change mandatory-lsb-keyword check to be in line with insserv
* Tue Jul 29 2008 dmueller@suse.de
- remove python-base in the warning as it is confusing.
  the warning itself is still valid though
- fix config typo
* Mon Jul 21 2008 dmueller@suse.de
- enable non-conffile-in-etc warning (bnc#409643)
- fix shlib policy dependency warnings (bnc#405280)
* Tue Jul 01 2008 dmueller@suse.de
- update cron dependency checker (bnc#400921)
* Sun Jun 29 2008 schwab@suse.de
- No PT_GNU_STACK on ia64 and ppc64.
* Sat Jun 28 2008 dmueller@suse.de
- also read /etc/rpmlint/factory.config
* Fri Jun 27 2008 dmueller@suse.de
- fix typo in suse-version check
* Sun Jun 22 2008 dmueller@suse.de
- update to 0.83:
  * removed upstreamed patches
  * a couple of new checks, bugfixes
* Wed Jun 18 2008 dmueller@suse.de
- fix exception in tags check (bnc#399655)
- add a warning for self-conflicts
* Thu Jun 05 2008 dmueller@suse.de
- fix naming policy check for lib64 based archs (bnc#392524)
* Tue May 13 2008 dmueller@suse.de
- fix typo in kde4 deps check
* Mon May 05 2008 dmueller@suse.de
- fix typo in branding policy check
* Fri May 02 2008 dmueller@suse.de
- readd cron check
- fix kmp check after the policy change
* Wed Apr 30 2008 dmueller@suse.de
- add checker for correct deps of kde4 packages
- add check for mono requirements (BNC#381979)
- improve branding policy checks
- add support for weak/reverse dependencies
- add checks for percent's in weak/reverse dependencies
- add checks for incorrect kmp dependencies (bnc384084#)
* Tue Apr 22 2008 dmueller@suse.de
- fix exception on testing for unversioned branding provides
* Mon Apr 21 2008 dmueller@suse.de
- suppress script warnings about /var/adm/fillup-templates (bnc#379601)
- add start of a branding policy checker
* Fri Apr 18 2008 jblunck@suse.de
- Fix some regex in BinariesCheck
* Thu Apr 17 2008 jblunck@suse.de
- Add symtab and debuginfo tests for static libs
* Thu Mar 13 2008 dmueller@suse.de
- autogenerate users/groups from autobuild (bnc#374601)
- suppress non-devel buildrequire dependency for tcl
- fix licenses symlink handling (bnc#370364)
- allow /usr/share/locale/be@latin (bnc#370418)
* Tue Mar 11 2008 dmueller@suse.de
- fix some false positives
* Mon Mar 10 2008 dmueller@suse.de
- add check for a really short description
* Thu Mar 06 2008 dmueller@suse.de
- be less restrictive in pkgconfig checks
* Mon Mar 03 2008 dmueller@suse.de
- suppress tag-not-utf8 warnings for now
* Thu Feb 28 2008 dmueller@suse.de
- add check for %%run_ldconfig
* Thu Feb 28 2008 dmueller@suse.de
- improve check output
* Wed Feb 27 2008 dmueller@suse.de
- improved tags check
- cleanups
* Mon Feb 25 2008 dmueller@suse.de
- reduce package-size-check false positives
- add another postscript check
* Tue Feb 19 2008 dmueller@suse.de
- fix typo in sorting routine
* Fri Feb 15 2008 dmueller@suse.de
- updated spec file name-guessing to catch more cases
- updated dot-in-identifier check
- suppression updates
* Tue Feb 12 2008 dmueller@suse.de
- update to 0.82:
  * some patches were upstreamed
  * small bugfixes
- rework fix for bnc#354177 to consider python bytecode
  arch-independent again, but catch it in arch-dependent paths
* Sat Feb 09 2008 dmueller@suse.de
- fix some minor buglets
* Tue Feb 05 2008 dmueller@suse.de
- consider python bytecode to not be arch independent (bnc#354177)
- improve postcheck to ignore unexpanded macros in comments (bnc#355306)
- check binary rpath for perl version dependency (bnc#355053)
- add check for unversioned self-provides
- update suse checks from SVN
- check for dot's in dependencies - forbidden by autobuild policy
* Wed Jan 23 2008 dmueller@suse.de
- improve documentation
* Mon Jan 14 2008 dmueller@suse.de
- check for libtool wrapper scripts being packaged (#353240)
* Wed Dec 12 2007 dmueller@suse.de
- reapply patch-detection fix
* Tue Dec 04 2007 dmueller@suse.de
- add suppression for libzypp
- fix wrong indentation in verify-buildrequires
* Fri Nov 30 2007 dmueller@suse.de
- bugfixes in check-mkdir-buildroot
- bugfix in percent-post check
- check for buildroot in %%post scriptlets
- remove abused legacy shared lib policy exceptions
- suppression update
* Tue Nov 27 2007 dmueller@suse.de
- fix suppression for internal packages
* Fri Nov 23 2007 dmueller@suse.de
- add suppression for non-remote_fs on boot.* (#340588)
* Wed Nov 21 2007 dmueller@suse.de
- add warning for non-utf8 filenames (#343216)
* Tue Nov 06 2007 dmueller@suse.de
- more prereq checks
* Mon Nov 05 2007 dmueller@suse.de
- suppression update
- add more prereq checks
* Fri Nov 02 2007 dmueller@suse.de
- fix prereq parsing code (#336712)
- update the obsolete-suse-version check to include 10.0 and 11.0
- fix prereq checks to check for coreutils
* Wed Oct 31 2007 dmueller@suse.de
- reporting format change-back got rejected by upstream,
  so adopt other changes to deal with it
* Tue Oct 30 2007 dmueller@suse.de
- change back reporting format to list the severity
  first
- add more legacy suppressions found by library policy
  fix
* Mon Oct 29 2007 dmueller@suse.de
- also check for Library Policy errors in /opt/kde3/lib
* Mon Oct 29 2007 dmueller@suse.de
- update to 0.81:
  * various new checks, some bugfixes
  * many patches upstreamed
  * rediffed all other patches
- NOTE: output format has changed from
  W: package check-id ..
  to
  package.<arch>: W: check-id ..
* Sun Oct 07 2007 dmueller@suse.de
- another round of updates
* Fri Oct 05 2007 dmueller@suse.de
- library policy legacy suppression update
* Mon Oct 01 2007 mmarek@suse.cz
- added 'mysql' to the list of standard users and groups
- removed 'jonas' (dropped package) from that list
* Tue Sep 25 2007 dmueller@suse.de
- update library policy checker for libgcc and libcaca
- check for /usr/share/gnome/help in documentation checks (#310134)
* Thu Sep 20 2007 dmueller@suse.de
- add check for non-whitelisted filedependencies (#326803)
* Mon Sep 03 2007 dmueller@suse.de
- fix hardlink check for /bin
* Sat Sep 01 2007 schwab@suse.de
- Fix last change.
* Fri Aug 31 2007 dmueller@suse.de
- fix off-by-one in hardlink check
* Fri Aug 31 2007 dmueller@suse.de
- fix exception in DuplicatesCheck
* Thu Aug 30 2007 dmueller@suse.de
- fix buildroot false positive
- check for hardlinks across partitions (#304167)
* Wed Aug 29 2007 dmueller@suse.de
- improve mkdir-installroot check
- fix rpmlint package regarding check above ;)
* Wed Aug 29 2007 mmarek@suse.cz
- improved the non-devel-buildrequires check
- added some default filters for non-devel-buildrequires and
  unneccessary-buildrequires
* Thu Aug 23 2007 dmueller@suse.de
- check for wrong cleaning of buildroot in %%install (#300232)
- check for obscure and unneccessary buildrequires
- add an icon size check (#163547)
* Tue Aug 21 2007 dmueller@suse.de
- refine the $remote_fs dependency check
* Sun Aug 12 2007 dmueller@suse.de
- suppression update
* Sat Aug 11 2007 dmueller@suse.de
- improved macro checks
- documentation update
* Fri Aug 10 2007 dmueller@suse.de
- detect makefile junk (#217472)
- suppression update
- fix a couple of false positives
* Tue Jul 31 2007 dmueller@suse.de
- fix package-with-huge-docs check to not complain about
  documentation-only packages
- remove verbosity from the shared library packaging policy check
* Wed Jul 25 2007 dmueller@suse.de
- fix man page check false positives
- make package-with-huge-docs check less verbose
* Tue Jul 17 2007 dmueller@suse.de
- accept lua as a builtin shell
- fix false positives on filesystem package
- add check for init scrips missing $remote_fs
* Wed Jul 11 2007 dmueller@suse.de
- adjust library policy suppressions for opal and pwlib (#290347)
- fix readme check (#291150)
* Mon Jul 09 2007 dmueller@suse.de
- its also a devel package if it provides a -devel subpackage (#289735)
* Wed Jul 04 2007 dmueller@suse.de
- suppress %%config check for now (#286231)
* Tue Jun 26 2007 dmueller@suse.de
- fix typo in devel-rpmgroup check
* Mon Jun 25 2007 dmueller@suse.de
- another update list of legacy packages
* Sat Jun 23 2007 dmueller@suse.de
- update list of legacy packages
* Fri Jun 22 2007 dmueller@suse.de
- suppressions for mono related packages (#282121)
* Fri Jun 22 2007 dmueller@suse.de
- fix the bzip2/gzip confusion again
* Fri Jun 22 2007 dmueller@suse.de
- update list of legacy packages
* Fri Jun 22 2007 dmueller@suse.de
- add list of legacy package names with non-policy conform
  package name
- check updates from SVN
* Thu Jun 21 2007 dmueller@suse.de
- suppression update
- suppress devel-file-in-non-devel package if its just a compat
  symlink to another .so
- avoid unstripped binaries warnings in BETA
- fix filesystem lint false positives
* Wed Jun 13 2007 dmueller@suse.de
- suppression update
- add descriptions to sysv5 init checks
- use readelf for binary info to improve performace
- check if source patch/tarballs is not bzip2'ed and bigger
  than 100k (suse packaging conventions requirement)
- check if package contains excessive sized documentation
* Mon Jun 11 2007 dmueller@suse.de
- hide errors related to .packlist files from perl
  still need to figure out though why they're there
* Mon Jun 11 2007 dmueller@suse.de
- fix build
* Sat Jun 09 2007 dmueller@suse.de
- make the buildroot check work
- make the buildroot check factor 10-15 faster
- fix the pkgconfig check
* Fri Jun 08 2007 dmueller@suse.de
- fix warning-hide hack (#279865)
- description update
* Fri Jun 08 2007 dmueller@suse.de
- hide unstripped-binary-or-object warning outside build (#279865)
- fix typo in library policy check
- adopt library checks for suse library packaging policy
- add check for unnecessarily packaged files
- description update
- suppression update
* Thu May 31 2007 dmueller@suse.de
- suppression update
- fix various checks
- add checks for init scripts
* Wed May 30 2007 dmueller@suse.de
- update LibraryPolicy Checker
* Tue May 29 2007 dmueller@suse.de
- suppression update
- fix XDG menu checker to also include non-/usr paths
- fix ghost-file-creation check to skip missingok files (#278761)
* Mon May 28 2007 dmueller@suse.de
- suppression-update
- Library Policy Checker crash fixes (#278592)
* Sat May 26 2007 dmueller@suse.de
- add description for missing lsb tags check
- fix obsolete-not-provided for yast2-provides
- fix devel-file check matching module names (e.g. apache2)
* Fri May 25 2007 dmueller@suse.de
- avoid spurious executable warnings for docdatadir/examples
- add LibraryPolicy checker from Richard (warning only)
- suppression update
* Thu May 24 2007 dmueller@suse.de
- fix suppression for qa_ packages
- fix exceptions caused by DesktopTranslation check
- fix crash caused by trailing colons in requires
* Thu May 24 2007 dmueller@suse.de
- fix file paths in Duplicate and DesktopTranslation checks
* Thu May 24 2007 dmueller@suse.de
- update sourced-dirs list
- add some more standard users
- add suppression for devel-file-in-non-devel package in java
- filter some more noise
* Wed May 23 2007 dmueller@suse.de
- add descriptions for obsolete suse version check
- suppress some more noise
- don't run duplicates check for source rpms
* Wed May 23 2007 dmueller@suse.de
- suppress errors for cross-avr-*
- suppress devel-packaging-naming errors for gcc41, gcc42
* Wed May 23 2007 dmueller@suse.de
- group output by check and put errors last (#276943)
- suppress some more noise (#277308)
- suppress %%ifarch-applied-patch (#277316)
- more suppressions for misnamed devel packages (#277317)
* Wed May 23 2007 dmueller@suse.de
- Suppress errors about platform dependent code in /usr/share
  if its inside a platform-dependant subdirectory
- Suppress devel-file-in-non-devel-package for systemtap (#277338)
- Make sure that the package fails if there is any syntax
  error anywhere
* Tue May 22 2007 dmueller@suse.de
- typo fix
* Tue May 22 2007 dmueller@suse.de
- update config
* Sat May 19 2007 coolo@suse.de
- add three more checks
* Thu May 17 2007 dmueller@suse.de
- update Duplicates Check to not crash on ghost files
* Tue May 15 2007 dmueller@suse.de
- suppress bzip2 related warnings
- no documentation for lib packages
* Tue May 15 2007 coolo@suse.de
- add a check how much space is wasted by duplicated files
* Mon May 14 2007 dmueller@suse.de
- remove rpm-devel requirement
- add check for filerequires on /usr/bin/env
- fix syntax errors in previous change
* Mon May 14 2007 coolo@suse.de
- add a check for /opt/kde3 not in %%doc or in %%lang
- fix files not in %%lang check
* Wed May 09 2007 dmueller@suse.de
- remove tabs from sources
* Mon May 07 2007 dmueller@suse.de
- fix desktop file check (#252482)
* Sat May 05 2007 dmueller@suse.de
- allow extensions to LSB starting with "X-" (#271495)
* Fri May 04 2007 dmueller@suse.de
- remove check for usedforbuild tag. magic happens and
  it is created automatically
* Wed Apr 18 2007 dmueller@suse.de
- add spec checks for obsolete suse hacks
* Wed Apr 18 2007 dmueller@suse.de
- update to 0.80:
  * many more checks
- suppression updates
* Thu Apr 05 2007 dmueller@suse.de
- suppressions for OpenOffice and linux-kernel-headers
* Thu Apr 05 2007 dmueller@suse.de
- update suppressions
* Wed Nov 08 2006 dmueller@suse.de
- fix compatibility with rpm-python of sles9 (#216081)
* Mon Sep 11 2006 dmueller@suse.de
- update to 0.77:
  * updated checks regarding FHS compliance
  * some python-lint fixlets
* Wed Apr 12 2006 dmueller@suse.de
- update to 0.76
* Fri Mar 24 2006 dmueller@suse.de
- update to 0.75
* Tue Mar 21 2006 dmueller@suse.de
- suppress some glibc related errors (#157906)
* Wed Feb 22 2006 dmueller@suse.de
- add km to the list of valid locales
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 09 2006 dmueller@suse.de
- add check for untranslated desktop files
* Tue Dec 20 2005 dmueller@suse.de
- fix i18n subdir check
* Thu Dec 15 2005 dmueller@suse.de
- filter init-script-name-with-dot /etc/init.d/boot.* and
  script-without-shellbang /etc/profile.d/*
* Thu Nov 24 2005 dmueller@suse.de
- update to 0.71
- strip "requires-on-release" for now, too much noise
* Fri Jul 22 2005 dmueller@suse.de
- ignore dir-or-file-in-opt
* Mon Jun 20 2005 coolo@suse.de
- update to 0.70
* Thu Jun 16 2005 dmueller@suse.de
- upgrade to rpmlint 0.69
- split out the config file from the SUSE patch
* Thu Nov 11 2004 coolo@suse.de
- remove some MDK specific tests and add some SUSE specific tests
* Mon Feb 23 2004 hmacht@suse.de
- building as non-root
* Wed Jun 11 2003 coolo@suse.de
- initial version
openSUSE Build Service is sponsored by