rpms/Vuurmuur/F-12 Vuurmuur.spec, NONE, 1.1 import.log, NONE, 1.1 libvuurmuur-plugin.patch, NONE, 1.1 vuurmuur-initd.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Stjepan Gros sgros at fedoraproject.org
Sun Nov 22 22:15:33 UTC 2009


Author: sgros

Update of /cvs/pkgs/rpms/Vuurmuur/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18564/F-12

Modified Files:
	.cvsignore sources 
Added Files:
	Vuurmuur.spec import.log libvuurmuur-plugin.patch 
	vuurmuur-initd.sh 
Log Message:
- Initial import into F-12 branch



--- NEW FILE Vuurmuur.spec ---
Name:		Vuurmuur
Version:	0.7
Release:	6%{?dist}
Summary:	Firewall manager built on top of iptables
Group:		System Environment/Libraries
License:	GPLv2+
URL:		http://www.vuurmuur.org/
Source0:	ftp://ftp.vuurmuur.org/releases/%{version}/%{name}-%{version}.tar.gz
Source1:	vuurmuur-initd.sh
# Patch sent to upstream and commited into SVN
Patch0:		libvuurmuur-plugin.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	gettext
BuildRequires:	automake
BuildRequires:	libtool
BuildRequires:	ncurses-devel

%description
Vuurmuur is a powerful middle-end/front-end for netfilter/iptables aimed
at system-administrators who need a decent firewall, but don't have netfilter
specific knowledge.

The program is basicly split into three pieces. One piece (the middle-end)
converts humanly-readable rules, hosts, groups, networks, zones, interfaces
and services into a iptables ruleset (or optional into a bash-script). The
second part is a little daemon that converts the netfiler logs to easy
readable logs, that reflect all the predefined objects described above. The
third part is a Ncurses-based Gui (the front-end) in which one can manage
the firewall. Most important here is the real-time feedback. Logs can be
viewed in real-time, using colours for easy interpretation. Also, the current
connections can be viewed in real-time. Filtering possibilities make it easy
to monitor specific hosts or services.

%package tui
Summary:	Ncurses based interface for modifying Vuurmuur configuration
Requires:	%{name} = %{version}-%{release}

%description tui
Ncurses based interface for modifying Vuurmuur configuration.

%package daemon
Summary:	Vuurmuur daemon
Requires:	%{name} = %{version}-%{release}
Requires(post):	chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts

%description daemon
Vuurmuur daemon.

%package devel
Summary:	Development files for firewall manager built on top of iptables
Requires:	%{name} = %{version}-%{release} 

%description devel
Development files for firewall manager built on top of iptables

%prep
%setup -q
tar xzf libvuurmuur-%{version}.tar.gz
tar xzf vuurmuur-%{version}.tar.gz
tar xzf vuurmuur_conf-%{version}.tar.gz

cd libvuurmuur-%{version}
# Vuurmuur doesn't obey configure argument for plugin placement. This patch fixes it.
%patch0 -p1
aclocal
libtoolize
autoconf
automake

%build
cd libvuurmuur-%{version}
LIBVUDIR=$(pwd)
%configure \
	--with-plugindir=%{_libdir}/vuurmuur/plugins

# Configure ignores --disable-rpath so we have to solve it this way
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

# Parallel make is not used because compilation stops with an error
make

cd ../vuurmuur-%{version}
%configure \
	--with-libvuurmuur-includes=${LIBVUDIR}/src/ \
	--with-libvuurmuur-libraries=${LIBVUDIR}/src/.libs/

# Configure ignores --disable-rpath so we have to solve it this way
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}

# Convert MAN pages to UTF-8
pushd man/en
for i in vuurmuur_script.8 vuurmuur_log.8 vuurmuur.8; do
	iconv --from=ISO-8859-1 --to=UTF-8 $i > new
	mv new $i
done
popd

# Convert MAN pages to UTF-8
pushd man/ru
for i in vuurmuur_script.8 vuurmuur_log.8 vuurmuur.8; do
	iconv --from=KOI-8 --to=UTF-8 $i > new
	mv new $i
done
popd

cd ../vuurmuur_conf-%{version}
%configure \
	--with-libvuurmuur-includes=${LIBVUDIR}/src/ \
	--with-libvuurmuur-libraries=${LIBVUDIR}/src/.libs/

# Configure ignores --disable-rpath so we have to solve it this way
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}

# Convert MAN pages to UTF-8
pushd man/ru
iconv --from=KOI-8 --to=UTF-8 vuurmuur_conf.8 > new
mv new vuurmuur_conf.8
popd

# Convert HLP pages to UTF-8
pushd help
for i in vuurmuur-fr.hlp vuurmuur-ru.hlp; do
	iconv --from=ISO-8859-1 --to=UTF-8 $i > new
	mv new $i
