summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2004-07-28 20:35:15 +0000
committerNed Ludd <solar@gentoo.org>2004-07-28 20:35:15 +0000
commit50995d78db83d8b2a31793b0b78b847491776ccf (patch)
treeb1d1cb3a90019406142b2ee851fbc794a1f515d4 /net-www
parentAdd new package. (diff)
downloadhistorical-50995d78db83d8b2a31793b0b78b847491776ccf.tar.gz
historical-50995d78db83d8b2a31793b0b78b847491776ccf.tar.bz2
historical-50995d78db83d8b2a31793b0b78b847491776ccf.zip
patched putlog() function which would cause segfaults on really long url's. patch source comes from battousai@gentoo
Diffstat (limited to 'net-www')
-rw-r--r--net-www/middleman/ChangeLog9
-rw-r--r--net-www/middleman/Manifest5
-rw-r--r--net-www/middleman/files/digest-middleman-2.0.1-r21
-rw-r--r--net-www/middleman/files/middleman-2.0.1-putlog-fix.patch155
-rw-r--r--net-www/middleman/middleman-2.0.1-r2.ebuild84
5 files changed, 252 insertions, 2 deletions
diff --git a/net-www/middleman/ChangeLog b/net-www/middleman/ChangeLog
index 99af5e2820a0..41e6b07cdf61 100644
--- a/net-www/middleman/ChangeLog
+++ b/net-www/middleman/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-www/middleman
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/middleman/ChangeLog,v 1.15 2004/07/01 22:45:06 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/middleman/ChangeLog,v 1.16 2004/07/28 20:35:15 solar Exp $
+
+*middleman-2.0.1-r2 (28 Jul 2004)
+
+ 28 Jul 2004; <solar@gentoo.org> middleman-2.0.1-r2.ebuild,
+ files/middleman-2.0.1-putlog-fix.patch:
+ patched putlog() function which would cause segfaults on really long url's.
+ patch source comes from battousai@gentoo
01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
middleman-1.9.1-r1.ebuild, middleman-2.0.1-r1.ebuild,
diff --git a/net-www/middleman/Manifest b/net-www/middleman/Manifest
index 703b284fa3bd..25c1c5a802ef 100644
--- a/net-www/middleman/Manifest
+++ b/net-www/middleman/Manifest
@@ -1,10 +1,13 @@
+MD5 8ea036f4f0d9697c298efea245818bff middleman-2.0.1-r2.ebuild 2167
MD5 185129e7848162976f1a525c7b7739ed middleman-2.0.1.ebuild 1833
MD5 dd10d1e2ae1f3ca21300ed10ba71c216 middleman-2.0.1-r1.ebuild 2122
MD5 3754e5cfb5c208d70b4f8b952a0f69e0 middleman-1.9.1-r1.ebuild 1721
-MD5 8658711a02f74a6b9a98df9bbc2a7a88 ChangeLog 2964
+MD5 6aa658b93e20630cf502907c15d353ed ChangeLog 3219
MD5 b3089a22f33a39676bb267f8d3d59c07 metadata.xml 1012
MD5 d36ec4253bc7ad3bf51972238274d107 files/middleman-1.9.1-makefile.patch 861
MD5 900b7f67e15e2549a495775afebed6b9 files/digest-middleman-2.0.1-r1 67
+MD5 900b7f67e15e2549a495775afebed6b9 files/digest-middleman-2.0.1-r2 67
+MD5 22c116e20fcb12dbd46cbb38125f2e68 files/middleman-2.0.1-putlog-fix.patch 3671
MD5 900b7f67e15e2549a495775afebed6b9 files/digest-middleman-2.0.1 67
MD5 5e7fe1fa845ace7e8f4d753e7770c2f1 files/digest-middleman-1.9.1-r1 67
MD5 cca46008c83644944b263535a7d2ead1 files/conf.d/mman 138
diff --git a/net-www/middleman/files/digest-middleman-2.0.1-r2 b/net-www/middleman/files/digest-middleman-2.0.1-r2
new file mode 100644
index 000000000000..05e783e77584
--- /dev/null
+++ b/net-www/middleman/files/digest-middleman-2.0.1-r2
@@ -0,0 +1 @@
+MD5 8bf596a4810184c8f7534d63b1e94cf1 middleman-2.0.1.tar.gz 743404
diff --git a/net-www/middleman/files/middleman-2.0.1-putlog-fix.patch b/net-www/middleman/files/middleman-2.0.1-putlog-fix.patch
new file mode 100644
index 000000000000..27f5931378a8
--- /dev/null
+++ b/net-www/middleman/files/middleman-2.0.1-putlog-fix.patch
@@ -0,0 +1,155 @@
+--- middleman-2.0.1/src/log.c.orig 2004-07-28 15:42:46.389571608 -0400
++++ middleman-2.0.1/src/log.c 2004-07-28 15:43:11.422765984 -0400
+@@ -30,6 +30,8 @@
+ #include <syslog.h>
+ #endif /* USE_SYSLOG */
+
++#define LINELEN 512
++
+ int logfd = -1;
+ extern int loglevel;
+ extern int daemonize;
+@@ -46,105 +48,99 @@
+ time_t tt;
+ struct tm *tv;
+ #endif
+- int ret;
+ va_list valist;
+- char buf[1024], *ptr;
++ char ptr[LINELEN], tmp[LINELEN];
+
+ pthread_mutex_lock(&logfile_lock);
+
+- ptr = buf;
+-
+ #ifndef USE_SYSLOG
+ time(&tt);
+ tv = localtime(&tt);
+
+- ptr += strftime(ptr, 24, TIMEFORMAT, tv);
++ strftime(ptr, 24, TIMEFORMAT, tv);
++ sprintf(tmp, " [%u] ", (unsigned int) getpid());
++ strcat(ptr, tmp);
+
+- ptr += sprintf(ptr, " [%u] ", (unsigned int) getpid());
+ #endif
+
+ switch (level) {
+ case MMLOG_REQUEST:
+- ptr += sprintf(ptr, "request: ");
++ strcat(ptr, "request: ");
+ break;
+ case MMLOG_NETWORK:
+- ptr += sprintf(ptr, "network: ");
++ strcat(ptr, "network: ");
+ break;
+ case MMLOG_FILTER:
+- ptr += sprintf(ptr, "url filter: ");
++ strcat(ptr, "url filter: ");
+ break;
+ case MMLOG_HEADER:
+- ptr += sprintf(ptr, "header: ");
++ strcat(ptr, "header: ");
+ break;
+ case MMLOG_MIME:
+- ptr += sprintf(ptr, "mime filter: ");
++ strcat(ptr, "mime filter: ");
+ break;
+ case MMLOG_COOKIE:
+- ptr += sprintf(ptr, "cooke filter: ");
++ strcat(ptr, "cooke filter: ");
+ break;
+ case MMLOG_REDIRECT:
+- ptr += sprintf(ptr, "redirect: ");
++ strcat(ptr, "redirect: ");
+ break;
+ case MMLOG_TEMPLATE:
+- ptr += sprintf(ptr, "template: ");
++ strcat(ptr, "template: ");
+ break;
+ case MMLOG_KEYWORDS:
+- ptr += sprintf(ptr, "keyword filter: ");
++ strcat(ptr, "keyword filter: ");
+ break;
+ case MMLOG_REWRITE:
+- ptr += sprintf(ptr, "rewriting: ");
++ strcat(ptr, "rewriting: ");
+ break;
+ case MMLOG_LIMITS:
+- ptr += sprintf(ptr, "limits: ");
++ strcat(ptr, "limits: ");
+ break;
+ case MMLOG_PREFETCH:
+- ptr += sprintf(ptr, "prefetch: ");
++ strcat(ptr, "prefetch: ");
+ break;
+ case MMLOG_CACHE:
+- ptr += sprintf(ptr, "cache: ");
++ strcat(ptr, "cache: ");
+ break;
+ case MMLOG_ICP:
+- ptr += sprintf(ptr, "ICP: ");
++ strcat(ptr, "ICP: ");
+ break;
+ case MMLOG_FORWARD:
+- ptr += sprintf(ptr, "forwarding: ");
++ strcat(ptr, "forwarding: ");
+ break;
+ case MMLOG_SECURITY:
+- ptr += sprintf(ptr, "security: ");
++ strcat(ptr, "security: ");
+ break;
+ case MMLOG_WARN:
+- ptr += sprintf(ptr, "warning: ");
++ strcat(ptr, "warning: ");
+ break;
+ case MMLOG_ERROR:
+- ptr += sprintf(ptr, "error: ");
++ strcat(ptr, "error: ");
+ break;
+ case MMLOG_DEBUG:
+- ptr += sprintf(ptr, "debug: ");
++ strcat(ptr, "debug: ");
+ break;
+ }
+
+ va_start(valist, fmt);
+- ret = vsnprintf(ptr, sizeof(buf) - (ptr - buf), fmt, valist);
++ vsnprintf(tmp, LINELEN - strlen(ptr) - 1, fmt, valist);
+ va_end(valist);
++ s_strncat(ptr, tmp, LINELEN - strlen(ptr) - 1);
++ strcat(ptr, "\n");
+
+- ptr += (ret > sizeof(buf) || ret == -1) ? sizeof(buf) - (ptr - buf) : ret;
+
+ if (level != MMLOG_DEBUG)
+- logbuffer_add(global->logbuffer, buf);
+-
+- if (*(ptr - 1) != '\n') {
+- *(ptr++) = '\n';
+- *ptr = '\0';
+- }
++ logbuffer_add(global->logbuffer, ptr);
+
+ if ((loglevel & level) && daemonize == FALSE)
+- printf("%s", buf);
++ printf("%s", ptr);
+
+ if (!*logfile || !(loglevel & level))
+ goto out;
+
+ #ifdef USE_SYSLOG
+- syslog(LOG_INFO, "%s", buf);
++ syslog(LOG_INFO, "%s", ptr);
+ #else
+ if (logfd == -1) {
+ logfd = open(logfile, O_RDWR | O_CREAT, 0640);
+@@ -154,7 +150,7 @@
+ lseek(logfd, 0, SEEK_END);
+ }
+
+- write(logfd, buf, strlen(buf));
++ write(logfd, ptr, strlen(ptr));
+ #endif
+ out:
+ pthread_mutex_unlock(&logfile_lock);
diff --git a/net-www/middleman/middleman-2.0.1-r2.ebuild b/net-www/middleman/middleman-2.0.1-r2.ebuild
new file mode 100644
index 000000000000..8d31be2b2c6e
--- /dev/null
+++ b/net-www/middleman/middleman-2.0.1-r2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/middleman/middleman-2.0.1-r2.ebuild,v 1.1 2004/07/28 20:35:15 solar Exp $
+
+inherit eutils
+
+DESCRIPTION="Advanced HTTP/1.1 proxy server with features designed to increase privacy and remove unwanted content"
+SRC_URI="mirror://sourceforge/middle-man/${P}.tar.gz"
+HOMEPAGE="http://sourceforge.net/projects/middle-man"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE="${IUSE} pam zlib"
+
+#S=${WORKDIR}/
+
+DEPEND="virtual/libc
+ dev-libs/libpcre
+ pam? ( sys-libs/pam )
+ zlib? ( sys-libs/zlib )
+"
+
+src_unpack() {
+ unpack ${A}
+ [ -f ${FILESDIR}/${P}-gentoo.diff ] && epatch ${FILESDIR}/${P}-gentoo.diff
+ cd ${S}
+ epatch ${FILESDIR}/${PN}-${PV}-putlog-fix.patch
+
+ #if [ "$PV" = "1.9" ]; then
+ # einfo "Patching Makefile.in to avoid sandbox problems"
+ # sed -i -e s:"INSTALL) -d /var":"INSTALL) -d \$(DESTDIR)/var":g Makefile.in
+ #fi
+}
+
+src_compile() {
+ local myconf=""
+ MAKEOPTS="-j1"
+
+ cd ${S}
+ for opt in ${IUSE}; do
+ use ${opt} &&
+ myconf="${myconf} --enable-${opt}" ||
+ myconf="$myconf --disable-${opt}"
+ done
+
+ econf --sysconfdir=/etc ${myconf} || die "econf failed: ${myconf}"
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd ${S}
+ # mkdir -p ${D}/usr/share/man/man8/
+ make DESTDIR="${D}" install || die "einstall failed"
+
+ dodoc CHANGELOG COPYING
+ dohtml README.html
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/conf.d/mman mman
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/init.d/mman mman
+}
+
+#pkg_preinst() {
+# enewgroup mman 8080
+# enewuser mman 8080
+#}
+
+pkg_postinst() {
+ #einfo "A mman user has been added to your system if one did not already exist"
+ einfo "-"
+ einfo "Note: init/conf scripts and a sample config has been provided for you."
+ einfo "They can be found at or in /etc/conf.d/mman /etc/init.d/mman /etc/mman/"
+
+ if [ -d /etc/mman/mman ]; then
+ ewarn "A previous version of this ebuild installed the config scripts into"
+ ewarn
+ ewarn " /etc/mman/mman/"
+ ewarn
+ ewarn "by mistake. Please move these files into /etc/mman instead, and remove"
+ ewarn "your /etc/mman/mman/ directory."
+ fi
+}