forked from pool/rpmlint
Accepting request 68072 from devel:openSUSE:Factory:rpmlint
Accepted submit request 68072 from user coolo OBS-URL: https://build.opensuse.org/request/show/68072 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=103
This commit is contained in:
parent
09195b388c
commit
a7072b8567
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 21 13:00:43 UTC 2011 - lnussel@suse.de
|
||||
|
||||
- fix sysv5-init-check.diff to not throw exception
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 20 17:31:23 CEST 2011 - dmueller@suse.de
|
||||
|
||||
|
@ -1,17 +1,19 @@
|
||||
--- InitScriptCheck.py
|
||||
Index: InitScriptCheck.py
|
||||
===================================================================
|
||||
--- InitScriptCheck.py.orig
|
||||
+++ InitScriptCheck.py
|
||||
@@ -29,6 +29,10 @@
|
||||
@@ -29,6 +29,10 @@ dot_in_name_regex = re.compile('.*\..*')
|
||||
use_deflevels = Config.getOption('UseDefaultRunlevels', True)
|
||||
lsb_tags_regex = re.compile('^# ([\w-]+):\s*(.*?)\s*$')
|
||||
lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$')
|
||||
+insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE)
|
||||
+preun_regex=re.compile('^\s*%stop_on_removal\s+\S+', re.MULTILINE)
|
||||
+restart_on_update_regex=re.compile('^\s*%restart_on_update \S+', re.MULTILINE)
|
||||
+stop_on_removal_regex=re.compile('^\s*%stop_on_removal\s+\S+', re.MULTILINE)
|
||||
+restart_on_update_regex=re.compile('^\s*%restart_on_update\s\S+', re.MULTILINE)
|
||||
+insserv_cleanup_regex=re.compile('^\s*%insserv_cleanup', re.MULTILINE)
|
||||
|
||||
LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
||||
'Should-Stop', 'Default-Start', 'Default-Stop',
|
||||
@@ -47,6 +51,13 @@
|
||||
@@ -47,6 +51,13 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
return
|
||||
|
||||
initscript_list = []
|
||||
@ -25,7 +27,7 @@
|
||||
for fname, pkgfile in pkg.files().items():
|
||||
|
||||
if not fname.startswith('/etc/init.d/') and \
|
||||
@@ -60,18 +71,19 @@
|
||||
@@ -60,18 +71,19 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
|
||||
if dot_in_name_regex.match(basename):
|
||||
printError(pkg, 'init-script-name-with-dot', fname)
|
||||
@ -43,7 +45,7 @@
|
||||
- printError(pkg, 'preun-without-chkconfig', fname)
|
||||
+ printError(pkg, 'init-script-without-%stop_on_removal-preun', fname)
|
||||
+ elif not stop_on_removal_regex.search(postin):
|
||||
+ printError(pkg, 'preun-without-%%stop_on_removal-preun', fname)
|
||||
+ printError(pkg, 'preun-without-%stop_on_removal-preun', fname)
|
||||
+
|
||||
+ if not postun:
|
||||
+ printError(pkg, 'init-script-without-%restart_on_update-postun', fname)
|
||||
@ -55,7 +57,7 @@
|
||||
|
||||
status_found = False
|
||||
reload_found = False
|
||||
@@ -202,10 +214,18 @@
|
||||
@@ -202,10 +214,18 @@ a call to chkconfig.''',
|
||||
'''The package contains an init script but doesn't call chkconfig in its
|
||||
%post script.''',
|
||||
|
||||
@ -75,7 +77,7 @@
|
||||
'preun-without-chkconfig',
|
||||
'''The package contains an init script but doesn't call chkconfig in its
|
||||
%preun script.''',
|
||||
@@ -264,6 +284,24 @@
|
||||
@@ -264,6 +284,24 @@ of chkconfig don't work as expected with
|
||||
'init-script-non-executable',
|
||||
'''The init script should have at least the execution bit set for root
|
||||
in order for it to run at boot time.''',
|
||||
|
Loading…
Reference in New Issue
Block a user