Commit Graph

17 Commits

Author SHA1 Message Date
abuckit d6317c7ff8 packaging: reword comment to satisfy typos linter 2026-06-24 11:32:35 -04:00
abuckit 735fabc2d8 packaging: disable XFS retry-on-error on Buckit data drives
Buckit handles XFS errors itself, so the kernel default (retry-on-error
forever) only adds latency. Ship a systemd timer that periodically sets
max_retries=0 for the EIO, ENOSPC, and default error classes on the block
devices backing MINIO_VOLUMES.

The values reset on every mount, so the timer (re-)applies them after boot
and after a restart-free drive hot-swap. The script reads MINIO_VOLUMES from
the running server's process environment, scopes writes to only the mounted
Buckit data drives (never the root fs or unrelated XFS volumes), and exits
cleanly when the server is down or no XFS is present. Genuine write failures
are logged and surface the unit as failed.

postinstall enables the timer (idempotent across upgrades); postremove
disables it only on full removal.
2026-06-23 23:51:30 -04:00
abuckit 4613026c6f install-mac.sh: leave buckit binary in place instead of moving it
Drop the move-to-PATH instruction; the verified binary stays in the download
directory and the script prints how to run it from there, matching
install-windows.ps1.
2026-06-18 19:44:09 -04:00
abuckit c301779f4f install-windows.ps1: leave buckit.exe in place instead of moving it
Drop the move-to-PATH instruction; the verified buckit.exe stays in the
download directory and the script prints how to run it from there.
2026-06-18 19:43:26 -04:00
abuckit a8b561e837 install-windows.ps1: add Windows platform guard and fix install example
Fail fast when run under cross-platform PowerShell on Linux/macOS (rather than
fetching the Windows .exe), treating undefined $IsWindows on Windows
PowerShell 5.1 as Windows. Make the printed install example create the target
directory before moving the executable into it.
2026-06-18 19:42:27 -04:00
abuckit 255c33fa3e feat: add macOS and Windows installer scripts
Add install-mac.sh (downloads the Apple Silicon binary, verifies SHA-256,
clears the macOS quarantine attr, prints the move-to-PATH command) and
install-windows.ps1 (downloads the .exe, verifies SHA-256, prints the
move-to-PATH command). Both write to a predictable filename (buckit /
buckit.exe) and use the same atomic temp-then-move + checksum-gate flow as
install-linux.sh.

Publish both to gh-pages in the release workflow, and point install-linux.sh's
non-Linux error at the new scripts.
2026-06-18 19:31:31 -04:00
abuckit c0951456cf install-linux.sh: derive sudo prefix instead of hardcoding it
Set SUDO once (empty when already root, "sudo " when sudo is available,
empty with a warning otherwise) and build INSTALL_CMD from it, so the printed
install command is correct on root/container hosts without sudo.
2026-06-18 18:17:00 -04:00
abuckit 61b1d5c4fc install-linux.sh: download atomically to avoid clobbering on failure
Write the download to a temporary sibling file and only mv it into the
predictable buckit.<ext> path after the checksum verifies, with an EXIT trap
to clean up on failure. A failed or interrupted download can no longer leave
a partial/unverified file or overwrite an existing good package.
2026-06-18 18:13:31 -04:00
abuckit 8e146d4478 install-linux.sh: download to a predictable filename, drop --install mode
Revert the --install non-interactive mode. The script again only downloads,
verifies, and prints the install command. Instead of a versioned name in a
temp dir, the package is saved to a predictable buckit.rpm / buckit.deb /
buckit.apk in the current directory (overridable via BUCKIT_DOWNLOAD_DIR), so
the printed install command is stable and copy-pasteable in docs.
2026-06-18 18:10:21 -04:00
abuckit b8cf52b4fc feat: add --install non-interactive mode to install-linux.sh
Default behavior is unchanged (download, verify, print the install command).
Passing --install runs the detected install command automatically after a
successful checksum verification, for docs and automation use.

Execution reuses the detected command via unquoted word-splitting of the
fixed INSTALL_CMD words with the package path as a single quoted argument —
reliable in POSIX sh without eval.
2026-06-18 18:07:15 -04:00
abuckit 616eeea9a2 rename install-rpm.sh to install-linux.sh
The script installs rpm, deb, and apk packages, so the rpm-specific name
was misleading. install-linux.sh reflects its actual Linux-wide scope.
2026-06-18 17:58:02 -04:00
abuckit 3fab64f1bf feat: add install-rpm.sh native-package installer
Add packaging/install-rpm.sh, a POSIX sh helper served from gh-pages that
detects the host package manager (dnf/yum/zypper, apt/apt-get/dpkg, or apk),
downloads the matching .rpm/.deb/.apk for the latest stable release, verifies
its published SHA-256 checksum, and prints the install command to run. It does
not invoke the package manager itself.

Wire the update-gh-pages release job to check out source and publish the
script to pages/install-rpm.sh so it ships at
https://buckit-io.github.io/buckit/install-rpm.sh during a normal release.
2026-06-18 17:53:42 -04:00
abuckit 6f17ed7db3 packaging: remove rpm preremove service stop 2026-05-21 18:34:29 -04:00
abuckit bdfebfb00e packaging: restore systemd unit install path 2026-05-20 17:18:05 -04:00
abuckit 2513d0a530 packaging: install buckit.service for systemd 2026-05-20 17:14:41 -04:00
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