rpms/bip/F-10 bip-conf.patch, NONE, 1.1 bip.init, NONE, 1.1 bip.logrotate, NONE, 1.1 bip.spec, 1.4, 1.5
Lorenzo Villani
arbiter at fedoraproject.org
Sat Nov 29 18:03:41 UTC 2008
- Previous message (by thread): rpms/bip/EL-5 bip-conf.patch, NONE, 1.1 bip.init, NONE, 1.1 bip.logrotate, NONE, 1.1 bip.spec, 1.5, 1.6
- Next message (by thread): rpms/bip/F-9 bip-conf.patch, NONE, 1.1 bip.init, NONE, 1.1 bip.logrotate, NONE, 1.1 bip.spec, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: arbiter
Update of /cvs/pkgs/rpms/bip/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14164/F-10
Modified Files:
bip.spec
Added Files:
bip-conf.patch bip.init bip.logrotate
Log Message:
- 0.7.5
- support for running as system daemon
- experimental (not used, yet) logrotate file
bip-conf.patch:
--- NEW FILE bip-conf.patch ---
--- samples/bip.conf.orig 2008-05-15 15:45:04.000000000 +0100
+++ samples/bip.conf 2008-05-15 15:48:43.000000000 +0100
@@ -9,7 +9,7 @@
# be sure to set the password to the value
# specified in the network you want to connect to.
# Port is 6667 by default.
-port = 7778;
+#port = 7778;
# If you set this to true, you'll only be able to connect to bip
# with a SSL capable IRC client. Be sure to generate a certificate
@@ -21,7 +21,7 @@
#client_side_ssl_pem = "/path/to/pemfile";
# Define where the pidfile should be stored. Defaults to <biphome>/bip.pid
-#pid_file="/var/run/bip/bip.pid";
+pid_file="/var/run/bip/bip.pid";
# Uncomment this line to disable logging and backlogging.
#log = false
@@ -37,7 +37,7 @@
# This is where logs go. Channel and private messages will use that
# configuration value as a prefix, and then log_format to determine
# full log filename.
-#log_root = "/var/proxy/logs";
+log_root = "/var/log/bip";
# Uncomment this line to disable bip's internal messages logging.
# This is not recommended, a better option is to reduce log_level.
--- NEW FILE bip.init ---
#!/bin/sh
#
# chkconfig: - 92 5
# description: bip is an IRC proxy server
#
BIP=/usr/bin/bip
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
RETVAL="0"
[ -x "$BIP" ] || exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting bip: "
daemon --user=bip $BIP -f /etc/bip.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bip
;;
stop)
echo -n "Stopping bip: "
killproc bip
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bip
;;
status)
status bip
RETVAL=$?
;;
restart)
$0 status >/dev/null && $0 stop
$0 start
RETVAL=$?
;;
condrestart)
[ -f "/var/lock/subsys/bip" ] && $0 restart || :
RETVAL=$?
echo
;;
reload)
echo -n "Reloading bip: "
killproc bip -HUP
RETVAL=$?
echo
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
exit $RETVAL
--- NEW FILE bip.logrotate ---
/var/log/bip/* {
yearly
notifempty
missingok
}
Index: bip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bip/F-10/bip.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bip.spec 16 Nov 2008 15:02:10 -0000 1.4
+++ bip.spec 29 Nov 2008 18:03:11 -0000 1.5
@@ -1,11 +1,13 @@
Name: bip
Version: 0.7.5
Release: 1%{?dist}
-Summary: IRC Bouncer
+Summary: IRC Bouncer
Group: Applications/Internet
License: GPLv2+
URL: http://bip.t1r.net
Source0: http://bip.t1r.net/downloads/bip-%{version}.tar.gz
+Source1: bip.init
+Patch0: bip-conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel flex byacc autoconf m4
@@ -20,6 +22,7 @@
%prep
%setup -q
+%patch0 -p0
iconv -f iso-8859-1 -t utf-8 -o ChangeLog{.utf8,}
mv ChangeLog{.utf8,}
@@ -34,24 +37,56 @@
make install DESTDIR=$RPM_BUILD_ROOT
# Remove misplaced files
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/bip
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
+# Install bip.conf
+install -m 644 samples/bip.conf $RPM_BUILD_ROOT%{_sysconfdir}/bip.conf
+# Install initscript
+mkdir -p $RPM_BUILD_ROOT%{_initrddir}
+install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/bip
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/bip
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/bip
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+/usr/sbin/useradd -c "Bip IRC Proxy" \
+ -s /bin/sh -r -d / bip 2> /dev/null || :
+
+%post
+/sbin/chkconfig --add bip
+
+%preun
+if [ "$1" = 0 ]; then
+ /sbin/service bip stop >/dev/null 2>&1 || :
+ /sbin/chkconfig --del bip
+fi
+
+%postun
+if [ "$1" -ge 1 ]; then
+ /sbin/service bip condrestart >/dev/null 2>&1 || :
+fi
+
+
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README TODO
-%doc samples/bip.conf
%doc samples/bip.vim
%{_bindir}/bip
%{_bindir}/bipmkpw
%{_mandir}/man1/bip.1.gz
%{_mandir}/man5/bip.conf.5.gz
+%config(noreplace) %{_sysconfdir}/bip.conf
+%{_initrddir}/bip
+%attr(-,bip,bip) %dir %{_localstatedir}/run/bip
+%attr(-,bip,bip) %dir %{_localstatedir}/log/bip
%changelog
-* Sun Nov 16 2008 Lorenzo Villani <lvillani at binaryhelix.net> - 0.7.5-1
+* Sat Nov 29 2008 Lorenzo Villani <lvillani at binaryhelix.net> - 0.7.5-1
- 0.7.5
+- Added support for running bip as system daemon
+ (patches from Tom Hughes, thanks! - BugID: 471791)
* Tue Jun 08 2008 Lorenzo Villani <lvillani at binaryhelix.net> - 0.7.4-1
- New version
- Previous message (by thread): rpms/bip/EL-5 bip-conf.patch, NONE, 1.1 bip.init, NONE, 1.1 bip.logrotate, NONE, 1.1 bip.spec, 1.5, 1.6
- Next message (by thread): rpms/bip/F-9 bip-conf.patch, NONE, 1.1 bip.init, NONE, 1.1 bip.logrotate, NONE, 1.1 bip.spec, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list