don't ship systemd-timesyncd

Resolves: #1947425
This commit is contained in:
David Tardon 2021-04-28 15:42:29 +02:00 committed by Michal Sekletár
parent b0e487f450
commit 283f39487e

View File

@ -470,6 +470,7 @@ CONFIGURE_OPTS=(
-Ddefault-mdns=no -Ddefault-mdns=no
-Ddefault-llmnr=resolve -Ddefault-llmnr=resolve
-Doomd=true -Doomd=true
-Dtimesyncd=false
) )
%if %{without lto} %if %{without lto}
@ -543,13 +544,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/private
mkdir -p %{buildroot}%{_localstatedir}/log/private mkdir -p %{buildroot}%{_localstatedir}/log/private
mkdir -p %{buildroot}%{_localstatedir}/cache/private mkdir -p %{buildroot}%{_localstatedir}/cache/private
mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/timesync
ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload
mkdir -p %{buildroot}%{_localstatedir}/log/journal mkdir -p %{buildroot}%{_localstatedir}/log/journal
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed
touch %{buildroot}%{_localstatedir}/lib/systemd/timesync/clock
touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state
# Install yum protection fragment # Install yum protection fragment
@ -620,8 +619,6 @@ python3 %{SOURCE2} %buildroot <<EOF
%ghost %dir /var/lib/private/systemd %ghost %dir /var/lib/private/systemd
%ghost %dir /var/lib/private/systemd/journal-upload %ghost %dir /var/lib/private/systemd/journal-upload
%ghost /var/lib/private/systemd/journal-upload/state %ghost /var/lib/private/systemd/journal-upload/state
%ghost %dir /var/lib/systemd/timesync
%ghost /var/lib/systemd/timesync/clock
%ghost %dir /var/lib/systemd/backlight %ghost %dir /var/lib/systemd/backlight
%ghost /var/lib/systemd/catalog/database %ghost /var/lib/systemd/catalog/database
%ghost %dir /var/lib/systemd/coredump %ghost %dir /var/lib/systemd/coredump
@ -838,24 +835,12 @@ fi
%{?ldconfig:%postun libs -p %ldconfig} %{?ldconfig:%postun libs -p %ldconfig}
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket
%pre udev
getent group systemd-timesync &>/dev/null || groupadd -r systemd-timesync 2>&1 || :
getent passwd systemd-timesync &>/dev/null || useradd -r -l -g systemd-timesync -d / -s /sbin/nologin -c "systemd Time Synchronization" systemd-timesync &>/dev/null || :
%post udev %post udev
# Move old stuff around in /var/lib # Move old stuff around in /var/lib
mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null
mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null
if [ -L %{_localstatedir}/lib/systemd/timesync ]; then
rm %{_localstatedir}/lib/systemd/timesync
mv %{_localstatedir}/lib/private/systemd/timesync %{_localstatedir}/lib/systemd/timesync
fi
if [ -f %{_localstatedir}/lib/systemd/clock ] ; then
mkdir -p %{_localstatedir}/lib/systemd/timesync
mv %{_localstatedir}/lib/systemd/clock %{_localstatedir}/lib/systemd/timesync/.
fi
udevadm hwdb --update &>/dev/null udevadm hwdb --update &>/dev/null
@ -876,7 +861,7 @@ grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null &&
%postun udev %postun udev
# Restart some services. # Restart some services.
# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974) # Others are either oneshot services, or sockets, and restarting them causes issues (#1378974)
%systemd_postun_with_restart systemd-udevd.service systemd-timesyncd.service %systemd_postun_with_restart systemd-udevd.service
%pre journal-remote %pre journal-remote
getent group systemd-journal-remote &>/dev/null || groupadd -r systemd-journal-remote 2>&1 || : getent group systemd-journal-remote &>/dev/null || groupadd -r systemd-journal-remote 2>&1 || :