From: Chen Qi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 4/4] package.bbclass: support persistent /var/log
Date: Tue, 24 Mar 2015 16:42:47 +0800 [thread overview]
Message-ID: <0b7df563632e70d436beee6acab8d03ede82b20d.1427186519.git.Qi.Chen@windriver.com> (raw)
In-Reply-To: <cover.1427186518.git.Qi.Chen@windriver.com>
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 "".
[YOCTO #6132]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/classes/package.bbclass | 2 +-
meta/files/fs-perms-persistent-log.txt | 66 ++++++++++++++++++++++++++++++++++
2 files changed, 67 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 9f64ed7..63a70b7 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -699,7 +699,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-persistent-log.txt', 'files/fs-perms.txt'][d.getVar('VOLATILE_LOG_DIR', True) == 'log']
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 0000000..fdeeb02
--- /dev/null
+++ b/meta/files/fs-perms-persistent-log.txt
@@ -0,0 +1,66 @@
+# 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
+#
+#<path> <mode> <uid> <gid> <walk> <fmode> <fuid> <fgid>
+#
+# or
+#
+#<path> link <target>
+#
+# <path>: directory path
+# <mode>: mode for directory
+# <uid>: uid for directory
+# <gid>: gid for directory
+# <walk>: recursively walk the directory? true or false
+# <fmode>: if walking, new mode for files
+# <fuid>: if walking, new uid for files
+# <fgid>: if walking, new gid for files
+# <target>: 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 755-lsb
+/srv 0755 root root false - - -
+
+# Set 2775-lsb
+/var/mail 02775 root mail false - - -
--
1.9.1
next prev parent reply other threads:[~2015-03-24 8:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 8:42 [PATCH 0/4] Support persistent /var/log Chen Qi
2015-03-24 8:42 ` [PATCH 1/4] bitbake.conf: add VOLATILE_LOG_DIR variable Chen Qi
2015-03-24 8:42 ` [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR Chen Qi
2015-03-24 8:42 ` [PATCH 3/4] initscripts: support persistent /var/log Chen Qi
2015-03-24 8:42 ` Chen Qi [this message]
2015-04-07 3:10 ` [PATCH 0/4] Support " ChenQi
2015-05-26 5:43 ` ChenQi
2015-05-26 9:15 ` Paul Eggleton
2015-05-28 4:55 ` Khem Raj
2015-05-28 6:05 ` ChenQi
2016-11-22 10:10 [PATCH 0/4] Persistent /var/log support Chen Qi
2016-11-22 10:10 ` [PATCH 4/4] package.bbclass: support persistent /var/log Chen Qi
2017-08-16 11:57 [PATCH V4 0/4] Persistent /var/log support Chen Qi
2017-08-16 11:57 ` [PATCH 4/4] package.bbclass: support persistent /var/log Chen Qi
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=0b7df563632e70d436beee6acab8d03ede82b20d.1427186519.git.Qi.Chen@windriver.com \
--to=qi.chen@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.