Skip to contentSkip to conversation

Pull request for branch yem/patchwork

GIT PULL Superseded Yann E. MORIN 3 participants 11 messages Nov 14, 2013 – Jan 28, 2014

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

From: "Yann E. MORIN" <[email protected]>

Hello All!

This series ensures that taregt/ and our copy of busybox .config are writeable.

In case the Buildroot tree is RO (eg. shared via a read-only NFS mount), target/ would end-up read-only, which is a bit awkward, since we won't be able to add files in there. Ditto for the busybox' .config file, since we need to tweak it with sed.

I've had this locally for some time now, grabbed from some patches in patchwork. A previous submission of this series has been marked as "Changes Requested", but there's no trace of it in the ML, so I'm just re-spinning them as-is for further comments.

Changes v1 -> v2:
- add three other files to the list (Danomi)

Regards,
Yann E. MORIN.

Regards,
Yann E. MORIN.

The following changes since commit 2b9bdcafa3d69bcc3d63d5d1d3d2ab692413b39d:

qemu/arm-nuri: bump to latest 3.10.x kernel version (2013-11-14 12:25:04 +0100)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git yem/patchwork

for you to fetch changes up to 9bc9c11ace25603f32efc9248e9a513581192f59:

  fs: ensure $(TARGET_DIR_WARNING_FILE) is writable (2013-11-14 19:41:09 +0100)

----------------------------------------------------------------
Nathan Lynch (2):
target: ensure target/ dir is writable
busybox: ensure $(BUSYBOX_BUILD_CONFIG) is writable

Yann E. MORIN (3):
linux: ensure buildroot_defconfig is writable package/uClibc: ensure .oldconfig is writable
fs: ensure $(TARGET_DIR_WARNING_FILE) is writable

 Makefile                   | 6 +++---
 fs/common.mk               | 2 +-
 linux/linux.mk             | 2 +-
 package/busybox/busybox.mk | 2 +-
 package/uclibc/uclibc.mk   | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/5 target: ensure target/ dir is writable

From: Nathan Lynch <[email protected]>

If the source target skeleton is read-only (eg. because Buildroot's source dir is), modifications to the output target (such as creating /etc/hostname and /etc/issue) fail.

(This can happen if the Buildroot source dir is NFS-mounted read-only to be shared between different machines, for example).

[yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
suggested by Arnout; clarify commit log]

Cc Arnout Vandecappelle <[email protected]>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index c7a0a6d..b2b962c 100644
@@ -433,7 +433,7 @@ RSYNC_VCS_EXCLUSIONS = \
 $(BUILD_DIR)/.root:
 	mkdir -p $(TARGET_DIR)
 	rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-		--exclude .empty --exclude '*~' \
+		--chmod=Du+w --exclude .empty --exclude '*~' \
 		$(TARGET_SKELETON)/ $(TARGET_DIR)/
 	cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
 	@ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@@ -508,7 +508,7 @@ endif
 	@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
 		$(call MESSAGE,"Copying overlay $(d)"); \
 		rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-			--exclude .empty --exclude '*~' \
+			--chmod=Du+w --exclude .empty --exclude '*~' \
 			$(d)/ $(TARGET_DIR)$(sep))
 
 	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 1/5 target: ensure target/ dir is writable

Yann, Nathan,

Quoted 43 lines · Yann E. MORIN

From: Nathan Lynch <[email protected]>

If the source target skeleton is read-only (eg. because Buildroot's source dir is), modifications to the output target (such as creating /etc/hostname and /etc/issue) fail.

(This can happen if the Buildroot source dir is NFS-mounted read-only to be shared between different machines, for example).

[yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
suggested by Arnout; clarify commit log]

Cc Arnout Vandecappelle <[email protected]>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -3
index c7a0a6d..b2b962c 100644
@@ -433,7 +433,7 @@ RSYNC_VCS_EXCLUSIONS = \
 $(BUILD_DIR)/.root:
        mkdir -p $(TARGET_DIR)
        rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-               --exclude .empty --exclude '*~' \
+               --chmod=Du+w --exclude .empty --exclude '*~' \
                $(TARGET_SKELETON)/ $(TARGET_DIR)/
        cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
        @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@@ -508,7 +508,7 @@ endif
        @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
                $(call MESSAGE,"Copying overlay $(d)"); \
                rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-                       --exclude .empty --exclude '*~' \
+                       --chmod=Du+w --exclude .empty --exclude '*~' \
                        $(d)/ $(TARGET_DIR)$(sep))
 
        @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
