]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - systemd/systemd.nm
ccache: Fix testsuite error with GCC 4.8.
[people/ms/ipfire-3.x.git] / systemd / systemd.nm
index bcb25253475854a652072e0c877e794c5c135726..ea7d6eab7e671215ceacdde72c58754a0b5f9a79 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = systemd
-version    = 44
-release    = 2
+version    = 204
+release    = 4
 
 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
 groups     = System/Base
@@ -24,40 +24,49 @@ build
        unitdir = %{prefix}/lib/systemd/system
 
        requires
+               attr-devel
                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
+               libgcrypt-devel
                libselinux-devel
                libtool
-               libudev-devel >= 172
+               libuuid-devel
                pam-devel
+               pciutils-devel
+               usbutils
                vala
                xz-devel
        end
 
        configure_options += \
-               --libexecdir=%{libdir} \
-               --with-distro=ipfire
+               --with-sysvinit-path= \
+               --with-sysvrcnd-path= \
+               --enable-introspection=yes \
+               --disable-static
 
        prepare_cmds
                ./autogen.sh ac
        end
 
-       test
-               make check
-       end
-
        install_cmds
+               # Create folder in log to store the journal.
+               mkdir -pv %{BUILDROOT}/var/log/journal
+
                # Create sysv compatible symlinks.
                mkdir -pv %{BUILDROOT}%{sbindir}
                ln -svf ../lib/systemd/systemd  %{BUILDROOT}/%{sbindir}/init
@@ -75,50 +84,64 @@ build
                cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
 
                # Recreate all targets
-               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
+               rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
+               for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
+                       multi-user.target.wants syslog.target.wants; do
+                               mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
                done
 
                # Remove runlevel targets and graphical.target
                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
 
                # Replace absolute symlinks by relative ones.
                cd %{BUILDROOT}%{unitdir}/../user
-               for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
+               for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; 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
 
-               # Remove unneeded symlink for xdg
-               rm -rfv %{BUILDROOT}/etc/xdg/systemd
+               # Remove unneeded stuff for xdg
+               rm -rfv %{BUILDROOT}/etc/xdg
+
+               # Remove unneeded stuff for rpm.
+               rm -rvf %{BUILDROOT}/etc/rpm
+
+               # Use journald. Enable the import of kernel messages.
+               # Stop forwarding to a syslog daemon.
+               sed \
+                       -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
+                       -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
+                       -i %{BUILDROOT}/etc/systemd/journald.conf
+
+               # Install legacy tmpfile to autocreate /run/lock on startup.
+               install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
        end
 end
 
 packages
        package %{name}
+               groups += Base
+
                prerequires += authconfig
 
                requires
                        dbus
+                       hwdata
                        python-cairo
                        python-dbus
+                       python-gobject3
+                       %{name}-libs=%{thisver}
                        %{name}-units=%{thisver}
-                       udev>=172
                        util-linux>=2.19
                end
 
@@ -129,13 +152,42 @@ packages
                        /sbin/poweroff
                        /sbin/reboot
                        /sbin/shutdown
+
+                       syslog
+                       udev = %{thisver}
                end
 
                conflicts
+                       bash-completion < 2.1
+                       dracut < 019
                        filesystem < 002
+                       rsyslog < 5.8.6-4
                        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 || :
@@ -150,11 +202,36 @@ packages
                                # Try harder
                                grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
                        fi
+
+                       /usr/bin/systemctl enable \
+                               getty@.service \
+                               remote-fs.target \
+                               systemd-readahead-replay.service \
+                               systemd-readahead-collect.service \
+                               >/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 || :
+
+                       # Use the new journald configuration file and restart the service.
+                       if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
+                               mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
+                               /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
+                       fi
+               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
 
@@ -195,12 +272,98 @@ packages
                end
        end
 
+       package %{name}-libs
+               template LIBS
+       
+               groups += Base
+
+               prerequires
+                       /etc/nsswitch.conf
+               end
+
+               provides
+                       nss-myhostname = %{thisver}
+               end
+
+               obsoletes
+                       nss-myhostname <= 0.3-3
+               end
+
+               conflicts
+                       # Ensure that the version of systemd matches systemd-libs.
+                       systemd > %{thisver}
+                       systemd < %{thisver}
+               end
+
+               # Add myhostname to the hosts line of /etc/nsswitch.conf
+               script postin
+                       if [ -f "/etc/nsswitch.conf" ]; then
+                               sed -i.bak -e '
+                                       /^hosts:/ !b
+                                       /\<myhostname\>/ b
+                                       s/[[:blank:]]*$/ myhostname/
+                                       ' /etc/nsswitch.conf
+                       fi
+               end
+
+               # Remove myhostname from the hosts line of /etc/nsswitch.conf
+               script postun
+                       if [ -f "/etc/nsswitch.conf" ]; then
+                               sed -i.bak -e '
+                                       /^hosts:/ !b
+                                       s/[[:blank:]]\+myhostname\>//
+                                       ' /etc/nsswitch.conf
+                       fi
+               end
+       end
+
        package %{name}-devel
                template DEVEL
 
                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}/lib*udev*.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}/lib*udev*.so
+                       %{libdir}/pkgconfig/lib*udev.pc
+                       %{libdir}/pkgconfig/gudev*
+                       %{includedir}/lib*udev.h
+                       %{includedir}/gudev*
+                       %{datadir}/gir-*
+                       %{datadir}/gtk-doc/html/gudev
+               end
+       end
+
        package %{name}-debuginfo
                template DEBUGINFO
        end