<commit_before>SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol"
DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks."
HOMEPAGE = "http://developer.apple.com/networking/bonjour/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf"

COMPATIBLE_HOST_libc-musl = 'null'

RPROVIDES_${PN} += "libdns_sd.so"

SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
           file://build.patch;patchdir=.. \
           file://mdns.service \
           file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch;patchdir=.. \
           file://0002-Create-subroutine-for-tearing-down-an-interface.patch;patchdir=.. \
           file://0003-Track-interface-socket-family.patch;patchdir=.. \
           file://0004-Use-list-for-changed-interfaces.patch;patchdir=.. \
           file://0005-Handle-noisy-netlink-sockets.patch;patchdir=.. \
           file://0006-Remove-unneeded-function.patch;patchdir=.. \
           file://0007-Indicate-loopback-interface-to-mDNS-core.patch;patchdir=.. \
           file://0008-Mark-deleted-interfaces-as-being-changed.patch;patchdir=.. \
           file://0009-Fix-possible-NULL-dereference.patch;patchdir=.. \
           file://0010-Handle-errors-from-socket-calls.patch;patchdir=.. \
           file://0011-Change-a-dynamic-allocation-to-file-scope-variable.patch;patchdir=.. \
           "
SRC_URI[md5sum] = "4e139a8e1133349006b0436291c9e29b"
SRC_URI[sha256sum] = "2cef0ee9900504c5277fb81de0a28e6c0835fe482ebecf1067c6864f5c4eda74"

PARALLEL_MAKE = ""

S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix"

EXTRA_OEMAKE += "os=linux DEBUG=0 'CC=${CC}' 'LD=${CCLD} ${LDFLAGS}'"

TARGET_CC_ARCH += "${LDFLAGS}"

do_install () {
    install -d ${D}${sbindir}
    install -m 0755 build/prod/mdnsd ${D}${sbindir}

    install -d ${D}${libdir}<commit_msg>mdns: Whitelisted CVE-2007-0613 for mdns<commit_after>SUMMARY = "Publishes & browses available services on a link according to the Zeroconf / Bonjour protocol"
DESCRIPTION = "Bonjour, also known as zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks."
HOMEPAGE = "http://developer.apple.com/networking/bonjour/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf"

COMPATIBLE_HOST_libc-musl = 'null'

RPROVIDES_${PN} += "libdns_sd.so"

SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
           file://build.patch;patchdir=.. \
           file://mdns.service \
           file://0001-Create-subroutine-for-cleaning-recent-interfaces.patch;patchdir=.. \
           file://0002-Create-subroutine-for-tearing-down-an-interface.patch;patchdir=.. \
           file://0003-Track-interface-socket-family.patch;patchdir=.. \
           file://0004-Use-list-for-changed-interfaces.patch;patchdir=.. \
           file://0005-Handle-noisy-netlink-sockets.patch;patchdir=.. \
           file://0006-Remove-unneeded-function.patch;patchdir=.. \
           file://0007-Indicate-loopback-interface-to-mDNS-core.patch;patchdir=.. \
           file://0008-Mark-deleted-interfaces-as-being-changed.patch;patchdir=.. \
           file://0009-Fix-possible-NULL-dereference.patch;patchdir=.. \
           file://0010-Handle-errors-from-socket-calls.patch;patchdir=.. \
           file://0011-Change-a-dynamic-allocation-to-file-scope-variable.patch;patchdir=.. \
           "
SRC_URI[md5sum] = "4e139a8e1133349006b0436291c9e29b"
SRC_URI[sha256sum] = "2cef0ee9900504c5277fb81de0a28e6c0835fe482ebecf1067c6864f5c4eda74"

# CVE-2007-0613 is not applicable as it only affects Apple products
# i.e. ichat,mdnsresponder, instant message framework and MacOS.
# Also, https://www.exploit-db.com/exploits/3230 shows the part of code
# affected by CVE-2007-0613 which is not preset in upstream source code.
# Hence, CVE-2007-0613 does not affect other Yocto implementations and
# is not reported for other distros can be marked whitelisted.
# Links:
# https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613
# https://www.incibe-cert.es/en/early-warning/vulnerabilities/cve-2007-0613
# https://security-tracker.debian.org/tracker/CVE-2007-0613
# https://vulmon.com/vulnerabilitydetails?qid=CVE-2007-0613
CVE_CHECK_WHITELIST += "CVE-2007-0613"

PARALLEL_MAKE = ""

S = "${WORKDIR}/mDNSResponder-${PV}/mDNSPosix"

EXTRA_OEMAKE += "os=linux DEBUG=0 'CC=${CC}' 'LD=${CCLD} ${LDFLAGS}'"

TARGET_CC_ARCH += "${LDFLAGS}"

do_install () {
    install -d ${D}${sbindir}
    install -m 0755 build/prod/mdnsd ${D}${sbindir}

    install -d ${D}${libdir}
{'fraction_non_alphanumeric': 0.15341146923398913, 'fraction_numerical': 0.07492674759313521, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '370191', 'n_tokens_mistral': 1960, 'n_tokens_neox': 1717, 'n_words': 232}