diff options
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | netatop-dkms.install | 19 | ||||
-rw-r--r-- | test_setup.sh | 18 | ||||
-rwxr-xr-x | test_start.sh | 5 |
5 files changed, 70 insertions, 9 deletions
@@ -1,20 +1,22 @@ pkgbase = netatop-dkms pkgdesc = Atop network kernel module, enables network statistics in atop - pkgver = 3.0 + pkgver = 3.1 pkgrel = 1 url = http://www.atoptool.nl/ + install = netatop-dkms.install arch = x86_64 arch = i686 groups = modules license = GPL - makedepends = linux-headers depends = atop depends = dkms conflicts = netatop - source = http://atoptool.nl/download/netatop-3.0.tar.gz + source = http://atoptool.nl/download/netatop-3.1.tar.gz source = netatop-dkms.conf - sha256sums = 0b259b59ee187d83258be3131f1e5842143ca4d2ba05efe7b76e9724a0e4a46b + source = netatop-dkms.install + sha256sums = 736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62 sha256sums = 56e9094e396fcdabadde4db8a9f21945484e4db93359dc22f2fb76436b1b2ea9 + sha256sums = e821aa89ecd62799441f87a1012edf7151c0971950489bb10fec478fb97d515b pkgname = netatop-dkms @@ -2,7 +2,7 @@ # Contributor: Spider.007 <archPackage@spider007.net> pkgname=netatop-dkms _pkgname=netatop -pkgver=3.0 +pkgver=3.1 pkgrel=1 pkgdesc="Atop network kernel module, enables network statistics in atop" url="http://www.atoptool.nl/" @@ -10,11 +10,14 @@ groups=('modules') license=('GPL') depends=('atop' 'dkms') conflicts=('netatop') -makedepends=('linux-headers') +makedepends=() source=("http://atoptool.nl/download/netatop-${pkgver}.tar.gz" - "netatop-dkms.conf") -sha256sums=('0b259b59ee187d83258be3131f1e5842143ca4d2ba05efe7b76e9724a0e4a46b' - '56e9094e396fcdabadde4db8a9f21945484e4db93359dc22f2fb76436b1b2ea9') + "netatop-dkms.conf" + "netatop-dkms.install") +install="netatop-dkms.install" +sha256sums=('736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62' + '56e9094e396fcdabadde4db8a9f21945484e4db93359dc22f2fb76436b1b2ea9' + 'e821aa89ecd62799441f87a1012edf7151c0971950489bb10fec478fb97d515b') arch=('x86_64' 'i686') prepare() { @@ -23,6 +26,12 @@ prepare() { } build() { + warning "-------------------------------------------------------------------" + warning "Package build will fail if there are no headers for currently" + warning "loaded kernel or their versions mismatch (for example, you have" + warning "updated the kernel but did not reboot yet)." + warning "-------------------------------------------------------------------" + cd $srcdir/$_pkgname-$pkgver # build daemon, make sure that module can be built make all @@ -68,4 +77,12 @@ package() { # auto-load mkdir -p $pkgdir/etc/modules-load.d echo "netatop" > $pkgdir/etc/modules-load.d/netatop.conf + + warning "-------------------------------------------------------------------" + warning "After install, DKMS will try to build the netatop module" + warning "against every kernel you have installed. For the build to succeed," + warning "you must have header packages for every kernel. Header package" + warning "for the stock kernel is called 'linux-headers', other usually" + warning "follow the same naming scheme." + warning "-------------------------------------------------------------------" } diff --git a/netatop-dkms.install b/netatop-dkms.install new file mode 100644 index 000000000000..f0d8abc4899f --- /dev/null +++ b/netatop-dkms.install @@ -0,0 +1,19 @@ +#!/bin/bash + +warn_about_headers() { + echo "-------------------------------------------------------------------" + echo "DKMS will now try to build the netatop module" + echo "against every kernel you have installed. For the build to succeed," + echo "you must have header packages for every kernel. Header package" + echo "for the stock kernel is called 'linux-headers', other usually" + echo "follow the same naming scheme." + echo "-------------------------------------------------------------------" +} + +pre_install() { + warn_about_headers +} + +pre_upgrade() { + warn_about_headers +} diff --git a/test_setup.sh b/test_setup.sh new file mode 100644 index 000000000000..36f1f274b085 --- /dev/null +++ b/test_setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e +set -x + +# Make sure system is up to date +pacman --noconfirm -Sy +pacman --noconfirm -S archlinux-keyring +pacman --noconfirm -Su +# Install compilers and stuff +pacman --noconfirm -S base-devel +pacman --noconfirm -S nano +# Add build user +useradd -U -G wheel -m user +# Permissions +chown user:user -R /netatop-dkms +sed -i 's|# %wheel ALL=(ALL) NOPASSWD: ALL|%wheel ALL=(ALL) NOPASSWD: ALL|g' /etc/sudoers +# Switch to build user +#su - user diff --git a/test_start.sh b/test_start.sh new file mode 100755 index 000000000000..84e1939242a3 --- /dev/null +++ b/test_start.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +set -x + +sudo docker run -ti --rm -v "$(pwd)":/netatop-dkms archlinux |