etherpad-lite/packaging/nfpm.yaml
John McLear 04045fe532
Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781)
* Roll Node.js floor back to >= 24 (Active LTS)

Closes #7779.

#7779 originally proposed bumping past the Node 25 stop-gap to Node 26.
After re-checking the release schedule, the cleaner LTS target is
actually Node 24:

- Node 24 (Krypton) is currently in Active LTS, supported until ~May 2028.
- Node 25 hit end-of-life on April 10 2026 — the floor merged in
  #7752 / #7749 / #7754 a day ago ships an already-EOL major.
- Node 26 was released May 5 2026 and does not enter Active LTS until
  October 2026.

So this PR reverts the Node 25 ratchet from those three PRs and lands
on Node 24 — Etherpad's runtime floor stays on a supported LTS for the
next ~2 years.

Runtime / infra
- `package.json` + `src/package.json`: `engines.node` `>=25.0.0` -> `>=24.0.0`
- `bin/functions.sh`, `bin/installer.sh`, `bin/installer.ps1`:
  `REQUIRED_NODE_MAJOR` 25 -> 24
- `Dockerfile`: `node:25-alpine` -> `node:24-alpine` (both stages).
  Corepack-via-npm workaround is intentionally kept: it works on
  Node 24 (which still ships corepack) and on Node 25+ (which doesn't),
  so the same recipe survives the next LTS bump without churn. Comments
  reworded accordingly.
- `snap/snapcraft.yaml`: pinned `NODE_VERSION` 25.9.0 -> 24.15.0; design
  notes + corepack comment adjusted
- `packaging/nfpm.yaml`: `nodejs (>= 25)` -> `nodejs (>= 24)` in
  top-level depends + deb/rpm overrides
- `packaging/bin/etherpad`: comment matches the new pin
- `packaging/README.md`: build prereqs + apt install snippet point at
  `node_24.x`; the long-stale "engines.node floor is 20" line is fixed
  while we're here
- `.github/workflows/*.yml`: setup-node `node-version` 25 -> 24 across
  every workflow; backend / frontend-admin / upgrade matrices
  `[25]` -> `[24]`
- `.github/workflows/deb-package.yml`: `NODE_MAJOR=25` + `node_25.x`
  smoke-test installer -> 24
- `bin/plugins/lib/npmpublish.yml`: 25 -> 24 (template propagates to
  the ~80 ether/* plugins via update-plugins workflow)

Docs
- `README.md`: install one-liner + Requirements -> Node.js >= 24
- `doc/npm-trusted-publishing.md`: runner requirement -> Node 24
- `doc/plugins.md` / `doc/plugins.adoc`: plugin metadata example
  `engines.node` -> `">=24.0.0"`

@types/node is left at ^25.8.0 — newer type definitions cover Node 24
runtime fine and avoid an unnecessary lockfile churn.

Companion homepage one-liner change to follow on ether/ether.github.com.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(plugins): example engines.node = ">=22.0.0", not core's floor

Plugin code is overwhelmingly ace-hook glue and rarely uses Node-version-
specific APIs, so plugin engines.node should reflect the plugin's own
requirements, not track core. Showing core's 24-floor in the example
encouraged plugin authors to blindly copy a tighter pin than necessary
and locked plugins out of being installable on older Etherpad/Node
deployments. Use the most-recent Node LTS that has actually reached EOL
(20 -> EOL April 2026) as the example floor, i.e. >=22.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 13:07:59 +01:00

128 lines
3.6 KiB
YAML

# nfpm configuration for Etherpad Debian/RPM/APK packages.
# Build with: nfpm package --packager deb --target dist/
# See: https://nfpm.goreleaser.com/configuration/
name: etherpad
arch: ${ARCH} # amd64 | arm64 (exported by CI)
platform: linux
version: ${VERSION} # e.g. 2.6.1, stripped of leading "v"
version_schema: semver
release: "1"
section: web
priority: optional
maintainer: "Etherpad Foundation <contact@etherpad.org>"
description: |
Etherpad is a real-time collaborative editor for the web.
This package installs Etherpad as a systemd service running
from /opt/etherpad with configuration in /etc/etherpad.
vendor: "Etherpad Foundation"
homepage: https://etherpad.org
license: Apache-2.0
depends:
- nodejs (>= 24)
- adduser
- ca-certificates
recommends:
- libreoffice # enables DOC/DOCX/PDF/ODT export
- curl
suggests:
- postgresql-client
- mariadb-client
# The short-lived "etherpad-lite" package name from the reverted PR #7559
# never shipped to a stable release, but declare replaces/conflicts so any
# development builds upgrade cleanly to the renamed package.
conflicts:
- etherpad-lite
replaces:
- etherpad-lite
provides:
- etherpad-lite
# ---------------------------------------------------------------------------
# Contents. staging/ is populated by CI before invoking nfpm:
# staging/opt/etherpad/ -- source + node_modules + built assets
# ---------------------------------------------------------------------------
contents:
- src: ./staging/opt/etherpad
dst: /opt/etherpad
type: tree
file_info:
mode: 0755
owner: root
group: root
- src: ./packaging/systemd/etherpad.service
dst: /lib/systemd/system/etherpad.service
file_info:
mode: 0644
# Default environment file (conffile: preserved on upgrade).
# Mode 0640 + group=etherpad so passwords/secrets admins drop in here
# are only readable by root and the etherpad service user — /etc/default
# is world-readable by default (0644), which would leak DB creds etc.
- src: ./packaging/systemd/etherpad.default
dst: /etc/default/etherpad
type: config|noreplace
file_info:
mode: 0640
owner: root
group: etherpad
- src: ./packaging/bin/etherpad
dst: /usr/bin/etherpad
file_info:
mode: 0755
# Template used by postinstall to seed /etc/etherpad/settings.json.
# Intentionally NOT a conffile: postinstall creates the real settings.json
# once on first install and never touches it again, so upgrades don't
# prompt with dpkg merge dialogs.
- src: ./packaging/etc/settings.json.dist
dst: /usr/share/etherpad/settings.json.dist
file_info:
mode: 0644
- dst: /etc/etherpad
type: dir
file_info:
mode: 0755
- dst: /var/lib/etherpad
type: dir
file_info:
mode: 0750
- dst: /var/log/etherpad
type: dir
file_info:
mode: 0750
scripts:
preinstall: ./packaging/scripts/preinstall.sh
postinstall: ./packaging/scripts/postinstall.sh
preremove: ./packaging/scripts/preremove.sh
postremove: ./packaging/scripts/postremove.sh
overrides:
deb:
depends:
- nodejs (>= 24)
- ca-certificates
rpm:
depends:
- nodejs >= 24
- shadow-utils
- ca-certificates
# adduser is needed by preinst (which creates the etherpad user before
# unpacking). Plain `dpkg -i` does not pre-fetch Depends, so we mark it
# Pre-Depends to guarantee it's available at preinst time. Note: this
# is a top-level `deb:` block, not under `overrides:` (where nfpm's
# Overridables schema does not include predepends).
deb:
predepends:
- adduser