Repository navigation
rpm: Install BuildRequires from the spec - #397
Open
daandemeyer wants to merge 8 commits into
Open
daandemeyer wants to merge 8 commits into
daandemeyer wants to merge 8 commits into
Conversation
build.py stages the spec and builds the rpmbuild command line inline. The BuildRequires query needs to do the same, so let's move both into rpmbuild.py. Pinned packaging now comes in as a directory in sources, and a strict_subpackages flag replaces the packaging field. Signed-off-by: Daan De Meyer <daan@amutable.com>
We write the frozen copy of an in-place spec over the spec in the checkout, so staging needs a writable checkout. rpm resolves %include from its working directory, not from the spec, so let's write the copy to SPECS like any other spec. Signed-off-by: Daan De Meyer <daan@amutable.com>
daandemeyer
force-pushed
the
in-place-buildrequires
branch
from
November 10, 2026 12:25
728907f to
2d19e78
Compare
Nothing reads the BuildRequires of the spec that a build uses. The buildroot only gets what the BUCK file lists. Let's add a driver that stages the spec like build.py and runs rpmbuild -br in the buildroot with the same arguments as the build. That also picks up what %generate_buildrequires reports. Signed-off-by: Daan De Meyer <daan@amutable.com>
rpm.branch() takes buildroot_packages from the BuildRequires of all architectures, but build_requires only has those of the current one. A package can then end up with buildroot_packages and nothing to install, and the solve fails with "a solve needs at least one install spec". Let's skip the solve when there's nothing to install. Signed-off-by: Daan De Meyer <daan@amutable.com>
undelivered() checks that each install spec ended up in the transaction. For a rich dependency like (A if B), resolve_pkg_spec() assumes B holds, so the check fails when B isn't installed. Let's skip rich dependencies in that check. Signed-off-by: Daan De Meyer <daan@amutable.com>
A build with in_place_spec or in_place_packaging only gets the BuildRequires that the BUCK file lists. systemd lists 66 of them by hand, and the list goes stale whenever the pin moves. Let's query the spec and install what it needs as an extra layer on top of the declared ones. Imported packages keep their recorded BuildRequires. rpm.branch() derives buildroot_packages from them, so anything new would come from the distribution instead of the branch. Signed-off-by: Daan De Meyer <daan@amutable.com>
The generated BUCK passes each property of _properties.json on its own line, so a new property does nothing until the BUCK is regenerated. Let's pass the whole dict instead. Signed-off-by: Daan De Meyer <daan@amutable.com>
A hand-written rpm.package only installs the build_requires from its BUCK file, which goes out of sync with the spec. Let's query the spec for every build of a package that wasn't imported. Signed-off-by: Daan De Meyer <daan@amutable.com>
daandemeyer
force-pushed
the
in-place-buildrequires
branch
from
November 10, 2026 12:39
2d19e78 to
70f2928
Compare
Member
|
For the first round, bot-to-bot review: pr-in-place-buildrequires-review.md Sorry, in a long meeting, not much human review on that report -- can do in ~ 1 h. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hand-written rpm.package, or an in-place build, only gets the BuildRequires that its BUCK file lists.
systemd lists 66 of them by hand, and the list goes stale whenever the pin moves.
Let's run rpmspec on the spec in the buildroot with the same options as rpmbuild, and install what it
reports as an extra layer. Imported packages keep using their recorded BuildRequires, since rpm.branch()
derives their buildroot_packages from them.