Date: 30 Jul 2000 18:05:03 -0000 From: Peter Pentchev <roam@orbitel.bg> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/20301: New port: irc/ircd-hybrid6 Message-ID: <20000730180503.8881.qmail@ringwraith.oblivion.bg>
next in thread | raw e-mail | index | archive | help
>Number: 20301 >Category: ports >Synopsis: New port: irc/ircd-hybrid6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jul 30 11:10:04 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Peter Pentchev <roam@orbitel.bg> >Release: FreeBSD 4.1-STABLE i386 >Organization: Orbitel JSCo. >Environment: Any version of FreeBSD above (and including) 2.2.x. >Description: This is a new port for the Hybrid IRC server used on EFnet. Although there already is an irc/ircd-hybrid port, it installs the 5.3 version of the Hybrid IRC server, considered 'stable'; this is a port of the development branch. Port changes (mostly taken from the irc/ircd-hybrid port): - adjust some array/buffer sizes for a smaller memory footprint; - create (if non-existent) an ircd/ircd user/group; - install an rc.d/ircd.sh start/stop script; - install ircd.conf as ircd.conf.sample, do not overwrite/remove a custom config file; - install mkpasswd as ircd-mkpasswd to avoid namespace pollution. And yes, I know portlint complains about an invalid version number of 'rc3'.. any suggestions? :) >How-To-Repeat: N/A >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ircd-hybrid6 # ircd-hybrid6/files # ircd-hybrid6/files/ircd.sh # ircd-hybrid6/files/md5 # ircd-hybrid6/Makefile # ircd-hybrid6/patches # ircd-hybrid6/patches/patch-aa # ircd-hybrid6/patches/patch-ab # ircd-hybrid6/patches/patch-ac # ircd-hybrid6/patches/patch-ad # ircd-hybrid6/patches/patch-ae # ircd-hybrid6/pkg # ircd-hybrid6/pkg/COMMENT # ircd-hybrid6/pkg/DESCR # ircd-hybrid6/pkg/INSTALL # ircd-hybrid6/pkg/PLIST # echo c - ircd-hybrid6 mkdir -p ircd-hybrid6 > /dev/null 2>&1 echo c - ircd-hybrid6/files mkdir -p ircd-hybrid6/files > /dev/null 2>&1 echo x - ircd-hybrid6/files/ircd.sh sed 's/^X//' >ircd-hybrid6/files/ircd.sh << 'END-of-ircd-hybrid6/files/ircd.sh' X#!/bin/sh X Xcase "$1" in Xstart) X [ -x /usr/local/sbin/ircd ] \ X && /usr/local/sbin/ircd >/dev/null 2>&1 \ X && echo -n " ircd" X ;; Xstop) X killall ircd && echo -n ' ircd' X ;; X*) X echo "Usage: `basename $0` {start|stop}" >&2 X exit 64 X ;; Xesac X Xexit 0 END-of-ircd-hybrid6/files/ircd.sh echo x - ircd-hybrid6/files/md5 sed 's/^X//' >ircd-hybrid6/files/md5 << 'END-of-ircd-hybrid6/files/md5' XMD5 (ircd-hybrid-6rc3.tgz) = dfc9405161f3c13d18ad6483be36fe3e END-of-ircd-hybrid6/files/md5 echo x - ircd-hybrid6/Makefile sed 's/^X//' >ircd-hybrid6/Makefile << 'END-of-ircd-hybrid6/Makefile' X# New ports collection makefile for: ircd-hybrid6 X# Date created: 30 July 2000 X# Whom: roam@orbitel.bg X# X# $FreeBSD$ X# X XPORTNAME= ircd-hybrid6 XPORTVERSION= rc3 XCATEGORIES= irc XMASTER_SITES= ftp://ftp.blackened.com/pub/irc/hybrid/.beta/xx9jjt/ XDISTNAME= ircd-hybrid-6rc3 XEXTRACT_SUFX= .tgz X XMAINTAINER= roam@orbitel.bg X XGNU_CONFIGURE= yes XIS_INTERACTIVE= yes X XMAN8= ircd.8 X Xpre-install: X @${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL X Xpost-install: X ${INSTALL_MAN} ${WRKSRC}/doc/ircd.8 ${MANPREFIX}/man/man8 X ${INSTALL_SCRIPT} ${FILESDIR}/ircd.sh ${PREFIX}/etc/rc.d X X.include <bsd.port.mk> END-of-ircd-hybrid6/Makefile echo c - ircd-hybrid6/patches mkdir -p ircd-hybrid6/patches > /dev/null 2>&1 echo x - ircd-hybrid6/patches/patch-aa sed 's/^X//' >ircd-hybrid6/patches/patch-aa << 'END-of-ircd-hybrid6/patches/patch-aa' X--- include/config.h Tue Jun 27 01:38:40 2000 X+++ include/config.h Sun Jul 30 20:09:19 2000 X@@ -52,7 +52,7 @@ X */ X X #define HARD_FDLIMIT_ 256 X-#define INIT_MAXCLIENTS 200 X+#define INIT_MAXCLIENTS 40 X X #if defined(__CYGWIN__) X #undef HARD_FDLIMIT_ X@@ -75,7 +75,7 @@ X * will be preallocated for the entire whowas array when ircd is started. X * You will want to crank this down if you are on a small net. X */ X-#define NICKNAMEHISTORYLENGTH 15000 X+#define NICKNAMEHISTORYLENGTH 5000 X X /* Don't change this... */ X #define HARD_FDLIMIT (HARD_FDLIMIT_ - 10) X@@ -107,8 +107,8 @@ X * X */ X X-#define DPATH "/usr/local/ircd/" X-#define SPATH "/usr/local/ircd/ircd" X+#define DPATH "/usr/local/etc/ircd/" X+#define SPATH "/usr/local/sbin/ircd" X #define CPATH "ircd.conf" X #define KPATH "kline.conf" X #define DLPATH "kline.conf" X@@ -160,8 +160,8 @@ X * X * These need to be defined if you want to use SYSLOG logging, too. X */ X-#define FNAME_USERLOG "/usr/local/ircd/users" /* */ X-#define FNAME_OPERLOG "/usr/local/ircd/opers" /* */ X+#undef FNAME_USERLOG X+#undef FNAME_OPERLOG X X /* RFC1035_ANAL X * Defining this causes ircd to reject hostnames with non-compliant chars. X@@ -174,7 +174,7 @@ X * will not be sent. If MAX_MULTI_MESSAGES is 1, then any PRIVMSG with a ',' in X * the target will be rejected X */ X-#define MAX_MULTI_MESSAGES 2 X+#define MAX_MULTI_MESSAGES 1 X X /* WARN_NO_NLINE X * Define this if you want ops to get noticed about "things" trying to X@@ -190,7 +190,7 @@ X * or if you wish to customize the messages, define this. X * Otherwise leave it undef'd for plain ole boring messages. X */ X-#undef CUSTOM_ERR X+#define CUSTOM_ERR X X /* FAILED_OPER_NOTICE - send a notice to all opers when someone X * tries to /oper and uses an incorrect password. X@@ -200,7 +200,7 @@ X /* SHOW_FAILED_OPER_ID - if FAILED_OPER_NOTICE is defined, also notify when X * a client fails to oper because of a identity mismatch (wrong host or nick) X */ X-#undef SHOW_FAILED_OPER_ID X+#define SHOW_FAILED_OPER_ID X X /* SHOW_FAILED_OPER_PASSWD - if FAILED_OPER_NOTICE is defined, also show the X * attempted passwd X@@ -260,7 +260,7 @@ X * from harassing the IRCops. X * However, the client will still see the real reason upon connect attempts. X */ X-#define KLINE_WITH_CONNECTION_CLOSED X+#undef KLINE_WITH_CONNECTION_CLOSED X X /* NON_REDUNDANT_KLINES - If you want the server to flag and not apply X * redundant klines X@@ -333,7 +333,7 @@ X * LUSERS on your server. On a large net this doesnt mean much, but on a X * small net it might be an advantage to undefine it. X */ X-#define SHOW_INVISIBLE_LUSERS X+#undef SHOW_INVISIBLE_LUSERS X X #define ZIP_LINKS /* compress server-to-server links */ X X@@ -400,7 +400,7 @@ X * security problem - they can use the "-f" option to read any files X * that the 'new' access lets them. X */ X-#define CMDLINE_CONFIG X+#undef CMDLINE_CONFIG X X /* INIT_LOG_LEVEL - what level of information is logged to ircd.log X * options are: X@@ -422,7 +422,11 @@ X * this option is used unless you tell the system administrator beforehand X * and obtain their permission to send messages to the system log files. X */ X-#define USE_SYSLOG X+#undef USE_SYSLOG X+ X+#if defined(__CYGWIN__) X+#undef USE_SYSLOG X+#endif X X #ifdef USE_SYSLOG X /* SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER X@@ -468,7 +472,7 @@ X /* MAXSENDQLENGTH - Max amount of internal send buffering X * Max amount of internal send buffering when socket is stuck (bytes) X */ X-#define MAXSENDQLENGTH 7050000 /* Recommended value: 7050000 for efnet */ X+#define MAXSENDQLENGTH 70500 /* Recommended value: 7050000 for efnet */ X X /* BUFFERPOOL - the maximum size of the total of all sendq's. X * Recommended value is 4 times MAXSENDQLENGTH. X@@ -480,8 +484,8 @@ X * define IRC_UID to that UID. This should only be defined if you are running X * as root and even then perhaps not. X */ X-#define IRC_UID 1001 X-#define IRC_GID 31 X+#define IRC_UID 72 X+#define IRC_GID 72 X X /* CLIENT_FLOOD - client excess flood threshold X * this controls the number of bytes the server will allow a client to X@@ -558,7 +562,7 @@ X * number of users seen on net > SPLIT_SMALLNET_USER_SIZE start X * counting down the SERVER_SPLIT_RECOVERY_TIME X */ X-#define SPLIT_SMALLNET_USER_SIZE 10000 X+#define SPLIT_SMALLNET_USER_SIZE 10 X X /* X * SPLIT_PONG will send a PING to a server after the connect burst. X@@ -619,7 +623,7 @@ X * client was compiled with QUIT_ON_OPERATOR_KILL which was mandatory policy X * on UMich.Edu hosts. X */ X-#define SEND_FAKE_KILL_TO_CLIENT X+#undef SEND_FAKE_KILL_TO_CLIENT X X /* X * Limited Trace - Reports only link and oper traces even when O:line is X@@ -664,7 +668,7 @@ X X /* INITIAL_DBUFS - how many dbufs to preallocate X */ X-#define INITIAL_DBUFS 1000 /* preallocate 4 megs of dbufs */ X+#define INITIAL_DBUFS 100 /* preallocate 4 megs of dbufs */ X X /* MAXBUFFERS - increase socket buffers X * X@@ -788,7 +792,7 @@ X /* JUPE_CHANNEL - jupes a channel from being joined on this server only X * if added to Q lines e.g. Q:\#packet_channel:Tired of packets X */ X-#undef JUPE_CHANNEL X+#define JUPE_CHANNEL X X /* X * ANTI_SPAMBOT X@@ -897,7 +901,7 @@ X * viconf option, if USE_RCS is defined, viconf will use rcs "ci" X * to keep the conf file under RCS control. X */ X-#define USE_RCS X+#undef USE_RCS X X /* ----------------- not approved on EFnet section -------------------- */ X /* GLINES - global Kline-like bans END-of-ircd-hybrid6/patches/patch-aa echo x - ircd-hybrid6/patches/patch-ab sed 's/^X//' >ircd-hybrid6/patches/patch-ab << 'END-of-ircd-hybrid6/patches/patch-ab' X--- include/ircd_defs.h Thu Jul 22 09:33:26 1999 X+++ include/ircd_defs.h Mon Jul 24 20:38:18 2000 X@@ -41,17 +41,17 @@ X * servers --msa X */ X #define USERLEN 10 X-#define REALLEN 50 X-#define TOPICLEN 120 /* old value 90, truncated on other servers */ X-#define KILLLEN 90 X+#define REALLEN 80 X+#define TOPICLEN 250 /* old value 90, truncated on other servers */ X+#define KILLLEN 250 X #define CHANNELLEN 200 X #define KEYLEN 23 X #define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ X #define MAXRECIPIENTS 20 X-#define MAXBANS 25 /* bans + exceptions together */ X+#define MAXBANS 50 /* bans + exceptions together */ X #define MAXBANLENGTH 1024 X X-#define OPERWALL_LEN 400 /* can be truncated on other servers */ X+#define OPERWALL_LEN 512 /* can be truncated on other servers */ X X #define USERHOST_REPLYLEN (NICKLEN+HOSTLEN+USERLEN+5) X #define MAX_DATE_STRING 32 /* maximum string length for a date string */ END-of-ircd-hybrid6/patches/patch-ab echo x - ircd-hybrid6/patches/patch-ac sed 's/^X//' >ircd-hybrid6/patches/patch-ac << 'END-of-ircd-hybrid6/patches/patch-ac' X--- src/list.c Tue Aug 10 05:46:24 1999 X+++ src/list.c Mon Jul 24 20:39:00 2000 X@@ -53,7 +53,7 @@ X for smaller nets who knows? -Dianora X */ X X-#define LINK_PREALLOCATE 1024 X+#define LINK_PREALLOCATE 64 X X /* Number of aClient structures to preallocate at a time X for Efnet 1024 is reasonable X@@ -64,7 +64,7 @@ X rather than 30k times -Dianora X */ X X-#define USERS_PREALLOCATE 1024 X+#define USERS_PREALLOCATE 32 X X void outofmemory(); X END-of-ircd-hybrid6/patches/patch-ac echo x - ircd-hybrid6/patches/patch-ad sed 's/^X//' >ircd-hybrid6/patches/patch-ad << 'END-of-ircd-hybrid6/patches/patch-ad' X--- tools/Makefile.in Thu Jun 22 08:40:55 2000 X+++ tools/Makefile.in Sun Jul 30 20:09:21 2000 X@@ -12,12 +12,12 @@ X X all_OBJECTS = $(viconf_OBJECTS) $(mkpasswd_OBJECTS) $(fixklines_OBJECTS) X X-all: viconf mkpasswd fixklines X+all: viconf ircd-mkpasswd fixklines X X build: all X X-mkpasswd: $(mkpasswd_OBJECTS) X- $(CC) $(LDFLAGS) -o mkpasswd $(mkpasswd_OBJECTS) $(IRCDLIBS) X+ircd-mkpasswd: $(mkpasswd_OBJECTS) X+ $(CC) $(LDFLAGS) -o ircd-mkpasswd $(mkpasswd_OBJECTS) $(IRCDLIBS) X X viconf: $(viconf_OBJECTS) X $(CC) $(LDFLAGS) -o viconf $(viconf_OBJECTS) $(IRCDLIBS) X@@ -26,7 +26,7 @@ X $(CC) $(LDFLAGS) -o fixklines $(fixklines_OBJECTS) $(IRCDLIBS) X X clean: X- $(RM) -f $(all_OBJECTS) fixklines viconf chkconf mkpasswd *~ core *.exe X+ $(RM) -f $(all_OBJECTS) fixklines viconf chkconf ircd-mkpasswd *~ core *.exe X X distclean: clean X $(RM) -f Makefile END-of-ircd-hybrid6/patches/patch-ad echo x - ircd-hybrid6/patches/patch-ae sed 's/^X//' >ircd-hybrid6/patches/patch-ae << 'END-of-ircd-hybrid6/patches/patch-ae' X--- tools/install_ircd Thu Jun 22 09:33:11 2000 X+++ tools/install_ircd Sun Jul 30 20:09:21 2000 X@@ -66,6 +66,9 @@ X X # Let's make sure $DPATH exists X dir_make ${DPATH} X+# ..and make sure ircd can write there - at least for ircd.log X+chown ircd ${DPATH} X+chgrp ircd ${DPATH} X X if [ -f src/ircd.exe ]; then X EXESUFFIX=".exe" X@@ -86,12 +89,14 @@ X $INSTALL_SH -c src/ircd${EXESUFFIX} ${SPATH}${EXESUFFIX}; X fi X X+# try to install their ircd.conf file, unless it already exists. X+# Install it as ircd.conf.sample, as per the FreeBSD Porters Handbook. X dir_make `dirname ${CPATH}` X-if [ ! -f ${CPATH} ]; then X- echo installing example.conf as ${CPATH} X- $INSTALL_SH -c doc/example.conf ${CPATH}; X+if [ ! -f ${CPATH}.sample ]; then X+ echo installing example.conf as ${CPATH}.sample X+ $INSTALL_SH -c doc/example.conf ${CPATH}.sample; X else X- echo You already have ${CPATH}.; X+ echo You already have ${CPATH}.sample.; X fi X X # try to install their motd file, unless it already exists. X@@ -124,15 +129,15 @@ X $INSTALL_SH -c opers.txt ${HPATH}; X fi X X-# install mkpasswd X-if [ ! -f ${DPATH}/mkpasswd ]; then X- echo installing mkpasswd as ${DPATH}/mkpasswd${EXESUFFIX} X- $INSTALL_SH -c tools/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX}; X-else X- echo installing mkpasswd as ${DPATH}/mkpasswd${EXESUFFIX} X- echo previous mkpasswd saved as mkpasswd${EXESUFFIX}.old X- mv ${DPATH}/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX}.old X- $INSTALL_SH -c tools/mkpasswd${EXESUFFIX} ${DPATH}/mkpasswd${EXESUFFIX}; X+# install mkpasswd as ircd-mkpasswd X+if [ ! -f ${DPATH}/ircd-mkpasswd ]; then X+ echo installing mkpasswd as ${DPATH}/ircd-mkpasswd${EXESUFFIX} X+ $INSTALL_SH -c tools/ircd-mkpasswd${EXESUFFIX} ${DPATH}/ircd-mkpasswd${EXESUFFIX}; X+else X+ echo installing mkpasswd as ${DPATH}/ircd-mkpasswd${EXESUFFIX} X+ echo previous mkpasswd saved as ircd-mkpasswd${EXESUFFIX}.old X+ mv ${DPATH}/ircd-mkpasswd${EXESUFFIX} ${DPATH}/ircd-mkpasswd${EXESUFFIX}.old X+ $INSTALL_SH -c tools/ircd-mkpasswd${EXESUFFIX} ${DPATH}/ircd-mkpasswd${EXESUFFIX}; X fi X X # install viconf END-of-ircd-hybrid6/patches/patch-ae echo c - ircd-hybrid6/pkg mkdir -p ircd-hybrid6/pkg > /dev/null 2>&1 echo x - ircd-hybrid6/pkg/COMMENT sed 's/^X//' >ircd-hybrid6/pkg/COMMENT << 'END-of-ircd-hybrid6/pkg/COMMENT' XThe EFnet IRC server, based on ircd-2.8.21, but with lots of add-ons END-of-ircd-hybrid6/pkg/COMMENT echo x - ircd-hybrid6/pkg/DESCR sed 's/^X//' >ircd-hybrid6/pkg/DESCR << 'END-of-ircd-hybrid6/pkg/DESCR' XIRC is a functional replacement for and improvement to talk(1). Talk Xis an old, primitive, atrocious, minimalist sort of keyboard/screen Xconversation tool, using a grotesque, machine-dependent protocol. XIRC does everything talk does, but with a better protocol, allowing Xmore than 2 users to talk at once, with access across the aggregate XInternet, and providing a whole raft of other useful features. X Xftp://ftp.blackened.com/pub/irc/hybrid/ X XPeter Pentchev <roam@orbitel.bg> END-of-ircd-hybrid6/pkg/DESCR echo x - ircd-hybrid6/pkg/INSTALL sed 's/^X//' >ircd-hybrid6/pkg/INSTALL << 'END-of-ircd-hybrid6/pkg/INSTALL' X#!/bin/sh X Xif [ "x$2" != "xPRE-INSTALL" ]; then X exit 0; Xfi X Xask() { X local question default answer X X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X Xif which -s pw ; then X : Xelse X cat <<EOF X XThis system looks like a pre-2.2 version of FreeBSD. I see that it Xis missing the "pw" utility. I need this utility. Please get them Xand install them, and try again. You can get the sources from: X X ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz X XEOF X X exit 1 Xfi X Xecho "" Xif pw groupshow ircd 2> /dev/null ; then X echo "You already have a group \"ircd\", so I will use it." Xelse X if pw usershow 72 2> /dev/null ; then X echo "You already have a uid \"72\". Please create a user \"ircd\"" X echo "with a default group of \"ircd\"." X exit 1 X fi X echo "You need a group \"ircd\"." X if which -s pw && yesno "Would you like me to create it" y; then X pw groupadd ircd -g 72 || exit X echo "Done." X else X echo "Please create it, and try again." X if ! pw usershow ircd 2> /dev/null ; then X echo "While you're at it, please create a user \"ircd\"" X echo 'too, with a default group of "ircd".' X fi X exit 1 X fi Xfi X Xif pw usershow ircd 2> /dev/null ; then X echo "You already have a user \"ircd\", so I will use it." Xelse X echo "You need a user \"ircd\"." X if which -s pw && yesno "Would you like me to create it" y; then X ifkk X pw useradd ircd -g ircd -u 72 -h - -d /nonexistent \ X -s /nonexistent -c "IRC Daemon" || exit X echo "Done." X else X echo "Please create it, and try again." X exit 1 X fi Xfi END-of-ircd-hybrid6/pkg/INSTALL echo x - ircd-hybrid6/pkg/PLIST sed 's/^X//' >ircd-hybrid6/pkg/PLIST << 'END-of-ircd-hybrid6/pkg/PLIST' Xsbin/ircd Xetc/rc.d/ircd.sh Xetc/ircd/ircd-mkpasswd Xetc/ircd/ircd.conf.sample Xetc/ircd/ircd.motd Xetc/ircd/kline.conf Xetc/ircd/opers.txt Xetc/ircd/viconf X@dirrm etc/ircd END-of-ircd-hybrid6/pkg/PLIST exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000730180503.8881.qmail>