[systemd/f15] Pick bugfixes from upstream

Michal Schmidt michich at fedoraproject.org
Sun Jun 12 23:42:53 UTC 2011


commit 7c34a4c5e450856601671cee2899c2ee5282fbd9
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Sun Jun 12 16:20:13 2011 +0200

    Pick bugfixes from upstream
    
    systemctl: fix double unref of a dbus message (BZ#709909)
    cryptsetup-generator: fix /etc/cryptsetup options (BZ#710839)
    readahead-common: fix total memory size detection (BZ#712341)

 ...etup-generator-fix-etc-cryptsetup-options.patch |   34 ++++++++++++++++++++
 ...ad-common-fix-total-memory-size-detection.patch |   33 +++++++++++++++++++
 ...temctl-fix-double-unref-of-a-dbus-message.patch |   24 ++++++++++++++
 systemd.spec                                       |   14 +++++++-
 4 files changed, 104 insertions(+), 1 deletions(-)
---
diff --git a/0001-cryptsetup-generator-fix-etc-cryptsetup-options.patch b/0001-cryptsetup-generator-fix-etc-cryptsetup-options.patch
new file mode 100644
index 0000000..b439b34
--- /dev/null
+++ b/0001-cryptsetup-generator-fix-etc-cryptsetup-options.patch
@@ -0,0 +1,34 @@
+From aae5220d961a419a1e160de90ee5c393c7c13607 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Mon, 6 Jun 2011 22:59:19 +0200
+Subject: [PATCH] cryptsetup-generator: fix /etc/cryptsetup options
+
+cryptsetup-generator parses the options in /etc/cryptsetup incorrectly.
+It fails to find the 'swap' option in
+  swap,foo
+and instead it matches on
+  swaplalala,foo
+
+The condition for the comma separator is reversed.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=710839
+---
+ src/cryptsetup-generator.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c
+index 696f44a..db8ebdf 100644
+--- a/src/cryptsetup-generator.c
++++ b/src/cryptsetup-generator.c
+@@ -47,7 +47,7 @@ static bool has_option(const char *haystack, const char *needle) {
+                         continue;
+                 }
+ 
+-                if (f[l] != 0 && f[l] == ',') {
++                if (f[l] != 0 && f[l] != ',') {
+                         f++;
+                         continue;
+                 }
+-- 
+1.7.4.4
+
diff --git a/0001-readahead-common-fix-total-memory-size-detection.patch b/0001-readahead-common-fix-total-memory-size-detection.patch
new file mode 100644
index 0000000..add3d15
--- /dev/null
+++ b/0001-readahead-common-fix-total-memory-size-detection.patch
@@ -0,0 +1,33 @@
+From 597b99b09a007dfa8ddfce31c480765b0c7baa6a Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Fri, 10 Jun 2011 14:37:21 +0200
+Subject: [PATCH] readahead-common: fix total memory size detection
+
+sysinfo returns the total memory size in multiples of mem_unit bytes.
+As long as the size in bytes fits into unsigned long, the kernel uses
+mem_unit = 1, but this is not true on i386 with more than 4 GB RAM.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=712341
+---
+ src/readahead-common.c |    5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/readahead-common.c b/src/readahead-common.c
+index 8a75b2e..f0d57b4 100644
+--- a/src/readahead-common.c
++++ b/src/readahead-common.c
+@@ -154,9 +154,8 @@ bool enough_ram(void) {
+ 
+         assert_se(sysinfo(&si) >= 0);
+ 
+-        return si.totalram > 127 * 1024*1024; /* Enable readahead only
+-                                               * with at least 128MB
+-                                               * memory */
++        /* Enable readahead only with at least 128MB memory */
++        return si.totalram > 127 * 1024*1024 / si.mem_unit;
+ }
+ 
+ int open_inotify(void) {
+-- 
+1.7.4.4
+
diff --git a/0001-systemctl-fix-double-unref-of-a-dbus-message.patch b/0001-systemctl-fix-double-unref-of-a-dbus-message.patch
new file mode 100644
index 0000000..4157cec
--- /dev/null
+++ b/0001-systemctl-fix-double-unref-of-a-dbus-message.patch
@@ -0,0 +1,24 @@
+From 78e39b43b89c6bf9ce401d6030939a004a23c850 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Sun, 5 Jun 2011 17:22:37 +0200
+Subject: [PATCH] systemctl: fix double unref of a dbus message
+
+---
+ src/systemctl.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/systemctl.c b/src/systemctl.c
+index 99ada38..a82cce4 100644
+--- a/src/systemctl.c
++++ b/src/systemctl.c
+@@ -1565,6 +1565,7 @@ static int check_unit(DBusConnection *bus, char **args, unsigned n) {
+ 
+                         dbus_error_free(&error);
+                         dbus_message_unref(m);
++                        m = NULL;
+                         continue;
+                 }
+ 
+-- 
+1.7.4.4
+
diff --git a/systemd.spec b/systemd.spec
index 95a10c6..892ed6c 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -2,7 +2,7 @@ Name:           systemd
 Url:            http://www.freedesktop.org/wiki/Software/systemd
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Version:        26
-Release:        2%{?dist}
+Release:        3%{?dist}
 License:        GPLv2+
 Group:          System Environment/Base
 Summary:        A System and Service Manager
@@ -40,6 +40,9 @@ Patch0:         0001-dbus-common-fix-segfault-when-a-DBus-message-has-no-.patch
 Patch1:         0001-readahead-collect-ignore-EACCES-for-fanotify.patch
 Patch2:         0001-vconsole-use-open_terminal-instead-of-open.patch
 Patch3:         0001-pam-downgrade-a-few-log-msgs.patch
+Patch4:         0001-systemctl-fix-double-unref-of-a-dbus-message.patch
+Patch5:         0001-cryptsetup-generator-fix-etc-cryptsetup-options.patch
+Patch6:         0001-readahead-common-fix-total-memory-size-detection.patch
 
 # For sysvinit tools
 Obsoletes:      SysVinit < 2.86-24, sysvinit < 2.86-24
@@ -97,6 +100,9 @@ SysV compatibility tools for systemd
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 %configure --with-rootdir= --with-distro=fedora
@@ -299,6 +305,12 @@ fi
 %{_bindir}/systemd-sysv-convert
 
 %changelog
+* Sun Jun 12 2011 Michal Schmidt <mschmidt at redhat.com> - 26-3
+- Pick bugfixes from upstream:
+- systemctl: fix double unref of a dbus message (BZ#709909)
+- cryptsetup-generator: fix /etc/cryptsetup options (BZ#710839)
+- readahead-common: fix total memory size detection (BZ#712341)
+
 * Wed May 25 2011 Lennart Poettering <lpoetter at redhat.com> - 26-2
 - Bugfix release
 - https://bugzilla.redhat.com/show_bug.cgi?id=707507


More information about the scm-commits mailing list