Add vendor configuration directory installation

2023-02-06 Thread Valentin Lefebvre
Hello,


This patch add a new autoconf argument that allows installation
into the vendor configuration directory (/usr/etc/). Some linux
distribution now move system configuration files from /etc to /usr/etc.
See this ref: [0]. 
So, it could be a good idea to give the opportunity for a project
to install in both location /etc and /usr/etc in same time. Not just by
overriding the sysconfdir arguments. For example we have two projects
PAM and D-Bus that look both in /etc and /usr/etc.
As a packager for a Linux distribution, it will save times if we
get this multi choice of configuration directory installation.

This patch was created with a Colleague Jason Sikes. Thanks to him!

[0] https://0pointer.net/blog/projects/stateless.html

-- 
Best regards,
Valentin Lefebvre

Linux Distribution Engineer - packager
Member of System Boot and Init team
SUSE Software Solutions Germany GmbH

56100 Lorient, France

From 0881470cca7a85c8e864a9eaf5cfad50e471002a Mon Sep 17 00:00:00 2001
From: Valentin Lefebvre 
Date: Mon, 6 Feb 2023 16:28:00 +0100
Subject: [PATCH] stateless systems: add vendor conf dir install

This patch add a new autoconf argument that allows installation
into the vendor configuration directory (/usr/etc/). It gives the
opportunity for a project to install in both location /etc and /usr/etc.

Signed-off-by: Valentin Lefebvre 
---
 doc/autoconf.texi   |  7 ++-
 doc/make-stds.texi  | 14 +-
 doc/standards.texi  |  2 +-
 lib/autoconf/general.m4 | 11 ++-
 4 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 9a396fc8..79208550 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -2992,6 +2992,11 @@ The directory for installing modifiable architecture-independent data.
 The directory for installing read-only single-machine data.
 @end defvar
 
+@defvar distconfdir
+@ovindex distconfdir
+The directory for installing distribution-provided read-only single-machine data.
+@end defvar
+
 
 Most of these variables have values that rely on @code{prefix} or
 @code{exec_prefix}.  It is deliberate that the directory output
@@ -27328,7 +27333,7 @@ introduced in this document.
 @c  LocalWords:  Systemology Checkpointing Changequote INTERCAL changequote dfn
 @c  LocalWords:  Quadrigraphs builtins Shellology acconfig Bugward LIBOBJ Imake
 @c  LocalWords:  LIBOBJS IFELSE cindex flushright Pinard Metaconfig uref Simons
-@c  LocalWords:  distclean uninstall noindent versioning Tromey dir vr
+@c  LocalWords:  distclean uninstall noindent versioning Tromey dir vr distconfdir
 @c  LocalWords:  SAMS samp aclocal acsite underquoted emph itemx prepend SUBST
 @c  LocalWords:  evindex automake Gettext autopoint gettext symlink libtoolize
 @c  LocalWords:  defmac INIT tarname ovindex cvindex BUGREPORT PREREQ asis PROG
diff --git a/doc/make-stds.texi b/doc/make-stds.texi
index 132476c7..0da9f28d 100644
--- a/doc/make-stds.texi
+++ b/doc/make-stds.texi
@@ -504,7 +504,19 @@ files that are modified in the normal course of their use (programs
 whose purpose is to change the configuration of the system excluded).
 Those probably belong in @file{$(localstatedir)}.
 
-@item sharedstatedir
+@item distconfdir
+ The directory for installing read-only configuration data files that
+ are provided are part of a distribution (Suse, Red Hat, Debian, etc.).
+ This directory is similar to @samp{sysconfdir}, except that files placed
+ here are intended to be vendor-supplied system defaults and placed
+ in a read-only filesystem. A system administrator should override or
+ suppliment these defaults by placing them in @samp{sysconfdir}.
+
+ This directory should normally be @file{/usr/etc}, but write it as
+ @file{$(prefix)/usr/etc}.  (If you are using Autoconf, write it as
+ @samp{@@distconfdir@@}.)
+
+'@item sharedstatedir
 The directory for installing architecture-independent data files which
 the programs modify while they run.  This should normally be
 @file{/usr/local/com}, but write it as @file{$(prefix)/com}.
