Description of problem: during upgrade of postgresql-server package the /lib/systemd/system/postgresql.service file, containing some configured environmental variables for postgres, became overwritten instead creating a .rpmnew file. Version-Release number of selected component (if applicable): postgresql-server-9.1.0-1.fc16.i686 How reproducible: Steps to Reproduce: 1. change PGDATA in /lib/systemd/system/postgresql.service 2. upgrade postgresql-server package Actual results: /var/lib/pgsql/data as PGDATA in /lib/systemd/system/postgresql.service Expected results: having actual configured postgresql.service file and postgresql.service.rpmnew from upgraded package, like as another config files belonging to packages being upgraded. Additional info:
In my opinion, this is not a bug. If you want to customize the service file, you should do it in /etc/systemd/system and not it /lib/systemd/system. just copy the service file to the /etc location, and change it however you want. systemd will use the service file from the /etc location.
(In reply to comment #1) > If you want to customize the service file, you should do it in > /etc/systemd/system and not it /lib/systemd/system. > just copy the service file to the /etc location, and change it however you > want. systemd will use the service file from the /etc location. Yes, this is the right approach. More info about systemd: http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions http://0pointer.de/public/systemd-man/
hmm, thanks
(In reply to comment #1) > In my opinion, this is not a bug. > If you want to customize the service file, you should do it in > /etc/systemd/system and not it /lib/systemd/system. > just copy the service file to the /etc location, and change it however you > want. systemd will use the service file from the /etc location. Yes, that is the design the systemd folk have foisted on us. IMO it's not a good design, because it fails to consider the likelihood that the packager will need to change the service file from time to time. But it's not for the postgresql package to do things differently than the Fedora packaging guidelines say. You might care to open up a bug against systemd pointing out that they need a better design for customized service files.
i think that old /etc/sysconfig/* way was much better than current systemd method... before now we should not have been edit /etc/init.d/ scripts, when needed to change some config or environment variable, huh.