Dropbox - glibc and file systems support

General support questions
falk0069
Posts: 1
Joined: 2018/10/17 03:35:44

Re: Dropbox - glibc and file systems support

Post by falk0069 » 2018/10/17 03:52:21

tacvbo wrote:
2018/10/16 04:39:58
There is another way, it might be not as easy and clean as the docker option but it's better to have some options around. This worked on a Centos 6.

I compiled glibc-2.27 at /opt/glibc-2.27/

Code: Select all

# tar xzvf glibc-2.27.tar.gz
# cd glibc-2.27
# mkdir build
# cd build
#  ../configure --prefix=/opt/glibc-2.27
# make && make install 
and then as user:

Code: Select all

% patchelf --set-interpreter /opt/glibc-2.27/lib/ld-2.27.so  ~/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/dropbox
% patchelf --set-rpath /opt/glibc-2.27/lib ~/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/dropbox
you might need to yum install patchelf.
I'm on Centos 7 and gave this a shot but 2.27 was too new for me. I needed to also upgrade make (>3.79) and gcc (>4.9), which I didn't want to do. I opted to try this with the minimum glibc instead (2.19). The building and patching went smooth. Unfortunately, it failed to start. This is the error I got:

Code: Select all

dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/home/falk/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/cryptography.hazmat.bindings._constant_time.cpython-35m-x86_64-linux-gnu.so'
Traceback (most recent call last):
  File "dropbox/__init__.pyc", line 8, in <module>
  File "dropbox/overrides.pyc", line 517, in <module>
  File "dropbox/overrides.pyc", line 418, in __ssl_wrap_socket_internal_ca_certs
  File "dropbox/ssl/revoked_certs.pyc", line 9, in <module>
  File "cryptography/x509/__init__.pyc", line 9, in <module>
  File "cryptography/x509/base.pyc", line 16, in <module>
  File "cryptography/x509/extensions.pyc", line 18, in <module>
  File "cryptography/hazmat/primitives/constant_time.pyc", line 9, in <module>
  File "<_bootstrap_overrides>", line 153, in load_module
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
!! dropbox: fatal python exception:
['Traceback (most recent call last):\n', '  File "dropbox/__init__.pyc", line 8, in <module>\n', '  File "dropbox/overrides.pyc", line 517, in <module>\n', '  File "dropbox/overrides.pyc", line 418, in __ssl_wrap_socket_internal_ca_certs\n', '  File "dropbox/ssl/revoked_certs.pyc", line 9, in <module>\n', '  File "cryptography/x509/__init__.pyc", line 9, in <module>\n', '  File "cryptography/x509/base.pyc", line 16, in <module>\n', '  File "cryptography/x509/extensions.pyc", line 18, in <module>\n', '  File "cryptography/hazmat/primitives/constant_time.pyc", line 9, in <module>\n', '  File "<_bootstrap_overrides>", line 153, in load_module\n', 'ImportError: libffi.so.6: cannot open shared object file: No such file or directory\n'] (error 3)
Aborted (core dumped)
Anyone else running into this?

msz1959
Posts: 9
Joined: 2008/12/01 08:21:17

Re: Dropbox - glibc and file systems support

Post by msz1959 » 2018/10/17 20:43:58

I have tried this solution on CentOS 7 machine. It did not work, though, similarly to falk0069's symptoms.

1. I had to go back to glibc-2.25 (2.27 appears to have requirements beyond C7 standard installation, e.g. make 4.0, gcc 4.9)
2. With patchelf commands executed (adapted to /opt/glibc-2.25), dropboxd command fails to load "libffi.so.1" library. When I linked /lib64/libffi* to /opt/glibc-2.25/lib/, it failed again, this time on "librsync.so.1". Error log attached.
Attachments
dropbox_error.txt
(2.82 KiB) Downloaded 19 times

pgreco
Posts: 6
Joined: 2018/04/14 17:23:02

Re: Dropbox - glibc and file systems support

Post by pgreco » 2018/10/17 21:50:26

I have dropbox working, without rebuilding glibc, or patching dropboxd with patchelf.
Here's what I did.
Create dropboxcheat.c with this code

Code: Select all

const char *gnu_get_libc_version (void)
{
        return "2.19";
}
compile the cheat .so

Code: Select all

gcc -Wall -fPIC -shared -o dropboxcheat.so dropboxcheat.c
move the .so to /usr/local/lib64/
add this line in dropbox.py, right before subprocess.Popen....., in function start_dropbox

Code: Select all

os.environ['LD_PRELOAD'] = "/usr/local/lib64/dropboxcheat.so"
Run dropbox normally and it should ask to relogin.

