Fixed 'make install' generating wrong dropbox wrapper script#3
Fixed 'make install' generating wrong dropbox wrapper script#3dimaryaz merged 2 commits intodimaryaz:masterfrom Uplink03:master
Conversation
`make install` created the dropbox wrapper script with the wrong first line: -e #!/bin/bash This patch replaced the echo in the Makefile with a copy of an external file. The new dropbox file uses `dirname` to be path-agnostic.
dimaryaz
left a comment
There was a problem hiding this comment.
Oh cool, didn't think of that.
So I'm curious, does the hack actually work for you? I've gotten multiple reports that it stopped working - but I haven't seen any problems myself.
| install: libdropbox_ext4.so | ||
| install $^ $(INSTALL_DIR)/lib/ && \ | ||
| echo -e "#!/bin/bash\n\nLD_PRELOAD=$(INSTALL_DIR)/lib/$^ exec /usr/bin/dropbox \"\$$@\"" > $(INSTALL_DIR)/bin/dropbox && \ | ||
| cp dropbox $(INSTALL_DIR)/bin/dropbox && \ |
There was a problem hiding this comment.
Could you change it from cp to install? That's technically the right way - and it'll keep permissions, so you can then delete the chmod below.
There was a problem hiding this comment.
I haven't used install before, but it makes sense. I've made the change.
|
As far as I can tell, this hack works for now. Dropbox stopped bothering me with notifications, and it appears to be synchronising. I've seen another project mentioned in one of the issues opened on your project, and I'm keeping it in mind for when Dropbox decides to complain again, but until then your project seems OK. For reference, my Dropbox says it's version v61.4.95. I'm using btrfs on LUKS as my filesystem on all my machines, and I'd rather fight with Dropbox than switch to ext4 😄 |
|
Sounds good then. Merged! |
|
Well, that didn't last long. my Dropbox is now v63.4.100 and now it gives me a popup telling me it won't run until I move it to a supported location. |
I'm on Ubuntu 18.04 and
echo -eoutputs-ewhen run with '/bin/sh' (the default shell for make), rather than interpret it a "process C escape sequences" (like Bash does).make installcreated the dropbox wrapper script with the wrong first line: -e #!/bin/bashThis patch replaced the echo in the Makefile with a copy of an external file. The new dropbox file uses
dirnameto be path-agnostic.I haven't changed the python script, because it works, and it doesn't have the problem fixed by this patch, but it might be worth looking if it could be improved to copy my new
dropboxscript instead of generating it in place.