Comment 10 for bug 2048876

Revision history for this message
Ankush Pathak (ankushpathak) wrote :

Could you please review if this patch is more in line with @paride's suggestion?

The patch moves the pool sources out of chrony.conf and introduces them into `sources.d/default-ntp-pools.sources`.
`default-ntp-pools.sources` is managed by `postinst` through debconf questions. A user can choose not to have `sources.d/default-ntp-pools.sources`. However, it will be installed by default.
If the user has a `default-ntp-pools.sources` that is different than the one included in the package, by default, user's version will be preserved.

Scenarios tested:
1. Upgrade chrony when `sources.d/default-ntp-pools.sources` does not exist. `sources.d/default-ntp-pools.sources` was installed.
2. Upgrade chrony when `sources.d/default-ntp-pools.sources` does not exist and debconf set to not install `sources.d/default-ntp-pools.sources`. `sources.d/default-ntp-pools.sources` was not installed
3. Upgrade chrony when `sources.d/default-ntp-pools.sources` exists and is identical to the one included in the package. `cp` was not invoked
4. Upgrade chrony when `sources.d/default-ntp-pools.sources` exists and is different to the one included in the package. User's version of `sources.d/default-ntp-pools.sources` was preserved.
5. Upgrade chrony when `sources.d/default-ntp-pools.sources` exists, is different to the one included in the package and debconf is set not to preserve user's version. `sources.d/default-ntp-pools.sources` was overwritten with the version in the package.

I haven't marked this as a patch so that ~ubuntu-sponsors are not immediately subscribed in case if the patch requires rework.

Thanks,
Ankush