Home Wiki > Firewalld/RPM Packaging
Sign up | Login

Firewalld/RPM Packaging

tagline: From openSUSE

The firewalld packaging guidelines will help you ship custom firewalld service files with your RPM packages

Firewalld packaging guidelines

RPM packages can provide their own service files by placing them in /usr/lib/firewalld/services and then use the %firewall_reload macro in the %post scriptlet section to ensure that firewalld can use the newly installed service as demonstrated below:

BuildRequires: firewall-macros
install -D -m 644 foo.xml %{buildroot}%{_libexecdir}/firewalld/services/foo.xml
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services