All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] error during cpio build failing to rm
@ 2022-03-11 17:13 Ben Dooks
  2022-03-12 16:03 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2022-03-11 17:13 UTC (permalink / raw)
  To: buildroot; +Cc: Norbert Lange

I'm getting the following error with upstream buildroot:

rm: refusing to remove '.' or '..' directory: skipping '/home/ben/project/buildrot/output/build/buildroot-fs/cpio/target/run/..'
rm: refusing to remove '.' or '..' directory: skipping '/home/ben/project/buildrot/output/build/buildroot-fs/cpio/target/tmp/..'
make: *** [fs/cpio/cpio.mk:74: /home/ben/project/buildroot/output/images/rootfs.c

I've temprarily fixed this with:

diff --git a/fs/common.mk b/fs/common.mk
index 45beb5ae7b..6bb993663f 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -186,7 +186,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)

        $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\

	                $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
			-       echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/run/.[^.]* $$(TARGET_DIR)/tmp/* $$(TARGET_DIR)/tmp/.[^.]*" >> $$(FAKEROOT_SCRIPT)
			+       echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/tmp/*" >> $$(FAKEROOT_SCRIPT)
			        $$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
				        $$(call PRINTF,$$(ROOTFS_SELINUX)) >> $$(FAKEROOT_SCRIPT)
					        $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)

It looks like this was introduced in 5e78e7e97d772124f0d31653aca33731abe5b4db

Author: Norbert Lange <nolange79@gmail.com>
Date:   Sat Jun 6 00:48:57 2020 +0200

    fs: clean the volatile /run and /tmp directories
    

Any ideas on how to fix properly?


-- 
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] error during cpio build failing to rm
  2022-03-11 17:13 [Buildroot] error during cpio build failing to rm Ben Dooks
@ 2022-03-12 16:03 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2022-03-12 16:03 UTC (permalink / raw)
  To: Ben Dooks, buildroot; +Cc: Norbert Lange



On 11/03/2022 18:13, Ben Dooks wrote:
> I'm getting the following error with upstream buildroot:
> 
> rm: refusing to remove '.' or '..' directory: skipping '/home/ben/project/buildrot/output/build/buildroot-fs/cpio/target/run/..'
> rm: refusing to remove '.' or '..' directory: skipping '/home/ben/project/buildrot/output/build/buildroot-fs/cpio/target/tmp/..'
> make: *** [fs/cpio/cpio.mk:74: /home/ben/project/buildroot/output/images/rootfs.c
> 
> I've temprarily fixed this with:
> 
> diff --git a/fs/common.mk b/fs/common.mk
> index 45beb5ae7b..6bb993663f 100644
> --- a/fs/common.mk
> +++ b/fs/common.mk
> @@ -186,7 +186,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
> 
>          $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
> 
> 	                $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
> 			-       echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/run/.[^.]* $$(TARGET_DIR)/tmp/* $$(TARGET_DIR)/tmp/.[^.]*" >> $$(FAKEROOT_SCRIPT)
> 			+       echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/tmp/*" >> $$(FAKEROOT_SCRIPT)
> 			        $$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
> 				        $$(call PRINTF,$$(ROOTFS_SELINUX)) >> $$(FAKEROOT_SCRIPT)
> 					        $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
> 
> It looks like this was introduced in 5e78e7e97d772124f0d31653aca33731abe5b4db
> 
> Author: Norbert Lange <nolange79@gmail.com>
> Date:   Sat Jun 6 00:48:57 2020 +0200
> 
>      fs: clean the volatile /run and /tmp directories
>      
> 
> Any ideas on how to fix properly?

  There's already a patch submitted [1].

  Regards,
  Arnout

[1] 
https://patchwork.ozlabs.org/project/buildroot/patch/20220310120256.GA11974@parad0x.org/


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-12 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 17:13 [Buildroot] error during cpio build failing to rm Ben Dooks
2022-03-12 16:03 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.