Bug 1319177

Summary: incorrect use of Requires(pre)?
Product: [Fedora] Fedora Reporter: Honza Silhan <jsilhan>
Component: skylable-sxAssignee: Török Edwin <edwin+bugs>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: edwin+bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-01 23:16:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Honza Silhan 2016-03-18 15:58:05 UTC
We've identified your package for having `Requires(pre)` RPM flag without `Requires` [1]. `Requires(pre)` rpm tag could be interpreted wrongly, so to prevent any harm to Fedora users I am notifying you about this fact.

Any package that is specified in `Requires(pre)` could be freely removed. Citing from RPM pages:
```
If there are no other dependencies on the package providing /usr/sbin/useradd, that package is permitted to be removed from the system after installation(!)
``` [2]

If you really rely on dependency just during the installation process and your package don't necessary require the dependency for the proper run of your application then ignore this bug report and close it as NOTABUG. Otherwise add to your spec file additional `Requires` for the dependency, please.


[1] paste.fedoraproject.org/341611/82208431
[2] http://www.rpm.org/wiki/PackagerDocs/MoreOnDependencies

Comment 1 Jan Kurik 2016-07-26 04:15:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Török Edwin 2016-11-01 23:16:01 UTC
The package mentioned in Requires(pre) is systemd, I don't think a Fedora system can function if systemd is removed, so I'd close this as not-a-bug.
*If* some day some alternate init system takes place of systemd (allowing systemd to be removed) then the package will need to be updated anyway.

I'm using scriptlets similar to the ones in the packaging guidelines to install/uninstall systemd unit files using the rpm macros:
https://fedoraproject.org/wiki/Packaging:Scriptlets?rd=Packaging:ScriptletSnippets#Systemd

I don't use the %{?systemd_requires} macro, but the Requires that I use on pre/post/preun should be equivalent:
https://pkgs.fedoraproject.org/cgit/rpms/skylable-sx.git/tree/skylable-sx.spec#n36
https://github.com/systemd/systemd/blob/master/src/core/macros.systemd.in#L35

If there is something I should change here, please reopen the bug.