* [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal
@ 2025-03-13 16:21 orbea
2025-03-14 3:53 ` Eli Schwartz
0 siblings, 1 reply; 5+ messages in thread
From: orbea @ 2025-03-13 16:21 UTC (permalink / raw
To: gentoo-dev; +Cc: orbea
From: orbea <orbea@riseup.net>
When using slibtoolize it needs the /usr/share/slibtool/slibtool.m4 file
to properly create the configure script. The current method of using it
is to set AT_SYS_M4DIR in make.conf, while this works for most cases it
does not work for app-crypt/tpm2-tss which uses ACLOCAL_AMFLAGS with the
'--install' argument in Makefile.am which results in it trying to
install .m4 files to /usr/share/slibtool. This thankfully fails due to
sandbox.
To solve this problem the /usr/share/slibtool path can be directly
appended to "${T}"/aclocal/dirlist if the LIBTOOLIZE variable is set to
'slibtoolize'.
Closes: https://bugs.gentoo.org/950648
Signed-off-by: orbea <orbea@riseup.net>
---
eclass/autotools.eclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 1545b88bc4..023bedc8eb 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -382,6 +382,12 @@ eaclocal() {
${BROOT}/usr/share/aclocal
${ESYSROOT}/usr/share/aclocal
EOF
+ if [ "${LIBTOOLIZE:-}" = 'slibtoolize' ]; then
+ printf '%s\n' \
+ "${BROOT}/usr/share/slibtool" \
+ "${ESYSROOT}/usr/share/slibtool" \
+ >> "${T}"/aclocal/dirlist
+ fi
fi
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal
2025-03-13 16:21 [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal orbea
@ 2025-03-14 3:53 ` Eli Schwartz
2025-03-14 15:31 ` orbea
0 siblings, 1 reply; 5+ messages in thread
From: Eli Schwartz @ 2025-03-14 3:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1939 bytes --]
On 3/13/25 12:21 PM, orbea@riseup.net wrote:
> From: orbea <orbea@riseup.net>
>
> When using slibtoolize it needs the /usr/share/slibtool/slibtool.m4 file
> to properly create the configure script. The current method of using it
> is to set AT_SYS_M4DIR in make.conf, while this works for most cases it
> does not work for app-crypt/tpm2-tss which uses ACLOCAL_AMFLAGS with the
> '--install' argument in Makefile.am which results in it trying to
> install .m4 files to /usr/share/slibtool. This thankfully fails due to
> sandbox.
>
> To solve this problem the /usr/share/slibtool path can be directly
> appended to "${T}"/aclocal/dirlist if the LIBTOOLIZE variable is set to
> 'slibtoolize'.
>
> Closes: https://bugs.gentoo.org/950648
> Signed-off-by: orbea <orbea@riseup.net>
> ---
> eclass/autotools.eclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
> index 1545b88bc4..023bedc8eb 100644
> --- a/eclass/autotools.eclass
> +++ b/eclass/autotools.eclass
> @@ -382,6 +382,12 @@ eaclocal() {
> ${BROOT}/usr/share/aclocal
> ${ESYSROOT}/usr/share/aclocal
> EOF
> + if [ "${LIBTOOLIZE:-}" = 'slibtoolize' ]; then
> + printf '%s\n' \
> + "${BROOT}/usr/share/slibtool" \
> + "${ESYSROOT}/usr/share/slibtool" \
> + >> "${T}"/aclocal/dirlist
> + fi
> fi
>
> [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
I had discussed this in IRC last week with Sam. My conclusion was:
We end up running with
aclocal -I ${AT_M4DIR} -I ${AT_SYS_M4DIR} ${ACLOCAL_AMFLAGS}
--system-acdir="${T}"/aclocal
We *should* be running with this instead:
aclocal -I ${AT_M4DIR} ${ACLOCAL_AMFLAGS} -I ${AT_SYS_M4DIR}
--system-acdir="${T}"/aclocal
Slibtool is a symptom of an underlying problem which is that the eclass
has broken ordering regardless.
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal
2025-03-14 3:53 ` Eli Schwartz
@ 2025-03-14 15:31 ` orbea
2025-03-23 5:45 ` Eli Schwartz
0 siblings, 1 reply; 5+ messages in thread
From: orbea @ 2025-03-14 15:31 UTC (permalink / raw
To: gentoo-dev
On Thu, 13 Mar 2025 23:53:34 -0400
Eli Schwartz <eschwartz@gentoo.org> wrote:
> On 3/13/25 12:21 PM, orbea@riseup.net wrote:
> > From: orbea <orbea@riseup.net>
> >
> > When using slibtoolize it needs the /usr/share/slibtool/slibtool.m4
> > file to properly create the configure script. The current method of
> > using it is to set AT_SYS_M4DIR in make.conf, while this works for
> > most cases it does not work for app-crypt/tpm2-tss which uses
> > ACLOCAL_AMFLAGS with the '--install' argument in Makefile.am which
> > results in it trying to install .m4 files to /usr/share/slibtool.
> > This thankfully fails due to sandbox.
> >
> > To solve this problem the /usr/share/slibtool path can be directly
> > appended to "${T}"/aclocal/dirlist if the LIBTOOLIZE variable is
> > set to 'slibtoolize'.
> >
> > Closes: https://bugs.gentoo.org/950648
> > Signed-off-by: orbea <orbea@riseup.net>
> > ---
> > eclass/autotools.eclass | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
> > index 1545b88bc4..023bedc8eb 100644
> > --- a/eclass/autotools.eclass
> > +++ b/eclass/autotools.eclass
> > @@ -382,6 +382,12 @@ eaclocal() {
> > ${BROOT}/usr/share/aclocal
> > ${ESYSROOT}/usr/share/aclocal
> > EOF
> > + if [ "${LIBTOOLIZE:-}" = 'slibtoolize' ]; then
> > + printf '%s\n' \
> > + "${BROOT}/usr/share/slibtool" \
> > + "${ESYSROOT}/usr/share/slibtool" \
> > + >> "${T}"/aclocal/dirlist
> > + fi
> > fi
> >
> > [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal'
> > aclocal.m4) ]] && \
>
>
> I had discussed this in IRC last week with Sam. My conclusion was:
>
> We end up running with
>
> aclocal -I ${AT_M4DIR} -I ${AT_SYS_M4DIR} ${ACLOCAL_AMFLAGS}
> --system-acdir="${T}"/aclocal
>
> We *should* be running with this instead:
>
>
> aclocal -I ${AT_M4DIR} ${ACLOCAL_AMFLAGS} -I ${AT_SYS_M4DIR}
> --system-acdir="${T}"/aclocal
The trivial change which does work for tpm2-tss would be to change it
to:
aclocal -I ${AT_M4DIR} ${ACLOCAL_AMFLAGS} --system-acdir="${T}"/aclocal
-I ${AT_SYS_M4DIR}
Changing it as you suggested I think would be significantly more
complicated and would require refactoring the eclass.
However I wonder if my patch still has merit since in the case of
slibtoolize it only needs to be set for aclocal and not all the other
tools that are executed during eautoreconf? Although including it
everywhere doesn't seem to cause any problems yet either.
>
>
> Slibtool is a symptom of an underlying problem which is that the
> eclass has broken ordering regardless.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal
2025-03-14 15:31 ` orbea
@ 2025-03-23 5:45 ` Eli Schwartz
2025-03-24 2:10 ` Sam James
0 siblings, 1 reply; 5+ messages in thread
From: Eli Schwartz @ 2025-03-23 5:45 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1387 bytes --]
On 3/14/25 11:31 AM, orbea wrote:
> Changing it as you suggested I think would be significantly more
> complicated and would require refactoring the eclass.
Yes, it's unfortunately the type of thing that would be a somewhat
involved change. :(
> However I wonder if my patch still has merit since in the case of
> slibtoolize it only needs to be set for aclocal and not all the other
> tools that are executed during eautoreconf? Although including it
> everywhere doesn't seem to cause any problems yet either.
Not sure I understand what you mean. :) This is only used for aclocal
either way.
And your patch is I think fundamentally correct.
The externally injected AT_SYS_M4DIR documented in the wiki is an
understandable hack but nonetheless a *hack* and we should move away
from it by treating slibtool the same as our generic aclocal handling.
That's true even though I'd *also* like to see AT_SYS_M4DIR unbroken. It
is nominally for "cases such as slibtool but where the user / system
integrator has added it in ways ::gentoo cannot predict", but given
slibtool is packaged in ::gentoo it is eminently reasonable to just
include it directly in the list.
...
Hmm, now that makes me think. Sam, maybe we can fix AT_SYS_M4DIR by
making it not get passed as -I but instead get concatenated into
${T}/aclocal/dirlist
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal
2025-03-23 5:45 ` Eli Schwartz
@ 2025-03-24 2:10 ` Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2025-03-24 2:10 UTC (permalink / raw
To: Eli Schwartz; +Cc: gentoo-dev
Eli Schwartz <eschwartz@gentoo.org> writes:
> On 3/14/25 11:31 AM, orbea wrote:
>> Changing it as you suggested I think would be significantly more
>> complicated and would require refactoring the eclass.
>
>
> Yes, it's unfortunately the type of thing that would be a somewhat
> involved change. :(
>
>
>> However I wonder if my patch still has merit since in the case of
>> slibtoolize it only needs to be set for aclocal and not all the other
>> tools that are executed during eautoreconf? Although including it
>> everywhere doesn't seem to cause any problems yet either.
>
>
> Not sure I understand what you mean. :) This is only used for aclocal
> either way.
>
> And your patch is I think fundamentally correct.
>
> The externally injected AT_SYS_M4DIR documented in the wiki is an
> understandable hack but nonetheless a *hack* and we should move away
> from it by treating slibtool the same as our generic aclocal handling.
>
> That's true even though I'd *also* like to see AT_SYS_M4DIR unbroken. It
> is nominally for "cases such as slibtool but where the user / system
> integrator has added it in ways ::gentoo cannot predict", but given
> slibtool is packaged in ::gentoo it is eminently reasonable to just
> include it directly in the list.
>
> ...
>
> Hmm, now that makes me think. Sam, maybe we can fix AT_SYS_M4DIR by
> making it not get passed as -I but instead get concatenated into
> ${T}/aclocal/dirlist
I agree, and I think it was an oversight to not do that when introducing
it...
Eli or orbea, do you want to send a patch for that (on top of this one)?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-24 2:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-13 16:21 [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for aclocal orbea
2025-03-14 3:53 ` Eli Schwartz
2025-03-14 15:31 ` orbea
2025-03-23 5:45 ` Eli Schwartz
2025-03-24 2:10 ` Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox