From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 11:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 6124@debbugs.gnu.org Cc: 580492@bugs.debian.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12731457226325 (code B ref -1); Thu, 06 May 2010 11:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 11:35:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9zMO-0001do-5o for submit@debbugs.gnu.org; Thu, 06 May 2010 07:35:20 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9zML-0001d9-OE for submit@debbugs.gnu.org; Thu, 06 May 2010 07:35:18 -0400 Received: from lists.gnu.org ([199.232.76.165]:35051) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O9zMG-0007jm-Es for submit@debbugs.gnu.org; Thu, 06 May 2010 07:35:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9z2p-0007Ye-Oj for bug-coreutils@gnu.org; Thu, 06 May 2010 07:15:07 -0400 Received: from [140.186.70.92] (port=51526 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9z2o-0007XF-I8 for bug-coreutils@gnu.org; Thu, 06 May 2010 07:15:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9z2m-0003Oa-M5 for bug-coreutils@gnu.org; Thu, 06 May 2010 07:15:06 -0400 Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:38575) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9z2m-0003OM-Ge for bug-coreutils@gnu.org; Thu, 06 May 2010 07:15:04 -0400 Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.71) (envelope-from ) id 1O9z2k-0004Rw-76; Thu, 06 May 2010 13:15:02 +0200 Date: Thu, 6 May 2010 13:15:02 +0200 From: Vincent Lefevre Message-ID: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> Mail-Followup-To: Vincent Lefevre , bug-coreutils@gnu.org, 580492@bugs.debian.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6083-vl-r35499 (2010-04-24) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi, I've reported the following bug in the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580492 With the basename and dirname utilities from GNU Coreutils, one has: ypig% POSIXLY_CORRECT=1 basename -- basename: missing operand Try `basename --help' for more information. ypig% POSIXLY_CORRECT=1 dirname -- dirname: missing operand Try `dirname --help' for more information. instead of: ypig% busybox basename -- -- ypig% busybox dirname -- . According to POSIX[*], basename and dirname take no options (examples in POSIX also assume that), so that this would make BusyBox's behavior correct. [*] http://www.opengroup.org/onlinepubs/9699919799/utilities/basename.html http://www.opengroup.org/onlinepubs/9699919799/utilities/dirname.html -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon) From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 12:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Vincent Lefevre , bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.12731503288628 (code B ref -1); Thu, 06 May 2010 12:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 12:52:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA0Yh-0002F7-Np for submit@debbugs.gnu.org; Thu, 06 May 2010 08:52:07 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA0Yf-0002Ej-20 for submit@debbugs.gnu.org; Thu, 06 May 2010 08:52:06 -0400 Received: from lists.gnu.org ([199.232.76.165]:60795) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA0YZ-0001J9-BX for submit@debbugs.gnu.org; Thu, 06 May 2010 08:51:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA0YY-0005e2-9S for bug-coreutils@gnu.org; Thu, 06 May 2010 08:51:58 -0400 Received: from [140.186.70.92] (port=38232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA0YR-0005Vg-19 for bug-coreutils@gnu.org; Thu, 06 May 2010 08:51:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA0YJ-0001DP-AF for bug-coreutils@gnu.org; Thu, 06 May 2010 08:51:50 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]:4859) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OA0YI-0001CY-UF for bug-coreutils@gnu.org; Thu, 06 May 2010 08:51:43 -0400 Received: (qmail 96172 invoked from network); 6 May 2010 12:51:40 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 6 May 2010 12:51:40 -0000 Message-ID: <4BE2BB13.8060601@draigBrady.com> Date: Thu, 06 May 2010 13:50:27 +0100 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> In-Reply-To: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.8 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) On 06/05/10 12:15, Vincent Lefevre wrote: > Hi, > > I've reported the following bug in the Debian BTS: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580492 > > With the basename and dirname utilities from GNU Coreutils, one has: > > ypig% POSIXLY_CORRECT=1 basename -- > basename: missing operand > Try `basename --help' for more information. > ypig% POSIXLY_CORRECT=1 dirname -- > dirname: missing operand > Try `dirname --help' for more information. > > instead of: > > ypig% busybox basename -- > -- > ypig% busybox dirname -- > . > > According to POSIX[*], basename and dirname take no options (examples > in POSIX also assume that), so that this would make BusyBox's behavior > correct. > > [*] http://www.opengroup.org/onlinepubs/9699919799/utilities/basename.html > http://www.opengroup.org/onlinepubs/9699919799/utilities/dirname.html > The above busybox behavior implies that if you write a robust script like this for coreutils, that it is not portable to busybox: base=$(basename -- "$path") That also implies that we can't change the behavior. Because there is an optional suffix parameter, one can't know which behavior is required for the above example. I suppose one could choose based on POSIXLY_CORRECT. Note solaris behaves like busybox and openbsd behaves like coreutils. cheers, Pádraig. From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 13:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.12731522469600 (code B ref -1); Thu, 06 May 2010 13:25:03 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 13:24:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA13e-0002Un-6O for submit@debbugs.gnu.org; Thu, 06 May 2010 09:24:06 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA13c-0002UF-6T for submit@debbugs.gnu.org; Thu, 06 May 2010 09:24:05 -0400 Received: from lists.gnu.org ([199.232.76.165]:43661) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA13X-00026V-Ck for submit@debbugs.gnu.org; Thu, 06 May 2010 09:23:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA13W-0002lX-FY for bug-coreutils@gnu.org; Thu, 06 May 2010 09:23:58 -0400 Received: from [140.186.70.92] (port=60877 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA13P-0002dI-D7 for bug-coreutils@gnu.org; Thu, 06 May 2010 09:23:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA13E-0006hK-RT for bug-coreutils@gnu.org; Thu, 06 May 2010 09:23:51 -0400 Received: from vinc17.pck.nerim.net ([213.41.242.187]:57227 helo=prunille.vinc17.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA13E-0006g8-IQ for bug-coreutils@gnu.org; Thu, 06 May 2010 09:23:40 -0400 Received: by prunille.vinc17.org (Postfix, from userid 501) id 9938C4C0C1FB; Thu, 6 May 2010 15:23:38 +0200 (CEST) Date: Thu, 6 May 2010 15:23:38 +0200 From: Vincent Lefevre Message-ID: <20100506132338.GL24867@prunille.vinc17.org> Mail-Followup-To: Vincent Lefevre , =?UTF-8?Q?P=C3=A1draig?= Brady , bug-coreutils@gnu.org, 580492@bugs.debian.org References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2BB13.8060601@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4BE2BB13.8060601@draigBrady.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6083-vl-r35499 (2010-04-24) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.6 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) On 2010-05-06 13:50:27 +0100, P=E1draig Brady wrote: > The above busybox behavior implies that > if you write a robust script like this for coreutils, > that it is not portable to busybox: >=20 > base=3D$(basename -- "$path") If one follows POSIX, the correct way to do it is: base=3D$(basename "$path") and this is robust because the first argument is necessarily the path (it cannot be an option, even "--"). > That also implies that we can't change the behavior. According to grep 'basename --' /usr/bin/* grep 'basename \$' /usr/bin/* on my Debian machine, almost all scripts use basename without "--". The only exceptions are autoconf (but I'm not sure this counts, as there's a test for "basename --" first, and I don't know what it really expects) and savelog (from the debianutils package, thus specific to Debian, but savelog also uses `basename $0`, so that it is already inconsistent). Therefore I assume that changing coreutils would be easier. > Because there is an optional suffix parameter, one can't > know which behavior is required for the above example. > I suppose one could choose based on POSIXLY_CORRECT. I think that it should really behave correctly if POSIXLY_CORRECT is set, but also if it isn't set, given what appears to be the current practice. > Note solaris behaves like busybox and openbsd behaves like coreutils. Perhaps they're copying coreutils without looking at what POSIX says. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Ar=E9naire project (LIP, ENS-Lyon) From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Vincent Lefevre , bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127315336612220 (code B ref -1); Thu, 06 May 2010 13:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 13:42:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1Li-0003B3-5T for submit@debbugs.gnu.org; Thu, 06 May 2010 09:42:46 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1Le-0003Av-Ea for submit@debbugs.gnu.org; Thu, 06 May 2010 09:42:44 -0400 Received: from lists.gnu.org ([199.232.76.165]:40837) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA1LY-0002QD-Nw for submit@debbugs.gnu.org; Thu, 06 May 2010 09:42:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA1LX-0008Sm-Uw for bug-coreutils@gnu.org; Thu, 06 May 2010 09:42:36 -0400 Received: from [140.186.70.92] (port=51670 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA1LR-0008Pi-5a for bug-coreutils@gnu.org; Thu, 06 May 2010 09:42:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA1LK-0002JA-4W for bug-coreutils@gnu.org; Thu, 06 May 2010 09:42:28 -0400 Received: from qmta12.emeryville.ca.mail.comcast.net ([76.96.27.227]:48038) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1LJ-0002Il-Qq for bug-coreutils@gnu.org; Thu, 06 May 2010 09:42:22 -0400 Received: from omta23.emeryville.ca.mail.comcast.net ([76.96.30.90]) by qmta12.emeryville.ca.mail.comcast.net with comcast id ECG41e0061wfjNsACDiMH9; Thu, 06 May 2010 13:42:21 +0000 Received: from [192.168.0.6] ([98.202.176.54]) by omta23.emeryville.ca.mail.comcast.net with comcast id EDiL1e0011Anwcq8jDiL0E; Thu, 06 May 2010 13:42:21 +0000 Message-ID: <4BE2C727.107@redhat.com> Date: Thu, 06 May 2010 07:41:59 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> In-Reply-To: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig581ACE5BB6CBE9BFB81F2BF6" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig581ACE5BB6CBE9BFB81F2BF6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/06/2010 05:15 AM, Vincent Lefevre wrote: > Hi, >=20 > I've reported the following bug in the Debian BTS: >=20 > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D580492 That bug should be reassigned to busybox. >=20 > With the basename and dirname utilities from GNU Coreutils, one has: >=20 > ypig% POSIXLY_CORRECT=3D1 basename -- > basename: missing operand Correct. >=20 > ypig% busybox basename -- > -- Buggy. > According to POSIX[*], basename and dirname take no options (examples > in POSIX also assume that), so that this would make BusyBox's behavior > correct. No, you're missing one other key point of POSIX: http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html Section 1.4, OPTIONS: Default Behavior: When this section is listed as "None.", it means that the implementation need not support any options. Standard utilities that do not accept options, but that do accept operands, shall recognize "--" as a first argument to be discarded. The requirement for recognizing "--" is because conforming applications need a way to shield their operands from any arbitrary options that the implementation may provide as an extension. For example, if the standard utility foo is listed as taking no options, and the application needed to give it a pathname with a leading , it could safely do it as: foo -- -myfile and avoid any problems with -m used as an extension. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig581ACE5BB6CBE9BFB81F2BF6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4scrAAoJEKeha0olJ0Nq/+IH/1TKKK+Na0e3mB9grwip6BJa 2MZMMfVowD1urSc542dojIXN6EuLoTMMJNf1BCbQcteiGW6r8KBSmu169JjS3jxK d0NAJt9NGE6RJJatea3uTnX2CLWdI1JElFy9G90uxIGXLlQTmnIN9CUPgAJ2SQTa e0ueUnRROmspSl/PjpwjPc2vkjKM20LzTmPuIqK8sapCIqE/SvXK1pZ+JTQ14+UY sCS19B7+oGapzyqaZMO+zq0n79ORsyiVI0/DB2YWEX02D848epaSWTw2h2h81ZA4 vIn74Bniy7bTNx6HxkUrymoTvBXpM1bzhW9x2ceFm/qT2onHOk/qq/CDWufajwY= =FL07 -----END PGP SIGNATURE----- --------------enig581ACE5BB6CBE9BFB81F2BF6-- From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 13:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: Cc: bug-coreutils@gnu.org, Vincent Lefevre , 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127315381212475 (code B ref -1); Thu, 06 May 2010 13:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 13:50:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1St-0003FA-QT for submit@debbugs.gnu.org; Thu, 06 May 2010 09:50:12 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1Ss-0003F4-8e for submit@debbugs.gnu.org; Thu, 06 May 2010 09:50:11 -0400 Received: from lists.gnu.org ([199.232.76.165]:37632) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA1Sn-0002g1-6k for submit@debbugs.gnu.org; Thu, 06 May 2010 09:50:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA1Sm-0008Qi-H3 for bug-coreutils@gnu.org; Thu, 06 May 2010 09:50:04 -0400 Received: from [140.186.70.92] (port=50745 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA1Sh-0008JQ-FR for bug-coreutils@gnu.org; Thu, 06 May 2010 09:50:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,MISSING_HEADERS, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA1Sf-0003Y0-LN for bug-coreutils@gnu.org; Thu, 06 May 2010 09:49:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26036) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1Sf-0003Xo-Da for bug-coreutils@gnu.org; Thu, 06 May 2010 09:49:57 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46DnecZ004582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 May 2010 09:49:40 -0400 Received: from [10.3.241.4] (vpn-241-4.phx2.redhat.com [10.3.241.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46DndoO023915; Thu, 6 May 2010 09:49:39 -0400 Message-ID: <4BE2C8EB.6000901@redhat.com> Date: Thu, 06 May 2010 07:49:31 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2C727.107@redhat.com> In-Reply-To: <4BE2C727.107@redhat.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig539EB1BF2D5B1F5B263F1AD6" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.2 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.2 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig539EB1BF2D5B1F5B263F1AD6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/06/2010 07:41 AM, Eric Blake wrote: >> According to POSIX[*], basename and dirname take no options (examples >> in POSIX also assume that), so that this would make BusyBox's behavior= >> correct. >=20 > No, you're missing one other key point of POSIX: >=20 > http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html= > Section 1.4, OPTIONS: If you want more evidence from POSIX that 'basename -- foo' is mandated behavior, read up on this correction to POSIX: http://austingroupbugs.net/view.php?id=3D192 --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig539EB1BF2D5B1F5B263F1AD6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4sjsAAoJEKeha0olJ0Nqn6kIAInPJiW5UMGYy0s/2U66F3AQ k3qa5NXwkavhCWrIKxyoFuIpdmYvlobbfp9faC9KsJDhR/bt79a/Plg/eZQ9AQPh JVl3cdA8QxIBabN3Kwvgr0Q74b9I29/1BXalqCnbWNqtZnoKeyDMuja2l8rBdLfD 2r6adQsSGO6yy7eaq2uN2KH2pbJjZxANaklax1RYJ47OaM33TyDM9H9VPS0V0bRk FCQrsFs/azj2ECHaxsx2I0z/uP04JQeLRmSwluuOwgMg1xjCmqiQlwumF60yozbx BKFNWUPvqH81ZD5+7ynTVro1fODtbwmCBcet+XvIbW8fdvA+DuF9xKBCfKM98tw= =RdO8 -----END PGP SIGNATURE----- --------------enig539EB1BF2D5B1F5B263F1AD6-- From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Vincent Lefevre , =?UTF-8?Q?P=C3=A1draig?= Brady , bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127315496613019 (code B ref -1); Thu, 06 May 2010 14:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 14:09:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1lW-0003Nw-78 for submit@debbugs.gnu.org; Thu, 06 May 2010 10:09:26 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1lU-0003Np-84 for submit@debbugs.gnu.org; Thu, 06 May 2010 10:09:25 -0400 Received: from lists.gnu.org ([199.232.76.165]:56527) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA1lP-00033i-4N for submit@debbugs.gnu.org; Thu, 06 May 2010 10:09:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA1lO-0005e6-HX for bug-coreutils@gnu.org; Thu, 06 May 2010 10:09:18 -0400 Received: from [140.186.70.92] (port=51746 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA1lH-0004MZ-4A for bug-coreutils@gnu.org; Thu, 06 May 2010 10:09:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA1eg-0005Qz-02 for bug-coreutils@gnu.org; Thu, 06 May 2010 10:02:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61036) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1ef-0005Qt-On for bug-coreutils@gnu.org; Thu, 06 May 2010 10:02:21 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46E2Coo003495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 May 2010 10:02:12 -0400 Received: from [10.3.241.4] (vpn-241-4.phx2.redhat.com [10.3.241.4]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46E2BCQ012547; Thu, 6 May 2010 10:02:11 -0400 Message-ID: <4BE2CBDC.6090808@redhat.com> Date: Thu, 06 May 2010 08:02:04 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2BB13.8060601@draigBrady.com> <20100506132338.GL24867@prunille.vinc17.org> In-Reply-To: <20100506132338.GL24867@prunille.vinc17.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig23F31C76F08695B50E45572E" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.8 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.7 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig23F31C76F08695B50E45572E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/06/2010 07:23 AM, Vincent Lefevre wrote: > If one follows POSIX, the correct way to do it is: >=20 > base=3D$(basename "$path") >=20 > and this is robust because the first argument is necessarily the path > (it cannot be an option, even "--"). POSIX does not forbid applications from adding extension options. And BSD basename has done just that: SYNOPSIS basename string [suffix] basename [-a] [-s suffix] string [...] dirname string [...] And since POSIX allows FreeBSD's extensions to exist (although a portable script will not use them), it must also require that a portable app be able to guarantee a way to bypass those extensions (ergo base=3D$(basename -- "$path") is a POSIX requirement). > According to >=20 > grep 'basename --' /usr/bin/* > grep 'basename \$' /usr/bin/* >=20 > on my Debian machine, almost all scripts use basename without "--". > The only exceptions are autoconf (but I'm not sure this counts, as > there's a test for "basename --" first, Can you find an actual example of this? I think you read it incorrectly, as really, autoconf first tests for 'basename -- /', but if you indeed found an instance of autoconf testing for 'basename --', that would be a bug in autoconf that needs to be reported to that list. >> Note solaris behaves like busybox and openbsd behaves like coreutils. >=20 > Perhaps they're copying coreutils without looking at what POSIX says. Or, more likely, perhaps they are independently obeying what POSIX says, without reference to either coreutils or busybox. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig23F31C76F08695B50E45572E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4svcAAoJEKeha0olJ0NqU+gH/0TpSNz3w3gTJ2RKdnK2RRg5 o46MPq5HKFeqgar8MEoY0v6qsTHu7t77JBSi+ICwkJDBHHZzcuXu3bIMa+gZzSJ+ HSfvdAtDrD1PICNJoanzA7kTUulgD6g6ZH3CleJiOONKac8MWstTlv1bcLSbJp+L ULl9AwR6xl+JdoSVlrUdy+3tI/+UzmUcYRmkgmfYKfjgylZqaecZOVDRf1QKoO2O ckBQDBXlvxHCUv3vXrefPwiE6KaRgRN9ITkWinqoNbF2ZPaNKrBX/CcFL0wRp35T uk41QC9MnzAelIFrdaMQLZwrfWNdIJJPzIBxOUhhP6FU8J2r+hdn98SoH781G3A= =0+FQ -----END PGP SIGNATURE----- --------------enig23F31C76F08695B50E45572E-- From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake Cc: bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127315603613501 (code B ref -1); Thu, 06 May 2010 14:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 14:27:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA22l-0003Vi-UJ for submit@debbugs.gnu.org; Thu, 06 May 2010 10:27:16 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA22c-0003VK-OL for submit@debbugs.gnu.org; Thu, 06 May 2010 10:27:14 -0400 Received: from lists.gnu.org ([199.232.76.165]:36121) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA22L-0003SH-GI for submit@debbugs.gnu.org; Thu, 06 May 2010 10:26:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA22K-0002L8-I8 for bug-coreutils@gnu.org; Thu, 06 May 2010 10:26:48 -0400 Received: from [140.186.70.92] (port=58434 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA225-0000of-6m for bug-coreutils@gnu.org; Thu, 06 May 2010 10:26:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA1zp-0000bs-5S for bug-coreutils@gnu.org; Thu, 06 May 2010 10:24:14 -0400 Received: from vinc17.pck.nerim.net ([213.41.242.187]:57669 helo=prunille.vinc17.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA1zo-0000bc-Sd for bug-coreutils@gnu.org; Thu, 06 May 2010 10:24:13 -0400 Received: by prunille.vinc17.org (Postfix, from userid 501) id E201A4C0C68E; Thu, 6 May 2010 16:24:10 +0200 (CEST) Date: Thu, 6 May 2010 16:24:10 +0200 From: Vincent Lefevre Message-ID: <20100506142410.GO24867@prunille.vinc17.org> Mail-Followup-To: Vincent Lefevre , Eric Blake , bug-coreutils@gnu.org, 580492@bugs.debian.org References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2C727.107@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4BE2C727.107@redhat.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6083-vl-r35499 (2010-04-24) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.0 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) On 2010-05-06 07:41:59 -0600, Eric Blake wrote: > No, you're missing one other key point of POSIX: >=20 > http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html > Section 1.4, OPTIONS: >=20 > Default Behavior: When this section is listed as "None.", it means > that the implementation need not support any options. Standard utilitie= s > that do not accept options, but that do accept operands, shall recogniz= e > "--" as a first argument to be discarded. OK, an alternative way would be that an exception is added to POSIX, just like for "echo". > The requirement for recognizing "--" is because conforming > applications need a way to shield their operands from any arbitrary > options that the implementation may provide as an extension. For > example, if the standard utility foo is listed as taking no options, an= d > the application needed to give it a pathname with a leading , i= t > could safely do it as: >=20 > foo -- -myfile >=20 > and avoid any problems with -m used as an extension. However, if extensions are allowed, this would mean that many scripts would have to be fixed. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Ar=E9naire project (LIP, ENS-Lyon) From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Vincent Lefevre , bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127315623813612 (code B ref -1); Thu, 06 May 2010 14:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 14:30:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA262-0003XV-6l for submit@debbugs.gnu.org; Thu, 06 May 2010 10:30:38 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA25z-0003XQ-Ca for submit@debbugs.gnu.org; Thu, 06 May 2010 10:30:36 -0400 Received: from lists.gnu.org ([199.232.76.165]:51433) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA25t-0003gS-QH for submit@debbugs.gnu.org; Thu, 06 May 2010 10:30:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA25s-0003Ms-7R for bug-coreutils@gnu.org; Thu, 06 May 2010 10:30:28 -0400 Received: from [140.186.70.92] (port=54730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA25o-0003L8-Al for bug-coreutils@gnu.org; Thu, 06 May 2010 10:30:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA25f-0001hY-B9 for bug-coreutils@gnu.org; Thu, 06 May 2010 10:30:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42655) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA25f-0001hF-3m for bug-coreutils@gnu.org; Thu, 06 May 2010 10:30:15 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46EU5AM006137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 May 2010 10:30:06 -0400 Received: from [10.3.241.4] (vpn-241-4.phx2.redhat.com [10.3.241.4]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46EU5A3019830; Thu, 6 May 2010 10:30:05 -0400 Message-ID: <4BE2D265.5070703@redhat.com> Date: Thu, 06 May 2010 08:29:57 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2C727.107@redhat.com> <20100506142410.GO24867@prunille.vinc17.org> In-Reply-To: <20100506142410.GO24867@prunille.vinc17.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigAE9019FE5ACCD6E437ACC148" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.7 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.7 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAE9019FE5ACCD6E437ACC148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/06/2010 08:24 AM, Vincent Lefevre wrote: >> Default Behavior: When this section is listed as "None.", it means= >> that the implementation need not support any options. Standard utiliti= es >> that do not accept options, but that do accept operands, shall recogni= ze >> "--" as a first argument to be discarded. >=20 > OK, an alternative way would be that an exception is added to POSIX, > just like for "echo". Please no. echo has an exception precisely because it has historical baggage, and that is what makes echo so pitiful that POSIX itself states that printf(1) is more portable than echo(1). Relatively newer applications, like basename and dirname, that were first written in an age when consistency was more important, should not be burdened with the historical baggage of ancient echo(1). And changing it now is too late; just as you argue about the number of broken scripts that are not robust because they failed to use --, you have to also consider the number of correct scripts that have been written with the correct assumption that basename and dirname accept --: it has been 9 years since POSIX 2001 first codified that behavior. Besides, we would much prefer to keep 'basename --help' as a GNU extension. Not having 'POSIXLY_CORRECT=3D1 /bin/echo --help' give useful= help is an annoyance that we would rather avoid repeating. >=20 > However, if extensions are allowed, this would mean that many scripts > would have to be fixed. Yes, many broken scripts need to be fixed. But that is the fault of those broken scripts, not coreutils. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigAE9019FE5ACCD6E437ACC148 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4tJlAAoJEKeha0olJ0NqlTwIAJjZTjDejJCCgqEmhC7BxesN IzzmlmzI6Hl+lCKqZ/gRKVVn3VZ3l9QMKm/COeeKdEy64y1hlb2gUTyFeky5aqAU ZX7G10K42uqBuzzTX7gFk6KiQBT78seT3lEC997AhV64AZx0tRYAeSKJlHWQO0YU AbwmrtKlcvDyvBzgoiPfA0gEtx2bglFwtEc9Swu0jS/cXt+P5S1TeL4kPXtEExY1 32fsEIqIdF97DRMKISj0zy/EAGum1nG7UqUEDEAol62xl/FyRQdC0fuFAd+6rEAc aNauB+iNiHZ+l+oCeUyf5+oLubys03OH+MXs/sENIcq/P/5VmAbamnSpJywU1Ng= =DD1r -----END PGP SIGNATURE----- --------------enigAE9019FE5ACCD6E437ACC148-- From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 15:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake Cc: bug-coreutils@gnu.org, =?UTF-8?Q?P=C3=A1draig?= Brady , 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127316035218034 (code B ref -1); Thu, 06 May 2010 15:40:03 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 15:39:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA3AN-0004gp-VH for submit@debbugs.gnu.org; Thu, 06 May 2010 11:39:12 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA3AM-0004gk-1S for submit@debbugs.gnu.org; Thu, 06 May 2010 11:39:10 -0400 Received: from lists.gnu.org ([199.232.76.165]:45627) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA3AH-000646-Ac for submit@debbugs.gnu.org; Thu, 06 May 2010 11:39:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA3AG-0003tf-97 for bug-coreutils@gnu.org; Thu, 06 May 2010 11:39:04 -0400 Received: from [140.186.70.92] (port=54337 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA3A9-0003on-Or for bug-coreutils@gnu.org; Thu, 06 May 2010 11:39:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA3A7-0006JO-Hy for bug-coreutils@gnu.org; Thu, 06 May 2010 11:38:57 -0400 Received: from vinc17.pck.nerim.net ([213.41.242.187]:58640 helo=prunille.vinc17.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA3A6-0006Il-3d for bug-coreutils@gnu.org; Thu, 06 May 2010 11:38:55 -0400 Received: by prunille.vinc17.org (Postfix, from userid 501) id 0F12A4C0D70A; Thu, 6 May 2010 17:38:52 +0200 (CEST) Date: Thu, 6 May 2010 17:38:51 +0200 From: Vincent Lefevre Message-ID: <20100506153851.GQ24867@prunille.vinc17.org> Mail-Followup-To: Vincent Lefevre , Eric Blake , =?UTF-8?Q?P=C3=A1draig?= Brady , bug-coreutils@gnu.org, 580492@bugs.debian.org References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2BB13.8060601@draigBrady.com> <20100506132338.GL24867@prunille.vinc17.org> <4BE2CBDC.6090808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4BE2CBDC.6090808@redhat.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6083-vl-r35499 (2010-04-24) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) On 2010-05-06 08:02:04 -0600, Eric Blake wrote: > On 05/06/2010 07:23 AM, Vincent Lefevre wrote: > > According to > >=20 > > grep 'basename --' /usr/bin/* > > grep 'basename \$' /usr/bin/* > >=20 > > on my Debian machine, almost all scripts use basename without "--". > > The only exceptions are autoconf (but I'm not sure this counts, as > > there's a test for "basename --" first, >=20 > Can you find an actual example of this? I think you read it > incorrectly, as really, autoconf first tests for 'basename -- /', but i= f > you indeed found an instance of autoconf testing for 'basename --', tha= t > would be a bug in autoconf that needs to be reported to that list. Sorry, I meant it was testing basename with "--" as the first argument while in this case it is useless. So, I wondered whether the goal of this test was to test whether this form was supported. > >> Note solaris behaves like busybox and openbsd behaves like coreutils= . > >=20 > > Perhaps they're copying coreutils without looking at what POSIX says. >=20 > Or, more likely, perhaps they are independently obeying what POSIX says= , > without reference to either coreutils or busybox. So, I think I should reassign the bug to busybox? --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Ar=E9naire project (LIP, ENS-Lyon) From unknown Fri Sep 05 20:55:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 06 May 2010 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6124 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Vincent Lefevre , =?UTF-8?Q?P=C3=A1draig?= Brady , bug-coreutils@gnu.org, 580492@bugs.debian.org Received: via spool by submit@debbugs.gnu.org id=B.127316481120169 (code B ref -1); Thu, 06 May 2010 16:54:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2010 16:53:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4KI-0005FG-P9 for submit@debbugs.gnu.org; Thu, 06 May 2010 12:53:30 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4KG-0005FB-O4 for submit@debbugs.gnu.org; Thu, 06 May 2010 12:53:29 -0400 Received: from lists.gnu.org ([199.232.76.165]:49277) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OA4KB-00018U-Uj for submit@debbugs.gnu.org; Thu, 06 May 2010 12:53:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA4KB-0007sQ-E3 for bug-coreutils@gnu.org; Thu, 06 May 2010 12:53:23 -0400 Received: from [140.186.70.92] (port=51483 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA4K4-0007lR-AR for bug-coreutils@gnu.org; Thu, 06 May 2010 12:53:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA4K1-0003rB-Q4 for bug-coreutils@gnu.org; Thu, 06 May 2010 12:53:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33963) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4K1-0003r1-5B for bug-coreutils@gnu.org; Thu, 06 May 2010 12:53:13 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o46Gr3SJ025124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 May 2010 12:53:04 -0400 Received: from [10.3.241.4] (vpn-241-4.phx2.redhat.com [10.3.241.4]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o46Gr2nT026564; Thu, 6 May 2010 12:53:03 -0400 Message-ID: <4BE2F3E7.6090500@redhat.com> Date: Thu, 06 May 2010 10:52:55 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 References: <20100506111502.GB13448@ypig.lip.ens-lyon.fr> <4BE2BB13.8060601@draigBrady.com> <20100506132338.GL24867@prunille.vinc17.org> <4BE2CBDC.6090808@redhat.com> <20100506153851.GQ24867@prunille.vinc17.org> In-Reply-To: <20100506153851.GQ24867@prunille.vinc17.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigB437BA991D1A6E11317AD3E3" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -7.6 (-------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.6 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB437BA991D1A6E11317AD3E3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/06/2010 09:38 AM, Vincent Lefevre wrote: >>> there's a test for "basename --" first, >> >> Can you find an actual example of this? I think you read it >> incorrectly, as really, autoconf first tests for 'basename -- /', but = if >> you indeed found an instance of autoconf testing for 'basename --', th= at >> would be a bug in autoconf that needs to be reported to that list. >=20 > Sorry, I meant it was testing basename with "--" as the first > argument while in this case it is useless. So, I wondered whether > the goal of this test was to test whether this form was supported. Yes, the goal of that autoconf test is to determine whether basename(1) supports leading --, as required by POSIX. >> Or, more likely, perhaps they are independently obeying what POSIX say= s, >> without reference to either coreutils or busybox. >=20 > So, I think I should reassign the bug to busybox? Yes. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigB437BA991D1A6E11317AD3E3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL4vPnAAoJEKeha0olJ0NqxAoH/2z479No6TPhakhWLgpK1j9R 8Jd2gIvgiMHztT3iMRGn0aySa4Y/eZj0OWSq+5oOpxNb/aJCe+Flo9131kZkfKLt UCQ2XBrWlTa414IePQPcVbnBRwQZHPiN7x1tOnNgq7IwyIeE6UwpEDFsO2n7YmAE BRW2hI0q8AT52cScwQnYPyw/ay5XAC1SP2MC9rqINm3SBXZ3vXeE90oZOP56N7em YSzM/tr8OD/uqFu6RIQtRjyihkDZXeSgskc1dfDsxEu5B6220+X9l0PGTikvjmdI cAvHnfXEmOISU1C0/XIbfchzqYXqqoXDlk2kWpYoqXECo5E+vGIwtz1ZhmUSdgI= =GJyg -----END PGP SIGNATURE----- --------------enigB437BA991D1A6E11317AD3E3-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 07 13:22:57 2010 Received: (at control) by debbugs.gnu.org; 7 May 2010 17:22:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OARGK-0000BL-P4 for submit@debbugs.gnu.org; Fri, 07 May 2010 13:22:56 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OARGJ-0000BG-RU for control@debbugs.gnu.org; Fri, 07 May 2010 13:22:55 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OARGI-0001K8-4p; Fri, 07 May 2010 13:22:54 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19428.19566.111683.131175@fencepost.gnu.org> Date: Fri, 7 May 2010 13:22:54 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: yellow X-Ran: |=kr5'nq=-,@H(f1dTv-L8U{GxwIlA}8~45$SzE{!@09;P-{T#OJA,=S}7]++3CC>aLoQS X-Debbugs-No-Ack: yes X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) close 5367 close 6107 merge 6123 6124 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 04:42:12 2011 Received: (at control) by debbugs.gnu.org; 17 Apr 2011 08:42:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QBNYa-0007cq-Qe for submit@debbugs.gnu.org; Sun, 17 Apr 2011 04:42:12 -0400 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QBNYY-0007ce-Mq for control@debbugs.gnu.org; Sun, 17 Apr 2011 04:42:11 -0400 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 398366012A; Sun, 17 Apr 2011 10:42:05 +0200 (CEST) From: Jim Meyering To: control@debbugs.gnu.org Subject: basename/dirname vs POSIX Date: Sun, 17 Apr 2011 10:42:05 +0200 Message-ID: <87r591e0bm.fsf@rho.meyering.net> Lines: 8 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) close 6123 close 6124 tag 6123 notabug tag 6124 notabug thanks Per discussion, it's clear that coreutils' basename and dirname conform to POSIX.