mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Markus Pargmann <mpa@pengutronix.de>
Subject: [ptxdist] [PATCH v2 4/8] crda: version bump 1.1.3 -> 3.13
Date: Thu,  8 May 2014 10:00:34 +0200	[thread overview]
Message-ID: <1399536038-23355-5-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1399536038-23355-1-git-send-email-mpa@pengutronix.de>

There are some problems in the new version which get fixed by the
additional patches.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 patches/crda-1.1.3/series                          |  4 --
 .../0001-key2pub-Fix-ssl-keys.c-generation.patch   | 38 +++++++++++++++++
 .../0002-Pregenerate-keys-ssl.c.patch}             | 40 +++++++-----------
 .../0003-udev-Fix-rule-for-initial-setup.patch     | 23 +++++++++++
 .../crda-3.13/0004-Makefile-Fix-libreg-build.patch | 48 ++++++++++++++++++++++
 patches/crda-3.13/series                           |  4 ++
 rules/crda.make                                    |  9 ++--
 7 files changed, 132 insertions(+), 34 deletions(-)
 delete mode 100644 patches/crda-1.1.3/series
 create mode 100644 patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
 rename patches/{crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch => crda-3.13/0002-Pregenerate-keys-ssl.c.patch} (60%)
 create mode 100644 patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
 create mode 100644 patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
 create mode 100644 patches/crda-3.13/series

diff --git a/patches/crda-1.1.3/series b/patches/crda-1.1.3/series
deleted file mode 100644
index 348caf1..0000000
--- 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 0000000..b67e801
--- /dev/null
+++ b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
@@ -0,0 +1,38 @@
+From 7394c6f238fccd893f0927ef4e768165e561c3d2 Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 14:40:49 +0200
+Subject: [PATCH 1/4] 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))
+-- 
+1.9.0
+
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
similarity index 60%
rename from patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
rename to patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
index 0fda5d1..10c19a2 100644
--- a/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
+++ b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
@@ -1,38 +1,23 @@
+From a314b1075e456268abe3f571fd00fd63e9a59c9b Mon Sep 17 00:00:00 2001
 From: Jan Luebbe <jlu@pengutronix.de>
 Date: Thu, 26 Jan 2012 15:33:36 +0100
-Subject: [PATCH] Pregenerate keys-ssl.c
+Subject: [PATCH 2/4] 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 +53,9 @@ 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),
 +};
+-- 
+1.9.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 0000000..e91b154
--- /dev/null
+++ b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
@@ -0,0 +1,23 @@
+From 2634bae34b4cb0870ee1f4f1cea228897307fe4c Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 11:59:59 +0200
+Subject: [PATCH 3/4] 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"
+-- 
+1.9.0
+
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 0000000..3ca3ae7
--- /dev/null
+++ b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
@@ -0,0 +1,48 @@
+From c0074b4554322f16f3547e647cf2b15613e6f7bb Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 15:34:35 +0200
+Subject: [PATCH 4/4] 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  ' $@
+-- 
+1.9.0
+
diff --git a/patches/crda-3.13/series b/patches/crda-3.13/series
new file mode 100644
index 0000000..ae68329
--- /dev/null
+++ b/patches/crda-3.13/series
@@ -0,0 +1,4 @@
+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
diff --git a/rules/crda.make b/rules/crda.make
index 18069e1..e9b8db9 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
-- 
2.0.0.rc0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2014-05-08  8:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08  8:00 [ptxdist] [PATCH v2 0/8] network packages updates Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 1/8] iproute2: version bump 3.9.0 -> 3.14.0 Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 2/8] iw: version bump 3.3 -> 3.14 Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 3/8] network: Add batctl Markus Pargmann
2014-05-08  8:00 ` Markus Pargmann [this message]
2014-05-08  8:00 ` [ptxdist] [PATCH v2 5/8] dnsmasq: version bump 2.47 -> 2.70 Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 6/8] iperf: version bump 2.0.4 -> 2.0.5 Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 7/8] wireshark: version bump 1.10.5 -> 1.10.6 Markus Pargmann
2014-05-08  8:00 ` [ptxdist] [PATCH v2 8/8] libjpeg: version bump 8a -> 9a, add binaries Markus Pargmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399536038-23355-5-git-send-email-mpa@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox