]> code.ossystems Code Review - openembedded-core.git/commit
rootfs-postcommands.bbclass: Filter out dangling symlinks in ssh_allow_empty_password()
authorKhem Raj <raj.khem@gmail.com>
Thu, 17 Aug 2017 05:43:17 +0000 (22:43 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2017 15:52:05 +0000 (16:52 +0100)
commited1aaf24bfd4a09132c7e0247c460102ec85254d
tree8c8421177e5a1202e89e14cddfd6bcd7702f86a3
parentd9f3c803d739a815fe5ee2e1227c5ae571fefb8f
rootfs-postcommands.bbclass: Filter out dangling symlinks in ssh_allow_empty_password()

In images built with pam in DISTRO_FEATURES, we end up with dangling symlinks
if su is not packaged into image

$ ls /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l -l
lrwxrwxrwx 1 kraj users 2 Aug  9 07:56 /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l -> su

This causes image do_rootfs to fail

| sed: can't read /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/s
u-l: No such file or directory
| WARNING: /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.ssh_allow_empty_
password.19238:1 exit 2 from 'sed -i 's/nullok_secure/nullok/' /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi
/core-image-minimal/1.0-r0/rootfs/etc/pam.d/*'

Therefore we need to filter out dangling symlinks before sed'ing
things out

(From OE-Core rev: b92105e5a085c8cd3c650579644922ed97163e73)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/rootfs-postcommands.bbclass