[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18101 - eelco - patchelf/trunk/tests
Ludovic Courtès
ludo at gnu.org
Wed Nov 4 17:58:42 CET 2009
Hello,
Eelco Dolstra <e.dolstra at tudelft.nl> writes:
> You can view the changes in this commit at:
> https://svn.nixos.org/viewvc/nix?rev=18101&view=rev
>
> Modified:
> patchelf/trunk/tests/set-interpreter-long.sh
>
> Log:
> * On FreeBSD, running a program by calling the ELF interpreter
> directly (e.g. ?\226?\128?\156/libexec/ld-elf.so.1 /bin/ls?\226?\128?\157) hangs, and on OpenBSD
> the interpreter is not executable. Let?\226?\128?\153s assume that it only works
> on Linux.
[...]
> +if test "$(uname)" = Linux; then
> + echo "running with explicit interpreter..."
> + "$oldInterpreter" ./simple
> +fi
This should work on all GNU variants, so you should be testing whether
$(uname -o) contains “GNU”.
Example:
--8<---------------cut here---------------start------------->8---
ludo at goober:~$ uname -a
GNU goober 0.3 GNU-Mach 1.3.99/Hurd-0.3 i386-AT386 GNU
ludo at goober:~$ uname -o
GNU
ludo at goober:~$ uname
GNU
ludo at goober:~$ ls -l /lib/ld-2.9.so
-rwxr-xr-x 1 root root 138156 Oct 1 06:41 /lib/ld-2.9.so
ludo at goober:~$ /lib/ld.so /bin/bash --version
GNU bash, version 4.0.33(1)-release (i486-pc-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--8<---------------cut here---------------end--------------->8---
Thanks,
Ludo’.
More information about the nix-dev
mailing list