Package: tiger
Version: 1:3.2.4~rc1-3
Severity: important
Tags: patch

Every time the cronjob runs, I get emails containing this:

  /bin/which: this version of 'which' is deprecated and should not be used.

This is due to a recent change in debianutils:

  * The 'which' utility will be removed in the future.  Shell scripts
    often use it to check whether a command is available.  A more
    standard way to do this is with 'command -v'; for example:
      if command -v update-icon-caches >/dev/null; then
        update-icon-caches /usr/share/icons/...
      fi
    '2>/dev/null' is unnecessary when using 'command': POSIX says "no
    output shall be written" if the command isn't found.  It's also
    unnecessary for the debianutils version of 'which', and hides the
    deprecation warning.

https://salsa.debian.org/debian/debianutils/-/blob/5aeca1e3b14c08b5ab92995e91efcc2b3806a639/debian/NEWS#L7-16

Attached is a patch which replaces the `which` command with `command -v`.

Francois

-- System Information:
Debian Release: 11.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_CA.utf8, LC_CTYPE=fr_CA.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tiger depends on:
ii  binutils               2.37-4
ii  bsdutils               1:2.37.2-1
ii  debconf [debconf-2.0]  1.5.77
ii  debianutils            5.3-1
ii  libc6                  2.31-16
ii  lsb-release            11.1.0
ii  net-tools              1.60+git20181103.0eebece-1
ii  ucf                    3.0043

Versions of packages tiger recommends:
ii  chkrootkit                      0.54-1+b2
pn  john                            <none>
ii  postfix [mail-transport-agent]  3.5.6-1+b1
pn  tripwire | aide                 <none>

Versions of packages tiger suggests:
ii  lsof   4.93.2+dfsg-1.1
pn  lynis  <none>

-- debconf information:
* tiger/policy_adapt:
* tiger/mail_rcpt: root
diff --git a/systems/Linux/2/gen_bootparam_sets b/systems/Linux/2/gen_bootparam_sets
index bd91690..c8c1b95 100755
--- a/systems/Linux/2/gen_bootparam_sets
+++ b/systems/Linux/2/gen_bootparam_sets
@@ -25,10 +25,10 @@
 #
 
 # If run directly do this, just in case:
-[ -z "$AWK" ] && AWK=`which awk`
-[ -z "$SED" ] && AWK=`which sed`
-[ -z "$RM" ] && RM=`which rm`
-[ -z "$YPCAT" ] && YPCAT=`which ypcat 2>/dev/null`
+[ -z "$AWK" ] && AWK=`command -v awk`
+[ -z "$SED" ] && AWK=`command -v sed`
+[ -z "$RM" ] && RM=`command -v rm`
+[ -z "$YPCAT" ] && YPCAT=`command -v ypcat`
 [ -z "$WORKDIR" ] && WORKDIR=/tmp
 
 [ -r /etc/bootparams ] && {
diff --git a/systems/Linux/2/gen_cron b/systems/Linux/2/gen_cron
index caaf498..2cc361c 100755
--- a/systems/Linux/2/gen_cron
+++ b/systems/Linux/2/gen_cron
@@ -35,9 +35,9 @@
 #-----------------------------------------------------------------------------
 #
 # Defin commands we need, just in case
-[ -z "$FIND" ] && FIND=`which find` 
-[ -z "$LS" ] && LS=`which ls` 
-[ -z "$SED" ] && SED=`which sed` 
+[ -z "$FIND" ] && FIND=`command -v find` 
+[ -z "$LS" ] && LS=`command -v ls` 
+[ -z "$SED" ] && SED=`command -v sed` 
 [ -z "$CRONSPOOL" ] && CRONSPOOL="/var/spool/cron/crontabs"
 
 [ ! -n "$GETUSERHOME" ] && GETUSERHOME=echo
diff --git a/systems/Linux/2/gen_export_sets b/systems/Linux/2/gen_export_sets
index 23838f9..76b7ba3 100755
--- a/systems/Linux/2/gen_export_sets
+++ b/systems/Linux/2/gen_export_sets
@@ -23,9 +23,9 @@
 #-----------------------------------------------------------------------------
 #
 # For debugging purposes
-[ -z "$GREP" ] && GREP=`which grep`
-[ -z "$SED" ] && SED=`which sed`
-[ -z "$AWK" ] && AWK=`which awk`
+[ -z "$GREP" ] && GREP=`command -v grep`
+[ -z "$SED" ] && SED=`command -v sed`
+[ -z "$AWK" ] && AWK=`command -v awk`
 [ -z "$WORKDIR" ] && WORKDIR=/tmp
 
 EXPFILE=/etc/exports
diff --git a/systems/Linux/2/gen_group_sets b/systems/Linux/2/gen_group_sets
index 93ef408..9e4cbbb 100755
--- a/systems/Linux/2/gen_group_sets
+++ b/systems/Linux/2/gen_group_sets
@@ -24,13 +24,13 @@
 #
 
 # If run directly do this, just in case:
-[ -z "$GREP" ] && GREP=`which grep`
-[ -z "$AWK" ] && AWK=`which awk`
-[ -z "$SED" ] && SED=`which sed`
-[ -z "$SORT" ] && SORT=`which sort`
-[ -z "$COMM" ] && COMM=`which comm`
-[ -z "$RM" ] && RM=`which rm`
-[ -z "$YPCAT" ] && YPCAT=`which ypcat 2>/dev/null`
+[ -z "$GREP" ] && GREP=`command -v grep`
+[ -z "$AWK" ] && AWK=`command -v awk`
+[ -z "$SED" ] && SED=`command -v sed`
+[ -z "$SORT" ] && SORT=`command -v sort`
+[ -z "$COMM" ] && COMM=`command -v comm`
+[ -z "$RM" ] && RM=`command -v rm`
+[ -z "$YPCAT" ] && YPCAT=`command -v ypcat`
 [ -z "$WORKDIR" ] && WORKDIR=/tmp
 
 
diff --git a/systems/Linux/2/gen_mounts b/systems/Linux/2/gen_mounts
index 0f3fb67..5bc3477 100755
--- a/systems/Linux/2/gen_mounts
+++ b/systems/Linux/2/gen_mounts
@@ -184,6 +184,7 @@ localfs()
   [ "$1" = "fuse.gvfsd-fuse" ] && LOCAL=1       # Used in Ubuntu 13.10 (Saucy Salamander) replaces fuse.gvfs-fuse-daemon
   [ "$1" = "fuse.ltspfs" ] && LOCAL=0 		# Used by LTSP 5.x
   [ "$1" = "fuse.lxcfs" ] && LOCAL=0
+  [ "$1" = "fuse.portal" ] && LOCAL=0
   [ "$1" = "fuse.clamfs" ] && LOCAL=0           # ClamFS anti-virus protected file system
   [ "$1" = "fuse.javafs" ] && LOCAL=0           # Java FS, used by Wuala secure online storage, see:
                                                 # https://github.com/puniverse/javafs
@@ -362,10 +363,10 @@ localfs()
 }
 
 # If run directly do this, just in case:
