From 7fc8172e3d36c8ed48c62a27740ea4b59e88afee Mon Sep 17 00:00:00 2001 From: Hugo Vasconcelos Saldanha Date: Thu, 29 Jan 2015 18:22:19 -0200 Subject: crda: upgrade to 3.13 CRDA has been relicensed under the copyleft-next license. Regulatory bins license remains ISC. There is an new internal library called libreg.so which was placed in the same directory of the regulatory bin. The call to make was adjusted accordingly. Remove version 1.1.3. Signed-off-by: Hugo Vasconcelos Saldanha Signed-off-by: Martin Jansa Signed-off-by: Joe MacDonald --- ...STDIR-support-in-install-libreg-rules-in-.patch | 35 +++++++++++++++ ...e-linking-order-to-avoid-compilation-erro.patch | 51 ++++++++++++++++++++++ .../do-not-run-ldconfig-if-destdir-is-set.patch | 21 +++++++++ .../fix-linking-of-libraries-used-by-reglib.patch | 50 +++++++++++++++++++++ .../recipes-connectivity/crda/crda_1.1.3.bb | 38 ---------------- .../recipes-connectivity/crda/crda_3.13.bb | 43 ++++++++++++++++++ 6 files changed, 200 insertions(+), 38 deletions(-) create mode 100644 meta-networking/recipes-connectivity/crda/crda-3.13/crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch create mode 100644 meta-networking/recipes-connectivity/crda/crda-3.13/crda-Fix-the-linking-order-to-avoid-compilation-erro.patch create mode 100644 meta-networking/recipes-connectivity/crda/crda-3.13/do-not-run-ldconfig-if-destdir-is-set.patch create mode 100644 meta-networking/recipes-connectivity/crda/crda-3.13/fix-linking-of-libraries-used-by-reglib.patch delete mode 100644 meta-networking/recipes-connectivity/crda/crda_1.1.3.bb create mode 100644 meta-networking/recipes-connectivity/crda/crda_3.13.bb (limited to 'meta-networking/recipes-connectivity') diff --git a/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch b/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch new file mode 100644 index 0000000000..36464004dc --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch @@ -0,0 +1,35 @@ +From: "John W. Linville" +Date: Fri, 14 Feb 2014 13:58:44 -0500 +Subject: [PATCH] crda: Add DESTDIR support in install-libreg* rules in Makefile +Origin: https://git.kernel.org/?p=linux/kernel/git/mcgrof/crda.git/commit?id=2cabb2588da56735369131b709f191453c080be0 + +Upstream-Status: Backport + +Signed-off-by: John W. Linville +Signed-off-by: Luis R. Rodriguez +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 0b2f0d7..1f25509 100644 +--- a/Makefile ++++ b/Makefile +@@ -120,13 +120,13 @@ $(LIBREG): regdb.h reglib.h reglib.c + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' +- $(Q)mkdir -p $(INCLUDE_DIR) +- $(Q)cp *.h $(INCLUDE_DIR)/ ++ $(Q)mkdir -p $(DESTDIR)/$(INCLUDE_DIR) ++ $(Q)cp *.h $(DESTDIR)/$(INCLUDE_DIR)/ + + install-libreg: + $(NQ) ' INSTALL libreg' +- $(Q)mkdir -p $(LIBDIR) +- $(Q)cp $(LIBREG) $(LIBDIR)/ ++ $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) ++ $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ + $(Q)ldconfig + + %.o: %.c regdb.h $(LIBREG) diff --git a/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Fix-the-linking-order-to-avoid-compilation-erro.patch b/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Fix-the-linking-order-to-avoid-compilation-erro.patch new file mode 100644 index 0000000000..68b4b13e90 --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda-3.13/crda-Fix-the-linking-order-to-avoid-compilation-erro.patch @@ -0,0 +1,51 @@ +From: Krishna Chaitanya +Date: Mon, 16 Dec 2013 21:57:39 +0530 +Subject: [PATCH] crda: Fix the linking order to avoid compilation error +Origin: https://git.kernel.org/?p=linux/kernel/git/mcgrof/crda.git/commit?id=fefefdb2c52c8fbedbb339b4badb8226cad7e7e0 + +While linking the crda.o and libreg.so, first put crda.o +and then -lreg. This fixed the below error: + + GEN keys-gcrypt.c + Trusted pubkeys: pubkeys/linville.key.pub.pem + CC libreg.so + CC crda.o + LD crda +crda.o: In function `main': +crda/crda.c:196: undefined reference to `reglib_get_rd_alpha2' +collect2: ld returned 1 exit status +make: *** [crda] Error 1 + +Note: This still doesn't fix the below error (will send another mail) + + CHK /usr/lib/crda/regulatory.bin +Database signature verification failed. +Invalid or empty regulatory file, note: a binary regulatory file should be used. +make: *** [verify] Error 234 + +Upstream-Status: Backport + +Signed-off-by: Luis R. Rodriguez +Signed-off-by: Chaitanya T K +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 4a351c6..0b2f0d7 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,10 +28,11 @@ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys + CFLAGS += -O2 -fpic + CFLAGS += -std=gnu99 -Wall -Werror -pedantic + CFLAGS += -Wall -g +-LDLIBS += -lm + LDLIBREG += -lreg ++LDLIBS += $(LDLIBREG) ++LDLIBS += -lm + LIBREG += libreg.so +-LDFLAGS += -L ./ $(LDLIBREG) ++LDFLAGS += -L ./ + + all: all_noverify verify + diff --git a/meta-networking/recipes-connectivity/crda/crda-3.13/do-not-run-ldconfig-if-destdir-is-set.patch b/meta-networking/recipes-connectivity/crda/crda-3.13/do-not-run-ldconfig-if-destdir-is-set.patch new file mode 100644 index 0000000000..3ef35ee549 --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda-3.13/do-not-run-ldconfig-if-destdir-is-set.patch @@ -0,0 +1,21 @@ +From: Ben Hutchings +Date: Sat, 23 Aug 2014 12:27:34 -0700 +Subject: crda: Do not run ldconfig if DESTDIR is set + +Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html] + +Signed-off-by: Ben Hutchings +Signed-off-by: Joe MacDonald + +--- a/Makefile ++++ b/Makefile +@@ -132,7 +132,9 @@ install-libreg: + $(NQ) ' INSTALL libreg' + $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) + $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ ++ifndef DESTDIR + $(Q)ldconfig ++endif + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/meta-networking/recipes-connectivity/crda/crda-3.13/fix-linking-of-libraries-used-by-reglib.patch b/meta-networking/recipes-connectivity/crda/crda-3.13/fix-linking-of-libraries-used-by-reglib.patch new file mode 100644 index 0000000000..aceb56df74 --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda-3.13/fix-linking-of-libraries-used-by-reglib.patch @@ -0,0 +1,50 @@ +From: Ben Hutchings +Date: Sat, 23 Aug 2014 12:26:37 -0700 +Subject: Fix linking of libraries used by libreg + +The math and crypto libraries are called by and need to be linked to +libreg.so, not to the executables. + +Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html] + +Signed-off-by: Ben Hutchings +Signed-off-by: Joe MacDonald + +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda + CFLAGS += -Wall -g + LDLIBREG += -lreg + LDLIBS += $(LDLIBREG) +-LDLIBS += -lm ++LIBREGLDLIBS += -lm + LIBREG += libreg.so + LDFLAGS += -L ./ + +@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r + + ifeq ($(USE_OPENSSL),1) + CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` +-LDLIBS += `pkg-config --libs openssl` ++LIBREGLDLIBS += `pkg-config --libs openssl` + + ifeq ($(RUNTIME_PUBKEY_ONLY),1) + CFLAGS += -DRUNTIME_PUBKEY_ONLY +@@ -51,7 +51,7 @@ endif + + else + CFLAGS += -DUSE_GCRYPT +-LDLIBS += -lgcrypt ++LIBREGLDLIBS += -lgcrypt + + $(LIBREG): keys-gcrypt.c + +@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $( + + $(LIBREG): regdb.h reglib.h reglib.c + $(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ ++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS) + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' diff --git a/meta-networking/recipes-connectivity/crda/crda_1.1.3.bb b/meta-networking/recipes-connectivity/crda/crda_1.1.3.bb deleted file mode 100644 index 0bb899860b..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda_1.1.3.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Wireless Central Regulatory Domain Agent" -HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" - -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" - - -DEPENDS = "python-m2crypto-native python-native libgcrypt libnl" - -SRC_URI = "http://wireless.kernel.org/download/crda/${BP}.tar.bz2;name=crda \ - http://wireless.kernel.org/download/wireless-regdb/regulatory.bins/2013.01.11-regulatory.bin;name=bin \ -" -SRC_URI[crda.md5sum] = "29579185e06a75675507527243d28e5c" -SRC_URI[crda.sha256sum] = "aa8a7fe92f0765986c421a5b6768a185375ac210393df0605ee132f6754825f0" -SRC_URI[bin.md5sum] = "e0c8a5ca63fb8bf803213f9a0c90b50b" -SRC_URI[bin.sha256sum] = "b1ee0b20c123c612dfdb6851ab42c01666f66fb583e0e590942f19bb54cf84be" - -inherit python-dir pythonnative -# Recursive make problem -EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D}" - -do_compile() { - oe_runmake all_noverify -} - -do_install() { - oe_runmake SBINDIR=${sbindir}/ install - - install -d ${D}${libdir}/crda/ - - install -m 0644 ${WORKDIR}/2013.01.11-regulatory.bin ${D}${libdir}/crda/regulatory.bin -} - - -RDEPENDS_${PN} = "udev" -FILES_${PN} += "${libdir}crda/regulatory.bin \ - ${base_libdir}/udev/rules.d/85-regulatory.rules \ -" diff --git a/meta-networking/recipes-connectivity/crda/crda_3.13.bb b/meta-networking/recipes-connectivity/crda/crda_3.13.bb new file mode 100644 index 0000000000..2ccced42e6 --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda_3.13.bb @@ -0,0 +1,43 @@ +SUMMARY = "Wireless Central Regulatory Domain Agent" +HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" + +LICENSE = "copyleft-next-0.3.0 & ISC" +LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe \ + file://${WORKDIR}/wireless-regdb-2014.11.18/LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" + +DEPENDS = "python-m2crypto-native python-native" + +SRC_URI = "https://www.kernel.org/pub/software/network/crda/${BP}.tar.xz;name=crda \ + https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2014.11.18.tar.xz;name=bin \ + file://crda-Fix-the-linking-order-to-avoid-compilation-erro.patch \ + file://crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch \ + file://do-not-run-ldconfig-if-destdir-is-set.patch \ + file://fix-linking-of-libraries-used-by-reglib.patch \ +" +SRC_URI[crda.md5sum] = "66b1b0417c1ad19f0009a5c0c0c1aebc" +SRC_URI[crda.sha256sum] = "2f85da7ab0170b140d6ed62596c8f268d4a7dedecf84cac7182ada979742ff59" + +SRC_URI[bin.md5sum] = "d750c402c5510add7380edcb1d9b75b2" +SRC_URI[bin.sha256sum] = "eab6b50f30748a8b0065ba38cf3df05aac161a5861ae0a6c3cfd01d38a71c9dd" + +inherit python-dir pythonnative +# Recursive make problem +EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'" + +do_compile() { + oe_runmake all_noverify +} + +do_install() { + oe_runmake SBINDIR=${sbindir}/ install + + install -d ${D}${libdir}/crda/ + + install -m 0644 ${WORKDIR}/wireless-regdb-2014.11.18/regulatory.bin ${D}${libdir}/crda/regulatory.bin +} + + +RDEPENDS_${PN} = "udev libgcrypt libnl" +FILES_${PN} += "${libdir}crda/regulatory.bin \ + ${base_libdir}/udev/rules.d/85-regulatory.rules \ +" -- cgit v1.2.3-54-g00ecf