* [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable
2013-11-14 18:46 [Buildroot] [pull request v2] Pull request for branch yem/patchwork Yann E. MORIN
@ 2013-11-14 18:46 ` Yann E. MORIN
2014-01-28 0:31 ` Danomi Manchego
2013-11-14 18:46 ` [Buildroot] [PATCH 2/5] busybox: ensure $(BUSYBOX_BUILD_CONFIG) " Yann E. MORIN
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2013-11-14 18:46 UTC (permalink / raw)
To: buildroot
From: Nathan Lynch <ntl@pobox.com>
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).
Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
suggested by Arnout; clarify commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index c7a0a6d..b2b962c 100644
--- a/Makefile
+++ b/Makefile
@@ -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
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable
2013-11-14 18:46 ` [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable Yann E. MORIN
@ 2014-01-28 0:31 ` Danomi Manchego
2014-01-28 18:25 ` Yann E. MORIN
0 siblings, 1 reply; 11+ messages in thread
From: Danomi Manchego @ 2014-01-28 0:31 UTC (permalink / raw)
To: buildroot
Yann, Nathan,
On Thu, Nov 14, 2013 at 1:46 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> From: Nathan Lynch <ntl@pobox.com>
>
> 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).
>
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
> [yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
> suggested by Arnout; clarify commit log]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c7a0a6d..b2b962c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
>
> _______________________________________________
> 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 -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable
2014-01-28 0:31 ` Danomi Manchego
@ 2014-01-28 18:25 ` Yann E. MORIN
2014-01-28 18:37 ` Danomi Manchego
0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2014-01-28 18:25 UTC (permalink / raw)
To: buildroot
Danomi, All,
On 2014-01-27 19:31 -0500, Danomi Manchego spake thusly:
> On Thu, Nov 14, 2013 at 1:46 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > From: Nathan Lynch <ntl@pobox.com>
> >
> > 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).
> >
> > Signed-off-by: Nathan Lynch <ntl@pobox.com>
> > [yann.morin.1998 at free.fr: we use rsync now, not cp; --chmod=Du+w
> > suggested by Arnout; clarify commit log]
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Arnout Vandecappelle <arnout@mind.be>
> > ---
> > Makefile | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index c7a0a6d..b2b962c 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -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
> >
> > _______________________________________________
> > 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.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable
2014-01-28 18:25 ` Yann E. MORIN
@ 2014-01-28 18:37 ` Danomi Manchego
0 siblings, 0 replies; 11+ messages in thread
From: Danomi Manchego @ 2014-01-28 18:37 UTC (permalink / raw)
To: buildroot
On Tue, Jan 28, 2014 at 1:25 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> 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.
> 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 -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/5] busybox: ensure $(BUSYBOX_BUILD_CONFIG) is writable
2013-11-14 18:46 [Buildroot] [pull request v2] Pull request for branch yem/patchwork Yann E. MORIN
2013-11-14 18:46 ` [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable Yann E. MORIN
@ 2013-11-14 18:46 ` Yann E. MORIN
2013-11-14 18:46 ` [Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig " Yann E. MORIN
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2013-11-14 18:46 UTC (permalink / raw)
To: buildroot
From: Nathan Lynch <ntl@pobox.com>
If $(BUSYBOX_CONFIG_FILE) is read-only (eg. because Buildroot's
source dir is), the sed fixups to $(BUSYBOX_BUILD_CONFIG) fail.
Fixes: #4363
Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
package/busybox/busybox.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index ad8bdaf..8d40bca 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -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
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig is writable
2013-11-14 18:46 [Buildroot] [pull request v2] Pull request for branch yem/patchwork Yann E. MORIN
2013-11-14 18:46 ` [Buildroot] [PATCH 1/5] target: ensure target/ dir is writable Yann E. MORIN
2013-11-14 18:46 ` [Buildroot] [PATCH 2/5] busybox: ensure $(BUSYBOX_BUILD_CONFIG) " Yann E. MORIN
@ 2013-11-14 18:46 ` Yann E. MORIN
2013-11-14 19:24 ` Danomi Manchego
2013-11-14 18:46 ` [Buildroot] [PATCH 4/5] package/uClibc: ensure .oldconfig " Yann E. MORIN
2013-11-14 18:46 ` [Buildroot] [PATCH 5/5] fs: ensure $(TARGET_DIR_WARNING_FILE) " Yann E. MORIN
4 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2013-11-14 18:46 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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
Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp, don't 'rm -f']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
linux/linux.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index 33931e5..fcaf7a9 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -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),
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig is writable
2013-11-14 18:46 ` [Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig " Yann E. MORIN
@ 2013-11-14 19:24 ` Danomi Manchego
0 siblings, 0 replies; 11+ messages in thread
From: Danomi Manchego @ 2013-11-14 19:24 UTC (permalink / raw)
To: buildroot
On Thu, Nov 14, 2013 at 1:46 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> 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
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
> [yann.morin.1998 at free.fr: use $(INSTALL) instead of cp, don't 'rm -f']
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
nitpick: "because" is misspelled.
Danomi -
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 4/5] package/uClibc: ensure .oldconfig is writable
2013-11-14 18:46 [Buildroot] [pull request v2] Pull request for branch yem/patchwork Yann E. MORIN
` (2 preceding siblings ...)
2013-11-14 18:46 ` [Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig " Yann E. MORIN
@ 2013-11-14 18:46 ` Yann E. MORIN
2013-11-15 8:18 ` Thomas Petazzoni
2013-11-14 18:46 ` [Buildroot] [PATCH 5/5] fs: ensure $(TARGET_DIR_WARNING_FILE) " Yann E. MORIN
4 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2013-11-14 18:46 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
If $(UCLIBC_CONFIG_FILE) is read-only (eg. because Buildroot's
source dir is), the sed fixups to .oldconfig fail.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/uclibc/uclibc.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 20d3bb6..fca83fc 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -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))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 5/5] fs: ensure $(TARGET_DIR_WARNING_FILE) is writable
2013-11-14 18:46 [Buildroot] [pull request v2] Pull request for branch yem/patchwork Yann E. MORIN
` (3 preceding siblings ...)
2013-11-14 18:46 ` [Buildroot] [PATCH 4/5] package/uClibc: ensure .oldconfig " Yann E. MORIN
@ 2013-11-14 18:46 ` Yann E. MORIN
4 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2013-11-14 18:46 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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.
Reported-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Makefile | 2 +-
fs/common.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b2b962c..d9125f4 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/fs/common.mk b/fs/common.mk
index aa9d961..76d648b 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -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)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread