Reminds me a bit the archlinux.fr vs wiki.archlinux.org fr wiki situation from 10 years ago.
[1] https://wiki.nixos.org/wiki/FAQ#Why_is_there_a_new_wiki?_Wha...?
---
Why is there a new wiki? What is with nixos.wiki?
The old wiki at nixos.wiki has several problems:
Many components (mediawiki, php, icu) are severely outdated.
MediaWiki 1.29 (EOL 2018), now 1.35 (EOL 2023-12)
PHP 7.3.33 (EOL 2021-12)
ICU 64.2
Cloudflare DDOS protection makes wiki edits fail sometimes.
There is no WYSIWYG editor.
The wiki infrastructure, which was supposed to be made public after launch, never ended-up being made public
Many components (mediawiki, php, icu) are severely outdated.
The wiki infrastructure, which was supposed to be made public after launch, never ended-up being made public
I suspect both of these are a bigger deal to the Nix community than perhaps to the average group.As someone said, the wiki [1] has some interesting options. From the options I used nix-user-chroot [2] with great success, and while the tool is unmaintained it should still work. It uses Linux's user namespaces instead of intercepting syscalls, and this makes the performance pretty much identical to native.
If you want more control like PRoot offers, I recommend bubblewrap instead [2].
Another option undocumented is to just grab a recent nix binary somewhere and run. It will automatically create the Nix store inside `$HOME/.local/share/nix` (if I am not mistaken) and use user namespaces to mount to it. However the last time I tried this didn't work well for a few things (e.g.: Home-Manager), so in general I still think nix-user-chroot is a better choice.
[1]: https://wiki.nixos.org/wiki/Nix_Installation_Guide, linking to the official one
[2]: https://github.com/containers/bubblewrap
[3]: https://wiki.nixos.org/wiki/Nix_Installation_Guide#nix-user-...
If (for example) you can overlay/union mount and have a synthetic upper layer FS which manages things, I could use this.
Thinking more, maybe it works out of the box? Just mount the overlays (there's a cli flag IIRC) and proot takes care of syscalls by definition.
RStudio Server[0] 1.3 and older hard-coded a number of paths, such as the path for storing temporary files: Instead of looking for the TMPDIR environment variable (as specified by POSIX[1]), R Studio Server would always use /tmp. That is extremely annoying, because we set TMPDIR to a path on fast local storage (SATA or NVMe SSDs) that the job scheduler cleans up at the end of the compute job.
We do have a last-resort mechanism using pam_namespace[2], such that a user going to `/tmp` actually takes them to `/namespace/tmp/${username}`, but that is per-user, not per-job. If a user has two R Studio jobs, and those two jobs landed on the same host, there would be trouble.
So, we used PRoot to wrap R Studio, with /tmp bind-mounted to a directory under TMPDIR.
[0]: https://www.rstudio.com/products/rstudio/download-server/
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...
It’s always best to sandbox programs when you can. Linux has been making this much easier but it’s still non trivial
PrivateTmp=true
#JoinsNamespaceOf=
`unshare -m` and then bind-mounting a private /tmp at /tmp/systemd-private-/ does the same thing; `systemd-tmpfiles --help`: https://serverfault.com/questions/1010339/how-exactly-to-use...As an intermediate level user and sysadmin, this kind of thing underscores the good work systemd is doing making it easy to get sane and safe defaults for things otherwise fiddly enough that many normal people wouldn't bother.
Thankful for systemd too.
Here’s an article that talks about tmp[0]. But I mean if you wanted to be really secure you could use systemd nspawn and put each user into their own container[1]
[0] https://salvatoresecurity.com/the-many-perils-of-tmp/
[1] https://kilabit.info/journal/2022/chrooting_ssh_user_into_sy...
> But the natural numbers are for counting, you can't count to zero!
Why don't you count the number of cool people who don't think zero is a natural number, loser?
[0] also it works beautifully for pointer arithmetic
Language is not defined by a dictionary or MLA guides or whatever. Language is defined by culture. Go ask any linguist if your in doubt. They’ll gladly talk your ear off about how language evolves and cliques form and how there’s in and out language which people can often identify others in their “tribe” by. Like respect for any culture, don’t come in and try to tell people what’s right or wrong. At least not until you can speak the language first.
We use [0] because it’s how you index an array.
More general to internet culture there’s also OP = original poster and we refer to comments above us like family relationships. Parent (you’re this comments parent), GP (the grandparent, one who used the [0] that triggered you), GGP, G..GP, there’s siblings/sister (everyone who replied to you) and so on. Generally people don’t say cousins, aunts, dust removed and so on but you might see it). RTFM = read the fucking Manual (RTFA for article). And many others.
Welcome to the internet and Hacker News.
I don't follow; you made a PR to add this functionality to proot itself?
I was taking in the context of Termux app for Android, nothing to do with proot itself. Termux uses apt and deb repos, and provides a patched proot. I wanted to add a package similar to one I linked.
link?
It also offers CPU transparency and was able to run almost arbitrary desktop software, but specializes in build toolchains.
`chroot`, the function, has probably some baggage that makes it impossible to enable straight from an unprivileged program? Anyway, a chroot-like program seems to be implementable on top of user namespaces. Rootless docker is mostly that, with more namespace and cgroup isolation.
$ ln /usr/bin/sudo ./my-chroot
$ echo "$USER ALL=(ALL) NOPASSWD: ALL" > ./my-chroot/etc/sudoers.d/01-oops
$ chroot ./my-chroot
$ sudo bash
modern Linux distributions prevent creation of hard links to suid binaries, but the restrictions on chroot came years before that.https://hpc.guix.info/blog/2017/10/using-guix-without-being-...
It also supports other more performant ways, but in some situations proot is the best choice.
see `pathsubst` example.
unfortunately set of use cases for `ptrace`-based solution is limited, due to high performance overhead.