From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6646963335912751104 X-Received: by 2002:a2e:300d:: with SMTP id w13-v6mr348347ljw.16.1547802084043; Fri, 18 Jan 2019 01:01:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:42c5:: with SMTP id h66-v6ls139027ljf.7.gmail; Fri, 18 Jan 2019 01:01:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN7986Qs5hlB6kcww9hNGz2dGyVAQx5NCu7pNwIDTgDDfyNfo9+0hBU3qCuLqNNgN4WUk+0a X-Received: by 2002:a2e:8112:: with SMTP id d18-v6mr1312645ljg.10.1547802083458; Fri, 18 Jan 2019 01:01:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547802083; cv=none; d=google.com; s=arc-20160816; b=n+e6F4xVwqEHs+MHHvZiorBbx0WoTRelIrdt2O9isILr6K4N+EVkpaMd00naaWFwDU UnvDQtyhUW4d/vAMrzo9p7RvSE8fOoi0EVjCporLCLV+YA577p8VJ4lHQRAHTc/oLv68 wlpW8p21xT6TvMyqiItUd/Q9dtgP/g7jXVqY1HRVtwL82IZ95kzvuQ/S/q8oPRx85r8v kfPaxv1FRQrIhCqdhE02oRRgLT1oXUEKeRDvUIadK3SFkxRnxIQv1RuY2ZH/E8L1N6hS 0npYF7ghLqi3WSGvMAStjPj6yQyhGL+W1wQFOZV+7ol3AuNWLVqDBe9DkKTUal11qAFJ rDrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=/k0FskUcu5fSQkhuzabtJmUUN4lXuN2Hv05NcK1GsOI=; b=mKLQVAs8pvdtiwq9iKvwRKDslv8otSsxQYEUCiIVunrUEnsDgT2kFK3xkpEoy1UgMA pKkuPe/b6m208tp/BrpIbvfon5I/H1Ob4EtV1Ti344hd7zHWhbQKXS/aR/dP9wh3rxvP s8o3btqgS+GqKqBhzSyhrhJGma/9UQTLD/FBVrNKJ3v8bixjndEi94cUQVqZR3u6QPwL ExXjF+3YPCenJdtXK8djF4ZNhS9vt/jK/ukDgr35z0OmZuAOIzeoJgLpGGYkxwMs6EI9 DAO0LsN2+XoKI4EbSngnrq3rSiB4NOyEcUvP48a+5Ri+UpHnsUznQc2wizuFjE3LLamz zI/w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id e17-v6si129403ljg.5.2019.01.18.01.01.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 01:01:23 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x0I91M7g012812 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 18 Jan 2019 10:01:22 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.119]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x0I91M7M008421; Fri, 18 Jan 2019 10:01:22 +0100 Date: Fri, 18 Jan 2019 10:01:21 +0100 From: Henning Schild To: Jan Kiszka Cc: isar-users Subject: Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested Message-ID: <20190118100121.7603aec0@md1za8fc.ad001.siemens.net> In-Reply-To: References: <97edc3d29b4aaa19dbbb067e13335beda3f74447.1547616747.git.jan.kiszka@siemens.com> <20190116104138.356cd52c@md1za8fc.ad001.siemens.net> <39793b3d-d5c5-4bc4-d16a-7aff13baaa5f@siemens.com> <20190116162420.3cadec9a@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: ZDwke4gKLKtL Am Wed, 16 Jan 2019 20:09:33 +0100 schrieb Jan Kiszka : > On 16.01.19 16:24, Henning Schild wrote: > > Am Wed, 16 Jan 2019 13:11:47 +0100 > > schrieb Jan Kiszka : > > > >> On 16.01.19 10:41, Henning Schild wrote: > >>> Am Wed, 16 Jan 2019 06:32:14 +0100 > >>> schrieb Jan Kiszka : > >>> > >>>> From: Jan Kiszka > >>>> > >>>> dh_fixperms overwrites the permissions do_install may have > >>>> defined. To avoid that, allow the recipe write to define an > >>>> exception list via the PRESERVE_PERMS variable. > >>>> > >>>> Fixes: f301ccb2b5b1 ("meta/dpkg-raw: build raw packages like all > >>>> others") CC: Henning Schild > >>>> Signed-off-by: Jan Kiszka > >>>> --- > >>>> RECIPE-API-CHANGELOG.md | 7 +++++++ > >>>> meta/classes/dpkg-raw.bbclass | 9 ++++++++- > >>>> 2 files changed, 15 insertions(+), 1 deletion(-) > >>>> > >>>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > >>>> index 06a01e3..2bc1585 100644 > >>>> --- a/RECIPE-API-CHANGELOG.md > >>>> +++ b/RECIPE-API-CHANGELOG.md > >>>> @@ -124,3 +124,10 @@ updated hence recipes using them shouldn't > >>>> be impacted per se. > >>>> These packages depend on a specific kernel. Its > >>>> identification is now appended to the binary package names in > >>>> the form "-${KERNEL_NAME}". + > >>>> +### PRESERVE_PERMS needed with dpkg-raw for implicit file > >>>> permission setting + > >>>> +In order to use the same file permissions for an input file to a > >>>> dpkg-raw +package on the build machine as well as on the target, > >>>> its absolute target path +needs to be listed in the > >>>> PRESERVE_PERMS variable (space-separated list of +files). > >>>> Otherwise, default permissions are used. diff --git > >>>> a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass > >>>> index 8d11433..42276e5 100644 --- a/meta/classes/dpkg-raw.bbclass > >>>> +++ b/meta/classes/dpkg-raw.bbclass > >>>> @@ -53,12 +53,19 @@ Description: ${DESCRIPTION} > >>>> EOF > >>>> } > >>>> > >>>> +FIXPERM_EXCLUSIONS = \ > >>>> + "${@' '.join(['-X ' + x for x in \ > >>>> + (d.getVar('PRESERVE_PERMS', False) or > >>>> '').split()])}" + > >>>> deb_create_rules() { > >>>> cat << EOF > ${S}/debian/rules > >>>> #!/usr/bin/make -f > >>>> + > >>>> +override_dh_fixperms: > >>>> + dh_fixperms ${FIXPERM_EXCLUSIONS} > >>>> + > >>> > >>> This should be done only if the variable is non-empty, to keep > >>> that code generic. Also the variable name should maybe start with > >>> DH_ or DEBIAN_. > >> > >> I can change the naming, but I disagree regarding your other > >> concern: dh_fixperms is by definition the default case if there is > >> no override. Therefore > >> > >> override_dh_fixperms: > >> dh_fixperms > > > > I would not be sure. Say a later step in some layers append would > > want to set an actual override would the two conflict? > > There is no overlay method for rules files. You replace them, or > patch them knowing how the original version looks like. Exactly and if i wanted an actual override a >> would not work, because i would have to patch out the useless one first. That is why this noop should not be included. Henning > Jan >