--- /dev/null
+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
-diff -Nur systemd-37_orig/configure.ac systemd-37/configure.ac
---- systemd-37_orig/configure.ac 2011-10-11 20:46:56.000000000 +0200
-+++ systemd-37/configure.ac 2011-12-17 21:57:31.748682566 +0100
-@@ -355,7 +355,7 @@
+diff -Nur a/configure.ac b/configure.ac
+--- a/configure.ac 2012-03-16 01:46:57.000000000 +0100
++++ b/configure.ac 2012-03-24 20:43:33.723789319 +0100
+@@ -396,7 +396,7 @@
AC_PATH_PROG([M4], [m4])
--AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux or other]))
-+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, ipfire or other]))
+-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, mandriva, meego, mageia, angstrom or other]))
++AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, mandriva, meego, mageia, angstrom, ipfire or other]))
if test "z$with_distro" = "z"; then
if test "$cross_compiling" = yes; then
AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
-@@ -374,6 +374,7 @@
- if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
- with_distro="ubuntu"
- fi
-+ test -f "/etc/ipfire-release" && with_distro="ipfire"
- fi
- if test "z$with_distro" = "z"; then
- with_distro=`uname -s`
-@@ -458,6 +459,13 @@
- AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
- M4_DEFINES=-DTARGET_ANGSTROM=1
+@@ -492,6 +492,13 @@
+ M4_DISTRO_FLAG=-DTARGET_MAGEIA=1
+ have_plymouth=yes
;;
+ ipfire)
+ SYSTEM_SYSVINIT_PATH=
other)
;;
*)
-@@ -515,6 +523,7 @@
- AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
+@@ -550,6 +557,7 @@
AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
+ AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
+AM_CONDITIONAL(TARGET_IPFIRE, test x"$with_distro" = xipfire)
AM_CONDITIONAL(HAVE_PLYMOUTH, test "$have_plymouth" = "yes")
###############################################################################
name = systemd
-version = 37
-release = 4
+version = 44
+release = 1
maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
groups = System/Base
source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
build
+ unitdir = %{prefix}/lib/systemd/system
+
requires
audit-devel
automake
gperf
gettext-devel
intltool
+ kmod-devel >= 5
libacl-devel
libcap-devel
libselinux-devel
libtool
- libudev-devel>=172
+ libudev-devel >= 172
pam-devel
vala
+ xz-devel
end
configure_options += \
- --sysconfdir=/etc \
--libexecdir=%{libdir} \
- --with-rootdir= \
- --with-distro=ipfire \
- --with-udevrulesdir=/lib/udev/rules.d/ \
- --with-pamlibdir=/%{lib}/security
+ --with-distro=ipfire
prepare_cmds
./autogen.sh ac
install_cmds
# Create sysv compatible symlinks.
- mkdir -pv %{BUILDROOT}/sbin
- ln -svf ../bin/systemd %{BUILDROOT}/sbin/init
- ln -svf ../bin/systemctl %{BUILDROOT}/sbin/reboot
- ln -svf ../bin/systemctl %{BUILDROOT}/sbin/halt
- ln -svf ../bin/systemctl %{BUILDROOT}/sbin/poweroff
- ln -svf ../bin/systemctl %{BUILDROOT}/sbin/shutdown
+ mkdir -pv %{BUILDROOT}%{sbindir}
+ ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
+ ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
+ ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
+ ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
+ ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
+ ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
# Create empty machine-id file.
touch %{BUILDROOT}/etc/machine-id
# Copy locale and console settings
- mkdir -pv %{BUILDROOT}/etc
- cp -vf %{DIR_SOURCE}/locale.conf %{BUILDROOT}/etc/
- cp -vf %{DIR_SOURCE}/vconsole.conf %{BUILDROOT}/etc/
+ mkdir -pv %{BUILDROOT}%{sysconfdir}
+ cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
# Recreate all targets
- rm -rfv %{BUILDROOT}/etc/systemd/system/*.target.wants
- mkdir -pv %{BUILDROOT}/lib/systemd/system/basic.target.wants
- mkdir -pv %{BUILDROOT}/lib/systemd/system/default.target.wants
- mkdir -pv %{BUILDROOT}/lib/systemd/system/dbus.target.wants
- mkdir -pv %{BUILDROOT}/lib/systemd/system/syslog.target.wants
+ rm -rfv %{BUILDROOT}%{unitdir}/*.target.wants
+ for i in basic.target.wants default.target.wants dbus.target.wants syslog.target.wants; do
+ mkdir -pv %{BUILDROOT}%{unitdir}/${i} || exit 1
+ done
# Remove runlevel targets and graphical.target
- rm -rfv %{BUILDROOT}/lib/systemd/system/runlevel*
- rm -rfv %{BUILDROOT}/lib/systemd/system/graphical.target
+ rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
+ rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
# Set default target to multi-user
- cd %{BUILDROOT}/lib/systemd/system && ln -svf multi-user.target default.target
+ ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
# Replace absolute symlinks by relative ones.
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/bluetooth.target bluetooth.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/local-fs.target local-fs.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/printer.target printer.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/shutdown.target shutdown.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sockets.target sockets.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sound.target sound.target
- cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/swap.target swap.target
+ cd %{BUILDROOT}%{unitdir}/../user
+ for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
+ ln -svf ../system/${i}.target ${i}.target || exit 1
+ done
+
+ # Replace absolute symlink for getty@tty1.service.
+ ln -svf ../../../../%{unitdir}/getty@.service \
+ %{BUILDROOT}%{sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service
+
+ # Replace absolute symlink for remote-fs.target.
+ ln -svf ../../../../%{unitdir}/remote-fs.target \
+ %{BUILDROOT}%{sysconfdir}/systemd/system/multi-user.target.wants/remote-fs.target
# Remove tmpfile for X11
rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
packages
package %{name}
+ prerequires += authconfig
+
requires
dbus
python-cairo
util-linux>=2.19
end
- prerequires += authconfig
- conflicts += upstart
+ conflicts
+ filesystem < 002
+ upstart
+ end
script postin
# Generate Machine ID.
- /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
+ /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
# Reexec systemd daemon.
- /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
+ /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
# Make sure pam_systemd is enabled
- if ! /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
- /usr/sbin/authconfig --update --nostart >/dev/null 2>&1 || :
+ if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
+ authconfig --update --nostart >/dev/null 2>&1 || :
# Try harder
- /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac || /usr/sbin/authconfig --updateall --nostart >/dev/null 2>&1 || :
+ grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
fi
end
script postup
# Restart login service after update
- /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
+ /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
end
end
coreutils
end
- files
- /etc/systemd/system
- /etc/tmpfiles.d
- /etc/bash_completion.d/systemctl-bash-completion.sh
- /lib/systemd/system
+ provides
/bin/systemctl
- /bin/systemd-tmpfiles
- /usr/share/man/man1/systemctl.*
end
- script postin
- # Enable default services.
- /bin/systemctl enable \
- getty@.service \
- remote-fs.target > /dev/null 2>&1 || :
+ conflicts
+ filesystem < 002
end
- script preun
- # Disable default services.
- /bin/systemctl disable \
- getty@.service \
- remote-fs.target > /dev/null 2>&1 || :
+ files
+ %{sysconfdir}/etc/systemd/system
+ %{sysconfdir}/tmpfiles.d
+ %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
+ %{unitdir}
+ %{bindir}/systemctl
+ %{bindir}/systemd-tmpfiles
+ %{mandir}/man1/systemctl.*
end
script postup
# Reload service files
- /bin/systemctl daemon-reload > /dev/null 2>&1 || :
+ /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
end
end
package %{name}-devel
template DEVEL
+
+ files += %{prefix}/lib/pakfire/macros/
end
package %{name}-debuginfo