Overview
Request 584508 superseded
I have added hostinfo Uninstall to preun, because the hostinfo.service is not always running. It is run by the hostinfo.timer so trap SIGTERM fails. I use /run/issue.d so /etc/issue.d can be used as an override. I do not use /usr/lib/issue.d because it will interfere with issue-generator if hostinfo is uninstalled.
- Created by jrecord
- In state superseded
- Supersedes 582052
- Superseded by 584542
- Open review for opensuse-review-team
- Open review for msmeissn
- Open review for openSUSE:Factory:Staging:adi:46
+%post +%service_add_post hostinfo.service hostinfo.timer +if [ -x /usr/bin/systemctl ]; then + /usr/bin/systemctl start hostinfo.timer +fi
This is still invalid practice. Starting a service like this is of very limited use (not preserved across boots) and enabling services is responsibility of preset packages, and not of the packages providing the service.
For reference, the relevant link to the packaging guieline:
https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Enabling_systemd_unit_files
Request History
jrecord created request
I have added hostinfo Uninstall to preun, because the hostinfo.service is not always running. It is run by the hostinfo.timer so trap SIGTERM fails. I use /run/issue.d so /etc/issue.d can be used as an override. I do not use /usr/lib/issue.d because it will interfere with issue-generator if hostinfo is uninstalled.
licensedigger accepted review
ok
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto added repo-checker as a reviewer
Please review build success
factory-auto accepted review
Check script succeeded
dimstar added msmeissn as a reviewer
Marcus, please validate, from the PoV sec team.
This package installs a systemd preset file into the system context.
According to my info, this is not allowed; a service we want to have enable upon install should be listed either in systemd-presets-common-SUSE or distro-specific branding variants.
staging-bot added as a reviewer
Being evaluated by staging project "openSUSE:Factory:Staging:adi:46"
staging-bot accepted review
Picked openSUSE:Factory:Staging:adi:46
repo-checker accepted review
cycle and install check passed
superseded by 584542
+gzip -9f man/*8
There is an rpm build root policy in place compressing the man pages into a distro standard format (for now gz, but that could change)
+install -m 644 conf/10-hostinfo.preset %{buildroot}%{_presetdir}
I honestly doubt that this is the correct way to go - I said before that enabling the service is not the package's responsibility
Hiding it away in a file like this won't make me not see it.
I'm not trying to hide it so you can't see it. It has been there all along. There are MANY requirements to get the package into Factory. I'm fine with that and am trying to get them all flushed out.
Good; then I'm sorry I did not mention this one earlier;
I'm actually a bit surprised that this made it into SLE - the requirements are actually aligned when it comes to this kind of things
One more thing:
+Source: %{name}-%{version}.tar.gz
It's not disallowed, but discouraged. Much better would be to have a full URL where to download the tarball, so that things are verifiable/reprodicible.
If it is a git snapshot, it might be an option to look into source services, namley tar_scm (or obs_scm); If you're interested in this, the package openSUSE:Factory/appstream-glib could serve as an example
I will work on this, but I'm worried the package will not make it into SLE15. So I want the package submitted first, and then work on external sources if that's okay. I reviewed the package, but it is not completely clear what I need to do to my package and my github sources.
Sure - as said: 'not forbidden, but discouraged' :)
rpmlint reports:
hostinfo.noarch: W: suse-missing-rclink hostinfo
The fix would be:
I am unclear about: 1. I am also uncertain how to start the hostinfo.timer when the rpm is installed. The presets will enable the server and it works after reboot. However, the customer will have to install the rpm and run systemctl start hostinfo.timer to get things going. Can this be done in another way? 2. I have submit request 584519 for the presets now. It enables the hostinfo.timer and hostinfo.service. 3. I also still need a %preun to remove the files from /run/issue.d per description above.