apply patch from upstream so we can build systemd on arm and ppc

- and likely the rest of the secondary arches
This commit is contained in:
Dennis Gilmore 2012-03-26 11:59:30 -05:00
parent 7de90b3c5a
commit e6be2e76e5
2 changed files with 51 additions and 1 deletions

44
systemd-PAGE_SIZE.patch Normal file
View File

@ -0,0 +1,44 @@
From 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 21 Mar 2012 22:47:44 +0000
Subject: journal: PAGE_SIZE is not known on ppc and other archs
Let's use NAME_MAX, as suggested by Dan Walsh
---
diff --git a/src/journal/journald.c b/src/journal/journald.c
index d27cb60..87390bd 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -29,7 +29,6 @@
#include <sys/ioctl.h>
#include <linux/sockios.h>
#include <sys/statvfs.h>
-#include <sys/user.h>
#include <systemd/sd-journal.h>
#include <systemd/sd-login.h>
@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) {
size_t label_len = 0;
union {
struct cmsghdr cmsghdr;
+
+ /* We use NAME_MAX space for the
+ * SELinux label here. The kernel
+ * currently enforces no limit, but
+ * according to suggestions from the
+ * SELinux people this will change and
+ * it will probably be identical to
+ * NAME_MAX. For now we use that, but
+ * this should be updated one day when
+ * the final limit is known.*/
uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
CMSG_SPACE(sizeof(struct timeval)) +
- CMSG_SPACE(sizeof(int)) +
- CMSG_SPACE(PAGE_SIZE)]; /* selinux label */
+ CMSG_SPACE(sizeof(int)) + /* fd */
+ CMSG_SPACE(NAME_MAX)]; /* selinux label */
} control;
ssize_t n;
int v;
--
cgit v0.9.0.2-2-gbebe

View File

@ -3,7 +3,7 @@
Name: systemd Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 44 Version: 44
Release: 2%{?gitcommit:.git%{gitcommit}}%{?dist} Release: 3%{?gitcommit:.git%{gitcommit}}%{?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
@ -53,6 +53,7 @@ Source2: systemd-sysv-convert
Source3: udlfb.conf Source3: udlfb.conf
# Stop-gap, just to ensure things work fine with rsyslog without having to change the package right-away # Stop-gap, just to ensure things work fine with rsyslog without having to change the package right-away
Source4: listen.conf Source4: listen.conf
Patch0: systemd-PAGE_SIZE.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
@ -115,6 +116,7 @@ at boot.
%prep %prep
%setup -q %{?gitcommit:-n %{name}-git%{gitcommit}} %setup -q %{?gitcommit:-n %{name}-git%{gitcommit}}
%patch0 -p1
%build %build
%{?gitcommit: ./autogen.sh } %{?gitcommit: ./autogen.sh }
@ -382,6 +384,10 @@ fi
%{_bindir}/systemd-analyze %{_bindir}/systemd-analyze
%changelog %changelog
* Mon Mar 26 2012 Dennis Gilmore <dennis@ausil.us> - 44-3
- apply patch from upstream so we can build systemd on arm and ppc
- and likely the rest of the secondary arches
* Tue Mar 20 2012 Michal Schmidt <mschmidt@redhat.com> - 44-2 * Tue Mar 20 2012 Michal Schmidt <mschmidt@redhat.com> - 44-2
- Don't build the gtk parts anymore. They're moving into systemd-ui. - Don't build the gtk parts anymore. They're moving into systemd-ui.
- Remove a dead patch file. - Remove a dead patch file.