[oe-commits] [openembedded-core] 13/64: manpages.bbclass: Fix rootfs host corruption

git at git.openembedded.org git at git.openembedded.org
Mon Jan 27 16:48:53 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 844781c5b260a52e8c06b872c74a13a22689bdb9
Author: Alex Kiernan <alex.kiernan at gmail.com>
AuthorDate: Thu Jan 9 14:45:59 2020 +0000

    manpages.bbclass: Fix rootfs host corruption
    
    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 at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.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 50c2547..1e66780 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list