From 84cc862bedf9834d5fb611990de3aee0320c5e73 Mon Sep 17 00:00:00 2001 From: Kevin Adams Date: Fri, 15 May 2026 15:05:29 -0400 Subject: [PATCH] Fix CI: install Perl deps and stub PVE::SafeSyslog for syntax check perl -c requires all modules to be loadable at compile time. PVE::SafeSyslog only exists on Proxmox VE hosts, so the syntax check always failed on GitHub Actions runners. Fix: - Install real Perl deps via apt (libwww-perl, libio-socket-ssl-perl, librest-client-perl, libjson-perl) - Create a minimal stub for PVE::SafeSyslog so perl -c can load FreeNAS.pm - Pass -I/tmp/pve-stub to perl -c so the stub is found Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e49359..c6f0b5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,13 +26,19 @@ jobs: - name: Install lint tools run: | sudo apt-get update -qq - sudo apt-get install -y shellcheck libperl-critic-perl + sudo apt-get install -y \ + shellcheck libperl-critic-perl \ + libwww-perl libio-socket-ssl-perl librest-client-perl libjson-perl + # PVE::SafeSyslog only exists on Proxmox hosts; stub it for syntax checking + mkdir -p /tmp/pve-stub/PVE + printf 'package PVE::SafeSyslog;\nuse Exporter "import";\nour @EXPORT = qw(syslog);\nsub syslog {}\n1;\n' \ + > /tmp/pve-stub/PVE/SafeSyslog.pm - name: Perl syntax check (all modules) run: | echo "==> Checking Perl syntax..." find perl5 stable-*/perl5 -name "*.pm" -print0 \ - | xargs -0 -I{} perl -c {} \ + | xargs -0 -I{} perl -c -I/tmp/pve-stub {} \ && echo "All .pm files OK" - name: Perl static analysis (perlcritic)