diff options
| -rw-r--r-- | meta/conf/bitbake.conf | 7 | ||||
| -rw-r--r-- | meta/files/fs-perms-volatile-log.txt (renamed from meta/files/fs-perms-persistent-log.txt) | 33 | ||||
| -rw-r--r-- | meta/files/fs-perms.txt | 1 | ||||
| -rw-r--r-- | meta/recipes-core/base-files/base-files_3.0.14.bb | 4 | ||||
| -rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 2 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd_256.5.bb | 2 |
6 files changed, 7 insertions, 42 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 1acb56433c..76ae17e644 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
| @@ -86,10 +86,6 @@ USRBINPATH:class-nativesdk = "/usr/bin" | |||
| 86 | # Root home directory | 86 | # Root home directory |
| 87 | ROOT_HOME ??= "/home/root" | 87 | ROOT_HOME ??= "/home/root" |
| 88 | 88 | ||
| 89 | # If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links to /var/volatile/log. | ||
| 90 | # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage. | ||
| 91 | VOLATILE_LOG_DIR ?= "yes" | ||
| 92 | |||
| 93 | # if set to 'yes': /tmp links to /var/tmp which links to /var/volatile/tmp | 89 | # if set to 'yes': /tmp links to /var/tmp which links to /var/volatile/tmp |
| 94 | # otherwise: /tmp is on persistent storage | 90 | # otherwise: /tmp is on persistent storage |
| 95 | VOLATILE_TMP_DIR ?= "yes" | 91 | VOLATILE_TMP_DIR ?= "yes" |
| @@ -384,7 +380,8 @@ FILESEXTRAPATHS ?= "__default:" | |||
| 384 | # base_prefix, prefix, exec_prefix, base_bindir, base_sbindir, base_libdir, | 380 | # base_prefix, prefix, exec_prefix, base_bindir, base_sbindir, base_libdir, |
| 385 | # datadir, sysconfdir, servicedir, sharedstatedir, localstatedir, infodir, | 381 | # datadir, sysconfdir, servicedir, sharedstatedir, localstatedir, infodir, |
| 386 | # mandir, docdir, bindir, sbindir, libexecdir, libdir and includedir | 382 | # mandir, docdir, bindir, sbindir, libexecdir, libdir and includedir |
| 387 | FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'files/fs-perms-persistent-log.txt'}" | 383 | FILESYSTEM_PERMS_TABLES ?= "files/fs-perms.txt \ |
| 384 | files/fs-perms-volatile-log.txt" | ||
| 388 | 385 | ||
| 389 | ################################################################## | 386 | ################################################################## |
| 390 | # General work and output directories for the build system. | 387 | # General work and output directories for the build system. |
diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-volatile-log.txt index 61f0a6e26a..fc846bbdc5 100644 --- a/meta/files/fs-perms-persistent-log.txt +++ b/meta/files/fs-perms-volatile-log.txt | |||
| @@ -28,38 +28,7 @@ | |||
| 28 | # Note: all standard config directories are automatically assigned "0755 root root false - - -" | 28 | # Note: all standard config directories are automatically assigned "0755 root root false - - -" |
| 29 | 29 | ||
| 30 | # Documentation should always be corrected | 30 | # Documentation should always be corrected |
| 31 | ${mandir} 0755 root root true 0644 root root | ||
| 32 | ${infodir} 0755 root root true 0644 root root | ||
| 33 | ${docdir} 0755 root root true 0644 root root | ||
| 34 | ${datadir}/gtk-doc 0755 root root true 0644 root root | ||
| 35 | |||
| 36 | # Fixup locales | ||
| 37 | ${datadir}/locale 0755 root root true 0644 root root | ||
| 38 | |||
| 39 | # Cleanup headers | ||
| 40 | ${includedir} 0755 root root true 0644 root root | ||
| 41 | |||
| 42 | # Cleanup debug src | ||
| 43 | /usr/src/debug 0755 root root true 0644 root root | ||
| 44 | 31 | ||
| 45 | # Items from base-files | 32 | # Items from base-files |
| 46 | # Links | 33 | # Links |
| 47 | ${localstatedir}/run link /run | 34 | ${localstatedir}/log link volatile/log |
| 48 | ${localstatedir}/lock link /run/lock | ||
| 49 | ${localstatedir}/tmp link volatile/tmp | ||
| 50 | |||
| 51 | /home 0755 root root false - - - | ||
| 52 | /srv 0755 root root false - - - | ||
| 53 | ${prefix}/src 0755 root root false - - - | ||
| 54 | ${localstatedir}/local 0755 root root false - - - | ||
| 55 | |||
| 56 | # Special permissions from base-files | ||
| 57 | # Set 1777 | ||
| 58 | /tmp 01777 root root false - - - | ||
| 59 | ${localstatedir}/volatile/tmp 01777 root root false - - - | ||
| 60 | |||
| 61 | # Set 0700 | ||
| 62 | ${ROOT_HOME} 0700 root root false - - - | ||
| 63 | |||
| 64 | # Set 2775-lsb | ||
| 65 | ${localstatedir}/mail 02775 root mail false - - - | ||
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt index 48191f504c..61f0a6e26a 100644 --- a/meta/files/fs-perms.txt +++ b/meta/files/fs-perms.txt | |||
| @@ -45,7 +45,6 @@ ${includedir} 0755 root root true 0644 root root | |||
| 45 | # Items from base-files | 45 | # Items from base-files |
| 46 | # Links | 46 | # Links |
| 47 | ${localstatedir}/run link /run | 47 | ${localstatedir}/run link /run |
| 48 | ${localstatedir}/log link volatile/log | ||
| 49 | ${localstatedir}/lock link /run/lock | 48 | ${localstatedir}/lock link /run/lock |
| 50 | ${localstatedir}/tmp link volatile/tmp | 49 | ${localstatedir}/tmp link volatile/tmp |
| 51 | 50 | ||
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 1b6e9671e4..dc1292ae55 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 | |||
| @@ -44,7 +44,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ | |||
| 44 | ${localstatedir}/backups ${localstatedir}/lib \ | 44 | ${localstatedir}/backups ${localstatedir}/lib \ |
| 45 | ${localstatedir}/lib/misc ${localstatedir}/spool \ | 45 | ${localstatedir}/lib/misc ${localstatedir}/spool \ |
| 46 | ${localstatedir}/volatile \ | 46 | ${localstatedir}/volatile \ |
| 47 | ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \ | 47 | ${localstatedir}/${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'volatile/', '', d)}log \ |
| 48 | /home ${prefix}/src ${localstatedir}/local \ | 48 | /home ${prefix}/src ${localstatedir}/local \ |
| 49 | /media" | 49 | /media" |
| 50 | 50 | ||
| @@ -55,7 +55,7 @@ dirs755-lsb = "/srv \ | |||
| 55 | ${prefix}/lib/locale" | 55 | ${prefix}/lib/locale" |
| 56 | dirs2775-lsb = "/var/mail" | 56 | dirs2775-lsb = "/var/mail" |
| 57 | 57 | ||
| 58 | volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" | 58 | volatiles = "${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'log', '', d)} tmp" |
| 59 | conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ | 59 | conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ |
| 60 | ${sysconfdir}/issue /${sysconfdir}/issue.net \ | 60 | ${sysconfdir}/issue /${sysconfdir}/issue.net \ |
| 61 | ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ | 61 | ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ |
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index 65f97a0af2..0879b30623 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb | |||
| @@ -106,7 +106,7 @@ do_install () { | |||
| 106 | install -m 0755 ${S}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d | 106 | install -m 0755 ${S}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d |
| 107 | install -m 0755 ${S}/save-rtc.sh ${D}${sysconfdir}/init.d | 107 | install -m 0755 ${S}/save-rtc.sh ${D}${sysconfdir}/init.d |
| 108 | install -m 0644 ${S}/volatiles ${D}${sysconfdir}/default/volatiles/00_core | 108 | install -m 0644 ${S}/volatiles ${D}${sysconfdir}/default/volatiles/00_core |
| 109 | if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then | 109 | if ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'true', 'false', d)}; then |
| 110 | sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \ | 110 | sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \ |
| 111 | ${D}${sysconfdir}/default/volatiles/00_core | 111 | ${D}${sysconfdir}/default/volatiles/00_core |
| 112 | fi | 112 | fi |
diff --git a/meta/recipes-core/systemd/systemd_256.5.bb b/meta/recipes-core/systemd/systemd_256.5.bb index ee656c81e5..7f66c921ab 100644 --- a/meta/recipes-core/systemd/systemd_256.5.bb +++ b/meta/recipes-core/systemd/systemd_256.5.bb | |||
| @@ -313,7 +313,7 @@ do_install() { | |||
| 313 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install | 313 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install |
| 314 | fi | 314 | fi |
| 315 | 315 | ||
| 316 | if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then | 316 | if ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'true', 'false', d)}; then |
| 317 | # base-files recipe provides /var/log which is a symlink to /var/volatile/log | 317 | # base-files recipe provides /var/log which is a symlink to /var/volatile/log |
| 318 | rm -rf ${D}${localstatedir}/log | 318 | rm -rf ${D}${localstatedir}/log |
| 319 | printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "${localstatedir}" \ | 319 | printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "${localstatedir}" \ |
