Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
1b83036eb6
!41 enable NTS
From: @chengyechun 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
2023-05-08 02:00:28 +00:00
chengyechun
7cf620086b enable NTS 2023-05-06 16:49:11 +08:00
openeuler-ci-bot
8f509a368a
!38 update chrony to chrony-4.3
From: @chengyechun 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2023-01-31 11:59:11 +00:00
chengyechun
56fcf705ea update chrony 2023-01-31 14:35:17 +08:00
openeuler-ci-bot
ddb3ee7a94
!29 update patching mode
From: @chengyechun 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-12-24 06:27:24 +00:00
chengyechun
decef8ade2 update the patching momde 2022-12-24 11:19:48 +08:00
openeuler-ci-bot
8a0a6bfe1d
!24 add chrony-services.patch
From: @qiao-yujie 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-07-04 09:39:07 +00:00
qiaoyujie
d0e78af622
update chrony.spec. 2022-07-04 09:25:01 +00:00
qiaoyujie
107d3eafae
update chrony.spec. 2022-07-04 09:13:58 +00:00
openeuler-ci-bot
1cbdf352e0
!23 update version to 4.2
From: @qiao-yujie 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-06-22 08:35:52 +00:00
qiaoyujie
94cd7bcc14 update version to 4.2 2022-06-22 14:37:35 +08:00
7 changed files with 73 additions and 16 deletions

Binary file not shown.

BIN
chrony-4.3.tar.gz Normal file

Binary file not shown.

View File

@ -7,20 +7,23 @@ Use the PEERNTP and NTPSERVERARGS environment variables from
Co-Authored-By: Christian Glombek <cglombek@redhat.com>
---
examples/chrony.nm-dispatcher.dhcp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/examples/chrony.nm-dispatcher.dhcp b/examples/chrony.nm-dispatcher.dhcp
index 6ea4c37..a6ad35a 100644
index 547ce83..f23756e 100644
--- a/examples/chrony.nm-dispatcher.dhcp
+++ b/examples/chrony.nm-dispatcher.dhcp
@@ -6,16 +6,24 @@
@@ -10,13 +10,21 @@ action=$2
chronyc=/usr/bin/chronyc
default_server_options=iburst
server_options=iburst
-server_dir=/var/run/chrony-dhcp
+server_dir=/run/chrony-dhcp
dhcp_server_file=$server_dir/$interface.sources
# DHCP4_NTP_SERVERS is passed from DHCP options by NetworkManager.
nm_dhcp_servers=$DHCP4_NTP_SERVERS
dhcp_ntp_servers="$DHCP4_NTP_SERVERS $DHCP6_DHCP6_NTP_SERVERS"
+[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
+[ -f /etc/sysconfig/network-scripts/ifcfg-"${interface}" ] && \
@ -32,12 +35,18 @@ index 6ea4c37..a6ad35a 100644
+ # Don't add NTP servers if PEERNTP=no specified; return early.
+ [ "$PEERNTP" = "no" ] && return
+
for server in $nm_dhcp_servers; do
- echo "server $server $default_server_options" >> "$dhcp_server_file"
+ echo "server $server ${NTPSERVERARGS:-$default_server_options}" >> "$dhcp_server_file"
for server in $dhcp_ntp_servers; do
# Check for invalid characters (from the DHCPv6 NTP FQDN suboption)
len1=$(printf '%s' "$server" | wc -c)
@@ -25,7 +33,7 @@ add_servers_from_dhcp() {
continue
fi
- printf 'server %s %s\n' "$server" "$server_options" >> "$dhcp_server_file"
+ printf 'server %s %s\n' "$server" "${NTPSERVERARGS:-$server_options}" >> "$dhcp_server_file"
done
$chronyc reload sources > /dev/null 2>&1 || :
}
--
2.29.2
2.23.0

21
chrony-services.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up chrony-4.2/examples/chronyd.service.services chrony-4.2/examples/chronyd.service
--- chrony-4.2/examples/chronyd.service.services 2021-12-16 13:17:42.000000000 +0100
+++ chrony-4.2/examples/chronyd.service 2022-01-19 13:55:59.066677473 +0100
@@ -32,8 +32,7 @@ ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
-ProtectSystem=strict
-ReadWritePaths=/run /var/lib/chrony -/var/log
+ProtectSystem=full
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
RestrictSUIDSGID=yes
@@ -42,7 +41,6 @@ SystemCallFilter=~@cpu-emulation @debug
# Adjust restrictions for /usr/sbin/sendmail (mailonchange directive)
NoNewPrivileges=no
-ReadWritePaths=-/var/spool
RestrictAddressFamilies=AF_NETLINK
[Install]

View File

@ -1,8 +1,8 @@
%global clknetsim_ver f89702
%global clknetsim_ver f00531
Name: chrony
Version: 4.1
Release: 1
Version: 4.3
Release: 2
Summary: An NTP client/server
License: GPLv2
URL: https://chrony.tuxfamily.org
@ -12,8 +12,8 @@ Source1: chrony.dhclient
Source6: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
Patch1: chrony-nm-dispatcher-dhcp.patch
BuildRequires: gcc gcc-c++ bison systemd libcap-devel libedit-devel nettle-devel pps-tools-devel libseccomp-devel
Patch2: chrony-services.patch
BuildRequires: gcc gcc-c++ bison systemd libcap-devel libedit-devel nettle-devel pps-tools-devel libseccomp-devel m4 gnutls-devel gnutls-utils
Requires: shadow-utils systemd timedatex
%description
@ -27,8 +27,11 @@ service to other computers in the network.
%prep
%setup -q -n %{name}-%{version} -a 6
%patch1 -p1
%autosetup -p1 -n %{name}-%{version} -a 6
# regenerate the file from getdate.y
rm -f getdate.c
mv clknetsim-%{clknetsim_ver}* test/simulation/clknetsim
%build
@ -135,6 +138,30 @@ fi
%{_mandir}/man[158]/%{name}*.[158]*
%changelog
* Sat May 6 2023 chengyechun <chengyechun1@huawei.com> - 4.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add BuildRequire for enable NTS
* Mon Jan 30 2023 chengyechun <chengyechun1@huawei.com> - 4.3-1
- Type:enhancement
- ID:NA
- SUG:na
- DESC:update to chrony-4.3
* Sat Dec 24 2022 chengyechun <chengyechun1@huawei.com> - 4.2-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update the patching mode
* Mon Jul 04 2022 qiaoyujie <qiaoyujie@kylinos.cn> - 4.2-2
- Add chrony-services.patch
* Wed Jun 22 2022 qiaoyujie <qiaoyujie@kylinos.cn> - 4.2-1
- Upgrade version to 4.2
* Fri Jul 09 2021 gaihuiying <gaihuiying1@huawei.com> - 4.1-1
- Type:requirement
- Id:NA

BIN
clknetsim-f00531.tar.gz Normal file

Binary file not shown.

Binary file not shown.