done
popd

%install
VUDIR=$(pwd)
# Install libraries
rm -rf $RPM_BUILD_ROOT
cd libvuurmuur-%{version}

make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

# Create main configuration directory
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur

# create initial configuration to be able to start Vuurmuur
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/plugins/
install -m 600 -p plugins/textdir/textdir.conf.debian \
	$RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/plugins/textdir.conf

# Install daemon
cd ../vuurmuur-%{version}
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

for i in `find $VUDIR -name .keep`
do
	rm -rf $i
done

# install SYSV init stuff
mkdir -p $RPM_BUILD_ROOT/%{_initddir}
install -m755 %{SOURCE1} \
	$RPM_BUILD_ROOT/%{_initddir}/vuurmuur

# install log rotation stuff
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
install -m 644 -p scripts/vuurmuur-logrotate \
	$RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/vuurmuur

# create log directory
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/vuurmuur

# create initial configuration to be able to start Vuurmuur
install -m 600 -p skel/etc/vuurmuur/config.conf.sample \
	$RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/config.conf
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/
cp -a services $RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/services/Makefile*

# Remove files that should be not packaged
rm -rf $RPM_BUILD_ROOT%{_datadir}/vuurmuur/scripts
rm -rf $RPM_BUILD_ROOT%{_datadir}/vuurmuur/services

# Install ncurses configuration tool
cd ../vuurmuur_conf-%{version}
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

# Install default configuration
#install -m 600 -p config/vuurmuur_conf.conf.sample \
#	$RPM_BUILD_ROOT/%{_sysconfdir}/vuurmuur/vuurmuur_conf.conf

# Remove unpackaged files
rm -rf $RPM_BUILD_ROOT%{_docdir}/vuurmuur
rm -f $RPM_BUILD_ROOT%{_libdir}/libvuurmuur.la
rm -f $RPM_BUILD_ROOT%{_libdir}/vuurmuur/plugins/libtextdir.la
rm -rf $RPM_BUILD_ROOT%{_datadir}/vuurmuur/conf

# Remove static libraries
rm -f $RPM_BUILD_ROOT%{_libdir}/libvuurmuur.a
rm -f $RPM_BUILD_ROOT%{_libdir}/vuurmuur/plugins/libtextdir.a

%find_lang vuurmuur_conf

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post daemon

# Register the vuurmuur service
/sbin/chkconfig --add vuurmuur

%preun daemon
if [ $1 = 0 ]; then
	/sbin/service vuurmuur stop > /dev/null 2>&1
	/sbin/chkconfig --del vuurmuur
fi

%postun daemon
if [ "$1" -ge "1" ] ; then
    /sbin/service vuurmuur condrestart >/dev/null 2>&1 || :
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc libvuurmuur-%{version}/doc/README libvuurmuur-%{version}/AUTHORS libvuurmuur-%{version}/COPYING
%{_libdir}/libvuurmuur.so.0
%{_libdir}/libvuurmuur.so.0.6.0
%dir %{_libdir}/vuurmuur
%dir %{_libdir}/vuurmuur/plugins
%{_libdir}/vuurmuur/plugins/libtextdir.so
%{_libdir}/vuurmuur/plugins/libtextdir.so.0
%{_libdir}/vuurmuur/plugins/libtextdir.so.0.0.0

%files daemon
%defattr(-,root,root,-)
%doc vuurmuur-%{version}/AUTHORS vuurmuur-%{version}/skel vuurmuur-%{version}/zones
%{_bindir}/vuurmuur
%{_bindir}/vuurmuur_log
%{_bindir}/vuurmuur_script
%{_mandir}/man8/vuurmuur.8.gz
%{_mandir}/man8/vuurmuur_log.8.gz
%{_mandir}/man8/vuurmuur_script.8.gz
%lang(ru) %{_mandir}/ru/man8/vuurmuur.8.gz
%lang(ru) %{_mandir}/ru/man8/vuurmuur_log.8.gz
%lang(ru) %{_mandir}/ru/man8/vuurmuur_script.8.gz
%config(noreplace) %{_sysconfdir}/vuurmuur
%config(noreplace) %{_sysconfdir}/logrotate.d/vuurmuur
%{_initddir}/vuurmuur
%dir %{_localstatedir}/log/vuurmuur

%files devel
%defattr(-,root,root,-)
%{_includedir}/vuurmuur.h
%{_libdir}/libvuurmuur.so

%files tui -f vuurmuur_conf-%{version}/vuurmuur_conf.lang
%defattr(-,root,root,-)
%doc vuurmuur_conf-%{version}/AUTHORS vuurmuur_conf-%{version}/ChangeLog vuurmuur_conf-%{version}/COPYING
%{_bindir}/vuurmuur_conf
%{_mandir}/man8/vuurmuur_conf.8.gz
%lang(ru) %{_mandir}/ru/man8/vuurmuur_conf.8.gz
%doc %{_datadir}/vuurmuur

