convert to systemd
This commit is contained in:
parent
066a5d2fef
commit
56e929d1f4
13
firewalld.service
Normal file
13
firewalld.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Firewall dynamic change handling daemon
|
||||||
|
After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
EnvironmentFile=-/etc/sysconfig/firewalld
|
||||||
|
ExecStart=/usr/sbin/firewalld $FIREWALLD_ARGS
|
||||||
|
ExecReload=/usr/bin/firewall-cmd --reload
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=dbus-org.fedoraproject.FirewallD.service
|
@ -1,24 +1,26 @@
|
|||||||
Summary: A firewall daemon with D-BUS interface providing a dynamic firewall
|
Summary: A firewall daemon with D-BUS interface providing a dynamic firewall
|
||||||
Name: firewalld
|
Name: firewalld
|
||||||
Version: 0.1.3
|
Version: 0.1.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
URL: http://fedorahosted.org/firewalld
|
URL: http://fedorahosted.org/firewalld
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
ExclusiveOS: Linux
|
ExclusiveOS: Linux
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2
|
Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2
|
||||||
|
Source1: firewalld.service
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
|
BuildRequires: systemd-units
|
||||||
|
Requires(post): systemd-sysv
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
Requires: system-config-firewall-base >= 1.2.28
|
Requires: system-config-firewall-base >= 1.2.28
|
||||||
Requires: dbus-python
|
Requires: dbus-python
|
||||||
Requires: python-slip-dbus >= 0.2.7
|
Requires: python-slip-dbus >= 0.2.7
|
||||||
Requires: iptables, ebtables
|
Requires: iptables, ebtables
|
||||||
Requires(post): chkconfig
|
|
||||||
Requires(preun): chkconfig
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
firewalld is a firewall service daemon that provides a dynamic customizable
|
firewalld is a firewall service daemon that provides a dynamic customizable
|
||||||
@ -58,10 +60,13 @@ the firewall settings.
|
|||||||
%configure
|
%configure
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
# systemd
|
||||||
|
rm -rf %{buildroot}%{_initddir}
|
||||||
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
|
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/
|
||||||
|
|
||||||
desktop-file-install --delete-original \
|
desktop-file-install --delete-original \
|
||||||
--dir %{buildroot}%{_datadir}/applications \
|
--dir %{buildroot}%{_datadir}/applications \
|
||||||
%{buildroot}%{_datadir}/applications/firewall-applet.desktop
|
%{buildroot}%{_datadir}/applications/firewall-applet.desktop
|
||||||
@ -71,11 +76,11 @@ desktop-file-install --delete-original \
|
|||||||
|
|
||||||
%find_lang %{name} --all-name
|
%find_lang %{name} --all-name
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/chkconfig --add firewalld
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
touch --no-create %{_datadir}/icons/hicolor
|
touch --no-create %{_datadir}/icons/hicolor
|
||||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||||
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
||||||
@ -83,20 +88,34 @@ fi
|
|||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
%{_initrddir}/firewalld stop >/dev/null 2>&1
|
# Package removal, not upgrade
|
||||||
/sbin/chkconfig --del firewalld
|
/bin/systemctl --no-reload disable firewalld.service > /dev/null 2>&1 || :
|
||||||
|
/bin/systemctl stop firewalld.service > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
exit 0
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
/bin/systemctl try-restart firewalld.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
touch --no-create %{_datadir}/icons/hicolor
|
touch --no-create %{_datadir}/icons/hicolor
|
||||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||||
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%triggerun -- httpd < 1.0-2
|
||||||
|
# Save the current service runlevel info
|
||||||
|
# User must manually run systemd-sysv-convert --apply firewalld
|
||||||
|
# to migrate them to systemd targets
|
||||||
|
/usr/bin/systemd-sysv-convert --save firewalld >/dev/null 2>&1 ||:
|
||||||
|
|
||||||
|
# Run these because the SysV package being removed won't do them
|
||||||
|
/sbin/chkconfig --del firewalld >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl try-restart firewalld.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%{_sbindir}/firewalld
|
%{_sbindir}/firewalld
|
||||||
%{_bindir}/firewall-cmd
|
%{_bindir}/firewall-cmd
|
||||||
@ -104,7 +123,7 @@ fi
|
|||||||
%attr(0755,root,root) %dir %{_sysconfdir}/firewalld
|
%attr(0755,root,root) %dir %{_sysconfdir}/firewalld
|
||||||
%config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf
|
%config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/firewalld
|
%config(noreplace) %{_sysconfdir}/sysconfig/firewalld
|
||||||
%attr(0755,root,root) %{_initrddir}/firewalld
|
%{_unitdir}/firewalld.service
|
||||||
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/FirewallD.conf
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/FirewallD.conf
|
||||||
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD.policy
|
%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD.policy
|
||||||
%attr(0755,root,root) %dir %{_datadir}/firewalld/
|
%attr(0755,root,root) %dir %{_datadir}/firewalld/
|
||||||
@ -127,6 +146,9 @@ fi
|
|||||||
#%{_datadir}/icons/hicolor/*/apps/firewall-config*.*
|
#%{_datadir}/icons/hicolor/*/apps/firewall-config*.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 9 2011 Tom Callaway <spot@fedoraproject.org> 0.1.3-3
|
||||||
|
- convert to systemd
|
||||||
|
|
||||||
* Mon Feb 14 2011 Thomas Woerner <twoerner@redhat.com> 0.1.3-1
|
* Mon Feb 14 2011 Thomas Woerner <twoerner@redhat.com> 0.1.3-1
|
||||||
- new version 0.1.3
|
- new version 0.1.3
|
||||||
- restore all firewall features for reload: panic and virt rules and chains
|
- restore all firewall features for reload: panic and virt rules and chains
|
||||||
|
Loading…
Reference in New Issue
Block a user