On Thu, Jun 23, 2005 at 10:42:33AM +0100, aaron wrote:
> Package: dpkg-www
> Version: N/A; reported 2005-06-23
> Severity: wishlist
> Tags: patch
>
>
> When setting up dpkg-www I wanted to install it with a URL of
> something other than /cgi-bin/ (e.g /packages/), and also have
> info2www and dwww appear in this location (e.g /packages/dwww).
> Below is a patch which enables this.
>
> aaron
>
> --- dpkg-www-2.47.orig/src/dpkg
> +++ dpkg-www-2.47/src/dpkg
> @@ -105,6 +105,8 @@
> BGCOLOR="#c0c0c0"
> KEEP_INPUT=0
> DEBUG=0
> +DWWW_PATH="/cgi-bin/dwww"
> +INFO2WWW_PATH="/cgi-bin/info2www"
>
> # Install buttons support. This require that users define the following
> # mime action in their netscape mailcap file:
> @@ -132,7 +134,7 @@
>
> # Select the Manpage to HTML translator
> if [ "$MAN" = dwww ]; then
> - MAN="/cgi-bin/dwww?type=man\\\\&location="
> + MAN="${DWWW_PATH}?type=man\\\\&location="
> fi
> if [ "$MAN" = man2html ]; then
> if [ -x /usr/lib/cgi-bin/man/man2html ]; then
> @@ -140,7 +142,7 @@
> elif [ -x /usr/lib/cgi-bin/man2html ]; then
> MAN="/cgi-bin/man2html?"
> else
> - MAN="/cgi-bin/dwww?type=man\\\\&location="
> + MAN="${DWWW_PATH}?type=man\\\\&location="
> fi
> fi
> if [ ! "$MAN" -o "$MAN" = auto ]; then
> @@ -149,7 +151,7 @@
> elif [ -x /usr/lib/cgi-bin/man2html ]; then
> MAN="/cgi-bin/man2html?"
> else
> - MAN="/cgi-bin/dwww?type=man\\\\&location="
> + MAN="${DWWW_PATH}?type=man\\\\&location="
> fi
> fi
>
> @@ -1091,7 +1093,8 @@
> # Convert a file list to html adding hrefs to files in /usr/{doc,info,man}.
> #
> fileFilter() {
> - awk -v title="$*" -v show_local_files="$SHOW_LOCAL_FILES" -v man="$MAN" '
> + awk -v title="$*" -v show_local_files="$SHOW_LOCAL_FILES" \
> + -v man="$MAN" -v info2www=$INFO2WWW_PATH -v dwww=$DWWW_PATH '
> /\/usr\/(share\/)?([a-zA-Z0-9_+-]+\/)?man\/.*\..*/ {
> if (title) { t = title } else { t = $1 }
> if ($2) { t = t " [" $2 "]"; NF=1 }
> @@ -1110,7 +1113,7 @@
> gsub("\\+", "\\+", r);
> gsub("\\+", "%2B", s);
> gsub("\\$","\\$",r)
> - sub(r, "<A HREF=\"/cgi-bin/info2www?" s "\">" t "</A>")
> + sub(r, "<A HREF=\"" info2www "?" s "\">" t "</A>")
> print
> next
> }
> @@ -1124,7 +1127,7 @@
> if (show_local_files == "true") {
> sub(r, "<A HREF=\"file:" s "\">" t "</A>")
> } else {
> - sub(r, "<A HREF=\"/cgi-bin/dwww?type=file\\&location=" s
> "\">"\
> + sub(r, "<A HREF=\"" dwww "?type=file\\&location=" s "\">"\
> t "</A>")
> }
> print
> --- dpkg-www-2.47.orig/src/dpkg-www.conf
> +++ dpkg-www-2.47/src/dpkg-www.conf
> @@ -42,4 +42,10 @@
> # Enable cgi debugging. Not really useful to normal users.
> # DEBUG=1
>
> +# Path on webserver to dwww
> +DWWW_PATH="/cgi-bin/dwww"
> +
> +# Path on webserver to info2www
> +INFO2WWW_PATH="/cgi-bin/info2www"
> +
> # end of file
>
>
The patch doesn't work:
$ patch -p1 -b < paych
patching file src/dpkg
Hunk #2 FAILED at 134.
Hunk #3 FAILED at 142.
Hunk #4 FAILED at 151.
Hunk #5 FAILED at 1093.
Hunk #6 FAILED at 1113.
Hunk #7 FAILED at 1127.
6 out of 7 hunks FAILED -- saving rejects to file src/dpkg.rej
patching file src/dpkg-www.conf
Could you please send a working patch in a separate mail attachment?
Thanks
Massimo Dal Zotto
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]