summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-05-08 10:00:34 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-05-08 17:45:01 +0200
commit2c2f05ba1b5e62c907da02736efe2697c454b4ae (patch)
tree258bd3b0e85da382266ca7cebbf4171fb7474f5c
parentbe3bc0ee3cde854a8d3a2b4c7690cfdfca18fe93 (diff)
downloadptxdist-2c2f05ba1b5e62c907da02736efe2697c454b4ae.tar.gz
ptxdist-2c2f05ba1b5e62c907da02736efe2697c454b4ae.tar.xz
crda: version bump 1.1.3 -> 3.13
There are some problems in the new version which get fixed by the additional patches. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> [mol: patch cleanup & update] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/crda-1.1.3/series4
-rw-r--r--patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch34
-rw-r--r--patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch (renamed from patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch)34
-rw-r--r--patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch19
-rw-r--r--patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch44
-rw-r--r--patches/crda-3.13/0005-fix-linking-libreg.patch52
-rw-r--r--patches/crda-3.13/series8
-rw-r--r--rules/crda.make9
8 files changed, 171 insertions, 33 deletions
diff --git a/patches/crda-1.1.3/series b/patches/crda-1.1.3/series
deleted file mode 100644
index 348caf1c5..000000000
--- a/patches/crda-1.1.3/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Pregenerate-keys-ssl.c.patch
-# aa6be6d26b37ec911763a7e1eefe3128 - git-ptx-patches magic
diff --git a/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
new file mode 100644
index 000000000..74473b0c4
--- /dev/null
+++ b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
@@ -0,0 +1,34 @@
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 14:40:49 +0200
+Subject: [PATCH] key2pub: Fix ssl-keys.c generation
+
+This patch fixes the generated ssl-keys.c file. Without these fixes,
+crda does not compile with ssl.
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ utils/key2pub.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 3e84cd2..7de45f7 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -59,7 +59,7 @@ def print_ssl_32(output, name, val):
+
+ def print_ssl(output, name, val):
+ import struct
+- output.write('#include <stdint.h>\n')
++ output.write('#include <stdint.h>\n#include <openssl/bn.h>\n')
+ if len(struct.pack('@L', 0)) == 8:
+ return print_ssl_64(output, name, val)
+ else:
+@@ -78,7 +78,7 @@ struct pubkey {
+
+ #define KEYS(e,n) { KEY(e), KEY(n), }
+
+-static struct pubkey keys[] = {
++__attribute__((unused)) static struct pubkey keys[] = {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
diff --git a/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
index 0fda5d19a..c6405de89 100644
--- a/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
+++ b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
@@ -2,37 +2,21 @@ From: Jan Luebbe <jlu@pengutronix.de>
Date: Thu, 26 Jan 2012 15:33:36 +0100
Subject: [PATCH] Pregenerate keys-ssl.c
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
- Makefile | 8 ++++----
- keys-ssl.c | 38 ++++++++++++++++++++++++++++++++++++++
- 2 files changed, 42 insertions(+), 4 deletions(-)
+ keys-ssl.c | 41 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
create mode 100644 keys-ssl.c
-diff --git a/Makefile b/Makefile
-index 084d8e5..80e3539 100644
---- a/Makefile
-+++ b/Makefile
-@@ -93,10 +93,10 @@ $(REG_BIN):
- $(NQ)
- $(Q) exit 1
-
--keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
-- $(NQ) ' GEN ' $@
-- $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
-- $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
-+#keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
-+# $(NQ) ' GEN ' $@
-+# $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
-+# $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
-
- %.o: %.c regdb.h
- $(NQ) ' CC ' $@
diff --git a/keys-ssl.c b/keys-ssl.c
new file mode 100644
-index 0000000..a8c1b7e
+index 0000000..7318c03
--- /dev/null
+++ b/keys-ssl.c
-@@ -0,0 +1,38 @@
+@@ -0,0 +1,41 @@
++#include <stdint.h>
++#include <openssl/bn.h>
++
+static BN_ULONG e_0[1] = {
+ 0x00010001,
+};
@@ -68,6 +52,6 @@ index 0000000..a8c1b7e
+
+#define KEYS(e,n) { KEY(e), KEY(n), }
+
-+static struct pubkey keys[] = {
++__attribute__((unused)) static struct pubkey keys[] = {
+ KEYS(e_0, n_0),
+};
diff --git a/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
new file mode 100644
index 000000000..68e850948
--- /dev/null
+++ b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
@@ -0,0 +1,19 @@
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 11:59:59 +0200
+Subject: [PATCH] udev: Fix rule for initial setup
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ udev/regulatory.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/udev/regulatory.rules b/udev/regulatory.rules
+index 3d6add8..90ac539 100644
+--- a/udev/regulatory.rules
++++ b/udev/regulatory.rules
+@@ -2,4 +2,4 @@
+ # For more information see:
+ # http://wireless.kernel.org/en/developers/Regulatory/CRDA
+
+-KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
++KERNEL=="regulatory*", ACTION=="add|change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
diff --git a/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
new file mode 100644
index 000000000..ceaa19f2e
--- /dev/null
+++ b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
@@ -0,0 +1,44 @@
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 15:34:35 +0200
+Subject: [PATCH] Makefile: Fix libreg build
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a351c6..b07d8ad 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,8 +5,8 @@ REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.g
+
+ PREFIX ?= /usr/
+ MANDIR ?= $(PREFIX)/share/man/
+-INCLUDE_DIR ?= $(PREFIX)/include/reglib/
+-LIBDIR ?= $(PREFIX)/lib
++INCLUDE_DIR ?= /include/reglib/
++LIBDIR ?= /lib/
+
+ SBINDIR ?= /sbin/
+
+@@ -119,14 +119,14 @@ $(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) $(DESTDIR)/$(INCLUDE_DIR)
++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(INCLUDE_DIR) *.h
+
+ install-libreg:
+ $(NQ) ' INSTALL libreg'
+- $(Q)mkdir -p $(LIBDIR)
+- $(Q)cp $(LIBREG) $(LIBDIR)/
+- $(Q)ldconfig
++ $(Q)$(MKDIR) $(LIBDIR)
++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(LIBDIR) $(LIBREG)
++# $(Q)ldconfig
+
+ %.o: %.c regdb.h $(LIBREG)
+ $(NQ) ' CC ' $@
diff --git a/patches/crda-3.13/0005-fix-linking-libreg.patch b/patches/crda-3.13/0005-fix-linking-libreg.patch
new file mode 100644
index 000000000..0229c09f2
--- /dev/null
+++ b/patches/crda-3.13/0005-fix-linking-libreg.patch
@@ -0,0 +1,52 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 8 May 2014 12:15:11 +0200
+Subject: [PATCH] fix linking libreg
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b07d8ad..2d6747c 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
++LIBREGLIBS += -lm
+ LDLIBREG += -lreg
+ LIBREG += libreg.so
+-LDFLAGS += -L ./ $(LDLIBREG)
++LDFLAGS += -L ./
++LDLIBS += $(LDLIBREG)
+
+ all: all_noverify verify
+
+@@ -39,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
+
+ ifeq ($(USE_OPENSSL),1)
+ CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+-LDLIBS += `pkg-config --libs openssl`
++LIBREGLIBS += `pkg-config --libs openssl`
+
+ $(LIBREG): keys-ssl.c
+
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LIBREGLIBS += -lgcrypt
+
+ $(LIBREG): keys-gcrypt.c
+
+@@ -115,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
+
+ $(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) $^ $(LIBREGLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
diff --git a/patches/crda-3.13/series b/patches/crda-3.13/series
new file mode 100644
index 000000000..b9a852d35
--- /dev/null
+++ b/patches/crda-3.13/series
@@ -0,0 +1,8 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-key2pub-Fix-ssl-keys.c-generation.patch
+0002-Pregenerate-keys-ssl.c.patch
+0003-udev-Fix-rule-for-initial-setup.patch
+0004-Makefile-Fix-libreg-build.patch
+0005-fix-linking-libreg.patch
+# 9dcc6620d08511a73c701d4068e90869 - git-ptx-patches magic
diff --git a/rules/crda.make b/rules/crda.make
index 18069e140..e9b8db90b 100644
--- a/rules/crda.make
+++ b/rules/crda.make
@@ -16,11 +16,11 @@ PACKAGES-$(PTXCONF_CRDA) += crda
#
# Paths and names
#
-CRDA_VERSION := 1.1.3
-CRDA_MD5 := 29579185e06a75675507527243d28e5c
+CRDA_VERSION := 3.13
+CRDA_MD5 := 66b1b0417c1ad19f0009a5c0c0c1aebc
CRDA := crda-$(CRDA_VERSION)
-CRDA_SUFFIX := tar.bz2
-CRDA_URL := http://linuxwireless.org/download/crda/$(CRDA).$(CRDA_SUFFIX)
+CRDA_SUFFIX := tar.xz
+CRDA_URL := $(call ptx/mirror, KERNEL, ../software/network/crda/$(CRDA).$(CRDA_SUFFIX))
CRDA_SOURCE := $(SRCDIR)/$(CRDA).$(CRDA_SUFFIX)
CRDA_DIR := $(BUILDDIR)/$(CRDA)
CRDA_LICENSE := unknown
@@ -58,6 +58,7 @@ $(STATEDIR)/crda.targetinstall:
@$(call install_copy, crda, 0, 0, 0755, -, /sbin/regdbdump)
@$(call install_copy, crda, 0, 0, 0644, -, \
/lib/udev/rules.d/85-regulatory.rules)
+ @$(call install_lib, crda, 0, 0, 0644, libreg)
# regulatory.bin was downloaded from:
# git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git