g2p / bedup

Btrfs deduplication
http://pypi.python.org/pypi/bedup
GNU General Public License v2.0
322 stars 50 forks source link

Update installation instructions #26

Closed Nikratio closed 9 years ago

Nikratio commented 11 years ago

Hi,

When the requisite Python modules are installed with --user, they will not be found when running bedup with sudo. So I recommend dropping the --user parameter from the instructions, or changing the sudo bedup examples to sudo -E ${HOME}/.local/bin/bedup

Furthermore, under Debian/Ubuntu there are a number of further dependencies that could be installed as Debian packages instead of being pulled in by pip. I'd therefore suggest to extend the aptitude install line with alembic python-pycparser python-xdg python-sqlalchemy python-mako python-markupsafe.

kakra commented 11 years ago

I do not recommend that. Your sudo configuration seems to set HOME although no parameter was set to do so... That's not how sudo would usually work... For me it is working perfectly fine: installed with --user, run with sudo, works...

Nikratio commented 11 years ago

Maybe, but it's your configuration that's non-standard. From sudoers(5):

   Command Environment
[...]
       By default, the env_reset option is enabled.  This causes commands to be executed
       with a new, minimal environment.  [...]  The new environment
       contains the TERM, PATH, HOME, MAIL, SHELL, LOGNAME, USER, USERNAME and SUDO_*
       variables in addition to variables from the invoking process permitted by the
       env_check and env_keep options.  [...]

So my guess is that you have explicitly disabled env_reset.

kakra commented 11 years ago

Ah well, I've set "env_keep" to add "HOME" so that X applications find their authority file. Mea culpa...

But I'd still prefer bedup not trying to install itself into the system files by default. If you do not explicitly install it with root privileges it should not try to install that way. So in the end it is up to you to handle the rest it takes to get it running.

Default behavior of linux software (as far as I know) has always been to install into something local and not messing around with directories which are managed by the system package manager.

But having that caveat in the documentation would be helpful I guess...

g2p commented 11 years ago

The sudo defaults are fine, env_reset does preserve HOME. I think I did find one distro that breaks user installs when running as root, possibly by doing something in site.py, but I still don't like writing to / outside of package management.

Nikratio commented 11 years ago

On 08/05/2013 03:28 AM, g2p wrote:

The sudo defaults are fine, env_reset does preserve HOME. I think I did find one distro that breaks --user running as root, possibly by doing something in |site.py|, but I still don't like writing to / outside of package management.

setup.py writes to /usr/local by default. That's explicitly reserved for installing software not managed by the package management.

I'm running Debian, so I guess that's the distro where this won't work. I just wanted to point this out, because the Debian specific "apt-get" line in the instructions suggested to me that the rest of the instructions would also work out of the box on a Debian system.

Best, Nikolaus