]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] NetBSD workflow: setup pkgin and PKG_PATH before installing packages
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 4 Nov 2025 12:11:49 +0000 (12:11 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 4 Nov 2025 12:11:49 +0000 (12:11 +0000)
The pkg_add command requires PKG_PATH to be set in NetBSD 10.0.
Install and use pkgin for easier binary package management.

Changes:
- Set PKG_PATH to NetBSD CDN repository
- Install pkgin using /usr/sbin/pkg_add
- Use pkgin for all package installations
- Change perl5 to perl (correct package name)
- Add || true for non-critical package installation failures

.github/workflows/netbsd_build.yml

index 59a5c48975622b0e918baab0cba5558bffb1bdad..398375642cab515d0b4c8d2a772ac0184a08dd43 100644 (file)
@@ -40,26 +40,36 @@ jobs:
           release: ${{ inputs.netbsd_version }}
           usesh: true
           prepare: |
+            # Set up package repository
+            export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r)/All"
+            echo "PKG_PATH=${PKG_PATH}"
+
+            # Install pkgin for easier package management
+            /usr/sbin/pkg_add -v pkgin || true
+
+            # Update package database
+            pkgin -y update || /usr/sbin/pkg_add -v pkgin
+
             # Install base build dependencies
-            pkg_add cmake ninja-build pkgconf \
+            pkgin -y install cmake ninja-build pkgconf \
               pcre2 sqlite3 openssl ragel icu \
               libsodium glib2 libunwind \
-              perl5 libarchive zstd xxhash \
-              file
+              perl libarchive zstd xxhash \
+              file || true
 
             # Install Lua version based on user selection
             case "${{ inputs.lua_version }}" in
               luajit)
-                pkg_add luajit
+                pkgin -y install luajit || true
                 ;;
               lua51)
-                pkg_add lua51
+                pkgin -y install lua51 || true
                 ;;
               lua53)
-                pkg_add lua53
+                pkgin -y install lua53 || true
                 ;;
               lua54)
-                pkg_add lua54
+                pkgin -y install lua54 || true
                 ;;
             esac