diff -Nru chrony-4.5/debian/changelog chrony-4.5/debian/changelog --- chrony-4.5/debian/changelog 2024-01-02 02:45:01.000000000 -0600 +++ chrony-4.5/debian/changelog 2024-02-21 15:57:41.000000000 -0600 @@ -1,3 +1,20 @@ +chrony (4.5-1ubuntu2) noble; urgency=medium + + * Move NTP pool sources config out of chrony.conf (LP: #2048876) + The default NTP pool sources are currently configured in chrony.conf. + chrony.conf is tracked by ucf. Any update to chrony.conf to update the + NTP sources will potentially cause a prompt whenever chrony is upgraded. + Current commit moves out the default NTP sources to + default-ntp-pools.sources under sources.d directory. + default-ntp-pools.sources is managed through postinst and debconf + preferences. If the user has updated this file between chrony upgrades, + user version of the file will be preserved by default. User can also + choose not to install default-ntp-pools.sources even if it does not + exist. Since the debconf question can be preseeded, this can help users + avoid a prompt during chrony upgrades. + + -- Ankush Pathak Wed, 21 Feb 2024 15:57:41 -0600 + chrony (4.5-1ubuntu1) noble; urgency=medium * Merge with Debian unstable (LP: #2040371). Remaining changes: diff -Nru chrony-4.5/debian/chrony.conf chrony-4.5/debian/chrony.conf --- chrony-4.5/debian/chrony.conf 2023-12-11 15:17:10.000000000 -0600 +++ chrony-4.5/debian/chrony.conf 2024-02-21 15:57:41.000000000 -0600 @@ -4,24 +4,6 @@ # Include configuration files found in /etc/chrony/conf.d. confdir /etc/chrony/conf.d -# This will use (up to): -# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled -# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well -# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm) -# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only -# sources will be used. -# At the same time it retains some protection against one of the entries being -# down (compare to just using one of the lines). See (LP: #1754358) for the -# discussion. -# -# About using servers from the NTP Pool Project in general see (LP: #104525). -# Approved by Ubuntu Technical Board on 2011-02-08. -# See http://www.pool.ntp.org/join.html for more information. -pool ntp.ubuntu.com iburst maxsources 4 -pool 0.ubuntu.pool.ntp.org iburst maxsources 1 -pool 1.ubuntu.pool.ntp.org iburst maxsources 1 -pool 2.ubuntu.pool.ntp.org iburst maxsources 2 - # Use time sources from DHCP. sourcedir /run/chrony-dhcp diff -Nru chrony-4.5/debian/control chrony-4.5/debian/control --- chrony-4.5/debian/control 2024-01-02 02:45:01.000000000 -0600 +++ chrony-4.5/debian/control 2024-02-21 15:57:41.000000000 -0600 @@ -27,6 +27,8 @@ Architecture: linux-any Pre-Depends: ${misc:Pre-Depends} Depends: adduser (>= 3.130), + debconf (>= 0.2.17), + diffutils, iproute2 [linux-any], tzdata-legacy, libcap2-bin (>= 1:2.32-1), diff -Nru chrony-4.5/debian/default-ntp-pools.sources chrony-4.5/debian/default-ntp-pools.sources --- chrony-4.5/debian/default-ntp-pools.sources 1969-12-31 18:00:00.000000000 -0600 +++ chrony-4.5/debian/default-ntp-pools.sources 2024-02-21 15:57:41.000000000 -0600 @@ -0,0 +1,17 @@ +# This will use (up to): +# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled +# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well +# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm) +# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only +# sources will be used. +# At the same time it retains some protection against one of the entries being +# down (compare to just using one of the lines). See (LP: #1754358) for the +# discussion. +# +# About using servers from the NTP Pool Project in general see (LP: #104525). +# Approved by Ubuntu Technical Board on 2011-02-08. +# See http://www.pool.ntp.org/join.html for more information. +pool ntp.ubuntu.com iburst maxsources 4 +pool 0.ubuntu.pool.ntp.org iburst maxsources 1 +pool 1.ubuntu.pool.ntp.org iburst maxsources 1 +pool 2.ubuntu.pool.ntp.org iburst maxsources 2 diff -Nru chrony-4.5/debian/install chrony-4.5/debian/install --- chrony-4.5/debian/install 2024-01-02 02:45:01.000000000 -0600 +++ chrony-4.5/debian/install 2024-02-21 15:57:41.000000000 -0600 @@ -1,5 +1,6 @@ debian/chrony-helper usr/libexec/chrony debian/chrony.conf usr/share/chrony +debian/default-ntp-pools.sources usr/share/chrony debian/conf.d etc/chrony debian/ntp-units.d/50-chrony.list usr/lib/systemd/ntp-units.d debian/sources.d etc/chrony diff -Nru chrony-4.5/debian/postinst chrony-4.5/debian/postinst --- chrony-4.5/debian/postinst 2023-12-11 15:17:10.000000000 -0600 +++ chrony-4.5/debian/postinst 2024-02-21 15:57:41.000000000 -0600 @@ -3,6 +3,7 @@ # # see: dh_installdeb(1) +. /usr/share/debconf/confmodule set -e @@ -18,10 +19,30 @@ --home /var/lib/chrony \ --no-create-home _chrony + if [ -f /etc/chrony/sources.d/default-ntp-pools.sources ] && ! cmp -s /usr/share/chrony/default-ntp-pools.sources /etc/chrony/sources.d/default-ntp-pools.sources; + then + db_input low chrony/preserve_user_configured_pools_in_sourcesd || true + db_go + db_get chrony/preserve_user_configured_pools_in_sourcesd + if [ "${RET}" = "false" ]; + then + cp --preserve /usr/share/chrony/default-ntp-pools.sources /etc/chrony/sources.d/default-ntp-pools.sources + fi + elif [ ! -f /etc/chrony/sources.d/default-ntp-pools.sources ]; + then + db_input low chrony/configure_default_pools_in_sourcesd || true + db_go + db_get chrony/configure_default_pools_in_sourcesd + if [ "${RET}" = "true" ]; + then + cp --preserve /usr/share/chrony/default-ntp-pools.sources /etc/chrony/sources.d/default-ntp-pools.sources + fi + fi + if command -v ucf >/dev/null then - ucf --three-way /usr/share/chrony/chrony.conf /etc/chrony/chrony.conf - ucf --three-way /usr/share/chrony/chrony.keys /etc/chrony/chrony.keys + ucf --debconf-ok --three-way /usr/share/chrony/chrony.conf /etc/chrony/chrony.conf + ucf --debconf-ok --three-way /usr/share/chrony/chrony.keys /etc/chrony/chrony.keys if [ -x "$(command -v ucfr)" ]; then ucfr chrony /etc/chrony/chrony.conf ucfr chrony /etc/chrony/chrony.keys diff -Nru chrony-4.5/debian/postrm chrony-4.5/debian/postrm --- chrony-4.5/debian/postrm 2023-12-11 14:57:38.000000000 -0600 +++ chrony-4.5/debian/postrm 2024-02-21 15:57:41.000000000 -0600 @@ -12,6 +12,7 @@ rm -f /var/lib/chrony/* rm -f /etc/chrony/chrony.conf rm -f /etc/chrony/chrony.keys + rm -f /etc/chrony/sources.d/default-ntp-pools.sources if command -v ucf >/dev/null then ucf --purge /etc/chrony/chrony.conf diff -Nru chrony-4.5/debian/templates chrony-4.5/debian/templates --- chrony-4.5/debian/templates 1969-12-31 18:00:00.000000000 -0600 +++ chrony-4.5/debian/templates 2024-02-21 15:57:41.000000000 -0600 @@ -0,0 +1,16 @@ +Template: chrony/preserve_user_configured_pools_in_sourcesd +Type: boolean +Default: true +Description: Don't overwrite /etc/chrony/default-ntp-pools.sources with maintainer's version. + The maintainer's version and current version of /etc/chrony/default-ntp-pools.sources are different. + If you want to preserve the current version please respond in affirmative. + If you want the current version to be overwritten by the maintainer's version included in the package + please respond in negative. + +Template: chrony/configure_default_pools_in_sourcesd +Type: boolean +Default: true +Description: Configure default NTP pool sources in /etc/chrony/default-ntp-pools.sources. + If you plan to configure time sources for chrony yourself, please respond in negative. + If you don't plan to configure time sources for chrony yourself, or are not sure what this means + it is recommended that you respond in affirmative.