HTH.
Pablo.
Last edited by pgreco on 2018/10/23 12:25:02, edited 2 times in total.

bota
Posts: 1
Joined: 2018/10/04 06:50:55

Re: Dropbox - glibc and file systems support

Post by bota » 2018/10/18 13:13:55

pgreco wrote:
2018/10/17 21:50:26
I have dropbox working, without rebuilding glibc, or patching dropboxd with patchelf.
Here's what I did.
Create drobpoxcheat.c with this code

Code: Select all

const char *gnu_get_libc_version (void)
{
        return "2.19";
}
compile the cheat .so

Code: Select all

gcc -Wall -fPIC -shared -o drobpoxcheat.so drobpoxcheat.c
move the .so to /usr/local/lib64/
add this line in dropbox.py, right before subprocess.Popen....., in function start_dropbox

Code: Select all

s.environ['LD_PRELOAD'] = "/usr/local/lib64/drobpoxcheat.so"
Run dropbox normally and it should ask to relogin.

HTH.
Pablo.
Hi!

It's working.

The correct code is:

Code: Select all

os.environ['LD_PRELOAD'] = "/usr/local/lib64/drobpoxcheat.so"

sophauer
Posts: 3
Joined: 2018/10/18 13:50:56

Re: Dropbox - glibc and file systems support

Post by sophauer » 2018/10/18 13:56:56

pgreco wrote:
2018/10/17 21:50:26
I have dropbox working, without rebuilding glibc, or patching dropboxd with patchelf.
Here's what I did.

Code: Select all

s.environ['LD_PRELOAD'] = "/usr/local/lib64/drobpoxcheat.so"
Run dropbox normally and it should ask to relogin.

HTH.
Pablo.
hi,

Code: Select all

[b]s.environ[/b]['LD_PRELOAD'] = "/usr/local/lib64/drobpoxcheat.so"
shouild be?

Code: Select all

[b]os.environ[/b]['LD_PRELOAD'] = "/usr/local/lib64/drobpoxcheat.so"

and it did not work for me :(
when i had done ,start dropbox with ~/bin/dropbox.py start
and it did start.....
but ,~/bin/dropbox.py status..
it just keeping starting....and nothing sync

mvaranda7
Posts: 4
Joined: 2018/10/19 04:01:37

Re: Dropbox - glibc and file systems support

Post by mvaranda7 » 2018/10/19 04:05:25

Thanks for your answer pgreco, but doesn't works
Dropbox say "Starting ...." forever

Using CentOS 7.5 glibc stock 2.17

pgreco
Posts: 6
Joined: 2018/04/14 17:23:02

Re: Dropbox - glibc and file systems support

Post by pgreco » 2018/10/19 18:08:41

@bota, @sophauer, you're right, it was a wrong copy/paste. Thanks, already edited the post.

For me, when it said "starting" and stayed there, was when dropbox opened the browser to enter username and password.

mvaranda7
Posts: 4
Joined: 2018/10/19 04:01:37

Re: Dropbox - glibc and file systems support

Post by mvaranda7 » 2018/10/20 00:44:56

I found this https://paste.ee/p/NjACE

But my server is a production server, and I can't test with it.

On Monday I will try in test platform server

varanda

mvaranda7
Posts: 4
Joined: 2018/10/19 04:01:37

Re: Dropbox - glibc and file systems support

Post by mvaranda7 » 2018/10/20 00:47:52

pgreco wrote:
2018/10/19 18:08:41
@bota, @sophauer, you're right, it was a wrong copy/paste. Thanks, already edited the post.

For me, when it said "starting" and stayed there, was when dropbox opened the browser to enter username and password.
I'm using with no graphical interface, and doesn't ask for authentication, displaying "Starting..." forever

I will try this:
https://paste.ee/p/NjACE


varanda

pgreco
Posts: 6
Joined: 2018/04/14 17:23:02

Re: Dropbox - glibc and file systems support

Post by pgreco » 2018/10/23 12:34:27

mvaranda7 wrote:
2018/10/20 00:47:52
pgreco wrote:
2018/10/19 18:08:41
@bota, @sophauer, you're right, it was a wrong copy/paste. Thanks, already edited the post.

For me, when it said "starting" and stayed there, was when dropbox opened the browser to enter username and password.
I'm using with no graphical interface, and doesn't ask for authentication, displaying "Starting..." forever

I will try this:
https://paste.ee/p/NjACE


varanda
Can you try running dropbox manually?

Code: Select all

cd ~/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/
LD_PRELOAD=/usr/local/lib64/dropboxcheat.so ./dropboxd
Last edited by pgreco on 2018/10/27 19:55:55, edited 1 time in total.

Post Reply