Skip to main content

max / alloy

3.6 KB · 79 lines History Blame Raw
1 %global debug_package %{nil}
2
3 # Timestamps here are a constant, not the clock.
4 #
5 # Fedora sets %%source_date_epoch_from_changelog by default and this spec had no
6 # %%changelog, so SOURCE_DATE_EPOCH went unset and every build stamped BUILDTIME
7 # and every file mtime with the second rpmbuild happened to run. MEASURED
8 # 2026-08-26: two builds of the same binary, seconds apart, produced RPMs that
9 # differ. rpmbuild said so on every build too, in a warning nobody read.
10 #
11 # It defeats what build/rpm is for downstream. A rebuild lockfile that pins the
12 # config exactly (GoingsOn 6e1f433a) would still hand back a different RPM every
13 # run, and a mirrored layered set (7ee5a694) could not tell a re-cut package from
14 # a changed one.
15 #
16 # So the %%changelog at the bottom carries a date, not a history. The date is
17 # fixed on purpose and nothing reads the entry as a log: what changed between two
18 # builds is the version, and the version is in the file name. The clamp that
19 # applies it to file mtimes is already Fedora's default; using it for BUILDTIME
20 # as well is not, hence the line below.
21 %global use_source_date_epoch_as_buildtime 1
22
23 Name: alloy
24 Version: %{alloy_version}
25 Release: 1%{?dist}
26 Summary: The Alloy console
27 License: MIT
28 URL: https://makenot.work/git/max/alloy
29
30 # The binary is built before rpmbuild runs and handed in through the buildroot,
31 # rather than compiled from a %%prep/%%build pair here. Two reasons, and both
32 # are about not owning a second build.
33 #
34 # The Containerfile's rust-build stage already produces this binary, with the
35 # toolchain pin, the `--locked` graph and the cache split that stage exists for.
36 # A spec that compiled it again would be a second definition of how the console
37 # is built, and the two would drift in the direction of whichever one somebody
38 # ran last.
39 #
40 # It also keeps the RPM a packaging step rather than a build step, so the same
41 # binary that was tested is the one that ships. `build/rpm/build.sh` is what
42 # stages it.
43 Source0: alloy
44
45 # rpm would otherwise work these out by scanning the binary and require the
46 # exact soname set of whatever host built it. The console links only glibc and
47 # its own statically-linked Rust dependencies, and the base image it lands on
48 # is the one that built it, so the scan buys nothing and costs a package that
49 # refuses to install across a Fedora minor bump.
50 AutoReqProv: no
51 Requires: glibc
52
53 %description
54 The Alloy console: the `alloy` binary, which is the system's control surface
55 for network, audio, display, packages, disks, settings and the installer.
56
57 Packaged so a fix can reach an installed machine without rebuilding an ISO and
58 writing a drive. Alloy is distributed as a builder rather than as an image, so
59 rpm-ostree layering from a repo carrying only Make Creative's own components is
60 the delivery path for everything else (GoingsOn task d866e125).
61
62 This package must never be part of a base image. A component the base carries
63 cannot be replaced client-side — `rpm-ostree install` fails to depsolve against
64 it and `override replace` records a request that never activates — so a base
65 that ships the console is a machine that can never be sent a console fix. It is
66 layered at install time and it stays layered. Measured in build/layertest.
67
68 %install
69 mkdir -p %{buildroot}%{_bindir}
70 install -m 0755 %{SOURCE0} %{buildroot}%{_bindir}/alloy
71
72 %files
73 %{_bindir}/alloy
74
75 %changelog
76 * Wed Aug 26 2026 Make Creative <info@makenot.work> - 0-0
77 - The date above is the package epoch, fixed so two builds of one binary
78 produce one RPM. See the header; this is not a change log.
79