xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-networking/recipes-support/cifs/cifs-utils_6.14.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem."
2HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils"
3SECTION = "otherosfs"
4LICENSE = "GPL-3.0-only & LGPL-3.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRCREV = "8c06dce7d596e478c20bc54bdcec87ad97f80a1b"
8SRC_URI = "git://git.samba.org/cifs-utils.git;branch=master \
9           file://CVE-2022-27239.patch \
10           file://CVE-2022-29869.patch \
11"
12
13S = "${WORKDIR}/git"
14DEPENDS += "libtalloc"
15
16PACKAGECONFIG ??= ""
17PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap"
18# when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install:append is needed
19PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils"
20# when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install:append is needed
21PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 libtalloc keyutils"
22PACKAGECONFIG[cifsidmap] = "--enable-cifsidmap,--disable-cifsidmap,keyutils samba"
23PACKAGECONFIG[cifsacl] = "--enable-cifsacl,--disable-cifsacl,samba"
24PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disable-pam,libpam keyutils"
25
26inherit autotools pkgconfig
27
28do_configure:prepend() {
29    # want installed to /usr/sbin rather than /sbin to be DISTRO_FEATURES usrmerge compliant
30    # must override ROOTSBINDIR (default '/sbin'),
31    # setting --exec-prefix or --prefix in EXTRA_OECONF does not work
32    if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
33        export ROOTSBINDIR=${sbindir}
34    fi
35}
36
37do_install:append() {
38    if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then
39        # Remove empty /usr/bin and /usr/sbin directories since the mount helper
40        # is installed to /sbin
41        rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
42    fi
43}
44
45FILES:${PN} += "${base_libdir}/security"
46FILES:${PN}-dbg += "${base_libdir}/security/.debug"
47RRECOMMENDS:${PN} = "kernel-module-cifs"
48