Your message dated Sat, 20 Aug 2022 21:21:24 +0000
with message-id <[email protected]>
and subject line Bug#1017562: fixed in urlview 0.9-23
has caused the Debian Bug report #1017562,
regarding urlview: url_handler.sh needlessly depends on bash, the corresponding 
description in README.Debian is wrong
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1017562: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1017562
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: urlview
Version: 0.9-22
Severity: minor
Tags: patch

Dear Maintainer,

See subject. I'm attaching patches that fix both issues
(based on Salsa HEAD), and have opened
  https://salsa.debian.org/debian/urlview/-/merge_requests/2

Best,
наб

-- System Information:
Debian Release: 11.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-16-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages urlview depends on:
ii  libc6           2.31-13+deb11u3
ii  libncurses6     6.2+20201114-2
ii  libtinfo6       6.2+20201114-2
ii  sensible-utils  0.0.14

Versions of packages urlview recommends:
ii  lynx [www-browser]  2.9.0dev.6-3~deb11u1
ii  w3m [www-browser]   0.5.3+git20210102-6

Versions of packages urlview suggests:
pn  mutt          <none>
pn  ncftp | lftp  <none>
ii  wget          1.21-1+deb11u1

-- no debconf information
From 980daf20fff8ff83b09dc596206e1c77ac39e4ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Wed, 17 Aug 2022 21:27:09 +0200
Subject: [PATCH 1/2] d/url_handler: don't require bash for no reason,
 shellcheck-clean
X-Mutt-PGP: OS

Behavioural changes:
  * for the FTP "Is \"$filename\" a file? (y/N)" question,
    don't process backslash-escapes (realistically no change)
    and allow 1 for yes (this matches glibc locales better)
  * the error now reads
      Unknown URL protocol $type.
      Please report URL and viewer to:
        [email protected]
      Press enter to continue... <cursor>
    instead of
      Unknown URL type.  Please report URL and viewer to
      [email protected].
      Press enter to continue..<cursor>
  * the error prompt doesn't parse backslash escapes,
    so it *actually* terminates at the first enter, always
  * if ran as bare program, the handler gets execed

Configuration changes:
  * https_progs merged into http_progs; they were already aliased
---
 debian/README.Debian  |  2 +-
 debian/changelog      |  8 ++++-
 debian/url_handler.sh | 71 +++++++++++++++++++------------------------
 3 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 35d6ae3..19244be 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -7,7 +7,7 @@ read a system-wide configuration file. This allows the system administrator
 to set a unified way to handle embedded URLs.
 
 From release 0.7-4 url-handler.sh was substituted with a version developed 
-by Martin Schulze <[email protected]>. It's a bash shell script that will
+by Martin Schulze <[email protected]>. It's a shell script that will
 try to use any of the mentioned programs. There is a configuration section at
 the top of the file after the license statement. For each type of tag we
 have
diff --git a/debian/changelog b/debian/changelog
index c99e725..5b18c3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,10 @@
-urlview (0.9-22) unstable; urgency=medium
+urlview (0.9-23) unstable; urgency=medium
+
+  * d/url_handler: don't require bash for no reason, shellcheck-clean
+
+ -- наб <[email protected]>  Wed, 17 Aug 2022 21:24:39 +0200
+
+ urlview (0.9-22) unstable; urgency=medium
 
   [ Emanuele Rocca ]
   * Move to dh and dh-autoreconf Closes: #993875
diff --git a/debian/url_handler.sh b/debian/url_handler.sh
index 487220f..8c2599b 100644
--- a/debian/url_handler.sh
+++ b/debian/url_handler.sh
@@ -1,4 +1,4 @@
-#! /bin/bash 
+#! /bin/sh
 
 #   Copyright (c) 1998  Martin Schulze <[email protected]>
 #   Slightly modified by:
@@ -32,7 +32,6 @@
 
 # The lists of programs to be executed are
 http_prgs="/usr/bin/sensible-browser:PW /usr/bin/sensible-browser:XT /usr/bin/galeon:PW /usr/bin/konqueror:PW /usr/bin/mozilla:PW /usr/bin/lynx:XT /usr/bin/w3m:XT /usr/bin/links:XT"
