summary refs log tree commit diff
path: root/pkgs/build-support/build-fhs-userenv/default.nix
Commit message (Collapse)AuthorAge
* chrootenv: use mesonYegor Timoshenko2018-11-04
|
* buildFHSUserEnv: use runScript in env (#49077)Kristoffer Søholm2018-10-30
| | | | This makes its behaviour conform to what is implied in the documentation.
* pkgs/*: remove unreferenced function argumentsvolth2018-07-21
|
* 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).
* chroot-user: rewrite in C, drop CHROOTENV_EXTRA_BINDSYegor Timoshenko2017-11-09
| | | | Formatted via clang-format.
* buildFHSUserEnv: don't set CHROOTENV_EXTRA_BINDSNikolay Amiantov2016-06-28
|
* 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.
* build-fhs-userenv: added the option meta to be passed down to the final ↵Matthew O'Gorman2016-01-06
| | | | derivation.
* 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.
* 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.
* 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"; }; }
* build-fhs-*: prefer local buildNikolay Amiantov2015-02-05
|
* userFHSEnv: add build toolNikolay Amiantov2015-02-05