update ntpd.service

(cherry picked from commit c45628777007c23e4bc329b67d95a53ff701fc3c)
This commit is contained in:
chengyechun 2023-11-25 14:34:38 +08:00 committed by openeuler-sync-bot
parent 0c2a9a5711
commit c94620d864
2 changed files with 13 additions and 3 deletions

View File

@ -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 <chengyechun1@huawei.com> - 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 <chengyechun1@huawei.com> - 4.2.8p15-9
- Type:CVE
- ID:CVE-2023-26555

View File

@ -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