From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7178866829012500480 X-Received: by 2002:a5b:884:0:b0:8ba:d0ed:4639 with SMTP id e4-20020a5b0884000000b008bad0ed4639mr300726ybq.413.1675844106273; Wed, 08 Feb 2023 00:15:06 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:5007:0:b0:888:b0d4:9553 with SMTP id e7-20020a255007000000b00888b0d49553ls5437513ybb.8.-pod-prod-gmail; Wed, 08 Feb 2023 00:15:05 -0800 (PST) X-Google-Smtp-Source: AK7set/s6ftllwvAzY+TDJ8DbXQbmENJEYl27/DtHOAJwtlH1qkLEMjfczjdT7C8oRR8heOpIeYr X-Received: by 2002:a25:9747:0:b0:861:c53b:f617 with SMTP id h7-20020a259747000000b00861c53bf617mr3863251ybo.27.1675844105523; Wed, 08 Feb 2023 00:15:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675844105; cv=none; d=google.com; s=arc-20160816; b=XqFyvryi0ZjMKVdsjdYFiDgE3QZaScnHca3XTO3UqnOcjDUQupHEtydY4CG7EZeIJX x+KsdJOFvfrZefX+Wz8qDWSss1FYqoQhX7qWdsHrVrYTgvCwGoWJlTxSTZhbNUNm4utX fVgrE0pdK1HhDGLbTMtLcWo/0f/2609lg+TKhJOiSo7+lRqbalz0XVzWR7i0RHRmJh6p ZWGHJLSR+75XP03Y1fpxCaf//7plgpLsS6t38r2xgNrbTJwv0HAbeqZOHHthdTRfxm+n lEyU+lQxPI+NxWlDbEZfZXwIBQ3oRPk9Vjc+lxBUVLMzrTkS997RMhWr2gNFdUBrWiZp UFkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id; bh=9kj5j2nc/LSvgI8vRDns6jYXjilognU+O1dPJVxe3xA=; b=x6RrRjwYWp7WIEh6+l+Dqv/GrJHa1MCMZ6yFMdXKk47Og+wyjVM0hmLnK5wI8PcS4x Nezszg6YrpghZeNA+zHjZGTLQfYJ83eGgUMGa5ghZHiJvcUIKG6Il0YltL48kKWYvUk/ fAbDqdoQ6+WFL3lLPh3+AbQAqSZxX5zOUbuR/y6/IMJyzqkxNn5j+bjM87hU5vwWx+5G OwjkiUcZGGfX6WfKtSMJWJ8iYG72WpLba1SOrgyubAsqKhruniOVO1p7z8oJqH5znk14 6U2AtKzTEvPoMfekwyH8x/vR4NbOEr9gQxK77PoDgdsWt2rQ4cQm2tFEcI5qrr0mow5r YfYQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 140-20020a250292000000b007ddb8337f72si1643815ybc.1.2023.02.08.00.15.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Feb 2023 00:15:05 -0800 (PST) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 3188F2TP013874 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 Feb 2023 09:15:03 +0100 Message-ID: <49d566f3-51b4-b168-b605-6ec8e7f5e0b4@ilbers.de> Date: Wed, 8 Feb 2023 10:15:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 2/5] ccache: fix CCACHE_DIR owner for sbuild Content-Language: en-US, ru-RU To: "Moessbauer, Felix" , "isar-users@googlegroups.com" Cc: "Schmidt, Adriaan" References: <20221219142933.12437-1-amikan@ilbers.de> <20221219142933.12437-3-amikan@ilbers.de> From: Anton Mikanovich In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: GpW2Y2w5FV9W 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 >> --- >>  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 >>