Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "Generic client/server library for SASL authentication" |
| 2 | SECTION = "libs" |
| 3 | HOMEPAGE = "http://asg.web.cmu.edu/sasl/" |
| 4 | DEPENDS = "openssl db groff-native" |
| 5 | LICENSE = "BSD-4-Clause" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" |
| 7 | |
| 8 | SRCREV = "7a6b45b177070198fed0682bea5fa87c18abb084" |
| 9 | |
| 10 | SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https;branch=cyrus-sasl-2.1 \ |
| 11 | file://avoid-to-call-AC_TRY_RUN.patch \ |
| 12 | file://debian_patches_0014_avoid_pic_overwrite.diff \ |
| 13 | file://0001-sample-Rename-dprintf-to-cyrus_dprintf.patch \ |
| 14 | file://saslauthd.service \ |
| 15 | file://saslauthd.conf \ |
| 16 | file://CVE-2019-19906.patch \ |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 17 | file://CVE-2022-24407.patch \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 18 | file://0001-Fix-time.h-check.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 19 | " |
| 20 | |
| 21 | UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives" |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | inherit autotools pkgconfig useradd systemd |
| 26 | |
| 27 | EXTRA_OECONF += "--with-dblib=berkeley \ |
| 28 | --with-plugindir='${libdir}/sasl2' \ |
| 29 | andrew_cv_runpath_switch=none" |
| 30 | |
| 31 | PACKAGECONFIG ??= "\ |
| 32 | ${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)} \ |
| 33 | " |
| 34 | PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," |
| 35 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," |
| 36 | PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," |
| 37 | PACKAGECONFIG[des] = "--with-des,--without-des,," |
| 38 | PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," |
| 39 | PACKAGECONFIG[ntlm] = "--enable-ntlm=yes,--enable-ntlm=no,," |
| 40 | |
| 41 | CFLAGS += "-fPIC" |
| 42 | |
| 43 | do_configure:prepend () { |
| 44 | # make it be able to work with db 5.0 version |
| 45 | local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" |
| 46 | for sed_file in $sed_files; do |
| 47 | sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' ${S}/$sed_file |
| 48 | done |
| 49 | } |
| 50 | |
| 51 | do_compile:prepend () { |
| 52 | cd include |
| 53 | ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/include/makemd5.c -o makemd5 |
| 54 | touch makemd5.o makemd5.lo makemd5 |
| 55 | cd .. |
| 56 | } |
| 57 | |
| 58 | do_install:append() { |
| 59 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 60 | install -d ${D}${systemd_unitdir}/system |
| 61 | install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system |
| 62 | |
| 63 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 64 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 65 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 66 | |
| 67 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 68 | echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf |
| 69 | |
| 70 | install -d ${D}${sysconfdir}/default/ |
| 71 | install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd |
| 72 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd |
| 73 | fi |
| 74 | } |
| 75 | |
| 76 | USERADD_PACKAGES = "${PN}-bin" |
| 77 | USERADD_PARAM:${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus" |
| 78 | |
| 79 | SYSTEMD_PACKAGES = "${PN}-bin" |
| 80 | SYSTEMD_SERVICE:${PN}-bin = "saslauthd.service" |
| 81 | SYSTEMD_AUTO_ENABLE = "disable" |
| 82 | |
| 83 | SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425" |
| 84 | SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3" |
| 85 | |
| 86 | PACKAGES =+ "${PN}-bin" |
| 87 | |
| 88 | FILES:${PN} += "${libdir}/sasl2/*.so*" |
| 89 | FILES:${PN}-bin += "${bindir} \ |
| 90 | ${sysconfdir}/default/saslauthd \ |
| 91 | ${systemd_unitdir}/system/saslauthd.service \ |
| 92 | ${sysconfdir}/tmpfiles.d/saslauthd.conf" |
| 93 | FILES:${PN}-dev += "${libdir}/sasl2/*.la" |
| 94 | FILES:${PN}-dbg += "${libdir}/sasl2/.debug" |
| 95 | FILES:${PN}-staticdev += "${libdir}/sasl2/*.a" |
| 96 | |
| 97 | INSANE_SKIP:${PN} += "dev-so" |
| 98 | |
| 99 | # CVE-2020-8032 affects only openSUSE |
| 100 | CVE_CHECK_IGNORE += "CVE-2020-8032" |