From c94620d86418e934981f59e8b9a474adecad6ccc Mon Sep 17 00:00:00 2001 From: chengyechun Date: Sat, 25 Nov 2023 14:34:38 +0800 Subject: [PATCH] update ntpd.service (cherry picked from commit c45628777007c23e4bc329b67d95a53ff701fc3c) --- ntp.spec | 13 +++++++++++-- ntpd.service | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ntp.spec b/ntp.spec index 8713d48..4ab7588 100644 --- a/ntp.spec +++ b/ntp.spec @@ -2,7 +2,7 @@ Name: ntp Version: 4.2.8p15 -Release: 9 +Release: 13 Summary: A protocol designed to synchronize the clocks of computers over a network License: MIT and BSD and BSD with advertising URL: https://www.ntp.org/ @@ -31,7 +31,7 @@ Patch8: backport-add-NULL-pointer-check-when-ntpd-deletes-the-las Patch9: backport-CVE-2023-26555-fix-out-write-bounds-in-praecis_parse.patch BuildRequires: libcap-devel openssl-devel libedit-devel libevent-devel pps-tools-devel -BuildRequires: autogen autogen-libopts-devel systemd gcc perl-generators perl-HTML-Parser +BuildRequires: autogen autogen-libopts-devel systemd gcc perl-generators perl-HTML-Parser libtool Requires(pre): shadow-utils autogen >= 5.18.16 %{?systemd_requires} Recommends: ntpstat timedatex @@ -69,6 +69,8 @@ for f in COPYRIGHT; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,} done +./bootstrap + %build sed -i 's|$CFLAGS -Wstrict-overflow|$CFLAGS|' configure sntp/configure export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow" @@ -212,6 +214,13 @@ make check %{_mandir}/man8/*.8* %changelog +* Sat Nov 25 2023 chengyechun - 4.2.8p15-13 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add restart and conflict to service + run the bootstrap script to prevent build failures + * Wed Jul 12 2023 chengyechun - 4.2.8p15-9 - Type:CVE - ID:CVE-2023-26555 diff --git a/ntpd.service b/ntpd.service index a638dad..61dee04 100644 --- a/ntpd.service +++ b/ntpd.service @@ -1,13 +1,14 @@ [Unit] Description=Network Time Service After=syslog.target ntpdate.service sntp.service -Conflicts=systemd-timesyncd.service +Conflicts=chronyd.service systemd-timesyncd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/ntpd ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS PrivateTmp=true +Restart=on-failure [Install] WantedBy=multi-user.target -- Gitee