[arch-dev-public] RFC: crda PKBUILD
Linux 2.6.28 will support a new wireless regulatory domain infrastructure. Instead of the limited number of hardcoded regulatory domains in cfg80211 (EU, JP, US), there will be a userspace daemon that manages regulatory domains. We could still enable the "old" regulatory domain in the kernel. However, I would like to disable it, so kernel26 will have dependency (or optdependency) on crda (as would compat-wireless, if someone builds it with the new regulatory framework enabled). The package includes the crda and regdbdump binaries, as well as a binary regulatory.bin database and a udev rule. John Linville's RSA public key is hardcoded in both crda and regdbdump, so they will only accept regulatory.bin files signed by him. (The build system allows to include other public keys and the data to build the regulatory.bin is publicly available.) I am attaching the PKGBUILD for crda. # $Id: $ # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgname=crda pkgver=0.9.4 pkgrel=1 pkgdesc="Central Regulatory Domain Agent" arch=(i686 x86_64) url="http://wireless.kernel.org/en/developers/Regulatory/CRDA" license=('custom') depends=('libnl' 'libgcrypt' 'udev') makedepends=('python-m2crypto' 'git') source=(http://wireless.kernel.org/download/crda/$pkgname-$pkgver.tar.bz2) md5sums=('dddd9c0f08e7e447a29fc5b8eed5179f') build() { # Install crda, regdbdump and udev rules msg "Compiling and installing crda ..." cd $srcdir/$pkgname-$pkgver make crda regdbdump || return 1 make DESTDIR=$pkgdir install || return 1 # Install and verify regulatory.bin file msg "Downloading and installing the regulatory.bin file ..." cd $srcdir if [ -d wireless-regdb ]; then cd wireless-regdb git pull cd .. else git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git fi install -D -m444 wireless-regdb/regulatory.bin $pkgdir/usr/lib/crda/regulatory.bin || return 1 if $pkgdir/sbin/regdbdump $pkgdir/usr/lib/crda/regulatory.bin > /dev/null; then msg "Regulatory database verification was succesful." else error "Regulatory database verification failed." return 1 fi msg "Installing license ..." install -D -m644 $srcdir/$pkgname-$pkgver/LICENSE $pkgdir/usr/share/licenses/crda/LICENSE || return 1 }
On Fri, 2008-11-28 at 14:03 +0100, Thomas Bächler wrote:
I am attaching the PKGBUILD for crda. plain text document attachment (PKGBUILD)
makedepends=('python-m2crypto' 'git')
# Install and verify regulatory.bin file msg "Downloading and installing the regulatory.bin file ..." cd $srcdir if [ -d wireless-regdb ]; then cd wireless-regdb git pull cd .. else git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git fi
I would be really happy when these git things are put into a tarball and uploaded to ftp.archlinux.org. For AUR these git/svn/cvs checkout packages are nice, but I dislike them for core and/or extra. We also pull CVS for glibc and xulrunner, instead of putting those in the PKGBUILD, we upload a tarball to FTP.
Jan de Groot schrieb:
makedepends=('python-m2crypto' 'git')
# Install and verify regulatory.bin file msg "Downloading and installing the regulatory.bin file ..." cd $srcdir if [ -d wireless-regdb ]; then cd wireless-regdb git pull cd .. else git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git fi
I would be really happy when these git things are put into a tarball and uploaded to ftp.archlinux.org. For AUR these git/svn/cvs checkout packages are nice, but I dislike them for core and/or extra. We also pull CVS for glibc and xulrunner, instead of putting those in the PKGBUILD, we upload a tarball to FTP.
I could get the file from http://wireless.kernel.org/download/wireless-regdb/wireless-regdb-master-200... I just found out about these snapshots by looking at the AUR (they actually split it into wireless-regdb and crda, but then there is no way to verify the regulatory.bin file. As the regulatory DB won't change too often, we can simply release a new crda package every time). I was thinking, maybe we should verify the file again at install time and throw a warning if it doesn't check out.
Jan de Groot schrieb:
I would be really happy when these git things are put into a tarball and uploaded to ftp.archlinux.org. For AUR these git/svn/cvs checkout packages are nice, but I dislike them for core and/or extra. We also pull CVS for glibc and xulrunner, instead of putting those in the PKGBUILD, we upload a tarball to FTP.
Updated PKGBUILD is here: http://repos.archlinux.org/viewvc.cgi/crda/trunk/PKGBUILD?view=markup 1) I'd like to add this package to core. 2) In the future, should it be a depend or optdepend for kernel26?
Thomas Bächler wrote:
Jan de Groot schrieb:
I would be really happy when these git things are put into a tarball and uploaded to ftp.archlinux.org. For AUR these git/svn/cvs checkout packages are nice, but I dislike them for core and/or extra. We also pull CVS for glibc and xulrunner, instead of putting those in the PKGBUILD, we upload a tarball to FTP.
Updated PKGBUILD is here: http://repos.archlinux.org/viewvc.cgi/crda/trunk/PKGBUILD?view=markup
1) I'd like to add this package to core. +1 for crda in core, with the rest of the wireless support apps. 2) In the future, should it be a depend or optdepend for kernel26?
I'd say it's an optdepend, as some users don't use wireless.
On Fri, Nov 28, 2008 at 3:18 PM, Tom K <tom@archlinux.org> wrote:
Thomas Bächler wrote:
Jan de Groot schrieb:
I would be really happy when these git things are put into a tarball and uploaded to ftp.archlinux.org. For AUR these git/svn/cvs checkout packages are nice, but I dislike them for core and/or extra. We also pull CVS for glibc and xulrunner, instead of putting those in the PKGBUILD, we upload a tarball to FTP.
Updated PKGBUILD is here: http://repos.archlinux.org/viewvc.cgi/crda/trunk/PKGBUILD?view=markup
1) I'd like to add this package to core.
+1 for crda in core, with the rest of the wireless support apps.
2) In the future, should it be a depend or optdepend for kernel26?
I'd say it's an optdepend, as some users don't use wireless.
Couldn't we set it as a dep of the wireless tools? That seems like it would install for the right people then. Considering you want to shut things off in the kernel, this will make some (most? no idea) wireless non-functional without this, right? It seems an optdepend of kernel26 would be easy to miss
Aaron Griffin schrieb:
Couldn't we set it as a dep of the wireless tools? That seems like it would install for the right people then. Considering you want to shut things off in the kernel, this will make some (most? no idea) wireless non-functional without this, right? It seems an optdepend of kernel26 would be easy to miss
I think I remember that the wireless stack will fall back to a default (minimal) set of channels if crda is missing (which is not too different from the current behaviour).
On Sun, 2008-11-30 at 02:38 +0100, Thomas Bächler wrote:
Aaron Griffin schrieb:
Couldn't we set it as a dep of the wireless tools? That seems like it would install for the right people then. Considering you want to shut things off in the kernel, this will make some (most? no idea) wireless non-functional without this, right? It seems an optdepend of kernel26 would be easy to miss
I think I remember that the wireless stack will fall back to a default (minimal) set of channels if crda is missing (which is not too different from the current behaviour).
As quite some wireless cards need firmware to operate, we could also make the firmwares depend on this package. kernel26 doesn't depend on any wireless firmware at this moment.
participants (4)
-
Aaron Griffin
-
Jan de Groot
-
Thomas Bächler
-
Tom K