Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | SUMMARY = "The eCryptfs mount helper and support libraries" |
| 2 | DESCRIPTION = "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." |
| 6 | HOMEPAGE = "https://launchpad.net/ecryptfs" |
| 7 | SECTION = "base" |
| 8 | |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame^] | 9 | LICENSE = "GPL-2.0-only" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" |
| 11 | |
| 12 | DEPENDS = "keyutils libgcrypt intltool-native glib-2.0-native" |
| 13 | |
| 14 | SRC_URI = "\ |
| 15 | https://launchpad.net/ecryptfs/trunk/${PV}/+download/${BPN}_${PV}.orig.tar.gz \ |
| 16 | file://ecryptfs-utils-CVE-2016-6224.patch \ |
Brad Bishop | 49e29a1 | 2019-09-01 15:21:06 -0400 | [diff] [blame] | 17 | file://0001-avoid-race-condition.patch \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 18 | file://ecryptfs.service \ |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 19 | file://define_musl_sword_type.patch \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 20 | " |
| 21 | |
| 22 | SRC_URI[md5sum] = "83513228984f671930752c3518cac6fd" |
| 23 | SRC_URI[sha256sum] = "112cb3e37e81a1ecd8e39516725dec0ce55c5f3df6284e0f4cc0f118750a987f" |
| 24 | |
| 25 | inherit autotools pkgconfig systemd |
| 26 | |
| 27 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | SYSTEMD_SERVICE:${PN} = "ecryptfs.service" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 29 | |
| 30 | EXTRA_OECONF = "\ |
| 31 | --libdir=${base_libdir} \ |
| 32 | --disable-pywrap \ |
| 33 | --disable-nls \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 34 | --with-pamdir=${base_libdir}/security \ |
Brad Bishop | 49e29a1 | 2019-09-01 15:21:06 -0400 | [diff] [blame] | 35 | --disable-openssl \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 36 | " |
| 37 | |
| 38 | PACKAGECONFIG ??= "nss \ |
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
| 40 | " |
| 41 | PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss," |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 42 | PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam," |
| 43 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | do_configure:prepend() { |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 45 | export NSS_CFLAGS="-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 46 | export NSS_LIBS="-L${STAGING_BASELIBDIR} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3" |
| 47 | export KEYUTILS_CFLAGS="-I${STAGING_INCDIR}" |
| 48 | export KEYUTILS_LIBS="-L${STAGING_LIBDIR} -lkeyutils" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | sed -i -e "s;rootsbindir=\"/sbin\";rootsbindir=\"\${base_sbindir}\";g" ${S}/configure.ac |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 50 | } |
| 51 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | do_install:append() { |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 53 | chmod 4755 ${D}${base_sbindir}/mount.ecryptfs_private |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | # ${base_libdir} is identical to ${libdir} when usrmerge enabled |
| 55 | if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then |
| 56 | mkdir -p ${D}/${libdir} |
| 57 | mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir} |
| 58 | fi |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 59 | sed -i -e 's:-I${STAGING_INCDIR}::' \ |
| 60 | -e 's:-L${STAGING_LIBDIR}::' ${D}/${libdir}/pkgconfig/libecryptfs.pc |
| 61 | sed -i -e "s: ${base_sbindir}/cryptsetup: ${sbindir}/cryptsetup:" ${D}${bindir}/ecryptfs-setup-swap |
| 62 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 63 | install -D -m 0644 ${WORKDIR}/ecryptfs.service ${D}${systemd_system_unitdir}/ecryptfs.service |
| 64 | fi |
| 65 | } |
| 66 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | FILES:${PN} += "${base_libdir}/security/* ${base_libdir}/ecryptfs/*" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | RDEPENDS:${PN} += "cryptsetup" |
| 70 | RRECOMMENDS:${PN} = "gettext-runtime" |