All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] fs: ensure hard links in TARGET_DIR are correctly copied for filesystem input
Date: Sun, 27 May 2018 23:39:57 +0200	[thread overview]
Message-ID: <20180527213957.GE2965@scaer> (raw)
In-Reply-To: <20180527204857.6081-1-peter@korsgaard.com>

Peter, All,

On 2018-05-27 22:48 +0200, Peter Korsgaard spake thusly:
> Fixes #11046
> 
> Commit bb2a57a17a7 (fs: run packages' filesystem hooks in a copy of target/)
> changed the file system logic to run file system hooks from packages on a
> copy of TARGET_DIR, and finally use this copy as input for the file system
> generation.
> 
> This copy was done with rsync, which by default does not preserve hard
> links, leading to an expansion of the file system images when hard links are
> present.
> 
> Fix it by passing the -H option to rsync (preserve hard links).
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Not sure how I was not able to reproduce the issue. But the rsync docs
say we should use it, so:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> Alternatively we can use 'cp -a' instead of rsync.
> 
>  fs/common.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/common.mk b/fs/common.mk
> index 9baf367729..abf35418cb 100644
> --- a/fs/common.mk
> +++ b/fs/common.mk
> @@ -71,7 +71,7 @@ $(ROOTFS_COMMON_TAR): $(ROOTFS_COMMON_DEPENDENCIES) target-finalize
>  	@$(call MESSAGE,"Generating common rootfs tarball")
>  	rm -rf $(FS_DIR)
>  	mkdir -p $(FS_DIR)
> -	rsync -au $(BASE_TARGET_DIR)/ $(TARGET_DIR)
> +	rsync -auH $(BASE_TARGET_DIR)/ $(TARGET_DIR)
>  	echo '#!/bin/sh' > $(FAKEROOT_SCRIPT)
>  	echo "set -e" >> $(FAKEROOT_SCRIPT)
>  	echo "chown -h -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
> -- 
> 2.11.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2018-05-27 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-27 20:48 [Buildroot] [PATCH] fs: ensure hard links in TARGET_DIR are correctly copied for filesystem input Peter Korsgaard
2018-05-27 21:39 ` Yann E. MORIN [this message]
2018-05-27 21:46 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180527213957.GE2965@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.