[arch-commits] Commit in crda/trunk (6 files)

Thomas Bächler thomas at nymeria.archlinux.org
Fri Feb 21 19:32:42 UTC 2014


    Date: Friday, February 21, 2014 @ 20:32:41
  Author: thomas
Revision: 206211

crda: Update to 3.13 - and fix the abomination of a Makefile being shipped.

Added:
  crda/trunk/0001-Makefile-Don-t-run-ldconfig.patch
  crda/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
  crda/trunk/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
  crda/trunk/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
Modified:
  crda/trunk/PKGBUILD
Deleted:
  crda/trunk/libnl32.patch

-----------------------------------------------------------------+
 0001-Makefile-Don-t-run-ldconfig.patch                          |   24 ++++
 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch   |   55 ++++++++++
 0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch |   52 +++++++++
 0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch |   37 ++++++
 PKGBUILD                                                        |   32 ++++-
 libnl32.patch                                                   |   12 --
 6 files changed, 192 insertions(+), 20 deletions(-)

Added: 0001-Makefile-Don-t-run-ldconfig.patch
===================================================================
--- 0001-Makefile-Don-t-run-ldconfig.patch	                        (rev 0)
+++ 0001-Makefile-Don-t-run-ldconfig.patch	2014-02-21 19:32:41 UTC (rev 206211)
@@ -0,0 +1,24 @@
+From 15bc8065e9dc5485c650c528f8d80f7536e378d6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas at archlinux.org>
+Date: Fri, 21 Feb 2014 20:30:24 +0100
+Subject: [PATCH] Makefile: Don't run ldconfig
+
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 80f4946..c003195 100644
+--- a/Makefile
++++ b/Makefile
+@@ -130,7 +130,6 @@ install-libreg:
+ 	$(NQ) '  INSTALL  libreg'
+ 	$(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
+ 	$(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
+-	$(Q)ldconfig
+ 
+ %.o: %.c regdb.h $(LIBREG)
+ 	$(NQ) '  CC  ' $@
+-- 
+1.9.0
+

Added: 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
===================================================================
--- 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch	                        (rev 0)
+++ 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch	2014-02-21 19:32:41 UTC (rev 206211)
@@ -0,0 +1,55 @@
+From e2e519730c33de4503ac5dda28863d029e3cf578 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas at archlinux.org>
+Date: Fri, 21 Feb 2014 20:15:32 +0100
+Subject: [PATCH] Makefile: Link libreg.so against the crypto library.
+
+---
+ Makefile | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1f25509..80f4946 100644
+--- a/Makefile
++++ b/Makefile
+@@ -33,6 +33,7 @@ LDLIBS += $(LDLIBREG)
+ LDLIBS += -lm
+ LIBREG += libreg.so
+ LDFLAGS += -L ./
++LIBREG_LDFLAGS += -lm
+ 
+ all: all_noverify verify
+ 
+@@ -40,17 +41,19 @@ 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`
++LDCRYPTOLIB := `pkg-config --libs openssl`
+ 
+ $(LIBREG): keys-ssl.c
+ 
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LDCRYPTOLIB := -lgcrypt
+ 
+ $(LIBREG): keys-gcrypt.c
+ 
+ endif
++LDLIBS += $(LDCRYPTOLIB)
++LIBREG_LDFLAGS += $(LDCRYPTOLIB)
+ MKDIR ?= mkdir -p
+ INSTALL ?= install
+ 
+@@ -116,7 +119,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) $^ $(LIBREG_LDFLAGS)
+ 
+ install-libreg-headers:
+ 	$(NQ) '  INSTALL  libreg-headers'
+-- 
+1.9.0
+

Added: 0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
===================================================================
--- 0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch	                        (rev 0)
+++ 0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch	2014-02-21 19:32:41 UTC (rev 206211)
@@ -0,0 +1,52 @@
+From fefefdb2c52c8fbedbb339b4badb8226cad7e7e0 Mon Sep 17 00:00:00 2001
+From: Krishna Chaitanya <chaitanya.mgit at gmail.com>
+Date: Mon, 16 Dec 2013 21:57:39 +0530
+Subject: [PATCH] crda: Fix the linking order to avoid compilation error
+
+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
+
+Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
+Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
+---
+ 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
+ 
+-- 
+1.9.0
+

Added: 0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
===================================================================
--- 0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch	                        (rev 0)
+++ 0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch	2014-02-21 19:32:41 UTC (rev 206211)
@@ -0,0 +1,37 @@
+From 2cabb2588da56735369131b709f191453c080be0 Mon Sep 17 00:00:00 2001
+From: "John W. Linville" <linville at tuxdriver.com>
+Date: Fri, 14 Feb 2014 13:58:44 -0500
+Subject: [PATCH 2/2] crda: Add DESTDIR support in install-libreg* rules in
+ Makefile
+
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
+---
+ 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)
+-- 
+1.9.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-02-21 18:58:31 UTC (rev 206210)
+++ PKGBUILD	2014-02-21 19:32:41 UTC (rev 206211)
@@ -2,8 +2,8 @@
 # Maintainer: Thomas Bächler <thomas at archlinux.org>
 
 pkgname=crda
-pkgver=1.1.3
-pkgrel=3
+pkgver=3.13
+pkgrel=1
 pkgdesc="Central Regulatory Domain Agent for wireless networks"
 arch=(i686 x86_64)
 url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
@@ -11,17 +11,33 @@
 depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd' 'iw')
 makedepends=('python2-m2crypto')
 install=crda.install
-source=(http://wireless.kernel.org/download/crda/${pkgname}-${pkgver}.tar.bz2
-        set-wireless-regdom)
-md5sums=('29579185e06a75675507527243d28e5c'
-         '65c93f2ff2eb1b29d9e9fa102ae2dd45')
+source=(https://kernel.org/pub/software/network/crda/${pkgname}-${pkgver}.tar.xz
+        set-wireless-regdom
+        0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
+        0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
+        0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
+        0001-Makefile-Don-t-run-ldconfig.patch)
+sha256sums=('2f85da7ab0170b140d6ed62596c8f268d4a7dedecf84cac7182ada979742ff59'
+            '603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3'
+            '8920b5988eb1befe13f88ce5c0dbbf30c294796d613681a2b0925f6f8534c51b'
+            'ced0a372b06ffd64f90be77d7267c9d8cc10413bc017c3154b7208dbf69be3cb'
+            '96b2068b27202f8bc78009869520e396cb3f3ac7a826efef06d0fc41047f2520'
+            'ff52990cf9295e5cebcf07ebbf2a96e225d97088573edcc898b29ce33a0fb663')
 
-build() {
+prepare() {
   cd "${srcdir}"/${pkgname}-${pkgver}
   sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py
-  make crda regdbdump
+  patch -p1 -i "${srcdir}"/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
+  patch -p1 -i "${srcdir}"/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
+  patch -p1 -i "${srcdir}"/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
+  patch -p1 -i "${srcdir}"/0001-Makefile-Don-t-run-ldconfig.patch
 }
 
+build() {
+  cd "${srcdir}"/${pkgname}-${pkgver}
+  make
+}
+
 package() {
   # Install crda, regdbdump and udev rules
   cd "${srcdir}"/${pkgname}-${pkgver}

Deleted: libnl32.patch
===================================================================
--- libnl32.patch	2014-02-21 18:58:31 UTC (rev 206210)
+++ libnl32.patch	2014-02-21 19:32:41 UTC (rev 206211)
@@ -1,12 +0,0 @@
-diff -u -r crda-1.1.2/Makefile crda-1.1.2-libnl32/Makefile
---- crda-1.1.2/Makefile	2011-08-10 01:36:19.000000000 +0200
-+++ crda-1.1.2-libnl32/Makefile	2012-02-09 18:53:33.376430180 +0100
-@@ -51,7 +51,7 @@
- 
- ifeq ($(NL3FOUND),Y)
- CFLAGS += -DCONFIG_LIBNL30
--NLLIBS += -lnl-genl
-+NLLIBS += $(shell pkg-config --libs libnl-genl-3.0)
- NLLIBNAME = libnl-3.0
- else
- 	ifeq ($(NL2FOUND),Y)




More information about the arch-commits mailing list