Bug 1972026 - does not depend on `Requires(pre): /usr/bin/systemctl`
Summary: does not depend on `Requires(pre): /usr/bin/systemctl`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang-github-prometheus
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-15 05:40 UTC by Коренберг Марк
Modified: 2022-04-04 06:08 UTC (History)
5 users (show)

Fixed In Version: golang-github-prometheus-2.24.1-6.fc35 golang-github-prometheus-2.24.1-6.fc33 golang-github-prometheus-2.24.1-6.fc34 golang-github-prometheus-2.24.1-5.el8 golang-github-prometheus-2.24.1-5.el7
Clone Of:
Environment:
Last Closed: 2021-06-24 16:45:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Коренберг Марк 2021-06-15 05:40:17 UTC
The problem:

.spec-file uses:

 
%pre
%sysusers_create_package prometheus %{SOURCE4}

so, it implicitly depends on systemd-sysusers

But it does not contain `Requires(pre) /usr/bin/systemd-sysusers`. Note, there is also systemd-standalone-sysusers, which also provides this command.

As a result, users sometimes not created from the packages that use the macro. It affects read-only-root systems.

Moreover, I think go2rpm tool must add the requirement if the section of .spec-file was generated by this tool, so possibly bug should be reported against another package.

----
Please note, the problem is triggered at least in Fedora-33-updates and not in Fedora-release-33.

Comment 1 Robert-André Mauchin 🐧 2021-06-15 15:56:04 UTC
It's assumed that Systemd is installed in the docs, is there is systems without systemd?

Comment 2 Fedora Update System 2021-06-15 16:31:45 UTC
FEDORA-2021-a44fcad061 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a44fcad061

Comment 3 Fedora Update System 2021-06-15 16:33:21 UTC
FEDORA-2021-a44fcad061 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Коренберг Марк 2021-06-15 16:34:25 UTC
Yes. dnf --installroot xxxx install a_package.

Second case -- initial installation of custom fedora-based distributive (like ours). Even specifying systemd in the list of packages does not guarantee systemd be installed before our package.

In any case, there are containers and so on. also, systemd is not required actually because users can be created using systemd-standalone-sysusers.

Comment 5 Robert-André Mauchin 🐧 2021-06-15 16:39:03 UTC
(In reply to Коренберг Марк from comment #4)
> Yes. dnf --installroot xxxx install a_package.
> 
> Second case -- initial installation of custom fedora-based distributive
> (like ours). Even specifying systemd in the list of packages does not
> guarantee systemd be installed before our package.
> 
> In any case, there are containers and so on. also, systemd is not required
> actually because users can be created using systemd-standalone-sysusers.

I'm not well versed with these use cqses, sorry.

I'm building an updated version with:

Requires(pre): /usr/bin/systemd-sysusers

as you recommended.

I'll be pushing it on all stable releases.

Comment 6 Коренберг Марк 2021-06-15 16:41:09 UTC
Thank you.

But I think problem not only in this packages, and is wider. I think problem in go2rpm. I do not know if %pre section was created by hands or automatically.

Comment 7 Robert-André Mauchin 🐧 2021-06-15 16:53:28 UTC
(In reply to Коренберг Марк from comment #6)
> Thank you.
> 
> But I think problem not only in this packages, and is wider. I think problem
> in go2rpm. I do not know if %pre section was created by hands or
> automatically.

No it was added manually by me, go2rpm also written by me does not have such advanced capabilities, it just detect the dependencies and output a jinja template.

However I might file a bug against the Packaging Guidelines to add that requirements.

Comment 8 Fedora Update System 2021-06-15 16:58:28 UTC
FEDORA-2021-87018405db has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-87018405db

Comment 9 Fedora Update System 2021-06-15 16:58:45 UTC
FEDORA-2021-b40b515926 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b40b515926

Comment 10 Fedora Update System 2021-06-15 16:59:07 UTC
FEDORA-EPEL-2021-6b829490aa has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-6b829490aa

Comment 11 Fedora Update System 2021-06-15 16:59:18 UTC
FEDORA-EPEL-2021-a35ef212a9 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-a35ef212a9

Comment 12 Коренберг Марк 2021-06-15 18:33:53 UTC
Thanks. You are super-ultra fast! Regarding packaging guidlines, will you add ?

Comment 13 Robert-André Mauchin 🐧 2021-06-15 19:18:36 UTC
(In reply to Коренберг Марк from comment #12)
> Thanks. You are super-ultra fast! Regarding packaging guidlines, will you
> add ?

Actually I used a slightly different macro than the one in the guidelines. The one in the guidelines does not need the extra Requires, it uses a script to convert sysusers files into regular adduser commanda, so there is nothing to fix.

Comment 14 Fedora Update System 2021-06-16 01:44:41 UTC
FEDORA-2021-b40b515926 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b40b515926`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b40b515926

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2021-06-16 01:46:51 UTC
FEDORA-EPEL-2021-a35ef212a9 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-a35ef212a9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2021-06-16 02:02:54 UTC
FEDORA-2021-87018405db has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-87018405db`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-87018405db

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2021-06-16 02:04:20 UTC
FEDORA-EPEL-2021-6b829490aa has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-6b829490aa

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2021-06-24 16:45:46 UTC
FEDORA-2021-b40b515926 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2021-06-24 16:51:58 UTC
FEDORA-2021-87018405db has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Update System 2021-07-01 01:44:06 UTC
FEDORA-EPEL-2021-a35ef212a9 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2021-07-01 01:54:09 UTC
FEDORA-EPEL-2021-6b829490aa has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 eike.wuelfers 2021-10-07 15:00:49 UTC
Hi all,

I hope this is the right place to report this but I think this broke the package in CentOS 7.

/usr/bin/systemd-sysusers is not available on CentOS 7 from any package that I could find (neither base nor EPEL 7 where this package comes from).

Do you know anything we can do on CentOS 7 for now?

Thanks!
-emw

Comment 23 Rob Quagliozzi 2022-03-09 14:13:37 UTC
Bump - this has broken the package for all RHEL based systems, where systemd-sysusers was not included by design.


Note You need to log in before you can comment on or make changes to this bug.