Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ add_test(NAME release_check_row COMMAND ${CMAKE_SOURCE_DIR}/os/mini/release-chec
# dir, so no key, no device and no build: the four refusals are a set with no manifest, a file the
# manifest does not list, a ciphertext byte flipped after signing, and a manifest signed by another key.
add_test(NAME seal_manifest COMMAND ${CMAKE_SOURCE_DIR}/tests/seal_manifest_test.sh)
# engine #1279: the version a package is built with (scripts/pack-version.sh) -- a release tag as
# it stands, a candidate mapped into the ISO week of its own date with a suffix that sorts below that
# release, and the ordering a candidate needs: previous release < candidate < its release. The
# ordering is the row dpkg, rpm and pacman had to agree on; no container, no build, dpkg only.
add_test(NAME pack_version COMMAND ${CMAKE_SOURCE_DIR}/tests/pack_version_test.sh)
# engine #713: the pinned HRX toolchain (config/hrx-toolchain.config, scripts/fetch-rocm-sdk.sh) -- the
# pin file's refusals, the completeness check against a fabricated tree, and that cmake and
# weekly.sh both use the pin instead of the box's /opt/rocm-therock. No network, no SDK, no GPU.
Expand Down
2 changes: 2 additions & 0 deletions docs/install-any-distro.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ registry model, since this Lemonade version has no local-file registration):
| the tarball cannot hand a system directory to uid 1000 | clean `ubuntu:26.04`, the documented `sudo tar -C / --no-same-owner --no-overwrite-dir -xf …` | `/`, `/usr`, `/usr/bin`, `/opt` read `0:0 755` before and after; the payload lands `0:0`, `0` of 75 files not owned by root, and the shim runs (`version: 1 (32559003)`). Before the fix the same extraction as root left uid 1000 owning `/`, `/usr`, `/usr/bin` and `/opt` — a local root escalation on every "any other distribution" install (#1292 review) |
| the glibc floor is enforced, not just documented | clean `ubuntu:24.04` container (glibc 2.39), `apt-get install ./1bit-engine_<version>_amd64.deb` | refused: `1bit-engine : Depends: libc6 (>= 2.43) but 2.39-0ubuntu8.9 is to be installed`. Before the floor was declared, the same deb installed, `ldd` was happy and the binary then failed to load |
| **the package's payload serves on the GPU** | strixhalo, the Fedora `.rpm` unpacked with `rpm2cpio` (so exactly the files the package installs), `1bit serve -m Qwen3-0.6B-Q4_K_M.gguf --device hrx --no-strict-device`, two chats | `1bit serve: HRX: HSA runtime …/_rocm_sdk_core/lib/libhsa-runtime64.so.1 sha256 21a66824…` — the runtime the package ships, not the box's — then `Qwen3-0.6B-Q4_K_M on hrx`, health `200`, and `request /v1/chat/completions -> hrx status 200 in 202.5 ms | prompt 16 completion 16 79.0 tok/s`; a second chat with `max_tokens: 200` came back `content: "5"` (109 completion tokens, 69.1 tok/s). The first one's content was empty because Qwen3 spends the opening tokens on its thinking trace, so a 16-token budget never reaches the answer. Both this model and `Qwen3-4B-Q4_K_M` are refused first by strict placement (`"embd" is GET_ROWS f32 … 1 of 986 nodes off HRX`), which is why the runs pass `--no-strict-device` |
| **the release proves its own packages** | `scripts/pack-proof.sh <out-dir> <version>`, wired into `scripts/weekly.sh`'s package stage, 2026-11-07, on the `rc-2026-11-06-c31` artifacts | 6/6 rows PASS: the `.deb` installed in `ubuntu:26.04`, the `.rpm` in both `fedora:latest` and `opensuse/tumbleweed`, the pacman package in `archlinux:latest` (each asked `1bit-engine --version` = `1bit 0.0.1`, made to run the shim = `version: 1 (32559003)`, then removed with nothing left), the tarball unpacked as root the way this page says, and the four compared as root (paths, modes, owner `0:0`, sizes, sha256). Handed the pre-fix tarball — uid 1000, a `./` member, the filesystem directories — the same harness fails **4/6**, naming the 151 members that are not root's and the payload difference, so the row is a check and not a claim |
| **a candidate package installs over the previous release** | `scripts/pack-version.sh` + `tests/pack_version_test.sh` (ctest `pack_version`), measured with each family's own comparator, 2026-11-07 | a candidate tag has to map to a version that sorts *above* the previous release and *below* the release it precedes, or installing it is a downgrade that apt and rpm refuse. `rc-2026-11-07-c32` packs as `2026.45~c32` (deb, rpm, tarball) and `2026.45c32` (pacman): `2026.44 < 2026.45~c32 < 2026.45` with `dpkg --compare-versions` and with rpm's `labelCompare` in `fedora:latest`, and `2026.44 < 2026.45c32 < 2026.45` with pacman's `vercmp` in `archlinux:latest`. The mapping this replaced read the tag as `2026.11.07.c32`, which is *below* every release since week 11 (`dpkg: 2026.11.07.c32 < 2026.44`) — the bug the #1368 review found, kept as a row in the test |
| a stock Lemonade takes a backend binary from `hrx_bin` / `LEMONADE_HRX_HRX_BIN` | extracted PPA deb `2026.44.1~26.04` on the dev box, isolated cache/config | `llamacpp-hrx` backend `installable` → `installed`, both forms, with no fork and no patch |
| the same recipe, both packages side by side | clean `ubuntu:26.04` container: PPA `lemonade-server` + this `.deb` | `lemond 2026.44.1` starts, `1bit-engine --version` and the shim run; the recipe's backend state is hardware-gated there (`unsupported: Unsupported GPU`), so the end-to-end chat is the hardware row below |
| the shim is the engine's own wrapper | `1bit/lemonade-hrx` from this repo's package (`scripts/package-linux.sh`) | it runs `1bit serve --print-backend-env` and then `exec`s the engine with serve's environment and defaults; `lemonade-bin/llama-server` is a symlink to it |
Expand Down
18 changes: 15 additions & 3 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,18 @@ WEEKLY_DRY_RUN=1 WEEKLY_TAG=rehearsal-private scripts/weekly.sh ~/.cache/1bit-we
2. **build** and **test**: `main` at the merged pins, the same way.
3. **package**: the two packages above, plus the engine's own packages for every family
(`scripts/mk-plugin-package.sh`: the `.deb`, `.rpm`, Arch package and tarball, all built from one
payload tree by `scripts/pack-distro.sh`). `scripts/package-linux.sh` packs the engine first; its
tarball goes into the Lemonade + onebit package as `1bit/`, not into the release on its own.
payload tree by `scripts/pack-distro.sh`), and then the proof of them:
`scripts/pack-proof.sh` installs each one in a throwaway container of its distribution
(`ubuntu:26.04`, `fedora:latest`, `opensuse/tumbleweed`, `archlinux:latest`), asks the engine its
version, runs the shim, removes it and checks nothing is left; unpacks the tarball as root the way
the guide says; and compares the four as root so a package carrying a different payload fails the
release instead of a user. A failing row stops the release. `scripts/package-linux.sh` packs the
engine first; its tarball goes into the Lemonade + onebit package as `1bit/`, not into the release
on its own. A candidate cut's tag is not a version, so it is mapped to one by
`scripts/pack-version.sh`: `rc-2026-11-07-c32` becomes `2026.45~c32` in the `.deb`, `.rpm` and
tarball names and `2026.45c32` in the Arch one, which is the week of the release it is a candidate
for and sorts after the previous release and before that one, so installing a candidate is an
upgrade (the property `tests/pack_version_test.sh` pins).
4. **release**: `tools/weekly_changes.py` lists, for every pin that moved since the last release,
the upstream commits (authors, PRs) and releases in between; that becomes the release notes and
`changes.json`, and `gh release create` publishes it all.
Expand All @@ -503,7 +513,9 @@ rehearsal found these only after the build) and stops with a message naming what
or `ROCM_PATH`. (The optional DwarfStar build that also wanted it is gone since 2026-11-02.)
- **package:** `patchelf` (`scripts/package-linux.sh`); `dpkg-deb` and `docker`
(`scripts/pack-distro.sh` builds the `.rpm` with rpmbuild in a `fedora` container and the Arch
package with makepkg in an `archlinux` one, since the release box has neither toolchain); `node`
package with makepkg in an `archlinux` one, since the release box has neither toolchain, and
`scripts/pack-proof.sh` installs all four in `ubuntu:26.04`, `fedora:latest`,
`opensuse/tumbleweed` and `archlinux:latest`, so the network has to reach those four images); `node`
and `npm` for Lemonade's web app
(`LEMONADE_WEB_APP=1 scripts/build-lemonade.sh`; its `npm ci` needs the network); a readable kernel image for the `os/mini` image,
`/boot/vmlinuz-$(uname -r)` or `VMLINUZ=<copy>` (Ubuntu's `/boot/vmlinuz-*` is root-only).
Expand Down
19 changes: 12 additions & 7 deletions scripts/pack-distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
# PKG_NAME, PKG_SUMMARY, PKG_DESC, PKG_MAINTAINER (required)
# PKG_DEB_DEPENDS, PKG_DEB_RECOMMENDS (optional, comma separated)
#
# The version is normalized to what every family accepts: a leading "v" goes, and anything outside
# [A-Za-z0-9._] becomes "." (rpm and pacman refuse "-" in a version, and the weekly's rehearsal tags
# start with "rc-").
# The version is normalized to what every family accepts, because the tag a cut carries is not one
# (scripts/pack-version.sh: rc-2026-11-07-c32 packs as 2026.11.07.c32, and a tag with no digit at all as
# 0.<tag>). It is the same function scripts/pack-proof.sh uses to find the packages again.
#
# deb and tarball are built here. rpm and arch are built in containers (fedora:latest,
# archlinux:latest): rpmbuild and makepkg are the only correct builders for those two formats and the
Expand All @@ -53,16 +53,17 @@ set -euo pipefail
[ $# -eq 3 ] || { sed -n '16,52p' "$0"; exit 2; }
fmt=$1 root=$2 out=$3
repo=$(cd "$(dirname "$0")/.." && pwd)
# shellcheck source=scripts/pack-version.sh
. "$(dirname "$0")/pack-version.sh"

need() { [ -n "${!1:-}" ] || { echo "pack-distro.sh: $1 is not set ($2)" >&2; exit 2; }; }
need PKG_VERSION "the release version"
[ -d "$root" ] || { echo "pack-distro.sh: no payload tree at $root" >&2; exit 2; }
[ -n "$(ls -A "$root")" ] || { echo "pack-distro.sh: the payload tree at $root is empty" >&2; exit 2; }

ver=$(printf '%s' "${PKG_VERSION#v}" | sed -e 's/[^A-Za-z0-9._]\+/./g' -e 's/^\.*//' -e 's/\.*$//')
[[ $ver =~ ^[0-9] ]] || {
echo "pack-distro.sh: version '$PKG_VERSION' does not start with a digit even normalized ('$ver'); pass the release's version" >&2
exit 2; }
# the version and how a tag becomes one lives in one place, shared with the proof that looks the
# packages up by name (scripts/pack-version.sh); it is per family, because a candidate's version has to
# sort below its release and only pacman needs a different spelling to do that
rel=${PKG_RELEASE:-1}

# The distribution's own filesystem skeleton: its filesystem package owns these paths, so no package
Expand Down Expand Up @@ -103,6 +104,7 @@ deb)
need PKG_DESC "the description"
need PKG_MAINTAINER "the maintainer, \"Name <mail>\""
[ ! -e "$root/DEBIAN" ] || { echo "pack-distro.sh: $root already has a DEBIAN directory" >&2; exit 2; }
ver=$(pack_version "$PKG_VERSION" deb) || exit 2
# a real copy, not hardlinks: the modes are normalised inside it, and the caller's tree is left as
# it was
cp -a "$root" "$work/root"
Expand All @@ -128,6 +130,7 @@ deb)
;;
tarball)
# the name keeps the name the guide has always used for this route
ver=$(pack_version "$PKG_VERSION" tarball) || exit 2
f="$out/${PKG_NAME:-1bit}-${ver}-linux-x86_64.tar.zst"
cp -a "$root" "$work/root"
normalize_modes "$work/root"
Expand All @@ -148,6 +151,7 @@ rpm)
need PKG_NAME "the package name"
spec=${PKG_RPM_SPEC:-$repo/packaging/rpm/$PKG_NAME.spec}
[ -f "$spec" ] || { echo "pack-distro.sh: no spec at $spec" >&2; exit 2; }
ver=$(pack_version "$PKG_VERSION" rpm) || exit 2
p="$PKG_NAME-$ver"
mkdir -p "$work/$p"
cp -a "$root/." "$work/$p/"
Expand Down Expand Up @@ -187,6 +191,7 @@ SH
arch)
pkgbuild=${PKG_ARCH_PKGBUILD:-$repo/packaging/arch/PKGBUILD}
[ -f "$pkgbuild" ] || { echo "pack-distro.sh: no PKGBUILD at $pkgbuild" >&2; exit 2; }
ver=$(pack_version "$PKG_VERSION" arch) || exit 2
mkdir -p "$work/payload"
cp -a "$root/." "$work/payload/"
normalize_modes "$work/payload"
Expand Down
Loading
Loading