[yocto] [meta-security][PATCH] ecryptfs-utils: fix usrmerge install path
akuster
akuster at mvista.com
Sun Sep 2 07:51:13 PDT 2018
On 08/27/2018 10:45 PM, mingli.yu at windriver.com wrote:
> From: Mingli Yu <Mingli.Yu at windriver.com>
>
> Update rootsbindir from /sbin to ${base_sbindir}
> to fix below do_install error when usrmerge
> enabled in DISTRO_FEATURES
> | chmod: cannot access '/poky-build/tmp-glibc/work/core2-64-wrs-linux/ecryptfs-utils/111-r0/image/usr/sbin/mount.ecryptfs_private': No such file or directory
>
> And pass "--with-pamdir=${base_libdir}/security"
> to configure script to fix below warning when
> usrmerge enabled in DISTRO_FEATURES
> | WARNING: ecryptfs-utils-111-r0 do_package: QA Issue: ecryptfs-utils: Files/directories were installed but not shipped in any package:
> /lib64/security/pam_ecryptfs.so
merged
> Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
> ---
> recipes-security/ecryptfs-utils/ecryptfs-utils_111.bb | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/recipes-security/ecryptfs-utils/ecryptfs-utils_111.bb b/recipes-security/ecryptfs-utils/ecryptfs-utils_111.bb
> index f55b0c3..1f780f9 100644
> --- a/recipes-security/ecryptfs-utils/ecryptfs-utils_111.bb
> +++ b/recipes-security/ecryptfs-utils/ecryptfs-utils_111.bb
> @@ -29,6 +29,7 @@ EXTRA_OECONF = "\
> --libdir=${base_libdir} \
> --disable-pywrap \
> --disable-nls \
> + --with-pamdir=${base_libdir}/security \
> "
>
> PACKAGECONFIG ??= "nss \
> @@ -43,12 +44,16 @@ do_configure_prepend() {
> export NSS_LIBS="-L${STAGING_BASELIBDIR} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3"
> export KEYUTILS_CFLAGS="-I${STAGING_INCDIR}"
> export KEYUTILS_LIBS="-L${STAGING_LIBDIR} -lkeyutils"
> + sed -i -e "s;rootsbindir=\"/sbin\";rootsbindir=\"\${base_sbindir}\";g" ${S}/configure.ac
> }
>
> do_install_append() {
> chmod 4755 ${D}${base_sbindir}/mount.ecryptfs_private
> - mkdir -p ${D}/${libdir}
> - mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}
> + # ${base_libdir} is identical to ${libdir} when usrmerge enabled
> + if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
> + mkdir -p ${D}/${libdir}
> + mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}
> + fi
> sed -i -e 's:-I${STAGING_INCDIR}::' \
> -e 's:-L${STAGING_LIBDIR}::' ${D}/${libdir}/pkgconfig/libecryptfs.pc
> sed -i -e "s: ${base_sbindir}/cryptsetup: ${sbindir}/cryptsetup:" ${D}${bindir}/ecryptfs-setup-swap
More information about the yocto
mailing list