From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] core: allow packages to declare a permission file
Date: Wed, 14 Dec 2016 17:41:28 +0100 [thread overview]
Message-ID: <20161214164128.GA3617@free.fr> (raw)
In-Reply-To: <87zijz1n1j.fsf@dell.be.48ers.dk>
Peter, All,
On 2016-12-13 23:28 +0100, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>
> > Currently, packages can define a variable that holds all the permissions
> > to set on the files it installs. This can be used to set various
> > permissions, like ownership, mode, suid/sgid/sticky bits to individual
> > files.
>
> > However, this variable has to contain entries that are known the moment
> > we scan the .mk file; it is not possible to conditionally add permisions
> > for files which presence depend on post-parse conditions.
>
> > This is the case for example for Busybox, for which we don't know whether
> > a specific applet will be enabled or not until after the configure
> > command has run.
>
> > Introduce a new variable that packages can set to point to a file that
> > contains a permission table. That filewill only be used when a filesystem
> > image is asembled, so the file can be generated, either at configure or
> > build time, with no problem.
>
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> > ---
> > Note: this will be usefull for Busybox, to properly handle the SELinux
> > contexts of the individual applets.
> > ---
> > fs/common.mk | 1 +
> > package/pkg-generic.mk | 1 +
> > 2 files changed, 2 insertions(+)
>
> > diff --git a/fs/common.mk b/fs/common.mk
> > index 7515fdc..843f7ca 100644
> > --- a/fs/common.mk
> > +++ b/fs/common.mk
> > @@ -90,6 +90,7 @@ ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
> > $$(call PRINTF,$$(PACKAGES_DEVICES_TABLE)) >> $$(FULL_DEVICE_TABLE)
> > endif
> > $$(call PRINTF,$$(PACKAGES_PERMISSIONS_TABLE)) >> $$(FULL_DEVICE_TABLE)
> > + cat $$(PACKAGES_PERMISSIONS_TABLE_FILES) >> $$(FULL_DEVICE_TABLE)
>
> We need to protect against the case where this is empty, similar to how
> we do it for the rootfs table files.
Indeed.
> Notice that you called it PACKAGES_PERMISSIONS_TABLE_FILES here and
> PACKAGES_PERMISSIONS_FILES elsewhere.
Yup, but as I said in the cover-letter, it was just to show how we could
let packages specify a permissions table rather than a in-line value.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-12-14 16:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 21:37 [Buildroot] [PATCH 0/3] core/pkg-infra: allow packages to provide permisions in a file Yann E. MORIN
2016-12-13 21:37 ` [Buildroot] [PATCH 1/3] core: allow packages to declare a permission file Yann E. MORIN
2016-12-13 22:28 ` Peter Korsgaard
2016-12-14 16:41 ` Yann E. MORIN [this message]
2016-12-13 21:37 ` [Buildroot] [PATCH 2/3] docs/manual: document FOO_PERMISSIONS_FILE Yann E. MORIN
2016-12-13 21:37 ` [Buildroot] [PATCH 3/3] [RFC] package/busybox: gneerate permissions for enabeld applets Yann E. MORIN
2016-12-13 22:32 ` Peter Korsgaard
2016-12-14 16:44 ` Yann E. MORIN
2016-12-13 22:34 ` [Buildroot] [PATCH 0/3] core/pkg-infra: allow packages to provide permisions in a file Peter Korsgaard
2016-12-14 16:42 ` Yann E. MORIN
-- strict thread matches above, loose matches on Subject: below --
2016-12-21 19:02 Yann E. MORIN
2016-12-21 19:02 ` [Buildroot] [PATCH 1/3] core: allow packages to declare a permission file Yann E. MORIN
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=20161214164128.GA3617@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.