Date: Wednesday, November 13, 2019 @ 15:51:09 Author: foutrelis Revision: 368111
archrelease: copy trunk to staging-x86_64 Added: crda/repos/staging-x86_64/ crda/repos/staging-x86_64/0001-Makefile-Don-t-run-ldconfig.patch (from rev 368110, crda/trunk/0001-Makefile-Don-t-run-ldconfig.patch) crda/repos/staging-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch (from rev 368110, crda/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch) crda/repos/staging-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch (from rev 368110, crda/trunk/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch) crda/repos/staging-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch (from rev 368110, crda/trunk/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch) crda/repos/staging-x86_64/PKGBUILD (from rev 368110, crda/trunk/PKGBUILD) crda/repos/staging-x86_64/crda.install (from rev 368110, crda/trunk/crda.install) crda/repos/staging-x86_64/set-wireless-regdom (from rev 368110, 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 | 46 ++++++++ crda.install | 5 set-wireless-regdom | 5 7 files changed, 224 insertions(+) Copied: crda/repos/staging-x86_64/0001-Makefile-Don-t-run-ldconfig.patch (from rev 368110, crda/trunk/0001-Makefile-Don-t-run-ldconfig.patch) =================================================================== --- staging-x86_64/0001-Makefile-Don-t-run-ldconfig.patch (rev 0) +++ staging-x86_64/0001-Makefile-Don-t-run-ldconfig.patch 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,24 @@ +From 15bc8065e9dc5485c650c528f8d80f7536e378d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <tho...@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/staging-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch (from rev 368110, crda/trunk/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch) =================================================================== --- staging-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch (rev 0) +++ staging-x86_64/0001-Makefile-Link-libreg.so-against-the-crypto-library.patch 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,55 @@ +From e2e519730c33de4503ac5dda28863d029e3cf578 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <tho...@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/staging-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch (from rev 368110, crda/trunk/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch) =================================================================== --- staging-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch (rev 0) +++ staging-x86_64/0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,52 @@ +From fefefdb2c52c8fbedbb339b4badb8226cad7e7e0 Mon Sep 17 00:00:00 2001 +From: Krishna Chaitanya <chaitanya.m...@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 <mcg...@do-not-panic.com> +Signed-off-by: Chaitanya T K <chaitanya.m...@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/staging-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch (from rev 368110, crda/trunk/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch) =================================================================== --- staging-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch (rev 0) +++ staging-x86_64/0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,37 @@ +From 2cabb2588da56735369131b709f191453c080be0 Mon Sep 17 00:00:00 2001 +From: "John W. Linville" <linvi...@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 <linvi...@tuxdriver.com> +Signed-off-by: Luis R. Rodriguez <mcg...@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/staging-x86_64/PKGBUILD (from rev 368110, crda/trunk/PKGBUILD) =================================================================== --- staging-x86_64/PKGBUILD (rev 0) +++ staging-x86_64/PKGBUILD 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,46 @@ +# Maintainer: Thomas Bächler <tho...@archlinux.org> + +pkgname=crda +pkgver=4.14 +pkgrel=3 +pkgdesc="Central Regulatory Domain Agent for wireless networks" +arch=(x86_64) +url="https://wireless.kernel.org/en/developers/Regulatory/CRDA" +license=('custom') +depends=('wireless-regdb' 'libnl' 'libgcrypt' 'systemd' 'iw') +makedepends=('python2-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) +sha256sums=('5a8f35bb8b27474f466b0e75d451ba917433d8aab1889678a64d9c4e72a8b8c2' + '603ce97da5cce3f5337e99007ce04e2f295bb33a36b308794884011f7bcabaf3' + '96b2068b27202f8bc78009869520e396cb3f3ac7a826efef06d0fc41047f2520' + 'ff52990cf9295e5cebcf07ebbf2a96e225d97088573edcc898b29ce33a0fb663') +validpgpkeys=('E4053F8D0E7C4B9A0A20AB27DC553250F8FE7407') #Luis R. Rodriguez +prepare() { + cd "${srcdir}"/${pkgname}-${pkgver} + sed 's|^#!/usr/bin/env python|#!/usr/bin/python2|' -i utils/key2pub.py + 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} + 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/staging-x86_64/crda.install (from rev 368110, crda/trunk/crda.install) =================================================================== --- staging-x86_64/crda.install (rev 0) +++ staging-x86_64/crda.install 2019-11-13 15:51:09 UTC (rev 368111) @@ -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/staging-x86_64/set-wireless-regdom (from rev 368110, crda/trunk/set-wireless-regdom) =================================================================== --- staging-x86_64/set-wireless-regdom (rev 0) +++ staging-x86_64/set-wireless-regdom 2019-11-13 15:51:09 UTC (rev 368111) @@ -0,0 +1,5 @@ +#!/bin/bash + +unset WIRELESS_REGDOM +. /etc/conf.d/wireless-regdom +[ -n "${WIRELESS_REGDOM}" ] && iw reg set ${WIRELESS_REGDOM}