Compare commits
11 Commits
98077c5722
...
1b83036eb6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b83036eb6 | ||
|
|
7cf620086b | ||
|
|
8f509a368a | ||
|
|
56fcf705ea | ||
|
|
ddb3ee7a94 | ||
|
|
decef8ade2 | ||
|
|
8a0a6bfe1d | ||
|
|
d0e78af622 | ||
|
|
107d3eafae | ||
|
|
1cbdf352e0 | ||
|
|
94cd7bcc14 |
Binary file not shown.
BIN
chrony-4.3.tar.gz
Normal file
BIN
chrony-4.3.tar.gz
Normal file
Binary file not shown.
@ -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
21
chrony-services.patch
Normal 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]
|
||||
41
chrony.spec
41
chrony.spec
@ -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
BIN
clknetsim-f00531.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user