diff mbox series

[4/4] ntp: set CONFIG_SITE in do_compile

Message ID 20250124143401.1635224-4-ross.burton@arm.com
State New
Headers show
Series [1/4] ncftp: update for autoconf changes in core | expand

Commit Message

Ross Burton Jan. 24, 2025, 2:34 p.m. UTC
Recent changes in to the autotools class in core means that it no longer
sets CONFIG_SITE for compile tasks.  However, ntp decides to reconfigure
itself mid-build, so the CONFIG_SITE values are lost.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Khem Raj Jan. 24, 2025, 5:12 p.m. UTC | #1
On Fri, Jan 24, 2025 at 6:34 AM Ross Burton via lists.openembedded.org
<ross.burton=arm.com@lists.openembedded.org> wrote:

> Recent changes in to the autotools class in core means that it no longer
> sets CONFIG_SITE for compile tasks.  However, ntp decides to reconfigure
> itself mid-build, so the CONFIG_SITE values are lost.
>

This looks ok but larger question is have we looked at other recipes which
maybe doing this eg I remember gcc and binutils do call configure scripts
doing make

What is the advantage of hiding site config from compile tasks ?

>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
> b/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
> index 302cf9915f..6fae993482 100644
> --- a/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
> +++ b/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
> @@ -55,6 +55,11 @@ CVE_STATUS_NTP = " \
>
>  inherit autotools update-rc.d useradd systemd pkgconfig
>
> +# For some reason this recipe reconfigures the nested configure.ac files
> in
> +# do_compile because libtool.m4 is newer than aclocal.m4, and that then
> +# doesn't know about the site configuration.
> +do_compile[prefuncs] += "autotools_sitefiles"
> +
>  # The ac_cv_header_readline_history is to stop ntpdc depending on either
>  # readline or curses
>  EXTRA_OECONF += "--with-net-snmp-config=no \
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#115065):
> https://lists.openembedded.org/g/openembedded-devel/message/115065
> Mute This Topic: https://lists.openembedded.org/mt/110790899/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Ross Burton Jan. 24, 2025, 7:09 p.m. UTC | #2
On 24 Jan 2025, at 17:12, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Jan 24, 2025 at 6:34 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote:
> Recent changes in to the autotools class in core means that it no longer
> sets CONFIG_SITE for compile tasks.  However, ntp decides to reconfigure
> itself mid-build, so the CONFIG_SITE values are lost.
> 
> This looks ok but larger question is have we looked at other recipes which maybe doing this eg I remember gcc and binutils do call configure scripts doing make 
> 
> What is the advantage of hiding site config from compile tasks ?

My main reason was “why the hell are people running configure in do_compile, that’s broken and should be fixed”.

If you have a world build to hand it would be interesting to see how many compile logs have a reconfigure in.

Ross
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
index 302cf9915f..6fae993482 100644
--- a/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
+++ b/meta-networking/recipes-support/ntp/ntp_4.2.8p18.bb
@@ -55,6 +55,11 @@  CVE_STATUS_NTP = " \
 
 inherit autotools update-rc.d useradd systemd pkgconfig
 
+# For some reason this recipe reconfigures the nested configure.ac files in
+# do_compile because libtool.m4 is newer than aclocal.m4, and that then
+# doesn't know about the site configuration.
+do_compile[prefuncs] += "autotools_sitefiles"
+
 # The ac_cv_header_readline_history is to stop ntpdc depending on either
 # readline or curses
 EXTRA_OECONF += "--with-net-snmp-config=no \