SHA256
1
0
forked from pool/rpmlint

Accepting request 30231 from Base:System

Copy from Base:System/rpmlint based on submit request 30231 from user lnussel

OBS-URL: https://build.opensuse.org/request/show/30231
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=50
This commit is contained in:
OBS User autobuild 2010-01-27 17:18:50 +00:00 committed by Git OBS Bridge
parent e56d0fdbfa
commit 5e20a03ee9
16 changed files with 388 additions and 116 deletions

View File

@ -57,12 +57,11 @@ class CheckAlternativesGhostFiles(AbstractCheck.AbstractCheck):
files = pkg.files()
ghost_files = pkg.ghostFiles()
for af in alt_files:
for af in (af for af in alt_files if not af in ghost_files):
if af in files:
printWarning(pkg, 'alternative-file-is-not-marked-as-ghost %s' % (af))
continue
if not af in ghost_files:
printWarning(pkg, 'no-ghost-alternative-file %s' % af)
printWarning(pkg, 'generic-name-not-marked-as-ghost %s' % (af))
else:
printWarning(pkg, 'generic-name-not-in-filelist %s' % af)
check=CheckAlternativesGhostFiles()
@ -70,13 +69,13 @@ check=CheckAlternativesGhostFiles()
if Config.info:
addDetails(
'alternative-file-is-not-marked-as-ghost',
'''The alternative file is listed in filelist, but not marked as a ghost, which
may cause a problems during update. Mark it as a %ghost.''',
'generic-name-not-marked-as-ghost',
'''The generic name is not marked as a ghost, which may cause a problems during
update. Mark it as a %ghost in %files section.''',
'no-ghost-alternative-file',
'''The alternative file is not in a filelist, add it to list marked as %ghost.
Note: this error will be raised, if you use a hash ($) in file name, so for
suppress, use rpm macros in spec file instead.''',
'generic-name-not-in-filelist',
'''The generic name is not in a filelist of package, add it to list marked as
%ghost. Note: this error will be raised, if you use a hash ($) in file name,
use rpm macros in spec file instead.''',
)

8
config
View File

@ -39,7 +39,7 @@ addCheck("CheckAlternativesGhostFiles")
addFilter(".*invalid-version.*")
addFilter(".*invalid-packager.*")
addFilter(".*not-standard-release-extension.*")
addFilter(".*non-standard-group.*")
#addFilter(".*non-standard-group.*")
addFilter(".*invalid-buildhost.*")
addFilter(".*executable-in-library-package.*")
addFilter(".*non-versioned-file-in-library-package.*")
@ -122,6 +122,12 @@ addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package')
addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file')
addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs")
addFilter("kernel-modules-not-in-kernel-packages")
# SUSE kmp's don't need manual depmod (bnc#456048)
addFilter("module-without-depmod-postin")
addFilter("postin-with-wrong-depmod")
addFilter("module-without-depmod-postun")
addFilter("postun-with-wrong-depmod")
#
addFilter("configure-without-libdir-spec")
addFilter("conffile-without-noreplace-flag /etc/init.d")
addFilter("use-of-RPM_SOURCE_DIR")

View File

@ -36,7 +36,7 @@ addCheck("CheckFilelist")
addFilter(".*invalid-version.*")
addFilter(".*invalid-packager.*")
addFilter(".*not-standard-release-extension.*")
addFilter(".*non-standard-group.*")
#addFilter(".*non-standard-group.*")
addFilter(".*invalid-buildhost.*")
addFilter(".*executable-in-library-package.*")
addFilter(".*non-versioned-file-in-library-package.*")
@ -116,6 +116,12 @@ addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package')
addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file')
addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs")
addFilter("kernel-modules-not-in-kernel-packages")
# SUSE kmp's don't need manual depmod (bnc#456048)
addFilter("module-without-depmod-postin")
addFilter("postin-with-wrong-depmod")
addFilter("module-without-depmod-postun")
addFilter("postun-with-wrong-depmod")
#
addFilter("configure-without-libdir-spec")
addFilter("conffile-without-noreplace-flag /etc/init.d")
addFilter("use-of-RPM_SOURCE_DIR")

