Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b17407dcb5baac948b9bce5af4fbb8f8908e2869)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b17407dcb5baac948b9bce5af4fbb8f8908e2869)
  • Date: Sun, 15 May 2011 00:35:35 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

ChangeLog | 9 ++++-
chat-irc/ircd-ratbox/BUILD | 18 ++++++++++
chat-irc/ircd-ratbox/CONFIGURE | 19 +++++++++++
chat-irc/ircd-ratbox/CONFLICTS | 1
chat-irc/ircd-ratbox/DEPENDS | 21 ++++++++++++
chat-irc/ircd-ratbox/DETAILS | 27 ++++++++++++++++
chat-irc/ircd-ratbox/HISTORY | 3 +
chat-irc/ircd-ratbox/INSTALL | 3 +
chat-irc/ircd-ratbox/PREPARE | 3 +
chat-irc/ircd-ratbox/PRE_BUILD | 19 +++++++++++
chat-irc/ircd-ratbox/init.d/ratbox | 8 ++++
chat-irc/ircd-ratbox/libltdl.patch | 56
+++++++++++++++++++++++++++++++++
chat-irc/ircd-ratbox/rundir.patch | 38 ++++++++++++++++++++++
chat-irc/ircd-ratbox/setuid-2.patch | 55 ++++++++++++++++++++++++++++++++
chat-irc/ircd-ratbox/setuid-3.patch | 55 ++++++++++++++++++++++++++++++++
chat-irc/ratbox-services/BUILD | 14 ++++++++
chat-irc/ratbox-services/CONFIGURE | 57
++++++++++++++++++++++++++++++++++
chat-irc/ratbox-services/DEPENDS | 15 ++++++++
chat-irc/ratbox-services/DETAILS | 27 ++++++++++++++++
chat-irc/ratbox-services/HISTORY | 3 +
chat-irc/ratbox-services/INSTALL | 3 +
chat-irc/ratbox-services/PRE_BUILD | 4 ++
chat-irc/ratbox-services/init.d/rserv | 8 ++++
chat-irc/ratbox-services/setuid.patch | 47 ++++++++++++++++++++++++++++
chat-irc/ratbox.gpg |binary
25 files changed, 512 insertions(+), 1 deletion(-)

New commits:
commit b17407dcb5baac948b9bce5af4fbb8f8908e2869
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

ratbox-services: new spell, IRC services package written for use with
ircd-ratbox

commit c0a8f8ceda52d5b64456a0a65a88b9dadfa52301
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

ircd-ratbox: new spell, advanced, stable and fast irc server

commit 3baade1616401471c791694ea6d8d1ddfeac50f2
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

chat-irc/ratbox.gpg: added two gpg keys

diff --git a/ChangeLog b/ChangeLog
index a523e22..964d544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,15 @@
+2011-05-15 Vlad Glagolev <stealth AT sourcemage.org>
+ * chat-irc/ratbox.gpg: added 2 keys -- EBB5FC91 (Aaron Sethman
+ <androsyn AT ratbox.org>), 1AA088AC (Lee Hardy <lee AT leeh.co.uk>)
+ * chat-irc/ircd-ratbox: new spell, advanced, stable and fast irc
server
+ * chat-irc/ratbox-services: new spell, IRC services package written
for
+ use with ircd-ratbox
+
2011-05-13 Ladislav Hagara <hgr AT vabo.cz>
* x11/psensor: new spell, application for monitoring hardware sensors

2011-05-12 David Kowis <dkowis AT shlrm.org>
- * ruby-raa/ruby-enterprise-edition: new spell, Ruby Enterprise Edition
+ * ruby-raa/ruby-enterprise-edition: new spell, Ruby Enterprise Edition

