Package: global Version: 4.7-1.1 I have filed two bug reports with the titles of the subject at the Ubuntu bug tracker (see pages:)
1. https://bugs.launchpad.net/ubuntu/+source/global/+bug/614847 2. https://bugs.launchpad.net/ubuntu/+source/global/+bug/717536 Although a different distribution, looking the source debs seems that the package is the original debian one. Thus the bugs are revelant. I repeat below, for your convenience, the original reports as well as the patches to mitigate the bugs. regards George Zarkadas 1. /usr/lib/cgi-bin/gsearch.cgi fails with missing /usr/bin/btreeop ------------------------------------------------------------------- `/usr/bin/btreeop' has been removed from the upstream (source) package since 2002 (see changelog of global's .tar.gz archive); however the .deb package's `htconfig' script, which creates `/usr/lib/cgi-bin/gsearch.cgi' during the postinst package action has not been updated to reflect this (htconfig man page dates from 1999). Thus, `/usr/lib/cgi-bin/gsearch.cgi' fails to search for patterns entered from the web form, filling apache2 logs with lines such as this (...xxx... fields contain cleaned-up info): ------------------------------------------------- [...date...] [error] [client 127.0.0.1] sh: /usr/bin/btreeop: not found, referer: http://localhost/...my-project-url.../mains.html ------------------------------------------------- To resolve the bug, the offending lines of code in the `gsearch.cgi' script and `htconfig' script (that creates the former) must be changed to use the new facilities provided from the upstream (source) package. #### The following modification to `gsearch.cgi' (a merge of /usr/share/gtags/global.cgi.tmpl and /usr/lib/cgi-bin/gsearch.cgi plus my additions) seems to solve the issue. Some corner cases have remained untested, but since it is a merge of previously supposed to work code, the chance of something remaining broken is low. I attach three files: <NOTE: files are in the attached tar.gz> 1. The modified, now working, revision of /usr/lib/cgi-bin/gsearch.cgi (file: gsearch.cgi) 2. A unified diff of 1 with initial /usr/lib/cgi-bin/gsearch.cgi (file: diff_gsearch.cgi) 3. A unified diff of 1 with /usr/share/gtags/global.cgi.tmpl (file: diff_global.cgi.tmpl) 2. htconfig fails to find id when --xhtml option is used with htags ------------------------------------------------------------------- In order to search for the id, htconfig uses a regular expression pattern. That pattern is only suitable for HTML pages; it cannot address the `/>' closing of empty elements that XHTML mandates. As a result if -x | --xhtml is requested htconfig fails to get id and does not update the path database. global version: 5.7.1-1 ubuntu version: 9.10 The following patch (given inline as a unified diff - the distribution executable has the .old suffix appended to its name) solves the issue. Essentially it removes the `>' char from the end of the pattern. --- /usr/bin/htconfig.old 2011-02-12 04:14:46.854957173 +0200 +++ /usr/bin/htconfig 2011-02-12 04:16:10.886874359 +0200 @@ -191 +191 @@ - $id = $1 if ($page =~ /name='id'\svalue='(\w+)'>/); + $id = $1 if ($page =~ /name='id'\svalue='(\w+)'/); @@ -198 +198 @@ - $id = $1 if /name='id'\svalue='(\w+)'>/; + $id = $1 if /name='id'\svalue='(\w+)'/;
global-patch.tar.gz
Description: application/compressed-tar

