Fix memory size detection
Apply patches from current upstream. Fixes memory size detection on 32-bit with >4GB RAM (BZ712341)
This commit is contained in:
parent
90b0629167
commit
62bfbded21
@ -1,7 +1,7 @@
|
|||||||
From 9a66640832d103f906c2ef609a1d19d43fc542f6 Mon Sep 17 00:00:00 2001
|
From 9a66640832d103f906c2ef609a1d19d43fc542f6 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <ozan@pardus.org.tr>
|
From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <ozan@pardus.org.tr>
|
||||||
Date: Fri, 27 May 2011 08:24:22 +0300
|
Date: Fri, 27 May 2011 08:24:22 +0300
|
||||||
Subject: [PATCH 1/4] exec: Fix number of unit types
|
Subject: [PATCH 1/6] exec: Fix number of unit types
|
||||||
|
|
||||||
There are four unit types mentioned in here, not three
|
There are four unit types mentioned in here, not three
|
||||||
---
|
---
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 78e39b43b89c6bf9ce401d6030939a004a23c850 Mon Sep 17 00:00:00 2001
|
From 78e39b43b89c6bf9ce401d6030939a004a23c850 Mon Sep 17 00:00:00 2001
|
||||||
From: Michal Schmidt <mschmidt@redhat.com>
|
From: Michal Schmidt <mschmidt@redhat.com>
|
||||||
Date: Sun, 5 Jun 2011 17:22:37 +0200
|
Date: Sun, 5 Jun 2011 17:22:37 +0200
|
||||||
Subject: [PATCH 2/4] systemctl: fix double unref of a dbus message
|
Subject: [PATCH 2/6] systemctl: fix double unref of a dbus message
|
||||||
|
|
||||||
---
|
---
|
||||||
src/systemctl.c | 1 +
|
src/systemctl.c | 1 +
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From aae5220d961a419a1e160de90ee5c393c7c13607 Mon Sep 17 00:00:00 2001
|
From aae5220d961a419a1e160de90ee5c393c7c13607 Mon Sep 17 00:00:00 2001
|
||||||
From: Michal Schmidt <mschmidt@redhat.com>
|
From: Michal Schmidt <mschmidt@redhat.com>
|
||||||
Date: Mon, 6 Jun 2011 22:59:19 +0200
|
Date: Mon, 6 Jun 2011 22:59:19 +0200
|
||||||
Subject: [PATCH 3/4] cryptsetup-generator: fix /etc/cryptsetup options
|
Subject: [PATCH 3/6] cryptsetup-generator: fix /etc/cryptsetup options
|
||||||
|
|
||||||
cryptsetup-generator parses the options in /etc/cryptsetup incorrectly.
|
cryptsetup-generator parses the options in /etc/cryptsetup incorrectly.
|
||||||
It fails to find the 'swap' option in
|
It fails to find the 'swap' option in
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From ef9d7dca5463e64510e174d55a869b4d5a3c4e84 Mon Sep 17 00:00:00 2001
|
From ef9d7dca5463e64510e174d55a869b4d5a3c4e84 Mon Sep 17 00:00:00 2001
|
||||||
From: Michal Schmidt <mschmidt@redhat.com>
|
From: Michal Schmidt <mschmidt@redhat.com>
|
||||||
Date: Tue, 7 Jun 2011 00:48:16 +0200
|
Date: Tue, 7 Jun 2011 00:48:16 +0200
|
||||||
Subject: [PATCH 4/4] selinux: selinuxfs can be mounted on /sys/fs/selinux
|
Subject: [PATCH 4/6] selinux: selinuxfs can be mounted on /sys/fs/selinux
|
||||||
|
|
||||||
The kernel now provides the /sys/fs/selinux mountpoint and libselinux
|
The kernel now provides the /sys/fs/selinux mountpoint and libselinux
|
||||||
prefers it if it's available.
|
prefers it if it's available.
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
From dc725264f34f3a81eb47b7472f4484f849e0461d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frederic Crozat <fcrozat@suse.com>
|
||||||
|
Date: Wed, 8 Jun 2011 17:34:22 +0200
|
||||||
|
Subject: [PATCH 5/6] enable chkconfig support in systemctl for openSUSE
|
||||||
|
|
||||||
|
---
|
||||||
|
src/systemctl.c | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/systemctl.c b/src/systemctl.c
|
||||||
|
index a82cce4..faca797 100644
|
||||||
|
--- a/src/systemctl.c
|
||||||
|
+++ b/src/systemctl.c
|
||||||
|
@@ -4089,7 +4089,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!f) {
|
||||||
|
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
|
||||||
|
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
|
||||||
|
|
||||||
|
if (endswith(i->name, ".service")) {
|
||||||
|
char *sysv;
|
||||||
|
--
|
||||||
|
1.7.4.4
|
||||||
|
|
33
0006-readahead-common-fix-total-memory-size-detection.patch
Normal file
33
0006-readahead-common-fix-total-memory-size-detection.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 597b99b09a007dfa8ddfce31c480765b0c7baa6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Schmidt <mschmidt@redhat.com>
|
||||||
|
Date: Fri, 10 Jun 2011 14:37:21 +0200
|
||||||
|
Subject: [PATCH 6/6] 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
|
||||||
|
|
12
systemd.spec
12
systemd.spec
@ -2,7 +2,7 @@ Name: systemd
|
|||||||
Url: http://www.freedesktop.org/wiki/Software/systemd
|
Url: http://www.freedesktop.org/wiki/Software/systemd
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Version: 28
|
Version: 28
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Summary: A System and Service Manager
|
Summary: A System and Service Manager
|
||||||
@ -41,6 +41,8 @@ Patch1: 0001-exec-Fix-number-of-unit-types.patch
|
|||||||
Patch2: 0002-systemctl-fix-double-unref-of-a-dbus-message.patch
|
Patch2: 0002-systemctl-fix-double-unref-of-a-dbus-message.patch
|
||||||
Patch3: 0003-cryptsetup-generator-fix-etc-cryptsetup-options.patch
|
Patch3: 0003-cryptsetup-generator-fix-etc-cryptsetup-options.patch
|
||||||
Patch4: 0004-selinux-selinuxfs-can-be-mounted-on-sys-fs-selinux.patch
|
Patch4: 0004-selinux-selinuxfs-can-be-mounted-on-sys-fs-selinux.patch
|
||||||
|
Patch5: 0005-enable-chkconfig-support-in-systemctl-for-openSUSE.patch
|
||||||
|
Patch6: 0006-readahead-common-fix-total-memory-size-detection.patch
|
||||||
|
|
||||||
# For sysvinit tools
|
# For sysvinit tools
|
||||||
Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24
|
Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24
|
||||||
@ -98,6 +100,8 @@ SysV compatibility tools for systemd
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-rootdir= --with-distro=fedora
|
%configure --with-rootdir= --with-distro=fedora
|
||||||
@ -298,7 +302,11 @@ fi
|
|||||||
%{_bindir}/systemd-sysv-convert
|
%{_bindir}/systemd-sysv-convert
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jun 08 2011 Michal Schmidt <mschmidt@redhat.com> 28-3
|
* Mon Jun 13 2011 Michal Schmidt <mschmidt@redhat.com> - 28-4
|
||||||
|
- Apply patches from current upstream.
|
||||||
|
- Fixes memory size detection on 32-bit with >4GB RAM (BZ712341)
|
||||||
|
|
||||||
|
* Wed Jun 08 2011 Michal Schmidt <mschmidt@redhat.com> - 28-3
|
||||||
- Apply patches from current upstream
|
- Apply patches from current upstream
|
||||||
- https://bugzilla.redhat.com/show_bug.cgi?id=709909
|
- https://bugzilla.redhat.com/show_bug.cgi?id=709909
|
||||||
- https://bugzilla.redhat.com/show_bug.cgi?id=710839
|
- https://bugzilla.redhat.com/show_bug.cgi?id=710839
|
||||||
|
Loading…
Reference in New Issue
Block a user