[-]
[+]
|
Added |
htdig.changes
|
|
[-]
[+]
|
Added |
htdig.spec
^
|
|
[-]
[+]
|
Added |
htdig-3.2.0b6-strictaliasing.diff
^
|
@@ -0,0 +1,22 @@
+--- htdig-3.2.0b6/db/db.c
++++ htdig-3.2.0b6/db/db.c
+@@ -607,7 +607,7 @@
+ */
+ if (LF_ISSET(DB_THREAD)) {
+ if ((ret = CDB___db_mutex_alloc(
+- dbenv, dbenv->reginfo, (MUTEX **)&dbp->mutexp)) != 0)
++ dbenv, dbenv->reginfo, &dbp->mutexp)) != 0)
+ return (ret);
+ if ((ret = __db_mutex_init(
+ dbenv, dbp->mutexp, 0, MUTEX_THREAD)) != 0)
+--- htdig-3.2.0b6/db/hash_meta.c
++++ htdig-3.2.0b6/db/hash_meta.c
+@@ -51,7 +51,7 @@
+ }
+
+ if ((ret = CDB___ham_get_page(dbc->dbp,
+- hashp->meta_pgno, (PAGE **)&(hcp->hdr))) != 0 &&
++ hashp->meta_pgno, &(hcp->hdr))) != 0 &&
+ hcp->hlock.off != LOCK_INVALID) {
+ (void)CDB_lock_put(dbc->dbp->dbenv, &hcp->hlock);
+ hcp->hlock.off = LOCK_INVALID;
|
[-]
[+]
|
Added |
htdig-ExternalParser-typo.patch
^
|
@@ -0,0 +1,13 @@
+Index: htdig/ExternalParser.cc
+===================================================================
+--- htdig/ExternalParser.cc.orig
++++ htdig/ExternalParser.cc
+@@ -428,7 +428,7 @@
+ {
+ metadatetags = new StringMatch();
+ metadatetags->IgnoreCase();
+- metadatetags->Pattern("date|dc.date|dc.date.created|dc.data.modified");
++ metadatetags->Pattern("date|dc.date|dc.date.created|dc.date.modified");
+ }
+
+ // <URL:http://www.w3.org/MarkUp/html-spec/html-spec_5.html#SEC5.2.5>
|
[-]
[+]
|
Added |
htdig-SSLConnection.patch
^
|
@@ -0,0 +1,38 @@
+Index: htnet/SSLConnection.cc
+===================================================================
+--- htnet/SSLConnection.cc.orig
++++ htnet/SSLConnection.cc
+@@ -131,18 +131,21 @@
+ {
+ errno = 0;
+
+- if (timeout_value > 0) {
+- FD_SET_T fds;
+- FD_ZERO(&fds);
+- FD_SET(sock, &fds);
+-
+- timeval tv;
+- tv.tv_sec = timeout_value;
+- tv.tv_usec = 0;
+-
+- int selected = select(sock+1, &fds, 0, 0, &tv);
+- if (selected <= 0)
+- need_io_stop++;
++ if (!SSL_pending(ssl)) {
++ if (timeout_value > 0) {
++ FD_SET_T fds;
++ FD_ZERO(&fds);
++ FD_SET(sock, &fds);
++
++ timeval tv;
++ tv.tv_sec = timeout_value;
++ tv.tv_usec = 0;
++
++ int selected = select(sock+1, &fds, 0, 0, &tv);
++ if (selected <= 0)
++ need_io_stop++;
++ }
++
+ }
+
+ if (!need_io_stop)
|
[-]
[+]
|
Added |
htdig-cleanup-db.diff
^
|
@@ -0,0 +1,162 @@
+diff -ur htdig-3.2.0b6.orig/db/bt_open.c htdig-3.2.0b6/db/bt_open.c
+--- htdig-3.2.0b6.orig/db/bt_open.c 2002-02-02 19:18:05.000000000 +0100
++++ htdig-3.2.0b6/db/bt_open.c 2004-07-05 17:11:18.869261790 +0200
+@@ -295,6 +295,7 @@
+ DB_LOCK metalock;
+ PAGE *root;
+ int ret, t_ret;
++ union{ BTMETA **mp; PAGE **pp; }cv;
+
+ ret = 0;
+ t = dbp->bt_internal;
+@@ -311,8 +312,9 @@
+ if ((ret =
+ CDB___db_lget(dbc, 0, base_pgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
+ goto err;
+- if ((ret = CDB_memp_fget(
+- dbp->mpf, &base_pgno, DB_MPOOL_CREATE, (PAGE **)&meta)) != 0)
++ cv.mp = &meta;
++ if ((ret = CDB_memp_fget(
++ dbp->mpf, &base_pgno, DB_MPOOL_CREATE, cv.mp)) != 0)
+ goto err;
+
+ /*
+diff -ur htdig-3.2.0b6.orig/db/bt_stat.c htdig-3.2.0b6/db/bt_stat.c
+--- htdig-3.2.0b6.orig/db/bt_stat.c 2002-02-02 19:18:05.000000000 +0100
++++ htdig-3.2.0b6/db/bt_stat.c 2004-07-05 17:13:58.620951679 +0200
+@@ -46,6 +46,7 @@
+ PAGE *h;
+ db_pgno_t pgno;
+ int ret, t_ret;
++ union{ BTMETA **mp; PAGE **pp; }cv;
+
+ PANIC_CHECK(dbp->dbenv);
+ DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->stat");
+@@ -93,7 +94,8 @@
+ pgno = PGNO_BASE_MD;
+ if ((ret = CDB___db_lget(dbc, 0, pgno, DB_LOCK_READ, 0, &lock)) != 0)
+ goto err;
+- if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, (PAGE **)&meta)) != 0)
++ cv.mp = &meta;
++ if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, cv.mp)) != 0)
+ goto err;
+
+ /* Walk the metadata free list, counting pages. */
+@@ -122,8 +124,9 @@
+ if ((ret =
+ CDB___db_lget(dbc, 0, t->bt_meta, DB_LOCK_READ, 0, &lock)) != 0)
+ goto err;
++ cv.mp = &meta;
+ if ((ret =
+- CDB_memp_fget(dbp->mpf, &t->bt_meta, 0, (PAGE **)&meta)) != 0)
++ CDB_memp_fget(dbp->mpf, &t->bt_meta, 0, cv.mp)) != 0)
+ goto err;
+ }
+
+diff -ur htdig-3.2.0b6.orig/db/db_meta.c htdig-3.2.0b6/db/db_meta.c
+--- htdig-3.2.0b6.orig/db/db_meta.c 2002-02-02 19:18:05.000000000 +0100
++++ htdig-3.2.0b6/db/db_meta.c 2004-07-05 17:23:28.878967333 +0200
+@@ -79,6 +79,7 @@
+ PAGE *h;
+ db_pgno_t pgno;
+ int ret;
++ union{ DBMETA **mp; PAGE **pp; }cv;
+
+ dbp = dbc->dbp;
+ meta = NULL;
+@@ -88,7 +89,8 @@
+ pgno = PGNO_BASE_MD;
+ if ((ret = CDB___db_lget(dbc, 0, pgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
+ goto err;
+- if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, (PAGE **)&meta)) != 0)
++ cv.mp = &meta;
++ if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, cv.mp)) != 0)
+ goto err;
+
+ if (meta->free == PGNO_INVALID) {
+@@ -147,6 +149,7 @@
+ db_pgno_t pgno;
+ u_int32_t dirty_flag;
+ int ret, t_ret;
++ union{ DBMETA **mp; PAGE **pp; }cv;
+
+ dbp = dbc->dbp;
+
+@@ -160,7 +163,8 @@
+ pgno = PGNO_BASE_MD;
+ if ((ret = CDB___db_lget(dbc, 0, pgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
+ goto err;
+- if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, (PAGE **)&meta)) != 0) {
++ cv.mp = &meta;
++ if ((ret = CDB_memp_fget(dbp->mpf, &pgno, 0, cv.mp)) != 0) {
+ (void)__TLPUT(dbc, metalock);
+ goto err;
+ }
+diff -ur htdig-3.2.0b6.orig/db/qam_stat.c htdig-3.2.0b6/db/qam_stat.c
+--- htdig-3.2.0b6.orig/db/qam_stat.c 2002-02-02 19:18:05.000000000 +0100
++++ htdig-3.2.0b6/db/qam_stat.c 2004-07-05 17:21:19.300260895 +0200
+@@ -47,6 +47,7 @@
+ db_indx_t indx;
+ db_pgno_t lastpgno, pgno;
+ int ret, t_ret;
++ union{ QMETA **mp; PAGE **pp; }cv;
+
+ PANIC_CHECK(dbp->dbenv);
+ DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->stat");
+@@ -76,7 +77,8 @@
+ /* Get the meta-data page. */
+ if ((ret = CDB___db_lget(dbc, 0, t->q_meta, DB_LOCK_READ, 0, &lock)) != 0)
+ goto err;
+- if ((ret = CDB_memp_fget(dbp->mpf, &t->q_meta, 0, (PAGE **)&meta)) != 0)
++ cv.mp = &meta;
++ if ((ret = CDB_memp_fget(dbp->mpf, &t->q_meta, 0, cv.mp)) != 0)
+ goto err;
+
+ /* Get the metadata fields. */
+
+diff -ur htdig-3.2.0b6.orig/db/hash.c htdig-3.2.0b6/db/hash.c
+--- htdig-3.2.0b6.orig/db/hash.c 2002-06-11 18:44:35.000000000 +0200
++++ htdig-3.2.0b6/db/hash.c 2004-07-06 10:06:41.638815185 +0200
+@@ -292,6 +292,7 @@
+ db_pgno_t mpgno;
+ int32_t l2, nbuckets;
+ int dirty_mmeta, i, ret, t_ret;
++ union{ DBMETA **mp; PAGE **pp; }cv;
+
+ hcp = (HASH_CURSOR *)dbc->internal;
+ dbp = dbc->dbp;
+@@ -341,8 +342,9 @@
+ if ((ret = CDB___db_lget(dbc,
+ 0, mpgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
+ return (ret);
++ cv.mp = &mmeta;
+ if ((ret = CDB_memp_fget(dbp->mpf,
+- &mpgno, 0, (PAGE **)&mmeta)) != 0)
++ &mpgno, 0, cv.mp)) != 0)
+ goto err;
+ }
+ if ((ret = CDB___ham_dirty_page(dbp, (PAGE *)hcp->hdr)) != 0)
+
+diff -u htdig-3.2.0b6/db/qam_open.c.\~1\~ htdig-3.2.0b6/db/qam_open.c
+--- htdig-3.2.0b6/db/qam_open.c.~1~ 2002-02-02 19:18:05.000000000 +0100
++++ htdig-3.2.0b6/db/qam_open.c 2004-07-06 10:56:17.022264520 +0200
+@@ -43,6 +43,7 @@
+ DB_LSN orig_lsn;
+ QMETA *qmeta;
+ int ret, t_ret;
++ union{ QMETA **mp; PAGE **pp; }cv;
+
+ ret = 0;
+ t = dbp->q_internal;
+@@ -62,8 +63,9 @@
+ if ((ret =
+ CDB___db_lget(dbc, 0, base_pgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
+ goto err;
++ cv.mp = &qmeta;
+ if ((ret = CDB_memp_fget(
+- dbp->mpf, &base_pgno, DB_MPOOL_CREATE, (PAGE **)&qmeta)) != 0)
++ dbp->mpf, &base_pgno, DB_MPOOL_CREATE, cv.mp)) != 0)
+ goto err;
+
+ /*
+
|
[-]
[+]
|
Added |
htdig-cross-site-CAN-2005-0085.patch
^
|
@@ -0,0 +1,24 @@
+--- htdig-3.2.0b6/htsearch/htsearch.cc
++++ htdig-3.2.0b6/htsearch/htsearch.cc
+@@ -211,8 +211,7 @@
+ }
+ if (access((char*)configFile, R_OK) < 0)
+ {
+- reportError(form("Unable to read configuration file '%s'",
+- configFile.get()));
++ reportError("Unable to read configuration file");
+ }
+ config->Read(configFile);
+
+--- htdig-3.2.0b6/htsearch/qtest.cc
++++ htdig-3.2.0b6/htsearch/qtest.cc
+@@ -132,8 +132,7 @@
+
+ if (access((char*)configFile, R_OK) < 0)
+ {
+- reportError(form("Unable to find configuration file '%s'",
+- configFile.get()));
++ reportError("Unable to find configuration file");
+ }
+
+ config->Read(configFile);
|
[-]
[+]
|
Added |
htdig-google-style.patch
^
|
@@ -0,0 +1,54 @@
+Index: htsearch/Display.cc
+===================================================================
+--- htsearch/Display.cc.orig
++++ htsearch/Display.cc
+@@ -694,6 +694,38 @@
+ //
+ if (nPages > 1)
+ {
++ // Assume number of page links is equal to maximum_page_buttons
++ // For example, if pageNumber=9, maximum_page_buttons=10,
++ // and nPages>=13, we get:
++ //
++ // [prev] 4 5 6 7 8 9 10 11 12 13 [next]
++
++ int nPageButtons = config->Value("maximum_page_buttons", 10);
++
++ // Initialize indexes of pages links
++ int first_page_index = 1;
++ int last_page_index = nPages;
++
++ if (nPages > nPageButtons)
++ {
++ // Try to center the current page
++ int links_on_the_left = nPageButtons/2;
++ first_page_index = pageNumber - links_on_the_left;
++ last_page_index = first_page_index + nPageButtons - 1;
++
++ // Adjust if required
++ if (first_page_index < 1)
++ {
++ first_page_index = 1;
++ last_page_index = nPageButtons;
++ }
++ else if (last_page_index > nPages )
++ {
++ last_page_index = nPages;
++ first_page_index = nPages - nPageButtons + 1;
++ }
++ }
++
+ if (pageNumber > 1)
+ {
+ str = new String("<a href=\"");
+@@ -725,9 +757,7 @@
+ QuotedStringList pnt(config->Find("page_number_text"), " \t\r\n");
+ QuotedStringList npnt(config->Find("no_page_number_text"), " \t\r\n");
+ QuotedStringList sep(config->Find("page_number_separator"), " \t\r\n");
+- if (nPages > config->Value("maximum_page_buttons", 10))
+- nPages = config->Value("maximum_page_buttons", 10);
+- for (i = 1; i <= nPages; i++)
++ for (i = first_page_index; i <= last_page_index; i++)
+ {
+ if (i == pageNumber)
+ {
|
[-]
[+]
|
Added |
htdig-quoting.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;
|
[-]
[+]
|
Added |
htdig-rundig.patch
^
|
@@ -0,0 +1,24 @@
+Index: installdir/rundig
+===================================================================
+--- installdir/rundig.orig
++++ installdir/rundig
+@@ -30,13 +30,17 @@
+ done
+
+ # If -a specified, note the database directory to move the temp files correctly
+-# TODO: Should also check for files relative to COMMONDIR.
+ if [ -f "$conffile" ]
+ then
+ new_db_dir=`awk '/^[^#a-zA-Z]*database_dir/ { print $NF }' < $conffile`
+ if [ "$new_db_dir" != "" ]
+ then
+- DBDIR=$new_db_dir
++ DBDIR=$new_db_dir
++ fi
++ new_dir=`awk '/^[^#a-zA-Z]*common_dir/ { print $NF }' < $conffile`
++ if [ "$new_dir" != "" ]
++ then
++ COMMONDIR=$new_dir
+ fi
+ else
+ echo "Config file $conffile cannot be found"
|
[-]
[+]
|
Added |
htdig-simpleUTF8.patch
^
|
@@ -0,0 +1,74 @@
+Index: htnet/HtHTTP.cc
+===================================================================
+--- htnet/HtHTTP.cc.orig
++++ htnet/HtHTTP.cc
+@@ -643,6 +643,8 @@
+ String line = 0;
+ int inHeader = 1;
+
++ _needUTF8Convert = 0;
++
+ if (_response._modification_time)
+ {
+ delete _response._modification_time;
+@@ -731,8 +733,15 @@
+ token = strtok(token, "\n\t");
+
+ if (token && *token)
++ {
+ _response._content_type = token;
+-
++ if ((_response._content_type.indexOf("text/html") != -1) && (_response._content_type.indexOf("UTF-8") != -1))
++ {
++ if ( debug > 4 )
++ cout << "needUTF8Convert flagged" << endl;
++ _needUTF8Convert = 1;
++ }
++ }
+ }
+ else if( ! mystrncasecmp((char*)line, "content-length:", 15))
+ {
+@@ -970,6 +979,31 @@
+
+ }
+
++ if ( _needUTF8Convert )
++ {
++ if ( debug > 4 )
++ cout << "Converting UTF-8 characters" << endl;
++
++ char *srcPtr, *dstPtr;
++ srcPtr = dstPtr = _response._contents.get();
++ while ( *srcPtr )
++ {
++ if ( ( *srcPtr & 0x80 ) == 0 )
++ *dstPtr++ = *srcPtr++;
++ else if ( ( *srcPtr & 0xE0 ) == 0xC0 ) {
++ *dstPtr++ = (((*srcPtr & 0x03) << 6) | (*(srcPtr+1) & 0x3F) ) & 0xFF;
++ srcPtr += 2;
++ } else if ( ( *srcPtr & 0xF0 ) == 0xE0 ) {
++ *dstPtr++ = '?';
++ srcPtr += 3;
++ } else {
++ *dstPtr++ = '?';
++ srcPtr += 4;
++ }
++ }
++ *dstPtr = 0;
++ }
++
+ // Set document length
+ _response._document_length = _response._contents.length();
+
+Index: htnet/HtHTTP.h
+===================================================================
+--- htnet/HtHTTP.h.orig
++++ htnet/HtHTTP.h
+@@ -316,6 +316,7 @@
+ int _bytes_read; // Bytes read
+ URL _url; // URL to retrieve
+ URL _referer; // Referring URL
++ int _needUTF8Convert; // Flag for simple UTF-8 convert
+
+ String _accept_language; // accept-language directive
+
|
[-]
[+]
|
Added |
htsearch-gcc41.patch
^
|
@@ -0,0 +1,14 @@
+--- htsearch/Collection.h
++++ htsearch/Collection.h
+@@ -36,9 +36,9 @@
+ const char *docExcerpt);
+ ~Collection();
+
+- void Collection::Open();
++ void Open();
+
+- void Collection::Close();
++ void Close();
+
+ char *getWordFile() { return wordFile.get(); }
+ DocumentRef *getDocumentRef(int id);
|
[-]
[+]
|
Added |
htstats-3.2-zerowordssegfault.patch
^
|
@@ -0,0 +1,12 @@
+--- httools/htstat.cc
++++ httools/htstat.cc
+@@ -158,7 +158,8 @@
+ if(words.Open(config->Find("word_db"), O_RDONLY) == OK)
+ {
+ cout << "htstat: Total words: " << words.WordRefs()->Count() << endl;
+- cout << "htstat: Total unique words: " << words.Words()->Count() << endl;
++ if (words.WordRefs()->Count() != 0)
++ cout << "htstat: Total unique words: " << words.Words()->Count() << endl;
+ words.Close();
+ }
+
|
|
Added |
htdig-3.2.0b6.tar.bz2
^
|
[-]
[+]
|
Added |
htdig-README.SuSE
^
|
@@ -0,0 +1,14 @@
+Changes for htdig:
+==================
+
+The htdig 'main' dir is now /srv/www/htdig, there is a subdir
+conf where the configuration file is to be found.
+/etc/htdig/htdig.conf is the htdig configuration file.
+
+Tools like htdig, htdump, etc. are installed in /usr/bin.
+
+The probably large databases go to /var/lib/htdig/db.
+
+The online documentation is in /usr/share/doc/packages/htdig
+if you install the htdig-doc package.
+
|
|
Added |
ready
^
|