packages: iptables/iptables.spec, iptables/ip6tables.service (NEW), iptable...
baggins
baggins at pld-linux.org
Wed Apr 18 11:33:48 CEST 2012
Author: baggins Date: Wed Apr 18 09:33:48 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- added systemd serices
---- Files affected:
packages/iptables:
iptables.spec (1.313 -> 1.314) , ip6tables.service (NONE -> 1.1) (NEW), iptables.service (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/iptables/iptables.spec
diff -u packages/iptables/iptables.spec:1.313 packages/iptables/iptables.spec:1.314
--- packages/iptables/iptables.spec:1.313 Wed Apr 18 11:28:50 2012
+++ packages/iptables/iptables.spec Wed Apr 18 11:33:43 2012
@@ -47,6 +47,8 @@
Source5: %{name6}.upstart
Source6: %{name}-config
Source7: %{name6}-config
+Source8: %{name}.service
+Source9: %{name6}.service
# --- GENERAL CHANGES (patches<10):
Patch0: %{name}-man.patch
# additional utils; off by default
@@ -76,6 +78,7 @@
BuildRequires: libnfnetlink-devel >= 1.0
BuildRequires: libtool
BuildRequires: pkgconfig >= 1:0.9.0
+BuildRequires: rpmbuild(macros) >= 1.647
%if %{with doc}
BuildRequires: sed >= 4.0
BuildRequires: sgml-tools
@@ -167,8 +170,10 @@
Summary(pl.UTF-8): Iptables init (w stylu RedHata)
Group: Networking/Admin
Requires(post,preun): /sbin/chkconfig
+Requires(post,preun,postun): systemd-units >= 38
Requires: %{name}
Requires: rc-scripts >= 0.4.3.0
+Requires: systemd-units >= 38
Obsoletes: firewall-init
Obsoletes: firewall-init-ipchains
Obsoletes: iptables24-init
@@ -225,7 +230,8 @@
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
- $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_mandir}/man3}
+ $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_mandir}/man3} \
+ $RPM_BUILD_ROOT%{systemdunitdir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
@@ -242,6 +248,9 @@
install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-config
install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/%{name6}-config
+install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+install -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdunitdir}/%{name6}.service
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -251,12 +260,20 @@
%post init
/sbin/chkconfig --add %{name}
/sbin/chkconfig --add %{name6}
+%systemd_post %{name}.service %{name6}.service
%preun init
if [ "$1" = "0" ]; then
/sbin/chkconfig --del %{name}
/sbin/chkconfig --del %{name6}
fi
+%systemd_preun %{name}.service %{name6}.service
+
+%postun init
+%systemd_reload
+
+%triggerpostun init -- %{name}-init < 1.4.13-2
+%systemd_trigger %{name}.service %{name6}.service
%files
%defattr(644,root,root,755)
@@ -438,6 +455,8 @@
%attr(754,root,root) /etc/rc.d/init.d/ip6tables
%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name6}.conf
+%{systemdunitdir}/%{name}.service
+%{systemdunitdir}/%{name6}.service
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -445,6 +464,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.314 2012/04/18 09:33:43 baggins
+- added systemd serices
+
Revision 1.313 2012/04/18 09:28:50 baggins
- add a bit of configurability to init scripts
================================================================
Index: packages/iptables/ip6tables.service
diff -u /dev/null packages/iptables/ip6tables.service:1.1
--- /dev/null Wed Apr 18 11:33:48 2012
+++ packages/iptables/ip6tables.service Wed Apr 18 11:33:43 2012
@@ -0,0 +1,15 @@
+[Unit]
+Description=IPv6 firewall with iptables
+After=syslog.target
+ConditionPathExists=/etc/sysconfig/ip6tables
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/etc/rc.d/init.d/ip6tables start
+ExecStop=/etc/rc.d/init.d/ip6tables stop
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=basic.target
================================================================
Index: packages/iptables/iptables.service
diff -u /dev/null packages/iptables/iptables.service:1.1
--- /dev/null Wed Apr 18 11:33:48 2012
+++ packages/iptables/iptables.service Wed Apr 18 11:33:43 2012
@@ -0,0 +1,15 @@
+[Unit]
+Description=IPv4 firewall with iptables
+After=syslog.target
+ConditionPathExists=/etc/sysconfig/iptables
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/etc/rc.d/init.d/iptables start
+ExecStop=/etc/rc.d/init.d/iptables stop
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=basic.target
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/iptables/iptables.spec?r1=1.313&r2=1.314
More information about the pld-cvs-commit
mailing list