blob: 4e136d7df8258d78607629a274d02468261af72b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# glibcrun
`glibcrun` is utility for launching glibc linked binaries in isolated namespaces
in musl-libc Void Linux installations.
It creates new private mount namespace for the running process, "replacing" `/usr`
and `/var/db/xbps` with directories from your glibc basedir using bind
mounts, and launches your glibc program.
## Creating glibc chroot
I will use `/glibc` directory name for an example, you can use any other path you
want.
```
# mkdir /glibc
# XBPS_ARCH=x86_64 xbps-install --repository=http://alpha.de.repo.voidlinux.org/current -r /glibc -S base-voidstrap
```
When it's done you may want to chroot into it, e.g. to install some dependencies
for your glibc software.
## Installing glibcrun
Just clone the repo, and then:
```
$ make
$ sudo make install
```
Note that installed binary must be owned as root and have suid bit. `make install`
should handle it, but anyway.
## Usage
`glibcrun` needs to know the path to your glibc base directory and it reads it from
the `GLIBCRUN_DIR` environment variable. You may want to add something like this
to your `~/.bashrc` or similar script:
```
export GLIBCRUN_DIR=/glibc
```
When `glibcrun` is run without arguments it will attempt to launch a shell from your
`SHELL` variable, otherwise it will treat the first argument as a path to an executable
and the rest as a list of arguments.
Example:
```
glibcrun /opt/palemoon/palemoon -ProfileManager
```
will launch `/opt/palemoon/palemoon -ProfileManager`.
## License
BSD-2c
|