aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-02-20 17:24:30 +0100
committerArmin Kuster <akuster808@gmail.com>2023-03-05 07:44:28 -0500
commitdfcbe97b557891ce491a49ed5f5b01e19585f44a (patch)
treea77102e022217ddf9a321167538bb3500de6ef68 /meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch
parent31801ca33ed28db3cc418ac4b64b2e556afe7551 (diff)
downloadmeta-openembedded-dfcbe97b557891ce491a49ed5f5b01e19585f44a.tar.gz
mdns: use git fetcher
* https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz is just redirect to unsafe github archives which are regenerated from time to time. * We do have src-uri-bad QA check which prevents to use github archives in SRC_URI since 2019: https://github.com/openembedded/openembedded-core/commit/21f84fcdd659544437fe393285c407e1e9432043 but this cannot catch such redirects, see: $ wget https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.30.4.tar.gz --2023-01-31 10:06:02-- https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.30.4.tar.gz Resolving opensource.apple.com (opensource.apple.com)... 17.253.73.203, 17.253.73.206, 2a01:b740:a26:f000::5, ... Connecting to opensource.apple.com (opensource.apple.com)|17.253.73.203|:443... connected. HTTP request sent, awaiting response... 302 Redirect Location: https://github.com/apple-oss-distributions/mDNSResponder/archive/refs/tags/mDNSResponder-878.30.4.tar.gz [following] --2023-01-31 10:06:02-- https://github.com/apple-oss-distributions/mDNSResponder/archive/refs/tags/mDNSResponder-878.30.4.tar.gz Resolving github.com (github.com)... 140.82.121.3 Connecting to github.com (github.com)|140.82.121.3|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/apple-oss-distributions/mDNSResponder/tar.gz/refs/tags/mDNSResponder-878.30.4 [following] --2023-01-31 10:06:02-- https://codeload.github.com/apple-oss-distributions/mDNSResponder/tar.gz/refs/tags/mDNSResponder-878.30.4 Resolving codeload.github.com (codeload.github.com)... 140.82.121.10 Connecting to codeload.github.com (codeload.github.com)|140.82.121.10|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/x-gzip] Saving to: ?mDNSResponder-878.30.4.tar.gz? * The tarball was regenerated recently as discussed in: https://github.com/orgs/community/discussions/45830 * Use top-level directory in S to fix DEBUG_PREFIX_MAP usage like the version in master does, the only exception here is that there still was top-level Makefile (which fails to set VER with: Makefile:26: *** missing separator. Stop. so use the simple one like newer version in master) * it's already included in master as part of version upgrade in: https://github.com/openembedded/meta-openembedded/commit/ec96eb577bd518b89e2e7834bd569ba269df458f Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch')
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch145
1 files changed, 145 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch b/meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch
new file mode 100644
index 0000000000..33590ffc57
--- /dev/null
+++ b/meta-networking/recipes-protocols/mdns/mdns/0002-mdns-cross-compilation-fixes-for-bitbake.patch
@@ -0,0 +1,145 @@
+From 72405143f9d16514e70b88bc4843c9634b88036a Mon Sep 17 00:00:00 2001
+From: Brendan Le Foll <brendan.le.foll@intel.com>
+Date: Tue, 3 Mar 2015 11:42:57 +0000
+Subject: [PATCH 2/2] mdns: cross compilation fixes for bitbake
+
+Fixes several build errors when incorrect compiler or
+compiler flags are used.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
+---
+ mDNSPosix/Makefile | 44 ++++++++++++++++++++------------------------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
+diff --git a/mDNSPosix/Makefile b/mDNSPosix/Makefile
+index 78222e0..18a3af5 100755
+--- a/mDNSPosix/Makefile
++++ b/mDNSPosix/Makefile
+@@ -50,6 +50,7 @@
+
+ LIBVERS = 1
+
++POSIXDIR = ../mDNSPosix
+ COREDIR = ../mDNSCore
+ SHAREDDIR ?= ../mDNSShared
+ DSODIR ?= ../DSO
+@@ -62,16 +63,16 @@ else ifeq ($(SYSTEM), Linux)
+ os=linux
+ endif
+
+-CC = cc
+-BISON = bison
+-FLEX = flex
+-ST = strip
+-LD = ld
++CC ?= cc
++BISON ?= bison
++FLEX ?= flex
++ST ?= strip
++LD ?= ld
+ SOOPTS = -shared
+ CP = cp
+ RM = rm
+ LN = ln -s -f
+-CFLAGS_COMMON = -I$(COREDIR) -I$(SHAREDDIR) -I$(DSODIR) -I$(PROXYDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
++CFLAGS_COMMON = -I$(POSIXDIR) -I$(COREDIR) -I$(SHAREDDIR) -I$(DSODIR) -I$(PROXYDIR) -I$(OBJDIR) -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\"
+ CFLAGS_PTHREAD =
+ LINKOPTS =
+ LINKOPTS_PTHREAD = -lpthread
+@@ -85,6 +86,7 @@ CFLAGS_OPEN_SOURCE=
+ endif
+
+ # Set up diverging paths for debug vs. prod builds
++DEBUG ?= 1
+ ifeq "$(DEBUG)" "1"
+ CFLAGS_DEBUGGING = -g -DMDNS_DEBUGMSGS=2
+ OBJDIR = objects/debug
+@@ -101,8 +103,8 @@ else
+ # 1. We want to make small binaries, suitable for putting into hardware devices
+ # 2. Some of the code analysis warnings only work when some form of optimization is enabled
+ CFLAGS_DEBUGGING = -g -DMDNS_DEBUGMSGS=0
+-OBJDIR ?= objects/prod
+-BUILDDIR ?= build/prod
++OBJDIR = objects/prod
++BUILDDIR = build/prod
+ STRIP = $(ST) -S
+ endif
+ endif
+@@ -125,7 +127,7 @@ else
+ # any target that contains the string "linux"
+ ifeq ($(findstring linux,$(os)),linux)
+ CFLAGS_OS = -D_GNU_SOURCE -DHAVE_IPV6 -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX -ftabstop=4
+-LD = $(CC)
++LD ?= $(CC)
+ SOOPTS = -shared
+ FLEXFLAGS_OS = -l
+ JAVACFLAGS_OS += -I$(JDK)/include/linux
+@@ -276,8 +278,7 @@ Daemon: setup $(BUILDDIR)/mdnsd
+ @echo "Responder daemon done"
+
+ $(BUILDDIR)/mdnsd: $(DAEMONOBJS)
+- $(CC) -o $@ $+ $(LINKOPTS)
+- $(STRIP) $@
++ $(LD) -o $@ $+
+
+ # libdns_sd target builds the client library
+ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+@@ -286,13 +287,9 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
+ CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o
+
+ $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS)
+- $(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+
+- $(STRIP) $@
+-
+-Clients: setup libdns_sd ../Clients/build/dns-sd
+- @echo "Clients done"
++ $(LD) -shared $(LINKOPTS) -Wl,-soname,libdns_sd.$(LDSUFFIX).1 -o $@ $+
+
+-../Clients/build/dns-sd: ../Clients/dns-sd.c
++Clients: setup libdns_sd
+ $(MAKE) -C ../Clients DEBUG=$(DEBUG) SUPMAKE_CFLAGS="$(MDNSCFLAGS)"
+
+ # nss_mdns target builds the Name Service Switch module
+@@ -300,8 +297,7 @@ nss_mdns: setup $(BUILDDIR)/$(NSSLIBFILE)
+ @echo "Name Service Switch module done"
+
+ $(BUILDDIR)/$(NSSLIBFILE): $(CLIENTLIBOBJS) $(OBJDIR)/nss_mdns.c.so.o
+- $(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+
+- $(STRIP) $@
++ $(LD) -shared $(LINKOPTS) -o $@ $+
+
+ #############################################################################
+
+@@ -494,21 +490,21 @@ dnsextd: setup $(BUILDDIR)/dnsextd
+ @echo "dnsextd done"
+
+ $(BUILDDIR)/mDNSClientPosix: $(APPOBJ) $(OBJDIR)/Client.c.o
+- $(CC) $+ -o $@ $(LINKOPTS)
++ $(CC) $+ -o $@
+
+ $(BUILDDIR)/mDNSResponderPosix: $(COMMONOBJ) $(OBJDIR)/Responder.c.o
+- $(CC) $+ -o $@ $(LINKOPTS)
++ $(CC) $+ -o $@
+
+ $(BUILDDIR)/mDNSProxyResponderPosix: $(COMMONOBJ) $(OBJDIR)/ProxyResponder.c.o
+- $(CC) $+ -o $@ $(LINKOPTS)
++ $(CC) $+ -o $@
+
+ $(BUILDDIR)/mDNSNetMonitor: $(SPECIALOBJ) $(OBJDIR)/NetMonitor.c.o
+- $(CC) $+ -o $@ $(LINKOPTS)
++ $(CC) $+ -o $@
+
+ $(OBJDIR)/NetMonitor.c.o: $(COREDIR)/mDNS.c # Note: NetMonitor.c textually imports mDNS.c
+
+ $(BUILDDIR)/dnsextd: $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o
+- $(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD)
++ $(CC) $+ -o $@ $(LINKOPTS_PTHREAD)
+
+ #############################################################################
+
+--
+2.20.1
+