<div dir="ltr">I wonder how that would work with lines that contain %b (boot id)<div>and %m (machine-id)<br><div>my educated guest would be that it would create files with the host's</div><div>boot-id/machine-id. Thus leaking the host's information. This is not</div><div>good, especially the machine-id of the host which is confidential </div><div>information (not crypto-grade, but still shouldn't be leaked)</div><div><br></div></div><div>if systemd-tmpile supports that correctly (maybe skipping all %b %m</div><div>when --root is used) it's all fine. But I don't remember seeing that.</div><div><br></div><div>does it ?</div><div><br></div><div>Cheers</div><div>Jeremy</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 15 juin 2020 à 09:21, Norbert Lange <<a href="mailto:nolange79@gmail.com">nolange79@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Especially for read-only filesystems it is helpfull to<br>
pre-create all folders for non-volatile paths.<br>
<br>
This needs to run under fakeroot to allow setting<br>
uids/gids/perms for the target fs.<br>
<br>
Signed-off-by: Norbert Lange <<a href="mailto:nolange79@gmail.com" target="_blank">nolange79@gmail.com</a>><br>
---<br>
 package/systemd/<a href="http://systemd.mk" rel="noreferrer" target="_blank">systemd.mk</a> | 8 +++++++-<br>
 1 file changed, 7 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/package/systemd/<a href="http://systemd.mk" rel="noreferrer" target="_blank">systemd.mk</a> b/package/systemd/<a href="http://systemd.mk" rel="noreferrer" target="_blank">systemd.mk</a><br>
index e117e3a082..cb0278f3b7 100644<br>
--- a/package/systemd/<a href="http://systemd.mk" rel="noreferrer" target="_blank">systemd.mk</a><br>
+++ b/package/systemd/<a href="http://systemd.mk" rel="noreferrer" target="_blank">systemd.mk</a><br>
@@ -599,6 +599,12 @@ SYSTEMD_TARGET_FINALIZE_HOOKS += PURGE_LOCALES<br>
 endif<br>
 SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_UPDATE_CATALOGS<br>
<br>
+define SYSTEMD_CREATE_TMPFILES_HOOK<br>
+       $(HOST_DIR)/bin/systemd-tmpfiles --root=$(TARGET_DIR) --create --boot \<br>
+               $(addprefix --exclude-prefix=/,dev mnt proc run sys tmp) || :<br>
+endef<br>
+SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_CREATE_TMPFILES_HOOK<br>
+<br>
 SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)<br>
 SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)<br>
<br>
@@ -652,7 +658,7 @@ HOST_SYSTEMD_CONF_OPTS = \<br>
        -Dvconsole=false \<br>
        -Dquotacheck=false \<br>
        -Dsysusers=false \<br>
-       -Dtmpfiles=false \<br>
+       -Dtmpfiles=true \<br>
        -Dimportd=false \<br>
        -Dhwdb=false \<br>
        -Drfkill=false \<br>
-- <br>
2.27.0<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><table border="0" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px;padding:20px"><tbody><tr><td style="padding:0px 30px 0px 0px;font-size:13px;color:rgb(255,128,84);text-align:center"><a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/Logo-new.png" alt="SMILE" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"> </a><br><br><p style="margin:0px 0px 10px">20 rue des Jardins<br>92600 Asnières-sur-Seine</p></td><td style="padding:0px 0px 0px 20px;border-left:1px solid rgb(59,127,254);font-size:13px;color:rgb(255,128,84)"><div style="font-size:14px"><b>Jérémy ROSEN</b></div><div style="color:rgb(59,127,254)">Architecte technique<br></div><br><div style="color:rgb(59,127,254)"><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/mail.png" alt="email" width="12" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="mailto:jeremy.rosen@smile.fr" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">jeremy.rosen@smile.fr</a> </span><br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/phone.png" alt="phone" width="10" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"></span>  +33 6 88 25 87 42 <br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/web.png" alt="url" width="12" height="12" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">http://www.smile.eu</a></span></div><br><div><span><a href="https://twitter.com/GroupeSmile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-twitter.png" alt="Twitter" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.facebook.com/smileopensource" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-facebook.png" alt="Facebook" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.linkedin.com/company/smile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-linkedin.png" alt="LinkedIn" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://github.com/Smile-SA" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-github.png" alt="Github" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span></div></td></tr></tbody></table><br style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><div style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><a href="https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="https://signature.smile.eu/assets/img/bandeaux_signature_mail_yocto.gif.gif" alt="Découvrez l’univers Smile, rendez-vous sur smile.eu" border="0" style="border: 0px; vertical-align: middle;"></a></div></div></div></div></div>