void-docs icon indicating copy to clipboard operation
void-docs copied to clipboard

musl.md: replace proot mention with bubblewrap

Open balejk opened this issue 3 years ago • 9 comments

Recently I needed to run a glibc dependent program on musl, preferably without having root privileges, and I had difficulties getting proot to work properly. It would have been useful to know about xbps-uunshare, because that worked out of the box, plus it is usually preinstalled on Void and no additional packages need to be installed.

balejk avatar Nov 03 '21 13:11 balejk

We should not suggest proot at all for that, because it is that cursed and mostly broken and not required on a void system since we have user namespaces enabled.

I don't like to suggest xbps-uunshare, its made for xbps-src and not a general namespace/container tool, I would prefer to only suggest bubblewrap or similar programs.

Duncaen avatar Nov 03 '21 16:11 Duncaen

I think the only advantage proot brings is that it allows you to fake chroot into a root owned dir. I don't think you can do that with bwrap or xbps-uunshare, might be wrong though.

ericonr avatar Nov 03 '21 17:11 ericonr

I don't like to suggest xbps-uunshare, its made for xbps-src and not a general namespace/container tool, I would prefer to only suggest bubblewrap or similar programs.

I wasn't aware of this. bubblewrap seems to work for me, shall I instead of mentioning xbps-uunshare just replace proot with bubblewrap then?

balejk avatar Nov 05 '21 10:11 balejk

I think that would be preferable! Thanks c:

ericonr avatar Nov 14 '21 06:11 ericonr

Ping?

ericonr avatar Nov 29 '21 05:11 ericonr

Sorry, I'm just busy lately, but I didn't forget.

My last effort was to use bubblewrap to launch torbrowser-launcher on musl, but I haven't been successful. So I'd first like to be able to do that and then use that as an example. Any hints are appreciated.

balejk avatar Nov 29 '21 07:11 balejk

Ok, just checking!

Can you share errors you got, if any? Given that torbrowser will probably use namespaces on its own, there might be some confusion.

ericonr avatar Nov 29 '21 12:11 ericonr

Currently I'm getting

Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.5
https://github.com/micahflee/torbrowser-launcher
Traceback (most recent call last):
  File "/bin/torbrowser-launcher", line 30, in <module>
    torbrowser_launcher.main()
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/__init__.py", line 76, in main
    common = Common(tor_browser_launcher_version)
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/common.py", line 71, in __init__
    self.init_gnupg()
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/common.py", line 282, in init_gnupg
    self.import_keys()
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/common.py", line 367, in import_keys
    imported = self.import_key_and_check_status(key)
  File "/usr/lib/python3.10/site-packages/torbrowser_launcher/common.py", line 337, in import_key_and_check_status
    with gpg.Context() as c:
  File "/usr/lib/python3.10/site-packages/gpg/core.py", line 206, in __init__
    self.protocol = protocol
  File "/usr/lib/python3.10/site-packages/gpg/core.py", line 161, in __setattr__
    super(GpgmeWrapper, self).__setattr__(key, value)
  File "/usr/lib/python3.10/site-packages/gpg/core.py", line 885, in protocol
    errorcheck(gpgme.gpgme_engine_check_version(value))
  File "/usr/lib/python3.10/site-packages/gpg/errors.py", line 120, in errorcheck
    raise GPGMEError(retval, extradata)
gpg.errors.GPGMEError: GPGME: Invalid crypto engine

gnupg, gpgme and libgpgme are all installed in the container.

balejk avatar Dec 03 '21 12:12 balejk

@ericonr I believe this is ready for another review.

balejk avatar Sep 05 '22 20:09 balejk

@classabbyamp I see you are working on some changes rendering this pull request rather obsolete, can I close it then?

balejk avatar Oct 22 '22 13:10 balejk

up to you, I haven't been able to test what i wrote fully yet

classabbyamp avatar Oct 22 '22 13:10 classabbyamp