Author: jajcus Date: Sat Nov 26 13:56:15 2011 GMT Module: packages Tag: HEAD ---- Log message: - new package
---- Files affected: packages/ippool: ippool-headers.patch (NONE -> 1.1) (NEW), ippool-no_Werror.patch (NONE -> 1.1) (NEW), ippool.spec (NONE -> 1.1) (NEW), ippoold.init (NONE -> 1.1) (NEW), ippoold.sysconfig (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/ippool/ippool-headers.patch diff -u /dev/null packages/ippool/ippool-headers.patch:1.1 --- /dev/null Sat Nov 26 14:56:15 2011 +++ packages/ippool/ippool-headers.patch Sat Nov 26 14:56:10 2011 @@ -0,0 +1,25 @@ +diff -dur ippool-1.3.orig/usl/usl_timer.c ippool-1.3/usl/usl_timer.c +--- ippool-1.3.orig/usl/usl_timer.c 2008-02-03 15:55:30.000000000 +0100 ++++ ippool-1.3/usl/usl_timer.c 2011-11-26 13:34:45.000000000 +0100 +@@ -42,6 +42,7 @@ + #include <signal.h> + #include <string.h> + #include <sys/time.h> ++#include <limits.h> + + #include "usl.h" + +--- ippool-1.3.orig/pppd/ippool.c 2004-09-12 23:04:50.000000000 +0200 ++++ ippool-1.3/pppd/ippool.c 2011-11-26 13:39:26.000000000 +0100 +@@ -6,10 +6,7 @@ + #include <stdlib.h> + #include <errno.h> + #include "pppd.h" +-#include "pathnames.h" +-#include "fsm.h" /* Needed for lcp.h to include cleanly */ +-#include "lcp.h" +-#include "ccp.h" ++#include "fsm.h" + #include "ipcp.h" + #include <sys/stat.h> + #include <net/if.h> ================================================================ Index: packages/ippool/ippool-no_Werror.patch diff -u /dev/null packages/ippool/ippool-no_Werror.patch:1.1 --- /dev/null Sat Nov 26 14:56:15 2011 +++ packages/ippool/ippool-no_Werror.patch Sat Nov 26 14:56:10 2011 @@ -0,0 +1,25 @@ +diff -dur ippool-1.3.orig/cli/Makefile ippool-1.3/cli/Makefile +--- ippool-1.3.orig/cli/Makefile 2008-02-03 15:55:30.000000000 +0100 ++++ ippool-1.3/cli/Makefile 2011-11-26 13:35:29.000000000 +0100 +@@ -7,7 +7,7 @@ + + LDFLAGS.cli_test= -L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc + +-CFLAGS= $(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS) ++CFLAGS= $(CFLAGS.optimize) -MMD -Wall -I.. $(READLINE_CFLAGS) + + .PHONY: all test clean + +diff -dur ippool-1.3.orig/usl/Makefile ippool-1.3/usl/Makefile +--- ippool-1.3.orig/usl/Makefile 2008-02-24 12:52:50.000000000 +0100 ++++ ippool-1.3/usl/Makefile 2011-11-26 13:35:38.000000000 +0100 +@@ -14,7 +14,7 @@ + endif + + CPPFLAGS+= $(CFLAGS.optimize) -g +-CFLAGS= -I. -MMD -Wall -Werror $(CPPFLAGS) $(CPPFLAGS.dmalloc) ++CFLAGS= -I. -MMD -Wall $(CPPFLAGS) $(CPPFLAGS.dmalloc) + + .PHONY: all test clean + + ================================================================ Index: packages/ippool/ippool.spec diff -u /dev/null packages/ippool/ippool.spec:1.1 --- /dev/null Sat Nov 26 14:56:15 2011 +++ packages/ippool/ippool.spec Sat Nov 26 14:56:10 2011 @@ -0,0 +1,83 @@ +# $Revision$, $Date$ +# +Summary: An IP address pool manager +Name: ippool +Version: 1.3 +Release: 1 +License: GPL +Group: Networking/Daemons +Source0: http://downloads.sourceforge.net/openl2tp/%{name}-%{version}.tar.gz +# Source0-md5: e2401e65db26a3764585b97212888fae +Source1: %{name}d.init +Source2: %{name}d.sysconfig +Patch0: %{name}-headers.patch +Patch1: %{name}-no_Werror.patch +URL: http://www.openl2tp.org/ +BuildRequires: ppp-plugin-devel +BuildRequires: readline-devel +Requires: portmap +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +IpPool is an IP address pool manager. + +IpPool is implemented as a separate server daemon to allow any +application to use its address pools. This makes it possible to define +address pools that are shared by PPP, L2TP, PPTP etc. It may be useful +in some VPN server setups. + +IpPool comes with a command line management application, ippoolconfig +to manage and query address pool status. A pppd plugin is supplied +which allows pppd to request IP addresses from ippoold. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%{__make} -j1 \ + CFLAGS.optimize="%{rpmcflags}" + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_libdir}/pppd/plugins} + +%{__make} -j1 install \ + DESTDIR=$RPM_BUILD_ROOT \ + PPPD_LIBDIR=%{_libdir}/pppd/plugins + +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ippoold +install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ippoold + +touch $RPM_BUILD_ROOT%{_sysconfdir}/ippoold.conf + +rm -f $RPM_BUILD_ROOT%{_libdir}/libusl.a + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc README +%dir %{_libdir}/ippool +%attr(755,root,root) %{_bindir}/ippoolconfig +%attr(755,root,root) %{_sbindir}/ippoold +%{_libdir}/ippool/ippool_rpc.x +%attr(755,root,root) %{_libdir}/pppd/plugins/ippool.so +%{_mandir}/man1/ippoolconfig.1* +%{_mandir}/man4/ippool_rpc.4* +%{_mandir}/man8/ippoold.8* +%attr(754,root,root) /etc/rc.d/init.d/ippoold +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ippoold +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ippoold.conf + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[email protected]> +All persons listed below can be reached at <cvs_login>@pld-linux.org + +$Log$ +Revision 1.1 2011/11/26 13:56:10 jajcus +- new package + ================================================================ Index: packages/ippool/ippoold.init diff -u /dev/null packages/ippool/ippoold.init:1.1 --- /dev/null Sat Nov 26 14:56:15 2011 +++ packages/ippool/ippoold.init Sat Nov 26 14:56:10 2011 @@ -0,0 +1,136 @@ +#!/bin/sh +# +# ippoold Start/Stop the OpenL2TP protocol daemon. +# +# chkconfig: 2345 57 76 +# description: OpenL2TP is a complete implementation of RFC2661 - Layer Two Tunneling +# Protocol Version 2, able to operate as both a server and a client. It +# can be used to implement L2TP VPNs. As a server, it can handle +# hundreds of tunnels and sessions. +# processname: ippoold +# config: /etc/sysconfig/ippoold +# pidfile: /var/run/ippoold.pid + +# Source function library. +. /etc/init.d/functions + +IPPOOLDARGS="" +IPPOOLD_CONFIG_FILE="" + +[ -f /etc/sysconfig/ippoold ] && . /etc/sysconfig/ippoold + +start() { + # Check if the service is already running? + if [ -f /var/lock/subsys/ippoold ]; then + msg_already_running "ippoold" + return + fi + + msg_starting "ippoold" + emit starting JOB=ippoold + + modprobe -s pppol2tp || modprobe -s l2tp_ppp + RETVAL=$? + if [ $RETVAL -eq 0 ]; then + daemon ippoold $IPPOOLDARGS + RETVAL=$? + fi + if [ $RETVAL -eq 0 ]; then + touch /var/lock/subsys/ippoold + emit started JOB=ippoold + if [ -n "$IPPOOLD_CONFIG_FILE" -a -f "$IPPOOLD_CONFIG_FILE" ]; then + sleep 1 + show "Restoring saved ippoold configuration..." ; busy + /usr/bin/ippoolconfig config restore file="$IPPOOLD_CONFIG_FILE" + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + ok + else + fail + fi + fi + fi +} + +stop() { + if [ ! -f /var/lock/subsys/ippoold ]; then + msg_not_running "ippoold" + return + fi + msg_stopping "ippoold" + killproc ippoold + emit --no-wait stopped JOB=ippoold + rm -f /var/run/ippoold.pid /var/lock/subsys/ippoold >/dev/null 2>&1 + return 0 +} + +condrestart() { + if [ ! -f /var/lock/subsys/ippoold ]; then + msg_not_running "ippoold" + RETVAL=$1 + return + fi + + stop + start +} + +restart() { + stop + start +} + +reload() { + if [ ! -f /var/lock/subsys/ippoold ]; then + msg_not_running "ippoold" + RETVAL=7 + return + fi + + if [ -n "$IPPOOLD_CONFIG_FILE" -a -f "$IPPOOLD_CONFIG_FILE" ]; then + msg_reloading "ippoold" + /usr/bin/ippoolconfig config restore file="$IPPOOLD_CONFIG_FILE" + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + ok + else + fail + fi + else + stop + start + fi +} + +RETVAL=0 +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + try-restart) + condrestart 0 + ;; + reload|force-reload) + reload + ;; + status) + status ippoold + RETVAL=$? + ;; + condrestart) + condrestart + ;; + *) + msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}" + exit 3 +esac + +exit $RETVAL + ================================================================ Index: packages/ippool/ippoold.sysconfig diff -u /dev/null packages/ippool/ippoold.sysconfig:1.1 --- /dev/null Sat Nov 26 14:56:15 2011 +++ packages/ippool/ippoold.sysconfig Sat Nov 26 14:56:10 2011 @@ -0,0 +1,19 @@ +# Settings for the IP pool daemon. + +# Set nice level for ippoold +#SERVICE_RUN_NICE_LEVEL="+2" + +# IPPOOLDARGS= : any extra command-line startup arguments for ippoold +# -R - allow remote management using RPC +# -d nnn - set debug trace mask to nnn +# -L log-facility - set syslog facility (default LOG_DAEMON) +# +# IPPOOLD_CONFIG_FILE= : a file containing L2TP config that +# is loaded when ippoold starts up. + +# Use ipsec.so plugin for IPSec setups. +#IPPOOLDARGS="-p ipsec.so" +IPPOOLDARGS= + +# Config file to load at ippoold startup +IPPOOLD_CONFIG_FILE=/etc/ippoold.conf ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
