rpms/ctrlproxy/devel ctrlproxy.config, NONE, 1.1 ctrlproxy.init, NONE, 1.1 .cvsignore, 1.5, 1.6 ctrlproxy.spec, 1.15, 1.16 sources, 1.5, 1.6 ctrlproxy-fix-ansi-build.patch, 1.1, NONE

Bernardo Innocenti (bernie) fedora-extras-commits at redhat.com
Sun May 25 18:24:38 UTC 2008


Author: bernie

Update of /cvs/pkgs/rpms/ctrlproxy/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19970/devel

Modified Files:
	.cvsignore ctrlproxy.spec sources 
Added Files:
	ctrlproxy.config ctrlproxy.init 
Removed Files:
	ctrlproxy-fix-ansi-build.patch 
Log Message:
* Sun May 25 2008 Bernardo Innocenti <bernie at codewiz.org> 3.0.6-1
- Update to latest upstream
- Drop ctrlproxy-fix-irssi-log.patch
- Add initscript
- Create a ctrlproxy user to run ctrlproxy as a daemon



--- NEW FILE ctrlproxy.config ---
# Read the documentation for more information about the contents of this file.

[global]
# Replication mechanism to use (some other IRC proxies call this backlog)
# Possible values: none, simple, highlight, lastdisconnect
# Meanings:
# 	none: No backlog
# 	simple: Send backlog since the user last said something
# 	lastdisconnect: Send backlog since the users' last disconnect
# 	highlight: Send backlog since last connect, but only lines 
# 			   containing 'matches' (see below)
replication=simple

# Prepend all lines in replication with the time a line was received when replicating
# possible settings: never|always|replication
report-time = never

# What words to look for when remembering lines 
# (in case "replication = highlight")
# Seperate using semicolons
# matches=ctrlproxy;foobar

# Port at which CtrlProxy should listen for new connections
# Connections can be plain IRC connections or using the SOCKS protocol.
port=6680

# Password for logging in to ctrlproxy
password=

# Set "bind" to make ctrlproxy only listen on a specific IP address:
#bind=192.168.4.3

# Network that will be used when simply connecting to ctrlproxy 
# without using SOCKS or the CONNECT command
default-network=admin

# Override motd-file location
#motd-file = /tmp/my-motd

# Save state to configuration file on exit
autosave = true

# Networks to connect to on startup. Seperate by semicolons
autoconnect = admin
# autoconnect = admin;irc.oftc.net;irc.freenode.net;

# Support for interfacing to ctrlproxy 
# using /MSG ctrlproxy 
admin-user = ctrlproxy

# Send ctrlproxy log messages to the admin channel
admin-log = true

# Whether to remember passwords sent to NickServ
learn-nickserv = true

# Whether to update a networks name based on the NETWORK= line sent when 
# connected to it
#learn-network-name = true
#
# Automatically set AWAY after a certain period of time
#auto-away-enable = true
#auto-away-message = I'm currently away, sorry!
#auto-away-time = 300 # in seconds
#auto-away-nick = jelmer|away

# Logging
logging = irssi
logdir=/var/log/irc


--- NEW FILE ctrlproxy.init ---
#!/bin/sh
#
# ctrlproxy: IRC server with multiserver support
#
# chkconfig:   345 85 15
# description: ctrlproxy is an IRC server with multiserver support. \
#	It runs as a dæmon and connects to a number of IRC servers, \
#	then allows you to connect from a workstation and work as \
#	the user that is logged in to the IRC server.
#

### BEGIN INIT INFO
# Provides: ctrlproxy
# Required-Start: $network
# Required-Stop: $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: IRC server with multiserver support
# Description:  ctrlproxy is an IRC server with multiserver support.
#         It runs as a dæmon and connects to a number of IRC servers,
#         then allows you to connect from a workstation and work as
#         the user that is logged in to the IRC server.
### END INIT INFO

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

exec="/usr/bin/ctrlproxy"
prog="ctrlproxy"
config="/var/lib/ctrlproxy/config"

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
    [ -x $exec ] || exit 5
    [ -f $config ] || exit 6
    echo -n $"Starting $prog: "
    daemon --user $prog $exec --daemon --config-dir /var/lib/ctrlproxy $CTRLPROXY_OPTIONS
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    restart
}

force_reload() {
    restart
}

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

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


