Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fhs-chrootenv: XDG_RUNTIME_DIR needed for pulseaudio #962

Merged
merged 0 commits into from
Oct 5, 2013
Merged

fhs-chrootenv: XDG_RUNTIME_DIR needed for pulseaudio #962

merged 0 commits into from
Oct 5, 2013

Conversation

aristidb
Copy link
Contributor

With this, my steam games are nice and loud. :)

@aristidb
Copy link
Contributor Author

No don't yet. Need to fix a bug in the commit.

@vcunat
Copy link
Member

vcunat commented Sep 14, 2013

XDG_RUNTIME_DIR="/run/user/1000"

This doesn't seem right to me. Is it intentional?

@aristidb
Copy link
Contributor Author

No that's the bug. I've locally changed it to XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" but then I need to use sudo -E... I think I actually want to create a setuid program for steam that loads the environment and immediately drops the privileges and therefore knows all the environment vars.

@edolstra
Copy link
Member

What is build-fhs-chrootenv? Never seen it before.

@aristidb
Copy link
Contributor Author

@offlinehacker
Copy link
Contributor

I like the build-fhs-chrootenv, but in the future we could run this in
linux container and use systemd nspawn to start it. If systemd's nspawn is
going to support user namespaces you could even run without your rootfs
being root and only setuid set on nspawn. And you would't need that much
code, because linux cointainers basiclly do what you did only in more
secure manner.

On Sat, Sep 14, 2013 at 11:03 AM, Aristid Breitkreuz <
[email protected]> wrote:

@edolstra https://github.com/edolstra
http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html:)


Reply to this email directly or view it on GitHubhttps://github.com//pull/962#issuecomment-24440964
.

@svanderburg
Copy link
Member

@aristidb The place where you put that environment variable is meant for "inheriting" stuff from the host system.

If you need to set arbitrary environment variables, then there are two options. If they should be general to all generated chroot environments then add them to the profilePkg local variable in pkgs/build-support/build-fhs-chrootenv/default.nix

If an environment variable is application specific, the buildFHSChrootEnv{} function provides the 'profile' parameter that can be used for this. In pkgs/games/steam/chrootenv.nix, I use this to set stuff like the OpenGL driver paths and the location of fontconfig configuration file.

@aristidb
Copy link
Contributor Author

@svanderburg This is inheriting its value from the host system, I just accidentally committed the hard-coded path on my system. Every application that needs pulse-audio needs to inherit this variable, so I thought inheriting it by default would be good. But in the end what I really want is a wrapper such that i can run "steam" and it will load the chroot, drop root privileges, and run the actual steam.

@svanderburg
Copy link
Member

@aristidb Ok clear. Now that I think of it, maybe I should also make an option allowing someone to specify which variables should be inherited beyond the ones that are always needed.

Having a more convenient wrapper would definitely also be something that makes our lives a lot easier. In fact, the best would be that somebody just picks Steam from its desktop without noticing at all that there is a special trick behind it. ;)

@aristidb
Copy link
Contributor Author

aristidb commented Oct 5, 2013

Oops, accidentally replaced the contents of this pull request. Due to my bad lazy habit of using master for this stuff...

@domenkozar domenkozar merged commit 38a2008 into NixOS:master Oct 5, 2013
klemensn added a commit to klemensn/nixpkgs that referenced this pull request Jun 3, 2022
This release is still subject to double-free crashes in at least the
signature verification functionality, but debugging that requires an up
to date version (released two months ago), so here we go.

