From e7dcfc009eb9e0e46fce3f90f3df87c487405696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Jun 2005 18:03:08 +0000 Subject: [PATCH] 0.70, improve config, fix non-config message, non-enabled services are good. --- .cvsignore | 2 +- rpmlint-confmsg.patch | 20 ++++++++++++++++++++ rpmlint-fedora-config | 10 ++++++---- rpmlint-svcdefault.patch | 30 ++++++++++++++++++++++++++++++ rpmlint.spec | 37 +++++++++++++++++++++++++++---------- sources | 2 +- 6 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 rpmlint-confmsg.patch create mode 100644 rpmlint-svcdefault.patch diff --git a/.cvsignore b/.cvsignore index 72a8492..59ca2c6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rpmlint-0.69.tar.bz2 +rpmlint-0.70.tar.bz2 diff --git a/rpmlint-confmsg.patch b/rpmlint-confmsg.patch new file mode 100644 index 0000000..dd3cd1c --- /dev/null +++ b/rpmlint-confmsg.patch @@ -0,0 +1,20 @@ +Index: FilesCheck.py +=================================================================== +RCS file: /cooker/soft/rpmlint/FilesCheck.py,v +retrieving revision 1.87 +diff -u -r1.87 FilesCheck.py +--- FilesCheck.py 17 Jun 2005 09:48:34 -0000 1.87 ++++ FilesCheck.py 20 Jun 2005 10:30:43 -0000 +@@ -692,9 +692,9 @@ + Please remove it and rebuild your package.''', + + 'non-conffile-in-etc', +-'''A file in your package is being installed in /etc, but is not a +-configuration file. All the files in /etc MUST be configuration files +-(add the %config option to the file in the spec file).''', ++'''A non-executable file in your package is being installed in /etc, but is not ++a configuration file. All non-executable files in /etc should be configuration ++files. Mark the file as %config in the spec file.''', + + 'compressed-symlink-with-wrong-ext', + '''The symlink points to a compressed file but doesn't use the same extension.''', diff --git a/rpmlint-fedora-config b/rpmlint-fedora-config index 6234941..069091d 100644 --- a/rpmlint-fedora-config +++ b/rpmlint-fedora-config @@ -27,6 +27,7 @@ setOption("ValidGroups", ( "Applications/Publishing", "Applications/System", "Applications/Text", + "Development/Debug", # intended for debuginfo packages only "Development/Debuggers", "Development/Languages", "Development/Libraries", @@ -79,15 +80,16 @@ addFilter("W: .* source-or-patch-not-[bg]zipped .*") addFilter("E: .* lib-package-without-%mklibname") addFilter("E: .* no-dependency-on (perl|python)-base.*") addFilter("W: .* (python|perl5)-naming-policy-not-applied.*") -addFilter("W: .* invalid-distribution .*") -addFilter("W: .* invalid-vendor .*") +addFilter("W: .* invalid-(distribution|vendor) .*") +addFilter("E: .* no-(packager-tag|signature)") addFilter("E: .* incoherent-version-in-name.*") addFilter("E: .* invalid-build-requires .*") -addFilter("E: .* no-packager-tag") addFilter("W: .* ghost-files-without-postin") addFilter("W: .* postin-without-ghost-file-creation .*") addFilter("W: .* no-major-in-name .*") addFilter("E: .* executable-in-library-package .*") -addFilter("E: .* no-signature") addFilter("E: .* non-versioned-file-in-library-package .*") addFilter("E: .* requires-on-release .*") +addFilter("W: .* jar-not-indexed .*") +addFilter("E: .* invalid-(lc-messages|locale-man)-dir .*") +addFilter("E: .* outside-libdir-files .*") diff --git a/rpmlint-svcdefault.patch b/rpmlint-svcdefault.patch new file mode 100644 index 0000000..d8a82df --- /dev/null +++ b/rpmlint-svcdefault.patch @@ -0,0 +1,30 @@ +Index: InitScriptCheck.py +=================================================================== +RCS file: /cooker/soft/rpmlint/InitScriptCheck.py,v +retrieving revision 1.14 +diff -u -r1.14 InitScriptCheck.py +--- InitScriptCheck.py 15 Apr 2005 20:01:46 -0000 1.14 ++++ InitScriptCheck.py 20 Jun 2005 10:20:15 -0000 +@@ -74,8 +74,8 @@ + if not res: + printError(pkg, 'no-chkconfig-line', f) + else: +- if res.group(1) == '-': +- printWarning(pkg, 'no-default-runlevel') ++ if res.group(1) != '-': ++ printWarning(pkg, 'service-default-enabled', f) + + res=subsys_regex.search(content) + if not res: +@@ -126,8 +126,9 @@ + '''The init script doesn't contain a chkconfig line to specify the runlevels at which + to start and stop it.''', + +-'no-default-runlevel', +-'''The default runlevel isn't specified in the init script.''', ++'service-default-enabled', ++'''The service is enabled by default after "chkconfig --add"; most services ++should not be. Use "-" to correct this if appropriate.''', + + 'subsys-not-used', + '''While your program is running, you have to put a lock file in diff --git a/rpmlint.spec b/rpmlint.spec index c941e11..7e93050 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,18 +1,24 @@ Name: rpmlint -Version: 0.69 +Version: 0.70 Release: 3 Summary: Tool for checking common errors in RPM packages Group: Development/Tools License: GPL -URL: http://people.mandrakesoft.com/~flepied/projects/rpmlint/ -Source0: http://people.mandrakesoft.com/~flepied/projects/rpmlint/dist/%{name}-%{version}.tar.bz2 +URL: http://people.mandriva.com/~flepied/projects/rpmlint/ +Source0: http://people.mandriva.com/~flepied/projects/rpmlint/dist/%{name}-%{version}.tar.bz2 Source1: %{name}-fedora-config +Patch0: %{name}-svcdefault.patch +Patch1: %{name}-confmsg.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: python >= 1.5.2, rpm-python, make, %{__perl} -Requires: rpm-python, python >= 1.5.2, cpio +BuildRequires: python >= 1.5.2 +BuildRequires: rpm-python +BuildRequires: sed >= 3.95 +Requires: rpm-python +Requires: python >= 1.5.2 +Requires: cpio %description rpmlint is a tool for checking common errors in RPM packages. Binary @@ -21,7 +27,9 @@ and source packages can be checked. %prep %setup -q -%{__perl} -pi -e 's|/etc/httpd/webapps\.d|%{_sysconfdir}/httpd/conf.d|' \ +%patch0 +%patch1 +sed -i -e 's|/etc/httpd/webapps\.d|%{_sysconfdir}/httpd/conf.d|' \ FilesCheck.py I18NCheck.py for f in AUTHORS ChangeLog ; do iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f @@ -64,15 +72,24 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,0755) %doc AUTHORS COPYING ChangeLog README %{_bindir}/rpm* -%dir %{_datadir}/rpmlint +%dir %{_datadir}/rpmlint/ %exclude %{_datadir}/rpmlint/check-install.py* -%dir %{_sysconfdir}/rpmlint +%dir %{_sysconfdir}/rpmlint/ %config(noreplace) %{_sysconfdir}/rpmlint/config -# Not config (yet?) to achieve clean upgrade from pre-0.69. -%{_sysconfdir}/bash_completion.d +%{_sysconfdir}/bash_completion.d/ %changelog +* Mon Jun 20 2005 Ville Skyttä - 0.70-3 +- 0.70, use sed instead of perl during build. +- Default configuration improvements: allow Development/Debug group (for + debuginfo packages), filter out errors/warnings about non-indexed jars, + invalid LC_MESSAGES and man page dirs, and library packages containing + something else in addition to libraries. +- Make info about non-config files in /etc more accurate. +- Patch to warn about services that default to enabled after "chkconfig add", + not the other way around. + * Thu May 26 2005 Ville Skyttä - 0.69-3 - Filter out more not-that-useful messages in the default config. diff --git a/sources b/sources index 5cda631..1449281 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5e5bc5e2d493e35e300b7498824fee1d rpmlint-0.69.tar.bz2 +0457f6d88c6b25fe3cb31503249a6909 rpmlint-0.70.tar.bz2