--

1.8.1.2

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

What happened to this series (5 patches fixing issues with RO tree)? I don't see these patches in Patchwork - did they get rejected?

Danomi -

#3 lore raw

PATCH 1/5 target: ensure target/ dir is writable

Danomi, All,

On 2014-01-27 19:31 -0500, Danomi Manchego spake thusly:

Quoted 44 lines · Yann E. MORIN
Quoted 43 lines

From: Nathan Lynch <[email protected]>

If the source target skeleton is read-only (eg. because Buildroot's source dir is), modifications to the output target (such as creating /etc/hostname and /etc/issue) fail.

(This can happen if the Buildroot source dir is NFS-mounted read-only to be shared between different machines, for example).

[yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
suggested by Arnout; clarify commit log]

Cc Arnout Vandecappelle <[email protected]>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -3
index c7a0a6d..b2b962c 100644
@@ -433,7 +433,7 @@ RSYNC_VCS_EXCLUSIONS = \
 $(BUILD_DIR)/.root:
        mkdir -p $(TARGET_DIR)
        rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-               --exclude .empty --exclude '*~' \
+               --chmod=Du+w --exclude .empty --exclude '*~' \
                $(TARGET_SKELETON)/ $(TARGET_DIR)/
        cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
        @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@@ -508,7 +508,7 @@ endif
        @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
                $(call MESSAGE,"Copying overlay $(d)"); \
                rsync -a $(RSYNC_VCS_EXCLUSIONS) \
-                       --exclude .empty --exclude '*~' \
+                       --chmod=Du+w --exclude .empty --exclude '*~' \
                        $(d)/ $(TARGET_DIR)$(sep))
 
        @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
--

1.8.1.2

Quoted 7 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

What happened to this series (5 patches fixing issues with RO tree)? I don't see these patches in Patchwork - did they get rejected?

No, I just marked them as "Changes requested" since there were some comments about them.

I still have them in my tree, I just need to refresh them, apply the requested changes, and resubmit.

One can do so much in a day... ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/5 target: ensure target/ dir is writable

Quoted 5 lines · Yann E. MORIN
Quoted 2 lines

What happened to this series (5 patches fixing issues with RO tree)? I don't see these patches in Patchwork - did they get rejected?

No, I just marked them as "Changes requested" since there were some comments about them.

Apologies - I didn't realize the patchwork view filtered by state - I see them, now that I changed the filter setting.

Quoted 4 lines

I still have them in my tree, I just need to refresh them, apply the requested changes, and resubmit.

One can do so much in a day... ;-)

Understood, thanks.

Danomi -

#5 lore raw

PATCH 2/5 busybox: ensure $(BUSYBOX_BUILD_CONFIG) is writable

In reply to Yann E. MORIN

From: Nathan Lynch <[email protected]>

If $(BUSYBOX_CONFIG_FILE) is read-only (eg. because Buildroot's source dir is), the sed fixups to $(BUSYBOX_BUILD_CONFIG) fail.

Fixes #4363
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp]
Cc Arnout Vandecappelle <[email protected]>
---
 package/busybox/busybox.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/busybox/busybox.mk +1 -1
index ad8bdaf..8d40bca 100644
@@ -135,7 +135,7 @@ endef
 endif
 
 define BUSYBOX_COPY_CONFIG
-	cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG)
+	$(INSTALL) -D -m 0644 $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG)
 endef
 
 # Disable shadow passwords support if unsupported by the C library