NB: Upstream released two source tarballs without further information,
qdigidoc4_r.2.11.110.orig.tar.xz contains sources without subdirectory,
qdigidoc4_r.2.11.110-1804.tar.xz contains a subdirectory with sources;
their difference is irrelevant for our build, so pick the one 1804 one:
```
$ diff -u -r qdigidoc4_r.2.11.110.orig/ qdigidoc4_r.2.11.110-1804/qdigidoc4/
Only in qdigidoc4_r.2.11.110.orig/cmake: .git
Only in qdigidoc4_r.2.11.110.orig/common: .git
Only in qdigidoc4_r.2.11.110.orig/common: .gitmodules
diff '--color=auto' -u -r qdigidoc4_r.2.11.110.orig/debian/changelog qdigidoc4_r.2.11.110-1804/qdigidoc4/debian/changelog
--- qdigidoc4_r.2.11.110.orig/debian/changelog	2022-01-28 13:44:35.000000000 +0200
+++ qdigidoc4_r.2.11.110-1804/qdigidoc4/debian/changelog	2022-01-28 13:44:38.000000000 +0200
@@ -1,3 +1,9 @@
+qdigidoc4 (4.2.11.110-1804) unstable; urgency=medium
+
+  * Release: 4.2.11.110.
+
+ -- RIA <[email protected]>  Fri, 28 Jan 2022 13:44:38 +0200
+
 qdigidoc4 (0.2.0.3) stable; urgency=low

   * Initial release
Only in qdigidoc4_r.2.11.110.orig/extensions/cmake: .git
Only in qdigidoc4_r.2.11.110.orig/extensions: .git
Only in qdigidoc4_r.2.11.110.orig/extensions: .gitmodules
```

```
$ git log --oneline v4.2.9..v4.2.11
2631e24 (tag: v4.2.11) Update translation (NixOS#1025)
76c671a Support Fedora (NixOS#997)
639cebe Update Qt to 5.12.2 (NixOS#1019)
cde7fb8 Add web-eid to diagnostics (NixOS#989)
faa8276 Add default option to sign button (NixOS#1001)
cb8262a Update OpenLDAP 2.6.0 (NixOS#996)
132de43 Workaround for Yaru theme on ubuntu 21.10 (NixOS#994)
58e4278 Improve safeFilename (NixOS#986)
1710f47 Fix coverity and cppcheck warnings (NixOS#992)
60af0bb Remove autofocus (NixOS#981)
5a9ff0a Use thread monitor event state (NixOS#845)
cdd95a5 Fix LDAP certificate validation (NixOS#980)
92f81ec Workaround SID/MID proxy unicode issues (NixOS#982)
92a5aaa Update version number and OpenSSL, OpenLDAP versions (NixOS#977)
5971e54 Update Xalan-C 1.12 (NixOS#976)
1f848cf Add more specific info for OpenSSLExceptions (NixOS#970)
0497b7f Set Select folder dialog button label and fix some translation warnings (NixOS#974)
e56e814 Workaround recent Qt changes to pass mousePressEvent (NixOS#978)
44f4a7e Update translations in russian for settings (NixOS#973)
25756eb Wait for upper level operations to avoid locked screen (NixOS#979)
232784e Don't set focus to fonds image (NixOS#967)
5cf2157 Change the view of expired and expiring certificates (NixOS#965)
b001274 Resolve a yellow background, when PIN is locked (NixOS#971)
4b20375 Fix the boolean value (NixOS#975)
1a41817 Resolve Ubuntu 21.04 warnings (NixOS#946)
301178b Set read-only permission for files in signed container (NixOS#962)
e028a30 Update OpenLDAP 2.5.5 (NixOS#963)
1fb5f6a Set accessible name to pin (NixOS#966)
18e6112 Handle libdigidocpp exception (NixOS#943)
a9efe0f Update translations (NixOS#961)
06e44a0 Fix Linux dark theme (NixOS#950)
a6ff428 Fix missed border of Accordion (NixOS#960)
a14476c Update list of components in Info view (NixOS#958)
8980270 Fix normalization of filenames (NixOS#952)
e4aac44 Shorten notifications display time (NixOS#948)
14606dc Use QSysInfo for OS version (NixOS#931)
b8716e7 Resolve a yellow background, when PIN is locked (NixOS#947)
0319c6b Don't allow searching for spaces during encryption (NixOS#929)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants