From 382f5ed26e26befba2f9987b94fdd62131a54224 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Tue, 22 Nov 2016 15:41:04 +0800 Subject: package.bbclass: support persistent /var/log Add a new file, fs-perms-persistent-log.txt, which treats /var/log as a directory instead of a link. Modify package.bbclass to use this file if VOLATILE_LOG_DIR is set to boolean false value. [YOCTO #6132] Signed-off-by: Chen Qi --- meta/classes/package.bbclass | 2 +- meta/files/fs-perms-persistent-log.txt | 69 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 meta/files/fs-perms-persistent-log.txt diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index a6f0a7a63d..e60056e636 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -733,7 +733,7 @@ python fixup_perms () { bbpath = d.getVar('BBPATH', True) fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True) if not fs_perms_tables: - fs_perms_tables = 'files/fs-perms.txt' + fs_perms_tables = 'files/fs-perms.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR', True)) else 'files/fs-perms-persistent-log.txt' for conf_file in fs_perms_tables.split(): str += " %s" % bb.utils.which(bbpath, conf_file) return str diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-persistent-log.txt new file mode 100644 index 0000000000..2487a68afb --- /dev/null +++ b/meta/files/fs-perms-persistent-log.txt @@ -0,0 +1,69 @@ +# This file contains a list of files and directories with known permissions. +# It is used by the packaging class to ensure that the permissions, owners and +# group of listed files and directories are in sync across the system. +# +# The format of this file +# +# +# +# or +# +# link +# +# : directory path +# : mode for directory +# : uid for directory +# : gid for directory +# : recursively walk the directory? true or false +# : if walking, new mode for files +# : if walking, new uid for files +# : if walking, new gid for files +# : turn the directory into a symlink point to target +# +# in mode, uid or gid, a "-" means don't change any existing values +# +# /usr/src 0755 root root false - - - +# /usr/share/man 0755 root root true 0644 root root + +# Note: all standard config directories are automatically assigned "0755 root root false - - -" + +# Documentation should always be corrected +${mandir} 0755 root root true 0644 root root +${infodir} 0755 root root true 0644 root root +${docdir} 0755 root root true 0644 root root +${datadir}/gtk-doc 0755 root root true 0644 root root + +# Fixup locales +${datadir}/locale 0755 root root true 0644 root root + +# Cleanup headers +${includedir} 0755 root root true 0644 root root +${oldincludedir} 0755 root root true 0644 root root + +# Cleanup debug src +/usr/src/debug 0755 root root true - root root + +# Items from base-files +# Links +${localstatedir}/run link /run +${localstatedir}/lock link /run/lock +${localstatedir}/tmp link volatile/tmp + +/home 0755 root root false - - - +/srv 0755 root root false - - - +${prefix}/src 0755 root root false - - - +${localstatedir}/local 0755 root root false - - - + +# Special permissions from base-files +# Set 1777 +/tmp 01777 root root false - - - +${localstatedir}/volatile/tmp 01777 root root false - - - + +# Set 0700 +${ROOT_HOME} 0700 root root false - - - + +# Set 755-lsb +/srv 0755 root root false - - - + +# Set 2775-lsb +/var/mail 02775 root mail false - - - -- cgit 1.2.3-korg