diff --git a/systemd-timesyncd-default-to-aliyun.patch b/systemd-timesyncd-default-to-aliyun.patch new file mode 100644 index 0000000000000000000000000000000000000000..1862bee5239d8d19d94c5117fddd7b11e99ae757 --- /dev/null +++ b/systemd-timesyncd-default-to-aliyun.patch @@ -0,0 +1,11 @@ +--- systemd-stable-252.4/src/timesync/timesyncd.conf.in.orig 2023-03-03 12:29:52.389506272 +0800 ++++ systemd-stable-252.4/src/timesync/timesyncd.conf.in 2023-03-03 12:30:20.177506272 +0800 +@@ -14,7 +14,7 @@ + + [Time] + #NTP= +-#FallbackNTP={{NTP_SERVERS}} ++FallbackNTP={{NTP_SERVERS}} + #RootDistanceMaxSec=5 + #PollIntervalMinSec=32 + #PollIntervalMaxSec=2048 diff --git a/systemd.spec b/systemd.spec index f57621afb47babc077bbe69ec2cb5f487ce6fc24..31d30ba464a999e2a2b38acb5af119f0eb723eea 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global __requires_exclude pkg-config %global pkgdir %{_prefix}/lib/systemd @@ -54,6 +54,9 @@ Source22: sysusers.attr Source23: sysusers.prov Source24: sysusers.generate-pre.sh +# Use aliyun ntp server as default ntp server +Patch0000: systemd-timesyncd-default-to-aliyun.patch + # Backports of patches from upstream (0000–0499) Patch0001: 0001-pam-align-second-and-third-columns.patch Patch0002: 0002-pam-add-a-call-to-pam_namespace.patch @@ -66,7 +69,6 @@ Patch0490: use-bfq-scheduler.patch # Adjust upstream config to use our shared stack Patch0491: fedora-use-system-auth-in-pam-systemd-user.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang @@ -422,14 +424,11 @@ The %{name}-doc package contains documentation files for %{name}. %autosetup -n %{name}-stable-%{version} -p1 %build -%global ntpvendor %(source /etc/os-release; echo ${ID}) -%{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1} - CONFIGURE_OPTS=( -Dmode=release -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' + -Dntp-servers='ntp.aliyun.com 0.cn.pool.ntp.org 1.cn.pool.ntp.org 2.cn.pool.ntp.org 3.cn.pool.ntp.org' -Ddns-servers= -Duser-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin -Dservice-watchdog= @@ -917,6 +916,9 @@ fi %{_docdir}/%{name}-%{doc}/20-yama-ptrace.conf %changelog +* Fri Mar 03 2023 Funda Wang - 252.4-2 +- Use aliyun as default ntp server + * Thu Jan 05 2023 happy_orange - 252.4-1 - update to 252.4