-[ -z "$GETFS" ] && GETFS=`which mount`
-[ -z "$SED" ] && SED=`which sed`
-[ -z "$BASENAME" ] && BASENAME=`which basename`
-[ -z "$EGREP" ] && EGREP=`which egrep`
+[ -z "$GETFS" ] && GETFS=`command -v mount`
+[ -z "$SED" ] && SED=`command -v sed`
+[ -z "$BASENAME" ] && BASENAME=`command -v basename`
+[ -z "$EGREP" ] && EGREP=`command -v egrep`
 
 $GETFS  |
 while read line
diff --git a/systems/Linux/2/gen_passwd_sets b/systems/Linux/2/gen_passwd_sets
index 908897c..b4a084a 100755
--- a/systems/Linux/2/gen_passwd_sets
+++ b/systems/Linux/2/gen_passwd_sets
@@ -56,15 +56,15 @@
 #
 
 # If run directly do this, just in case:
-[ -z "$SORT" ] && SORT=`which sort`
-[ -z "$JOIN" ] && JOIN=`which join`
-[ -z "$GREP" ] && GREP=`which grep`
-[ -z "$AWK" ] && AWK=`which awk`
-[ -z "$CAT" ] && CAT=`which cat`
-[ -z "$RM" ] && RM=`which rm`
-[ -z "$CP" ] && CP=`which cp`
-[ -z "$YPCAT" ] && YPCAT=`which ypcat 2>/dev/null`
-[ -z "$GETENT" ] && GETENT=`which getent 2>/dev/null`
+[ -z "$SORT" ] && SORT=`command -v sort`
+[ -z "$JOIN" ] && JOIN=`command -v join`
+[ -z "$GREP" ] && GREP=`command -v grep`
+[ -z "$AWK" ] && AWK=`command -v awk`
+[ -z "$CAT" ] && CAT=`command -v cat`
+[ -z "$RM" ] && RM=`command -v rm`
+[ -z "$CP" ] && CP=`command -v cp`
+[ -z "$YPCAT" ] && YPCAT=`command -v ypcat`
+[ -z "$GETENT" ] && GETENT=`command -v getent`
 [ -z "$WORKDIR" ] && WORKDIR=/tmp
 
 local=0

Reply via email to