Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 37/61] lib/oe/package: Ensure strip breaks hardlinks
Date: Wed, 18 Feb 2015 22:08:06 +0000	[thread overview]
Message-ID: <1424297286.11836.22.camel@linuxfoundation.org> (raw)
In-Reply-To: <ly8ufvf55i.fsf@ensc-virt.intern.sigma-chemnitz.de>

On Wed, 2015-02-18 at 19:25 +0100, Enrico Scholz wrote:
> Armin Kuster <akuster808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> writes:
> 
> > Normally, strip preserves hardlinks which in the case of the way our
> > hardlink rather than copy functionality works,
> 
> This breaks stripping of hardlinked files.  'package.bbclass' contains
> logic to run 'strip' only once per hardlinked file.  With this patch,
> only one instance gets stripped.
> 
> E.g. the 'e2fsprogs-mke2fs' package contains now
> 
> -rwxr-xr-x    4 root     root        350025 Feb 18 01:42 /sbin/mke2fs
> -rwxr-xr-x    4 root     root        350025 Feb 18 01:42 /sbin/mkfs.ext2
> -rwxr-xr-x    4 root     root        350025 Feb 18 01:42 /sbin/mkfs.ext3
> -rwxr-xr-x    4 root     root        350025 Feb 18 01:42 /sbin/mkfs.ext4
> -rwxr-xr-x    1 root     root         84700 Feb 18 01:42 /sbin/mkfs.ext4dev
> 
> where the first 4 programs (which are one inode with 4 hardlinks) are
> not stripped.

There is a problem here for sure. The issue is that for
space/performance reasons we hardlink the files in the sysroot with the
ones in the packaging process amongst other places. If one set gets
stripped, before this patch they'd all get stripped and the process was
not deterministic. Were the files in the sysroot stripped or unstripped
for example?

So the patch addresses a real issue.


> > -    stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
> > +    # Use mv to break hardlinks
> > +    stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
> 
> How are these files then merged again?

They're not :(. So we have a different problem introduced by the patch.
I'll give this a bit more thought overnight. We might need to implement
some code to merge these back given we already maintain the lists of
files.

Cheers,

