centos8 rpm build with odd runtime deps
Bug #1886107 reported by
Ryan Harper
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Paride Legovini |
Bug Description
% ./tools/
...
% rpm -U cloud-init-
Command: rpm -U /tmp/cloud-
Exit code: 1
Reason: -
Stdout:
Stderr: error: Failed dependencies:
python3-devel has to be a build-dep;
sudo is require though.
To post a comment you must log in.
Hi Ryan,
This happens because `tools/ read-dependenci es --distro` joins the 'requires' and 'build-requires' defined in pkg-deps.json, the file that specifies the distro-specific deps. See this line specifically:
https:/ /github. com/canonical/ cloud-init/ blob/master/ tools/read- dependencies# L227
This doesn't happen when building the .deb package because we let debhelper calculate the dependencies, and packages/bddeb doesn't need to touch the Depends: line.
In order to avoid the odd dependencies I don't see other way than making read-dependencies distinguish between build-deps and runtime-deps.
RFC: We could add --runtime-only-deps to read-dependencies. When this is specified the build-requires from pkg-deps.json won't be appended to the list of dependencies. Then packages/brpm will have to be taught about this, looks easy at first glance.
WDYT?