From 1feca724cafb604db9075d9b640785a1d96758f3 Mon Sep 17 00:00:00 2001 From: Khang Nguyen Date: Tue, 20 Aug 2019 16:58:57 +0700 Subject: rcar-gen3: base-files: Fix missing log and tmp in /var/volatile Since systemd v240, tmpfiles could not create the files/directories under a prefix that may be owned by an unprivileged user due to unsafe transition validation. In case of users set up a rootfs on NFS server or use PC to prepare one on a flash device, the ownership is inherited from host PC, but the /var/volatile is set the owner to root by default, it leads to an issue that the log and tmp directories under /var/volatile are not created. The processes use the tmp/log directories to store log and temporary files will fail. | [FAILED] Failed to start Login Service. | [FAILED] Failed to start Network Name Resolution. | authpriv.err login[3074]: pam_lastlog(login:session): unable to create /var/log/lastlog: No such file or directory This changes the owner of /var/volatile to uid=1000,gid=1000 as a workaround for the issue. Signed-off-by: Khang Nguyen Signed-off-by: Takamitsu Honda Change-Id: Iae54eb2f47cca2d7f57c48d581d075b6c41401b7 --- meta-rcar-gen3/recipes-core/base-files/base-files/fstab | 11 +++++++++++ meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 meta-rcar-gen3/recipes-core/base-files/base-files/fstab diff --git a/meta-rcar-gen3/recipes-core/base-files/base-files/fstab b/meta-rcar-gen3/recipes-core/base-files/base-files/fstab new file mode 100644 index 0000000..e5aa4f7 --- /dev/null +++ b/meta-rcar-gen3/recipes-core/base-files/base-files/fstab @@ -0,0 +1,11 @@ +# stock fstab - you probably want to override this with a machine specific one + +/dev/root / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 +tmpfs /var/volatile tmpfs uid=1000,gid=1000 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend b/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend index 3381aa5..efcc6a0 100644 --- a/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend +++ b/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend @@ -1,5 +1,11 @@ require include/rcar-gen3-path-common.inc +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" + +SRC_URI_append = " \ + file://fstab \ +" + do_install_append () { echo "export LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${RENESAS_DATADIR}/lib\"" >> ${D}${sysconfdir}/profile } -- cgit 1.2.3-korg