--- /dev/null
+# 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 (see .bbappend!). We are not using /var/volatile.
+# Links
+${localstatedir}/run link /run
+${localstatedir}/lock link /run/lock
+
+/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
+# We must also set smack labels, so rely on base-files.rpm owning these directories.
+#/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 - - -
--- /dev/null
+<!-- from https://review.tizen.org/gerrit/gitweb?p=platform/upstream/filesystem.git;a=blob;f=packaging/filesystem.manifest -->
+
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/etc" label="System::Shared" type="transmutable" />
+ <filesystem path="/var/log" label="System::Log" type="transmutable" />
+ <filesystem path="/tmp" label="*" />
+ <filesystem path="/var/tmp" label="*" />
+ </assign>
+</manifest>
FILESEXTRAPATHS_prepend := "${THISDIR}/base-files:"
-volatiles = "tmp"
-dirs1777 = "/tmp"
+SRC_URI += " \
+file://base-files.manifest \
+"
-dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
- ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
- ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
- ${libdir} ${sbindir} ${datadir} \
- ${datadir}/common-licenses ${datadir}/dict ${infodir} \
- ${mandir} ${datadir}/misc ${localstatedir} \
- ${localstatedir}/backups ${localstatedir}/lib \
- /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
- /media"
+# Don't use /var/volatile. Instead create regular directories for things that
+# used to be symlinks into it (tmp, log).
+volatiles_remove = "log tmp"
+dirs1777 += " ${localstatedir}/tmp ${localstatedir}/log"
+dirs1777_remove = "${localstatedir}/volatile/tmp"
+dirs755_remove = "${localstatedir}/volatile ${localstatedir}/volatile/log"
+# This gets symlinked to in the .bb but isn't created?
+dirs755 += "/run/lock"
-do_install () {
- for d in ${dirs755}; do
- install -m 0755 -d ${D}$d
- done
- for d in ${dirs1777}; do
- install -m 1777 -d ${D}$d
- done
- for d in ${dirs2775}; do
- install -m 2755 -d ${D}$d
- done
- for d in ${volatiles}; do
- ln -sf volatile/$d ${D}${localstatedir}/$d
- done
- ln -snf ../run ${D}${localstatedir}/run
- ln -snf ../run/lock ${D}${localstatedir}/lock
+merged_dirs = "/bin /lib /sbin"
+dirs755_remove = "/bin /lib /sbin"
+do_install_prepend () {
+ for d in ${merged_dirs}; do
+ ln -sf usr$d ${D}$d
+ done
+}
- ${BASEFILESISSUEINSTALL}
+# Empty directories must be listed explicitly to be packaged.
+# This is relevant for our directories with special permissions (see manifest).
+DIRFILES_${PN} += "/etc /var/log /var/tmp /tmp"
- rotation=`cat ${WORKDIR}/rotation`
- if [ "$rotation" != "0" ]; then
- install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation
- fi
+# The ${merged_dirs} symlinks to directories get ignored by the
+# current walk_files() in OE-core's package_rpm.bbclass. A patch
+# is needed to support that.
- install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
- install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
- install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
- install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
- sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile
- install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
- install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
- install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
- install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
- install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
- install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
- install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
-
- ln -sf /proc/mounts ${D}${sysconfdir}/mtab
-}
\ No newline at end of file
+# We don't use the "/var/volatile" support from OE, so provide
+# a modified standard file system permission file without those.
+FILESYSTEM_PERMS_TABLES = "files/tizen-fs-perms.txt"
+++ /dev/null
-SUMMARY = "Config image"
-DESCRIPTION = "This Config image"
-SECTION = "config"
-PR = "r1"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-RDEPENDS_${PN} += "systemd"
-
-basesymlinks = ""
-# "/bin /sbin /lib"
-
-do_install() {
- mkdir -p ${D}${sysconfdir}
- echo "Tizen on Yocto" > ${D}${sysconfdir}/tizen
-
- touch ${D}${sysconfdir}/environment
- chmod 0644 ${D}${sysconfdir}/environment
-
- mkdir -p ${D}${sysconfdir}/profile.d
-cat >${D}${sysconfdir}/profile.d/bash_prompt_custom.sh <<'EOF'
- # set a fancy prompt (overwrite the one in /etc/profile)
- default="\[\e[0m\]"
- usercol='\[\e[1;34m\]' # blue
- hostcol='\[\e[1;32m\]' # green
- pathcol='\[\e[1;33m\]' # yellow
- gitcol='\[\e[1;31m\]' # light red
- termcmd=''
- _p="$";
-
- if [ "`id -u`" -eq 0 ]; then
- usercol='\[\e[1;31m\]'
- _p="#"
- fi
-
- PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}"
-
- alias ll="ls -lZ"
- alias lr="ls -ltrZ"
- alias la="ls -alZ"
-
-EOF
-
-}
-
-pkg_postinst_${PN} () {
- # Same symlinks as in Tizen. tizen.conf sets base_ dirs to /usr/<something>,
- # so all files should already go into that. If they don't, install
- # failures will tell us which recipe did not honor path configurations
- # (and potentially other system settings!).
- for i in ${basesymlinks}; do
- ln -s usr$i ${D}$i
- done
-
- # This corresponds to:
- # https://review.tizen.org/gerrit/gitweb?p=platform/upstream/filesystem.git;a=blob;f=packaging/filesystem.manifest
-
- mkdir -p $D${sysconfdir}
- chsmack -t $D${sysconfdir}
- chsmack -a 'System::Shared' $D${sysconfdir}
-
- mkdir -p $D${localstatedir}/log
- chsmack -t $D${localstatedir}/log
- chsmack -a 'System::Log' $D${localstatedir}/log
-
- mkdir -p $D/tmp
- chsmack -a '*' $D/tmp
-
- mkdir -p $D/${localstatedir}/tmp
- chsmack -a '*' $D/${localstatedir}/tmp
-
- rm -rf $D/${localstatedir}/run
- ln -s ../run $D/${localstatedir}/run
-
- touch $D${localstatedir}/log/lastlog
- touch $D${localstatedir}/log/faillog
- touch $D${localstatedir}/log/wtmp
- touch $D${localstatedir}/log/btmp
-
- mkdir -p $D${sysconfdir}/profile.d
-
- #if [ "x$D" != "x" ]; then
- # cp -fra $D${localstatedir}/log $D${localstatedir}/volatile
- # rm -fr $D${localstatedir}/log
- # ln -s volatile/log $D${localstatedir}/log
- #
- #fi
-}
-
-FILES_${PN} = "${sysconfdir}/tizen \
- ${sysconfdir}/environment \
- ${sysconfdir}/profile.d/bash_prompt_custom.sh \
- ${base_sbindir}/init \
- ${basesymlinks} \
- "
REQUIRED_DISTRO_FEATURES = "wayland pam"
+# Because of our symlink hack for /lib /sbin /bin,
+# this package must be installed first and not just
+# randomly based of some dependency.
+IMAGE_INSTALL_prepend = "base-files "
+
CORE_IMAGE_BASE_INSTALL += "weston weston-init clutter-1.0-examples"
DESCRIPTION = "A weston image with Tizen common."
CORE_IMAGE_BASE_INSTALL += "user-session-units"
CORE_IMAGE_BASE_INSTALL += "default-ac-domains"
CORE_IMAGE_BASE_INSTALL += "rpm-security-plugin"
-CORE_IMAGE_BASE_INSTALL += "config-image"
CORE_IMAGE_BASE_INSTALL += "kernel-modules"
CORE_IMAGE_BASE_INSTALL += "less"
CORE_IMAGE_BASE_INSTALL += "bash"
+++ /dev/null
-# Not used in Tizen IVI 3.0.
-RDEPENDS_${PN}_remove = "wrt-widgets"