[ZBX-10133] use "tmpfiles.d" feature in official zabbix packages for systems with systemd Created: 2015 Dec 04  Updated: 2017 May 30  Resolved: 2016 Jan 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: None
Fix Version/s: 2.2.12rc1, 2.4.8rc1, 3.0.0beta1

Type: Incident report Priority: Minor
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: packaging, systemd
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Not sure we really want to do that but it looks like a general practice on installations with systemd.
http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
We need to discus that.

For example packages some information I've collected form different distros:

Debian/testing (stretch) (zabbix-server-mysql and zabbix-java-gateway packages):

# cat /usr/lib/tmpfiles.d/zabbix-server.conf
d /var/run/zabbix 0755 zabbix zabbix

# cat /usr/lib/tmpfiles.d/zabbix-java-gateway.conf
d /var/run/zabbix 0755 zabbix zabbix

note: debian doesn't have parent-level "zabbix-server" package

Fedora 23 (zabbix-server package):

# cat /usr/lib/tmpfiles.d/zabbixsrv.conf
D /run/zabbixsrv 0755 zabbixsrv zabbixsrv -

OpenSuse (zabbix-server and zabbix-java-gateway packages):

# cat /usr/lib/tmpfiles.d/zabbix-server.conf
D /run/zabbixs 0770 root zabbixs -

# cat /usr/lib/tmpfiles.d/zabbix-java-gateway.conf
D /var/run/zabbix 0770 root zabbixs -


 Comments   
Comment by Oleksii Zagorskyi [ 2015 Dec 04 ]

Hello kodai, take a look please just to keep it in mind

Comment by Kodai Terashima [ 2015 Dec 07 ]

Our RHEL7 package has /usr/lib/tmpfiles.d/zabbix.conf that is inclued in "zabbix" rpm file, but currently debian/ubuntu package don't have it.

Comment by Oleksii Zagorskyi [ 2015 Dec 07 ]

Oh, thanks.
But I think more correct packages for this file would be zabbix-server* zabbix-agent etc.

Note how in Debian packages they use "d - Create a directory if it does not exist yet." instead of "D - Create or empty a directory."

Comment by Kodai Terashima [ 2016 Jan 28 ]

I added tmpfiles conf file for 2.2.12rc1, 2.4.8rc1, 3.0.0beta1. We're stil using init script, need to think to use systemd service file.

Generated at Mon Jun 02 17:07:15 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.