case "$1" in
    start)
        rh_status_q && exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac
exit $?


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ctrlproxy/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore	14 Jan 2008 09:24:45 -0000	1.5
+++ .cvsignore	25 May 2008 18:23:47 -0000	1.6
@@ -1 +1 @@
-ctrlproxy-3.0.5.tar.gz
+ctrlproxy-3.0.6.tar.gz


Index: ctrlproxy.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ctrlproxy/devel/ctrlproxy.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ctrlproxy.spec	19 Feb 2008 07:31:45 -0000	1.15
+++ ctrlproxy.spec	25 May 2008 18:23:47 -0000	1.16
@@ -1,12 +1,18 @@
+%define ctrlproxy_homedir %{_var}/lib/ctrlproxy
+%define ctrlproxy_logdir  %{_var}/log/irc
+%define ctrlproxy_service ctrlproxy
+%define ctrlproxy_user    ctrlproxy
+
 Summary: ctrlproxy
 Name: ctrlproxy
-Version: 3.0.5
-Release: 2%{?dist}
+Version: 3.0.6
+Release: 1%{?dist}
 License: GPLv2+
 Group: Applications/Internet
 Source: http://jelmer.vernstok.nl/releases/ctrlproxy-%{version}.tar.gz
 Url: http://jelmer.vernstok.nl/ctrlproxy/
-Patch0: ctrlproxy-fix-ansi-build.patch
+Source100: ctrlproxy.init
+Source101: ctrlproxy.config
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: glib2-devel, popt, gnutls-devel
 
@@ -31,7 +37,6 @@
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 %configure
@@ -45,6 +50,23 @@
 make DESTDIR=$RPM_BUILD_ROOT install
 make DESTDIR=$RPM_BUILD_ROOT -C doc install
 chmod 0644 ${RPM_BUILD_ROOT}%{_datadir}/ctrlproxy/motd
+install -D -p -m 0755 %{SOURCE100} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ctrlproxy
+install -D -p -m 0640 %{SOURCE101} $RPM_BUILD_ROOT/%{ctrlproxy_homedir}/config
+install -D -d -m 0750 $RPM_BUILD_ROOT/%{ctrlproxy_logdir}
+
+
+%pre
+/usr/sbin/useradd -s /sbin/nologin -M -r -d %{ctrlproxy_homedir} \
+    -c "ctrlproxy IRC daemon" %{ctrlproxy_user} &>/dev/null || :
+
+%post
+/sbin/chkconfig --add %{ctrlproxy_service}
+
+%preun
+if [ $1 = 0 ]; then
+	/sbin/service %{ctrlproxy_service} stop > /dev/null 2>&1 || :
+	/sbin/chkconfig --del %{ctrlproxy_service}
+fi
 
 %clean
 [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -59,12 +81,24 @@
 %dir %{_docdir}/ctrlproxy
 %{_docdir}/ctrlproxy/*
 
+%{_sysconfdir}/init.d/ctrlproxy
+%attr(0750, ctrlproxy, ctrlproxy) %dir %{ctrlproxy_logdir}
+%attr(0750, ctrlproxy, ctrlproxy) %dir %{ctrlproxy_homedir}
+%attr(0750, ctrlproxy, ctrlproxy) %config(noreplace) %{ctrlproxy_homedir}/config
+
+
 %files devel
 %defattr(-,root,root)
 %{_includedir}/ctrlproxy-3.0/*
 %{_libdir}/pkgconfig/ctrlproxy.pc
 
 %changelog
+* Sun May 25 2008 Bernardo Innocenti <bernie at codewiz.org> 3.0.6-1
+- Update to latest upstream
+- Drop ctrlproxy-fix-irssi-log.patch
+- Add initscript
+- Create a ctrlproxy user to run ctrlproxy as a daemon
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 3.0.5-2
 - Autorebuild for GCC 4.3
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ctrlproxy/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources	14 Jan 2008 09:24:45 -0000	1.5
+++ sources	25 May 2008 18:23:47 -0000	1.6
@@ -1 +1 @@
-64be702fb70728756f70b8cbafe87c74  ctrlproxy-3.0.5.tar.gz
+fdb5135860d3c01baac0248c23096480  ctrlproxy-3.0.6.tar.gz


--- ctrlproxy-fix-ansi-build.patch DELETED ---




More information about the fedora-extras-commits mailing list