View File

@ -1,16 +1,16 @@
--- TagsCheck.py
+++ TagsCheck.py
@@ -576,6 +576,9 @@
if not description:
@@ -616,6 +616,9 @@
if not pkg[rpm.RPMTAG_DESCRIPTION]:
printError(pkg, 'no-description-tag')
else:
+ if len(description.partition('Authors:')[0])-4 <= len(summary):
+ if len(pkg[rpm.RPMTAG_DESCRIPTION].partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]):
+ printWarning(pkg, 'description-shorter-than-summary')
+
spell_check(pkg, description, 'description')
for l in description.splitlines():
utf8l = l
@@ -786,6 +789,10 @@
for lang in pkg[rpm.RPMTAG_HEADERI18NTABLE]:
self.check_description(pkg, lang)
res = AbstractCheck.macro_regex.search(pkg[rpm.RPMTAG_DESCRIPTION])
@@ -881,6 +884,10 @@
'''The major number of the library isn't included in the package's name.
''',

11
fix-pyc-install.diff Normal file
View File

@ -0,0 +1,11 @@
--- Makefile
+++ Makefile
@@ -40,7 +40,7 @@
install:
-mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(ETCDIR)/$(PACKAGE) $(DESTDIR)$(ETCDIR)/bash_completion.d $(DESTDIR)$(MANDIR)/man1
- cp -p *.py *.pyc *.pyo $(DESTDIR)$(LIBDIR)
+ cp -p *.py *.py[co] $(DESTDIR)$(LIBDIR)
sed -e 's/@VERSION@/$(VERSION)/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py
cp -p rpmlint rpmdiff $(DESTDIR)$(BINDIR)
cp -p config $(DESTDIR)$(ETCDIR)/$(PACKAGE)

View File

@ -1,51 +1,22 @@
Index: rpmlint.py
===================================================================
--- rpmlint.py.orig
--- rpmlint.py
+++ rpmlint.py
@@ -170,15 +170,19 @@ def main():
sys.stderr.write('(none): E: interrupted, exiting while scanning all packages\n')
sys.exit(2)
- if printAllReasons():
- sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
- sys.exit(66)
+ printAllReasons()
finally:
print "%d packages and %d specfiles checked; %d errors, %d warnings." \
@@ -190,7 +190,7 @@
% (packages_checked, specfiles_checked,
printed_messages["E"], printed_messages["W"])
+ if (badnessThreshold() >= 0):
+ if badnessScore() >= badnessThreshold():
+ sys.stderr.write('(none): E: badness %d exceeds threshold %d, aborting.\n' % (badnessScore(), badnessThreshold()))
+ sys.exit(66)
+ sys.exit(0)
+
if printed_messages["E"] > 0:
- if printed_messages["E"] > 0:
+ if badnessThreshold() < 0 and printed_messages["E"] > 0:
sys.exit(64)
sys.exit(0)
Index: Filter.py
===================================================================
--- Filter.py.orig
--- Filter.py
+++ Filter.py
@@ -101,10 +101,6 @@ def _diag_compare(x, y):
def printAllReasons():
- threshold = badnessThreshold()
- if threshold < 0:
- return False
-
global _badness_score, _diagnostic
_diagnostic.sort(_diag_compare)
last_reason = ''
@@ -119,8 +115,6 @@ def printAllReasons():
@@ -96,7 +96,7 @@
if len(last_reason):
printDescriptions(last_reason)
last_reason = reason
- Pkg.rlprint(diag)
+ Pkg.rlprint(diag[:-1])
if Config.info and len(last_reason):
printDescriptions(last_reason)
_diagnostic = list()
- return _badness_score > threshold
-
_details = {}

View File

