Hello community,
here is the log from the commit of package apport
checked in at Mon Nov 17 16:38:08 CET 2008.
--------
--- apport/apport.changes 2008-11-10 17:07:05.000000000 +0100
+++ /mounts/work_src_done/STABLE/apport/apport.changes 2008-11-14 15:37:20.000000000 +0100
@@ -1,0 +2,28 @@
+Fri Nov 14 15:36:12 CET 2008 - jblunck@suse.de
+
+- Fix support for proper signature checking
+- Fix get_available_version() to really return the latest available package
+ instead of the first one found
+- Fix is_distro_package() testcase
+- Cleanup some whitespace noise
+
+-------------------------------------------------------------------
+Fri Nov 14 12:58:44 CET 2008 - jblunck@suse.de
+
+- Fix package signature parsing to also support RSA keys
+- Remove annoying debugging leftover
+
+-------------------------------------------------------------------
+Fri Nov 14 10:59:47 CET 2008 - jblunck@suse.de
+
+- Fix tmp races patch
+- Set noclobber in init script
+
+-------------------------------------------------------------------
+Thu Nov 13 16:10:54 CET 2008 - jblunck@suse.de
+
+- Add new openSUSE Project Signing Key id
+- Fix tmp races found by security audit
+- Save old core_pattern to /var/run instead of /var/tmp
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
apport-0.114-rev1176.tar.bz2
New:
----
apport-0.114-rev1184.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ apport.spec ++++++
--- /var/tmp/diff_new_pack.nl7296/_old 2008-11-17 16:37:44.000000000 +0100
+++ /var/tmp/diff_new_pack.nl7296/_new 2008-11-17 16:37:44.000000000 +0100
@@ -18,11 +18,12 @@
# norootforbuild
-%define revno -rev1176
+%define revno -rev1184
Name: apport
+Summary: Automatic crash handler
Version: 0.114
-Release: 5
+Release: 6
License: GPL v2 or later
Url: https://launchpad.net/apport
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -37,7 +38,6 @@
Source2: crashdb.conf
Source3: CA.cert
Group: System/Monitoring
-Summary: Automatic crash handler
%description
Apport automatically collects data from crashed processes and compiles
@@ -229,6 +229,22 @@
/usr/share/apport/*.ui
%changelog
+* Fri Nov 14 2008 jblunck@suse.de
+- Fix support for proper signature checking
+- Fix get_available_version() to really return the latest available package
+ instead of the first one found
+- Fix is_distro_package() testcase
+- Cleanup some whitespace noise
+* Fri Nov 14 2008 jblunck@suse.de
+- Fix package signature parsing to also support RSA keys
+- Remove annoying debugging leftover
+* Fri Nov 14 2008 jblunck@suse.de
+- Fix tmp races patch
+- Set noclobber in init script
+* Thu Nov 13 2008 jblunck@suse.de
+- Add new openSUSE Project Signing Key id
+- Fix tmp races found by security audit
+- Save old core_pattern to /var/run instead of /var/tmp
* Mon Nov 10 2008 jblunck@suse.de
- String compare in python is case-sensitive: adjust the keyids
- Only look for available packages of the same architecture
++++++ apport-0.114-rev1176.tar.bz2 -> apport-0.114-rev1184.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/apport-0.114/apport_python_hook.py new/apport-0.114/apport_python_hook.py
--- old/apport-0.114/apport_python_hook.py 2008-11-10 17:05:06.000000000 +0100
+++ new/apport-0.114/apport_python_hook.py 2008-11-14 15:35:34.000000000 +0100
@@ -81,7 +81,8 @@
# get the uid for now, user name later
user = os.getuid()
pr_filename = '/var/crash/%s.%i.crash' % (mangled_program, user)
- report_file = open(pr_filename, 'wt')
+ report_file = os.fdopen(os.open(pr_filename,
+ os.O_WRONLY|os.O_CREAT|os.O_EXCL), 'w')
os.chmod(pr_filename, 0600)
try:
pr.write(report_file)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/apport-0.114/backends/packaging_opensuse.py new/apport-0.114/backends/packaging_opensuse.py
--- old/apport-0.114/backends/packaging_opensuse.py 2008-11-10 17:05:06.000000000 +0100
+++ new/apport-0.114/backends/packaging_opensuse.py 2008-11-14 15:35:34.000000000 +0100
@@ -79,6 +79,7 @@
'0dfb3188', # Open Enterprise Server
'1d061a62', # build@novell.com (Novell Linux Products)
'56b4177a', # openSUSE:Factory OBS Project (external build service)
+ '3dbdc284', # openSUSE Project Signing Key
)
# This information should be delivered by the crash database server:
@@ -163,14 +164,17 @@
def get_available_version(self, package):
'''Return the latest available version of a package.'''
+
myArch = RPMPackageInfo.get_architecture(self, package)
myZ = self.get_zypp_instance()
+ version = None
for item in myZ.pool():
- if zypp.isKindPackage(item) and item.name() == package and item.arch() == myArch:
- return ("%s" % item.edition())
+ if zypp.isKindPackage(item) and item.name() == package and str(item.arch()) == myArch:
+ if (version == None) or (self.compare_versions(version, str(item.edition())) > 0):
+ version = str(item.edition())
- return None
+ return version
impl = __SUSEPackageInfo()
@@ -187,7 +191,10 @@
'''Test is_distro_package().'''
self.assert_(impl.is_distro_package('kernel-default'))
- self.assert_(not impl.is_distro_package('libxine1'))
+ try:
+ self.assert_(not impl.is_distro_package('libxine1'))
+ except ValueError:
+ pass
self.assertRaises(ValueError, impl.is_distro_package, 'nonexistant_package')
def test_compare_versions(self):
@@ -212,8 +219,6 @@
def test_get_available_version(self):
'''Test get_available_version().'''
- self.assert_(impl.get_available_version('bash'))
-
+ self.assert_(impl.get_available_version('bash'))
+
unittest.main()
-
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/apport-0.114/backends/packaging_rpm.py new/apport-0.114/backends/packaging_rpm.py
--- old/apport-0.114/backends/packaging_rpm.py 2008-11-10 17:05:06.000000000 +0100
+++ new/apport-0.114/backends/packaging_rpm.py 2008-11-14 15:35:34.000000000 +0100
@@ -22,7 +22,7 @@
# It'd be convenient to use rpmUtils from yum, but I'm trying to keep this
# class distro-agnostic.
-import rpm, os, stat, subprocess
+import re, rpm, os, stat, subprocess
# The hashlib module (new in Python 2.5) is preferred over the md5 module. The
# (old) md5 module is deprecated since Python 2.5.
@@ -71,7 +71,6 @@
# parse this package's Requires
reqs=[]
for r in hdr['requires']:
- print 'r: ', r
if r.startswith('rpmlib') or r.startswith('uname('):
continue # we've got rpmlib, thanks
if r[0] == '/': # file requires
@@ -160,11 +159,13 @@
hdr = self._get_header(package)
if not hdr:
return False
- # Check the GPG sig and key ID to see if this package was signed
- # with an official key.
- if hdr['siggpg']:
- # Package is signed
- keyid = hdr['siggpg'][13:17].encode('hex')
+
+ # Check the PGP/GPG signature and key ID to see if this package was
+ # signed with an official key.
+ siginfo_string = '%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|'
+ siginfo = hdr.sprintf(siginfo_string)
+ if (siginfo != "(none)"):
+ keyid = re.search('Key ID ([\dA-Fa-f]+)', siginfo).group(1)[-8:]
if keyid.lower() in self.official_keylist:
return True
return False
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/apport-0.114/bin/apport new/apport-0.114/bin/apport
--- old/apport-0.114/bin/apport 2008-11-10 17:05:06.000000000 +0100
+++ new/apport-0.114/bin/apport 2008-11-14 15:35:34.000000000 +0100
@@ -297,7 +297,8 @@
drop_privileges(pid)
write_user_coredump(pid, cwd, core_ulimit)
sys.exit(1)
- reportfile = open(report, 'w')
+ reportfile = os.fdopen(os.open(report,
+ os.O_WRONLY|os.O_CREAT|os.O_EXCL), 'w')
os.chmod(report, 0000)
os.chown(report, pidstat.st_uid, pidstat.st_gid)
except (OSError, IOError):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/apport-0.114/problem_report.py new/apport-0.114/problem_report.py
--- old/apport-0.114/problem_report.py 2008-11-10 17:05:06.000000000 +0100
+++ new/apport-0.114/problem_report.py 2008-11-14 15:35:34.000000000 +0100
@@ -960,8 +960,6 @@
pr.write(io)
temp.close()
- open('/tmp/r', 'w').write(io.getvalue())
-
# read it again
io.seek(0)
pr = ProblemReport()
++++++ rc.apport ++++++
--- /var/tmp/diff_new_pack.nl7296/_old 2008-11-17 16:37:45.000000000 +0100
+++ /var/tmp/diff_new_pack.nl7296/_new 2008-11-17 16:37:45.000000000 +0100
@@ -19,7 +19,9 @@
# The location of the core pattern file
PATFILE=/proc/sys/kernel/core_pattern
# Location to save the old core_pattern
-OLDPAT=/var/tmp/core_pattern
+OLDPAT=/var/run/apport.old-core_pattern
+
+set -o noclobber
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
@@ -41,8 +43,8 @@
[ -e /var/crash ] || {
log_failure_msg "There is /var/crash directory missing in your system";
exit 2; }
- cat $PATFILE > $OLDPAT
- echo "|$AGENT %p %s %c" > /proc/sys/kernel/core_pattern
+ cat $PATFILE > $OLDPAT
+ echo "|$AGENT %p %s %c" >| /proc/sys/kernel/core_pattern
fi
}
@@ -52,7 +54,7 @@
stop_apport()
{
if apport_is_enabled; then
- cat $OLDPAT > $PATFILE
+ cat $OLDPAT >| $PATFILE
rm -f $OLDPAT
fi
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org