Patchwork [RFC/PATCH,3/4] busybox: ensure $(BUSYBOX_BUILD_CONFIG) is writable

login
register
mail settings
Submitter Nathan Lynch
Date June 18, 2012, 3:02 p.m.
Message ID <1340031743-29694-4-git-send-email-ntl@pobox.com>
Download mbox | patch
Permalink /patch/165479/
State Changes Requested
Delegated to: Yann E. MORIN
Headers show

Comments

Nathan Lynch - June 18, 2012, 3:02 p.m.
If $(BUSYBOX_CONFIG_FILE) is read-only, the sed fixups to
$(BUSYBOX_BUILD_CONFIG) fail.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
 package/busybox/busybox.mk |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Arnout Vandecappelle - June 20, 2012, 11:13 p.m.
On 06/18/12 17:02, Nathan Lynch wrote:
> If $(BUSYBOX_CONFIG_FILE) is read-only, the sed fixups to
> $(BUSYBOX_BUILD_CONFIG) fail.
>
> Signed-off-by: Nathan Lynch<ntl@pobox.com>
> ---
>   package/busybox/busybox.mk |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 1d988f8..50a612f 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -115,7 +115,8 @@ endef
>   endif
>
>   define BUSYBOX_COPY_CONFIG
> -	cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG)
> +	cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG)&&  \
> +		chmod u+w $(BUSYBOX_BUILD_CONFIG)

  Just put it on two lines, without the && \ connector.


  Regards,
  Arnout

Patch

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 1d988f8..50a612f 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -115,7 +115,8 @@  endef
 endif
 
 define BUSYBOX_COPY_CONFIG
-	cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG)
+	cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG) && \
+		chmod u+w $(BUSYBOX_BUILD_CONFIG)
 endef
 
 # Disable shadow passwords support if unsupported by the C library