Skip to contentSkip to conversation

busybox/uclibc: copy config file from configure step

PATCH New Thomas De Schampheleire 2 participants 6 messages Feb 13, 2014 – Feb 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox/uclibc: copy config file from configure step

This patch series changes busybox and uclibc to copy the .config file from the configure step, and not earlier (patch or extract step). This fixes the usage of OVERRIDE_SRCDIR with these packages.

This was reported for busybox in bug #5030.

---
 package/busybox/busybox.mk |  4 +---
 package/uclibc/uclibc.mk   |  3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)
#1 lore raw

PATCH 1/1 busybox: copy config file from configure iso extract step

The three typical packages that use .config files in buildroot copy the config file at different times in the build process:

busybox copies its .config from the post-extract hook. linux copies its .config in the configure_cmds. uclibc copies its .config from the post-patch hook.

Copying the .config file from the configure step is the only way to properly support an OVERRIDE_SRCDIR that does not yet have the .config file, because the extract and patch steps are skipped in that case.

For example, when setting a BUSYBOX_OVERRIDE_SRCDIR to a cleanly extracted busybox tarball:

$ make busybox-dirclean busybox
rm -Rf [..]/output/build/busybox-custom
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

busybox custom Syncing from source dir
/home/tdescham/repo/contrib/busybox-1.21.1

rsync -au --exclude .svn --exclude .git --exclude .hg --exclude .bzr

            --exclude CVS /home/tdescham/repo/contrib/busybox-1.21.1/
            [..]/output/build/busybox-custom
Quoted 1 line
Quoted 1 line
Quoted 1 line

busybox custom Configuring

/bin/sed -i -e "/\\<CONFIG_NOMMU\\>/d"
[..]/output/build/busybox-custom/.config
/bin/sed: can't read [..]/output/build/busybox-custom/.config:
No such file or directory
make: *** [[..]/output/build/busybox-custom/.stamp_configured] Error 2

This patch modifies busybox.mk to copy the config file from the configure step instead, as linux is doing, and fixing the described scenario.

This fixes bug #5030: https://bugs.busybox.net/show_bug.cgi?id=5030

---
 package/busybox/busybox.mk |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
package/busybox/busybox.mk +1 -3
@@ -180,10 +180,8 @@ define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
 endef
 endif
 
-# We do this here to avoid busting a modified .config in configure
-BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG
-
 define BUSYBOX_CONFIGURE_CMDS
+	$(BUSYBOX_COPY_CONFIG)
 	$(BUSYBOX_SET_MMU)
 	$(BUSYBOX_SET_LARGEFILE)
 	$(BUSYBOX_SET_IPV6)
#2 lore raw

PATCH 1/1 uclibc: copy config file from configure iso patch step

In reply to Thomas De Schampheleire

The three typical packages that use .config files in buildroot copy the config file at different times in the build process:

busybox copies its .config from the post-extract hook. linux copies its .config in the configure_cmds. uclibc copies its .config from the post-patch hook.

Copying the .config file from the configure step is the only way to properly support an OVERRIDE_SRCDIR that does not yet have the .config file, because the extract and patch steps are skipped in that case.

In a previous patch, the situation was already fixed for busybox. This patch applies the same fix to uclibc: copy the config file from the configure step, as linux is doing.

---
 package/uclibc/uclibc.mk |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
package/uclibc/uclibc.mk +1 -2
@@ -453,9 +453,8 @@ define UCLIBC_SETUP_DOT_CONFIG
 		oldconfig
 endef
 
-UCLIBC_POST_PATCH_HOOKS += UCLIBC_SETUP_DOT_CONFIG
-
 define UCLIBC_CONFIGURE_CMDS
+	$(UCLIBC_SETUP_DOT_CONFIG)
 	$(MAKE1) -C $(UCLIBC_DIR) \
 		$(UCLIBC_MAKE_FLAGS) \
 		PREFIX=$(STAGING_DIR) \
#3 lore raw

PATCH 1/1 busybox/uclibc: copy config file from configure step

In reply to Thomas De Schampheleire
Quoted 5 lines · Thomas De Schampheleire

This patch series changes busybox and uclibc to copy the .config file from the configure step, and not earlier (patch or extract step). This fixes the usage of OVERRIDE_SRCDIR with these packages.

Quoted 8 lines

This was reported for busybox in bug #5030.

---
 package/busybox/busybox.mk |  4 +---
 package/uclibc/uclibc.mk   |  3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

Ping... I think this could still be applied in 2014.02, as it fixes a bug and simply lines up three packages.

Thanks,
Thomas

#4 lore raw

PATCH 1/1 busybox/uclibc: copy config file from configure step

In reply to Thomas De Schampheleire
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

This patch series changes busybox and uclibc to copy the .config file from the configure step, and not earlier (patch or extract step). This fixes the usage of OVERRIDE_SRCDIR with these packages.

This was reported for busybox in bug #5030.

Committed series, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 busybox/uclibc: copy config file from configure step

Quoted 11 lines · Peter Korsgaard
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

This patch series changes busybox and uclibc to copy the .config file from the configure step, and not earlier (patch or extract step). This fixes the usage of OVERRIDE_SRCDIR with these packages.

This was reported for busybox in bug #5030.

Committed series, thanks.

Thanks Peter!