Re: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
On 12/9/23 07:35, Peter Kjellerstedt wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. -Original Message- From: openembedded-core@lists.openembedded.org On Behalf Of Changqing Li Sent: den 8 december 2023 11:13 To: openembedded-core@lists.openembedded.org Subject: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR From: Changqing Li * update dirs1777 so that only create /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set to no * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init manager is sysvinit Signed-off-by: Changqing Li --- meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..01d076369d 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -30,7 +30,7 @@ S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" docdir:append = "/${P}" -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" dirs2775 = "" dirs555 = "/sys /proc" dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ ${prefix}/lib/locale" dirs2775-lsb = "/var/mail" -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -122,6 +123,9 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then +echo "tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> ${D}${sysconfdir}/fstab +fi Inconsistent indentation. Please use tabs to indent shell code in recipes in OE-Core. This also applies to patches 4 and 5 in this series. Thanks, have send an V2 to fix these issue. //Changqing install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile -- 2.25.1 //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192136): https://lists.openembedded.org/g/openembedded-core/message/192136 Mute This Topic: https://lists.openembedded.org/mt/103052519/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
From: Changqing Li * update dirs1777 so that only create /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set to no * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init manager is sysvinit Signed-off-by: Changqing Li --- meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..b523c4aa62 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -30,7 +30,7 @@ S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" docdir:append = "/${P}" -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" dirs2775 = "" dirs555 = "/sys /proc" dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ ${prefix}/lib/locale" dirs2775-lsb = "/var/mail" -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -122,6 +123,9 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then + echo "tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> ${D}${sysconfdir}/fstab + fi install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192132): https://lists.openembedded.org/g/openembedded-core/message/192132 Mute This Topic: https://lists.openembedded.org/mt/103100476/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
> -Original Message- > From: openembedded-core@lists.openembedded.org > On Behalf Of Changqing Li > Sent: den 8 december 2023 11:13 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles > according to VOLATILE_TMP_DIR > > From: Changqing Li > > * update dirs1777 so that only create /var/volatiles/tmp when > VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set > to no > > * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp > when VOLATILE_TMP_DIR set to yes > > * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init > manager is sysvinit > > Signed-off-by: Changqing Li > --- > meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb > b/meta/recipes-core/base-files/base-files_3.0.14.bb > index 9fab53ce63..01d076369d 100644 > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb > @@ -30,7 +30,7 @@ S = "${WORKDIR}" > INHIBIT_DEFAULT_DEPS = "1" > > docdir:append = "/${P}" > -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" > +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if > oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" > dirs2775 = "" > dirs555 = "/sys /proc" > dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ > @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ > ${prefix}/lib/locale" > dirs2775-lsb = "/var/mail" > > -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} > tmp" > +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ > + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" > conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ > ${sysconfdir}/issue /${sysconfdir}/issue.net \ > ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ > @@ -122,6 +123,9 @@ do_install () { > fi > > install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab > +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && > ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then > +echo "tmpfs /tmp tmpfs > mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> > ${D}${sysconfdir}/fstab > +fi Inconsistent indentation. Please use tabs to indent shell code in recipes in OE-Core. This also applies to patches 4 and 5 in this series. > install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile > sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile > sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile > -- > 2.25.1 //Peter -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192086): https://lists.openembedded.org/g/openembedded-core/message/192086 Mute This Topic: https://lists.openembedded.org/mt/103052519/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 2/5] base-files: update dirs1777 and volatiles according to VOLATILE_TMP_DIR
From: Changqing Li * update dirs1777 so that only create /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set to no * update volatiles so that only symlink /var/tmp to /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init manager is sysvinit Signed-off-by: Changqing Li --- meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..01d076369d 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -30,7 +30,7 @@ S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" docdir:append = "/${P}" -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" dirs2775 = "" dirs555 = "/sys /proc" dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ ${prefix}/lib/locale" dirs2775-lsb = "/var/mail" -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -122,6 +123,9 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab +if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then +echo "tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> ${D}${sysconfdir}/fstab +fi install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192024): https://lists.openembedded.org/g/openembedded-core/message/192024 Mute This Topic: https://lists.openembedded.org/mt/103052519/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-