summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--CVE-2007-6110.patch26
-rw-r--r--PKGBUILD47
-rw-r--r--gcc4.3.patch15
4 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f4da67b4b06
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = htdig
+ pkgdesc = Scripts and HTML code needed for using ht://Dig as a web search engine
+ pkgver = 3.2.0b6
+ pkgrel = 11
+ url = http://www.htdig.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = openssl
+ source = http://downloads.sourceforge.net/htdig/htdig-3.2.0b6.tar.bz2
+ source = gcc4.3.patch
+ source = CVE-2007-6110.patch
+ md5sums = 8b9b9587a411ac7dd278fa5413428960
+ md5sums = 2aeda683f95b58efc0978d7fe951de59
+ md5sums = 0d9099d3b5a32d322a8e0240f85a3578
+
+pkgname = htdig
+
diff --git a/CVE-2007-6110.patch b/CVE-2007-6110.patch
new file mode 100644
index 00000000000..57b0e3b7873
--- /dev/null
+++ b/CVE-2007-6110.patch
@@ -0,0 +1,26 @@
+Index: htdig-3.2.0b6/htsearch/Display.cc
+===================================================================
+--- htdig-3.2.0b6.orig/htsearch/Display.cc
++++ htdig-3.2.0b6/htsearch/Display.cc
+@@ -137,7 +137,7 @@ Display::display(int pageNumber)
+ // Must temporarily stash the message in a String, since
+ // displaySyntaxError will overwrite the static temp used in form.
+
+- String s(form("No such sort method: `%s'", (const char*)config->Find("sort")));
++ String s("invalid sort method");
+
+ displaySyntaxError(s);
+ return;
+Index: htdig-3.2.0b6/libhtdig/ResultFetch.cc
+===================================================================
+--- htdig-3.2.0b6.orig/libhtdig/ResultFetch.cc
++++ htdig-3.2.0b6/libhtdig/ResultFetch.cc
+@@ -142,7 +142,7 @@ ResultFetch::fetch()
+ // Must temporarily stash the message in a String, since
+ // displaySyntaxError will overwrite the static temp used in form.
+
+- String s(form("No such sort method: `%s'", (const char *) config->Find("sort")));
++ String s("invalid sort method");
+
+ displaySyntaxError(s);
+ //return;
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cfe5a6d4643
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 260530 2016-03-02 18:25:02Z foutrelis $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=htdig
+pkgver=3.2.0b6
+pkgrel=11
+pkgdesc="Scripts and HTML code needed for using ht://Dig as a web search engine"
+url="http://www.htdig.org/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('openssl')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'gcc4.3.patch'
+ 'CVE-2007-6110.patch')
+md5sums=('8b9b9587a411ac7dd278fa5413428960'
+ '2aeda683f95b58efc0978d7fe951de59'
+ '0d9099d3b5a32d322a8e0240f85a3578')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+
+ patch -p1 -i "${srcdir}/gcc4.3.patch"
+ patch -p1 -i "${srcdir}/CVE-2007-6110.patch"
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-config-dir=/etc/htdig \
+ --with-default-config-file=/etc/htdig/htdig.conf \
+ --with-database-dir=/var/lib/htdig/db \
+ --with-cgi-bin-dir=/usr/bin \
+ --with-common-dir=/usr/share/doc/htdig \
+ --with-search-dir=/usr/share/doc/htdig \
+ --with-image-dir=/usr/share/doc/htdig \
+ --localstatedir=/var/lib/htdig \
+ --with-ssl
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/gcc4.3.patch b/gcc4.3.patch
new file mode 100644
index 00000000000..58dec13957e
--- /dev/null
+++ b/gcc4.3.patch
@@ -0,0 +1,15 @@
+diff -Naurp htdig-3.2.0b6.orig/htsearch/Collection.h htdig-3.2.0b6/htsearch/Collection.h
+--- htdig-3.2.0b6.orig/htsearch/Collection.h 2004-05-28 06:15:24.000000000 -0700
++++ htdig-3.2.0b6/htsearch/Collection.h 2006-03-22 11:35:40.000000000 -0800
+@@ -36,9 +36,9 @@ public:
+ const char *docExcerpt);
+ ~Collection();
+
+- void Collection::Open();
++ void Open();
+
+- void Collection::Close();
++ void Close();
+
+ char *getWordFile() { return wordFile.get(); }
+ DocumentRef *getDocumentRef(int id);