diff --git a/srcpkgs/crda/files/set-wireless-regdom b/srcpkgs/crda/files/set-wireless-regdom deleted file mode 100644 index 0a857d974ea..00000000000 --- a/srcpkgs/crda/files/set-wireless-regdom +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -unset WIRELESS_REGDOM -. /etc/wireless-regdom.conf -[ -n "${WIRELESS_REGDOM}" ] && iw reg set ${WIRELESS_REGDOM} diff --git a/srcpkgs/crda/patches/python3.patch b/srcpkgs/crda/patches/python3.patch deleted file mode 100644 index bfa3ec1777a..00000000000 --- a/srcpkgs/crda/patches/python3.patch +++ /dev/null @@ -1,101 +0,0 @@ -https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/crda/trunk/crda-4.14-python-3.patch ---- a/crda/utils/key2pub.py -+++ b/crda/utils/key2pub.py -@@ -1,22 +1,22 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - 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 \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,10 +117,10 @@ 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') -- -+ - - modes = { - '--ssl': (print_ssl, print_ssl_keys), -@@ -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() diff --git a/srcpkgs/crda/template b/srcpkgs/crda/template deleted file mode 100644 index 6630f311878..00000000000 --- a/srcpkgs/crda/template +++ /dev/null @@ -1,60 +0,0 @@ -# Template file for 'crda' -pkgname=crda -version=4.14 -revision=3 -_dbname=wireless-regdb -_dbversion=2023.05.03 -create_wrksrc=yes -build_wrksrc="crda" -hostmakedepends="openssl python3-M2Crypto pkg-config" -makedepends="libnl-devel libgcrypt-devel" -depends="iw" -short_desc="Central Regulatory Domain Agent for wireless networks" -maintainer="Andrea Brancaleoni " -license="ISC" -homepage="https://wireless.wiki.kernel.org/en/developers/regulatory/crda" -distfiles="https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/${pkgname}-${version}.tar.gz -https://www.kernel.org/pub/software/network/wireless-regdb/${_dbname}-${_dbversion}.tar.xz" -checksum="5a8f35bb8b27474f466b0e75d451ba917433d8aab1889678a64d9c4e72a8b8c2 - f254d08ab3765aeae2b856222e11a95d44aef519a6663877c71ef68fae4c8c12" -conf_files="/etc/wireless-regdom.conf" - -build_options="wardrive" -desc_option_wardrive="Disable CRDA checks for wardriving competitions" - -_dbsrc="../${_dbname}-${_dbversion}/" -post_extract() { - mv crda-$version crda - if [ "$build_option_wardrive" ]; then - sed -i 's/([0-9][0-9])/(33)/g' ${_dbsrc}/db.txt # Max 2W =~ 33dBm - fi -} - -do_build() { - CFLAGS+=" -Wno-unused-const-variable" - cp ${_dbsrc}/*.pub.pem pubkeys - - make CC="$CC" all_noverify -} - -do_install() { - make DESTDIR="${DESTDIR}" SBINDIR="/usr/bin/" UDEV_RULE_DIR="/usr/lib/udev/rules.d/" install - vlicense LICENSE crda.LICENSE - - cd ${_dbsrc} - make DESTDIR="${DESTDIR}" FIRMWARE_PATH="/usr/lib/firmware" install - vlicense LICENSE wireless-regdb.LICENSE - - vmkdir etc/conf.d/ - - for dom in $(grep ^country db.txt | cut -d' ' -f2 | sed 's|:||g'); do - echo "#WIRELESS_REGDOM=\"${dom}\"" >> ${DESTDIR}/etc/wireless-regdom.tmp - done - sort -u ${DESTDIR}/etc/wireless-regdom.tmp >> ${DESTDIR}/etc/wireless-regdom.conf - rm ${DESTDIR}/etc/wireless-regdom.tmp - - vbin ${FILESDIR}/set-wireless-regdom - echo 'ACTION=="add", SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/usr/bin/set-wireless-regdom"' >> ${DESTDIR}/usr/lib/udev/rules.d/85-regulatory.rules - - find ${DESTDIR} -type f -name \*.h -delete # No need for devel files, no package i know uses libreg.so -}