diff options
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/mdns_2600.100.147.bb')
| -rw-r--r-- | meta-networking/recipes-protocols/mdns/mdns_2600.100.147.bb | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/mdns_2600.100.147.bb b/meta-networking/recipes-protocols/mdns/mdns_2600.100.147.bb new file mode 100644 index 0000000000..af1400ca6e --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns_2600.100.147.bb | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol" | ||
| 2 | DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks." | ||
| 3 | HOMEPAGE = "https://developer.apple.com/bonjour/" | ||
| 4 | LICENSE = "Apache-2.0 & BSD-3-Clause" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=31c50371921e0fb731003bbc665f29bf" | ||
| 6 | |||
| 7 | DEPENDS:append:libc-musl = " musl-nscd" | ||
| 8 | |||
| 9 | SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https;branch=${BRANCH};tag=mDNSResponder-${PV} \ | ||
| 10 | file://0001-dns-sd-Include-missing-headers.patch \ | ||
| 11 | file://0002-make-Set-libdns_sd.so-soname-correctly.patch \ | ||
| 12 | file://0004-make-Separate-TLS-targets-from-libraries.patch \ | ||
| 13 | file://0005-mDNSCore-Fix-broken-debug-parameter.patch \ | ||
| 14 | file://0006-make-Add-top-level-Makefile.patch \ | ||
| 15 | file://0009-remove-unneeded-headers.patch \ | ||
| 16 | file://0005-Fix-missing-limit-declarations.patch \ | ||
| 17 | file://0001-Fix-build-with-gcc-15.patch \ | ||
| 18 | file://mdns.service \ | ||
| 19 | " | ||
| 20 | BRANCH = "main" | ||
| 21 | SRCREV = "d89f8d1d0e001b810d6c055aa2a57b768bcf9aa2" | ||
| 22 | |||
| 23 | # We install a stub Makefile in the top directory so that the various checks | ||
| 24 | # in base.bbclass pass their tests for a Makefile, this ensures (that amongst | ||
| 25 | # other things) the sstate checks will clean the build directory when the | ||
| 26 | # task hashes changes. | ||
| 27 | # | ||
| 28 | # We can't use the approach of setting ${S} to mDNSPosix as we need | ||
| 29 | # DEBUG_PREFIX_MAP to cover files which come from the Clients directory too. | ||
| 30 | S = "${WORKDIR}/git" | ||
| 31 | |||
| 32 | inherit github-releases manpages systemd update-rc.d | ||
| 33 | |||
| 34 | PACKAGECONFIG ?= "tls \ | ||
| 35 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
| 36 | PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0" | ||
| 37 | PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0" | ||
| 38 | PACKAGECONFIG[manpages] = "" | ||
| 39 | PACKAGECONFIG[tls] = ",tls=no,mbedtls" | ||
| 40 | |||
| 41 | CVE_PRODUCT = "apple:mdnsresponder" | ||
| 42 | |||
| 43 | CVE_STATUS[CVE-2007-0613] = "not-applicable-platform: Issue affects Apple products \ | ||
| 44 | i.e. ichat,mdnsresponder, instant message framework and MacOS. Also, \ | ||
| 45 | https://www.exploit-db.com/exploits/3230 shows the part of code \ | ||
| 46 | affected by CVE-2007-0613 which is not preset in upstream source code. \ | ||
| 47 | Hence, CVE-2007-0613 does not affect other Yocto implementations and \ | ||
| 48 | is not reported for other distros can be marked whitelisted. \ | ||
| 49 | Links: https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613 \ | ||
| 50 | https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613 \ | ||
| 51 | https://security-tracker.debian.org/tracker/CVE-2007-0613 \ | ||
| 52 | https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613" | ||
| 53 | |||
| 54 | PARALLEL_MAKE = "" | ||
| 55 | |||
| 56 | EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=: ${PACKAGECONFIG_CONFARGS}" | ||
| 57 | |||
| 58 | # MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string, | ||
| 59 | # which are fixed anyway for build reproducibility. | ||
| 60 | TARGET_CPPFLAGS += "-DMDNS_VERSIONSTR_NODTS" | ||
| 61 | |||
| 62 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
| 63 | |||
| 64 | MDNS_BUILDDIR = "build/${@bb.utils.contains('PACKAGECONFIG','debug','debug','prod', d)}" | ||
| 65 | |||
| 66 | do_install () { | ||
| 67 | cd mDNSPosix | ||
| 68 | |||
| 69 | install -d ${D}${sbindir} | ||
| 70 | install ${MDNS_BUILDDIR}/mdnsd ${D}${sbindir} | ||
| 71 | |||
| 72 | install -d ${D}${libdir} | ||
| 73 | install -m 0644 ${MDNS_BUILDDIR}/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 | ||
| 74 | ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so | ||
| 75 | |||
| 76 | install -d ${D}${includedir} | ||
| 77 | install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir} | ||
| 78 | |||
| 79 | install -d ${D}${mandir}/man8 | ||
| 80 | install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 | ||
| 81 | |||
| 82 | install -d ${D}${bindir} | ||
| 83 | install -m 0755 ../Clients/build/dns-sd ${D}${bindir} | ||
| 84 | |||
| 85 | install -d ${D}${libdir} | ||
| 86 | oe_libinstall -C ${MDNS_BUILDDIR} -so libnss_mdns-0.2 ${D}${libdir} | ||
| 87 | ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 | ||
| 88 | |||
| 89 | install -d ${D}${sysconfdir} | ||
| 90 | install -m 0644 nss_mdns.conf ${D}${sysconfdir} | ||
| 91 | |||
| 92 | install -d ${D}${mandir}/man5 | ||
| 93 | install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5 | ||
| 94 | |||
| 95 | install -d ${D}${mandir}/man8 | ||
| 96 | install -m 0644 libnss_mdns.8 ${D}${mandir}/man8 | ||
| 97 | |||
| 98 | install -d ${D}${systemd_system_unitdir} | ||
| 99 | install -m 0644 ${UNPACKDIR}/mdns.service ${D}${systemd_system_unitdir} | ||
| 100 | |||
| 101 | install -d ${D}${INIT_D_DIR} | ||
| 102 | install mdnsd.sh ${D}${INIT_D_DIR}/mdns | ||
| 103 | } | ||
| 104 | |||
| 105 | pkg_postinst:${PN}-libnss-mdns () { | ||
| 106 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | ||
| 107 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | ||
| 108 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ | ||
| 109 | -i $D${sysconfdir}/nsswitch.conf | ||
| 110 | fi | ||
| 111 | } | ||
| 112 | |||
| 113 | pkg_prerm:${PN}-libnss-mdns () { | ||
| 114 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | ||
| 115 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | ||
| 116 | -e '/^hosts:/s/\s*mdns//' \ | ||
| 117 | -i $D${sysconfdir}/nsswitch.conf | ||
| 118 | fi | ||
| 119 | } | ||
| 120 | |||
| 121 | SYSTEMD_SERVICE:${PN} = "mdns.service" | ||
| 122 | INITSCRIPT_NAME = "mdns" | ||
| 123 | |||
| 124 | PACKAGE_BEFORE_PN = "${PN}-libnss-mdns" | ||
| 125 | |||
| 126 | RRECOMMENDS:${PN}:append:libc-glibc = " ${PN}-libnss-mdns" | ||
| 127 | |||
| 128 | FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" | ||
| 129 | FILES:${PN}-libnss-mdns = "${sysconfdir}/nss_mdns.conf ${libdir}/libnss_mdns*.so*" | ||
| 130 | RPROVIDES:${PN}-libnss-mdns = "libnss-mdns" | ||
| 131 | |||
| 132 | RPROVIDES:${PN} += "libdns-sd" | ||
