mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] chrony: correct config directory and create namespace
@ 2025-06-13 10:50 Ralf Glaser
  2025-06-27  9:18 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Ralf Glaser @ 2025-06-13 10:50 UTC (permalink / raw)
  To: ptxdist; +Cc: Ralf Glaser

--sysconfdir set to the location where the config files are installed. create chrony namespace /val/lib/chrony

Signed-off-by: Ralf Glaser <glaser@iotmaxx.de>
---
 rules/chrony.make | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules/chrony.make b/rules/chrony.make
index 647b78272..64fc48ee5 100644
--- a/rules/chrony.make
+++ b/rules/chrony.make
@@ -41,7 +41,7 @@ CHRONY_CONF_TOOL	:= autoconf
 CHRONY_CONF_OPT		:= \
 	--localstatedir=/var \
 	--prefix=/usr \
-	--sysconfdir=/etc \
+	--sysconfdir=/etc/chrony \
 	--disable-readline \
 	--without-editline \
 	$(call ptx/ifdef, PTXCONF_CHRONY_USE_NETTLE,,--disable-sechash) \
@@ -130,6 +130,9 @@ ifdef PTXCONF_CHRONY_SYSTEMD_UNIT
 		/usr/lib/systemd/system/multi-user.target.wants/chronyd.service)
 endif
 
+#namespace
+	@$(call install_copy, chrony, 0, 0, 0755, /var/lib/chrony)
+
 	@$(call install_finish, chrony)
 
 	@$(call touch)
-- 
2.49.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] chrony: correct config directory and create namespace
  2025-06-13 10:50 [ptxdist] [PATCH] chrony: correct config directory and create namespace Ralf Glaser
@ 2025-06-27  9:18 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-06-27  9:18 UTC (permalink / raw)
  To: Ralf Glaser; +Cc: ptxdist

On Fri, Jun 13, 2025 at 12:50:37PM +0200, Ralf Glaser wrote:
> --sysconfdir set to the location where the config files are installed. create chrony namespace /val/lib/chrony

typo: s/val/var/

> 
> Signed-off-by: Ralf Glaser <glaser@iotmaxx.de>
> ---
>  rules/chrony.make | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/chrony.make b/rules/chrony.make
> index 647b78272..64fc48ee5 100644
> --- a/rules/chrony.make
> +++ b/rules/chrony.make
> @@ -41,7 +41,7 @@ CHRONY_CONF_TOOL	:= autoconf
>  CHRONY_CONF_OPT		:= \
>  	--localstatedir=/var \
>  	--prefix=/usr \
> -	--sysconfdir=/etc \
> +	--sysconfdir=/etc/chrony \

So this is ugly. This was broken for some time when
PTXCONF_CHRONY_INSTALL_CONFIG is installed, so we need to assume that
projects install /etc/chrony.conf from another package (I know projects
that do this).
Changing sysconfdir will break those silently.

So please make the change the other way around and move
projectroot/etc/chrony/chrony.conf to projectroot/chrony/chrony.conf and
the same for chrony.keys.

You can also add something like this:

	@ptxd_get_alternative projectroot /etc/chrony/chrony.conf && \
		ptxd_bailout "/etc/chrony/chrony.conf was moved to /etc/chrony.conf" \
		"Please move $${ptxd_reply} accordingly."

To catch old files. This does not work for the other case, because it must
be in the package that installs the file. The same for chrony.keys.

Michael

>  	--disable-readline \
>  	--without-editline \
>  	$(call ptx/ifdef, PTXCONF_CHRONY_USE_NETTLE,,--disable-sechash) \
> @@ -130,6 +130,9 @@ ifdef PTXCONF_CHRONY_SYSTEMD_UNIT
>  		/usr/lib/systemd/system/multi-user.target.wants/chronyd.service)
>  endif
>  
> +#namespace
> +	@$(call install_copy, chrony, 0, 0, 0755, /var/lib/chrony)
> +
>  	@$(call install_finish, chrony)
>  
>  	@$(call touch)
> -- 
> 2.49.0
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-27  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-13 10:50 [ptxdist] [PATCH] chrony: correct config directory and create namespace Ralf Glaser
2025-06-27  9:18 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox