public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested
Date: Wed, 16 Jan 2019 16:24:20 +0100	[thread overview]
Message-ID: <20190116162420.3cadec9a@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <39793b3d-d5c5-4bc4-d16a-7aff13baaa5f@siemens.com>

Am Wed, 16 Jan 2019 13:11:47 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 16.01.19 10:41, Henning Schild wrote:
> > Am Wed, 16 Jan 2019 06:32:14 +0100
> > schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> >   
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> 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 <henning.schild@siemens.com>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>   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?

Henning

> 
> would be pointless but always correct.
> 
> Jan
> 


  reply	other threads:[~2019-01-16 15:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  5:32 [PATCH v3 00/14] Vacation hacks & more Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 01/14] dpkg-raw: Respect file permissions defined by recipe if requested Jan Kiszka
2019-01-16  9:41   ` Henning Schild
2019-01-16 12:11     ` Jan Kiszka
2019-01-16 15:24       ` Henning Schild [this message]
2019-01-16 19:09         ` Jan Kiszka
2019-01-18  9:01           ` Henning Schild
2019-01-16  5:32 ` [PATCH v3 02/14] bootimg-efi-isar: Run grub-mkimage without own config Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 03/14] bootimg-efi-isar: Retrieve boot disk during runtime Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 04/14] isar-cfg-localepurge: Also set /etc/default/locale Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 05/14] Fix LIC_FILES_CHKSUM paths Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 06/14] Move repo variables to proper conf file Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 07/14] Move debian distro conf files to meta Jan Kiszka
2019-01-17 16:34   ` Maxim Yu. Osipov
2019-01-16  5:32 ` [PATCH v3 08/14] bootimg-efi-isar: Fix serial console setup for grub Jan Kiszka
2019-01-16  9:47   ` Henning Schild
2019-01-16 12:17     ` Jan Kiszka
2021-09-01  9:11   ` Henning Schild
2021-09-01 10:02     ` Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 09/14] bootimg-efi-isar: Reformat generated grub.cfg Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 10/14] scripts: Add rpm2cpio.sh Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 11/14] rootfs-u-boot: Handle empty kernel command line appendix Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 12/14] bitbake.conf: Clean up and enhance OVERRIDES Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 13/14] linux-module: Simplify interface to module makefiles Jan Kiszka
2019-01-16  5:32 ` [PATCH v3 14/14] example-module: Use simplified custom module interface Jan Kiszka
2019-01-18  7:53 ` [PATCH v3 00/14] Vacation hacks & more Maxim Yu. Osipov

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=20190116162420.3cadec9a@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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