diff mbox series

package/pkg-autotools.mk: only pass --runstatedir=/run if supported

Message ID 20220909154926.3965406-1-peter@korsgaard.com
State Accepted
Headers show
Series package/pkg-autotools.mk: only pass --runstatedir=/run if supported | expand

Commit Message

Peter Korsgaard Sept. 9, 2022, 3:49 p.m. UTC
Fixes:
(thttpd) http://autobuild.buildroot.net/results/f74/f74cae1d981b284a69d7a4e138faf97e45e44865/
(wipe) http://autobuild.buildroot.net/results/4dc/4dc77752d5851d8a71d234c0b284ca696e633754/

And (possibly, unable to reproduce locally):
http://autobuild.buildroot.net/results/658/65882e1f266e818fecef2892c9493d3b8e1e912e/

--runstatedir was added in autoconf 2.69b:
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=a197431414088a417b407b9b20583b2e8f7363bd

Some earlier autoconf versions (E.G. 2.13 as used by thttpd/wipe) get
confused if --runstatedir is passed, so only do so if it is supported (E.G.
present in the script).

With this change we can go back to passing --runstatedir instead of
runstatedir, so this effectively reverts commit c28b27032b926c2e
(package/pkg-autotools.mk: fix runtime path).

Suggested-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-autotools.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yann E. MORIN Sept. 9, 2022, 7:47 p.m. UTC | #1
Peter, All,

On 2022-09-09 17:49 +0200, Peter Korsgaard spake thusly:
> Fixes:
> (thttpd) http://autobuild.buildroot.net/results/f74/f74cae1d981b284a69d7a4e138faf97e45e44865/
> (wipe) http://autobuild.buildroot.net/results/4dc/4dc77752d5851d8a71d234c0b284ca696e633754/
> 
> And (possibly, unable to reproduce locally):
> http://autobuild.buildroot.net/results/658/65882e1f266e818fecef2892c9493d3b8e1e912e/
> 
> --runstatedir was added in autoconf 2.69b:
> http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=a197431414088a417b407b9b20583b2e8f7363bd
> 
> Some earlier autoconf versions (E.G. 2.13 as used by thttpd/wipe) get
> confused if --runstatedir is passed, so only do so if it is supported (E.G.
> present in the script).
> 
> With this change we can go back to passing --runstatedir instead of
> runstatedir, so this effectively reverts commit c28b27032b926c2e
> (package/pkg-autotools.mk: fix runtime path).
> 
> Suggested-by: Norbert Lange <nolange79@gmail.com>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  package/pkg-autotools.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index b6224b349d..968662ddc6 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -187,7 +187,7 @@ define $(2)_CONFIGURE_CMDS
>  		--exec-prefix=/usr \
>  		--sysconfdir=/etc \
>  		--localstatedir=/var \
> -		runstatedir=/run \
> +		`grep -q -e '--runstatedir' configure && printf '%s' --runstatedir=/run` \

This is a bit ugly, but grepping the source code is not unheard of, if
at least to know what libtool patch we need to apply. Still, this is not
very nice... :-(

Applied to master, thanks.

Regards,
Yann E. MORIN.

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

Patch

diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index b6224b349d..968662ddc6 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -187,7 +187,7 @@  define $(2)_CONFIGURE_CMDS
 		--exec-prefix=/usr \
 		--sysconfdir=/etc \
 		--localstatedir=/var \
-		runstatedir=/run \
+		`grep -q -e '--runstatedir' configure && printf '%s' --runstatedir=/run` \
 		--program-prefix="" \
 		--disable-gtk-doc \
 		--disable-gtk-doc-html \