Repository navigation
feat(tmachine): build local RPM artifacts - #4651
Conversation
|
Two suggestions on the libstdc++ fix. The prover is meant to be fully static: the release pipeline runs
|
|
Addressed in 548d181:
|
On macOS hosts, the aarch64 musl openshell-prover that build-artifacts-binaries produced was not static. z3-sys asks for a dynamic libstdc++ (-Wl,-Bdynamic -lstdc++), and the musl cross compiler wrapper resolved libstdc++.so. The result was a static executable with a DT_NEEDED entry for libstdc++.so.6 and no interpreter, which crashed during C++ static initialization. The local Debian package from #4598 ships this prover without running it. Build the musl binaries with CXXSTDLIB=static:-bundle=stdc++ so z3-sys requests a static libstdc++. CXXSTDLIB applies to every target and Darwin has no libstdc++, so set it only on this musl build rather than in the shared toolchain environment. The bundled form, static=stdc++, fails because rustc cannot find libstdc++.a on its own search path. Run tasks/scripts/verify-static-binary.sh on the musl CLI, sandbox and prover, as the release does, so a binary that is not fully static fails the local build. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Add build-artifacts-rpm, which builds the CLI and gateway RPMs that tmachine's rpm installer expects at artifacts/packages/rpm/openshell.rpm and artifacts/packages/rpm/openshell-gateway.rpm. It runs `packit build locally` with openshell.spec in the Fedora 44 image that build-rpm.yml uses, for the host's Linux architecture, and packages the binaries staged by build-artifacts-binaries. The package version defaults to the development version that branch E2E CI computes. The aggregate build-artifacts app runs the RPM step after the DEB step. Signed-off-by: Evan Lezar <elezar@nvidia.com>
548d181 to
ccb9ed0
Compare
Summary
Build the CLI and gateway RPMs that tmachine's
rpminstaller expects from the local checkout, so the Fedora Podman environments can run locally on aarch64 and x86_64 hosts. This is the RPM counterpart of the local DEB build from #4598. It also makes the local musl binaries fully static: on macOS hosts the prover linkedlibstdc++dynamically, crashed at startup, and failed the spec's%check.Related Issue
No issue yet. Opened by a maintainer with write access.
Changes
build-artifacts-rpm. It runspackit build locallywith the unchangedopenshell.specin the digest-pinned Fedora 44 image used bybuild-rpm.yml, for the host's Linux architecture. It packages the binaries staged bybuild-artifacts-binariesand writesartifacts/packages/rpm/openshell.rpmandartifacts/packages/rpm/openshell-gateway.rpm.release.py get-version --dev).OPENSHELL_RPM_VERSIONandOPENSHELL_RPM_RELEASEoverride it.build-artifactsruns the RPM step after the DEB step. It needs a Docker daemon that runs Linux containers for the host architecture, for example Docker Desktop on macOS.build-artifacts-binariessetsCXXSTDLIB=static:-bundle=stdc++for its musl build.z3-sysotherwise emits-Wl,-Bdynamic -lstdc++, and on macOS hosts the musl cross compiler wrapper resolvedlibstdc++.so. That produced a staticopenshell-proverwith aDT_NEEDEDentry forlibstdc++.so.6and no interpreter. The local DEB from feat(tmachine): build local Debian artifacts #4598 ships the same broken prover, but nothing runs it.CXXSTDLIBis read for every target, and Darwin has nolibstdc++. So it is set on the muslcargo buildrather than in the shared toolchain environment innix/toolchain/linux.nix. With it set there, theaarch64-apple-darwinprover failed to link withlibrary not found for -lstdc++.static=stdc++, fails because rustc cannot findlibstdc++.aon its own search path.main; an earlier search-order workaround in this PR was reverted.build-artifacts-binariesrunstasks/scripts/verify-static-binary.shon the musl CLI, sandbox, and prover, as the release does, and fails the build if one is not fully static.TESTING.md.Testing
nix flake check --no-build --all-systems,nix fmt -- --ci, and thewriteShellApplicationshellchecks pass.CXXSTDLIB,verify-static-binary.shrejects the aarch64 musl prover (DT_NEEDED libstdc++.so.6). With it,nix run .#build-artifacts-binariespasses the check foropenshell,openshell-sandbox, andopenshell-prover, and the prover runs in a Fedora 44 container.nix run .#build-artifacts-rpmproducesopenshellandopenshell-gatewayRPMs (0.1.5-0.dev.51.g902ee6571.fc44.aarch64), and the spec's%checkpasses. Earlier RPMs from this branch installed withdnfin Fedora 44.nix run .#tmachine -- test fedora-podman-rootful rpm conformancepassed with the earlier, search-order build of these binaries. It was not rerun after theCXXSTDLIBchange.fedora-podman-rootless rpm conformancenot run.Checklist
🤖 Generated with Claude Code