@ -1,13 +1,13 @@
Index: TagsCheck.py
===================================================================
--- TagsCheck.py.orig
--- TagsCheck.py
+++ TagsCheck.py
@@ -602,6 +602,8 @@ class TagsCheck(AbstractCheck.AbstractCh
@@ -626,7 +626,9 @@
if not group:
printError(pkg, 'no-group-tag')
else:
if VALID_GROUPS and group not in VALID_GROUPS:
printWarning(pkg, 'non-standard-group', group)
- if VALID_GROUPS and group not in VALID_GROUPS:
+ if pkg.name.find('-devel') != -1 and not group.startswith('Development/'):
+ printWarning(pkg, 'devel-package-with-non-devel-group', group)
buildhost = pkg[rpm.RPMTAG_BUILDHOST]
if not buildhost:
+ elif VALID_GROUPS and group not in VALID_GROUPS:
printWarning(pkg, 'non-standard-group', group)
else:
res = AbstractCheck.macro_regex.search(group)

241
rpmgroups.config Normal file
View File

@ -0,0 +1,241 @@
from Config import *
setOption("ValidGroups", (
"Amusements/Games/3D/Other" ,\
"Amusements/Games/3D/Race" ,\
"Amusements/Games/3D/Shoot" ,\
"Amusements/Games/3D/Simulation" ,\
"Amusements/Games/Action/Arcade" ,\
"Amusements/Games/Action/Breakout" ,\
"Amusements/Games/Action/Other" ,\
"Amusements/Games/Action/Race" ,\
"Amusements/Games/Action/Shoot" ,\
"Amusements/Games/Board/Card" ,\
"Amusements/Games/Board/Chess" ,\
"Amusements/Games/Board/Other" ,\
"Amusements/Games/Board/Pool" ,\
"Amusements/Games/Board/Puzzle" ,\
"Amusements/Games/Logic" ,\
"Amusements/Games/Other" ,\
"Amusements/Games/RPG" ,\
"Amusements/Games/Strategy/Other" ,\
"Amusements/Games/Strategy/Real Time" ,\
"Amusements/Games/Strategy/Turn Based" ,\
"Amusements/Teaching/Language" ,\
"Amusements/Teaching/Mathematics" ,\
"Amusements/Teaching/Other" ,\
"Amusements/Toys/Background" ,\
"Amusements/Toys/Clocks" ,\
"Amusements/Toys/Graphics" ,\
"Amusements/Toys/Other" ,\
"Amusements/Toys/Screensavers" ,\
"Development/Languages/C and C++" ,\
"Development/Languages/Fortran" ,\
"Development/Languages/Java" ,\
"Development/Languages/Other" ,\
"Development/Languages/Perl" ,\
"Development/Languages/Python" ,\
"Development/Languages/Ruby" ,\
"Development/Languages/Scheme" ,\
"Development/Languages/Tcl" ,\
"Development/Libraries/C and C++" ,\
"Development/Libraries/Cross" ,\
"Development/Libraries/GNOME" ,\
"Development/Libraries/Java" ,\
"Development/Libraries/KDE" ,\
"Development/Libraries/Other" ,\
"Development/Libraries/Parallel" ,\
"Development/Libraries/Perl" ,\
"Development/Libraries/Python" ,\
"Development/Libraries/Tcl" ,\
"Development/Libraries/X11" ,\
"Development/Libraries/YaST" ,\
"Development/Sources" ,\
"Development/Tools/Building" ,\
"Development/Tools/Debuggers" ,\
"Development/Tools/Doc Generators" ,\
"Development/Tools/GUI Builders" ,\
"Development/Tools/IDE" ,\
"Development/Tools/Navigators" ,\
"Development/Tools/Other" ,\
"Development/Tools/Version Control" ,\
"Documentation/Howto" ,\
"Documentation/HTML" ,\
"Documentation/Man" ,\
"Documentation/Other" ,\
"Documentation/SuSE" ,\
"Hardware/Camera" ,\
"Hardware/Fax" ,\
"Hardware/ISDN" ,\
"Hardware/Joystick" ,\
"Hardware/Mobile" ,\
"Hardware/Modem" ,\
"Hardware/Other" ,\
"Hardware/Palm" ,\
"Hardware/Printing" ,\
"Hardware/Psion" ,\
"Hardware/Radio" ,\
"Hardware/Scanner" ,\
"Hardware/TV" ,\
"Hardware/UPS" ,\
"Hardware/Wifi" ,\
"Metapackages" ,\
"Productivity/Archiving/Backup" ,\
"Productivity/Archiving/Compression" ,\
"Productivity/Clustering/Computing" ,\
"Productivity/Clustering/HA" ,\
"Productivity/Databases/Clients" ,\
"Productivity/Databases/Servers" ,\
"Productivity/Databases/Tools" ,\
"Productivity/File utilities" ,\
"Productivity/Graphics/3D Editors" ,\
"Productivity/Graphics/Bitmap Editors" ,\
"Productivity/Graphics/CAD" ,\
"Productivity/Graphics/Convertors" ,\
"Productivity/Graphics/Other" ,\
"Productivity/Graphics/Vector Editors" ,\
"Productivity/Graphics/Viewers" ,\
"Productivity/Graphics/Visualization/Graph" ,\
"Productivity/Graphics/Visualization/Other" ,\
"Productivity/Graphics/Visualization/Raytracers" ,\
"Productivity/Hamradio/Fax" ,\
"Productivity/Hamradio/Logging" ,\
"Productivity/Hamradio/Morse" ,\
"Productivity/Hamradio/Other" ,\
"Productivity/Hamradio/Packet" ,\
"Productivity/Hamradio/Psk31" ,\
"Productivity/Hamradio/Satellite" ,\
"Productivity/Multimedia/CD/Grabbers" ,\
"Productivity/Multimedia/CD/Players" ,\
"Productivity/Multimedia/CD/Record" ,\
"Productivity/Multimedia/Other" ,\
"Productivity/Multimedia/Sound/Editors and Convertors" ,\
"Productivity/Multimedia/Sound/Midi" ,\
"Productivity/Multimedia/Sound/Mixers" ,\
"Productivity/Multimedia/Sound/Players" ,\
"Productivity/Multimedia/Sound/Utilities" ,\
"Productivity/Multimedia/Sound/Visualization" ,\
"Productivity/Multimedia/Video/Editors and Convertors" ,\
"Productivity/Multimedia/Video/Players" ,\
"Productivity/Networking/AOLInstantMessenger" ,\
"Productivity/Networking/Archie" ,\
"Productivity/Networking/Boot/Clients" ,\
"Productivity/Networking/Boot/Servers" ,\
"Productivity/Networking/Boot/Utilities" ,\
"Productivity/Networking/Diagnostic" ,\
"Productivity/Networking/DNS/Servers" ,\
"Productivity/Networking/DNS/Utilities" ,\
"Productivity/Networking/Email/Clients" ,\
"Productivity/Networking/Email/Mailinglists" ,\
"Productivity/Networking/Email/Servers" ,\
"Productivity/Networking/Email/Utilities" ,\
"Productivity/Networking/File-Sharing" ,\
"Productivity/Networking/Ftp/Clients" ,\
"Productivity/Networking/Ftp/Servers" ,\
"Productivity/Networking/ICQ" ,\
"Productivity/Networking/Instant Messenger" ,\
"Productivity/Networking/IRC" ,\
"Productivity/Networking/LDAP/Clients" ,\
"Productivity/Networking/LDAP/Servers" ,\
"Productivity/Networking/LDAP/Utilities" ,\
"Productivity/Networking/Napster" ,\
"Productivity/Networking/News/Clients" ,\
"Productivity/Networking/News/Servers" ,\
"Productivity/Networking/News/Utilities" ,\
"Productivity/Networking/NFS" ,\
"Productivity/Networking/NIS" ,\
"Productivity/Networking/Novell" ,\
"Productivity/Networking/Other" ,\
"Productivity/Networking/PPP" ,\
"Productivity/Networking/Radius/Clients" ,\
"Productivity/Networking/Radius/Servers" ,\
"Productivity/Networking/Routing" ,\
"Productivity/Networking/Samba" ,\
"Productivity/Networking/Security" ,\
"Productivity/Networking/SSH" ,\
"Productivity/Networking/System" ,\
"Productivity/Networking/Talk/Clients" ,\
"Productivity/Networking/Talk/Servers" ,\
"Productivity/Networking/Web/Browsers" ,\
"Productivity/Networking/Web/Frontends" ,\
"Productivity/Networking/Web/Proxy" ,\
"Productivity/Networking/Web/Servers" ,\
"Productivity/Networking/Web/Utilities" ,\
"Productivity/Office/Dictionary" ,\
"Productivity/Office/Finance" ,\
"Productivity/Office/Management" ,\
"Productivity/Office/Organizers" ,\
"Productivity/Office/Other" ,\
"Productivity/Office/Spreadsheets" ,\
"Productivity/Office/Suite" ,\
"Productivity/Office/Word Processor" ,\
"Productivity/Other" ,\
"Productivity/Publishing/DocBook" ,\
"Productivity/Publishing/HTML/Editors" ,\
"Productivity/Publishing/HTML/Tools" ,\
"Productivity/Publishing/Other" ,\
"Productivity/Publishing/PDF" ,\
"Productivity/Publishing/Presentation" ,\
"Productivity/Publishing/PS" ,\
"Productivity/Publishing/SGML" ,\
"Productivity/Publishing/TeX/Base" ,\
"Productivity/Publishing/TeX/Fonts" ,\
"Productivity/Publishing/TeX/Frontends" ,\
"Productivity/Publishing/TeX/Utilities" ,\
"Productivity/Publishing/Texinfo" ,\
"Productivity/Publishing/Troff" ,\
"Productivity/Publishing/Word" ,\
"Productivity/Publishing/XML" ,\
"Productivity/Scientific/Astronomy" ,\
"Productivity/Scientific/Chemistry" ,\
"Productivity/Scientific/Electronics" ,\
"Productivity/Scientific/Math" ,\
"Productivity/Scientific/Other" ,\
"Productivity/Scientific/Physics" ,\
"Productivity/Security" ,\
"Productivity/Telephony/Clients" ,\
"Productivity/Telephony/H323/Clients" ,\
"Productivity/Telephony/H323/Servers" ,\
"Productivity/Telephony/H323/Utilities" ,\
"Productivity/Telephony/Servers" ,\
"Productivity/Telephony/SIP/Clients" ,\
"Productivity/Telephony/SIP/Servers" ,\
"Productivity/Telephony/SIP/Utilities" ,\
"Productivity/Telephony/Utilities" ,\
"Productivity/Text/Convertors" ,\
"Productivity/Text/Editors" ,\
"Productivity/Text/Spell" ,\
"Productivity/Text/Utilities" ,\
"System/Base" ,\
"System/Benchmark" ,\
"System/Boot" ,\
"System/Console" ,\
"System/Daemons" ,\
"System/Emulators/Other" ,\
"System/Emulators/PC" ,\
"System/Fhs" ,\
"System/Filesystems" ,\
"System/GUI/GNOME" ,\
"System/GUI/KDE" ,\
"System/GUI/Other" ,\
"System/GUI/XFCE" ,\
"System/I18n/Chinese" ,\
"System/I18n/Japanese" ,\
"System/I18n/Korean" ,\
"System/Kernel" ,\
"System/Libraries" ,\
"System/Localization" ,\
"System/Management" ,\
"System/Monitoring" ,\
"System/Packages" ,\
"System/Shells" ,\
"System/Sound Daemons" ,\
"System/X11/Displaymanagers" ,\
"System/X11/Fonts" ,\
"System/X11/Icons" ,\
"System/X11/Servers/XF86_3" ,\
"System/X11/Servers/XF86_4" ,\
"System/X11/Terminals" ,\
"System/X11/Utilities" ,\
"System/YaST" ,\
))

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:991cbd183ee5164eba39500cf55f741d8b5837a50c620f586ad50090992b4e8d
size 90070

3
rpmlint-0.92.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6acfd50bae5302d321a2b41c139d3cc39376ad5d81a3aa8a8ccfb0dd633cda2b
size 95746

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Wed Jan 13 13:11:56 UTC 2010 - lnussel@suse.de
- suppress depmod warnings (bnc#456048)
-------------------------------------------------------------------
Sun Jan 10 23:33:00 UTC 2010 - detlef@links2linux.de
- add some missing groups
-------------------------------------------------------------------
Sat Jan 9 23:56:25 UTC 2010 - lnussel@suse.de
- disable badness for group check until we know the impact
-------------------------------------------------------------------
Sat Jan 8 23:10:00 CET 2010 - detlef@links2linux.de
- add a config file for standard RPM groups
-------------------------------------------------------------------
Thu Jan 7 13:18:40 UTC 2010 - mvyskocil@suse.cz
- fixed bnc#566018 - no-ghost-alternative-file check makes no sense
- fixed CheckAlternativesGhostFiles test, renamed the warnings to
generic-name-not-in-filelist, generic-name-not-marked-as-ghost
-------------------------------------------------------------------
Sat Jan 2 17:43:56 CET 2010 - jengelh@medozas.de
- enable parallel build
-------------------------------------------------------------------
Sat Nov 14 10:20:38 CET 2009 - dmueller@suse.de
- update to 0.92:
* various fixes and python 3 compatibility added
* new checks for python compiled files
-------------------------------------------------------------------
Wed Oct 7 23:53:26 CEST 2009 - dmueller@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package rpmlint (Version 0.90)
# spec file for package rpmlint (Version 0.92)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 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
@ -22,8 +22,8 @@
Name: rpmlint
BuildRequires: rpm-python
Summary: Rpm correctness checker
Version: 0.90
Release: 3
Version: 0.92
Release: 1
Source0: %{name}-%{version}.tar.bz2
Source1: config
Source1001: config.in
@ -45,9 +45,10 @@ Source16: CheckDBUSServices.py
Source17: CheckFilelist.py
Source18: CheckDBusPolicy.py
Source19: CheckAlternativesGhostFiles.py
Source20: rpmgroups.config
Source100: syntax-validator.py
Url: http://rpmlint.zarb.org/
License: GPL v2 or later
License: GPLv2+
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rpm-python, /usr/bin/readelf, file, findutils, cpio, bash
@ -109,6 +110,7 @@ Patch69: useless-requires-doc.diff
Patch71: suse-binary-info-compile-opts.diff
Patch72: version-control-internal-file.diff
Patch73: avoid-mismatched-libregex.diff
Patch74: fix-pyc-install.diff
%py_requires
%description
@ -133,7 +135,7 @@ Authors:
%patch7
%patch8
%patch9
%patch10
#%patch10
%patch12
%patch13
%patch14
@ -179,6 +181,7 @@ Authors:
#%patch71
%patch72
%patch73
%patch74
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
@ -200,7 +203,7 @@ cp -p %{SOURCE18} .
cp -p %{SOURCE19} .
%build
make
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
@ -210,6 +213,7 @@ 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 %{SOURCE20} %{buildroot}/%{_sysconfdir}/rpmlint/
%clean
rm -rf $RPM_BUILD_ROOT
@ -220,6 +224,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/bin/*
%{_prefix}/share/rpmlint
%config(noreplace) /etc/rpmlint/config
%config %{_sysconfdir}/rpmlint/rpmgroups.config
%dir /etc/rpmlint
/usr/share/man/man1/rpmlint.1.gz

View File

@ -1,7 +1,7 @@
--- BinariesCheck.py
+++ BinariesCheck.py
@@ -39,6 +39,8 @@
debug_file_regex = re.compile('\.debug$')
@@ -37,6 +37,8 @@
unused_regex = re.compile('^\s+(\S+)')
exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)')
fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)')
+ debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
@ -9,7 +9,7 @@
def __init__(self, pkg, path, file, is_ar, is_shlib):
self.readelf_error = False
@@ -53,6 +55,8 @@
@@ -51,6 +53,8 @@
self.exec_stack = False
self.exit_calls = []
fork_called = False
@ -17,8 +17,8 @@
+ self.symtab=0
self.tail = ''
is_debug = BinaryInfo.debug_file_regex.search(path)
@@ -105,6 +109,14 @@
is_debug = path.endswith('.debug')
@@ -103,6 +107,14 @@
fork_called = True
continue
@ -31,9 +31,9 @@
+ continue
+
if self.non_pic:
self.non_pic = BinaryInfo.non_pic_regex.search(res[1])
self.non_pic = 'TEXTREL' in res[1]
@@ -260,6 +272,17 @@
@@ -254,6 +266,17 @@
bin_info = BinaryInfo(
pkg, pkgfile.path, fname, is_ar, is_shlib)
@ -51,7 +51,7 @@
# so name in library
if is_shlib:
has_lib = True
@@ -491,6 +514,14 @@
@@ -485,6 +508,14 @@
'ldd-failed',
'''Executing ldd on this file failed, all checks could not be run.''',

View File

@ -1,6 +1,4 @@
Index: BinariesCheck.py
===================================================================
--- BinariesCheck.py.orig
--- BinariesCheck.py
+++ BinariesCheck.py
@@ -10,6 +10,7 @@
@ -10,13 +8,13 @@ Index: BinariesCheck.py
import rpm
@@ -265,7 +266,9 @@ class BinariesCheck(AbstractCheck.Abstra
@@ -247,7 +248,9 @@
# stripped ?
if not is_ocaml_native and not unstrippable.search(fname):
- if not_stripped.search(pkgfile.magic):
+ if not_stripped.search(pkgfile.magic) and \
+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \
- if 'not stripped' in pkgfile.magic:
+ if 'not stripped' in pkgfile.magic and \
+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \
+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1):
printWarning(
pkg, 'unstripped-binary-or-object', fname)

View File

@ -1,8 +1,6 @@
Index: SpecCheck.py
===================================================================
--- SpecCheck.py.orig
--- SpecCheck.py
+++ SpecCheck.py
@@ -420,6 +420,10 @@ class SpecCheck(AbstractCheck.AbstractCh
@@ -407,6 +407,10 @@
printWarning(pkg, 'comparison-operator-in-deptoken',
conf)
@ -11,9 +9,9 @@ Index: SpecCheck.py
+ printWarning(pkg, 'deprecated-use-of-%run_ldconfig')
+
if current_section == 'changelog':
res = macro_regex.search(line)
res = AbstractCheck.macro_regex.search(line)
if res and len(res.group(1)) % 2:
@@ -635,6 +639,14 @@ will break short circuiting.''',
@@ -627,6 +631,14 @@
'''Make check or other automated regression test should be run in %check, as
they can be disabled with a rpm macro for short circuiting purposes.''',

View File

@ -1,21 +1,19 @@
Index: BinariesCheck.py
===================================================================
--- BinariesCheck.py.orig
--- BinariesCheck.py
+++ BinariesCheck.py
@@ -177,6 +177,7 @@ path_regex = re.compile('(.*/)([^/]+)')
numeric_dir_regex = re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)')
versioned_dir_regex = re.compile('[^.][0-9]')
usr_share = re.compile('^/usr/share/')
+usr_arch_share = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)')
etc = re.compile('^/etc/')
not_stripped = re.compile('not stripped')
unstrippable = re.compile('\.o$|\.static$')
@@ -251,7 +252,7 @@ class BinariesCheck(AbstractCheck.Abstra
@@ -178,6 +178,7 @@
srcname_regex = re.compile('(.*?)-[0-9]')
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
+usr_arch_share_regex = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)')
def dir_base(path):
res = path_regex.search(path)
@@ -233,7 +234,7 @@
printError(pkg, 'arch-independent-package-contains-binary-or-object', fname)
else:
# in /usr/share ?
- if usr_share.search(fname):
+ if usr_share.search(fname) and not usr_arch_share.search(fname):
- if fname.startswith('/usr/share/'):
+ if fname.startswith('/usr/share/') and not usr_arch_share.search(fname):
printError(
pkg, 'arch-dependent-file-in-usr-share', fname)
# in /etc ?