public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: "Moessbauer, Felix" <felix.moessbauer@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
Subject: Re: [PATCH 2/5] ccache: fix CCACHE_DIR owner for sbuild
Date: Wed, 8 Feb 2023 10:15:01 +0200	[thread overview]
Message-ID: <49d566f3-51b4-b168-b605-6ec8e7f5e0b4@ilbers.de> (raw)
In-Reply-To: <cd4882a9ae400c8efc17e745bf554ec0ed18b4c3.camel@siemens.com>


12/01/2023 12:00, Moessbauer, Felix wrote:
> On Mon, 2022-12-19 at 17:29 +0300, Anton Mikanovich wrote:
>> If CCACHE_DIR do not exist before sbuild execution it is created with
>> root
>> privelegies. This results in permissions issues during the next usage
>> by the
>> imager. Create CCACHE_DIR before sbuild to fix that.
>>
>> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
>> ---
>>   meta/classes/sbuild.bbclass | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes/sbuild.bbclass
>> b/meta/classes/sbuild.bbclass
>> index a29b745b..b49eae79 100644
>> --- a/meta/classes/sbuild.bbclass
>> +++ b/meta/classes/sbuild.bbclass
>> @@ -129,6 +129,7 @@ EOSUDO
>>   }
>>   
>>   schroot_configure_ccache() {
>> +    [ ! -e ${CCACHE_DIR} ] && mkdir -p ${CCACHE_DIR}
> This line creates the ccache folder as root user.

Why? It is placed outside sudo section, so should be executed from the 
current
user.

> A couple lines below we find the following:
>
> install --group=sbuild --mode=2775 -d ${CCACHE_DIR}
>
> If I read the code correctly, this line has no effect anymore, as the
> mkdir is always executed first (and with incorrect permissions).

This one should be probably removed.
Not sure why mode setting do not help here.
> Felix
>
>>       sudo -s <<'EOSUDO'
>>           set -e
>>   
>> -- 
>> 2.17.1
>>


  reply	other threads:[~2023-02-08  8:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 14:29 [PATCH 0/5] Fix ccache issues Anton Mikanovich
2022-12-19 14:29 ` [PATCH 1/5] ccache: fix dirs creation Anton Mikanovich
2022-12-19 15:21   ` Henning Schild
2023-02-08  8:01     ` Anton Mikanovich
2022-12-20  2:39   ` Moessbauer, Felix
2022-12-19 14:29 ` [PATCH 2/5] ccache: fix CCACHE_DIR owner for sbuild Anton Mikanovich
2022-12-19 15:23   ` Henning Schild
2022-12-20  2:40     ` Moessbauer, Felix
2023-01-12 10:00   ` Moessbauer, Felix
2023-02-08  8:15     ` Anton Mikanovich [this message]
2022-12-19 14:29 ` [PATCH 3/5] dpkg-base: remove deprecated code Anton Mikanovich
2022-12-19 14:29 ` [PATCH 4/5] meta: unify cross selection Anton Mikanovich
2022-12-20  2:49   ` Moessbauer, Felix
2022-12-19 14:29 ` [PATCH 5/5] ccache: separate cache based on cross compile Anton Mikanovich
2022-12-20  2:59   ` Moessbauer, Felix
2023-01-11  6:49 ` [PATCH 0/5] Fix ccache issues Moessbauer, Felix

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=49d566f3-51b4-b168-b605-6ec8e7f5e0b4@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=adriaan.schmidt@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.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