Signature · 1 line
1.8.1.2
#6 lore raw

PATCH 3/5 linux: ensure buildroot_defconfig is writable

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

If $(KERNEL_SOURCE_CONFIG) is read-only (eg. becasue Buildroot's source dir is), the rm of $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig will either fail, or prompt the user, both of which we want to avoid.

Make it writable by using $(INSTALL).

Fixes #4363
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp, don't 'rm -f']
---
 linux/linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux/linux.mk +1 -1
index 33931e5..fcaf7a9 100644
@@ -164,7 +164,7 @@ KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
 endif
 
 define LINUX_CONFIGURE_CMDS
-	cp $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
+	$(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(if $(BR2_arm)$(BR2_armeb),
Signature · 1 line
1.8.1.2
#7 lore raw

PATCH 3/5 linux: ensure buildroot_defconfig is writable

Quoted 6 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

If $(KERNEL_SOURCE_CONFIG) is read-only (eg. becasue Buildroot's source dir is), the rm of $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig will either fail, or prompt the user, both of which we want to avoid.

Quoted 6 lines

Make it writable by using $(INSTALL).

Fixes #4363
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp, don't 'rm -f']

nitpick: "because" is misspelled.
Danomi -

#8 lore raw

PATCH 4/5 package/uClibc: ensure .oldconfig is writable

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

If $(UCLIBC_CONFIG_FILE) is read-only (eg. because Buildroot's source dir is), the sed fixups to .oldconfig fail.

[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp]
---
 package/uclibc/uclibc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/uclibc/uclibc.mk +1 -1
index 20d3bb6..fca83fc 100644
@@ -416,7 +416,7 @@ UCLIBC_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)"
 
 define UCLIBC_SETUP_DOT_CONFIG
-	cp -f $(UCLIBC_CONFIG_FILE) $(@D)/.config
+	$(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config
 	$(call UCLIBC_OPT_SET,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D))
 	$(call UCLIBC_OPT_SET,TARGET_$(UCLIBC_TARGET_ARCH),y,$(@D))
 	$(call UCLIBC_OPT_SET,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D))
Signature · 1 line
1.8.1.2
#9 lore raw

PATCH 4/5 package/uClibc: ensure .oldconfig is writable

Dear Yann E. MORIN,

Quoted 1 line · Yann E. MORIN

source dir is), the sed fixups to .oldconfig fail.

You mention .oldconfig here (and in the commit title)

package/uclibc/uclibc.mk UCLIBC_MAKE_FLAGS = \ · line 419

Quoted 2 lines
package/uclibc/uclibc.mk +1 -1
-	cp -f $(UCLIBC_CONFIG_FILE) $(@D)/.config
+	$(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config

but it's actually .config that is taken care of :)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH 5/5 fs: ensure $(TARGET_DIR_WARNING_FILE) is writable

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

If the Buildroot tree is read-only, then $(TARGET_DIR_WARNING_FILE) is copied read-only into target/ but we may want to remove it during the build process.

This poses no real problem, since target/ itself is guaranteed to be writable, but for good measure, force $(TARGET_DIR_WARNING_FILE) to be writable itself.

---
 Makefile     | 2 +-
 fs/common.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index b2b962c..d9125f4 100644
@@ -435,7 +435,7 @@ $(BUILD_DIR)/.root:
 	rsync -a $(RSYNC_VCS_EXCLUSIONS) \
 		--chmod=Du+w --exclude .empty --exclude '*~' \
 		$(TARGET_SKELETON)/ $(TARGET_DIR)/
-	cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
+	$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
 	@ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
 	@mkdir -p $(TARGET_DIR)/usr
 	@ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
fs/common.mk +1 -1
index aa9d961..76d648b 100644
@@ -82,7 +82,7 @@ endif
 	echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
 	chmod a+x $$(FAKEROOT_SCRIPT)
 	$$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
-	cp support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
+	$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
 	- at rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
 ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
 	$$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
Signature · 1 line
1.8.1.2