-https_prgs=$http_prgs
 mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/alpine:VT /usr/bin/pine:VT /usr/bin/mail:VT"
 gopher_prgs="/usr/bin/gopher:XT /usr/bin/lynx:XT"
 ftp_prgs="/usr/bin/ncftp:XT /usr/bin/lftp:XT $http_prgs"
@@ -46,16 +45,13 @@ XTERM=/usr/bin/x-terminal-emulator
 ###########################################################################
 # Change below this at your own risk
 ###########################################################################
-function getprg()
+getprg()
 {
-    local ele tag prog
-
-    for ele in $*
-    do
+    for ele; do
 	tag=${ele##*:}
 	prog=${ele%%:*}
-	if [ -x $prog ]; then
-	    case $tag in
+	if [ -x "$prog" ]; then
+	    case "$tag" in
 	    PW) [ -n "$DISPLAY" ] && echo "P:$prog" && return 0
 	    	;;
 	    XW)
@@ -80,7 +76,7 @@ type=${url%%:*}
 
 if [ "$url" = "$type" ]; then
     type=${url%%.*}
-    case $type in
+    case "$type" in
     www|web|www[1-9])
 	type=http
 	;;
@@ -90,52 +86,49 @@ fi
 
 if [ "$type" = "ftp" ]; then
     filename=${url##*/}
-    if [ $filename ]; then
+    if [ -n "$filename" ]; then
     	echo "Is \"$filename\" a file? (y/N)";
-    	read x
-    	case $x in 
-    	y|Y)
-        	type=file
-		;;
-    	*)
-    		;;
-    	esac
+	read -r x
+	[ "${x#[yY1]}" != "$x" ] && type="file"
     fi
 fi
 
-case $type in
-https)
-    prg=`getprg $https_prgs`
-    ;;
-http)
-    prg=`getprg $http_prgs`
+case "$type" in
+http|https)
+    prg=$(getprg $http_prgs)
     ;;
 ftp)
-    prg=`getprg $ftp_prgs`
+    prg=$(getprg $ftp_prgs)
     ;;
 mailto)
-    prg=`getprg $mailto_prgs`
+    prg=$(getprg $mailto_prgs)
     ;;
 gopher)
-    prg=`getprg $gopher_prgs`
+    prg=$(getprg $gopher_prgs)
     ;;
 file)
-    prg=`getprg $file_prgs`
+    prg=$(getprg $file_prgs)
     ;;
 *)
-    echo "Unknown URL type.  Please report URL and viewer to"
-    echo "[email protected]."
-    echo -n "Press enter to continue.."; read x
+    echo "Unknown URL protocol $type."
+    echo "Please report URL and viewer to:"
+    echo "  [email protected]"
+    printf "Press enter to continue... "
+    read -r _
     exit
     ;;
 esac
 
 if [ -n "$prg" ]; then
