blob: 00e8997ce6fe06d438c72b86709c65d6d29559cf [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301SUMMARY = "The eCryptfs mount helper and support libraries"
2DESCRIPTION = "eCryptfs is a stacked cryptographic filesystem \
3 that ships in Linux kernel versions 2.6.19 and above. This \
4 package provides the mount helper and supporting libraries \
5 to perform key management and mount functions."
6HOMEPAGE = "https://launchpad.net/ecryptfs"
7SECTION = "base"
8
Patrick Williamsde0582f2022-04-08 10:23:27 -05009LICENSE = "GPL-2.0-only"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053010LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
11
12DEPENDS = "keyutils libgcrypt intltool-native glib-2.0-native"
13
14SRC_URI = "\
15 https://launchpad.net/ecryptfs/trunk/${PV}/+download/${BPN}_${PV}.orig.tar.gz \
16 file://ecryptfs-utils-CVE-2016-6224.patch \
Brad Bishop49e29a12019-09-01 15:21:06 -040017 file://0001-avoid-race-condition.patch \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053018 file://ecryptfs.service \
Andrew Geisslerd1d22e62020-10-16 10:14:32 -050019 file://define_musl_sword_type.patch \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053020 "
21
22SRC_URI[md5sum] = "83513228984f671930752c3518cac6fd"
23SRC_URI[sha256sum] = "112cb3e37e81a1ecd8e39516725dec0ce55c5f3df6284e0f4cc0f118750a987f"
24
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050025UPSTREAM_CHECK_URI = "https://launchpad.net/ecryptfs/+download"
26
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053027inherit autotools pkgconfig systemd
28
29SYSTEMD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050030SYSTEMD_SERVICE:${PN} = "ecryptfs.service"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053031
32EXTRA_OECONF = "\
33 --libdir=${base_libdir} \
34 --disable-pywrap \
35 --disable-nls \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036 --with-pamdir=${base_libdir}/security \
Brad Bishop49e29a12019-09-01 15:21:06 -040037 --disable-openssl \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053038 "
39
40PACKAGECONFIG ??= "nss \
41 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
42 "
43PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss,"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053044PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,"
45
Patrick Williams213cb262021-08-07 19:21:33 -050046do_configure:prepend() {
Andrew Geissler1fe918a2020-05-15 14:16:47 -050047 export NSS_CFLAGS="-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053048 export NSS_LIBS="-L${STAGING_BASELIBDIR} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3"
49 export KEYUTILS_CFLAGS="-I${STAGING_INCDIR}"
50 export KEYUTILS_LIBS="-L${STAGING_LIBDIR} -lkeyutils"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 sed -i -e "s;rootsbindir=\"/sbin\";rootsbindir=\"\${base_sbindir}\";g" ${S}/configure.ac
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053052}
53
Patrick Williams213cb262021-08-07 19:21:33 -050054do_install:append() {
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053055 chmod 4755 ${D}${base_sbindir}/mount.ecryptfs_private
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080056 # ${base_libdir} is identical to ${libdir} when usrmerge enabled
57 if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
58 mkdir -p ${D}/${libdir}
59 mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}
60 fi
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053061 sed -i -e 's:-I${STAGING_INCDIR}::' \
62 -e 's:-L${STAGING_LIBDIR}::' ${D}/${libdir}/pkgconfig/libecryptfs.pc
63 sed -i -e "s: ${base_sbindir}/cryptsetup: ${sbindir}/cryptsetup:" ${D}${bindir}/ecryptfs-setup-swap
64 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
65 install -D -m 0644 ${WORKDIR}/ecryptfs.service ${D}${systemd_system_unitdir}/ecryptfs.service
66 fi
67}
68
Patrick Williams213cb262021-08-07 19:21:33 -050069FILES:${PN} += "${base_libdir}/security/* ${base_libdir}/ecryptfs/*"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053070
Patrick Williams213cb262021-08-07 19:21:33 -050071RDEPENDS:${PN} += "cryptsetup"
72RRECOMMENDS:${PN} = "gettext-runtime"