about summary refs log tree commit diff
path: root/pkgs/build-support/build-fhs-userenv
Commit message (Collapse)AuthorAge
* buildFHSUserEnv: change to root directory after chrootLinus Heckemann2018-04-28
| | | | Fixes #38525
* buildFHSEnv: export TZDIRNikolay Amiantov2018-03-11
| | | | This is needed since NixOS keeps tzdata in non-standard /etc/zoneinfo path.
* buildFHSEnv: fix compiler search pathsNikolay Amiantov2018-03-10
| | | | Fixes OpenWrt compilation.
* chrootenv: rewrite on top of GLibYegor Timoshenko2017-12-30
| | | | | | | | | | | | | | Changes: * doesn't handle root user separately * doesn't chdir("/") which makes using it seamless * only bind mounts, doesn't symlink (i.e. files) Incidentally, fixes #33106. It's about two times shorter than the previous version, and much easier to read/follow through. It uses GLib quite heavily, along with RAII (available in GCC/Clang).
* chrootenv: resolve potential race conditionYegor Timoshenko2017-12-28
|
* chrootenv: code reviewYegor Timoshenko2017-12-22
| | | | | | | | | | | | | | | | * Wrap LEN macro in parantheses * Drop env_filter in favor of stateful environ_blacklist_filter, use execvp instead of execvpe, don't explicitly use environ * Add argument error logging wherever it makes sense * Drop strjoin in favor of asprintf * char* -> const char* where appropriate * Handle stat errors * Print user messages with fputs, not errorf * Abstract away is_str_in (previously bind_blacklisted) * Cleanup temporary directory on error * Some minor syntactic and naming changes Thanks to Jörg Thalheim and Tuomas Tynkkynen for the code review!
* chrootenv: error on chrootenv-inside-chrootenv, resolves #32802Yegor Timoshenko2017-12-22
|
* chrootenv: replace env whitelist with blacklist, closes #32878Yegor Timoshenko2017-12-22
|
* chrootenv: bind-mount all dirs in /, symlink files, closes #32877Yegor Timoshenko2017-12-22
|
* chrootenv: print sysctl command for Debian users, fixes #32876Yegor Timoshenko2017-12-22
|
* chroot-user: better error message, if unshare is not allowedJörg Thalheim2017-12-09
|
* chroot-user: rewrite in C, drop CHROOTENV_EXTRA_BINDSYegor Timoshenko2017-11-09
| | | | Formatted via clang-format.
* buildFHSEnv: fix NIX_* compiler flagsNikolay Amiantov2017-10-17
| | | | This is needed now after #27672.
* build-fhs-userenv: Propagate $XAUTHORITYJamey Sharp2017-07-18
| | | | | | | | | | | | | The `DISPLAY` environment variable is propagated into chroots built with `buildFHSUserEnv`, but currently the `XAUTHORITY` variable is not. When the latter is set, its value is usually necessary in order to connect to the X server identified by the former. This matters for users running gdm3, for example, who have `XAUTHORITY` set to something like `/run/user/1000/gdm/Xauthority` instead of the X default of `~/.Xauthority`, which doesn't exist in that setup. Fixes #21532.
* buildFHSEnv: add ACLOCAL_PATHNikolay Amiantov2017-04-12
| | | | Fixes #24620.
* Getting rid of the var indirection and using a bin path insteadParnell Springmeyer2017-01-29
|
* Addressing PR feedbackParnell Springmeyer2017-01-28
|
* setcap-wrapper: Merging with upstream master and resolving conflictsParnell Springmeyer2017-01-25
|\
| * buildFHSEnv: link /etc/zoneinfoNikolay Amiantov2016-10-11
| | | | | | | | This is needed because now /etc/localtime symlink points there.
* | Adapting everything for the merged permissions wrappers work.Parnell Springmeyer2016-09-01
|/
* fhs-user-env: keep DBUS_SESSION_BUS_ADDRESS envBenno Fünfstück2016-06-28
| | | | | Steam requires this variable or some games run incredibly slow. See ValveSoftware/Dota-2#921 for more information.
* buildFHSUserEnv: don't set CHROOTENV_EXTRA_BINDSNikolay Amiantov2016-06-28
|
* buildFHSUserEnv: mark CHROOTENV_EXTRA_BINDS as discussed for deprecationNikolay Amiantov2016-06-07
|
* buildFHSEnv: link 'bin' outputNikolay Amiantov2016-06-07
|
* buildFHSEnv: don't link GCC compiler partNikolay Amiantov2016-06-07
|
* buildFHSEnv: refactor and simplify, drop buildFHSChrootEnvNikolay Amiantov2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | This takes another approach at binding FHS directory structure. We now bind-mount all the root filesystem to directory "/host" in the target tree. From that we symlink all the directories into the tree if they do not already exist in FHS structure. This probably makes `CHROOTENV_EXTRA_BINDS` unnecessary -- its main usecase was to add bound directories from the host to the sandbox, and we not just symlink all of them. I plan to get some feedback on its usage and maybe deprecate it. This also drops old `buildFHSChrootEnv` infrastructure. The main problem with it is it's very difficult to unmount a recursive-bound directory when mount is not sandboxed. This problem is a bug even without these changes -- if you have for example `/home/alice` mounted to somewhere, you wouldn't see it in `buildFHSChrootEnv` now. With the new directory structure, it's impossible to use regular bind at all. After some tackling with this I realized that the fix would be brittle and dangerous (if you don't unmount everything clearly and proceed to removing the temporary directory, bye-bye fs!). It also probably doesn't worth it because I haven't heard that someone actually uses it for a long time, and `buildFHSUserEnv` should cover most cases while being much more maintainable and safe for the end-user.
* buildFHSUserEnv: don't run bash in login mode for .envNikolay Amiantov2016-05-20
| | | | Fixes https://github.com/NixOS/nixpkgs/issues/12406 for `.env`
* userFHSEnv: add passthru, rename metaNikolay Amiantov2016-04-03
|
* Revert "Remove PATH assumption from fhs-userenv."Nikolay Amiantov2016-03-29
| | | | | | | This reverts commit 2f26b82411ea93349d375ea3b5d833b04a455972. This breaks terminfo in Bash for some reason (i.e. TAB and other special keys).
* fhs-userenv: don't use bash login modeNikolay Amiantov2016-01-23
| | | | | | Login mode can cause hidden problems, e.g. #12406. Generally we don't want to read user's .bash_profile when we don't start an interactive shell inside a chroot.
* Merge pull request #12062 from mogorman/platformiolethalman2016-01-13
|\ | | | | platformio: init at 2.7.0
| * build-fhs-userenv: added the option meta to be passed down to the final ↵Matthew O'Gorman2016-01-06
| | | | | | | | derivation.
* | chrootenv-user: don't unshare user namespace if we are rootNikolay Amiantov2015-12-17
|/
* Remove PATH assumption from fhs-userenv.Kevin Cox2015-12-14
| | | | | | | Previously is was assumed that bash was in the path when calling the environment setup script. This changes all of the references of bash to be absolute paths so that the user doesn't have to worry about the environment they call it with.
* build-fhs-userenv: don't leak file descriptorszimbatm2015-12-10
| | | | | This re-uses the capabilities documented in `Process.spawn` to avoid leaking unecessary file-descriptors to the sandbox
* buildFHS{Chroot,User}Env: support extraInstallCommandsNikolay Amiantov2015-12-04
|
* build-fhs-userenv: fix extraBindMountsNikolay Amiantov2015-10-07
|
* build-fhs-userenv: add extraBindMounts supportNikolay Amiantov2015-10-06
|
* buildFHSUserEnv: add .env supportNikolay Amiantov2015-08-26
|
* build-fhs-userenv: move /tmp handling to bash partNikolay Amiantov2015-08-24
|
* build-fhs-{chroot,user}env: expose sockets in /tmpNikolay Amiantov2015-08-24
|
* fhs-userenv: refactor and try to chdir to the current directoryNikolay Amiantov2015-04-22
| | | | | runScript now expects a filename instead of a Bash snippet; thus, "exec" should be omitted.
* fhs-userenv: fix mkdirsNikolay Amiantov2015-04-22
|
* fhs-userenv: move mounts mapNikolay Amiantov2015-04-22
|
* fhs-userenv: refactor envvars and propagate SSL_CERT_FILENikolay Amiantov2015-04-22
|
* fhs-userenv: Make it work on kernel < 3.19 cc @abbradarLuca Bruno2015-03-10
| | | | | It may not be very secure, but I think it's better to make it work with older kernel since 3.19 is not the default on nixos.
* Merge pull request #6737 from anderspapitto/fhslethalman2015-03-10
|\ | | | | build-fhs-userenv passes through command line args
| * build-fhs-userenv passes through command line argsAnders Papitto2015-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is to allow things like the following derivation, which wraps the debian-packaged hello binary. let nixpkgs = import <nixpkgs> {}; stdenv = nixpkgs.stdenv; in rec { dumb-hello = stdenv.mkDerivation { name = "dumb-hello"; builder = ./builder.sh; dpkg = nixpkgs.dpkg; src = nixpkgs.fetchurl { url = "http://ftp.us.debian.org/debian/pool/main/h/hello-traditional/hello-traditional_2.9-2_amd64.deb"; md5 = "f5f3c28b65221dae44dda6f242c23316"; }; }; full-hello = nixpkgs.buildFHSUserEnv { name = "full-hello"; targetPkgs = pkgs: [ dumb-hello ]; multiPkgs = pkgs: [ pkgs.dpkg ]; runScript = "hello"; }; }
* | chroot-env: add locales, refactor environmentNikolay Amiantov2015-03-09
| |
* | chroot-env: build /etcNikolay Amiantov2015-03-09
|/