Repository navigation
Build RPM packages on OBS from the shared spec - #202
Conversation
|
This PR turns off stripping, debuginfo, and build-id links for the prebuilt payload. EvidenceIn the ImpactThe impact is admittedly small:
Proposed fixAdd the following next to the existing %global __brp_mangle_shebangs %{nil}
%global __brp_python_bytecompile %{nil}Then add matching assertions to |
Update SRPM spec generator to generate a spec shared among rpmbuild and debbuild Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
The unified spec is built by debbuild and rpmbuild, so names that said "deb" for the shared parts were misleading. - cmd/build-spec/deb -> cmd/build-spec/obs - make deb-sources[-<component>] -> make obs-sources[-<component>], DEB_SOURCES_DIR -> OBS_SOURCES_DIR, build/deb-sources -> build/obs-sources - packaging/builder: debspec.go, debsources.go and their test -> obsspec.go, obssources.go, obsspec_test.go; WriteDebSpec, WriteDebSources, DebVersionRelease and related identifiers -> OBS* DEB-specific names stay: deb-rebuild-container, debbuild-rebuild.sh, DEBFileListSuffix, TestDeb*. Also fix the rpm-source-rebuild matrix: its include entries had no arch, so GitHub would have merged them into the arch axis and run only the AlmaLinux image. Use a plain image x arch matrix and derive the Python skip from the image. Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
6c437b8 to
327f095
Compare
brp-mangle-shebangs rewrote "#!/usr/bin/env node" to "#!/usr/bin/node" in the Node.js scripts, so the RPMs shipped different bytes from the DEBs built from the same source archive and the scripts failed on hosts whose node is not /usr/bin/node. Turn it off, and brp-python-bytecompile too, which would write unpackaged __pycache__ files if its inputs changed. Signed-off-by: x1unix <9203548+x1unix@users.noreply.github.com>
This PR updates the SRPM spec generator to produce a shared spec to support both
debbuildandrpmbuild(for RPM packages).This is the first step of moving the RPMs from COPR to OBS (see the design doc).
It adds no RPM repositories to the workflow's targets yet, and COPR is untouched.
What changes
A single shared spec serves
debbuildandrpmbuild, with small differences guarded by%{_vendor}.StageOBSstages one payload with two file lists:<component>.rpm.files(with%attrand%config(noreplace)) and<component>.deb.files.make obs-rpm-rebuild-containerrebuilds the generated specs, andmake integration-test-obs-rpm-rebuildtests the RPM metadata.A new
rpm-source-rebuildCI job runs these on Fedora 44 and AlmaLinux 9, on amd64 and arm64.The generator uses format-neutral names.
cmd/build-spec/debcmd/build-spec/obsmake deb-sources[-<component>],DEB_SOURCES_DIR,build/deb-sourcesmake obs-sources[-<component>],OBS_SOURCES_DIR,build/obs-sourcesdebspec.go,debsources.go, and theDeb*identifiersobsspec.go,obssources.go, andOBS*Testing
Run locally on amd64:
make obs-sources, thenmake integration-test-obs-rpm-rebuildon Fedora 44: six RPMs build and everyTestRpm*test passes.almalinux:9(rpm 4.16) andalmalinux:10: six RPMs build and everyTestRpm*test passes.make integration-test-deb-rebuildondebian:12: six DEBs build and everyTestDeb*test passes, so sharing the spec does not change the DEBs.Also checked on OBS, in a sandbox project: all six packages built from the unified spec for the DEB and RPM targets on both architectures and published with signed metadata.
The RPMs built on AlmaLinux 9 and 10 installed from the published repository, with signature checks on, on clean AlmaLinux 9, AlmaLinux 10, and Fedora 44 containers (
x86_64).Not verified yet
rpm-source-rebuildjob has not run on GitHub (registry pulls, arm64 runners, Python staging time).obs.ymlhas not been dispatched since the rename.Notes for reviewers
rpmrepository built on AlmaLinux 9 and used by Fedora and EL alike.The Python package is part of it everywhere; on EL 9 its system Python 3.9 is not among the bundled interpreters (3.10 to 3.13), so it installs but does nothing unless a supported interpreter is used.
rpmrepository already exists in thehome:opentelemetry:stable:buildandhome:opentelemetry:stableOBS projects, with builds disabled in the build project.Until this PR is merged, the build project still holds the DEB-only specs, which fail under rpm, so a DEB-only upload would wait on failing RPM builds and not release.
rpmbuilds inhome:opentelemetry:stable:buildonce this PR is merged and itsobs.ymlrun has uploaded the unified specs (remove the project-level build disable onrpm), then release the first RPMs.copr-build.yml,.copr/Makefile, and the SRPM path).