public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug admin/832] New: ldd contains a bashism
@ 2005-04-07  9:34 han at mijncomputer dot nl
  2005-04-07  9:41 ` [Bug admin/832] " han at mijncomputer dot nl
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: han at mijncomputer dot nl @ 2005-04-07  9:34 UTC (permalink / raw)
  To: glibc-bugs

This patch makes ldd work with any shell.

Ash doesn't continue after a set -o blah. The used method correctly identifies
bash 3 and higher.

Patch is tested with bash, zsh, ash and pdksh.

--- ldd.orig    2005-03-29 12:35:17.820676992 +0200
+++ ldd 2005-03-29 12:34:36.324985296 +0200
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 # Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -116,10 +116,12 @@
 fi
 
 # The following use of cat is needed to make ldd work in SELinux
-# environments where the executed program might not have permissions
-# to write to the console/tty.  But only bash 3.x supports the pipefail
-# option, and we don't bother to handle the case for older bash versions.
-if set -o pipefail 2> /dev/null; then
+# environments where the executed program might not have
+# permissions to write to the console/tty. But only bash 3.x
+# supports the pipefail option, and we don't bother to handle the
+# case for older bash versions.
+if [ "${BASH_VERSION%%.*}" -ge 3 ]; then
+  set -o pipefail
   try_trace() {
     eval $add_env '"$@"' | cat
   }

-- 
           Summary: ldd contains a bashism
           Product: glibc
           Version: 2.3.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: admin
        AssignedTo: roland at gnu dot org
        ReportedBy: han at mijncomputer dot nl
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=832

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
  2005-04-07  9:34 [Bug admin/832] New: ldd contains a bashism han at mijncomputer dot nl
@ 2005-04-07  9:41 ` han at mijncomputer dot nl
  2005-09-25 18:29 ` drepper at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: han at mijncomputer dot nl @ 2005-04-07  9:41 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From han at mijncomputer dot nl  2005-04-07 09:41 -------
*** Bug 807 has been marked as a duplicate of this bug. ***

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=832

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
  2005-04-07  9:34 [Bug admin/832] New: ldd contains a bashism han at mijncomputer dot nl
  2005-04-07  9:41 ` [Bug admin/832] " han at mijncomputer dot nl
@ 2005-09-25 18:29 ` drepper at redhat dot com
  2005-09-25 19:27 ` ldv at altlinux dot org
  2005-09-26  0:24 ` han at mijncomputer dot nl
  3 siblings, 0 replies; 9+ messages in thread
From: drepper at redhat dot com @ 2005-09-25 18:29 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-09-25 18:29 -------
ldd is written for bash.  Live with it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://sourceware.org/bugzilla/show_bug.cgi?id=832

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
  2005-04-07  9:34 [Bug admin/832] New: ldd contains a bashism han at mijncomputer dot nl
  2005-04-07  9:41 ` [Bug admin/832] " han at mijncomputer dot nl
  2005-09-25 18:29 ` drepper at redhat dot com
@ 2005-09-25 19:27 ` ldv at altlinux dot org
  2005-09-26  0:24 ` han at mijncomputer dot nl
  3 siblings, 0 replies; 9+ messages in thread
From: ldv at altlinux dot org @ 2005-09-25 19:27 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ldv at altlinux dot org  2005-09-25 19:27 -------
If ash stops after "set -o foo", it should be fixed.
Please report it to ash maintainers.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=832

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
  2005-04-07  9:34 [Bug admin/832] New: ldd contains a bashism han at mijncomputer dot nl
                   ` (2 preceding siblings ...)
  2005-09-25 19:27 ` ldv at altlinux dot org
@ 2005-09-26  0:24 ` han at mijncomputer dot nl
  3 siblings, 0 replies; 9+ messages in thread
From: han at mijncomputer dot nl @ 2005-09-26  0:24 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From han at mijncomputer dot nl  2005-09-26 00:24 -------
No: There is nothing wrong with ash, this is POSIX behaviour.
http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_008_001

There is something wrong with bash. This is a typical case of embrace and extend
of the guy who has written bash,  and so far all developers have applied my
patches that remove bashisms. I don't care if people write them, mistakes are
made everywhere but I'm really appalled by your Microsoft-like responses.
Especially since you don't loose any functionality if you apply my patch and you
are forced to use bash if you don't.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=832

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
       [not found] <bug-832-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-10-14  6:02 ` vapier at gentoo dot org
@ 2023-10-28 17:27 ` gabravier at gmail dot com
  3 siblings, 0 replies; 9+ messages in thread
From: gabravier at gmail dot com @ 2023-10-28 17:27 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=832

Gabriel Ravier <gabravier at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gabravier at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
       [not found] <bug-832-131@http.sourceware.org/bugzilla/>
  2013-09-07 15:44 ` pj+sourceware-bz at pehjota dot net
  2013-10-14  6:01 ` vapier at gentoo dot org
@ 2013-10-14  6:02 ` vapier at gentoo dot org
  2023-10-28 17:27 ` gabravier at gmail dot com
  3 siblings, 0 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2013-10-14  6:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=832

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                URL|                            |https://sourceware.org/ml/l
                   |                            |ibc-alpha/2013-09/msg00415.
                   |                            |html
         Resolution|---                         |FIXED

--- Comment #7 from Mike Frysinger <vapier at gentoo dot org> ---
should be fixed for glibc-2.19

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
       [not found] <bug-832-131@http.sourceware.org/bugzilla/>
  2013-09-07 15:44 ` pj+sourceware-bz at pehjota dot net
@ 2013-10-14  6:01 ` vapier at gentoo dot org
  2013-10-14  6:02 ` vapier at gentoo dot org
  2023-10-28 17:27 ` gabravier at gmail dot com
  3 siblings, 0 replies; 9+ messages in thread
From: vapier at gentoo dot org @ 2013-10-14  6:01 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=832

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sqweek at gmail dot com

--- Comment #6 from Mike Frysinger <vapier at gentoo dot org> ---
*** Bug 3266 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug admin/832] ldd contains a bashism
       [not found] <bug-832-131@http.sourceware.org/bugzilla/>
@ 2013-09-07 15:44 ` pj+sourceware-bz at pehjota dot net
  2013-10-14  6:01 ` vapier at gentoo dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: pj+sourceware-bz at pehjota dot net @ 2013-09-07 15:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=832

P. J. McDermott <pj+sourceware-bz at pehjota dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |pj+sourceware-bz at pehjota dot ne
                   |                            |t
         Resolution|WONTFIX                     |---

--- Comment #5 from P. J. McDermott <pj+sourceware-bz at pehjota dot net> ---
Reopening, with a patch on the way to the mailing list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-28 17:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-07  9:34 [Bug admin/832] New: ldd contains a bashism han at mijncomputer dot nl
2005-04-07  9:41 ` [Bug admin/832] " han at mijncomputer dot nl
2005-09-25 18:29 ` drepper at redhat dot com
2005-09-25 19:27 ` ldv at altlinux dot org
2005-09-26  0:24 ` han at mijncomputer dot nl
     [not found] <bug-832-131@http.sourceware.org/bugzilla/>
2013-09-07 15:44 ` pj+sourceware-bz at pehjota dot net
2013-10-14  6:01 ` vapier at gentoo dot org
2013-10-14  6:02 ` vapier at gentoo dot org
2023-10-28 17:27 ` gabravier at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).