mirror of
https://github.com/buckit-io/buckit.git
synced 2026-09-12 05:49:02 +00:00
343c2876d6
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.
42 lines
929 B
Desktop File
42 lines
929 B
Desktop File
[Unit]
|
|
Description=Buckit Object Storage
|
|
Documentation=https://github.com/buckit-io/buckit
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
AssertFileIsExecutable=/usr/local/bin/buckit
|
|
|
|
[Service]
|
|
Type=notify
|
|
|
|
WorkingDirectory=/usr/local
|
|
|
|
User=buckit
|
|
Group=buckit
|
|
ProtectProc=invisible
|
|
|
|
EnvironmentFile=-/etc/default/minio
|
|
ExecStart=/usr/local/bin/buckit server $MINIO_OPTS $MINIO_VOLUMES
|
|
|
|
# Let systemd restart this service always
|
|
Restart=always
|
|
|
|
# Specifies the maximum file descriptor number that can be opened by this process
|
|
LimitNOFILE=1048576
|
|
|
|
# Turn-off memory accounting by systemd, which is buggy.
|
|
MemoryAccounting=no
|
|
|
|
# Specifies the maximum number of threads this process can create
|
|
TasksMax=infinity
|
|
|
|
# Disable timeout logic and wait until process is stopped
|
|
TimeoutSec=infinity
|
|
|
|
# Disable killing of Buckit by the kernel's OOM killer
|
|
OOMScoreAdjust=-1000
|
|
|
|
SendSIGKILL=no
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|