[arch-commits] Commit in crda/repos (9 files)
Tobias Powalowski
tpowa at archlinux.org
Mon Mar 29 08:33:14 UTC 2021
Date: Monday, March 29, 2021 @ 08:33:14
Author: tpowa
Revision: 411201
archrelease: copy trunk to testing-x86_64
Added:
crda/repos/testing-x86_64/
crda/repos/testing-x86_64/0001-Makefile-Don-t-run-ldconfig.patch
(from rev 411200, crda/trunk/0001-Makefile-Don-t-run-ldconfig.patch)
crda/repos/testing-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
(from rev 411200, crda/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch)
crda/repos/testing-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
(from rev 411200, crda/trunk/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch)
crda/repos/testing-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
(from rev 411200, crda/trunk/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch)
crda/repos/testing-x86_64/PKGBUILD
(from rev 411200, crda/trunk/PKGBUILD)
crda/repos/testing-x86_64/crda-4.14-python-3.patch
(from rev 411200, crda/trunk/crda-4.14-python-3.patch)
crda/repos/testing-x86_64/crda.install
(from rev 411200, crda/trunk/crda.install)
crda/repos/testing-x86_64/set-wireless-regdom
(from rev 411200, crda/trunk/set-wireless-regdom)
-----------------------------------------------------------------+
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 | 48 +++++
crda-4.14-python-3.patch | 95 ++++++++++
crda.install | 5
set-wireless-regdom | 5
8 files changed, 321 insertions(+)
Copied: crda/repos/testing-x86_64/0001-Makefile-Don-t-run-ldconfig.patch (from rev 411200, crda/trunk/0001-Makefile-Don-t-run-ldconfig.patch)
===================================================================
--- testing-x86_64/0001-Makefile-Don-t-run-ldconfig.patch (rev 0)
+++ testing-x86_64/0001-Makefile-Don-t-run-ldconfig.patch 2021-03-29 08:33:14 UTC (rev 411201)
@@ -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
+
Copied: crda/repos/testing-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch (from rev 411200, crda/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch)
===================================================================
--- testing-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch (rev 0)
+++ testing-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch 2021-03-29 08:33:14 UTC (rev 411201)
@@ -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
+
Copied: crda/repos/testing-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch (from rev 411200, crda/trunk/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch)
===================================================================
--- testing-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch (rev 0)
+++ testing-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch 2021-03-29 08:33:14 UTC (rev 411201)
@@ -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
+
Copied: crda/repos/testing-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch (from rev 411200, crda/trunk/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch)
===================================================================
--- testing-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch (rev 0)
+++ testing-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch 2021-03-29 08:33:14 UTC (rev 411201)
@@ -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
+
Copied: crda/repos/testing-x86_64/PKGBUILD (from rev 411200, crda/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2021-03-29 08:33:14 UTC (rev 411201)
@@ -0,0 +1,48 @@
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=crda
+pkgver=4.14
+pkgrel=4
+pkgdesc="Central Regulatory Domain Agent for wireless networks"
+arch=(x86_64)
+url="https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA"
+license=('custom')
+depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd' 'iw')
+makedepends=('python-m2crypto')
+install=crda.install
+source=("https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/crda-$pkgver.tar.gz"
+ set-wireless-regdom
+ 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
+ 0001-Makefile-Don-t-run-ldconfig.patch
+ crda-4.14-python-3.patch)
+sha256sums=('5a8f35bb8b27474f466b0e75d451ba917433d8aab1889678a64d9c4e72a8b8c2'
+ '603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3'
+ '96b2068b27202f8bc78009869520e396cb3f3ac7a826efef06d0fc41047f2520'
+ 'ff52990cf9295e5cebcf07ebbf2a96e225d97088573edcc898b29ce33a0fb663'
+ '95057c7a1c8f2be8b70785356162b86831ba9f198fc43c411267ca97ddb68ed9')
+validpgpkeys=('E4053F8D0E7C4B9A0A20AB27DC553250F8FE7407') #Luis R. Rodriguez
+prepare() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ 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
+ patch -p1 -i "${srcdir}"/crda-4.14-python-3.patch
+}
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make
+}
+
+package() {
+ # Install crda, regdbdump and udev rules
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" UDEV_RULE_DIR=/usr/lib/udev/rules.d/ SBINDIR=/usr/bin/ install
+ # Adjust paths in udev rule file
+ sed 's|/sbin/crda|/usr/bin/crda|' -i "${pkgdir}"/usr/lib/udev/rules.d/85-regulatory.rules
+ # This rule automatically sets the regulatory domain when cfg80211 is loaded
+ echo 'ACTION=="add", SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/usr/bin/set-wireless-regdom"' >> "${pkgdir}"/usr/lib/udev/rules.d/85-regulatory.rules
+
+ install -D -m644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/crda/LICENSE
+
+ install -D -m755 "${srcdir}"/set-wireless-regdom "${pkgdir}"/usr/bin/set-wireless-regdom
+}
Copied: crda/repos/testing-x86_64/crda-4.14-python-3.patch (from rev 411200, crda/trunk/crda-4.14-python-3.patch)
===================================================================
--- testing-x86_64/crda-4.14-python-3.patch (rev 0)
+++ testing-x86_64/crda-4.14-python-3.patch 2021-03-29 08:33:14 UTC (rev 411201)
@@ -0,0 +1,95 @@
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 9bb04cd..632e6a6 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -3,20 +3,20 @@
+ import sys
+ try:
+ from M2Crypto import RSA
+-except ImportError, e:
++except ImportError as e:
+ sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
+ sys.stderr.write('Please install the "M2Crypto" Python module.\n')
+ sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
+ sys.exit(1)
+
+ def print_ssl_64(output, name, val):
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ while len(val) % 8:
+- val = '\0' + val
++ val = b'\0' + val
+ vnew = []
+ while len(val):
+- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8]))
+ val = val[8:]
+ vnew.reverse()
+ output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val):
+ output.write('};\n\n')
+
+ def print_ssl_32(output, name, val):
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ while len(val) % 4:
+- val = '\0' + val
++ val = b'\0' + val
+ vnew = []
+ while len(val):
+- vnew.append((val[0], val[1], val[2], val[3], ))
++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4]))
+ val = val[4:]
+ vnew.reverse()
+ output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -80,21 +80,21 @@ struct pubkey {
+
+ static struct pubkey keys[] = {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+ pass
+
+ def print_gcrypt(output, name, val):
+ output.write('#include <stdint.h>\n')
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
+ idx = 0
+ for v in val:
+ if not idx:
+ output.write('\t')
+- output.write('0x%.2x, ' % ord(v))
++ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v)))
+ idx += 1
+ if idx == 8:
+ idx = 0
+@@ -117,7 +117,7 @@ struct key_params {
+
+ static const struct key_params __attribute__ ((unused)) keys[] = {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+
+@@ -135,7 +135,7 @@ except IndexError:
+ mode = None
+
+ if not mode in modes:
+- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
++ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())))
+ sys.exit(2)
+
+ output = open(outfile, 'w')
+@@ -153,3 +153,5 @@ for f in files:
+ idx += 1
+
+ modes[mode][1](output, idx - 1)
++
++output.close()
Copied: crda/repos/testing-x86_64/crda.install (from rev 411200, crda/trunk/crda.install)
===================================================================
--- testing-x86_64/crda.install (rev 0)
+++ testing-x86_64/crda.install 2021-03-29 08:33:14 UTC (rev 411201)
@@ -0,0 +1,5 @@
+## arg 1: the new package version
+post_install() {
+ echo "Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom."
+ echo "It will automatically be set on boot."
+}
Copied: crda/repos/testing-x86_64/set-wireless-regdom (from rev 411200, crda/trunk/set-wireless-regdom)
===================================================================
--- testing-x86_64/set-wireless-regdom (rev 0)
+++ testing-x86_64/set-wireless-regdom 2021-03-29 08:33:14 UTC (rev 411201)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+unset WIRELESS_REGDOM
+. /etc/conf.d/wireless-regdom
+[ -n "${WIRELESS_REGDOM}" ] && iw reg set ${WIRELESS_REGDOM}
More information about the arch-commits
mailing list