Richard





  reply	other threads:[~2015-02-18 22:08 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 15:42 [PATCH 00/61][Dizzy-next] Feb 2015 Armin Kuster
2015-02-05 16:03 ` [PATCH 01/61] glibc: Fix up minimal build with libc-libm Armin Kuster
2015-02-05 16:03 ` [PATCH 02/61] coreutils: Fix CVE-2014-9471 Armin Kuster
2015-02-05 16:03 ` [PATCH 03/61] libxml2: fix CVE-2014-3660 Armin Kuster
2015-02-05 16:03 ` [PATCH 04/61] libxml2: Backport fix for CVE introduced entity issues Armin Kuster
2015-02-05 16:03 ` [PATCH 05/61] libunwind: Fix test case link failure on PowerPC with Altivec Armin Kuster
2015-02-05 16:03 ` [PATCH 06/61] bitbake.conf: add PKGDATA_DIR to BB_HASHBASE_WHITELIST Armin Kuster
2015-02-05 16:03 ` [PATCH 07/61] valgrind: build with altivec only if it supported Armin Kuster
2015-02-05 16:03 ` [PATCH 08/61] bitbake: cooker: Shut down the parser in error state Armin Kuster
2015-02-05 16:03 ` [PATCH 09/61] bitbake: bitbake-worker: Use setsid() rather than setpgid() Armin Kuster
2015-02-05 16:03 ` [PATCH 10/61] bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums Armin Kuster
2015-02-05 16:03 ` [PATCH 11/61] bitbake: wget: Add localpaths method which gives localpath with history Armin Kuster
2015-02-05 16:03 ` [PATCH 12/61] bitbake: ast: Add error when trying to use dash in sh function names Armin Kuster
2015-02-05 16:03 ` [PATCH 13/61] openssl: fix hard paths in native openssl Armin Kuster
2015-02-05 16:03 ` [PATCH 14/61] poky.conf: add file-rdeps to WARN_QA Armin Kuster
2015-02-05 16:03 ` [PATCH 15/61] security_flags: disable pie support for libaio, blktrace and ltp Armin Kuster
2015-02-05 16:03 ` [PATCH 16/61] systemd: add missing RDEPENDS Armin Kuster
2015-02-05 16:03 ` [PATCH 17/61] openssh: deliver ssh-copy-id Armin Kuster
2015-02-05 16:03 ` [PATCH 18/61] icecc.bbclass: properly handle disabling of icecc Armin Kuster
2015-02-05 16:03 ` [PATCH 19/61] cross-canadian/meta-environment: Allow modification of TARGET_OS to be optional Armin Kuster
2015-02-05 16:03 ` [PATCH 20/61] parted: parted-ptest RDEPENDS on python Armin Kuster
2015-02-05 16:03 ` [PATCH 21/61] pax-utils: " Armin Kuster
2015-02-05 16:03 ` [PATCH 22/61] file: CVE-2014-9620 and CVE-2014-9621 Armin Kuster
2015-02-05 16:03 ` [PATCH 23/61] package.bbclass: Fix support for private libs Armin Kuster
2015-02-05 16:03 ` [PATCH 24/61] guile: fixed installed-vs-shipped error Armin Kuster
2015-02-05 16:03 ` [PATCH 25/61] socat: forcibly disable use of libbsd Armin Kuster
2015-02-05 16:03 ` [PATCH 26/61] perf: Add libdw unwind support to perf-libunwind feature Armin Kuster
2015-02-05 16:03 ` [PATCH 27/61] perf: Disable perf-libunwind Armin Kuster
2015-02-05 16:03 ` [PATCH 28/61] dpkg: fix host contamination Armin Kuster
2015-02-05 16:03 ` [PATCH 29/61] neard: fix parallel issue Armin Kuster
2015-02-05 16:03 ` [PATCH 30/61] perl: Backport fix for bug #123591 Armin Kuster
2015-02-05 16:03 ` [PATCH 31/61] glibc: CVE-2014-9402 endless loop in getaddr_r Armin Kuster
2015-02-05 16:03 ` [PATCH 32/61] gcc: ensure target gcc headers can be included Armin Kuster
2015-02-05 16:03 ` [PATCH 33/61] boost: Avoid to use local host configuration Armin Kuster
2015-02-05 16:03 ` [PATCH 34/61] perf: fix for rebuilding Armin Kuster
2015-02-05 16:03 ` [PATCH 35/61] oeqa/utils/decorators: Try and improve ugly _ErrorHandler tracebacks Armin Kuster
2015-02-05 16:03 ` [PATCH 36/61] fix '[[: not found' error message using dash Armin Kuster
2015-02-05 16:03 ` [PATCH 37/61] lib/oe/package: Ensure strip breaks hardlinks Armin Kuster
2015-02-18 18:25   ` Enrico Scholz
2015-02-18 22:08     ` Richard Purdie [this message]
2015-02-05 16:03 ` [PATCH 38/61] bind: fix typo chown->chmod Armin Kuster
2015-02-05 16:03 ` [PATCH 39/61] distcc: fix initscript can not stop distcc daemon correctly Armin Kuster
2015-02-05 16:03 ` [PATCH 40/61] gcc/libgcc-common.inc: Add missing 'fakeroot' to two tasks Armin Kuster
2015-02-05 16:03 ` [PATCH 41/61] image_types.bbclass: fixed 'init' creation for cpio images Armin Kuster
2015-02-05 16:03 ` [PATCH 42/61] bitbake: siggen: Ensure taskdata default functions exist in base class Armin Kuster
2015-02-05 16:03 ` [PATCH 43/61] net-tools: Fix rerunning of do_patch task Armin Kuster
2015-02-05 16:03 ` [PATCH 44/61] package/prserv: Merge two similar functions into one Armin Kuster
2015-02-05 16:03 ` [PATCH 45/61] package.bbclass: Let PR server update PKGV, not PV Armin Kuster
2015-02-05 16:03 ` [PATCH 46/61] image_types.bbclass: manage 'cpio_append' directory Armin Kuster
2015-02-05 16:03 ` [PATCH 47/61] python-smartpm: Fix attemptonly builds when file conflicts occur Armin Kuster
2015-02-05 16:03 ` [PATCH 48/61] packagegroup-self-hosted: package all of Python Armin Kuster
2015-02-05 16:03 ` [PATCH 49/61] xorg-app: add x11 to required DISTRO_FEATURES and cleanup dependencies Armin Kuster
2015-02-05 16:03 ` [PATCH 50/61] yocto-bsp: Add branch to SRC_URI for custom kernels Armin Kuster
2015-02-05 16:03 ` [PATCH 51/61] python: ensure all of Python is installed in nativesdk Armin Kuster
2015-02-05 16:04 ` [PATCH 52/61] python: remove spurious nativesdk dependency Armin Kuster
2015-02-05 16:04 ` [PATCH 53/61] tzcode: update to 2015a leap second changes too Armin Kuster
2015-02-05 16:04 ` [PATCH 54/61] tzdata: update to 2015a including leap second Armin Kuster
2015-02-05 16:04 ` [PATCH 55/61] python: Disables SSLv3 Armin Kuster
2015-02-05 16:04 ` [PATCH 56/61] elfutils_0.148.bb: CVE-2014-9447 fix Armin Kuster
2015-02-05 16:04 ` [PATCH 57/61] security_flags: disable PIE on expect Armin Kuster
2015-02-05 16:04 ` [PATCH 58/61] scripts/send-error-report: Set exit code if error occurs Armin Kuster
2015-02-05 16:04 ` [PATCH 59/61] busybox: cve-2014-9645 Armin Kuster
2015-02-05 16:04 ` [PATCH 60/61] systemd: Backports fixes to 216 Armin Kuster
2015-02-05 16:04 ` [PATCH 61/61] groff: fix QA issue with rdepends Armin Kuster

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=1424297286.11836.22.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox