All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Norbert Lange <nolange79@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 2/7] pkg-autotools: optimistically set runstatedir
Date: Sat, 10 Sep 2022 14:35:38 +0200	[thread overview]
Message-ID: <20220910123538.GJ1585594@scaer> (raw)
In-Reply-To: <20220222102211.74573-3-nolange79@gmail.com>

Norbert, All,

On 2022-02-22 11:22 +0100, Norbert Lange spake thusly:
> since Autotools 2.70 there is an option to set the
> runstatedir. To support configure scripts using older version,
> the variable is set directly instead of using the --runstatedir
> argument.
> 
> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
>  package/pkg-autotools.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 717ff81593..b6224b349d 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -187,6 +187,7 @@ define $(2)_CONFIGURE_CMDS
>  		--exec-prefix=/usr \
>  		--sysconfdir=/etc \
>  		--localstatedir=/var \
> +		runstatedir=/run \

We have unfortunately had to revert this change as well as all the
various hacke we tried to fix it, for various reasons (list below
serving as a memo for the futur):

 1. --runstatedir only appeared in autotools 2.69b, and we still have
    packages that were autoconf-ed with previous versions, and thus
    do not support the option;

So we tried with passing it as a variable assignment, but...

 2. passing runstatedir=/path as a variable assignment on the command
    line actually breaks packages with very old autotools versions, like
    2.13, which get confused as they believe this is specifying the
    host;

So we got back to an option, but only if we could grep it in the
configure script; yet...

 3. packages that do recognise --runstatedir in their top-level
    configure script, may still break with configure scripts in
    sub-directories, written with older autoconf vrsions, so back to
    square one.

Given that we are nearing the release, given that FHS 3.15 does
acknowledge that /var/run can continue to exist for backward
compatibility, and that it suggests individual programs (not whole
systems!) to only use one or the other, we should just continue to
support /var/run (if at least for binary-only cruft that may still be
lying around and need /var/run anyway).

As a consequence, not having a generic solution to pass --runstatedir
(or an equivalent) is not a blocker, and is not a regression either.

Sure, having it would be better, but we can't make it work reasonably
well for now.

So, here is a brain-dmup of some thoughts about that (stil just thinking
about autotools here):

  - packages that actually want to access runstatedir will have a way to
    specify it, be it the option or the variable assignment, or even
    something else;

  - packages that have neither the option nor the variable, would most
    probably not need to access runstatedir at all.

As a consequence, what are the odds that a package needs runstatedir?
Are they legion, or are they few? If they are relatively few, then we
can just add the applicable solution (option or variable) on a
per-package basis.

And I think this is most probably the simplest and most efficient
solution, as we can't have a generic one.

Unless we can come with a much clever solution...

Speaking of cleverness: Peter suggested checking for --runstatedir
recursively in all configure scripts, and only pass it if they all
suport it.

However, I think this might be incorrect: the top-level configure script
could support it, and the package needs it, but sub-configures may not
support it (or there is a file named configure in a sub-dir, which is
not an actual configure script (or is not needed), in which case we
would miss the opportunity for the generic solution, and we'd be back on
a per-package _CONF_OPTS...

So, I'm still thinking the per-package _CONF_OPTS is way better
overall...

Untill we can get a better solution, or all upstream packages have been
fixed and bumped in Buildroot... :-]

Thanks for the initial patch! We tried, it did not work, we reverted.

Regards,
Yann E. MORIN.

>  		--program-prefix="" \
>  		--disable-gtk-doc \
>  		--disable-gtk-doc-html \
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-09-10 12:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 10:22 [Buildroot] Patch series Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 1/7] package/pkg-cmake.mk: use /run as runtime path Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 2/7] pkg-autotools: optimistically set runstatedir Norbert Lange
2022-09-10 12:35   ` Yann E. MORIN [this message]
2022-02-22 10:22 ` [Buildroot] [PATCH v3 3/7] package/systemd: use current tool for generating HWDB Norbert Lange
2022-07-28 19:09   ` Arnout Vandecappelle
2022-02-22 10:22 ` [Buildroot] [PATCH v3 4/7] package/systemd: remove hwdb-update service Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 5/7] Makefile: remove /usr/lib/rpm directory on target Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 6/7] package/zsh: Enable dynamic modules Norbert Lange
2022-07-28 19:14   ` Arnout Vandecappelle
2022-02-22 10:22 ` [Buildroot] [PATCH v3 7/7] package/zsh: enable static regex module Norbert Lange
2022-07-28 19:16   ` Arnout Vandecappelle
2022-07-28 19:05 ` [Buildroot] Patch series Arnout Vandecappelle
2022-07-29  8:00   ` Norbert Lange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220910123538.GJ1585594@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=nolange79@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.