Commit Graph

17 Commits

Author SHA1 Message Date
Kevin Adams 3b3cc8d135 fix: ZFSPlugin 8.4.x patch and missing patch dependency (#236 #237)
Two install-time failures on PVE 8.4.x nodes:

1. 'patch' utility not in Depends — causes silent patch failure on fresh
   nodes; all three PVE file patches silently skip, plugin appears to
   install but storage operations fail. Added 'patch' to control.j2.

2. ZFSPlugin.pm routing not applied on PVE 8.4.x — tabs→spaces reformat
   and get_base($scfg) signature change in 8.4 broke hunks #3 and #4
   (the freenas elsif routing branches). Nodes with a prior partial
   install are doubly affected: grep idempotency check passes on partial
   freenas strings, so the routing is never applied, causing:
     "freenas: unknown iscsi provider" on clone/migrate operations.

New ZFSPlugin-8.4.14_1.pm.patch generated against stock PVE 8.4.19,
bundled as patches/ZFSPlugin/8.4.patch alongside existing 8.patch.

Verified clean on pve01-hq (8.4.19) and pve02-hq (8.4.14).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 23:16:17 -04:00
Kevin Adams b41fefb72b docs: add PVE version compatibility warnings across all user touchpoints
Users on unsupported PVE versions now get clear guidance at every
layer — README, install time, and GitHub release notes — rather than
silently failing or getting confusing patch errors.

- README: replace bare compatibility table with a full matrix and
  prominent callout blocks for PVE 7 (last v2.x), PVE 8 (EOL
  2026-08-31), PVE 9+ (use v3.0), and PVE ≤6 (unsupported)
- postinst: add check_pve_version() that exits on PVE < 7, warns
  loudly on PVE 7 (stay on v2.x, do not upgrade to v3.0), notes
  the PVE 8 EOL date, and warns on PVE 9+ (v2.x not supported)
- build.yml release template: add a version compatibility table so
  every GitHub release prominently states who should and should not
  install it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:33:13 -04:00
Kevin Adams ea1d0e2248 fix: version-aware pvemanagerlib patch selection for PVE 8.4.x (#223)
PVE 8.4 reformatted pvemanagerlib.js (tabs→spaces, structural changes),
making the existing 8.0.5-era patch fail on all 8.4.x nodes.

- Add pvemanagerlib-8.4.14_1.js.patch covering PVE 8.4.x (all hunks
  verified on 8.4.14 and 8.4.19)
- Update postinst to detect pve-manager major.minor (e.g. "8.4") and
  try a minor-version-specific patch before falling back to the major
  patch — 8.3.x nodes keep using 8.patch, 8.4.x nodes use 8.4.patch
- Update build.yml to bundle 8.4.patch alongside the existing 8.patch

Tested live on pve01-hq (8.4.19) and pve03-hq (8.3.2) — correct patch
selected in each case, pvemanagerlib patched successfully on 8.4.19.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:10:11 -04:00
Kevin Adams 89acaf4145 ci: upgrade GitHub Actions to Node 24 runtimes (closes #231)
GitHub is removing Node.js 20 from Actions runners on Sep 16, 2026
and forcing Node 24 as default from Jun 2, 2026. Upgrade all
first-party actions to latest major versions that ship with node24:

  actions/checkout@v4        → v6
  actions/upload-artifact@v4 → v7
  actions/download-artifact@v4 → v8

Note: setup-python@v5 warning is inside cloudsmith-io/action@master
and is not directly addressable here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 10:06:20 -04:00
Kevin Adams 7fa3ff9c91 Add \$VERSION to FreeNAS.pm; use it as authoritative version in CI
our \$VERSION = '2.3.0' is now the single source of truth for the release
series. The build.yml extracts it with a perl one-liner (no module load,
no stubs needed) and uses it as BASE_VERSION for alpha/beta channel builds.

Git tags remain the release trigger: pushing an exact vX.Y.Z tag publishes
to the stable Cloudsmith channel. A mismatch warning fires if the tag
version and \$VERSION disagree, catching forgotten version bumps.

The v2.3.0-pre anchor tag approach is superseded by this; the anchor tag
can stay in history as a breadcrumb but \$VERSION is now what drives builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 00:13:28 -04:00
Kevin Adams ccdc7a43f6 Fix version numbering: anchor tags set series without triggering release
Two changes:
1. BASE_VERSION now strips pre-release suffixes from the nearest ancestor tag
   (e.g. v2.3.0-pre → 2.3.0), so anchor tags like v2.3.0-pre make feature
   branch builds say 2.3.0-alpha+<sha> without "pre" leaking into the version.

2. Stable release detection changed from glob (refs/tags/v*) to an exact
   semver regex (^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$). Tags with a suffix
   (v2.3.0-pre, v2.3.0-rc1) build and validate but do not publish to Cloudsmith
   stable — they fall through to the 'none' channel.

This lets us place a v2.3.0-pre anchor tag to version the development series
correctly, then later push v2.3.0 as the actual stable release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 23:59:26 -04:00
Kevin Adams 84cc862bed 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 <noreply@anthropic.com>
2026-05-15 15:05:52 -04:00
Kevin Adams ce84a857c4 Fix YAML syntax: quote step names containing colons
Unquoted YAML plain scalars cannot contain ': ' (colon-space) because
the parser interprets it as a nested key-value mapping. The two step
names 'Dry-run patch: ZFSPlugin (PVE 8)' and 'Dry-run patch: apidoc.js
(PVE 8)' triggered this, causing GitHub Actions to reject the workflow
file before any jobs ran.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 15:02:08 -04:00
Kevin Adams ba238eb7d6 Fix CI workflow file issues causing no-jobs-run failure
Two bugs that prevented any jobs from running:

1. action.yml contained only YAML comments (no 'on:' or 'jobs:' keys),
   making it an invalid workflow file. GitHub rejected it at parse time.
   Fixed by giving it a minimal valid structure with workflow_dispatch
   trigger only, so it never fires automatically.

2. build.yml perlcritic step referenced perl5/PVE/Storage/Custom/FreeNAS.pm
   which is not committed to the repository, causing a step failure.
   Removed — only FreeNAS.pm (LunCmd) is linted for now.

3. build.yml publish job used 'if: |' block scalar for a multi-line
   expression, which GitHub Actions rejects in expression position.
   Changed to a single inline expression string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 14:52:17 -04:00
Kevin Adams 636cd06ff6 Phase 1 project revival + PR fixes (#207, #209, #213)
Project infrastructure:
- Replace MIT license with AGPL-3.0 (KSA Technologies, LLC)
- Full README rewrite with badges, compatibility table, token auth docs
- Add CHANGELOG, CONTRIBUTING, DONORS, SECURITY docs
- Add GitHub issue/PR templates, update FUNDING.yml and stale.yml
- Replace external packer repo dispatch with self-contained CI (build.yml)
- Add packaging/DEBIAN/ with postinst/postrm/triggers (no git clone at install)
- Add .perlcriticrc for static analysis
- Add .claude/cos/ ADRs, plans, and runbooks

Bug fixes from community PRs:
- Fix bearer token check in freenas_api_connect: defined() && value instead of
  defined() alone, so truenas_token_auth=0 no longer activates Bearer Token auth (#207)
- Fix LUN 0 falsy bug in ZFSPlugin patch: !$guid -> !defined $guid in both
  zfs_get_lun_number and zfs_get_wwid_number, fixing VMs on LUN 0 for PVE 9 (#209)
- Fix syslog typo "wtih" -> "with" in run_list_extent (#213)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 14:22:04 -04:00
Kevin Scott Adams bcf0f78514
Create stale.yml 2021-11-21 21:35:35 -05:00
Kevin Scott Adams 7c0738bab4 Added a space to kick off a build.
- Checking the build of branch 2.0.
2020-09-02 16:37:24 -04:00
Kevin Scott Adams 3dd67fbf57 Trying GitVersioning
- See if I can make a version number on builds using a premade action.
2020-09-01 21:16:11 -04:00
Kevin Scott Adams a6e9229677 New build process
- Testing the github actions to build the debian package.
2020-08-28 15:22:01 -04:00
Kevin Scott Adams 13a93e653b
Update FUNDING.yml 2020-08-27 15:10:14 -04:00
Kevin Scott Adams e43ad9a94f
Update FUNDING.yml 2020-08-27 15:06:04 -04:00
Kevin Scott Adams 1570f3cb60
Create FUNDING.yml 2020-08-27 13:46:54 -04:00