Re: systemd tmpfiles: ensuring directories exist after package installation

2013-10-24 Thread Sandro Mani


On 23.10.2013 23:25, Tomasz Torcz wrote:

On Wed, Oct 23, 2013 at 07:22:16PM +0200, Sandro Mani wrote:

Hi,

In cases where a package ships a service.tmpfiles file which
manages i.e. the /var/run/service directory, what is the best way
|to make sure that the directory exists after installing the
package, without rebooting the system?
- The directory should be installed by the package
- %postinst||| should include systemd-tmpfiles --create
|%{_tmpfilesdir}/%{name}.conf
- ... ?

   The latte using handy %tmpfiles_create macro.
See http://cgit.freedesktop.org/systemd/systemd/tree/src/core/macros.systemd.in


Aha, handy indeed. Thanks.

Sandro
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

systemd tmpfiles: ensuring directories exist after package installation

2013-10-23 Thread Sandro Mani

Hi,

In cases where a package ships a service.tmpfiles file which manages 
i.e. the /var/run/service directory, what is the best way |to make 
sure that the directory exists after installing the package, without 
rebooting the system?

- The directory should be installed by the package
- %postinst||| should include systemd-tmpfiles --create 
|%{_tmpfilesdir}/%{name}.conf

- ... ?

Thanks,
Sandro
|

|

|


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: systemd tmpfiles: ensuring directories exist after package installation

2013-10-23 Thread Reindl Harald


Am 23.10.2013 19:22, schrieb Sandro Mani:
 In cases where a package ships a service.tmpfiles file which manages i.e. 
 the /var/run/service directory, what
 is the best way |to make sure that the directory exists after installing 
 the package, without rebooting the system?
 - The directory should be installed by the package
 - %postinst||| should include systemd-tmpfiles --create 
 |%{_tmpfilesdir}/%{name}.conf

dovecot is using this in %post on my systems

%post
%{_bindir}/systemctl --system daemon-reload 2 /dev/null  /dev/null
install -d -m 0755 -g %{name} -d /run/%{name}
install -d -m 0755 -d /run/%{name}/empty
install -d -m 0750 -g dovenull /run/%{name}/login
%{_sbindir}/ldconfig
exit 0



signature.asc
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: systemd tmpfiles: ensuring directories exist after package installation

2013-10-23 Thread Ville Skyttä
On Wed, Oct 23, 2013 at 8:22 PM, Sandro Mani manisan...@gmail.com wrote:
 In cases where a package ships a service.tmpfiles file which manages i.e.
 the /var/run/service directory, what is the best way to make sure that the
 directory exists after installing the package, without rebooting the system?

http://fedoraproject.org/wiki/Packaging:Guidelines#Tmpfiles.d
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: systemd tmpfiles: ensuring directories exist after package installation

2013-10-23 Thread Sandro Mani


On 23.10.2013 19:40, Ville Skyttä wrote:

On Wed, Oct 23, 2013 at 8:22 PM, Sandro Mani manisan...@gmail.com wrote:

In cases where a package ships a service.tmpfiles file which manages i.e.
the /var/run/service directory, what is the best way to make sure that the
directory exists after installing the package, without rebooting the system?

http://fedoraproject.org/wiki/Packaging:Guidelines#Tmpfiles.d

Aha! Thanks.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: systemd tmpfiles: ensuring directories exist after package installation

2013-10-23 Thread Tomasz Torcz
On Wed, Oct 23, 2013 at 07:22:16PM +0200, Sandro Mani wrote:
 Hi,
 
 In cases where a package ships a service.tmpfiles file which
 manages i.e. the /var/run/service directory, what is the best way
 |to make sure that the directory exists after installing the
 package, without rebooting the system?
 - The directory should be installed by the package
 - %postinst||| should include systemd-tmpfiles --create
 |%{_tmpfilesdir}/%{name}.conf
 - ... ?

  The latte using handy %tmpfiles_create macro.
See http://cgit.freedesktop.org/systemd/systemd/tree/src/core/macros.systemd.in

-- 
Tomasz Torcz God, root, what's the difference?
xmpp: zdzich...@chrome.pl God is more forgiving.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct