X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 6C2F4DC05E1 for ; Sun, 29 Nov 2015 02:18:27 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2EC43DC0066 for ; Sun, 29 Nov 2015 02:18:26 +0000 (UTC) Received: by pacdm15 with SMTP id dm15so148065001pac.3 for ; Sat, 28 Nov 2015 18:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=QvRrbUGNIgnCLngufI5MnTceLFEmhc9FOLtRkOQazuI=; b=sxwXFmx8SjyW9rQqd5Wz8LmCc8uA1m5y1N3ISiM35sWIETUtekOPmqaBZ9YHofNjgN UMETjTyDYZCaaloqlcaNqS0gU7RE/zNMBsaj59BGZdQG0mXclBTVgjUqbE+kD6m3Bqwh 7l4gqsRT9Fu9qxXAAfKAFwcTHZHHtuYI5jRDAx/yFNkY1g0b1VL4KB5Fb0DpZfcqqexF pS3kerdZQuZaQCFrxDrJ8tiG8jbvH6SQr5hnMTk2GGMSiw9O/5hMep5YUQNb/lVYp/ox akazDTh4HkAtf70HD+JLUe7VEmTjZQlvhNRYDu+lqHomr7An4aysi5r+5zq7+ovnPqxy lcxQ== X-Received: by 10.67.15.10 with SMTP id fk10mr39532820pad.103.1448763505497; Sat, 28 Nov 2015 18:18:25 -0800 (PST) Received: from newbook ([50.0.225.136]) by smtp.gmail.com with ESMTPSA id o23sm1183424pfa.87.2015.11.28.18.18.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Nov 2015 18:18:25 -0800 (PST) Date: Sat, 28 Nov 2015 18:18:22 -0800 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] alpine 3.3.0 rc1 released Message-ID: <20151129021821.GA2754@newbook> References: <20151126171801.32e233ba@ncopa-desktop.alpinelinux.org> <20151128030846.GA2529@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151128030846.GA2529@newbook> User-Agent: Mutt/1.5.24 (2015-08-30) X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Nov 27, 2015 at 07:08:46PM -0800, Isaac Dunham wrote: > Well, I'd like to mention an issue I discovered on an Alpine Linux edge > system I'm using as a wireless router. > dmesg contains a lot of messages like these: > [ 10.453071] cfg80211: Calling CRDA to update world regulatory domain > [ 13.593462] cfg80211: Calling CRDA to update world regulatory domain > [ 16.736817] cfg80211: Calling CRDA to update world regulatory domain > [ 19.880084] cfg80211: Calling CRDA to update world regulatory domain > [ 23.023427] cfg80211: Calling CRDA to update world regulatory domain > [ 26.166723] cfg80211: Calling CRDA to update world regulatory domain > [ 29.310142] cfg80211: Calling CRDA to update world regulatory domain > [ 32.453458] cfg80211: Calling CRDA to update world regulatory domain > [ 35.596777] cfg80211: Calling CRDA to update world regulatory domain > [ 38.740183] cfg80211: Calling CRDA to update world regulatory domain > [ 41.883462] cfg80211: Calling CRDA to update world regulatory domain > [ 45.026808] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA > > Poking at it, I've found out the following: > * the 'regulatory domain' specifies the max power and channels for wireless. > * by default, it's the 'world regulatory domain': you are limited to the > channels and power usage which are allowed everywhere in the world. > * US regulatory domain (what I'd use) allows a bit more power. > * to properly set this, there are two ways: > - install wireless-regdb and crda (neither packaged!), then set things up > so that /sbin/crda is automatically run from your hotplug helper with > COUNTRY=.. in your environment when cfg80211 triggers the proper uevent. > Contrary to the lack of documentation, you can just run it from mdev > whenever $COUNTRY is set, $ACTION=change, and $MODALIAS=platform:regulatory. > I used this line in mdev.conf (above $MODALIAS=...), but it may be overly > generic: > > $COUNTRY=.. root:root 0660 */sbin/crda > > - fetch db.txt from wireless-regdb, drop it in net/wireless/db.txt in > the linux source tree, and build the kernel with > CONFIG_CFG80211_INTERNAL_REGDB=y > then add the proper module options to cfg80211. > > Note that crda has a lot of confusion in the build system; > refer to Gentoo's ebuild for fixes. This is the same as http://bugs.alpinelinux.org/issues/3910 Looking through there, I see: - py-m2crypto is already packaged; that APKBUILD can be ignored. - wireless-regdb needs to makedepend on openssl (for signing), and on python (for building regulatory.bin); otherwise, it looks good. - the crda package has several shortcomings: while integration for udev is provided, it's quite possible to use it with mdev (as noted above); a bunch of libraries are hard-coded; py-m2crypto is build-time only; depends=iw is pointless (iw is one of three tools-iw, wpa_supplicant, and hostapd-that can set the regulatory domain); building with USE_OPENSSL=1 is preferable, because you can add keys without recompiling (also, apk already depends on openssl...) The copyleft-next license used for crda is explicitly compatible with any FSF- or OSI-approved licenses, so OpenSSL is ok. The problems aren't surprising, given that crda seems to have numerous bits of breakage in the build scripts. What worked for me (roughly), when building it for my own use, was: - grab most of the crda-3.18-*.patch files from https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-wireless/crda/files/ - apply them - install wireless-regdb - build with USE_OPENSSL=1 PUBKEY_DIR=/usr/lib/crda/pubkeys/ HTH, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---