Commit Graph

2 Commits

Author SHA1 Message Date
abuckit 359e4edef9 fix: resolve CI failures in shfmt and decom tests
- packaging/scripts: convert 4-space indentation to tabs (shfmt)
- docs/distributed/decom*.sh: add consistent trailing slashes to
  mc ls bucket paths so before/after diffs compare identical formats
2026-05-19 11:30:13 -04:00
abuckit 343c2876d6 build: replace pkger with nfpm to ship a real systemd unit
The previous packaging step used minio/pkger, which is hardcoded for
MinIO's portfolio: its nfpm template only attaches a systemd unit when
the binary name matches "minio", "aistor", or "sidekick". Invoking it
with --appName buckit silently dropped the unit (and the maintainer/
homepage fields stayed MinIO-branded) — the published .rpm/.deb shipped
only /usr/local/bin/buckit with no service definition.

Switch to nfpm directly, driven by a config in packaging/nfpm.yaml that
we own. The packages now contain:

  /usr/local/bin/buckit
  /lib/systemd/system/buckit.service   (Type=notify, LimitNOFILE=1048576,
                                        OOMScoreAdjust=-1000, etc.)

A postinstall script creates the buckit system user/group idempotently;
preremove stops the service; postremove reloads systemd but deliberately
leaves the user in place to avoid orphaning data on attached storage.

The unit is modeled on MinIO's production unit but reads
EnvironmentFile=-/etc/default/minio (leading - = optional), keeping
fresh buckit nodes byte-compatible with the env file MinIO already
ships, so the manager's in-place migration story works without any
config translation.

Verified locally by building rpm/deb/apk against the published
RELEASE.2026-05-11T17-20-40Z binary and inspecting the output.
2026-05-11 15:21:58 -04:00