diff options
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb')
-rw-r--r-- | meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb b/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb new file mode 100644 index 0000000000..f7c8f17800 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns_2600.120.12.bb | |||
@@ -0,0 +1,131 @@ | |||
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://0001-Fix-build-with-gcc-15.patch \ | ||
17 | file://0001-Use-secure_getenv-on-Linux.patch \ | ||
18 | file://mdns.service \ | ||
19 | " | ||
20 | BRANCH = "rel/mDNSResponder-2600" | ||
21 | SRCREV = "3a0deda2995d98243dae379bcec10e57928c15e8" | ||
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 | |||
31 | inherit github-releases manpages systemd update-rc.d | ||
32 | |||
33 | PACKAGECONFIG ?= "tls \ | ||
34 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
35 | PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0" | ||
36 | PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0" | ||
37 | PACKAGECONFIG[manpages] = "" | ||
38 | PACKAGECONFIG[tls] = ",tls=no,mbedtls" | ||
39 | |||
40 | CVE_PRODUCT = "apple:mdnsresponder" | ||
41 | |||
42 | CVE_STATUS[CVE-2007-0613] = "not-applicable-platform: Issue affects Apple products \ | ||
43 | i.e. ichat,mdnsresponder, instant message framework and MacOS. Also, \ | ||
44 | https://www.exploit-db.com/exploits/3230 shows the part of code \ | ||
45 | affected by CVE-2007-0613 which is not preset in upstream source code. \ | ||
46 | Hence, CVE-2007-0613 does not affect other Yocto implementations and \ | ||
47 | is not reported for other distros can be marked whitelisted. \ | ||
48 | Links: https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613 \ | ||
49 | https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613 \ | ||
50 | https://security-tracker.debian.org/tracker/CVE-2007-0613 \ | ||
51 | https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613" | ||
52 | |||
53 | PARALLEL_MAKE = "" | ||
54 | |||
55 | EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=: ${PACKAGECONFIG_CONFARGS}" | ||
56 | |||
57 | # MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string, | ||
58 | # which are fixed anyway for build reproducibility. | ||
59 | TARGET_CPPFLAGS += "-DMDNS_VERSIONSTR_NODTS" | ||
60 | |||
61 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
62 | |||
63 | MDNS_BUILDDIR = "build/${@bb.utils.contains('PACKAGECONFIG','debug','debug','prod', d)}" | ||
64 | |||
65 | do_install () { | ||
66 | cd mDNSPosix | ||
67 | |||
68 | install -d ${D}${sbindir} | ||
69 | install ${MDNS_BUILDDIR}/mdnsd ${D}${sbindir} | ||
70 | |||
71 | install -d ${D}${libdir} | ||
72 | install -m 0644 ${MDNS_BUILDDIR}/libdns_sd.so ${D}${libdir}/libdns_sd.so.1 | ||
73 | ln -s libdns_sd.so.1 ${D}${libdir}/libdns_sd.so | ||
74 | |||
75 | install -d ${D}${includedir} | ||
76 | install -m 0644 ../mDNSShared/dns_sd.h ${D}${includedir} | ||
77 | |||
78 | install -d ${D}${mandir}/man8 | ||
79 | install -m 0644 ../mDNSShared/mDNSResponder.8 ${D}${mandir}/man8/mdnsd.8 | ||
80 | |||
81 | install -d ${D}${bindir} | ||
82 | install -m 0755 ../Clients/build/dns-sd ${D}${bindir} | ||
83 | |||
84 | install -d ${D}${libdir} | ||
85 | oe_libinstall -C ${MDNS_BUILDDIR} -so libnss_mdns-0.2 ${D}${libdir} | ||
86 | ln -s libnss_mdns-0.2.so ${D}${libdir}/libnss_mdns.so.2 | ||
87 | |||
88 | install -d ${D}${sysconfdir} | ||
89 | install -m 0644 nss_mdns.conf ${D}${sysconfdir} | ||
90 | |||
91 | install -d ${D}${mandir}/man5 | ||
92 | install -m 0644 nss_mdns.conf.5 ${D}${mandir}/man5 | ||
93 | |||
94 | install -d ${D}${mandir}/man8 | ||
95 | install -m 0644 libnss_mdns.8 ${D}${mandir}/man8 | ||
96 | |||
97 | install -d ${D}${systemd_system_unitdir} | ||
98 | install -m 0644 ${UNPACKDIR}/mdns.service ${D}${systemd_system_unitdir} | ||
99 | |||
100 | install -d ${D}${INIT_D_DIR} | ||
101 | install mdnsd.sh ${D}${INIT_D_DIR}/mdns | ||
102 | } | ||
103 | |||
104 | pkg_postinst:${PN}-libnss-mdns () { | ||
105 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | ||
106 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | ||
107 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns\3\4\5/' \ | ||
108 | -i $D${sysconfdir}/nsswitch.conf | ||
109 | fi | ||
110 | } | ||
111 | |||
112 | pkg_prerm:${PN}-libnss-mdns () { | ||
113 | if [ -r $D${sysconfdir}/nsswitch.conf ]; then | ||
114 | sed -e '/^hosts:/s/\s*\<mdns\>//' \ | ||
115 | -e '/^hosts:/s/\s*mdns//' \ | ||
116 | -i $D${sysconfdir}/nsswitch.conf | ||
117 | fi | ||
118 | } | ||
119 | |||
120 | SYSTEMD_SERVICE:${PN} = "mdns.service" | ||
121 | INITSCRIPT_NAME = "mdns" | ||
122 | |||
123 | PACKAGE_BEFORE_PN = "${PN}-libnss-mdns" | ||
124 | |||
125 | RRECOMMENDS:${PN}:append:libc-glibc = " ${PN}-libnss-mdns" | ||
126 | |||
127 | FILES_SOLIBSDEV = "${libdir}/libdns_sd.so" | ||
128 | FILES:${PN}-libnss-mdns = "${sysconfdir}/nss_mdns.conf ${libdir}/libnss_mdns*.so*" | ||
129 | RPROVIDES:${PN}-libnss-mdns = "libnss-mdns" | ||
130 | |||
131 | RPROVIDES:${PN} += "libdns-sd" | ||