[firehol] Update to 2.0.0

Christopher Meng cicku at fedoraproject.org
Mon Aug 11 08:44:01 UTC 2014


commit 51097a8d508ec0b2eecc28bca1d49f8182283db2
Author: Christopher Meng <i at cicku.me>
Date:   Mon Aug 11 16:43:25 2014 +0800

    Update to 2.0.0

 .gitignore                      |    1 +
 firehol-1.273-noautostart.patch |   12 ----
 firehol.spec                    |  138 +++++++++++++++++++--------------------
 sources                         |    2 +-
 4 files changed, 69 insertions(+), 84 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f9a0b6b..3283f6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /firehol-1.296.tar.gz
 /firehol-1.297.tar.gz
+/firehol-2.0.0-rc.1.tar.xz
diff --git a/firehol.spec b/firehol.spec
index 8df0e0f..b660bb3 100644
--- a/firehol.spec
+++ b/firehol.spec
@@ -1,43 +1,36 @@
-Summary:	A powerful yet easy to use iptables frontend
-Name:		firehol
-Version:	1.297
-Release:	2%{?dist}
-License:	GPLv2+
-Group:		Applications/Internet
-Source0:	http://firehol.org/download/latest/%{name}-%{version}.tar.gz
-# Don't start the firewall automatically
-Patch0:		firehol-1.273-noautostart.patch
-
-URL:		http://firehol.sourceforge.net
-BuildArch:	noarch
-BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
-Requires:	bash >= 2.04
-Requires:	fileutils >= 4.0.36
-Requires:	gawk >= 3.0
-Requires:	grep >= 2.4.2
-Requires:	iproute >= 2.2.4
-Requires:	iptables >= 1.2.4
-Requires:	kernel >= 2.4
-Requires:	less
-Requires:	net-tools >= 1.57
-Requires:	sed >= 3.02
-Requires:	sh-utils >= 2.0
-Requires:	textutils >= 2.0.11
-Requires:	util-linux >= 2.11
-
+Name:           firehol
+Version:        2.0.0
+Release:        0.1.rc1%{?dist}
+Summary:        Simple and powerful firewall and traffic shaping languages
+License:        GPLv2+
+URL:            http://firehol.org
+Source0:        http://firehol.org/download/latest/firehol-%{version}-rc.1.tar.xz
+Source1:        firehol.service
+Source2:        fireqos.service
+BuildArch:      noarch
+BuildRequires:  hostname
+BuildRequires:  procps-ng
+BuildRequires:  systemd
+Requires:       coreutils
+Requires:       gawk
+Requires:       grep
+Requires:       gzip
+Requires:       hostname
+Requires:       iproute
+Requires:       iptables
+Requires:       less
+Requires:       procps-ng
+Requires:       sed
+Requires:       util-linux
+Requires(post):  systemd
+Requires(preun):  systemd
+Requires(postun):  systemd
 %if 0%{?rhel} > 0 && 0%{?rhel} < 7
-Requires:	module-init-tools
+Requires:       module-init-tools
 %else
-Requires:	kmod
+Requires:       kmod
 %endif
 
-Requires(post):		chkconfig
-Requires(preun):	chkconfig
-Requires(preun):	initscripts
-Requires(postun):	initscripts
-
-
 %description
 FireHOL is a generic firewall generator, meaning that you can design any kind
 of local or routing stateful packet filtering firewalls with ease. Install
@@ -53,63 +46,66 @@ needs. The default configuration file will allow only client traffic
 on all interfaces.
 
 %prep
-%setup -q
-%patch0 -p1 -b .noautostart
+%setup -qn firehol-2.0.0-rc.1
 
 %build
+%configure
+make %{?_smp_flags}
 
 %install
-rm -rf %{buildroot}
-install -D -p -m 755 firehol.sh %{buildroot}%{_initrddir}/firehol
-install -D -p -m 640 examples/client-all.conf %{buildroot}/etc/firehol/firehol.conf
+%make_install
 
-# Install man files
-mkdir -p %{buildroot}%{_mandir}/man{1,5}
-install -p -m 644 man/*.1 %{buildroot}/%{_mandir}/man1
-install -p -m 644 man/*.5 %{buildroot}/%{_mandir}/man5
+# Hack for documentation without crufts.
+rm -frv %{buildroot}%{_docdir}
+find examples/ -name "Makefile*" -delete -print
 
-# Executables
-mkdir -p %{buildroot}%{_libexecdir}/firehol
-install -p -m 755 *.sh %{buildroot}%{_libexecdir}/firehol
+# Install systemd units.
+mkdir -p %{buildroot}%{_unitdir}
+install -pm644 %{S:1} %{S:2} %{buildroot}%{_unitdir}
 
-# Install runtime directories
+# Install runtime directories.
 mkdir -p %{buildroot}%{_sysconfdir}/firehol/services
 mkdir -p %{buildroot}%{_localstatedir}/spool/firehol
 
+# Ghost configurations.
+touch %{buildroot}%{_sysconfdir}/firehol/firehol.conf \
+      %{buildroot}%{_sysconfdir}/firehol/fireqos.conf
 
-%post 
-/sbin/chkconfig --add firehol
+%post
+%systemd_post firehol.service
+%systemd_post fireqos.service
 
 %preun
-if [ $1 = 0 ] ; then
-	/sbin/service firehol stop >/dev/null 2>&1
-	/sbin/chkconfig --del firehol
-fi
+%systemd_preun firehol.service
+%systemd_preun fireqos.service
 
 %postun
-if [ "$1" -ge "1" ] ; then
-	/sbin/service firehol condrestart >/dev/null 2>&1 || :
-fi
-
-
-%clean
-rm -rf %{buildroot}
-
+%systemd_postun_with_restart firehol.service
+%systemd_postun_with_restart fireqos.service
 
 %files
-%defattr(-,root,root,-)
-%doc README TODO COPYING ChangeLog WhatIsNew examples doc
+%doc AUTHORS COPYING NEWS README THANKS examples
+%doc doc/firehol/firehol-manual.{pdf,html}
+%doc doc/fireqos/fireqos-manual.{pdf,html}
 %dir %{_sysconfdir}/firehol
 %config(noreplace) %{_sysconfdir}/firehol/firehol.conf
-%{_initrddir}/firehol
-%{_libexecdir}/firehol
-%{_mandir}/man1/*.1.gz
-%{_mandir}/man5/*.5.gz
-%{_sysconfdir}/firehol/services
+%config(noreplace) %{_sysconfdir}/firehol/fireqos.conf
+%{_sysconfdir}/firehol/firehol.conf.example
+%{_sysconfdir}/firehol/fireqos.conf.example
+%{_sysconfdir}/firehol/services/bittorrent.conf.example
+%{_unitdir}/firehol.service
+%{_unitdir}/fireqos.service
+%{_sbindir}/firehol
+%{_sbindir}/fireqos
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+%dir %{_sysconfdir}/firehol/services/
 %{_localstatedir}/spool/firehol
 
-
 %changelog
+* Mon Aug 11 2014 Christopher Meng <cickumqt at gmail.com> - 2.0.0-0.1.rc1
+- Update to 2.0rc1
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.297-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index 2a01906..f712aef 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1a04fe45e6f8bfae8eb6fc0b2effa79b  firehol-1.297.tar.gz
+371f5970fe729c5965495c5e39ea50ba  firehol-2.0.0-rc.1.tar.xz


More information about the scm-commits mailing list