diff --git a/doc/standards.texi b/doc/standards.texi
index 30592c65..8713c4b4 100644
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -4254,7 +4254,7 @@ corresponding to most of the standard directory variables
 
 @example
 --prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir
---sharedstatedir --localstatedir --runstatedir
+--distconfdir --sharedstatedir --localstatedir --runstatedir
 --libdir --includedir --oldincludedir
 --datarootdir --datadir --infodir --localedir --mandir --docdir
 --htmldir --dvidir --pdfdir --psdir
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index ecda0a51..820a0507 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -600,6 +600,7 @@ AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
 AC_SUBST([datarootdir],['${prefix}/share'])dnl
 AC_SUBST([datadir],['${datarootdir}'])dnl
 AC_SUBST([sysconfdir], ['${p

Re: time for Autoconf 2.72 (was: On time64 and Large File Support)

2023-02-06 Thread Zack Weinberg
On the subject of Debian, we could probably get an RC into experimental and ask 
for archive rebuilds and say that we were hoping to get 2.72 approved for a 
bookworm stable update.

zw

On Fri, Feb 3, 2023, at 2:43 AM, Frederic Berat wrote:
> Hi,
> 
> I'm also in favor of an RC release, I can then rebuild Fedora packages using 
> the tarball from the tester list and do some kind of A/B testing.
> 
> Fred.
> 
> On Fri, Feb 3, 2023 at 6:50 AM Sam James  wrote:
>> 
>> 
>> > On 2 Feb 2023, at 23:17, Zack Weinberg  wrote:
>> > 
>> > Due to a series of crises with my day job, the earliest I can promise to 
>> > do _anything_ Autoconf related is early March. If you have time to make a 
>> > release before then, please do not wait for me.
>> > 
>> 
>> Sorry to hear Zack, hope you're doing ok. I think your input on the issues 
>> we've been talking about has been enough
>> for us to each a good position for now.
>> 
>> Paul in particular, please let me know if there's something I can do to 
>> help. I'm already giving it the standard rounds of usage
>> in Gentoo. Perhaps we could tag an RC and shove it into the platform-testers 
>> list? It's non-commital so while I'd like
>> to move forward before March for the final release, if in the event you 
>> didn't feel comfortable doing that,
>> we'd at least have made some progress.
>> 
>> Best,
>> sa


Re: time for Autoconf 2.72 (was: On time64 and Large File Support)

2023-02-06 Thread Marko Lindqvist
On Mon, 6 Feb 2023 at 19:23, Zack Weinberg  wrote:

> On the subject of Debian, we could probably get an RC into experimental
> and ask for archive rebuilds and say that we were hoping to get 2.72
> approved for a bookworm stable update.
>
> zw
>

Even with the stage of the Debian freeze (at the time RC would come out)?
https://release.debian.org/bookworm/freeze_policy.html


 - ML


Re: time for Autoconf 2.72 (was: On time64 and Large File Support)

2023-02-06 Thread Zack Weinberg
On Mon, Feb 6, 2023, at 12:34 PM, Marko Lindqvist wrote:
> On Mon, 6 Feb 2023 at 19:23, Zack Weinberg  wrote:
>> __
>> On the subject of Debian, we could probably get an RC into experimental and 
>> ask for archive rebuilds and say that we were hoping to get 2.72 approved 
>> for a bookworm stable update.
>> 
>> zw
> 
> Even with the stage of the Debian freeze (at the time RC would come out)? 
> https://release.debian.org/bookworm/freeze_policy.html

A Debian "stable update" is not the stable release itself, it's a pile of 
bugfixes that comes out every couple months during the lifetime of that 
release.  It's _unusual_ to put a new upstream feature release into a stable 
update, but not unheard of, and "better support for compilers that default 
disable old-style function definitions" might be sufficient justification.

In any case there should be no problem at all getting it into experimental.  
"New exciting upstream release that developers would like to play with despite 
a release freeze" is what experimental is _for_.

zw