%changelog
* Thu Nov 19 2009 Stjepan Gros <stjepan.gros at gmail.com> - 0.7-6
- Fixed macros in changelog

* Wed Nov 18 2009 Stjepan Gros <stjepan.gros at gmail.com> - 0.7-5
- Disabled parallel make
- Fixed ownership of the directory %%{_libdir}/vuurmuur/plugins
- Fix error in startup script that sourced named configuration

* Sun Nov 15 2009 Stjepan Gros <stjepan.gros at gmail.com> - 0.7-3
- All BuildRequires are now specified in the main package section
- Added parallel make to all the places
- Added "install -p" to all the installations in order to preserve timestamps
- Created some minimal configuration
- Switched services definition to configuration directory
- Fixed ownership of the directory %%{_datadir}/vuurmuur

* Sat Nov 14 2009 Stjepan Gros <stjepan.gros at gmail.com> - 0.7-2
- Skipped release number 1 because of error in the previous
  version of package
- Fixes based on the review on bugzilla
  https://bugzilla.redhat.com/show_bug.cgi?id=528108#c1
  https://bugzilla.redhat.com/show_bug.cgi?id=528108#c2

* Wed Sep  2 2009 Stjepan Gros <stjepan.gros at gmail.com> - 0.7-0
- Initial package



--- NEW FILE import.log ---
Vuurmuur-0_7-6_fc11:F-12:Vuurmuur-0.7-6.fc11.src.rpm:1258927581

libvuurmuur-plugin.patch:
 Makefile.am                 |    2 ++
 configure.in                |    8 ++++++--
 plugins/textdir/Makefile.am |    2 +-
 src/backendapi.c            |    2 +-
 4 files changed, 10 insertions(+), 4 deletions(-)

--- NEW FILE libvuurmuur-plugin.patch ---
diff -urN libvuurmuur-0.7.orig/configure.in libvuurmuur-0.7/configure.in
--- libvuurmuur-0.7.orig/configure.in	2007-05-08 19:48:12.000000000 +0200
+++ libvuurmuur-0.7/configure.in	2009-11-14 21:05:31.000000000 +0100
@@ -3,6 +3,8 @@
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(libvuurmuur, 0.6)
 
+AC_CONFIG_MACRO_DIR([m4])
+
 AC_LANG_C
 AC_PROG_CC
 AM_PROG_LIBTOOL
@@ -17,10 +19,12 @@
         [plugindir="$withval"],[plugindir=no])
 
 if test "$plugindir" != "no"; then
-    CPPFLAGS="${CPPFLAGS} -DPLUGINDIR=\"${plugindir}\""
+    VUURMUUR_PLUGIN_DIR="${plugindir}"
 else
-    CPPFLAGS="${CPPFLAGS} -DPLUGINDIR=\"${libdir}/vuurmuur\""
+    VUURMUUR_PLUGIN_DIR="${libdir}/vuurmuur"
 fi
+CPPFLAGS="${CPPFLAGS} -DPLUGINDIR=\"$VUURMUUR_PLUGIN_DIR\""
+AC_SUBST(VUURMUUR_PLUGIN_DIR)
 
 # shared dir option for rpm building
 AC_ARG_WITH(shareddir,
diff -urN libvuurmuur-0.7.orig/Makefile.am libvuurmuur-0.7/Makefile.am
--- libvuurmuur-0.7.orig/Makefile.am	2007-05-08 19:48:12.000000000 +0200
+++ libvuurmuur-0.7/Makefile.am	2009-11-14 21:05:31.000000000 +0100
@@ -2,4 +2,6 @@
 # have all needed files, that a GNU package needs
 AUTOMAKE_OPTIONS = foreign 1.4
 
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = src plugins doc
diff -urN libvuurmuur-0.7.orig/plugins/textdir/Makefile.am libvuurmuur-0.7/plugins/textdir/Makefile.am
--- libvuurmuur-0.7.orig/plugins/textdir/Makefile.am	2009-03-22 14:53:21.000000000 +0100
+++ libvuurmuur-0.7/plugins/textdir/Makefile.am	2009-11-14 21:05:31.000000000 +0100
@@ -1,6 +1,6 @@
 # textdir plugin
 
-libdir = "${exec_prefix}/lib/vuurmuur/plugins"
+libdir = @VUURMUUR_PLUGIN_DIR@
 
 lib_LTLIBRARIES = libtextdir.la
 
diff -urN libvuurmuur-0.7.orig/src/backendapi.c libvuurmuur-0.7/src/backendapi.c
--- libvuurmuur-0.7.orig/src/backendapi.c	2009-03-22 14:22:18.000000000 +0100
+++ libvuurmuur-0.7/src/backendapi.c	2009-11-14 21:05:47.000000000 +0100
@@ -134,7 +134,7 @@
             return(-1);
         }
 
