Https://rclone.org/install.sh installs to the wrong place

This is not a bug in rclone itself, but in the install script, install.sh.

It installs files to /usr instead of to /usr/local, and it shouldn’t.
/usr (without local) is reserved for files installed by the OS installation or package manager. /usr/local and /opt were created for software that isn’t installed or managed in that way.
If you don’t honour this convention you can screw up package management.

I have patched up install.sh to do the right thing for Ubuntu. It’s easy: insert /local in all the right places. Better still: set PREFIX=/usr/local and use $PREFIX in those places.

How do I contribute my patch?

I’m not wildly keen on changing this. Often /usr/local/bin is not on the path which makes for a poor user experience.

I now supply .deb which install the same files in the same place.

Thanks, much appreciated!

Ideally, for Ubuntu, you’d make a PPA. My own attempts at making one (just as a test) haven’t been completed yet, but it really isn’t all that hard.

I think your concerns are unfounded: people who can run curl | sh typically have /usr/local in their $PATH, or can easily be taught how to put it in there.

As a side note, it’d be handy if the debs being spat out at build time ended up in a PPA as mentioned above!

I had an experiment with PPA a while back, but you can only upload sources, so I’d have to figure out how to manage the whole debian build process.

I also have been experimenting with packagecloud which looks like a better solution for me. I can push both .deb and .rpm packages there

1 Like

Packagecloud looks great! No point dealing with the faff of launchpad if you can make a pan debian-based APT repo.

:slight_smile: I made myself an issue to do it: https://github.com/ncw/rclone/issues/2153

1 Like