wireguard kernel modules

Request a package to be made here. Make sure you have searched before requesting.

wireguard kernel modules

Postby bjo » Fri Jun 14, 2019 11:16 am

Usual Arch Linux provides a wireguard kernel module for the linux and the linux-lts package.

Using Archlinux ARM we have to use wireguard-dkms which leads to a module rebuild every time a new kernel comes out.
bjo
 
Posts: 11
Joined: Sun Dec 20, 2015 8:43 pm

Re: wireguard kernel modules

Postby graysky » Fri Jun 14, 2019 5:18 pm

I think Arch ARM devs prefer dkms to avoid adding extra packages to the repos. DKMS isn't my favorite but if you want, you can make your own PKGBUILD for wireguard and manually build as needed:

I do this on my armv7h:
$this->bbcode_second_pass_code('', 'pkgbase=wireguard
pkgname=(wireguard-module wireguard-tools)
pkgver=0.0.20190601
pkgrel=1
_pkgname=WireGuard
pkgdesc='next generation secure network tunnel'
arch=('x86_64' 'aarch64' 'armv7h')
url='http://www.wireguard.com/'
license=('GPL')
makedepends=('libmnl')
validpgpkeys=('AB9942E6D4A4CFC3412620A749FC7012A5DE03AE') # Jason A. Donenfeld <Jason@zx2c4.com>
source=("https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${pkgver}.tar"{.xz,.asc})
sha256sums=('7528461824a0174bd7d4f15e68d8f0ce9a8ea318411502b80759438e8ef65568'
'SKIP')

# look at ls `/usr/lib/modules`
_extramodules=4.19-raspberrypi

prepare() {
cd WireGuard-${pkgver}/

find contrib/examples/ -name '.gitignore' -delete

# get currently installed KERNELDIR
export _RIGHTPATH=$(cat /usr/lib/modules/extramodules-$_extramodules/version)
}

build() {
cd WireGuard-${pkgver}/
make -C src KERNELDIR="/lib/modules/$_RIGHTPATH/build"
}

package_wireguard-module() {
provides=('WIREGUARD-MODULE')

cd "$_pkgname-$pkgver"
xz src/wireguard.ko
install -Dm644 src/wireguard.ko.xz "$pkgdir/usr/lib/modules/extramodules-$_extramodules/wireguard.ko.xz"
}

package_wireguard-tools() {
depends=('libmnl')

cd WireGuard-${pkgver}/

make -C src/tools/ \
DESTDIR="${pkgdir}/" \
WITH_BASHCOMPLETION=yes \
WITH_WGQUICK=yes \
WITH_SYSTEMDUNITS=yes install
}
')
graysky
Developer
 
Posts: 1879
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Package Requests

Who is online

Users browsing this forum: No registered users and 11 guests