Firewalld/RPM Packaging

Jump to: navigation, search
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 %firewalld_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}%{_prefix}/lib/firewalld/services/foo.xml
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services