2011-05-12 Jeremy Blosser <jblosser-smgl AT firinn.org>
* security/snoopy: new spell, log all execve() calls to syslog
diff --git a/chat-irc/ircd-ratbox/BUILD b/chat-irc/ircd-ratbox/BUILD
new file mode 100755
index 0000000..c5f6b48
--- /dev/null
+++ b/chat-irc/ircd-ratbox/BUILD
@@ -0,0 +1,18 @@
+create_account ratbox &&
+
+OPTS="--with-confdir=$INSTALL_ROOT/etc/$SPELL \
+ --with-rundir=$INSTALL_ROOT/var/run/ircd \
+ --with-logdir=$INSTALL_ROOT/var/log/$SPELL \
+ --with-helpdir=$INSTALL_ROOT/usr/share/$SPELL/help \
+ --with-moduledir=$INSTALL_ROOT/usr/lib/$SPELL/modules \
+ --with-nicklen=$IRCD_RATBOX_NICKLEN \
+ $IRCD_RATBOX_OPTS \
+ $OPTS" &&
+
+if [[ $IRCD_RATBOX_RELEASE == stable ]]; then
+ OPTS="--with-topiclen=$IRCD_RATBOX_TOPICLEN $OPTS"
+fi &&
+
+make_single &&
+default_build &&
+make_normal
diff --git a/chat-irc/ircd-ratbox/CONFIGURE b/chat-irc/ircd-ratbox/CONFIGURE
new file mode 100755
index 0000000..b248386
--- /dev/null
+++ b/chat-irc/ircd-ratbox/CONFIGURE
@@ -0,0 +1,19 @@
+config_query_option IRCD_RATBOX_OPTS "Enable IPv6 support?" y \
+ "--enable-ipv6" \
+ "--disable-ipv6" &&
+
+config_query_option IRCD_RATBOX_OPTS "Enable ratbox-services compatibility
code?" y \
+ "--enable-services" \
+ "--disable-services" &&
+
+config_query_option IRCD_RATBOX_OPTS "Enable small network optimizations?" n
\
+ "--enable-small-net" \
+ "--disable-small-net" &&
+
+config_query_string IRCD_RATBOX_NICKLEN "Set the nick length (max 50):" \
+ 9 &&
+
+if [[ $IRCD_RATBOX_RELEASE == stable ]]; then
+ config_query_string IRCD_RATBOX_TOPICLEN "Set the max topic length (max
390):" \
+ 160
+fi
diff --git a/chat-irc/ircd-ratbox/CONFLICTS b/chat-irc/ircd-ratbox/CONFLICTS
new file mode 100755
index 0000000..ebf8832
--- /dev/null
+++ b/chat-irc/ircd-ratbox/CONFLICTS
@@ -0,0 +1 @@
+conflicts ircd-hybrid
diff --git a/chat-irc/ircd-ratbox/DEPENDS b/chat-irc/ircd-ratbox/DEPENDS
new file mode 100755
index 0000000..569ce55
--- /dev/null
+++ b/chat-irc/ircd-ratbox/DEPENDS
@@ -0,0 +1,21 @@
+depends libtool &&
+
+optional_depends zlib \
+ "--enable-zlib" \
+ "--disable-zlib" \
+ "for ziplinks support" &&
+
+optional_depends openssl \
+ "--enable-openssl" \
+ "--disable-openssl" \
+ "for OpenSSL support" &&
+
+if [[ $IRCD_RATBOX_RELEASE == testing ]]; then
+ optional_depends sqlite \
+ "--with-sqlite3=$INSTALL_ROOT/usr" "" \
+ "to use system SQLite3 library"
+fi &&
+
+if list_find "$IRCD_RATBOX_OPTS" "--enable-services"; then
+ suggest_depends ratbox-services "" "" "to install native services package"
+fi
diff --git a/chat-irc/ircd-ratbox/DETAILS b/chat-irc/ircd-ratbox/DETAILS
new file mode 100755
index 0000000..cefab9e
--- /dev/null
+++ b/chat-irc/ircd-ratbox/DETAILS
@@ -0,0 +1,27 @@
+ SPELL=ircd-ratbox
+if [[ $IRCD_RATBOX_RELEASE == testing ]]; then
+ VERSION=3.0.6
+ SOURCE=$SPELL-$VERSION.tar.bz2
+ SOURCE_URL[0]=http://www.ratbox.org/download/testing/$SOURCE
+ SOURCE_URL[1]=ftp://ftp.parodius.com/pub/$SPELL/testing/$SOURCE
+else
+ VERSION=2.2.9
+ SOURCE=$SPELL-$VERSION.tar.bz2
+ SOURCE_URL[0]=http://www.ratbox.org/download/$SOURCE
+ SOURCE_URL[1]=ftp://ftp.parodius.com/pub/$SPELL/$SOURCE
+fi
+ SOURCE2=$SOURCE.asc
+ SOURCE2_URL[0]=$SOURCE_URL.asc
+ SOURCE2_URL[1]=${SOURCE_URL[1]}.asc
+ SOURCE_GPG=ratbox.gpg:$SOURCE2:UPSTREAM_KEY
+ SOURCE2_IGNORE=signature
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ LICENSE[0]=GPL
+ WEB_SITE=http://www.ircd-ratbox.org/
+ ENTERED=20101125
+ KEYWORDS="irc chat"
+ SHORT="advanced, stable and fast irc server"
+cat << EOF
+ircd-hybrid is a powerful Internet Relay Chat daemon frequently used on the
+popular EFnet IRC Network.
+EOF
diff --git a/chat-irc/ircd-ratbox/HISTORY b/chat-irc/ircd-ratbox/HISTORY
new file mode 100644
index 0000000..9b4cdcd
--- /dev/null
+++ b/chat-irc/ircd-ratbox/HISTORY
@@ -0,0 +1,3 @@
+2010-11-25 Vlad Glagolev <stealth AT sourcemage.org>
+ * {PRE_,}BUILD, CONF{IGURE,LICTS}, DETAILS, DEPENDS, INSTALL, PREPARE,
+ init.d/ratbox, {libltdl,rundir,setuid-{2,3}}.patch: spell created
diff --git a/chat-irc/ircd-ratbox/INSTALL b/chat-irc/ircd-ratbox/INSTALL
new file mode 100755
index 0000000..611453a
--- /dev/null
+++ b/chat-irc/ircd-ratbox/INSTALL
@@ -0,0 +1,3 @@
+default_install &&
+
+install -d -o ratbox -g ratbox -vm 755 "$INSTALL_ROOT/var/run/ircd"
diff --git a/chat-irc/ircd-ratbox/PREPARE b/chat-irc/ircd-ratbox/PREPARE
new file mode 100755
index 0000000..047d274
--- /dev/null
+++ b/chat-irc/ircd-ratbox/PREPARE
@@ -0,0 +1,3 @@
+config_query_list IRCD_RATBOX_RELEASE "Select which release to build:" \
+ stable \
+ testing
diff --git a/chat-irc/ircd-ratbox/PRE_BUILD b/chat-irc/ircd-ratbox/PRE_BUILD
new file mode 100755
index 0000000..0a2ca98
--- /dev/null
+++ b/chat-irc/ircd-ratbox/PRE_BUILD
@@ -0,0 +1,19 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/rundir.patch" &&
+
+if [[ $IRCD_RATBOX_RELEASE == testing ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/setuid-3.patch"
+else
+ patch -p0 < "$SPELL_DIRECTORY/setuid-2.patch"
+fi &&
+
+if [[ $IRCD_RATBOX_RELEASE == testing ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/libltdl.patch"
+fi &&
+
+autoreconf -i &&
+
+# post-reconfiguration replace
+sed -i "s:@LIBLTDL@:-L@libdir@ -lltdl:" Makefile.in src/Makefile.in
diff --git a/chat-irc/ircd-ratbox/init.d/ratbox
b/chat-irc/ircd-ratbox/init.d/ratbox
new file mode 100755
index 0000000..7e19fa4
--- /dev/null
+++ b/chat-irc/ircd-ratbox/init.d/ratbox
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/ircd
+PIDFILE=/var/run/ircd/ircd.pid
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/chat-irc/ircd-ratbox/libltdl.patch
b/chat-irc/ircd-ratbox/libltdl.patch
new file mode 100644
index 0000000..6f1fa16
--- /dev/null
+++ b/chat-irc/ircd-ratbox/libltdl.patch
@@ -0,0 +1,56 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -102,7 +102,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=
+ distdir dist dist-all distcheck
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = libratbox libltdl src modules tools doc help bandb ssld \
++DIST_SUBDIRS = libratbox src modules tools doc help bandb ssld \
+ resolver
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ distdir = $(PACKAGE)-$(VERSION)
+@@ -295,10 +295,10 @@ servicesdir = @moduledir@/autoload
+ AM_CFLAGS = $(WARNFLAGS)
+ ircd_SOURCES = main.c
+ @MINGW_TRUE@EXTRA_FLAGS = -no-undefined -Wl,--enable-runtime-pseudo-reloc
-export-symbols-regex '*'
+-@STATIC_MODULES_FALSE@SUBDIRS = libratbox libltdl src modules tools doc
help bandb ssld resolver
+-@STATIC_MODULES_TRUE@SUBDIRS = libratbox libltdl modules src tools doc help
bandb ssld resolver
+-@STATIC_MODULES_FALSE@ircd_LDADD = libratbox/src/libratbox.la
src/libcore.la $(LIBLTDL)
+-@STATIC_MODULES_TRUE@ircd_LDADD = libratbox/src/libratbox.la
modules/libmodules.la src/libcore.la modules/static_modules.o $(LIBLTDL)
$(DLOPEN)
++@STATIC_MODULES_FALSE@SUBDIRS = libratbox src modules tools doc help bandb
ssld resolver
++@STATIC_MODULES_TRUE@SUBDIRS = libratbox modules src tools doc help bandb
ssld resolver
++@STATIC_MODULES_FALSE@ircd_LDADD = libratbox/src/libratbox.la src/libcore.la
++@STATIC_MODULES_TRUE@ircd_LDADD = libratbox/src/libratbox.la
modules/libmodules.la src/libcore.la modules/static_modules.o $(DLOPEN)
+ @STATIC_MODULES_FALSE@ircd_LDFLAGS = $(EXTRA_FLAGS) -dlopen self
+ all: all-recursive
+
+--- configure.ac.orig
++++ configure.ac
+@@ -109,7 +109,7 @@ done
+
+ LIBTOOL="$LIBTOOL --silent"
+
+-AC_CONFIG_SUBDIRS(libltdl libratbox)
++AC_CONFIG_SUBDIRS(libratbox)
+
+ case "$host_os" in
+ *cygwin*)
+--- Makefile.am.orig
++++ Makefile.am
+@@ -24,14 +24,14 @@
+
+ if !STATIC_MODULES
+
+-SUBDIRS = libratbox libltdl src modules tools doc help bandb ssld resolver
++SUBDIRS = libratbox src modules tools doc help bandb ssld resolver
+
+ ircd_LDADD = libratbox/src/libratbox.la src/libcore.la $(LIBLTDL)
+ ircd_LDFLAGS = $(EXTRA_FLAGS) -dlopen self
+
+ else
+
+-SUBDIRS = libratbox libltdl modules src tools doc help bandb ssld resolver
++SUBDIRS = libratbox modules src tools doc help bandb ssld resolver
+ ircd_LDADD = libratbox/src/libratbox.la modules/libmodules.la
src/libcore.la modules/static_modules.o $(LIBLTDL) $(DLOPEN)
+
+
diff --git a/chat-irc/ircd-ratbox/rundir.patch
b/chat-irc/ircd-ratbox/rundir.patch
new file mode 100644
index 0000000..3978c38
--- /dev/null
+++ b/chat-irc/ircd-ratbox/rundir.patch
@@ -0,0 +1,38 @@
+--- configure.ac.orig
++++ configure.ac
+@@ -383,6 +383,24 @@ AC_HELP_STRING([--with-logdir=DIR],
+ AC_MSG_RESULT(no)
+ AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write
logfiles.])
+ AC_SUBST_DIR([logdir])]
++)
++
++dnl **********************************************************************
++dnl Check for --with-rundir
++dnl **********************************************************************
++
++AC_MSG_CHECKING([whether to modify rundir])
++AC_ARG_WITH(rundir,
++AC_HELP_STRING([--with-rundir=DIR],
++ [Directory where to write runtime files.]),
++ [ rundir=`echo $withval | sed 's/\/$//'`
++ AC_MSG_RESULT(yes)
++ AC_DEFINE_DIR(RUN_DIR, rundir, [Prefix where to write
runtime files.])
++ AC_SUBST_DIR([rundir]) ],
++ [ rundir='${localstatedir}/run'
++ AC_MSG_RESULT(no)
++ AC_DEFINE_DIR(RUN_DIR, rundir, [Prefix where to write
runtime files.])
++ AC_SUBST_DIR([rundir])]
+ )
+
+ dnl **********************************************************************
+--- include/config.h.orig
++++ include/config.h
+@@ -61,7 +66,7 @@
+ #define DBPATH ETCPATH "/ban.db"
+ #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
+ #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
+-#define PPATH ETCPATH "/ircd.pid" /* pid file */
++#define PPATH RUN_DIR "/ircd.pid" /* pid file */
+ #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
+
+ /* HANGONGOODLINK and HANGONGOODLINK
diff --git a/chat-irc/ircd-ratbox/setuid-2.patch
b/chat-irc/ircd-ratbox/setuid-2.patch
new file mode 100644
index 0000000..547d1e1
--- /dev/null
+++ b/chat-irc/ircd-ratbox/setuid-2.patch
@@ -0,0 +1,55 @@
+--- src/ircd.c.orig
++++ src/ircd.c
+@@ -242,7 +242,6 @@ make_daemon(void)
+ }
+ else if(pid > 0)
+ {
+- print_startup(pid);
+ exit(EXIT_SUCCESS);
+ }
+
+@@ -510,8 +511,17 @@
+ /* Check to see if the user is running us as root, which is a nono */
+ if(geteuid() == 0)
+ {
+- fprintf(stderr, "Don't run ircd as root!!!\n");
+- return -1;
++ struct passwd *pw;
++
++ if ((pw = getpwnam(IRCD_USER)) == NULL) {
++ fprintf(stderr, "Don't run ircd as root!!!\n");
++ exit(EXIT_FAILURE);
++ }
++
++ if (seteuid(pw->pw_uid) < 0) {
++ fprintf(stderr, "Can's set effective user ID to
%s!\n", IRCD_USER);
++ exit(EXIT_FAILURE);
++ }
+ }
+
+ /*
+--- include/stdinc.h.orig
++++ include/stdinc.h
+@@ -85,6 +85,8 @@ char *alloca();
+ #include <stdarg.h>
+ #include <signal.h>
+ #include <ctype.h>
++#include <unistd.h>
++#include <pwd.h>
+
+ #include <limits.h>
+
+--- include/config.h.orig
++++ include/config.h
+@@ -45,6 +45,11 @@
+ * AUTOMODPATH = directory for autoloaded modules
+ */
+
++/* users */
++#ifndef IRCD_USER
++#define IRCD_USER "ratbox"
++#endif
++
+ /* dirs */
+ #define DPATH IRCD_PREFIX
+ #define BINPATH IRCD_PREFIX "/bin/"
diff --git a/chat-irc/ircd-ratbox/setuid-3.patch
b/chat-irc/ircd-ratbox/setuid-3.patch
new file mode 100644
index 0000000..af1f6f2
--- /dev/null
+++ b/chat-irc/ircd-ratbox/setuid-3.patch
@@ -0,0 +1,55 @@
+--- src/ircd.c.orig
++++ src/ircd.c
+@@ -242,7 +242,6 @@ make_daemon(void)
+ }
+ else if(pid > 0)
+ {
+- print_startup(pid);
+ exit(EXIT_SUCCESS);
+ }
+
+@@ -535,8 +534,17 @@ ratbox_main(int argc, char *argv[])
+ #ifndef _WIN32
+ if(geteuid() == 0)
+ {
+- fprintf(stderr, "Don't run ircd as root!!!\n");
+- exit(EXIT_FAILURE);
++ struct passwd *pw;
++
++ if ((pw = getpwnam(IRCD_USER)) == NULL) {
++ fprintf(stderr, "Don't run ircd as root!!!\n");
++ exit(EXIT_FAILURE);
++ }
++
++ if (seteuid(pw->pw_uid) < 0) {
++ fprintf(stderr, "Can's set effective user ID to
%s!\n", IRCD_USER);
++ exit(EXIT_FAILURE);
++ }
+ }
+ #endif
+ init_sys();
+--- include/stdinc.h.orig
++++ include/stdinc.h
+@@ -85,6 +85,8 @@ char *alloca();
+ #include <stdarg.h>
+ #include <signal.h>
+ #include <ctype.h>
++#include <unistd.h>
++#include <pwd.h>
+
+ #include <limits.h>
+
+--- include/config.h.orig
++++ include/config.h
+@@ -45,6 +45,11 @@
+ * AUTOMODPATH = directory for autoloaded modules
+ */
+
++/* users */
++#ifndef IRCD_USER
++#define IRCD_USER "ratbox"
++#endif
++
+ /* dirs */
+ #define DPATH IRCD_PREFIX
+ #define BINPATH IRCD_PREFIX "/bin/"
diff --git a/chat-irc/ratbox-services/BUILD b/chat-irc/ratbox-services/BUILD
new file mode 100755
index 0000000..019b089
--- /dev/null
+++ b/chat-irc/ratbox-services/BUILD
@@ -0,0 +1,14 @@
+create_account ratbox &&
+
+OPTS="--sysconfdir=$INSTALL_ROOT/etc/ircd-ratbox \
+ --with-rundir=$INSTALL_ROOT/var/run/rserv \
+ --with-logdir=$INSTALL_ROOT/var/log/ircd-ratbox \
+ --with-nicklen=$RSERV_NICKLEN \
+ --with-topiclen=$RSERV_TOPICLEN \
+ --with-userreglen=$RSERV_USERREGLEN \
+ $RSERV_OPTS \
+ $OPTS" &&
+
+make_single &&
+default_build &&
+make_normal
diff --git a/chat-irc/ratbox-services/CONFIGURE
b/chat-irc/ratbox-services/CONFIGURE
new file mode 100755
index 0000000..80441c8
--- /dev/null
+++ b/chat-irc/ratbox-services/CONFIGURE
@@ -0,0 +1,57 @@
+config_query_list RSERV_DBB "Select database backend:" \
+ sqlite \
+ mysql \
+ postgresql &&
+
+config_query_option RSERV_OPTS "Enable nickname service?" y \
+ "--enable-nickserv" \
+ "--disable-nickserv" &&
+
+config_query_option RSERV_OPTS "Enable channel service?" y \
+ "--enable-chanserv" \
+ "--disable-chanserv" &&
+
+config_query_option RSERV_OPTS "Enable user service?" y \
+ "--enable-userserv" \
+ "--disable-userserv" &&
+
+config_query_option RSERV_OPTS "Enable memo service?" y \
+ "--enable-memoserv" \
+ "--disable-memoserv" &&
+
+config_query_option RSERV_OPTS "Enable oper service?" y \
+ "--enable-operserv" \
+ "--disable-operserv" &&
+
+config_query_option RSERV_OPTS "Enable list service?" y \
+ "--enable-alis" \
+ "--disable-alis" &&
+
+config_query_option RSERV_OPTS "Enable jupe service?" y \
+ "--enable-jupeserv" \
+ "--disable-jupeserv" &&
+
+config_query_option RSERV_OPTS "Enable operbot service?" y \
+ "--enable-operbot" \
+ "--disable-operbot" &&
+
+config_query_option RSERV_OPTS "Enable global messaging service?" y \
+ "--enable-global" \
+ "--disable-global" &&
+
+config_query_option RSERV_OPTS "Enable ban service?" y \
+ "--enable-banserv" \
+ "--disable-banserv" &&
+
+config_query_option RSERV_OPTS "Enable command watching service?" y \
+ "--enable-watchserv" \
+ "--disable-watchserv" &&
+
+config_query_string RSERV_NICKLEN "Set nick length:" \
+ 9 &&
+
+config_query_string RSERV_TOPICLEN "Set topic length:" \
+ 160 &&
+
+config_query_string RSERV_USERREGLEN "Set registered username length:" \
+ 10
diff --git a/chat-irc/ratbox-services/DEPENDS
b/chat-irc/ratbox-services/DEPENDS
new file mode 100755
index 0000000..01a0c84
--- /dev/null
+++ b/chat-irc/ratbox-services/DEPENDS
@@ -0,0 +1,15 @@
+optional_depends pcre \
+ "--enable-pcre" \
+ "--with-pcrebuild" \
+ "to use system PCRE library" &&
+
+if [[ $RSERV_DBB == postgresql ]]; then
+ depends postgresql '--enable-pgsql'
+elif [[ $RSERV_DBB == mysql ]]; then
+ depends MYSQL '--enable-mysql'
+else
+ optional_depends sqlite \
+ "--enable-sqlite3" \
+ "--with-sqlitebuild" \
+ "to use system SQLite library"
+fi
diff --git a/chat-irc/ratbox-services/DETAILS
b/chat-irc/ratbox-services/DETAILS
new file mode 100755
index 0000000..fbf054e
--- /dev/null
+++ b/chat-irc/ratbox-services/DETAILS
@@ -0,0 +1,27 @@
+ SPELL=ratbox-services
+ VERSION=1.2.4
+ SOURCE=$SPELL-$VERSION.tgz
+ SOURCE2=$SOURCE.asc
+ SOURCE_URL[0]=http://services.ratbox.org/download/$SOURCE
+ SOURCE_URL[1]=ftp://ftp.parodius.com/pub/ircd-ratbox/$SPELL/$SOURCE
+ SOURCE2_URL[0]=$SOURCE_URL.asc
+ SOURCE2_URL[1]=${SOURCE_URL[1]}.asc
+ SOURCE_GPG=ratbox.gpg:$SOURCE2:UPSTREAM_KEY
+ SOURCE2_IGNORE=signature
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ LICENSE[0]=GPL
+ WEB_SITE=http://services.ratbox.org/
+ ENTERED=20110515
+ KEYWORDS="irc chat"
+ SHORT="IRC services package written for use with ircd-ratbox"
+cat << EOF
+ratbox-services is a services package written mostly from scratch for use
with
+ircd-ratbox.
+
+It is highly configurable, with nearly all options being set in a config that
+can be rehashed rather than set at compile time. It also uses the SQLite
+database backend, which works as a database interface to a normal file,
meaning
+no separate database software must be running.
+
+MySQL and PostgreSQL backends are also supported.
+EOF
diff --git a/chat-irc/ratbox-services/HISTORY
b/chat-irc/ratbox-services/HISTORY
new file mode 100644
index 0000000..2c3e166
--- /dev/null
+++ b/chat-irc/ratbox-services/HISTORY
@@ -0,0 +1,3 @@
+2011-05-15 Vlad Glagolev <stealth AT sourcemage.org>
+ * {PRE_,}BUILD, CONFIGURE, DETAILS, DEPENDS, INSTALL, init.d/rserv,
+ setuid.patch: spell created
diff --git a/chat-irc/ratbox-services/INSTALL
b/chat-irc/ratbox-services/INSTALL
new file mode 100755
index 0000000..93ea963
--- /dev/null
+++ b/chat-irc/ratbox-services/INSTALL
@@ -0,0 +1,3 @@
+default_install &&
+
+install -d -o ratbox -g ratbox -vm 755 "$INSTALL_ROOT/var/run/rserv"
diff --git a/chat-irc/ratbox-services/PRE_BUILD
b/chat-irc/ratbox-services/PRE_BUILD
new file mode 100755
index 0000000..3213094
--- /dev/null
+++ b/chat-irc/ratbox-services/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/setuid.patch"
diff --git a/chat-irc/ratbox-services/init.d/rserv
b/chat-irc/ratbox-services/init.d/rserv
new file mode 100755
index 0000000..3134d94
--- /dev/null
+++ b/chat-irc/ratbox-services/init.d/rserv
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ratbox-services
+PIDFILE=/var/run/rserv/ratbox-services.pid
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/chat-irc/ratbox-services/setuid.patch
b/chat-irc/ratbox-services/setuid.patch
new file mode 100644
index 0000000..31a9aaf
--- /dev/null
+++ b/chat-irc/ratbox-services/setuid.patch
@@ -0,0 +1,47 @@
+--- include/config.h.orig
++++ include/config.h
+@@ -1,6 +1,11 @@
+ #ifndef INCLUDED_config_h
+ #define INCLUDED_config_h
+
++/* users */
++#ifndef IRCD_USER
++#define IRCD_USER "ratbox"
++#endif
++
+ /* Paths to various things.
+ * IMPORTANT: if you alter the directories these files go to,
+ * you must create those paths yourself.
+--- include/stdinc.h.orig
++++ include/stdinc.h
+@@ -41,6 +41,8 @@
+ #include <string.h>
+ #include <strings.h>
+ #include <ctype.h>
++#include <unistd.h>
++#include <pwd.h>
+
+ #include <time.h>
+ #include <sys/time.h>
+--- src/rserv.c.orig
++++ src/rserv.c
+@@ -350,8 +350,17 @@
+
+ if(geteuid() == 0)
+ {
+- printf("ratbox-services will not run as root\n");
+- return -1;
++ struct passwd *pw;
++
++ if ((pw = getpwnam(IRCD_USER)) == NULL) {
++ printf("ratbox-services will not run as root\n");
++ return -1;
++ }
++
++ if (seteuid(pw->pw_uid) < 0) {
++ printf("Can's set effective user ID to %s\n",
IRCD_USER);
++ return -1;
++ }
+ }
+
+ if(chdir(PREFIX))
diff --git a/chat-irc/ratbox.gpg b/chat-irc/ratbox.gpg
new file mode 100644
index 0000000..9ff7aec
Binary files /dev/null and b/chat-irc/ratbox.gpg differ



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (b17407dcb5baac948b9bce5af4fbb8f8908e2869), Vlad Glagolev, 05/15/2011

Archive powered by MHonArc 2.6.24.

Top of Page