From 7c1e38602c69ffc82d5f6411cfc460f9ebfce577 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Jul 2010 12:26:55 +0400 Subject: [PATCH] * update .gitignore * update uhub.spec for plugins system * update example plugins.conf * modify header RH init script --- .gitignore | 3 ++- doc/init.d.RedHat/etc/init.d/uhub | 14 +++++++------- doc/plugins.conf | 12 ++++++++++++ doc/uhub.conf | 2 ++ doc/uhub.spec | 16 +++++++++++----- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index fd1f9f6..ce801fa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ *.[oa] *.exe *.gch +*.so uhub-admin adcrush uhub - +revision.* diff --git a/doc/init.d.RedHat/etc/init.d/uhub b/doc/init.d.RedHat/etc/init.d/uhub index d263ab2..e5793b7 100755 --- a/doc/init.d.RedHat/etc/init.d/uhub +++ b/doc/init.d.RedHat/etc/init.d/uhub @@ -1,7 +1,7 @@ #!/bin/sh # # chkconfig: - 91 35 -# description: Starts and stops the Uhub ( http://www.extatic.org/uhub ) daemons on RHEL\CentOS \ +# description: Starts and stops the Uhub ( http://www.uhub.org ) daemons on RHEL\CentOS \ # used to provide p2p network services. # # pidfile: /var/run/uhub.pid @@ -69,12 +69,12 @@ reload() { } rhstatus() { - status uhub - RETVAL=$? - if [ $RETVAL -ne 0 ] ; then - return $RETVAL - fi -} + status uhub + RETVAL=$? + if [ $RETVAL -ne 0 ] ; then + return $RETVAL + fi +} case "$1" in diff --git a/doc/plugins.conf b/doc/plugins.conf index e69de29..6d5b85f 100644 --- a/doc/plugins.conf +++ b/doc/plugins.conf @@ -0,0 +1,12 @@ +# auth user +# file={path for DB file with user auth information} +plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db" + +# +plugin /var/lib/uhub/mod_logging.so + +# +# plugin /var/lib/uhub/mod_auth_simple.so + +# +# plugin /var/lib/uhub/mod_example.so diff --git a/doc/uhub.conf b/doc/uhub.conf index 12017a9..0c5a648 100644 --- a/doc/uhub.conf +++ b/doc/uhub.conf @@ -49,6 +49,8 @@ file_motd=/etc/uhub/motd.txt # Normally this message is sent to clients when write in chat !rules file_rules=/etc/uhub/rules.txt +# This file can contain a conf for plugin subsystem +file_plugins = /etc/uhub/plugins.conf # Slots/share/hubs limits limit_max_hubs_user = 0 diff --git a/doc/uhub.spec b/doc/uhub.spec index a72fd60..78786ef 100644 --- a/doc/uhub.spec +++ b/doc/uhub.spec @@ -1,13 +1,14 @@ Summary: High performance ADC p2p hub. Name: uhub -Version: 0.3.2 -Release: 3 +Version: 0.4.0 +Release: 1 License: GPLv3 Group: Networking/File transfer Source: uhub-%{version}.tar.gz URL: http://www.uhub.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRequires: sqlite-devel %description uhub is a high performance peer-to-peer hub for the ADC network. @@ -20,7 +21,7 @@ Key features: - Experimental SSL support (optional) - Advanced access control support - Easy configuration - +- plugin support %prep %setup -q -n %{name}-%{version} @@ -36,15 +37,17 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d mkdir -p $RPM_BUILD_ROOT/etc/sysconfig mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 +mkdir -p $RPM_BUILD_ROOT/var/lib/uhub install uhub $RPM_BUILD_ROOT/usr/bin/ > doc/motd.txt -install -m644 doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt $RPM_BUILD_ROOT/etc/uhub +install -m644 doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt doc/plugins.conf $RPM_BUILD_ROOT/etc/uhub install doc/init.d.RedHat/etc/init.d/uhub $RPM_BUILD_ROOT/etc/init.d install -m644 doc/init.d.RedHat/etc/sysconfig/uhub $RPM_BUILD_ROOT/etc/sysconfig/ install -m644 doc/init.d.RedHat/etc/logrotate.d/uhub $RPM_BUILD_ROOT/etc/logrotate.d/ /bin/gzip -9c doc/uhub.1 > doc/uhub.1.gz && install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1 +install -m644 mod_*.so $RPM_BUILD_ROOT/var/lib/uhub %files @@ -55,12 +58,13 @@ install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1 %config(noreplace) %{_sysconfdir}/uhub/users.conf %config(noreplace) %{_sysconfdir}/uhub/motd.txt %config(noreplace) %{_sysconfdir}/uhub/rules.txt +%config(noreplace) %{_sysconfdir}/uhub/plugins.conf %{_sysconfdir}/init.d/uhub %config(noreplace) %{_sysconfdir}/logrotate.d/uhub %config(noreplace) %{_sysconfdir}/sysconfig/uhub /usr/share/man/man1/uhub.1.gz %{_bindir}/uhub - +%{_libdir}/uhub/mod_*.so %clean rm -rf $RPM_BUILD_ROOT @@ -74,6 +78,8 @@ fi /usr/sbin/adduser -M -d /tmp -G nobody -s /sbin/nologin -c 'The Uhub ADC p2p hub Daemon' uhub >/dev/null 2>&1 ||: %changelog +* Tue Jun 26 2001 E_zombie +- add plugins.conf * Tue Jan 31 2010 E_zombie - change GROUP - chmod for files