I made an update to the PKGBUILD so that it updates itself to the latest version, tested with 11.0.3. It updates pkgver, sha256, etc, so that it works first time. I can send you a patch?
From 3452762a60a841eb06d2b034189805d630313116 Mon Sep 17 00:00:00 2001
From: John Lane <archlinux@jelmail.com>
Date: Sat, 10 Jan 2026 11:08:16 +0000
Subject: [PATCH] fix dynamic version update
---
PKGBUILD | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index 53ad101..252b8d0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,19 +15,18 @@ url="https://www.tenable.com/downloads/nessus-agents"
install="$pkgname.install"
# If wish there was a cleaner way to dynamically update $source and $sha256sums as pkgver() does for $pkgver
# Also the read -r mass variable assignment allows to run the script only once instead of running it 3 times with individual $(ruby get_nessus_link.rb <arg>)
-read -r _filename _url _version _dl_id _sha256 <<<$(ruby get_nessus_link.rb all)
+read -r _filename _url pkgver _dl_id _sha256 <<<$(ruby get_nessus_link.rb all)
source=("NessusAgent-$pkgver-fc38.$arch.rpm::https://www.tenable.com/downloads/api/v1/public/pages/nessus-agents/downloads/$_dl_id/download?i_agree_to_tenable_license_agreement=true"
'LICENSE'
'get_nessus_link.rb')
-sha256sums=('4b7639f4ebd9bd18a24d9bca7f136b82c5561e684ea48fcf4a1413f9a5aef13f'
+sha256sums=("$_sha256"
'd647aedd39d571faa3f1a9906db561eecbd9c41605ba7f562261ffb04877ba26'
'191603f44668b2f7dbafde4faef75ace91590d5c07a7a146601834ebe65a4734')
conflicts=('nessus') # due to /etc/ld.so.conf.d/nessus.conf
-pkgver() {
- # ruby get_nessus_link.rb version
- echo $_version
-}
+#pkgver() {
+# echo $pkgver
+#}
package() {
mkdir -p "$pkgdir/etc/ld.so.conf.d" "$pkgdir/usr/share" "$pkgdir/opt/$pkgname" \
@@ -44,4 +43,3 @@ package() {
# license
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-
--
2.44.0
Pinned Comments
noraj commented on 2025-01-02 20:09 (UTC)
I'm experimenting dynamic release: dynamically updating $source and $sha256sums as well as using a pkgver(), so that the PKGBUILD will work with nessus-agent newer version without manually updating the unique source link that leads to HTTP 404 error for each new version before. As the crawling script was already written, better use it to automate the process. However, the method used is highly unconventional, so if you experiment any issue or have an idea to suggest cleaner / more elegant solution, please contact me.