-        if(snprintf(plugin_location, sizeof(plugin_location), "%s/plugins/lib%s.so", conf.plugdir, plugin_name) >= (int)sizeof(plugin_location))
+        if(snprintf(plugin_location, sizeof(plugin_location), "%s/lib%s.so", conf.plugdir, plugin_name) >= (int)sizeof(plugin_location))
         {
             (void)vrprint.error(-1, "Internal Error", "pluginpath "
                 "overflow (in: %s:%d).", __FUNC__, __LINE__);


--- NEW FILE vuurmuur-initd.sh ---
#!/bin/bash

# This is an implementation of a start-script for Vuurmuur.
#
# (c) 2004-2007 Victor Julien, released under GPL.

# Make RedHat happy:
#
# chkconfig: - 91 9
# Description: Vuurmuur is a firewall.
#

### BEGIN INIT INFO
# Provides: vuurmuur
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $network $syslog
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start|stop|status|restart|condrestart|force-reload Vuurmuur firewall
# Description: control Vuurmuur firewall
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# where do the executables reside? NOTE: no trailing slash

# space separated list of modules to load on start, or 'none' if none ;-)
MODULES_TO_LOAD="ip_tables iptable_filter iptable_mangle iptable_nat ip_conntrack ipt_state ip_conntrack_ftp ip_nat_ftp ip_queue"
#MODULES_TO_LOAD="none"

PATH=/bin:/usr/bin:/sbin:/usr/sbin

vuurmuur_exec="/usr/bin/vuurmuur"
vuurmuur_prog="vuurmuur"
logger_exec="/usr/bin/vuurmuur_log"
logger_prog="/usr/bin/vuurmuur_log"
lockfile=/var/lock/subsys/vuurmuur
lockfile_log=/var/lock/subsys/vuurmuur_log

[ -e /etc/sysconfig/$vuurmuur_prog ] && . /etc/sysconfig/$vuurmuur_prog
[ -e /etc/sysconfig/$logger_prog ] && . /etc/sysconfig/$logger_prog

rh_status() {
    # run checks to determine if the service is running or use generic status
    status $vuurmuur_prog
}

rh_status_q() {
    rh_status >/dev/null 2>&1
}

case "$1" in
	start)
		# check if vuurmuur is configured
		IFNUM=`/usr/bin/vuurmuur_script --list --interface any | wc -l`
		if [ "$IFNUM" = "0" ]; then
			echo "FAILED: please configure Vuurmuur first by defining at least one interface."
			echo "HINT: Use vuurmuur_conf tool from the vuurmuur-tui package."
			exit 1
		fi

		echo -n "Starting $vuurmuur_prog:"
		daemon $vuurmuur_prog -l
		RETVAL=$?
		echo
		[ $RETVAL -eq 0 ] || exit $RETVAL
		touch $lockfile

		echo -n "Starting $logger_prog:"
		daemon $logger_prog
		RETVAL=$?
		echo
		if [ $RETVAL -ne 0 ]; then
			killproc $vuurmuur_prog
			exit $RETVAL
		fi
		touch $lockfile_log
		;;

	stop)
		echo -n "Shutting down $vuurmuur_prog: "
		killproc $vuurmuur_prog
		RETVAL=$?
		echo
		[ $RETVAL -eq 0 ] && rm -f $lockfile

		echo -n "Shutting down $logger_prog: "
		killproc $logger_prog
		RETVAL=$?
		echo
		[ $RETVAL -eq 0 ] && rm -f $lockfile_log
                ;;

	condrestart)
		rh_status_q || exit 0
		$0 restart
		;;

	status)
		status $vuurmuur_prog
		status $logger_prog
                ;;

	force-reload|restart)
		$0 stop
		$0 start
		;;
	*)
		echo "Usage: /etc/init.d/vuurmuur {start|stop|status|restart|condrestart|force-reload}"
		exit 1
esac

exit 0


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/Vuurmuur/F-12/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	20 Nov 2009 22:45:46 -0000	1.1
+++ .cvsignore	22 Nov 2009 22:15:32 -0000	1.2
@@ -0,0 +1 @@
+Vuurmuur-0.7.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/Vuurmuur/F-12/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	20 Nov 2009 22:45:47 -0000	1.1
+++ sources	22 Nov 2009 22:15:32 -0000	1.2
@@ -0,0 +1 @@
+bad91aafcbea5e3a434440f88d722778  Vuurmuur-0.7.tar.gz




More information about the scm-commits mailing list