Mailinglist Archive: opensuse-packaging (74 mails)

< Previous Next >
Re: [opensuse-packaging] Packaging naemon: Handling systemd-related stuff in %post

On 05/11/2017 05:52 AM, Johannes Kastl wrote:
Hi guys,

I stumbled upon the naemon package in server:monitoring, and gave
building naemon from the upstream spec a try:


I also tried to update the package in server:monitoring:

I got both of them to build, but only by commenting out lots of stuff,
like this:
%post core
case "$*" in
# Upgrading so try and restart if already running
# For systemctl systems we need to reload the configs
# becaues it'll complain if we just installed a new
# init script
#%if 0%{?use_systemd}
# systemctl daemon-reload
# systemctl condrestart %{name}.service
# /etc/init.d/%{name} condrestart &>/dev/null || true

I think (I am not an expert) upstream is trying to handle updates
without having to restart the service, but this does not allow builds
on OBS.

My Question is if there is a 'openSUSE'-way of doing things like that?
Is there any 'best practice' to do that? Any do's and dont's?

(I have not thoroughly looked into the differences between the
upstream spec and Lars lrupp's spec file in server:monitoring due to
there being so many differences, maybe Lars already added some of this)

Any hints are highly appreciated.

Johannes covers
most of the basics for packaging systemd things on openSUSE, the macro's
should take care of everything for you. Once you are using them then
"export DISABLE_RESTART_ON_UPDATE=yes" in the %postun section will
prevent that.


Simon Lees (Simotek)

Emergency Update Team
SUSE Linux Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B

< Previous Next >
Follow Ups