SHA256
1
0
forked from pool/rpmlint

Accepting request 220366 from devel:openSUSE:Factory:rpmlint

- remove suse-rclink-check.diff and implement as separate check for
  systemd units instead (bnc#860340).

OBS-URL: https://build.opensuse.org/request/show/220366
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=209
This commit is contained in:
Stephan Kulow 2014-01-31 08:44:43 +00:00 committed by Git OBS Bridge
commit 3fcc3c5018
5 changed files with 11 additions and 53 deletions

1
config
View File

@ -39,6 +39,7 @@ addCheck("BashismsCheck")
addCheck("CheckBuildDate")
addCheck("CheckLogrotate")
addCheck("CheckPAMModules")
addCheck("CheckRCLinks")
# stuff autobuild takes care about
addFilter(".*invalid-version.*")

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:190eb7848284f785f3fbe9cf50152b54842c7ed411f7494de681c6efbaad23a4
size 30888
oid sha256:359bd3a591a2db10e13ffd840543d9520a5f665318038ed224edc73ac558dbc3
size 30657

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 30 09:17:08 UTC 2014 - lnussel@suse.de
- remove suse-rclink-check.diff and implement as separate check for
systemd units instead (bnc#860340).
-------------------------------------------------------------------
Tue Jan 28 14:21:12 UTC 2014 - mpost@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package rpmlint
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 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
@ -33,6 +33,7 @@ Source2: config
Source3: config.in
Source11: pie.config
Source12: licenses.config
Source99: README.packaging.txt
Source100: syntax-validator.py
Url: https://sourceforge.net/projects/rpmlint/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -114,7 +115,6 @@ 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
@ -195,7 +195,6 @@ source packages can be checked.
%patch81
%patch84
%patch85
%patch86
%patch87
%patch88
%patch89

View File

@ -1,48 +0,0 @@
Index: InitScriptCheck.py
===================================================================
--- InitScriptCheck.py.orig
+++ InitScriptCheck.py
@@ -50,7 +50,7 @@ class InitScriptCheck(AbstractCheck.Abst
return
initscript_list = []
-
+ rclinks = set()
# check chkconfig call in %post and %preun
postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG])
@@ -59,6 +59,10 @@ class InitScriptCheck(AbstractCheck.Abst
for fname, pkgfile in pkg.files().items():
+ if stat.S_ISLNK(pkgfile.mode) and (fname.startswith("/usr/sbin/rc") \
+ or fname.startswith("/sbin/rc")):
+ rclinks.add(fname.partition('/rc')[2])
+
if not fname.startswith('/etc/init.d/') and \
not fname.startswith('/etc/rc.d/init.d/'):
continue
@@ -198,6 +202,12 @@ class InitScriptCheck(AbstractCheck.Abst
elif subsys_regex_found and not use_subsys:
printError(pkg, 'subsys-unsupported', fname)
+ for script in initscript_list:
+ if script.startswith("rc") or script.startswith("boot."):
+ continue
+ if not script in rclinks:
+ printWarning(pkg, 'suse-missing-rclink', script)
+
if len(initscript_list) == 1:
pkgname = re.sub("-sysvinit$", "", pkg.name.lower())
goodnames = (pkgname, pkgname + 'd')
@@ -222,6 +232,10 @@ a call to chkconfig.''',
'''The package contains an init script but doesn't contain a %preun with
a call to chkconfig.''',
+'suse-missing-rclink',
+'''The package contains an init script with the given name but does not
+contain the SUSE policy symlink /usr/sbin/rcFOO -> /etc/init.d/FOO''',
+
'preun-without-chkconfig',
'''The package contains an init script but doesn't call chkconfig in its
%preun script.''',