All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérémy ROSEN" <jeremy.rosen@smile.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/php: select SYSTEMD_TMPFILES for PHP_SAPI_FPM
Date: Tue, 26 Nov 2019 18:45:38 +0100	[thread overview]
Message-ID: <CAFvCimXVERj+Gd1y-NyVvcSKYsP0iDWrSG9UORE8j56ZK5Arog@mail.gmail.com> (raw)
In-Reply-To: <20191125221009.4c31d0d6@windsurf>

systemd-tmpfiles is a small utility provided by systemd to do "file system
tweaks" early during the boot

The primary use-case is to populate /run early so everything is ready when
the "real stuff" starts but it can do all sort of things
* create files
* remove files
* write to files
* adjust file permissions/ACL..
* create nodes in /dev

systemd-tmpfiles avoids launching dozen of small processes/subshells for
small adjustment as it is don intraditionnal sysV startup files

systemd-tmpfiles configuration is drop-in based so any package can add file
in the proper directory to be sure things are created/adjusted at boot time.

moreover systemd-tmpfiles is needed to be able to dynamically load modules :
* at boot time, systemd will scan modules in /lib/modules (using modinfo)
to know all /dev nodes that unloaded modules can handle
* systemd-tmpfiles will create the corresponding nodes in /dev
* when a process opens the node, the kernel will block the process and call
udev
* udev will find the module to load (using modules.alias)
* once the module is loaded, the kernel will honor the open request and
unblock the process.

systemd-tmpfiles is not an optional part of systemd. Buildroot configures
it that way, but packages are supposed to safely assume it's there on any
systemd-based system

So I would consider it a bug to have systemd-tmpfiles be optional. I'd
rather see a patch removing that aspect entirely.

Now... if we want to keep that option (which, again, I don't recommend)
yes. This patch looks good to me.



Le lun. 25 nov. 2019 ? 22:10, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> Hello J?r?my,
>
> Do you have some feedback about this patch ?
>
> Thanks,
>
> Thomas
>
> On Fri, 22 Nov 2019 10:39:30 +0100
> Pascal de Bruijn <p.debruijn@unilogic.nl> wrote:
>
> > PrivateTmp=true requires SYSTEMD_TMPFILES otherwise the service will
> > fail to start on boot.
> >
> > Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
> > ---
> >  package/php/Config.in | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/package/php/Config.in b/package/php/Config.in
> > index 2469573..b65438a 100644
> > --- a/package/php/Config.in
> > +++ b/package/php/Config.in
> > @@ -39,6 +39,7 @@ config BR2_PACKAGE_PHP_SAPI_CLI
> >
> >  config BR2_PACKAGE_PHP_SAPI_FPM
> >       bool "FPM interface"
> > +     select BR2_PACKAGE_SYSTEMD_TMPFILES if BR2_PACKAGE_SYSTEMD
> >       depends on BR2_USE_MMU
> >       # "Sparc v8 and predecessors are not and will not be supported"
> >       depends on !BR2_sparc
>
>
>
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>


-- 
[image: SMILE]  <http://www.smile.eu/>

20 rue des Jardins
92600 Asni?res-sur-Seine
*J?r?my ROSEN*
Architecte technique

[image: email] jeremy.rosen at smile.fr
[image: phone]  +33 6 88 25 87 42
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[image: D?couvrez l?univers Smile, rendez-vous sur smile.eu]
<https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191126/51252cb2/attachment.html>

  reply	other threads:[~2019-11-26 17:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  9:39 [Buildroot] [PATCH] package/php: select SYSTEMD_TMPFILES for PHP_SAPI_FPM Pascal de Bruijn
2019-11-25 21:10 ` Thomas Petazzoni
2019-11-26 17:45   ` Jérémy ROSEN [this message]
2019-12-04  8:53     ` Jérémy ROSEN
2021-08-05 19:51       ` Thomas Petazzoni

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=CAFvCimXVERj+Gd1y-NyVvcSKYsP0iDWrSG9UORE8j56ZK5Arog@mail.gmail.com \
    --to=jeremy.rosen@smile.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.