forked from pool/rpmlint
Accepting request 68367 from devel:openSUSE:Factory:rpmlint
Accepted submit request 68367 from user oertel OBS-URL: https://build.opensuse.org/request/show/68367 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=105
This commit is contained in:
commit
2c4f427c90
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 23 11:11:37 CEST 2011 - dmueller@suse.de
|
||||
|
||||
- fix abort in BinariesCheck
|
||||
- fix sysv5-init-check.diff for real
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 21 13:00:43 UTC 2011 - lnussel@suse.de
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
Index: BinariesCheck.py
|
||||
===================================================================
|
||||
--- BinariesCheck.py.orig
|
||||
--- BinariesCheck.py
|
||||
+++ BinariesCheck.py
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -10,13 +10,15 @@
|
||||
|
||||
import re
|
||||
import stat
|
||||
@ -10,7 +8,8 @@ Index: BinariesCheck.py
|
||||
|
||||
import rpm
|
||||
|
||||
@@ -17,6 +18,7 @@ from Filter import addDetails, printErro
|
||||
-from Filter import addDetails, printError, printWarning
|
||||
+from Filter import addDetails, printError, printWarning, printInfo
|
||||
import AbstractCheck
|
||||
import Config
|
||||
import Pkg
|
||||
@ -18,7 +17,7 @@ Index: BinariesCheck.py
|
||||
|
||||
|
||||
DEFAULT_SYSTEM_LIB_PATHS = (
|
||||
@@ -37,6 +39,9 @@ class BinaryInfo:
|
||||
@@ -37,6 +39,9 @@
|
||||
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|$)')
|
||||
@ -28,7 +27,7 @@ Index: BinariesCheck.py
|
||||
|
||||
def __init__(self, pkg, path, file, is_ar, is_shlib):
|
||||
self.readelf_error = False
|
||||
@@ -50,7 +55,10 @@ class BinaryInfo:
|
||||
@@ -50,7 +55,10 @@
|
||||
self.stack = False
|
||||
self.exec_stack = False
|
||||
self.exit_calls = []
|
||||
@ -39,7 +38,7 @@ Index: BinariesCheck.py
|
||||
self.tail = ''
|
||||
|
||||
is_debug = path.endswith('.debug')
|
||||
@@ -93,6 +101,11 @@ class BinaryInfo:
|
||||
@@ -93,6 +101,11 @@
|
||||
self.exec_stack = True
|
||||
continue
|
||||
|
||||
@ -51,7 +50,7 @@ Index: BinariesCheck.py
|
||||
if is_shlib:
|
||||
r = BinaryInfo.exit_call_regex.search(l)
|
||||
if r:
|
||||
@@ -103,6 +116,14 @@ class BinaryInfo:
|
||||
@@ -103,6 +116,14 @@
|
||||
fork_called = True
|
||||
continue
|
||||
|
||||
@ -66,7 +65,7 @@ Index: BinariesCheck.py
|
||||
if self.non_pic:
|
||||
self.non_pic = 'TEXTREL' in res[1]
|
||||
|
||||
@@ -263,13 +284,26 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
@@ -263,13 +284,26 @@
|
||||
continue
|
||||
|
||||
# stripped ?
|
||||
@ -94,7 +93,7 @@ Index: BinariesCheck.py
|
||||
if is_shlib:
|
||||
has_lib = True
|
||||
|
||||
@@ -319,6 +353,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
@@ -319,6 +353,10 @@
|
||||
for ec in bin_info.exit_calls:
|
||||
printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
|
||||
|
||||
@ -105,7 +104,7 @@ Index: BinariesCheck.py
|
||||
# rpath ?
|
||||
if bin_info.rpath:
|
||||
for p in bin_info.rpath:
|
||||
@@ -504,6 +542,14 @@ with the intended shared libraries only.
|
||||
@@ -504,6 +542,14 @@
|
||||
'ldd-failed',
|
||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||
|
||||
@ -120,7 +119,7 @@ Index: BinariesCheck.py
|
||||
'executable-stack',
|
||||
'''The binary declares the stack as executable. Executable stack is usually an
|
||||
error as it is only needed if the code contains GCC trampolines or similar
|
||||
@@ -516,6 +562,10 @@ don\'t define a proper .note.GNU-stack s
|
||||
@@ -516,6 +562,10 @@
|
||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||
an old GNU linker version.''',
|
||||
|
||||
@ -131,7 +130,7 @@ Index: BinariesCheck.py
|
||||
'shared-lib-calls-exit',
|
||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||
context. Doing so from a library is strongly discouraged - when a library
|
||||
@@ -533,6 +583,12 @@ form, make sure that rpmbuild does not s
|
||||
@@ -533,6 +583,12 @@
|
||||
that use prelink, make sure that prelink does not strip it either, usually by
|
||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||
|
@ -1,8 +1,6 @@
|
||||
Index: InitScriptCheck.py
|
||||
===================================================================
|
||||
--- InitScriptCheck.py.orig
|
||||
--- InitScriptCheck.py
|
||||
+++ InitScriptCheck.py
|
||||
@@ -29,6 +29,10 @@ dot_in_name_regex = re.compile('.*\..*')
|
||||
@@ -29,6 +29,10 @@
|
||||
use_deflevels = Config.getOption('UseDefaultRunlevels', True)
|
||||
lsb_tags_regex = re.compile('^# ([\w-]+):\s*(.*?)\s*$')
|
||||
lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$')
|
||||
@ -13,7 +11,7 @@ Index: InitScriptCheck.py
|
||||
|
||||
LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
||||
'Should-Stop', 'Default-Start', 'Default-Stop',
|
||||
@@ -47,6 +51,13 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
@@ -47,6 +51,13 @@
|
||||
return
|
||||
|
||||
initscript_list = []
|
||||
@ -27,7 +25,7 @@ Index: InitScriptCheck.py
|
||||
for fname, pkgfile in pkg.files().items():
|
||||
|
||||
if not fname.startswith('/etc/init.d/') and \
|
||||
@@ -60,18 +71,19 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
@@ -60,18 +71,19 @@
|
||||
|
||||
if dot_in_name_regex.match(basename):
|
||||
printError(pkg, 'init-script-name-with-dot', fname)
|
||||
@ -44,7 +42,7 @@ Index: InitScriptCheck.py
|
||||
- elif not chkconfig_regex.search(preun):
|
||||
- printError(pkg, 'preun-without-chkconfig', fname)
|
||||
+ printError(pkg, 'init-script-without-%stop_on_removal-preun', fname)
|
||||
+ elif not stop_on_removal_regex.search(postin):
|
||||
+ elif not stop_on_removal_regex.search(preun):
|
||||
+ printError(pkg, 'preun-without-%stop_on_removal-preun', fname)
|
||||
+
|
||||
+ if not postun:
|
||||
@ -57,7 +55,7 @@ Index: InitScriptCheck.py
|
||||
|
||||
status_found = False
|
||||
reload_found = False
|
||||
@@ -202,10 +214,18 @@ a call to chkconfig.''',
|
||||
@@ -202,10 +214,18 @@
|
||||
'''The package contains an init script but doesn't call chkconfig in its
|
||||
%post script.''',
|
||||
|
||||
@ -77,7 +75,7 @@ Index: InitScriptCheck.py
|
||||
'preun-without-chkconfig',
|
||||
'''The package contains an init script but doesn't call chkconfig in its
|
||||
%preun script.''',
|
||||
@@ -264,6 +284,24 @@ of chkconfig don't work as expected with
|
||||
@@ -264,6 +284,24 @@
|
||||
'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