]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
systemd: Update to 185.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 27 May 2012 14:45:31 +0000 (16:45 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Jun 2012 13:39:47 +0000 (15:39 +0200)
This is a mayor update to the latest stable version.
Perform systemd-udev merge, now systemd provides udev and all it's libraries.

Fixes #10075.

systemd/patches/systemd-185-avoid-redundant-vt-clearing-by-agetty.patch [new file with mode: 0644]
systemd/patches/systemd-185-udev-accept-rd-parameters.patch [new file with mode: 0644]
systemd/patches/systemd-185-udev-fix-after-udev-trigger.service.patch [new file with mode: 0644]
systemd/patches/systemd-185-udev-remove-remaining-selinux-labeling.patch [new file with mode: 0644]
systemd/patches/systemd-44-fix-journald-PAGE_SIZE-on-arm.patch [deleted file]
systemd/systemd.nm

diff --git a/systemd/patches/systemd-185-avoid-redundant-vt-clearing-by-agetty.patch b/systemd/patches/systemd-185-avoid-redundant-vt-clearing-by-agetty.patch
new file mode 100644 (file)
index 0000000..f4d22bf
--- /dev/null
@@ -0,0 +1,28 @@
+From 3305d6806d428010b1cd2abd716aa1bb7f81311f Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Wed, 06 Jun 2012 09:26:30 +0000
+Subject: units: avoid redundant VT clearing by agetty
+
+TTYVTDisallocate=yes already clears the VT. agetty does not need to do
+it again. Run it with --noclear.
+
+Felix Miata found the double clearing confusing in this bugreport:
+https://bugzilla.redhat.com/show_bug.cgi?id=828007
+Add a comment explaining what clears the VT.
+---
+diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
+index 6d45836..fcf1de1 100644
+--- a/units/getty@.service.m4
++++ b/units/getty@.service.m4
+@@ -41,7 +41,8 @@ ConditionPathExists=/dev/tty0
+ [Service]
+ Environment=TERM=linux
+-ExecStart=-/sbin/agetty %I 38400
++# the VT is cleared by TTYVTDisallocate
++ExecStart=-/sbin/agetty --noclear %I 38400
+ Type=idle
+ Restart=always
+ RestartSec=0
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/systemd/patches/systemd-185-udev-accept-rd-parameters.patch b/systemd/patches/systemd-185-udev-accept-rd-parameters.patch
new file mode 100644 (file)
index 0000000..84e1bb2
--- /dev/null
@@ -0,0 +1,131 @@
+From e6f86cac1619d504ea51c08608fa60b8e4359c52 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Mon, 04 Jun 2012 20:46:32 +0000
+Subject: udev: kernel cmdline - accept rd.* parameters
+
+---
+diff --git a/man/systemd-udevd.xml b/man/systemd-udevd.xml
+index 1be356f..79f917e 100644
+--- a/man/systemd-udevd.xml
++++ b/man/systemd-udevd.xml
+@@ -116,20 +116,24 @@
+   <refsect1><title>Kernel command line</title>
+     <variablelist>
++      <para>The parameters starting with "rd.", will be read when udev is used in an initrd.</para>
+       <varlistentry>
+         <term><varname>udev.log-priority=</varname></term>
++        <term><varname>rd.udev.log-priority=</varname></term>
+         <listitem>
+           <para>Set the logging priority.</para>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><varname>udev.children-max=</varname></term>
++        <term><varname>rd.udev.children-max=</varname></term>
+         <listitem>
+           <para>Limit the number of parallel executed events.</para>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><varname>udev.exec-delay=</varname></term>
++        <term><varname>rd.udev.exec-delay=</varname></term>
+         <listitem>
+           <para>Number of seconds to delay the execution of RUN instructions.
+           This might be useful when debugging system crashes during coldplug
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index 2ac9fde..75e7766 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -1013,6 +1013,48 @@ static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink)
+         return 0;
+ }
++/*
++ * read the kernel commandline, in case we need to get into debug mode
++ *   udev.log-priority=<level>              syslog priority
++ *   udev.children-max=<number of workers>  events are fully serialized if set to 1
++ *   udev.exec-delay=<number of seconds>    delay execution of every executed program
++ */
++static void kernel_cmdline_options(struct udev *udev)
++{
++        char *line, *w, *state;
++        size_t l;
++
++        if (read_one_line_file("/proc/cmdline", &line) < 0)
++                return;
++
++        FOREACH_WORD_QUOTED(w, l, line, state) {
++                char *s, *opt;
++
++                s = strndup(w, l);
++                if (!s)
++                        break;
++
++                /* accept the same options for the initrd, prefixed with "rd." */
++                if (in_initrd() && startswith(s, "rd."))
++                        opt = s + 3;
++                else
++                        opt = s;
++
++                if (startswith(opt, "udev.log-priority="))
++                        udev_set_log_priority(udev, util_log_priority(opt + 18));
++
++                if (startswith(opt, "udev.children-max="))
++                        children_max = strtoul(opt + 18, NULL, 0);
++
++                if (startswith(opt, "udev.exec-delay="))
++                        exec_delay = strtoul(opt + 16, NULL, 0);
++
++                free(s);
++        }
++
++        free(line);
++}
++
+ int main(int argc, char *argv[])
+ {
+         struct udev *udev;
+@@ -1101,39 +1143,7 @@ int main(int argc, char *argv[])
+                 }
+         }
+-        /*
+-         * read the kernel commandline, in case we need to get into debug mode
+-         *   udev.log-priority=<level>              syslog priority
+-         *   udev.children-max=<number of workers>  events are fully serialized if set to 1
+-         *
+-         */
+-        f = fopen("/proc/cmdline", "r");
+-        if (f != NULL) {
+-                char cmdline[4096];
+-
+-                if (fgets(cmdline, sizeof(cmdline), f) != NULL) {
+-                        char *pos;
+-
+-                        pos = strstr(cmdline, "udev.log-priority=");
+-                        if (pos != NULL) {
+-                                pos += strlen("udev.log-priority=");
+-                                udev_set_log_priority(udev, util_log_priority(pos));
+-                        }
+-
+-                        pos = strstr(cmdline, "udev.children-max=");
+-                        if (pos != NULL) {
+-                                pos += strlen("udev.children-max=");
+-                                children_max = strtoul(pos, NULL, 0);
+-                        }
+-
+-                        pos = strstr(cmdline, "udev.exec-delay=");
+-                        if (pos != NULL) {
+-                                pos += strlen("udev.exec-delay=");
+-                                exec_delay = strtoul(pos, NULL, 0);
+-                        }
+-                }
+-                fclose(f);
+-        }
++        kernel_cmdline_options(udev);
+         if (getuid() != 0) {
+                 fprintf(stderr, "root privileges required\n");
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/systemd/patches/systemd-185-udev-fix-after-udev-trigger.service.patch b/systemd/patches/systemd-185-udev-fix-after-udev-trigger.service.patch
new file mode 100644 (file)
index 0000000..00acdd9
--- /dev/null
@@ -0,0 +1,22 @@
+From a2368a3f37ede469d4359421c1e4ad304c682a07 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Wed, 06 Jun 2012 12:30:16 +0000
+Subject: udev: systemd-udev-settle.service fix After=
+
+https://bugs.freedesktop.org/show_bug.cgi?id=50779
+---
+diff --git a/units/systemd-udev-settle.service.in b/units/systemd-udev-settle.service.in
+index d637700..2c4c129 100644
+--- a/units/systemd-udev-settle.service.in
++++ b/units/systemd-udev-settle.service.in
+@@ -21,7 +21,7 @@ Documentation=man:udev(7)
+ Documentation=man:systemd-udevd(8)
+ DefaultDependencies=no
+ Wants=systemd-udev.service
+-After=udev-trigger.service
++After=systemd-udev-trigger.service
+ Before=basic.target
+ ConditionCapability=CAP_MKNOD
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/systemd/patches/systemd-185-udev-remove-remaining-selinux-labeling.patch b/systemd/patches/systemd-185-udev-remove-remaining-selinux-labeling.patch
new file mode 100644 (file)
index 0000000..d6fec1c
--- /dev/null
@@ -0,0 +1,43 @@
+From 3cbd5f6be191a4e71fc85d8b893e96d6d65bf792 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Tue, 05 Jun 2012 15:31:32 +0000
+Subject: udev: remove remaining selinux labeling for file in /run
+
+---
+diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c
+index bdb0e70..2347736 100644
+--- a/src/libudev/libudev-device-private.c
++++ b/src/libudev/libudev-device-private.c
+@@ -35,7 +35,7 @@ static void udev_device_tag(struct udev_device *dev, const char *tag, bool add)
+         if (add) {
+                 int fd;
+-                mkdir_parents_label(filename, 0755);
++                mkdir_parents(filename, 0755);
+                 fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444);
+                 if (fd >= 0)
+                         close(fd);
+@@ -119,7 +119,7 @@ int udev_device_update_db(struct udev_device *udev_device)
+         /* write a database file */
+         util_strscpyl(filename_tmp, sizeof(filename_tmp), filename, ".tmp", NULL);
+-        mkdir_parents_label(filename_tmp, 0755);
++        mkdir_parents(filename_tmp, 0755);
+         f = fopen(filename_tmp, "we");
+         if (f == NULL) {
+                 udev_err(udev, "unable to create temporary db file '%s': %m\n", filename_tmp);
+diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
+index 2ef6341..aee84a9 100644
+--- a/src/udev/udev-node.c
++++ b/src/udev/udev-node.c
+@@ -226,7 +226,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
+                 do {
+                         int fd;
+-                        err = mkdir_parents_label(filename, 0755);
++                        err = mkdir_parents(filename, 0755);
+                         if (err != 0 && err != -ENOENT)
+                                 break;
+                         fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/systemd/patches/systemd-44-fix-journald-PAGE_SIZE-on-arm.patch b/systemd/patches/systemd-44-fix-journald-PAGE_SIZE-on-arm.patch
deleted file mode 100644 (file)
index 623bea1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-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
index 29983e4441aa579466d634c185b54ce50b0fff27..028646c9eba3c1a60f7ef2fac0388050a55ab255 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = systemd
-version    = 44
-release    = 6
+version    = 185
+release    = 1
 
 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
 groups     = System/Base
@@ -27,28 +27,32 @@ build
                audit-devel
                automake
                autoconf
-               cryptsetup-luks-devel
+               cryptsetup-luks-devel >= 1.4.2
                dbus-devel
                docbook-utils
                docbook-xsl
-               gperf
                gettext-devel
+               glib2-devel
+               gobject-introspection-devel >= 1.31
+               gperf
+               hwdata
                intltool
                kmod-devel >= 5
                libacl-devel
+               libblkid-devel
                libcap-devel
                libselinux-devel
                libtool
-               libudev-devel >= 172
                pam-devel
+               pciutils-devel
+               usbutils
                vala
                xz-devel
        end
 
        configure_options += \
-               --libexecdir=%{libdir} \
-               --with-udevrulesdir=%{prefix}/lib/udev/rules.d \
-               --with-distro=ipfire
+               --with-distro=ipfire \
+               --disable-static
 
        prepare_cmds
                ./autogen.sh ac
@@ -86,6 +90,10 @@ build
                rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
                rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
 
+               # Remove service files for utmp update.
+               rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
+               rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
+
                # Set default target to multi-user
                ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
 
@@ -105,14 +113,16 @@ end
 
 packages
        package %{name}
+               groups += Base
+
                prerequires += authconfig
 
                requires
                        dbus
+                       hwdata
                        python-cairo
                        python-dbus
                        %{name}-units=%{thisver}
-                       udev>=172
                        util-linux>=2.19
                end
 
@@ -123,13 +133,39 @@ packages
                        /sbin/poweroff
                        /sbin/reboot
                        /sbin/shutdown
+
+                       udev = %{thisver}
                end
 
                conflicts
+                       dracut < 019
                        filesystem < 002
                        upstart
                end
 
+               obsoletes
+                       udev < 183
+               end
+
+               configfiles
+                       /etc/locale.conf
+                       /etc/machine-id
+                       /etc/systemd/journald.conf
+                       /etc/systemd/logind.conf
+                       /etc/systemd/system.conf
+                       /etc/systemd/user.conf
+                       /etc/udev/udev.conf
+                       /etc/vconsole.conf
+               end
+
+               script prein
+                       # Create groups for udev.
+                       getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
+                       getent group tape >/dev/null || groupadd -g 33 tape || :
+                       getent group dialout >/dev/null || groupadd -g 18 dialout || :
+                       getent group floppy >/dev/null || groupadd -g 19 floppy || :
+               end
+
                script postin
                        # Generate Machine ID.
                        /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
@@ -153,11 +189,22 @@ packages
                                >/dev/null 2>&1 || :
                end
 
+               script preup
+                       # Be sure to stop the old udev before updating.
+                       /usr/bin/systemctl stop udev.service udev-trigger.service \
+                               udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
+               end
+
                script postup
                        # Restart login service after update
                        /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
                        /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
                end
+
+               # Be sure to start the new udev after everything is done.
+               script posttransup
+                       /usr/bin/systemctl start systemd-udev.service  >/dev/null 2>&1 || :
+               end
        end
 
        # Package information for systemd-units
@@ -203,6 +250,45 @@ packages
                files += %{prefix}/lib/pakfire/macros/
        end
 
+       package libudev
+               summary = Libraries for adding libudev support to applications.
+               description
+                       This package contains the libraries that make it easier to use libudev
+                       functionality from applications.
+               end
+               license = LGPLv2+
+
+               conflicts
+                       filesystem < 002
+               end
+
+               files
+                       %{libdir}/libgudev*.so.*
+                       %{libidr}/girepository*/
+               end
+       end
+
+       package libudev-devel
+               summary = Header files for adding libudev support to applications.
+               description
+                       This package contains the header and pkg-config files for developing
+                       applications using libudev functionality.
+               end
+               license = LGPLv2+
+
+               conflicts
+                       filesystem < 002
+               end
+
+               files
+                       %{libdir}/libgudev*.so
+                       %{libdir}/pkgconfig/gudev*
+                       %{includedir}/gudev*
+                       %{datadir}/gir-*
+                       %{datadir}/gtk-doc/html/gudev
+               end
+       end
+
        package %{name}-debuginfo
                template DEBUGINFO
        end