[eggdrop] Upgrade to 1.6.20
Robert Scheck
robert at fedoraproject.org
Mon Dec 27 23:57:04 UTC 2010
commit 8553a98c874680a16bced2ba97559abd6a04ffbe
Author: Robert Scheck <robert at fedoraproject.org>
Date: Tue Dec 28 00:56:35 2010 +0100
Upgrade to 1.6.20
.gitignore | 2 +-
eggdrop-1.6.19-conf.patch | 12 -
eggdrop-1.6.19-ctcpfix.patch | 51 --
eggdrop-1.6.19-no_libdns.patch | 16 -
eggdrop-1.6.20-no_libdns.patch | 69 +++
...p0007.patch => eggdrop-1.6.20-suzi_sp0010.patch | 506 ++++----------------
eggdrop.spec | 64 ++--
sources | 2 +-
8 files changed, 207 insertions(+), 515 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index be03c91..56ac9fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-eggdrop1.6.19.tar.bz2
+eggdrop1.6.20.tar.bz2
diff --git a/eggdrop-1.6.20-no_libdns.patch b/eggdrop-1.6.20-no_libdns.patch
new file mode 100644
index 0000000..791c23e
--- /dev/null
+++ b/eggdrop-1.6.20-no_libdns.patch
@@ -0,0 +1,69 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for eggdrop >= 1.6.20,
+which makes the configure script looking for gethostbyname() in libc rather
+in libdns. The problem especially comes up, once bind-devel gets added into
+buildroot at the build system (#433111). In difference to the suggestion by
+Adam Tkac <atkac at redhat.com>, the configure script itself gets patched, as
+autoconf, as shipped with Red Hat Enterprise Linux 4 (including downstreams
+and derivates), is unfortunately too old since eggdrop >= 1.6.20.
+
+--- eggdrop1.6.20/aclocal.m4 2008-04-19 06:21:20.000000000 +0200
++++ eggdrop1.6.19/aclocal.m4.no_libdns 2008-04-22 19:59:44.000000000 +0200
+@@ -764,7 +764,7 @@
+ else
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(nsl, connect)
+- AC_CHECK_LIB(dns, gethostbyname)
++ AC_CHECK_LIB(c, gethostbyname)
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_LIB(m, tan, EGG_MATH_LIB="-lm")
+
+--- eggdrop1.6.20/configure 2010-07-24 03:16:46.000000000 +0200
++++ eggdrop1.6.20/configure.no_libdns 2010-12-28 00:41:46.108939946 +0100
+@@ -4608,13 +4608,13 @@
+
+ fi
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -ldns" >&5
+-$as_echo_n "checking for gethostbyname in -ldns... " >&6; }
+-if test "${ac_cv_lib_dns_gethostbyname+set}" = set; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lc" >&5
++$as_echo_n "checking for gethostbyname in -lc... " >&6; }
++if test "${ac_cv_lib_c_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldns $LIBS"
++LIBS="-lc $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -4634,22 +4634,22 @@
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_dns_gethostbyname=yes
++ ac_cv_lib_c_gethostbyname=yes
+ else
+- ac_cv_lib_dns_gethostbyname=no
++ ac_cv_lib_c_gethostbyname=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dns_gethostbyname" >&5
+-$as_echo "$ac_cv_lib_dns_gethostbyname" >&6; }
+-if test "x$ac_cv_lib_dns_gethostbyname" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gethostbyname" >&5
++$as_echo "$ac_cv_lib_c_gethostbyname" >&6; }
++if test "x$ac_cv_lib_c_gethostbyname" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBDNS 1
++#define HAVE_LIBC 1
+ _ACEOF
+
+- LIBS="-ldns $LIBS"
++ LIBS="-lc $LIBS"
+
+ fi
+
diff --git a/eggdrop-1.6.18-suzi_sp0007.patch b/eggdrop-1.6.20-suzi_sp0010.patch
similarity index 61%
rename from eggdrop-1.6.18-suzi_sp0007.patch
rename to eggdrop-1.6.20-suzi_sp0010.patch
index 9d9e5a0..165f5a1 100644
--- a/eggdrop-1.6.18-suzi_sp0007.patch
+++ b/eggdrop-1.6.20-suzi_sp0010.patch
@@ -1,5 +1,5 @@
---- eggdrop1.6.18/UTF-8 1970-01-01 01:00:00.000000000 +0100
-+++ eggdrop1.6.18/UTF-8.suzi_sp0007 2008-02-10 20:57:30.000000000 +0100
+--- eggdrop1.6.20/SUZI 1970-01-01 01:00:00.000000000 +0100
++++ eggdrop1.6.20/SUZI.suzi_sp0010 2006-08-04 20:24:59.000000000 +0200
@@ -0,0 +1,237 @@
+ Eggdrop and non-latin characters.
+
@@ -238,276 +238,54 @@
+Author: Anastasia Zemina a.k.a. lynxy (WeNet irc.wenet.ru:6667, #eggtest), Suzi project team
+Thanks to: ZemIn, Buster, Yxaaaaaaa.
+URL: Forum (russian): http://xirc.ru/plugins/forum/forum_viewforum.php?15
---- eggdrop1.6.18/src/cmds.c 2006-03-28 06:35:49.000000000 +0400
-+++ eggdrop1.6.18/src/cmds.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -859,7 +859,7 @@
- return;
- }
- for (i = 0; i < strlen(newhand); i++)
-- if ((newhand[i] <= 32) || (newhand[i] >= 127) || (newhand[i] == '@'))
-+ if ((((unsigned char *)newhand)[i] <= 32) || (newhand[i] == '@'))
- newhand[i] = '?';
- if (strchr(BADHANDCHARS, newhand[0]) != NULL)
- dprintf(idx, "Bizarre quantum forces prevent nicknames from starting with "
-@@ -902,8 +902,9 @@
- dprintf(idx, "Usage: handle <new-handle>\n");
- return;
- }
-+
- for (i = 0; i < strlen(newhandle); i++)
-- if ((newhandle[i] <= 32) || (newhandle[i] >= 127) || (newhandle[i] == '@'))
-+ if ((((unsigned char *)newhandle)[i] <= 32) || (newhandle[i] == '@'))
- newhandle[i] = '?';
- if (strchr(BADHANDCHARS, newhandle[0]) != NULL)
- dprintf(idx,
---- eggdrop1.6.18/src/dcc.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/dcc.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -108,6 +108,10 @@
- /* response is: "hell yes!" */
- write(sock, "\r\nHell, yes!\r\n", 14);
- }
-+ if (*p == TLN_IAC) {
-+ *o++ = *p++;
-+ mark = 1;
-+ }
- /* Anything else can probably be ignored */
- p += mark - 1;
- *len = *len - mark;
-@@ -317,6 +321,9 @@
- struct userrec *u = get_user_by_handle(userlist, dcc[idx].nick);
- char *code;
-
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &x);
- code = newsplit(&buf);
- if (!egg_strcasecmp(code, "*hello!"))
-@@ -401,6 +408,9 @@
- char *msg;
- int f;
-
-+ if (((unsigned char) *code == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, code, &i);
- if (raw_log) {
- if (code[0] == 's')
-@@ -537,6 +547,9 @@
- {
- if (!atr)
- return;
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &atr);
- atr = dcc[idx].user ? dcc[idx].user->flags : 0;
-
-@@ -861,6 +874,7 @@
- int nathan = 0, doron = 0, fixed = 0;
- char *v, *d, filtbuf[2048];
-
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &i);
- if (buf[0] && (buf[0] != '.') &&
- detect_dcc_flood(&dcc[idx].timeval, dcc[idx].u.chat, idx))
-@@ -1319,6 +1333,9 @@
- int ok = 0;
- struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0 };
-
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &atr);
- buf[HANDLEN] = 0;
- /* Toss out bad nicknames */
-@@ -1521,6 +1538,9 @@
- char work[1024], *p, *q, *r;
-
- buf[HANDLEN] = 0;
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &x);
- dcc[idx].timeval = now;
- for (x = 0; x < strlen(buf); x++)
-@@ -1586,6 +1606,9 @@
- char *newpass;
- int ok;
-
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &x);
- buf[16] = 0;
- ok = 1;
-@@ -1714,6 +1737,9 @@
- {
- long oldsock;
-
-+ if (((unsigned char) *buf == TLN_IAC) && (dcc[idx].status & STAT_TELNET))
-+ dcc[idx].status |= STAT_STRIP_TELNET;
-+ if (dcc[idx].status & STAT_STRIP_TELNET)
- strip_telnet(dcc[idx].sock, buf, &len);
- if (!len)
- return;
---- eggdrop1.6.18/src/dccutil.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/dccutil.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -116,6 +116,23 @@
- return WBUF;
- }
-
-+/* fix code 255, Replace TLN_IAC to double TLN_IAC */
-+char *fix_TLN_IAC(char *buf)
-+{
-+ static unsigned char buftln[1024];
-+ unsigned char *src = (unsigned char *) buf, *dst;
-+ dst = buftln;
-+
-+ while (*src) {
-+ if ((*src == TLN_IAC) && (src[2] != '\01')){
-+ *dst++ = *src;
-+ }
-+ *dst++ = *src++;
-+ }
-+ *dst = 0;
-+ return buftln;
-+}
-+
- extern void (*qserver) (int, char *, int);
-
- void dprintf EGG_VARARGS_DEF(int, arg1)
-@@ -174,8 +191,15 @@
- char *p = add_cr(buf);
-
- tputs(dcc[idx].sock, p, strlen(p));
-- } else if (dcc[idx].type && dcc[idx].type->output)
-- dcc[idx].type->output(idx, buf, dcc[idx].u.other);
-+ } else if (dcc[idx].type && dcc[idx].type->output) {
-+
-+ /* fix code 255 - TLN_IAC */
-+ if (dcc[idx].status & STAT_STRIP_TELNET) {
-+ char *p = fix_TLN_IAC(buf);
-+ dcc[idx].type->output(idx, p, dcc[idx].u.other);
-+ } else
-+ dcc[idx].type->output(idx, buf, dcc[idx].u.other);
-+ }
- else
- tputs(dcc[idx].sock, buf, len);
- }
---- eggdrop1.6.18/src/eggdrop.h 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/eggdrop.h.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -471,6 +471,9 @@
- #define STAT_BOTONLY 0x00020 /* telnet on bots-only connect */
- #define STAT_USRONLY 0x00040 /* telnet on users-only connect */
- #define STAT_PAGE 0x00080 /* page output to the user */
-+#define STAT_STRIP_TELNET 0x00100 /* This connection supports managing *
-+ * codes of the protocol
-+ * a telnet - TLN_IAC */
-
- /* For stripping out mIRC codes. */
- #define STRIP_COLOR 0x00001 /* remove mIRC color codes */
---- eggdrop1.6.18/src/main.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/main.c.suzi_sp0007 2006-07-27 22:36:49.000000000 +0400
-@@ -129,6 +129,11 @@
- int resolve_timeout = 15; /* Hostname/address lookup timeout */
- char quit_msg[1024]; /* Quit message */
-
-+#ifdef USE_TCL_EVENTS
-+int max_tcl_events = 1;
-+#endif /* USE_TCL_EVENTS */
-+int select_timeout = 1000;
-+
- /* Traffic stats */
- unsigned long otraffic_irc = 0;
- unsigned long otraffic_irc_today = 0;
-@@ -935,8 +940,14 @@
- int socket_cleanup = 0;
-
- #ifdef USE_TCL_EVENTS
-- /* Process a single tcl event */
-- Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT);
-+ /* Process tcl events, but no more than max_tcl_events */
-+ {
-+ int i;
-+ for (i = 0; i < max_tcl_events; i ++) {
-+ if (!Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))
-+ break;
-+ }
-+ }
- #endif /* USE_TCL_EVENTS */
-
- /* Lets move some of this here, reducing the numer of actual
---- eggdrop1.6.18/src/mod/irc.mod/cmdsirc.c 2006-03-28 06:35:51.000000000 +0400
-+++ eggdrop1.6.18/src/mod/irc.mod/cmdsirc.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -1001,7 +1001,7 @@
- int ok = 1;
-
- for (p = par; *p; p++)
-- if ((*p <= 32) || (*p >= 127))
-+ if (*((unsigned char *)p) <= 32)
- ok = 0;
- if (!ok) {
- dprintf(idx, "You can't have strange characters in a nick.\n");
---- eggdrop1.6.18/src/mod/module.h 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/mod/module.h.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -479,6 +479,18 @@
- #define str_isdigit ((int (*) (const char *))global[292])
- #define remove_crlf ((void (*)(char **))global[293])
-
+--- eggdrop1.6.20/src/mod/module.h 2010-07-08 23:23:06.000000000 +0400
++++ eggdrop1.6.20/src/mod/module.h.suzi_sp0010 2010-07-24 16:10:56.000000000 +0400
+@@ -485,6 +485,15 @@
+ #define check_conflags ((int (*) (struct flag_record *, int))global[296])
+ #define increase_socks_max ((int (*)(void))global[297])
+ #define LOG_TS ((char *)(global[298]))
+#ifdef USE_TCL_BYTE_ARRAYS
-+#define Tcl_EggSetVar ((CONST char *(*) (Tcl_Interp *, CONST char *, CONST char *newValue, int))global[294])
-+#define Tcl_EggSetVar2 ((CONST char *(*) (Tcl_Interp *, CONST char *, CONST char *, CONST char *, int))global[295])
-+#define Tcl_EggAppendResult ((void (*) TCL_VARARGS_DEF(Tcl_Interp *,arg1))global[296])
-+#define Tcl_EggAppendElement ((void (*) (Tcl_Interp *, CONST char *))global[297])
-+
-+#define Tcl_EggEval ((int (*) (Tcl_Interp *interp, CONST char *script))global[298])
-+#define Tcl_EggGlobalEval ((int (*) (Tcl_Interp *interp, CONST char *script))global[299])
-+#define Tcl_EggNewStringObj ((Tcl_Obj *(*) (CONST char *bytes, int length))global[300])
-+
++#define Tcl_EggSetVar ((CONST char *(*) (Tcl_Interp *, CONST char *, CONST char *newValue, int))global[299])
++#define Tcl_EggSetVar2 ((CONST char *(*) (Tcl_Interp *, CONST char *, CONST char *, CONST char *, int))global[300])
++#define Tcl_EggAppendResult ((void (*) TCL_VARARGS_DEF(Tcl_Interp *,arg1))global[301])
++#define Tcl_EggAppendElement ((void (*) (Tcl_Interp *, CONST char *))global[302])
++#define Tcl_EggEval ((int (*) (Tcl_Interp *interp, CONST char *script))global[303])
++#define Tcl_EggGlobalEval ((int (*) (Tcl_Interp *interp, CONST char *script))global[304])
++#define Tcl_EggNewStringObj ((Tcl_Obj *(*) (CONST char *bytes, int length))global[305])
+#endif /* USE_TCL_BYTE_ARRAYS */
-+
+
/* hostmasking */
- #define maskhost(a,b) _maskhost((a),(b),1)
- #define maskban(a,b) _maskhost((a),(b),0)
---- eggdrop1.6.18/src/mod/server.mod/server.c 2006-03-28 06:35:51.000000000 +0400
-+++ eggdrop1.6.18/src/mod/server.mod/server.c.suzi_sp0007 2006-07-27 22:51:19.000000000 +0400
-@@ -1145,7 +1145,20 @@
+ #define maskhost(a,b) maskaddr((a),(b),3)
+--- eggdrop1.6.20/src/mod/server.mod/server.c 2010-07-12 20:18:09.000000000 +0400
++++ eggdrop1.6.20/src/mod/server.mod/server.c.suzi_sp0010 2010-07-24 16:08:03.000000000 +0400
+@@ -1164,7 +1164,16 @@
Tcl_TraceVar(irp, name1, TCL_TRACE_READS | TCL_TRACE_WRITES |
TCL_TRACE_UNSETS, nick_change, cdata);
} else { /* writes */
-+
+#ifdef USE_TCL_ENCODING
+ Tcl_DString dstr;
+#endif
-+
new = Tcl_GetVar2(interp, name1, name2, TCL_GLOBAL_ONLY);
-+
+#ifdef USE_TCL_ENCODING
+ /* properly convert string to system encoding. */
+ Tcl_DStringInit(&dstr);
+ Tcl_UtfToExternalDString(NULL, new, -1, &dstr);
+ new = Tcl_DStringValue(&dstr);
+#endif
-+
if (strcmp(origbotname, (char *) new)) {
if (origbotname[0]) {
putlog(LOG_MISC, "*", "* IRC NICK CHANGE: %s -> %s", origbotname, new);
-@@ -1154,7 +1167,13 @@
- strncpyz(origbotname, new, NICKLEN);
+@@ -1174,6 +1183,9 @@
if (server_online)
dprintf(DP_SERVER, "NICK %s\n", origbotname);
-+
}
-+
+#ifdef USE_TCL_ENCODING
+ Tcl_DStringFree(&dstr);
+#endif
-+
}
return NULL;
}
-@@ -1837,6 +1856,9 @@
+@@ -1861,6 +1873,9 @@
char *server_start(Function *global_funcs)
{
EGG_CONST char *s;
@@ -517,97 +295,55 @@
global = global_funcs;
-@@ -1906,9 +1928,24 @@
- /* Fool bot in reading the values. */
+@@ -1932,8 +1947,17 @@
tcl_eggserver(NULL, interp, "servers", NULL, 0);
tcl_traceserver("servers", NULL);
-+
s = Tcl_GetVar(interp, "nick", TCL_GLOBAL_ONLY);
-+
+#ifdef USE_TCL_ENCODING
+ /* properly convert string to system encoding. */
+ Tcl_DStringInit(&dstr);
+ Tcl_UtfToExternalDString(NULL, s, -1, &dstr);
+ s = Tcl_DStringValue(&dstr);
+#endif
-+
if (s)
strncpyz(origbotname, s, NICKLEN);
-+
+#ifdef USE_TCL_ENCODING
+ Tcl_DStringFree(&dstr);
+#endif
-+
-+
Tcl_TraceVar(interp, "nick",
TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
nick_change, NULL);
---- eggdrop1.6.18/src/modules.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/modules.c.suzi_sp0007 2006-07-27 22:40:10.000000000 +0400
-@@ -570,7 +570,24 @@
- (Function) oatoi,
- /* 292 - 295 */
- (Function) str_isdigit,
-- (Function) remove_crlf
-+ (Function) remove_crlf,
+--- eggdrop1.6.20/src/modules.c 2010-07-08 23:23:06.000000000 +0400
++++ eggdrop1.6.20/src/modules.c.suzi_sp0010 2010-07-24 16:02:59.000000000 +0400
+@@ -576,7 +576,24 @@
+ /* 296 - 299 */
+ (Function) check_conflags,
+ (Function) increase_socks_max,
+- (Function) log_ts
++ (Function) log_ts,
+#ifdef USE_TCL_BYTE_ARRAYS
-+ (Function) Tcl_EggSetVar, /* 294 */
-+ (Function) Tcl_EggSetVar2, /* 295 */
-+ (Function) Tcl_EggAppendResult, /* 296 */
-+ (Function) Tcl_EggAppendElement, /* 297 */
-+ (Function) Tcl_EggEval, /* 298 */
-+ (Function) Tcl_EggGlobalEval, /* 299 */
-+ (Function) Tcl_EggNewStringObj /* 300 */
++ (Function) Tcl_EggSetVar, /* 299 */
++ (Function) Tcl_EggSetVar2, /* 300 */
++ (Function) Tcl_EggAppendResult, /* 301 */
++ (Function) Tcl_EggAppendElement, /* 302 */
++ (Function) Tcl_EggEval, /* 303 */
++ (Function) Tcl_EggGlobalEval, /* 304 */
++ (Function) Tcl_EggNewStringObj /* 305 */
+#else
-+ (Function) 0,
-+ (Function) 0,
-+ (Function) 0,
-+ (Function) 0,
-+ (Function) 0,
-+ (Function) 0,
-+ (Function) 0
++ (Function) 0, /* 299 */
++ (Function) 0, /* 300 */
++ (Function) 0, /* 301 */
++ (Function) 0, /* 302 */
++ (Function) 0, /* 303 */
++ (Function) 0, /* 304 */
++ (Function) 0 /* 305 */
+#endif /* USE_TCL_BYTE_ARRAYS */
};
void init_modules(void)
---- eggdrop1.6.18/src/net.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/net.c.suzi_sp0007 2006-07-27 22:36:50.000000000 +0400
-@@ -53,7 +53,7 @@
- #endif
-
- extern struct dcc_t *dcc;
--extern int backgrd, use_stderr, resolve_timeout, dcc_total;
-+extern int backgrd, use_stderr, resolve_timeout, dcc_total, select_timeout;
- extern unsigned long otraffic_irc_today, otraffic_bn_today, otraffic_dcc_today,
- otraffic_filesys_today, otraffic_trans_today,
- otraffic_unknown_today;
-@@ -597,8 +597,8 @@
- fds = FD_SETSIZE; /* Fixes YET ANOTHER freebsd bug!!! */
- #endif
- /* timeout: 1 sec */
-- t.tv_sec = 1;
-- t.tv_usec = 0;
-+ t.tv_sec = select_timeout / 1000;
-+ t.tv_usec = (select_timeout % 1000) * 1000;
- FD_ZERO(&fd);
-
- for (i = 0; i < MAXSOCKS; i++) {
---- eggdrop1.6.18/src/tcl.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/tcl.c.suzi_sp0007 2006-07-29 16:46:37.000000000 +0400
-@@ -59,7 +59,11 @@
- die_on_sigterm, max_logs, max_logsize, dcc_total, raw_log,
- identtimeout, dcc_sanitycheck, dupwait_timeout, egg_numver,
- share_unlinks, protect_telnet, sort_users, strict_host,
-- resolve_timeout, default_uflags, userfile_perm;
-+ resolve_timeout, default_uflags, userfile_perm, select_timeout;
-+
-+#ifdef USE_TCL_EVENTS
-+extern int max_tcl_events;
-+#endif /* USE_TCL_EVENTS */
-
- extern struct dcc_t *dcc;
- extern tcl_timer_t *timer, *utimer;
-@@ -277,17 +281,31 @@
+--- eggdrop1.6.20/src/tcl.c 2010-07-12 19:40:52.000000000 +0400
++++ eggdrop1.6.20/src/tcl.c.suzi_sp0010 2010-07-24 15:49:26.000000000 +0400
+@@ -275,17 +275,31 @@
Tcl_Obj *obj;
unsigned char *bytes;
int len;
@@ -642,7 +378,7 @@
}
#else
s = (char *) Tcl_GetVar2(interp, name1, name2, 0);
-@@ -331,6 +349,8 @@
+@@ -329,6 +343,8 @@
void **callback_data;
Function func;
ClientData cd;
@@ -651,7 +387,7 @@
objc += 5;
strings = (char **) nmalloc(sizeof(char *) * objc);
-@@ -339,11 +359,23 @@
+@@ -337,11 +353,23 @@
utftot += sizeof(char *) * objc;
objc -= 5;
for (i = 0; i < objc; i++) {
@@ -676,81 +412,62 @@
}
callback_data = (void **) cdata;
func = (Function) callback_data[0];
-@@ -471,6 +503,7 @@
- {"telnet-banner", bannerfile, 120, STR_PROTECT},
+@@ -501,6 +529,7 @@
{"logfile-suffix", logfile_suffix, 20, 0},
+ {"timestamp-format",log_ts, 32, 0},
{"pidfile", pid_file, 120, STR_PROTECT},
-+ {"sp_version", "0007", 0, 0},
++ {"sp_version", "0010", 0, 0},
{NULL, NULL, 0, 0}
};
-@@ -522,6 +555,10 @@
- {"enable-simul", &enable_simul, 0}, /* compat */
- {"debug-output", &debug_output, 0}, /* compat */
- {"use-console-r", &use_console_r, 0}, /* compat */
-+#ifdef USE_TCL_EVENTS
-+ {"max_tcl_events", &max_tcl_events, 0},
-+#endif
-+ {"select_timeout", &select_timeout, 0},
- {NULL, NULL, 0}
- };
-
-@@ -559,9 +596,9 @@
- void init_tcl(int argc, char **argv)
- {
- #ifdef USE_TCL_ENCODING
-- const char *encoding;
-+/* const char *encoding;
- int i;
-- char *langEnv;
-+ char *langEnv; */
- #endif /* USE_TCL_ENCODING */
- #ifdef USE_TCL_PACKAGE
- int j;
-@@ -595,9 +632,13 @@
-
- /* Code based on Tcl's TclpSetInitialEncodings() */
- #ifdef USE_TCL_ENCODING
-- /* Determine the current encoding from the LC_* or LANG environment
-+/* I don't know why this code included in eggdrop
-+ because Tcl_Init() do the same things. And it do it better! */
-+#if 0
-+ /* Determine the current encoding from the LC_* or LANG environment
- * variables.
+--- eggdrop1.6.20/src/tclhash.c 2010-06-29 19:52:24.000000000 +0400
++++ eggdrop1.6.20/src/tclhash.c.suzi_sp0010 2010-07-24 16:16:53.000000000 +0400
+@@ -717,7 +717,22 @@
*/
-+ goto reset2;
- langEnv = getenv("LC_ALL");
- if (langEnv == NULL || langEnv[0] == '\0') {
- langEnv = getenv("LC_CTYPE");
-@@ -665,6 +706,7 @@
- /* Keep the iso8859-1 encoding preloaded. The IO package uses it for
- * gets on a binary channel. */
- Tcl_GetEncoding(NULL, "iso8859-1");
-+#endif /* 0 */
- #endif /* USE_TCL_ENCODING */
-
- #ifdef USE_TCL_PACKAGE
---- eggdrop1.6.18/src/tclegg.h 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/tclegg.h.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -174,7 +174,7 @@
- void rem_tcl_coups(tcl_coups *);
- void add_tcl_ints(tcl_ints *);
- void rem_tcl_ints(tcl_ints *);
--
-+#if 0
- /* From Tcl's tclUnixInit.c */
- /* The following table is used to map from Unix locale strings to
- * encoding files.
-@@ -221,5 +221,5 @@
-
- {NULL, NULL}
- };
--
-+#endif /* 0 */
- #endif /* _EGG_TCLEGG_H */
---- eggdrop1.6.18/src/tclhash.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/tclhash.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -1227,3 +1227,104 @@
+ Tcl_SetVar(interp, "lastbind", (char *) mask, TCL_GLOBAL_ONLY);
+
+- x = Tcl_VarEval(interp, proc, param, NULL);
++ // x = Tcl_VarEval(interp, proc, param, NULL);
++ {
++ char *cstr;
++ int len0 = proc ? strlen(proc) : 0;
++ int len1 = param ? strlen(param) : 0;
++ cstr = (char *)nmalloc(len0 + len1 + 1);
++ *cstr = '\0';
++ if (proc)
++ {
++ strcpy(cstr, proc);
++ if (len1)
++ strcat(cstr, param);
++ }
++ x = Tcl_Eval(interp, cstr);
++ nfree(cstr);
++ }
+ Context;
+
+ if (x == TCL_ERROR) {
+@@ -1019,8 +1034,19 @@
+ if (x == BIND_EXECUTED || x == BIND_EXEC_LOG) {
+ if (tcl_resultempty())
+ return "";
+- else
++ else {
++#ifdef USE_TCL_ENCODING
++ static char result[512];
++ int dstWroteBytes;
++ Tcl_UtfToExternal(interp, NULL, tcl_resultstring(), -1, 0, NULL,
++ result, sizeof(result), NULL, &dstWroteBytes, NULL);
++ if (dstWroteBytes == 0)
++ return "";
++ return result;
++#else
+ return tcl_resultstring();
++#endif
++ }
+ } else
+ return text;
+ }
+@@ -1289,3 +1315,104 @@
nfree(l);
}
}
@@ -855,9 +572,9 @@
+#define Tcl_NewStringObj Tcl_EggNewStringObj
+
+#endif /* USE_TCL_BYTE_ARRAYS */
---- eggdrop1.6.18/src/tclhash.h 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/tclhash.h.suzi_sp0007 2006-07-27 22:40:57.000000000 +0400
-@@ -25,6 +25,26 @@
+--- eggdrop1.6.20/src/tclhash.h 2010-07-12 19:40:52.000000000 +0400
++++ eggdrop1.6.20/src/tclhash.h.suzi_sp0010 2010-07-24 15:59:35.000000000 +0400
+@@ -25,6 +25,25 @@
#ifndef _EGG_TCLHASH_H
#define _EGG_TCLHASH_H
@@ -880,23 +597,6 @@
+Tcl_Obj * Tcl_EggNewStringObj(CONST char *bytes, int length);
+
+#endif /* USE_TCL_BYTE_ARRAYS */
-+
#define TC_DELETED 0x0001 /* This command/trigger was deleted. */
---- eggdrop1.6.18/src/tcluser.c 2006-03-28 06:35:50.000000000 +0400
-+++ eggdrop1.6.18/src/tcluser.c.suzi_sp0007 2006-07-27 21:19:02.000000000 +0400
-@@ -393,9 +393,11 @@
- x = 0;
- else {
- strncpyz(newhand, argv[2], sizeof newhand);
-- for (i = 0; i < strlen(newhand); i++)
-- if ((newhand[i] <= 32) || (newhand[i] >= 127) || (newhand[i] == '@'))
-+
-+ for (i = 0; i < strlen(newhand); i++)
-+ if ((((unsigned char *)newhand)[i] <= 32) || (newhand[i] == '@'))
- newhand[i] = '?';
-+
- if (strchr(BADHANDCHARS, newhand[0]) != NULL)
- x = 0;
- else if (strlen(newhand) < 1)
diff --git a/eggdrop.spec b/eggdrop.spec
index 5985e27..7708a3e 100644
--- a/eggdrop.spec
+++ b/eggdrop.spec
@@ -1,17 +1,15 @@
Summary: The world's most popular Open Source IRC bot
Name: eggdrop
-Version: 1.6.19
-Release: 6%{?dist}
+Version: 1.6.20
+Release: 1%{?dist}
License: GPLv2+
Group: Applications/Communications
URL: http://www.eggheads.org/
Source: ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/%{name}%{version}.tar.bz2
-Patch0: eggdrop-1.6.19-conf.patch
-Patch1: eggdrop-1.6.17-langdir.patch
-Patch2: eggdrop-1.6.19-no_libdns.patch
-Patch3: eggdrop-1.6.18-suzi_sp0007.patch
-Patch4: eggdrop-1.6.19-ctcpfix.patch
-BuildRequires: tcl-devel >= 8.3, zlib-devel, autoconf
+Patch0: eggdrop-1.6.17-langdir.patch
+Patch1: eggdrop-1.6.20-no_libdns.patch
+Patch2: eggdrop-1.6.20-suzi_sp0010.patch
+BuildRequires: tcl-devel >= 8.3, zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@@ -22,61 +20,65 @@ able to form botnets, share partylines and userfiles between bots.
%prep
%setup -q -n %{name}%{version}
-%patch0 -p1 -b .conf
-%patch1 -p1 -b .langdir
-%patch2 -p1 -b .no_libdns
-%patch3 -p1 -b .suzi_sp0007
-%patch4 -p1 -b .ctcpfix
-autoconf
+%patch0 -p1 -b .langdir
+%patch1 -p1 -b .no_libdns
+%patch2 -p1 -b .suzi_sp0010
%build
%configure
make config
-make %{_smp_mflags}
+# Parallel builds are not supported
+make
%install
rm -rf $RPM_BUILD_ROOT
make DEST=$RPM_BUILD_ROOT%{_datadir}/%{name} INSTALL='install -p' install
-rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{README,doc,eggdrop*,filesys,logs,modules}
+rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{README,doc,eggdrop*,filesys,logs,modules,scripts/CONTENTS}
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
-install -D -m 644 doc/man1/eggdrop.1 $RPM_BUILD_ROOT%{_mandir}/man1/eggdrop.1
+install -D -m 644 doc/man1/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
# Move modules into /usr/lib*
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/modules-%{version} $RPM_BUILD_ROOT%{_libdir}/%{name}
-# Documentation cleanups
-find doc -name "Makefile*" -exec rm {} \;
-mv doc/html . ; rm -rf doc/man1
-chmod -x doc/WEIRD-MESSAGES eggdrop.conf src/mod/transfer.mod/*.c
-
# Convert everything to UTF-8
iconv -f iso-8859-1 -t utf-8 -o doc/KNOWN-PROBLEMS.utf8 doc/KNOWN-PROBLEMS
touch -c -r doc/KNOWN-PROBLEMS doc/KNOWN-PROBLEMS.utf8
mv -f doc/KNOWN-PROBLEMS.utf8 doc/KNOWN-PROBLEMS
-iconv -f iso-8859-1 -t utf-8 -o doc/UPDATES1.6.utf8 doc/UPDATES1.6
-touch -c -r doc/UPDATES1.6 doc/UPDATES1.6.utf8
-mv -f doc/UPDATES1.6.utf8 doc/UPDATES1.6
+iconv -f iso-8859-1 -t utf-8 -o doc/Changes1.6.utf8 doc/Changes1.6
+touch -c -r doc/Changes1.6 doc/Changes1.6.utf8
+mv -f doc/Changes1.6.utf8 doc/Changes1.6
# Fix paths of example eggdrop.conf
-perl -pi -e s":scripts/:%{_datadir}/%{name}/scripts/:" eggdrop.conf
-perl -pi -e s":help/:%{_datadir}/%{name}/help/:" eggdrop.conf
-perl -pi -e s":modules/:%{_libdir}/%{name}/:" eggdrop.conf
+sed -e '2d' -e '1s@^.*@#!%{_bindir}/%{name}@' \
+ -e 's at scripts/@%{_datadir}/%{name}/scripts/@g' \
+ -e 's at help/@%{_datadir}/%{name}/help/@g' \
+ -e 's at modules/@%{_libdir}/%{name}/@g' \
+ eggdrop.conf > eggdrop.conf.mod
+touch -c -r eggdrop.conf eggdrop.conf.mod
+mv -f eggdrop.conf.mod eggdrop.conf
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root)
-%doc COPYING FEATURES INSTALL NEWS README UTF-8 doc/* html eggdrop.conf
+%defattr(-,root,root,-)
+%doc COPYING FEATURES NEWS README SUZI doc/Changes1.6 eggdrop.conf
+%doc doc/ABOUT doc/BANS doc/BOTNET doc/BUG-REPORT doc/FIRST-SCRIPT
+%doc doc/MODULES doc/PARTYLINE doc/TEXT-SUBSTITUTIONS doc/TRICKS
+%doc doc/USERS doc/WEIRD-MESSAGES doc/tcl-commands.doc doc/settings
+%doc doc/html
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_datadir}/%{name}
-%{_mandir}/man?/*
+%{_mandir}/man?/%{name}*
%changelog
+* Tue Dec 28 2010 Robert Scheck <robert at fedoraproject.org> 1.6.20-1
+- Upgrade to 1.6.20
+
* Mon Aug 10 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.6.19-6
- Use bzipped upstream tarball.
diff --git a/sources b/sources
index 48bff95..10777c4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b706bbe4fdd05964e0ea0cd920f28539 eggdrop1.6.19.tar.bz2
+f6887c045dba11fa2755a6a9e40380a3 eggdrop1.6.20.tar.bz2
More information about the scm-commits
mailing list