-   if [ "${prg%:*}" = "P" ]; then
-    nohup ${prg#*:} $url 2>/dev/null 1>/dev/null &
-   elif [ "${prg%:*}" = "X" ]; then
-    ${prg#*:} $url 2>/dev/null &
-   else
-    $prg $url
-   fi
+    case "${prg%:*}" in
+	P)
+	    nohup ${prg#*:} "$url" 2>/dev/null 1>&2 &
+	    ;;
+	X)
+	    ${prg#*:} "$url" 2>/dev/null &
+	    ;;
+	*)
+	    exec $prg "$url"
+	    ;;
+    esac
 fi
-- 
2.30.2

From 6127f4e42a07f28b1cdad461c8906e55c40bfad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Wed, 17 Aug 2022 21:43:04 +0200
Subject: [PATCH 2/2] d/README.Debian: align with reality w.r.t. url_handler.sh
X-Mutt-PGP: OS

---
 debian/README.Debian  | 29 +++++++++++++++--------------
 debian/changelog      |  3 ++-
 debian/url_handler.sh |  2 --
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 19244be..fe35639 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,34 +1,35 @@
 urlview for DEBIAN
 ------------------
 
-The urlview package was created with some slight modifications on the 
-upstream sources. The most important is that Debian's urlview will 
+The urlview package was created with some slight modifications on the
+upstream sources. The most important is that Debian's urlview will
 read a system-wide configuration file. This allows the system administrator
 to set a unified way to handle embedded URLs.
 
-From release 0.7-4 url-handler.sh was substituted with a version developed 
+From release 0.7-4 url_handler.sh was substituted with a version developed
 by Martin Schulze <[email protected]>. It's a shell script that will
 try to use any of the mentioned programs. There is a configuration section at
 the top of the file after the license statement. For each type of tag we
 have
 
-(www)prgs="/path/to/program1:TAG1 /path/to/program2:TAG2 ..."
+(http|mailto|...)_prgs="/path/to/program1:TAG1 /path/to/program2:TAG2 ..."
 
 The script will try to execute the first of those found. The TAG is
-interpreted to check how this program is to executed. There are currently
-three possible tags,
-
-XW: The program works only under X
-VT: Launch this program in the current terminal
-XT: Launch a new xterm (if under X) and run the program there or do as in VT.
+interpreted to check how this program is to executed.
+There are four valid TAGs:
+  XW: X program ($DISPLAY must be set), detached
+  PW: likewise, but protect with nohup(1) –
+      will persist after the calling tty closes
+  VT: just execute program in the current context
+  XT: if under X and $XTERM is executable, run in a new detached $XTERM window;
+      otherwise, like VT
 
 XTERM holds the name of the terminal program used. This can be changed to any
-program of your liking but care should be taken so that it support the
-standard -T option to set the title.
+program of your liking, but defaults to /usr/bin/x-terminal-emulator.
 
 Note that urlview has some problems handling mime-encoded input.
-In order to avoid these problems is possible to set the pipe_decode variable 
-in mutt. Another way is to pass the input through mimedecode, which is 
+In order to avoid these problems is possible to set the pipe_decode variable
+in mutt. Another way is to pass the input through mimedecode, which is
 provided by the Debian package of the same name.
 
 Luis Francisco Gonzalez <[email protected]> Fri Jun 12 11:26:47 BST 1998
diff --git a/debian/changelog b/debian/changelog
index 5b18c3a..2ddeb70 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 urlview (0.9-23) unstable; urgency=medium
 
   * d/url_handler: don't require bash for no reason, shellcheck-clean
+  * d/README.Debian: align with reality w.r.t. url_handler.sh
 
- -- наб <[email protected]>  Wed, 17 Aug 2022 21:24:39 +0200
+ -- наб <[email protected]>  Wed, 17 Aug 2022 21:42:22 +0200
 
  urlview (0.9-22) unstable; urgency=medium
 
diff --git a/debian/url_handler.sh b/debian/url_handler.sh
index 8c2599b..406b74b 100644
--- a/debian/url_handler.sh
+++ b/debian/url_handler.sh
@@ -37,8 +37,6 @@ gopher_prgs="/usr/bin/gopher:XT /usr/bin/lynx:XT"
 ftp_prgs="/usr/bin/ncftp:XT /usr/bin/lftp:XT $http_prgs"
 file_prgs="/usr/bin/wget:XT /usr/bin/snarf:XT"
 
-# Program used as an xterm (if it doesn't support -T you'll need to change
-# the command line in getprg)
 XTERM=/usr/bin/x-terminal-emulator
 
 
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: urlview
Source-Version: 0.9-23
Done: Emanuele Rocca <[email protected]>

We believe that the bug you reported is fixed in the latest version of
urlview, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Emanuele Rocca <[email protected]> (supplier of updated urlview package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 20 Aug 2022 22:17:46 +0200
Source: urlview
Architecture: source
Version: 0.9-23
Distribution: unstable
Urgency: medium
Maintainer: Emanuele Rocca <[email protected]>
Changed-By: Emanuele Rocca <[email protected]>
Closes: 598508 693785 933388 1017562 1017569
Changes:
 urlview (0.9-23) unstable; urgency=medium
 .
   [ Emanuele Rocca ]
   * d/url_handler.sh: properly use nohup or suppress STDERR.
     Thanks Daniel Reichelt for the patch. Closes: #933388
   * d/README.Debian: do not mention mimedecode, the package has been removed a
     while ago. Closes: #693785
   * Allow dumping URLs to stdout by setting the URLVIEW_DEBUG environment
     variable. Thanks Francois Lallart. Closes: #598508
   * Fix warning about implicit declaration of function 'quote'.
     Thanks Joshua Root for the patch.
   * Enable Salsa CI Pipeline.
   * Add autopkgtests.
   * d/control: set Standards-Version to 4.6.1.
 .
   [ наб ]
   * d/url_handler.sh: do not require bash for no reason, shellcheck-clean
   * d/README.Debian: align with reality w.r.t. url_handler.sh
     Closes: #1017562
   * d/control: depend on libcurses-dev directly
   * Link against libncursesw, fixing display of non-ASCII URLs
     Closes: #1017569
Checksums-Sha1:
 f3082c6d9691749d720e75eef33338dd47925991 1763 urlview_0.9-23.dsc
 678ac0cbcf20117cadfe6d14bb868b9de7c35e33 171844 urlview_0.9-23.diff.gz
 b27973e7d25509b1aeea55bb8fe1d6efb241cb9c 6288 urlview_0.9-23_amd64.buildinfo
Checksums-Sha256:
 49c4854d507b7b15f7e84f817428c7ba20a8e5a1d97acd21ab1a5dbf598c483e 1763 
urlview_0.9-23.dsc
 32dcff6d032ae23f100a42cb7b23573338033b5e0613b20813324ddb417ce86f 171844 
urlview_0.9-23.diff.gz
 0776164711b633b6aa8b815a2cbfaed3dee155b5d295db10fd27f497710fbde4 6288 
urlview_0.9-23_amd64.buildinfo
Files:
 31d64c15184e435b9290f0eeb7252550 1763 misc optional urlview_0.9-23.dsc
 0ba6c17b6cce97b53199fb2039939e05 171844 misc optional urlview_0.9-23.diff.gz
 c76c2ed2414f400fff4b5883d0e8e574 6288 misc optional 
urlview_0.9-23_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEElUWWlhkoHBf/rFiR1QhaB1D9t6MFAmMBTlMACgkQ1QhaB1D9
t6N5nw//YLCeJV8A9LQQkbo1twf1EsPuMbDUlAJGAd6sWNM+SdTFqAgUw56f8Gpd
GD58gAdCarwhH4eHwqPrqTd8pGKKu7yY8zDgsn9Bkpl4bKBxGkhSaDGLiA5nYfmZ
wIwzbejdjygQmg6kFpXTWb3UoSzJkF0K60bfbLrJ8pfM17ViHvMOIhthh66A4rnL
vICw2ZiVwsYUSkW6XhtjSSRH/9FbV40iYOekJa1Y5aTNL/6K2ogqKwSuV9kZtjBa
2Z5mO2joAV+tzWMfWntPzq0ncNYDTCmpavwAPRYoV77TEyrxvCDx9hcI/KIsPD7n
/zVdyYe6MtM9WIrCvNr4be+25xmuFCABKmKPZoWNbkMwfvA5xQlKeZYv1GZh3U/b
NwAcOWxwthAZQ6N4bp6m0cfICUjyHNUKJD9Fnm1NAiLLHBBYUGO2r+V6TPH6wEjn
FIoDfu3/ZxC7QlsVAJ3EejbNSAOj5LhoTnbaXUXoTYd8ki44cjyo/IRd8B6FEWox
NjMr/hZufwdLVlVPR3irWVP6TzNIc+3J4wUrEpDS/yeR5t6gKviPIuojqV0KWu+R
mfvtHwzUmbw8ZnRcM2WhKb/Er8Mn1Hl2YeeKMyRUFP8L3IoBkQsFWo4KMy1wLc0t
PS88aevAoYkmaHHqR0RlI3HJfSezWWGF7xTmUJJmnsjWjO6LNpM=
=Taqj
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to