- Make "disttag" configurable using the DistRegex config file option. - Sync standard users and groups with the FC setup package. - Disable MenuCheck by default, it's currently Mandriva specific. - Use upstream default valid License tag list, fixes #191078. - Use upstream default valid Group tag list (dynamically retrieved from the GROUPS file shipped with rpm). - Allow /usr/libexec, fixes #195992.
This commit is contained in:
parent
503da0b02c
commit
269ccb0e35
@ -1 +1 @@
|
||||
rpmlint-0.76.tar.bz2
|
||||
rpmlint-0.77.tar.bz2
|
||||
|
@ -1,13 +0,0 @@
|
||||
Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py (revision 1144)
|
||||
+++ FilesCheck.py (working copy)
|
||||
@@ -158,7 +158,7 @@
|
||||
includefile_regex=re.compile('\.(c|h|a|cmi)$')
|
||||
buildconfigfile_regex=re.compile('(\.pc|/bin/.+-config)$')
|
||||
sofile_regex=re.compile('/lib(64)?/[^/]+\.so$')
|
||||
-devel_regex=re.compile('-(devel|source)$')
|
||||
+devel_regex=re.compile('-(debug(info)?|devel|source)$')
|
||||
lib_regex=re.compile('lib(64)?/lib[^/]*\.so\..*')
|
||||
ldconfig_regex=re.compile('^[^#]*ldconfig', re.MULTILINE)
|
||||
depmod_regex=re.compile('^[^#]*depmod', re.MULTILINE)
|
@ -1,11 +0,0 @@
|
||||
--- TagsCheck.py~ 2006-04-05 19:21:45.000000000 +0300
|
||||
+++ TagsCheck.py 2006-04-08 23:04:04.000000000 +0300
|
||||
@@ -342,2 +342,3 @@
|
||||
changelog_version_regex=re.compile('[^>]([^ >]+)\s*$')
|
||||
+fedora_disttag_regex=re.compile('\.(fc|rhe?l)\d+$')
|
||||
release_ext=Config.getOption('ReleaseExtension')
|
||||
@@ -556,3 +557,3 @@
|
||||
expected=str(epoch) + ':' + expected
|
||||
- if expected != ret.group(1):
|
||||
+ if ret.group(1) not in (expected, fedora_disttag_regex.sub('', expected)):
|
||||
printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected)
|
31
rpmlint-0.77-distregex.patch
Normal file
31
rpmlint-0.77-distregex.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py (revision 1215)
|
||||
+++ TagsCheck.py (working copy)
|
||||
@@ -380,6 +380,8 @@
|
||||
packager_regex=re.compile(Config.getOption('Packager'))
|
||||
basename_regex=re.compile('/?([^/]+)$')
|
||||
changelog_version_regex=re.compile('[^>]([^ >]+)\s*$')
|
||||
+dist_regex=Config.getOption('DistRegex')
|
||||
+if dist_regex: dist_regex=re.compile(dist_regex)
|
||||
release_ext=Config.getOption('ReleaseExtension')
|
||||
extension_regex=release_ext and re.compile(release_ext + '$')
|
||||
use_version_in_changelog=Config.getOption('UseVersionInChangelog', 1)
|
||||
@@ -591,11 +593,13 @@
|
||||
srpm=pkg[rpm.RPMTAG_SOURCERPM]
|
||||
# only check when source name correspond to name
|
||||
if srpm[0:-8] == '%s-%s-%s' % (name, version, release):
|
||||
- expected=version + '-' + release
|
||||
+ expected=[version + '-' + release]
|
||||
if epoch is not None: # regardless of use_epoch
|
||||
- expected=str(epoch) + ':' + expected
|
||||
- if expected != ret.group(1):
|
||||
- printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected)
|
||||
+ expected[0]=str(epoch) + ':' + expected[0]
|
||||
+ if dist_regex:
|
||||
+ expected.append(dist_regex.sub('', expected[0]))
|
||||
+ if ret.group(1) not in expected:
|
||||
+ printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected[0])
|
||||
|
||||
clt=pkg[rpm.RPMTAG_CHANGELOGTEXT]
|
||||
if clt: changelog=changelog + clt
|
@ -1,104 +0,0 @@
|
||||
# -*- python -*-
|
||||
|
||||
# Fedora rpmlint configuration
|
||||
|
||||
from Config import *
|
||||
|
||||
setOption("UseVersionInChangeLog", 1)
|
||||
setOption("UseBzip2", 0)
|
||||
setOption("UseDefaultRunlevels", 0)
|
||||
setOption("UseEpoch", 0)
|
||||
setOption("UseUTF8", 1)
|
||||
setOption("ValidSrcPerms", (0664, 0644, ))
|
||||
setOption("ValidGroups", (
|
||||
"Amusements/Games",
|
||||
"Amusements/Graphics",
|
||||
"Applications/Archiving",
|
||||
"Applications/Communications",
|
||||
"Applications/Databases",
|
||||
"Applications/Editors",
|
||||
"Applications/Emulators",
|
||||
"Applications/Engineering",
|
||||
"Applications/File",
|
||||
"Applications/Internet",
|
||||
"Applications/Multimedia",
|
||||
"Applications/Productivity",
|
||||
"Applications/Publishing",
|
||||
"Applications/System",
|
||||
"Applications/Text",
|
||||
"Development/Debug", # intended for debuginfo packages only
|
||||
"Development/Debuggers",
|
||||
"Development/Languages",
|
||||
"Development/Libraries",
|
||||
"Development/System",
|
||||
"Development/Tools",
|
||||
"Documentation",
|
||||
"System Environment/Base",
|
||||
"System Environment/Daemons",
|
||||
"System Environment/Kernel",
|
||||
"System Environment/Libraries",
|
||||
"System Environment/Shells",
|
||||
"User Interface/Desktops",
|
||||
"User Interface/X",
|
||||
"User Interface/X Hardware Support",
|
||||
))
|
||||
setOption("ValidLicenses", (
|
||||
"Apache Software License",
|
||||
"Artistic",
|
||||
"BSD",
|
||||
"Commercial",
|
||||
"CPL",
|
||||
"Distributable",
|
||||
"FDL",
|
||||
"Freeware",
|
||||
"GPL",
|
||||
"IBM Public License",
|
||||
"LaTeX Project Public License",
|
||||
"LGPL",
|
||||
"MIT",
|
||||
"MPL",
|
||||
"NetHack General Public License",
|
||||
"Non-distributable",
|
||||
"Public Domain",
|
||||
"Python Software Foundation License",
|
||||
"QPL",
|
||||
"Ruby License",
|
||||
"Sun Public License",
|
||||
"SIL Open Font License",
|
||||
"W3C Software License",
|
||||
"zlib License",
|
||||
"Zope Public License",
|
||||
))
|
||||
setOption("ValidShells", (
|
||||
"/bin/sh",
|
||||
"/bin/bash",
|
||||
"/sbin/ldconfig",
|
||||
"/usr/bin/perl",
|
||||
"/usr/bin/python",
|
||||
))
|
||||
setOption("DanglingSymlinkExceptions", (
|
||||
['consolehelper$', 'usermode'],
|
||||
['consolehelper-gtk$', 'usermode-gtk'],
|
||||
))
|
||||
|
||||
# Output filters
|
||||
addFilter("source-or-patch-not-[bg]zipped")
|
||||
addFilter("%mklibname")
|
||||
addFilter("no-dependency-on (perl|python)-base")
|
||||
addFilter("no-dependency-on locales-")
|
||||
addFilter("(python|perl5)-naming-policy-not-applied")
|
||||
addFilter("no-(packager-tag|signature)")
|
||||
addFilter("incoherent-version-in-name")
|
||||
addFilter("invalid-build-requires")
|
||||
addFilter("ghost-files-without-postin")
|
||||
addFilter("postin-without-ghost-file-creation")
|
||||
addFilter("no-major-in-name")
|
||||
addFilter("no-provides")
|
||||
addFilter("executable-in-library-package")
|
||||
addFilter("non-versioned-file-in-library-package")
|
||||
addFilter("requires-on-release")
|
||||
addFilter("jar-not-indexed")
|
||||
addFilter("invalid-(lc-messages|locale-man)-dir")
|
||||
addFilter("outside-libdir-files")
|
||||
addFilter('-debuginfo no-documentation')
|
||||
addFilter('-debuginfo [^ ]+ /usr/lib/debug/')
|
57
rpmlint.config
Normal file
57
rpmlint.config
Normal file
@ -0,0 +1,57 @@
|
||||
# -*- python -*-
|
||||
|
||||
# System wide rpmlint default configuration. Do not modify, override/add
|
||||
# options in /etc/rpmlint/config and/or ~/.rpmlintrc as needed.
|
||||
|
||||
from Config import *
|
||||
|
||||
setOption("DistRegex", '\.(fc|rhe?l)\d+(?=\.|$)')
|
||||
setOption("UseVersionInChangeLog", 1)
|
||||
setOption("UseBzip2", 0)
|
||||
setOption("UseDefaultRunlevels", 0)
|
||||
setOption("UseEpoch", 0)
|
||||
setOption("UseUTF8", 1)
|
||||
setOption("ValidSrcPerms", (0664, 0644, ))
|
||||
setOption("ValidShells", (
|
||||
"/bin/sh",
|
||||
"/bin/bash",
|
||||
"/sbin/ldconfig",
|
||||
"/usr/bin/perl",
|
||||
"/usr/bin/python",
|
||||
))
|
||||
setOption("DanglingSymlinkExceptions", (
|
||||
['consolehelper$', 'usermode'],
|
||||
['consolehelper-gtk$', 'usermode-gtk'],
|
||||
))
|
||||
# Standard users & groups from the setup package:
|
||||
setOption("StandardUsers",
|
||||
("root", "bin", "daemon", "adm", "lp", "sync", "shutdown", "halt",
|
||||
"mail", "news", "uucp", "operator", "games", "gopher", "ftp",
|
||||
"nobody"))
|
||||
setOption("StandardGroups",
|
||||
("root", "bin", "daemon", "sys", "adm", "tty", "disk", "lp", "mem",
|
||||
"kmem", "wheel", "mail", "news", "uucp", "man", "games", "gopher",
|
||||
"dip", "ftp", "lock", "nobody", "users"))
|
||||
|
||||
# Output filters
|
||||
addFilter("source-or-patch-not-[bg]zipped")
|
||||
addFilter("%mklibname")
|
||||
addFilter("no-dependency-on (perl|python)-base")
|
||||
addFilter("no-dependency-on locales-")
|
||||
addFilter("(python|perl5)-naming-policy-not-applied")
|
||||
addFilter("no-(packager-tag|signature)")
|
||||
addFilter("incoherent-version-in-name")
|
||||
addFilter("invalid-build-requires")
|
||||
addFilter("ghost-files-without-postin")
|
||||
addFilter("postin-without-ghost-file-creation")
|
||||
addFilter("no-major-in-name")
|
||||
addFilter("no-provides")
|
||||
addFilter("executable-in-library-package")
|
||||
addFilter("non-versioned-file-in-library-package")
|
||||
addFilter("requires-on-release")
|
||||
addFilter("jar-not-indexed")
|
||||
addFilter("invalid-(lc-messages|locale-man)-dir")
|
||||
addFilter("outside-libdir-files")
|
||||
addFilter("-debuginfo no-documentation")
|
||||
addFilter("-debuginfo [^ ]+ /usr/lib/debug/")
|
||||
addFilter("non-standard-dir-in-usr libexec")
|
36
rpmlint.spec
36
rpmlint.spec
@ -1,9 +1,5 @@
|
||||
# TODO:
|
||||
# - don't override upstream default valid groups, just add "Development/Debug"
|
||||
# - switch to upstream valid license list?
|
||||
|
||||
Name: rpmlint
|
||||
Version: 0.76
|
||||
Version: 0.77
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for checking common errors in RPM packages
|
||||
|
||||
@ -11,9 +7,8 @@ Group: Development/Tools
|
||||
License: GPL
|
||||
URL: http://rpmlint.zarb.org/
|
||||
Source0: http://rpmlint.zarb.org/download/%{name}-%{version}.tar.bz2
|
||||
Source1: %{name}-fedora-config
|
||||
Patch0: %{name}-0.76-disttag.patch
|
||||
Patch1: %{name}-0.76-debuginfo.patch
|
||||
Source1: %{name}.config
|
||||
Patch0: %{name}-0.77-distregex.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
@ -33,9 +28,7 @@ and source packages can be checked.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
sed -i -e 's|/etc/httpd/webapps\.d|%{_sysconfdir}/httpd/conf.d|' \
|
||||
FilesCheck.py I18NCheck.py
|
||||
sed -i -e /MenuCheck/d Config.py
|
||||
|
||||
|
||||
%build
|
||||
@ -46,17 +39,14 @@ make
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} \
|
||||
LIBDIR=%{_datadir}/rpmlint BINDIR=%{_bindir}
|
||||
echo "# Add local rpmlint configuration here." \
|
||||
echo "# Add local system wide rpmlint configuration here." \
|
||||
> $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/config
|
||||
install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config
|
||||
|
||||
# Take care of files that may be generated later.
|
||||
touch $RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/rpmlint/config{c,o}
|
||||
echo '%ghost %{_sysconfdir}/rpmlint/config?' > %{name}-%{version}-files.list
|
||||
echo '%ghost %{_datadir}/rpmlint/config?' >> %{name}-%{version}-files.list
|
||||
cat /dev/null > %{name}-%{version}-files.list
|
||||
for f in `find $RPM_BUILD_ROOT%{_datadir}/rpmlint -type f -name "*.py"` ; do
|
||||
f=`echo "$f" | sed "s|^$RPM_BUILD_ROOT||"`
|
||||
echo "$f" >> %{name}-%{version}-files.list
|
||||
for t in c o ; do
|
||||
pref=
|
||||
if [ ! -e "$RPM_BUILD_ROOT$f$t" ] ; then
|
||||
@ -75,17 +65,27 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files -f %{name}-%{version}-files.list
|
||||
%defattr(-,root,root,0755)
|
||||
%doc AUTHORS COPYING ChangeLog README
|
||||
%dir %{_sysconfdir}/rpmlint/
|
||||
%config(noreplace) %{_sysconfdir}/rpmlint/config
|
||||
%config(noreplace) %{_sysconfdir}/rpmlint/
|
||||
%{_sysconfdir}/bash_completion.d/
|
||||
%{_bindir}/rpmdiff
|
||||
%{_bindir}/rpmlint
|
||||
%dir %{_datadir}/rpmlint/
|
||||
%{_datadir}/rpmlint/*.py
|
||||
%{_datadir}/rpmlint/config
|
||||
%{_mandir}/man1/rpmlint.1*
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 29 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.77-1
|
||||
- 0.77, fixes #194466, #195962, #196008, #196985.
|
||||
- Make "disttag" configurable using the DistRegex config file option.
|
||||
- Sync standard users and groups with the FC setup package.
|
||||
- Disable MenuCheck by default, it's currently Mandriva specific.
|
||||
- Use upstream default valid License tag list, fixes #191078.
|
||||
- Use upstream default valid Group tag list (dynamically retrieved from
|
||||
the GROUPS file shipped with rpm).
|
||||
- Allow /usr/libexec, fixes #195992.
|
||||
|
||||
* Tue Apr 11 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.76-1
|
||||
- 0.76.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user