# TODO:
+# - consider providing the factory files via appropriate packages (setup, pam)
# - merge rpm macros provided by systemd with ours
# - handle udev package removal:
# - http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2014-March/023852.html
# - dev->udev upgrade:
# - /dev/urandom remains missing, not created with start_udev anymore
#
-# /usr/share/factory/etc/nsswitch.conf
-# /usr/share/factory/etc/pam.d/other
-# /usr/share/factory/etc/pam.d/system-auth
-#
# Conditional build:
%bcond_without audit # without audit support
%bcond_without cryptsetup # without cryptsetup support
%bcond_without pam # PAM authentication support
%bcond_without qrencode # QRencode support
%bcond_without selinux # without SELinux support
-%bcond_without tcpd # libwrap (tcp_wrappers) support
+%bcond_with efi # EFI boot support [missing files in 220]
%bcond_with tests # "make check" (requires systemd already installed)
Summary: A System and Service Manager
Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
Name: systemd
# Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
-Version: 219
-Release: 1.2
+Version: 221
+Release: 0.1
Epoch: 1
License: GPL v2+ (udev), LGPL v2.1+ (the rest)
Group: Base
Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
-# Source0-md5: e0d6c9a4b4f69f66932d2230298c9a34
+# Source0-md5: b4d5a253841cf28a98b7ec99c45e3716
Source1: %{name}-sysv-convert
Source2: %{name}_booted.c
Source3: network.service
Source121: fbdev.blacklist
Patch0: target-pld.patch
Patch1: config-pld.patch
-Patch2: shut-sysv-up.patch
-Patch3: pld-sysv-network.patch
-Patch4: tmpfiles-not-fatal.patch
-Patch8: udev-ploop-rules.patch
-Patch9: udevadm-in-sbin.patch
-Patch10: net-rename-revert.patch
-Patch11: nss-in-rootlib.patch
-Patch12: proc-hidepid.patch
-Patch14: dont-hash-null-keys.patch
-Patch16: systemd-configfs.patch
-Patch17: pld-boot_efi_mount.patch
-Patch18: optional-tmp-on-tmpfs.patch
-Patch19: uids_gids.patch
-Patch20: sysv-symlinks-warning.patch
-Patch21: no-configurable-runlevels.patch
+Patch2: pld-sysv-network.patch
+Patch3: tmpfiles-not-fatal.patch
+Patch4: udev-ploop-rules.patch
+Patch5: udevadm-in-sbin.patch
+Patch6: net-rename-revert.patch
+Patch7: nss-in-rootlib.patch
+Patch8: proc-hidepid.patch
+Patch9: systemd-configfs.patch
+Patch10: pld-boot_efi_mount.patch
+Patch11: optional-tmp-on-tmpfs.patch
+Patch12: uids_gids.patch
URL: http://www.freedesktop.org/wiki/Software/systemd
BuildRequires: acl-devel
BuildRequires: attr-devel
BuildRequires: binutils >= 3:2.22.52.0.1-2
%{?with_cryptsetup:BuildRequires: cryptsetup-devel >= 1.6.0}
BuildRequires: dbus-devel >= 1.3.2
+BuildRequires: docbook-dtd45-xml
BuildRequires: docbook-style-xsl
BuildRequires: elfutils-devel
+BuildRequires: gettext-tools
BuildRequires: glib2-devel >= 1:2.22.0
BuildRequires: glibc-misc
+%{?with_efi:BuildRequires: gnu-efi}
BuildRequires: gnutls-devel >= 3.1.4
BuildRequires: gobject-introspection-devel >= 1.31.1
BuildRequires: gperf
-BuildRequires: gtk-doc >= 1.18
BuildRequires: intltool >= 0.40.0
BuildRequires: kmod-devel >= 14
BuildRequires: libapparmor-devel
BuildRequires: libseccomp-devel >= 1.0.0
%{?with_selinux:BuildRequires: libselinux-devel >= 2.1.9}
BuildRequires: libtool >= 2:2.2
-%{?with_tcpd:BuildRequires: libwrap-devel}
BuildRequires: libxslt-progs
BuildRequires: lz4-devel
BuildRequires: m4
Requires: agetty
%{?with_cryptsetup:Requires: cryptsetup >= 1.6.0}
Requires: dbus >= 1.4.16-6
-Requires: filesystem >= 4.0-3
+Requires: filesystem >= 4.0-39
Requires: kmod >= 14
%{?with_microhttpd:Requires: libmicrohttpd >= 0.9.33}
Requires: libutempter
Summary: libudev API documentation
Summary(pl.UTF-8): Dokumentacja API libudev
Group: Documentation
-Requires: gtk-doc-common
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%endif
Summary: libgudev API documentation
Summary(pl.UTF-8): Dokumentacja API libgudev
Group: Documentation
-Requires: gtk-doc-common
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%endif
%setup -q
%patch0 -p1
%patch1 -p1
-#patch2 -p1
+%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+# rejected upstream (do not disable!)
+%patch6 -p1
+%patch7 -p1
%patch8 -p1
%patch9 -p1
-# rejected upstream
-#patch10 -p1
+%patch10 -p1
%patch11 -p1
%patch12 -p1
-# possible cause of infinite loop inside systemd-login
-#patch14 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
cp -p %{SOURCE2} src/systemd_booted.c
%build
-%{__gtkdocize}
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{?debug:--enable-debug} \
%{__enable_disable audit} \
%{__enable_disable cryptsetup libcryptsetup} \
+ %{__enable_disable efi gnuefi} \
%{__enable_disable pam} \
%{__enable_disable selinux} \
- %{__enable_disable tcpd tcpwrap} \
%{__enable_disable microhttpd} \
%{__enable_disable qrencode} \
--disable-silent-rules \
- --enable-chkconfig \
--enable-compat-libs \
- --enable-gtk-doc \
- --enable-introspection \
--enable-split-usr \
--enable-lz4 \
- --with-html-dir=%{_gtkdocdir} \
--with-kbd-loadkeys=/usr/bin/loadkeys \
--with-kbd-setfont=/bin/setfont \
--with-sysvinit-path=/etc/rc.d/init.d \
--with-sysvrcnd-path=/etc/rc.d \
- --with-firmware-path=/lib/firmware \
--with-rc-local-script-path-start=/etc/rc.d/rc.local \
--with-rc-local-script-path-stop=/sbin/halt.local \
--with-rootprefix="" \
--with-rootlibdir=/%{_lib}
-%{__make} -j1
+%{__make}
./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd-daemon
%{?with_tests:%{__make} check}
cp -a %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/40-alsa-restore.rules
cp -a %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/70-udev-pld.rules
-# disable this abomination
-# http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
-ln -s /dev/null $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
# install udev configs
cp -a %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/udev/links.conf
/lib/systemd/systemd-random-seed save || :
/bin/systemctl --system daemon-reexec || :
/bin/journalctl --update-catalog || :
-# Apply ACL to the journal directory
-/bin/setfacl -Rnm g:logs:rx,d:g:logs:rx /var/log/journal || :
%postun
if [ $1 -ge 1 ]; then
%groupremove systemd-journal
fi
-%triggerpostun -- systemd < 208-1
+%triggerpostun -- systemd < 1:208-1
chgrp -R systemd-journal /var/log/journal
chmod g+s /var/log/journal
+%triggerpostun -- systemd < 1:220-1
+# https://bugs.freedesktop.org/show_bug.cgi?id=89202
+/bin/getfacl -p /var/log/journal/$(cat /etc/machine-id) | grep -v '^#' | sort -u | /bin/setfacl -R --set-file=- /var/log/journal/$(cat /etc/machine-id) || :
+
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
# And symlink what we found to the new-style default.target
ln -s "$target" %{_sysconfdir}/systemd/system/default.target || :
- # Setup hostname
- [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
- if [ -n "$HOSTNAME" -a "$HOSTNAME" != "pldmachine" ]; then
- [ -f /etc/hostname ] && mv -f /etc/hostname /etc/hostname.rpmsave
- echo $HOSTNAME > /etc/hostname
- chmod 644 /etc/hostname
+ # Setup hostname if not yet done so
+ if [ ! -s /etc/hostname ]; then
+ HOSTNAME=
+ [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
+ if [ -n "$HOSTNAME" -a "$HOSTNAME" != "pldmachine" ]; then
+ echo $HOSTNAME > /etc/hostname
+ chmod 644 /etc/hostname
+ fi
fi
# Enable the services we install by default.
%attr(755,root,root) /lib/systemd/systemd-cgroups-agent
%attr(755,root,root) /lib/systemd/systemd-coredump
%{?with_cryptsetup:%attr(755,root,root) /lib/systemd/systemd-cryptsetup}
+%attr(755,root,root) /lib/systemd/systemd-export
%attr(755,root,root) /lib/systemd/systemd-fsck
%attr(755,root,root) /lib/systemd/systemd-hibernate-resume
%attr(755,root,root) /lib/systemd/systemd-hostnamed
+%attr(755,root,root) /lib/systemd/systemd-import
%attr(755,root,root) /lib/systemd/systemd-importd
%attr(755,root,root) /lib/systemd/systemd-initctl
%attr(755,root,root) /lib/systemd/systemd-journald
%attr(755,root,root) /lib/systemd/systemd-resolve-host
%attr(755,root,root) /lib/systemd/systemd-rfkill
%attr(755,root,root) /lib/systemd/systemd-shutdown
-%attr(755,root,root) /lib/systemd/systemd-shutdownd
%attr(755,root,root) /lib/systemd/systemd-sleep
%attr(755,root,root) /lib/systemd/systemd-socket-proxyd
%attr(755,root,root) /lib/systemd/systemd-sysctl
%{_libexecdir}/sysusers.d/systemd-remote.conf
%endif
%{_libexecdir}/tmpfiles.d/etc.conf
+%{_libexecdir}/tmpfiles.d/home.conf
%{_libexecdir}/tmpfiles.d/legacy.conf
%{_libexecdir}/tmpfiles.d/systemd.conf
%{_libexecdir}/tmpfiles.d/systemd-nologin.conf
%{?with_microhttpd:%{_datadir}/systemd/gatewayd}
%{_datadir}/systemd/kbd-model-map
%{_datadir}/systemd/language-fallback-map
+%{_datadir}/factory/etc/nsswitch.conf
+%{_datadir}/factory/etc/pam.d/other
+%{_datadir}/factory/etc/pam.d/system-auth
%{_mandir}/man1/bootctl.1*
%{_mandir}/man1/busctl.1*
%{_mandir}/man1/coredumpctl.1*
%{_mandir}/man5/coredump.conf.5*
%{_mandir}/man5/coredump.conf.d.5*
%{_mandir}/man5/hostname.5*
+%if %{with microhttpd}
+%{_mandir}/man5/journal-remote.conf.5*
+%{_mandir}/man5/journal-remote.conf.d.5*
+%endif
%{_mandir}/man5/journald.conf.5*
%{_mandir}/man5/journald.conf.d.5*
%{_mandir}/man5/locale.conf.5*
%{_mandir}/man8/systemd-rfkill.8*
%{_mandir}/man8/systemd-rfkill@.service.8*
%{_mandir}/man8/systemd-shutdown.8*
-%{_mandir}/man8/systemd-shutdownd.8*
%{_mandir}/man8/systemd-sleep.8*
%{_mandir}/man8/systemd-socket-proxyd.8*
%{_mandir}/man8/systemd-sysctl.8*
%{_mandir}/man1/systemctl.1*
%{_mandir}/man5/tmpfiles.d.5*
%{_mandir}/man8/systemd-tmpfiles.8*
-%{_pkgconfigdir}/systemd.pc
+%{_npkgconfigdir}/systemd.pc
%{systemdunitdir}/proc-sys-fs-binfmt_misc.automount
%{systemdunitdir}/dev-hugepages.mount
%{systemdunitdir}/sys-kernel-config.mount
%{systemdunitdir}/sys-kernel-debug.mount
%{systemdunitdir}/tmp.mount
+%{systemdunitdir}/var-lib-machines.mount
%{systemdunitdir}/var-lock.mount
%{systemdunitdir}/var-run.mount
%{systemdunitdir}/systemd-ask-password-console.path
%{systemdunitdir}/systemd-reboot.service
%{systemdunitdir}/systemd-remount-fs.service
%{systemdunitdir}/systemd-rfkill@.service
-%{systemdunitdir}/systemd-shutdownd.service
%{systemdunitdir}/systemd-suspend.service
%{systemdunitdir}/systemd-sysctl.service
%{systemdunitdir}/systemd-sysusers.service
%{systemdunitdir}/systemd-journald-audit.socket
%{systemdunitdir}/systemd-journald-dev-log.socket
%{systemdunitdir}/systemd-journald.socket
-%{systemdunitdir}/systemd-shutdownd.socket
%{systemdunitdir}/systemd-udevd-control.socket
%{systemdunitdir}/systemd-udevd-kernel.socket
%{systemdunitdir}/basic.target
%{systemdunitdir}/systemd-tmpfiles-clean.timer
%dir %{systemdunitdir}/basic.target.wants
%dir %{systemdunitdir}/dbus.target.wants
+%dir %{systemdunitdir}/graphical.target.wants
%dir %{systemdunitdir}/halt.target.wants
%dir %{systemdunitdir}/initrd.target.wants
%dir %{systemdunitdir}/kexec.target.wants
%dir %{systemdunitdir}/multi-user.target.wants
%dir %{systemdunitdir}/poweroff.target.wants
%dir %{systemdunitdir}/reboot.target.wants
+%dir %{systemdunitdir}/rescue.target.wants
%dir %{systemdunitdir}/runlevel[12345].target.wants
%dir %{systemdunitdir}/shutdown.target.wants
%dir %{systemdunitdir}/sockets.target.wants
%dir %{systemdunitdir}/sysinit.target.wants
%dir %{systemdunitdir}/syslog.target.wants
%dir %{systemdunitdir}/timers.target.wants
+%{systemdunitdir}/graphical.target.wants/display-manager.service
+%{systemdunitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
%{systemdunitdir}/local-fs.target.wants/pld-clean-tmp.service
%{systemdunitdir}/local-fs.target.wants/pld-storage-init-late.service
%{systemdunitdir}/local-fs.target.wants/pld-storage-init.service
%{systemdunitdir}/local-fs.target.wants/systemd-remount-fs.service
+%{systemdunitdir}/local-fs.target.wants/var-lib-machines.mount
%{systemdunitdir}/local-fs.target.wants/var-lock.mount
%{systemdunitdir}/local-fs.target.wants/var-run.mount
%{systemdunitdir}/multi-user.target.wants/getty.target
%{systemdunitdir}/multi-user.target.wants/rc-local.service
%{systemdunitdir}/multi-user.target.wants/systemd-ask-password-wall.path
%{systemdunitdir}/multi-user.target.wants/systemd-logind.service
+%{systemdunitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
%{systemdunitdir}/multi-user.target.wants/systemd-user-sessions.service
+%{systemdunitdir}/rescue.target.wants/systemd-update-utmp-runlevel.service
%{systemdunitdir}/sockets.target.wants/systemd-initctl.socket
%{systemdunitdir}/sockets.target.wants/systemd-journald-audit.socket
%{systemdunitdir}/sockets.target.wants/systemd-journald-dev-log.socket
%{systemdunitdir}/sockets.target.wants/systemd-journald.socket
-%{systemdunitdir}/sockets.target.wants/systemd-shutdownd.socket
%{systemdunitdir}/sockets.target.wants/systemd-udevd-control.socket
%{systemdunitdir}/sockets.target.wants/systemd-udevd-kernel.socket
%{?with_cryptsetup:%{systemdunitdir}/sysinit.target.wants/cryptsetup.target}
%{_mandir}/man8/systemd-random-seed.service.8*
%{_mandir}/man8/systemd-reboot.service.8*
%{_mandir}/man8/systemd-remount-fs.service.8*
-%{_mandir}/man8/systemd-shutdownd.service.8*
-%{_mandir}/man8/systemd-shutdownd.socket.8*
%{_mandir}/man8/systemd-suspend.service.8*
%{_mandir}/man8/systemd-sysctl.service.8*
%{_mandir}/man8/systemd-timedated.service.8*
%attr(755,root,root) /lib/udev/accelerometer
-%dir /lib/udev/hwdb.d
-/lib/udev/hwdb.d/20-OUI.hwdb
/lib/udev/hwdb.d/20-acpi-vendor.hwdb
/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
/lib/udev/hwdb.d/20-net-ifname.hwdb
+/lib/udev/hwdb.d/20-OUI.hwdb
/lib/udev/hwdb.d/20-pci-classes.hwdb
/lib/udev/hwdb.d/20-pci-vendor-model.hwdb
/lib/udev/hwdb.d/20-sdio-classes.hwdb
/lib/udev/hwdb.d/20-sdio-vendor-model.hwdb
/lib/udev/hwdb.d/20-usb-classes.hwdb
/lib/udev/hwdb.d/20-usb-vendor-model.hwdb
+/lib/udev/hwdb.d/60-evdev.hwdb
/lib/udev/hwdb.d/60-keyboard.hwdb
/lib/udev/hwdb.d/70-mouse.hwdb
+/lib/udev/hwdb.d/70-pointingstick.hwdb
/lib/udev/hwdb.d/70-touchpad.hwdb
%attr(755,root,root) %{_sbindir}/start_udev
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udev/links.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udev/rules.d/40-alsa-restore.rules
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udev/rules.d/70-udev-pld.rules
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udev/rules.d/80-net-name-slot.rules
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udev/udev.conf
# rules below are NOT supposed to be changed by users
/lib/udev/rules.d/42-usb-hid-pm.rules
/lib/udev/rules.d/50-udev-default.rules
+/lib/udev/rules.d/60-block.rules
/lib/udev/rules.d/60-cdrom_id.rules
/lib/udev/rules.d/60-drm.rules
-/lib/udev/rules.d/60-keyboard.rules
+/lib/udev/rules.d/60-evdev.rules
/lib/udev/rules.d/60-persistent-alsa.rules
/lib/udev/rules.d/60-persistent-input.rules
-/lib/udev/rules.d/60-persistent-serial.rules
-/lib/udev/rules.d/60-persistent-storage-tape.rules
/lib/udev/rules.d/60-persistent-storage.rules
+/lib/udev/rules.d/60-persistent-storage-tape.rules
/lib/udev/rules.d/60-persistent-v4l.rules
+/lib/udev/rules.d/60-serial.rules
/lib/udev/rules.d/61-accelerometer.rules
/lib/udev/rules.d/64-btrfs.rules
/lib/udev/rules.d/70-mouse.rules
/lib/udev/rules.d/70-touchpad.rules
/lib/udev/rules.d/75-net-description.rules
/lib/udev/rules.d/75-probe_mtd.rules
-/lib/udev/rules.d/75-tty-description.rules
/lib/udev/rules.d/78-sound-card.rules
/lib/udev/rules.d/80-drivers.rules
/lib/udev/rules.d/80-net-setup-link.rules
/lib/udev/rules.d/90-vconsole.rules
-/lib/udev/rules.d/95-udev-late.rules
%{_mandir}/man5/udev.conf.5*
%{_mandir}/man7/udev.7*
%files -n udev-apidocs
%defattr(644,root,root,755)
-%{_gtkdocdir}/libudev
-
-%files -n udev-glib
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgudev-1.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgudev-1.0.so.0
-%{_libdir}/girepository-1.0/GUdev-1.0.typelib
-
-%files -n udev-glib-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgudev-1.0.so
-%{_includedir}/gudev-1.0
-%{_pkgconfigdir}/gudev-1.0.pc
-%{_datadir}/gir-1.0/GUdev-1.0.gir
+#%{_gtkdocdir}/libudev
-%files -n udev-glib-apidocs
-%defattr(644,root,root,755)
-%{_gtkdocdir}/gudev
+#%files -n udev-glib
+#%defattr(644,root,root,755)
+#%attr(755,root,root) %{_libdir}/libgudev-1.0.so.*.*.*
+#%attr(755,root,root) %ghost %{_libdir}/libgudev-1.0.so.0
+#%{_libdir}/girepository-1.0/GUdev-1.0.typelib
+#
+#%files -n udev-glib-devel
+#%defattr(644,root,root,755)
+#%attr(755,root,root) %{_libdir}/libgudev-1.0.so
+#%{_includedir}/gudev-1.0
+#%{_pkgconfigdir}/gudev-1.0.pc
+#%{_datadir}/gir-1.0/GUdev-1.0.gir
+#
+#%files -n udev-glib-apidocs
+#%defattr(644,root,root,755)
+#%{_gtkdocdir}/gudev
%files -n bash-completion-udev
%defattr(644,root,root,755)