[arch-commits] Commit in netfilter-fullconenat/trunk (3 files)

Jan Steffens heftig at archlinux.org
Thu Jun 10 17:34:18 UTC 2021


    Date: Thursday, June 10, 2021 @ 17:34:18
  Author: heftig
Revision: 961526

simplify. move to extramodules. pin commit to ensure it's reproducible.

Modified:
  netfilter-fullconenat/trunk/PKGBUILD
Deleted:
  netfilter-fullconenat/trunk/Kbuild
  netfilter-fullconenat/trunk/netfilter-fullconenat.conf

----------------------------+
 Kbuild                     |    1 -
 PKGBUILD                   |   28 +++++++++++++++-------------
 netfilter-fullconenat.conf |    1 -
 3 files changed, 15 insertions(+), 15 deletions(-)

Deleted: Kbuild
===================================================================
--- Kbuild	2021-06-10 17:34:13 UTC (rev 961525)
+++ Kbuild	2021-06-10 17:34:18 UTC (rev 961526)
@@ -1 +0,0 @@
-obj-m = xt_FULLCONENAT.o

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-10 17:34:13 UTC (rev 961525)
+++ PKGBUILD	2021-06-10 17:34:18 UTC (rev 961526)
@@ -10,14 +10,12 @@
 license=('GPL2')
 depends=("linux")
 makedepends=('linux-headers' 'git')
-source=("netfilter-fullconenat.conf" Kbuild
-        "${pkgname}::git+https://github.com/Chion82/netfilter-full-cone-nat.git")
-sha256sums=('a17dfdf1fd046219daeacc60065e3a81c80c2eb2cfdf6d8068278c509577f571'
-            '7ff12ad066a68c65f23fc7e01654ca459ce3458172e3dce30f42553fa44dd7c2'
-            'SKIP')
+_commit=0cf3b48fd7d2fa81d0297d1fff12bbd0580fc435  # master
+source=("${pkgname}::git+https://github.com/Chion82/netfilter-full-cone-nat#commit=${_commit}")
+sha256sums=('SKIP')
 
 pkgver() {
-  cd "$srcdir/${pkgname}"
+  cd ${pkgname}
   ( set -o pipefail
     git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
     printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -24,18 +22,22 @@
   )
 }
 
+prepare() {
+  cd ${pkgname}
+  echo "obj-m = xt_FULLCONENAT.o" > Kbuild
+}
+
 build() {
-  cd $pkgname
-  ln -s ../Kbuild
+  cd ${pkgname}
   make -C /usr/src/linux M=$PWD modules
 }
 
 package() {
-  # Install modules-load.conf
-  install -Dm644 netfilter-fullconenat.conf "${pkgdir}/usr/lib/modules-load.d/netfilter-fullconenat.conf"
-
-  install -Dt "${pkgdir}/usr/lib/modules/$(</usr/src/linux/version)/kernel/net/netfilter" -m644 \
-    $pkgname/*.ko
+  local extradir=/usr/lib/modules/$(</usr/src/linux/version)/extramodules
+  install -Dt "${pkgdir}${extradir}" -m644 ${pkgname}/*.ko
   find "${pkgdir}" -name '*.ko' -exec strip --strip-debug {} +
   find "${pkgdir}" -name '*.ko' -exec xz {} +
+
+  echo "xt_FULLCONENAT" | \
+    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
 }

Deleted: netfilter-fullconenat.conf
===================================================================
--- netfilter-fullconenat.conf	2021-06-10 17:34:13 UTC (rev 961525)
+++ netfilter-fullconenat.conf	2021-06-10 17:34:18 UTC (rev 961526)
@@ -1 +0,0 @@
-xt_FULLCONENAT



More information about the arch-commits mailing list