From: Dan McGregor <danismostlikely@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/4] base-files: change permissions on /sys and /proc
Date: Wed, 17 Oct 2018 15:22:35 -0600 [thread overview]
Message-ID: <20181017212235.8453-4-danismostlikely@gmail.com> (raw)
In-Reply-To: <20181017212235.8453-1-danismostlikely@gmail.com>
From: Dan McGregor <dan.mcgregor@usask.ca>
The kernel mounts /proc and /sys with the mode 555. Fedora explicitly
sets this value in its filesystem setup package. Debian doesn't seem
to set it explictly. Having them be 755 causes permission issues on
upgrades inside a container where the guest does not have the
permission to change the modes of the mount points.
So, just bite the bullet and force them to be 555.
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
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 05c05626614..6e75652f152 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
@@ -32,15 +32,16 @@ INHIBIT_DEFAULT_DEPS = "1"
docdir_append = "/${P}"
dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
dirs2775 = ""
+dirs555 = "/sys /proc"
dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
${sysconfdir} ${sysconfdir}/default \
- ${sysconfdir}/skel ${nonarch_base_libdir} /mnt /proc ${ROOT_HOME} /run \
+ ${sysconfdir}/skel ${nonarch_base_libdir} /mnt ${ROOT_HOME} /run \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
${libdir} ${sbindir} ${datadir} \
${datadir}/common-licenses ${datadir}/dict ${infodir} \
${mandir} ${datadir}/misc ${localstatedir} \
${localstatedir}/backups ${localstatedir}/lib \
- /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
+ ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
/home ${prefix}/src ${localstatedir}/local \
@@ -93,6 +94,9 @@ pkg_preinst_${PN} () {
}
do_install () {
+ for d in ${dirs555}; do
+ install -m 0555 -d ${D}$d
+ done
for d in ${dirs755}; do
install -m 0755 -d ${D}$d
done
--
2.19.0-dev
next prev parent reply other threads:[~2018-10-17 21:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 21:22 [PATCH 1/4] util-linux: alternatify cal, rev, and ionice Dan McGregor
2018-10-17 21:22 ` [PATCH 2/4] file: alternatify file Dan McGregor
2018-10-17 21:22 ` [PATCH 3/4] kmod: bump alternative priority Dan McGregor
2018-10-17 21:22 ` Dan McGregor [this message]
2018-10-18 10:22 ` [PATCH 1/4] util-linux: alternatify cal, rev, and ionice Burton, Ross
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=20181017212235.8453-4-danismostlikely@gmail.com \
--to=danismostlikely@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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