On Thu, Jan 17, 2019 at 05:02:59PM +0100, Germano Massullo wrote:
> Hello, I am testing various changes in boinc-client systemd unit file.
> At every RPM package update, it happens really often that on a machine
> that installs the new RPM version, does not get the new systemd unit
> file version, so it is not updated. To successfully update the file, I
> have to remove the old one from
> /etc/systemd/system/
> and reinstall the RPM file.

  First, packages should install unit files into /usr/lib/systed/systemd/.
Units in /etc are for system administrators and shouldn't be touched
by packages.

  Second, if the unit file is marked in .spec as %config(noreplace),
then it won't be touched/replaced on package upgrade.

  Third, you need to do `systemctl daemon-reload` when changing unit
files.

> How can this happen? Perhaps manual edits (on localhost) can prevent
> the file to be updated?

  Manual edits as in `systemctl edit --full`?  Plain `systemctl edit`
only creates addon snippets and does not copy the unit.
  Nevertheless, if admin placed unit in /etc, this unit has a priority
over the one in /lib installed by package.  This is by design.

-- 
Tomasz Torcz                                                       72->|   80->|
xmpp: zdzich...@chrome.pl                                          72->|   80->|
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to