Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Khem Raj <raj.khem@gmail.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/3] libc-package.bbclass: Use install utility to create directories with right permissions
Date: Thu, 14 Feb 2019 06:05:38 +0000	[thread overview]
Message-ID: <532d6b9d7e8349699b24514c80ef8be9@XBOX04.axis.com> (raw)

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of Khem Raj
> Sent: den 12 februari 2019 06:48
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 2/3] libc-package.bbclass: Use install
> utility to create directories with right permissions
> 
> Could fix issues where dirs with wrong permission is created with mkdir -p
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/libc-package.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-
> package.bbclass
> index 0b4c666a74..34025635ce 100644
> --- a/meta/classes/libc-package.bbclass
> +++ b/meta/classes/libc-package.bbclass
> @@ -61,7 +61,7 @@ LOCALETREESRC ?= "${PKGD}"
>  do_prep_locale_tree() {
>  	treedir=${WORKDIR}/locale-tree
>  	rm -rf $treedir
> -	mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}
> +	install -d $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}

This does not change anything (install -d and mkdir -p does the same thing). 

>  	tar -cf - -C ${LOCALETREESRC}${datadir} -p i18n | tar -xf - -C $treedir/${datadir}
>  	# unzip to avoid parsing errors
>  	for i in $treedir/${datadir}/i18n/charmaps/*gz; do
>		gunzip $i
>	done
>	tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}

This is where the problem happens. When the files are copied from 
${LOCALETREESRC}, the ownership of $treedir${localedir} is changed to that 
of ${LOCALETREESRC}${localedir}. However, I now realized that the problem 
may be due to the fact that I have usrmerge enabled in DISTRO_FEATURES, 
which causes the above line to copy things it was never meant to copy, in 
this case ${LOCALETREESRC}${localedir}. I tried to just remove the line 
altogether and then it built just fine. But I do not know what the 
consequences are of removing it... I guess it is related to setting up an 
environment for qemu to run in, but since that seems to work fine without 
the files copied by the above line, maybe it is not needed? Or maybe it 
is just not needed when having usrmerge in DISTRO_FEATURES? I tried to 
backtrack it through the commit logs, but it was introduced with the 
do_prep_locale_tree() function, so no help there.

> --
> 2.20.1

//Peter



             reply	other threads:[~2019-02-14  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  6:05 Peter Kjellerstedt [this message]
2019-02-14 15:56 ` [PATCH 2/3] libc-package.bbclass: Use install utility to create directories with right permissions Khem Raj
2019-02-17 15:04   ` Peter Kjellerstedt
2019-02-17 19:52     ` Khem Raj
  -- strict thread matches above, loose matches on Subject: below --
2019-02-12  5:47 [PATCH 1/3] busybox: Remove PN from rdeps of PN-dev Khem Raj
2019-02-12  5:47 ` [PATCH 2/3] libc-package.bbclass: Use install utility to create directories with right permissions Khem Raj

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=532d6b9d7e8349699b24514c80ef8be9@XBOX04.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /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