jtsymon/user-install-deb

Status?

Opened this issue · 1 comments

Hi, I just stumbled upon this because you starred one of my repos. This sounds amazing. Even though I personally don't need to install debs without root permissions, I guess this could be essentially used as a lightweight container for almost any deb package, right? And I guess it could even be used to contain changes to the user's homedir by not passing it through, right?

That could be very useful for testing new packages, or testing upgrades of existing ones. Am I right that this would, for example, allow you to install a package from another archive and upgrade its dependencies too? For example, you're on Jessie, want to install something from Testing, but it needs a bunch of dependencies from Testing, and you aren't sure how well that will go, so you use this to essentially dry-run the operation before running it for real.

It just sounds amazing, and it seems so simple too--well, other than the patching that you obviously spent many hours figuring out. :)

I guess this could be essentially used as a lightweight container for almost any deb package, right?

That's not how I use it, but it should work. Maybe adding a flag for setting the root directory would be useful for this, although the bootstrap process could get annoying if you're creating lots of "containers".

And I guess it could even be used to contain changes to the user's homedir by not passing it through, right?

The folders that are passed through are set here. Its probably safe to remove your home directory from this list, but I haven't tried it.

Am I right that this would, for example, allow you to install a package from another archive and upgrade its dependencies too?

The package manager config is also CoW editable, so you could probably change your package repositories, update, and install the package you want. Upgraded/replaced packages will shadow the files on the real root, which is generally fine unless the kernel or some drivers need to be upgraded (obviously you can't update the kernel this way, and while reloading kernel modules from inside the container may be possible if you have real root access, I haven't tried it).

I use this for working on university lab machines that I want to update or install new software on, without having root access or bothering to compile everything (especially since everything is so outdated I end up having to upgrade the compiler and install a bunch of headers and libraries to compile stuff anyway).
Currently it works for me well enough that I can run i3wm and the latest version of emacs (as well as some other programs such as taskwarrior and an updated copy of git).
Emacs is shadowing an outdated version of Emacs, which seems to work pretty well (I can get Spacemacs working, which wasn't possible on the outdated version that was already installed).
In order to avoid running everything inside a fakechroot (might be a performance problem for massive programs like chromium), i3 is launched using user-install-deb --env so it runs outside of the fakechroot with just PATH and LD_LIBRARY_PATH set (this is enough to get i3 working, although other programs such as emacs require the proper fakechroot).