Bug 1983450
Summary: | BuildRequires += sfdisk (util-linux) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jason Vas Dias <jason.vas.dias> | ||||
Component: | systemd | Assignee: | systemd-maint | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 34 | CC: | fedoraproject, filbranden, flepied, kasong, lnykryn, msekleta, ssahani, s, systemd-maint, yuwatana, zbyszek | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-07-20 07:55:02 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jason Vas Dias
2021-07-18 16:42:45 UTC
Created attachment 1803045 [details]
Patch to systemd.spec that fixes the problem by adding /usr/sbin to $PATH
Patch to systemd.spec that fixes the problem by adding /usr/sbin to $PATH
before tests are run .
The attached systemd.spec patch (also with spec file patch for Bug 1983432) fixes the problem, since it adds /usr/sbin to $PATH before tests are run. User paths as configured in Fedora already contain /usr/sbin. If that is removed, various things will not work properly. Just don't do that. BR:util-linux should be added, indeed. RE: > User paths as configured in Fedora already contain /usr/sbin. If that is removed, various > things will not work properly. Just don't do that. But 'rpmbuild' does actually use the user's $PATH, which could be anything . If your .spec file script depends for its success on some command being found in $PATH , it should explicitly ensure that $PATH contains the directory - at least a stanza like this should be in the spec file for the test run: if [[ ! "$PATH" =~ (^|:)/usr/sbin(:|$) ]]; then export PATH="${PATH}:/usr/sbin"; fi And actually, if you look at the bash defaults, the default path for the root usr is: /bin:/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin and for the non-root user is ${HOME}/bin:/usr/local/bin:/bin:/usr/bin I run with my non-root PATH set in my .bashrc to be /usr/bin:/usr/local/bin:${HOME}/bin and with my root path being: /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin (since /bin -> /usr/bin and /sbin -> /usr/sbin ). The default path is configurable. Spec file scripts cannot depend on rpm / rpmbuild having set some default path, containing /usr/sbin - that does not happen. And also, the whole purpose putting programs into some */sbin directory rather than */bin is that only the super-user is meant to be able to read or run files in the */sbin directory ; otherwise, why not just put such programs in */bin ? https://src.fedoraproject.org/rpms/systemd/c/a6bdda479df8a3a4103648ab2fd2a94f032cdd62?branch=rawhide adds sfdisk to BR. > And also, the whole purpose putting programs into some */sbin directory rather than */bin is that only the super-user is meant to be able to read or run files in the */sbin directory ; otherwise, why not just put such programs in */bin ? The split exists mostly for historical reasons. It is not possible to split programs into those only invoked by an administrator and the rest in any meaningful way. We would get rid of the split, but currently this is not possible because of consolehelper and the handful of packages which use it. *** Bug 1983449 has been marked as a duplicate of this bug. *** |