[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: firefox-37, where to put




On Thursday 02 April 2015 15:35:17 Reco wrote:
>  Hi.
>
> On Thu, 2 Apr 2015 15:06:42 -0400
>
> Gene Heskett <gheskett@wdtv.com> wrote:
> > "ldd" says its not an executable, but then says ldd itself is not,
> > while "file" says its (ldd) a Bourne Again SHell script.
> >
> > Am I compromized?
>
> Let's see what all fuss is about.
>
> First,
>
> wget -q
> http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/37.0/linux-x86
>_64/en-US/firefox-37.0.tar.bz2
>
> Second,
>
> wget -q
> ftp.mozilla.org/pub/mozilla.org/firefox/releases/37.0/SHA512SUMS
>
> Third,
>
> sha512sum firefox-37.0.tar.bz2
>
> Fourth,
>
> grep
> 665f856cd9f69db2122c6d5bf25305e0ffa60bb56f342be9512cbe81e912c0966a7e10
>0ce2d0e30bf978cf94fcf43a2de4c8afa6834ebd46ff7b292f6eec3224 SHA512SUMS
>
> And hurray, I've apparently got Genuine™ Mozilla Firefox 37.
>
> Next,
>
> tar xf firefox-37.0.tar.bz2 && cd firefox
>
> And, finally
>
> $ file firefox
> firefox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID
> [sha1]=0xd9c52e07232a78690be6d991546a12bb3668601d, stripped
>
> $ file --mime-type firefox
> firefox: application/x-executable
Looks good, I get that:
gene@coyote:~/bin/firefox-37/firefox$ file --mime-type firefox
firefox: application/x-executable
>
> So, it's definitely a binary. Yet,
>
> $ ldd ./firefox
>         not a dynamic executable
>
> Why? That's why:
>
> $ pwd
> /tmp/firefox

See above, and /home is just a directory on / here since the broken 
installer will not do it any other way.

> $ mount | grep /tmp
> tmpfs on /tmp type tmpfs
> (rw,nosuid,nodev,noexec,relatime,size=12234980k)
>
> Notice *noexec* here.
So the best I can do is:
gene@coyote:~/bin/firefox-37/firefox$ sudo mount|grep noexec
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs 
(rw,nosuid,noexec,relatime,size=819968k,mode=755)
tmpfs on /run/lock type tmpfs 
(rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs 
(rw,nosuid,nodev,noexec,relatime,size=4994340k)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
(rw,nosuid,nodev,noexec,relatime)

None of which should apply to /home/gene/bin/firefox-37/firefox.  I have 
about 10 other scripts that, once the /home/gene/bin was added to my 
$PATH, run just as if they were in some /usr/whatever directory.
Humm backout one and two levels and check to see if the directories carry 
enough x's, and they do I think.

From /home/gene/bin
drwxr-xr-x 3 gene gene   4096 Apr  1 22:44 firefox-37
and from /home/gene/bin/firefox-37
drwxr-xr-x 9 gene gene 4096 Mar 26 23:51 firefox
3 x's there too.

So, like T. Edison said, we have learned 2 more ways to make a light bulb 
that don't work.

> You see, ldd actually tries to execute a file (by using special hack
> in ld.so, so that's OK). And of course, if you put an executable at
> no-executable mountpoint, not only you won't be able to run it, ldd
> also ceases to work.

What happens if I add that path to the list in /etc/dld.so.conf.d?
sudo ldconfig -v finds them all but that doesn't help, its still not an 
executable file to a plain ldd command.  And sitting in that directory 
looking at it "./firefoxENTERkey" is a
Bash: No such file or directory.

Something is busted here, but I'm bruising my head beating it on the 
wall...

> And yes, ldd is a shell script. A customary way to prepend hacky
> environment variables to executables is using shell wrappers. ldd is
> just one of those.
>
> Still, if ldd fails you - use objdump:
>
> $ objdump -x firefox | grep NEED
>   NEEDED               libpthread.so.0
>   NEEDED               libdl.so.2
>   NEEDED               librt.so.1
>   NEEDED               libstdc++.so.6
>   NEEDED               libm.so.6
>   NEEDED               libgcc_s.so.1
>   NEEDED               libc.so.6
>   NEEDED               ld-linux-x86-64.so.2
>   VERNEED              0x00000000004036c8
>   VERNEEDNUM           0x0000000000000007
>
>
> tl;dr version - move your firefox directory to filesystem mounted with
> exec. Problem should solve itself.
>
> Reco

Now I am bumfuzzled.  The above command works, but if I "locate 
ld-linux", I discover the friggin libraries are all i386! :( :(

So thats whats busted, sure as little green apples have a fairly flat 
trajectory.  Its time I go get a couple more drives and install some 
genuine x86-64 (preferable genuine amd64) version of Linux.  This 
particular variation of wheezy is NOT. Unless I can play 
with /etc/apt/sources.list and convince synaptic to fix it?

Or nuke this and go get the 32 bit version, that might be easier.

Thats what I'll do.  If it doesn't fly, well, tigerdirect sells hard 
drives still.

My apologies to everyone who has busted their butts trying to fix this.

Consider this thread closed even if not fixed.  Its in my ballpark now.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: