From: Alex Kiernan <alex.kiernan@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] manpages.bbclass: Fix rootfs host corruption
Date: Thu, 19 Dec 2019 22:17:47 +0000 [thread overview]
Message-ID: <20191219221748.27079-1-alex.kiernan@gmail.com> (raw)
When running mandb we end up with files owned by the build user, correct
this. Also pick up non-default locales and relocate their index.db files
to /var/cache.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
meta/classes/manpages.bbclass | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
index 50c254763e89..1e66780646ea 100644
--- a/meta/classes/manpages.bbclass
+++ b/meta/classes/manpages.bbclass
@@ -18,8 +18,15 @@ pkg_postinst_append_${MAN_PKG} () {
if test -n "$D"; then
if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}; then
sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} -C - -u -q $D${mandir}
+ chown -R root:root $D${mandir}
mkdir -p $D${localstatedir}/cache/man
- mv $D${mandir}/index.db $D${localstatedir}/cache/man
+ cd $D${mandir}
+ find . -name index.db | while read index; do
+ mkdir -p $D${localstatedir}/cache/man/$(dirname ${index})
+ mv ${index} $D${localstatedir}/cache/man/${index}
+ chown man:man $D${localstatedir}/cache/man/${index}
+ done
+ cd -
else
$INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
fi
--
2.17.1
next reply other threads:[~2019-12-19 22:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 22:17 Alex Kiernan [this message]
2019-12-19 22:17 ` [PATCH 2/2] rootfs-postcommands: Enable rootfs_check_host_user_contaminated Alex Kiernan
2020-01-02 23:20 ` Ross Burton
2020-05-21 14:14 ` [OE-core] [OE-Core][PATCH " Alex Kiernan
[not found] ` <161110ADA6F0224D.21901@lists.openembedded.org>
2020-06-09 15:08 ` Alex Kiernan
2020-06-20 12:45 ` Richard Purdie
2020-06-21 15:24 ` Alex Kiernan
2020-06-21 16:00 ` Richard Purdie
2020-06-22 10:58 ` Alex Kiernan
2020-01-09 2:30 ` [PATCH 1/2] manpages.bbclass: Fix rootfs host corruption Alex Kiernan
2020-01-09 13:36 ` Ross Burton
2020-01-09 14:43 ` Alex Kiernan
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=20191219221748.27079-1-alex.kiernan@gmail.com \
--to=alex.kiernan@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