%global dlrn_nvr 240-0.1.20181126132304.cb8e4c6 %global dlrn 1 %define upstream_version 240 #global gitcommit 10e465b5321bd53c1fc59ffab27e724535c6bc0f %{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})} # We ship a .pc file but don't want to have a dep on pkg-config. We # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config %global pkgdir %{_prefix}/lib/systemd %global system_unit_dir %{pkgdir}/system %global user_unit_dir %{pkgdir}/user Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 240 Release: 0.1.20181126132304.cb8e4c6%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager # download tarballs with "spectool -g systemd.spec" %if %{defined gitcommit} Source0: 240-0.1.20181126132304.cb8e4c6.tar.gz %else Source0: 240-0.1.20181126132304.cb8e4c6.tar.gz %endif # This file must be available before %%prep. # It is generated during systemd build and can be found in src/core/. Source1: triggers.systemd Source2: split-files.py Source3: purge-nobody-user # Prevent accidental removal of the systemd package Source4: yum-protect-systemd.conf Source5: inittab Source6: sysctl.conf.README Source7: systemd-journal-remote.xml Source8: systemd-journal-gatewayd.xml Source9: 20-yama-ptrace.conf Source10: systemd-udev-trigger-no-reload.conf Source11: 20-grubby.install Source12: https://raw.githubusercontent.com/systemd/systemd/1000522a60ceade446773c67031b47a566d4a70d/src/login/systemd-user.m4 %if 0 GIT_DIR=../../src/systemd/.git git format-patch-ab --no-signature -M -N v235..v235-stable i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done|xclip GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[67]* hwdb/parse_hwdb.py > hwdb.patch %endif %if 0%{?dlrn} == 0 Patch0001: 0001-test-cgroup-util-bail-out-when-running-under-mock.patch Patch0002: 0002-basic-fs-util-skip-fsync_directory_of_file-if-proc-s.patch Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch %endif %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 %endif BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libcap-devel BuildRequires: libmount-devel BuildRequires: pam-devel BuildRequires: libselinux-devel BuildRequires: audit-libs-devel BuildRequires: cryptsetup-devel BuildRequires: dbus-devel BuildRequires: libacl-devel BuildRequires: gobject-introspection-devel BuildRequires: libblkid-devel BuildRequires: xz-devel BuildRequires: xz BuildRequires: lz4-devel BuildRequires: lz4 BuildRequires: bzip2-devel BuildRequires: libidn2-devel BuildRequires: libcurl-devel BuildRequires: kmod-devel BuildRequires: elfutils-devel BuildRequires: libgcrypt-devel BuildRequires: libgpg-error-devel BuildRequires: gnutls-devel BuildRequires: qrencode-devel BuildRequires: libmicrohttpd-devel BuildRequires: libxkbcommon-devel BuildRequires: iptables-devel BuildRequires: libxslt BuildRequires: docbook-style-xsl BuildRequires: pkgconfig BuildRequires: gperf BuildRequires: gawk BuildRequires: tree BuildRequires: python3-devel BuildRequires: python3-lxml BuildRequires: firewalld-filesystem %if 0%{?have_gnu_efi} BuildRequires: gnu-efi gnu-efi-devel %endif BuildRequires: libseccomp-devel %if %{num_patches} BuildRequires: git %endif BuildRequires: meson >= 0.43 BuildRequires: gettext BuildRequires: python3-pyparsing BuildRequires: python3-evdev BuildRequires: perl(IPC::SysV) Requires(post): coreutils Requires(post): sed Requires(post): acl Requires(post): grep Requires(pre): coreutils Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd Requires: dbus >= 1.9.18 Requires: %{name}-pam = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Recommends: diffutils Requires: util-linux Recommends: libxkbcommon%{?_isa} Provides: /bin/systemctl Provides: /sbin/shutdown Provides: syslog Provides: systemd-units = %{version}-%{release} Obsoletes: system-setup-keyboard < 0.9 Provides: system-setup-keyboard = 0.9 # systemd-sysv-convert was removed in f20: https://fedorahosted.org/fpc/ticket/308 Obsoletes: systemd-sysv < 206 # self-obsoletes so that dnf will install new subpackages on upgrade (#1260394) Obsoletes: %{name} < 229-5 Provides: systemd-sysv = 206 Conflicts: initscripts < 9.56.1 %if 0%{?fedora} Conflicts: fedora-release < 23-0.12 %endif %description systemd is a system and service manager that runs as PID 1 and starts the rest of the system. It provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points, and implements an elaborate transactional dependency-based service control logic. systemd supports SysV and LSB init scripts and works as a replacement for sysvinit. Other parts of this package are a logging daemon, utilities to control basic system configuration like the hostname, date, locale, maintain a list of logged-in users and running containers and virtual machines, system accounts, runtime directories and settings, and daemons to manage simple network configuration, network time synchronization, log forwarding, and name resolution. %package libs Summary: systemd libraries License: LGPLv2+ and MIT Obsoletes: libudev < 183 Obsoletes: systemd < 185-4 Conflicts: systemd < 185-4 Obsoletes: systemd-compat-libs < 230 Obsoletes: nss-myhostname < 0.4 Provides: nss-myhostname = 0.4 Provides: nss-myhostname%{_isa} = 0.4 Requires(post): coreutils Requires(post): sed Requires(post): grep Requires(post): /usr/bin/getent %description libs Libraries for systemd and udev. %package pam Summary: systemd PAM module Requires: %{name} = %{version}-%{release} %description pam Systemd PAM module registers the session with systemd-logind. %package devel Summary: Development headers for systemd License: LGPLv2+ and MIT Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: libudev-devel = %{version} Provides: libudev-devel%{_isa} = %{version} Obsoletes: libudev-devel < 183 # Fake dependency to make sure systemd-pam is pulled into multilib (#1414153) Requires: %{name}-pam = %{version}-%{release} %description devel Development headers and auxiliary files for developing applications linking to libudev or libsystemd. %package udev Summary: Rule-based device node and kernel event manager Requires: %{name}%{?_isa} = %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires(post): grep Requires: kmod >= 18-4 # obsolete parent package so that dnf will install new subpackage on upgrade (#1260394) Obsoletes: %{name} < 229-5 Provides: udev = %{version} Provides: udev%{_isa} = %{version} Obsoletes: udev < 183 # https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9 Recommends: systemd-bootchart # https://bugzilla.redhat.com/show_bug.cgi?id=1408878 Recommends: kbd License: LGPLv2+ %description udev This package contains systemd-udev and the rules and hardware database needed to manage device nodes. This package is necessary on physical machines and in virtual machines, but not in containers. %package container # Name is the same as in Debian Summary: Tools for containers and VMs Requires: %{name}%{?_isa} = %{version}-%{release} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd # obsolete parent package so that dnf will install new subpackage on upgrade (#1260394) Obsoletes: %{name} < 229-5 License: LGPLv2+ %description container Systemd tools to spawn and manage containers and virtual machines. This package contains systemd-nspawn, machinectl, systemd-machined, and systemd-importd. %package journal-remote # Name is the same as in Debian Summary: Tools to send journal events over the network Requires: %{name}%{?_isa} = %{version}-%{release} License: LGPLv2+ Requires(pre): /usr/bin/getent Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires: firewalld-filesystem Provides: %{name}-journal-gateway = %{version}-%{release} Provides: %{name}-journal-gateway%{_isa} = %{version}-%{release} Obsoletes: %{name}-journal-gateway < 227-7 %description journal-remote Programs to forward journal entries over the network, using encrypted HTTP, and to write journal files from serialized journal contents. This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. %package tests Summary: Internal unit tests for systemd Requires: %{name}%{?_isa} = %{version}-%{release} License: LGPLv2+ %description tests "Installed tests" that are usually run as part of the build system. They can be useful to test systemd internals. %prep %setup -q %{?gitcommit:-n %{name}-stable-%{gitcommit}} %if 0%{?dlrn} == 0 %if %{num_patches} git init git config user.email "systemd-maint@redhat.com" git config user.name "Fedora systemd team" git add . git commit -a -q -m "%{version} baseline." # Apply all the patches. git am %{patches} %endif %endif # Restore systemd-user pam config from before "removal of Fedora-specific bits" cp -p %{SOURCE12} src/login/ %build %define ntpvendor %(source /etc/os-release; echo ${ID}) %{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1} CONFIGURE_OPTS=( -Dsysvinit-path=/etc/rc.d/init.d -Drc-local=/etc/rc.d/rc.local -Dntp-servers='0.%{ntpvendor}.pool.ntp.org 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 3.%{ntpvendor}.pool.ntp.org' -Ddev-kvm-mode=0666 -Dkmod=true -Dxkbcommon=true -Dblkid=true -Dseccomp=true -Dima=true -Dselinux=true -Dapparmor=false -Dpolkit=true -Dxz=true -Dzlib=true -Dbzip2=true -Dlz4=true -Dpam=true -Dacl=true -Dsmack=true -Dgcrypt=true -Daudit=true -Delfutils=true -Dlibcryptsetup=true -Delfutils=true -Dqrencode=true -Dgnutls=true -Dmicrohttpd=true -Dlibidn2=true -Dlibiptc=true -Dlibcurl=true -Defi=true -Dgnu-efi=%{?have_gnu_efi:true}%{?!have_gnu_efi:false} -Dtpm=true -Dhwdb=true -Dsysusers=true -Ddefault-kill-user-processes=false -Dtests=unsafe -Dinstall-tests=true -Dtty-gid=5 -Dusers-gid=100 -Dnobody-user=nobody -Dnobody-group=nobody -Dsplit-usr=false -Dsplit-bin=true -Db_lto=false ) %meson "${CONFIGURE_OPTS[@]}" %meson_build if diff %{SOURCE1} %{_vpath_builddir}/triggers.systemd; then echo -e "\n\n\nWARNING: triggers.systemd in Source1 is different!" echo -e " cp %{_vpath_builddir}/triggers.systemd %{SOURCE1}\n\n\n" fi %install %meson_install # udev links mkdir -p %{buildroot}/%{_sbindir} ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm # Compatiblity and documentation files touch %{buildroot}/etc/crypttab chmod 600 %{buildroot}/etc/crypttab # /etc/initab install -Dm0644 -t %{buildroot}/etc/ %{SOURCE5} # /etc/sysctl.conf compat install -Dm0644 %{SOURCE6} %{buildroot}/etc/sysctl.conf ln -s ../sysctl.conf %{buildroot}/etc/sysctl.d/99-sysctl.conf # We create all wants links manually at installation time to make sure # they are not owned and hence overriden by rpm after the user deleted # them. rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants # Make sure these directories are properly owned mkdir -p %{buildroot}%{system_unit_dir}/basic.target.wants mkdir -p %{buildroot}%{system_unit_dir}/default.target.wants mkdir -p %{buildroot}%{system_unit_dir}/dbus.target.wants mkdir -p %{buildroot}%{system_unit_dir}/syslog.target.wants mkdir -p %{buildroot}%{_localstatedir}/run mkdir -p %{buildroot}%{_localstatedir}/log touch %{buildroot}%{_localstatedir}/run/utmp touch %{buildroot}%{_localstatedir}/log/{w,b}tmp # Make sure the user generators dir exists too mkdir -p %{buildroot}%{pkgdir}/system-generators mkdir -p %{buildroot}%{pkgdir}/user-generators # Create new-style configuration files so that we can ghost-own them touch %{buildroot}%{_sysconfdir}/hostname touch %{buildroot}%{_sysconfdir}/vconsole.conf touch %{buildroot}%{_sysconfdir}/locale.conf touch %{buildroot}%{_sysconfdir}/machine-id touch %{buildroot}%{_sysconfdir}/machine-info touch %{buildroot}%{_sysconfdir}/localtime mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf # Make sure the shutdown/sleep drop-in dirs exist mkdir -p %{buildroot}%{pkgdir}/system-shutdown/ mkdir -p %{buildroot}%{pkgdir}/system-sleep/ # Make sure directories in /var exist mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/linger mkdir -p %{buildroot}%{_localstatedir}/lib/private mkdir -p %{buildroot}%{_localstatedir}/log/private mkdir -p %{buildroot}%{_localstatedir}/cache/private mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/timesync ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload ln -s ../private/systemd/timesync %{buildroot}%{_localstatedir}/lib/systemd/timesync mkdir -p %{buildroot}%{_localstatedir}/log/journal touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed touch %{buildroot}%{_localstatedir}/lib/private/systemd/timesync/clock touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state # Install yum protection fragment install -Dm0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/yum/protected.d/systemd.conf install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE7} %{SOURCE8} # Install additional docs # https://bugzilla.redhat.com/show_bug.cgi?id=1234951 install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE9} # https://bugzilla.redhat.com/show_bug.cgi?id=1378974 install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE10} install -Dm0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE11} install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3} %if 0%{?dlrn} == 0 mkdir -p %{buildroot}/etc/polkit-1/localauthority/10-vendor.d mv %{buildroot}/var/lib/polkit-1/localauthority/10-vendor.d/systemd-networkd.pkla \ %{buildroot}/etc/polkit-1/localauthority/10-vendor.d/ %endif %find_lang %{name} # Split files in build root into rpms. See split-files.py for the # rules towards the end, anything which is an exception needs a line # here. python3 %{SOURCE2} %buildroot </dev/null || groupadd -r -g 11 cdrom &>/dev/null || : getent group utmp &>/dev/null || groupadd -r -g 22 utmp &>/dev/null || : getent group tape &>/dev/null || groupadd -r -g 33 tape &>/dev/null || : getent group dialout &>/dev/null || groupadd -r -g 18 dialout &>/dev/null || : getent group input &>/dev/null || groupadd -r input &>/dev/null || : getent group kvm &>/dev/null || groupadd -r -g 36 kvm &>/dev/null || : getent group render &>/dev/null || groupadd -r render &>/dev/null || : getent group systemd-journal &>/dev/null || groupadd -r -g 190 systemd-journal 2>&1 || : getent group systemd-coredump &>/dev/null || groupadd -r systemd-coredump 2>&1 || : getent passwd systemd-coredump &>/dev/null || useradd -r -l -g systemd-coredump -d / -s /sbin/nologin -c "systemd Core Dumper" systemd-coredump &>/dev/null || : getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2>&1 || : getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || : getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1 || : getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null || : %post systemd-machine-id-setup &>/dev/null || : systemctl daemon-reexec &>/dev/null || : journalctl --update-catalog &>/dev/null || : systemd-tmpfiles --create &>/dev/null || : if [ $1 -eq 1 ] ; then # create /var/log/journal only on initial installation mkdir -p %{_localstatedir}/log/journal fi # Make sure new journal files will be owned by the "systemd-journal" group chgrp systemd-journal /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2>/dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2>/dev/null` &>/dev/null || : chmod g+s /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2>/dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2>/dev/null` &>/dev/null || : # Apply ACL to the journal directory setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ &>/dev/null || : # Stop-gap until rsyslog.rpm does this on its own. (This is supposed # to fail when the link already exists) ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/syslog.service &>/dev/null || : # Remove spurious /etc/fstab entries from very old installations # https://bugzilla.redhat.com/show_bug.cgi?id=1009023 if [ -e /etc/fstab ]; then grep -v -E -q '^(devpts|tmpfs|sysfs|proc)' /etc/fstab || \ sed -i.rpm.bak -r '/^devpts\s+\/dev\/pts\s+devpts\s+defaults\s+/d; /^tmpfs\s+\/dev\/shm\s+tmpfs\s+defaults\s+/d; /^sysfs\s+\/sys\s+sysfs\s+defaults\s+/d; /^proc\s+\/proc\s+proc\s+defaults\s+/d' /etc/fstab || : fi # Services we install by default, and which are controlled by presets. if [ $1 -eq 1 ] ; then systemctl preset --quiet \ remote-fs.target \ getty@.service \ serial-getty@.service \ console-getty.service \ debug-shell.service \ systemd-networkd.service \ systemd-networkd-wait-online.service \ systemd-resolved.service \ >/dev/null || : fi # remove obsolete systemd-readahead file rm -f /.readahead &>/dev/null || : %preun if [ $1 -eq 0 ] ; then systemctl disable --quiet \ remote-fs.target \ getty@.service \ serial-getty@.service \ console-getty.service \ debug-shell.service \ systemd-readahead-replay.service \ systemd-readahead-collect.service \ systemd-networkd.service \ systemd-networkd-wait-online.service \ systemd-resolved.service \ >/dev/null || : rm -f /etc/systemd/system/default.target &>/dev/null || : fi %post libs %{?ldconfig} if [ -f /etc/nsswitch.conf ] ; then # sed-fu to add myhostanme to hosts line grep -v -E -q '^hosts:.* myhostname' /etc/nsswitch.conf && sed -i.bak -e ' /^hosts:/ !b /\/ b s/[[:blank:]]*$/ myhostname/ ' /etc/nsswitch.conf &>/dev/null || : # remove mymachines from passwd and group lines of /etc/nsswitch.conf # https://bugzilla.redhat.com/show_bug.cgi?id=1284325 # https://meetbot.fedoraproject.org/fedora-meeting/2015-11-25/fesco.2015-11-25-18.00.html # To avoid the removal, e.g. add a space at the end of the line. grep -E -q '^(passwd|group):.* mymachines$' /etc/nsswitch.conf && sed -i.bak -r -e ' s/^(passwd:.*) mymachines$/\1/; s/^(group:.*) mymachines$/\1/; ' /etc/nsswitch.conf &>/dev/null || : # Add [!UNAVAIL=return] after resolve grep -E -q '^hosts:.*resolve[[:space:]]*($|[[:alpha:]])' /etc/nsswitch.conf && sed -i.bak -e ' /^hosts:/ { s/resolve/& [!UNAVAIL=return]/} ' /etc/nsswitch.conf &>/dev/null || : # Add nss-systemd to passwd and group grep -E -q '^(passwd|group):.* systemd' /etc/nsswitch.conf || sed -i.bak -r -e ' s/^(passwd|group):(.*)/\1: \2 systemd/ ' /etc/nsswitch.conf &>/dev/null || : fi # check if nobody or nfsnobody is defined export SYSTEMD_NSS_BYPASS_SYNTHETIC=1 if getent passwd nfsnobody &>/dev/null; then test -f /etc/systemd/dont-synthesize-nobody || { echo 'Detected system with nfsnobody defined, creating /etc/systemd/dont-synthesize-nobody' mkdir -p /etc/systemd || : : >/etc/systemd/dont-synthesize-nobody || : } elif getent passwd nobody 2>/dev/null | grep -v 'nobody:[x*]:65534:65534:.*:/:/sbin/nologin' &>/dev/null; then test -f /etc/systemd/dont-synthesize-nobody || { echo 'Detected system with incompatible nobody defined, creating /etc/systemd/dont-synthesize-nobody' mkdir -p /etc/systemd || : : >/etc/systemd/dont-synthesize-nobody || : } fi %{?ldconfig:%postun libs -p %ldconfig} %global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %post udev # Move old stuff around in /var/lib mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null udevadm hwdb --update &>/dev/null %systemd_post %udev_services /usr/lib/systemd/systemd-random-seed save 2>&1 # Replace obsolete keymaps # https://bugzilla.redhat.com/show_bug.cgi?id=1151958 grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null && sed -i.rpm.bak -r 's/^KEYMAP="?fi-latin[19]"?/KEYMAP="fi"/' /etc/vconsole.conf || : %preun udev %systemd_preun %udev_services if [ $1 -eq 1 ] ; then if [ -f %{_localstatedir}/lib/systemd/clock ] ; then mkdir -p %{_localstatedir}/lib/private/systemd/timesync mv %{_localstatedir}/lib/systemd/clock %{_localstatedir}/lib/private/systemd/timesync/. fi fi %postun udev # Only restart systemd-udev, to run the upgraded dameon. # Others are either oneshot services, or sockets, and restarting them causes issues (#1378974) %systemd_postun_with_restart systemd-udevd.service %pre journal-remote getent group systemd-journal-remote &>/dev/null || groupadd -r systemd-journal-remote 2>&1 || : getent passwd systemd-journal-remote &>/dev/null || useradd -r -l -g systemd-journal-remote -d %{_localstatedir}/log/journal/remote -s /sbin/nologin -c "Journal Remote" systemd-journal-remote &>/dev/null || : %post journal-remote %systemd_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_post systemd-journal-remote.socket systemd-journal-remote.service %systemd_post systemd-journal-upload.service %firewalld_reload %preun journal-remote %systemd_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %systemd_preun systemd-journal-remote.socket systemd-journal-remote.service %systemd_preun systemd-journal-upload.service if [ $1 -eq 1 ] ; then if [ -f %{_localstatedir}/lib/systemd/journal-upload/state -a ! -L %{_localstatedir}/lib/systemd/journal-upload ] ; then mkdir -p %{_localstatedir}/lib/private/systemd/journal-upload mv %{_localstatedir}/lib/systemd/journal-upload/state %{_localstatedir}/lib/private/systemd/journal-upload/. rmdir %{_localstatedir}/lib/systemd/journal-upload || : fi fi %postun journal-remote %systemd_postun_with_restart systemd-journal-gatewayd.service %systemd_postun_with_restart systemd-journal-remote.service %systemd_postun_with_restart systemd-journal-upload.service %firewalld_reload %global _docdir_fmt %{name} %files -f %{name}.lang -f .file-list-rest %doc %{_pkgdocdir} %exclude %{_pkgdocdir}/LICENSE.* %license LICENSE.GPL2 LICENSE.LGPL2.1 %ghost %dir %attr(0755,-,-) /etc/systemd/system/basic.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/bluetooth.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/default.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/getty.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/graphical.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/local-fs.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/machines.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/multi-user.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/network-online.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/printer.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/remote-fs.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/sockets.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/sysinit.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/system-update.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/timers.target.wants %ghost %dir %attr(0755,-,-) /var/lib/rpm-state/systemd %files libs -f .file-list-libs %license LICENSE.LGPL2.1 %files pam -f .file-list-pam %files devel -f .file-list-devel %files udev -f .file-list-udev %files container -f .file-list-container %files journal-remote -f .file-list-remote %files tests -f .file-list-tests %changelog