-
Notifications
You must be signed in to change notification settings - Fork 0
Installation.zh
EN · EL · FR · ES · IT · RU · ZH · AR · HI · PT · DE
在 Slackware 上,你安装由 SlackBuild 构建的二进制软件包。它会替你把一切就位:
- 可执行文件
slacker(/usr/local/sbin/slacker), - man 手册页(
man slacker), -
/etc/slacker/下的纯文本配置文件。
你无需复制任何东西。 安装软件包之后,唯一的配置就是编辑两个文件 —— 在 mirrors
中选一个镜像,在 repos 中设定仓库优先级 —— 然后运行 slacker status(它会检查
配置并告诉你接下来该做什么)、slacker update gpg 和 slacker update。参见
Quick Start。
在升级时,Slackware 会以
*.new的形式投递有变更的配置文件,使你的修改永不被 覆盖;slacker new-config可帮你将它们调和。
构建需要 Rust 1.85.1 或更新版本 —— 即实际支持的最低 Rust 版本。当前的
Slackware 附带 Rust 1.96,完全可用。(crate 本身是 edition 2021,但其依赖
clap_lex 用 edition 2024 编写,正是它把下限设在了 1.85.1 —— 而非 slacker 自身的
代码。)
cargo build --release
install -m0755 target/release/slacker /usr/sbin/slacker
install -m0644 slacker.8 /usr/man/man8/slacker.8
mkdir -p /etc/slacker/templates
for f in slacker.conf mirrors repos blacklist; do
install -m0644 examples/etc-slacker/current/$f /etc/slacker/$f
done构建或运行测试套件无需 root;只有会改动系统的命令才需要 root。
cargo build
cargo test # 所有测试通过;构建无任何警告slacker 在依赖上刻意保持精简。直接 crate:clap、ureq、md-5、regex。一切
繁重的工作都交给 Slackware 本就附带的工具:
-
installpkg/upgradepkg/removepkg—— 实际的软件包操作, -
gpg—— 签名校验, -
bzip2—— MANIFEST, -
sha256sum—— SHA 校验和。
TLS 由 rustls 在进程内处理(通过 ureq 的 tls feature),因此 slacker
完全不依赖 libssl/系统 OpenSSL。这是有意为之:一个无需满足 libssl 的二进制
文件,能在比其构建环境更旧的基础系统上继续运行 —— 正是这一点,让一个在 -current
上构建的 slacker 能够在 15.0 的机器上驱动一次发行版升级(参见
Distribution Upgrade)。
如果你要构建可分发的软件包,请先冻结依赖版本,以使构建保持可复现。参见 Building and Releasing。
slacker --version
slacker status # 对整套配置做健康检查下一步:Quick Start。
slacker - slackpkg + slackpkg+ in one - Apache-2.0 - by Ioannis Anagnostakis (rizitis) - beta / WIP, for Slackware -current (64-bit & 32-bit)
Getting started
Using slacker
- Commands
- Common Workflows
- Distribution Upgrade
- Repositories and Priority
- Package History
- Dependencies
- Docker
- Templates
- Blacklist
Trust & safety
Reference
For contributors