Commit Graph

430 Commits

Author SHA1 Message Date
ajs124
3f8ad50f9a build-support/vm/deb/deb-closure: quote generated urls
otherwise, eval fails when the experimental no-url-literals feature is activated

unquoted urls are discouraged after https://github.com/NixOS/rfcs/pull/45
2023-02-20 01:38:31 +01:00
superherointj
0eae5c0532
Merge pull request #205156 from yu-re-ka/musl-runinlinuxvm
runInLinuxVM: fix on musl
2023-02-16 12:24:34 -03:00
Nikolay Korotkiy
8cf41cf4ef
Merge pull request #215713 from sikmir/vmtools
vmTools: update debian versions
2023-02-14 23:33:34 +04:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Nikolay Korotkiy
4ed059d041
vmTools: update debian versions 2023-02-10 21:39:15 +03:00
Artturin
fe1c7a1945 treewide: remove usages of header and stopNest
they're obsolete
2023-01-16 00:08:12 +02:00
Alexander Bich
aaa4244387 vmTools: add ubuntu 22.04 2022-12-26 10:58:52 +00:00
Sandro
9c624f5879
Merge pull request #203117 from sikmir/vmtools
vmTools: update current maintained debian versions
2022-12-20 15:51:50 +01:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
Yureka
03b2a82ca9 runInLinuxVM: fix on musl 2022-12-08 18:36:59 +01:00
Nikolay Korotkiy
dd1c4ff5fc
vmTools: update current maintained debian versions 2022-11-26 23:53:24 +03:00
Artturin
c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
Artturin
0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
Jörg Thalheim
d6fee2a44a vmTools/test: fix pcmanfm instead of pan
This goes much quicker. Also disable parallel build for machines with
many cores to avoid running out of memory.
2021-12-31 16:47:22 +01:00
Alyssa Ross
37c5db5a29
vmTools/test: add missing backing format 2021-12-28 13:10:16 +00:00
Alyssa Ross
80b5b4917c
vmTools/test: give pan build more memory 2021-12-28 13:10:15 +00:00
Alyssa Ross
55b883448e
vmTools.buildRPM: properly derive source name
This fixes e.g. building the rpm of patchelf as in
pkgs/build-support/vm/test.nix.  The glob won't work if there are
multiple spec files but I don't think rpmbuild would work in that case
either.
2021-12-28 13:10:13 +00:00
Alyssa Ross
e0455e1e29
vmTools: fix phases
These gave missing attribute errors.  They should have been written as
strings in ae9337179b.

Fixes: ae9337179b ("vm: deprecate phases")
Fixes: 52b10ee872 ("vmTools refactor: don't use huge `with pkgs;`")
2021-12-28 13:10:11 +00:00
Alyssa Ross
812fe6a2b3
vmTools/test: update for new releases 2021-12-28 12:40:57 +00:00
Alyssa Ross
0acf53bdb1
runInLinuxVM: set 9p msize to 128K
This fixes the following warning from QEMU, by using the value that
will be the default in newer kernels[1].

> 9p: degraded performance: a reasonable high msize should be chosen
> on client/guest side (chosen msize is <= 8192). See
> https://wiki.qemu.org/Documentation/9psetup#msize for details.

For a runInLinuxVM derivation I have that does a large amount of
IO[2], this change results in a fairly small but repeatable speed
increase.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9c4d94dc9a64426d2fa0255097a3a84f6ff2eebe
[2]: https://spectrum-os.org/git/spectrum/tree/installer/default.nix?id=06dd70500a9e475d23e3296dddf409d84abf9b9c#n52
2021-12-17 07:52:11 +00:00
Alyssa Ross
9c4c0f89a5
vmTools.runInLinuxVM: create fd symlinks in /dev
These are usually set up by systemd, but there's no systemd in the
VM.  /dev/fd is required for <(...) syntax in bash, and I'm sure lots
of things depend on the stdin/stdout/stderr links as well.
2021-12-08 00:32:29 +00:00
Artturi
c4851c0d71
Revert msize related commits (#147180) 2021-11-24 02:33:53 +02:00
Ryan Burns
2175b157ac treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
Artturin
d1c3a49fdd vmTools: set msize to 16KiB temporarily
hopefully this will reduce the ram usage enough
2021-11-21 01:13:54 +02:00
Artturin
e2ab6321ed vmTools: set msize to 128KiB
500KiB was causing issues https://github.com/NixOS/nixpkgs/pull/142577
2021-11-20 20:49:49 +02:00
Janne Heß
ecf388e90b
vmTools: Make msize larger to silence warning
See https://issues.guix.gnu.org/47225
2021-11-18 21:21:49 +01:00
Christian Kögler
9bf244964d runInLinuxImage: Add missing backing format 2021-10-28 00:05:27 +02:00
Christian Kögler
0625121793 buildInDebian: fix test 2021-10-28 00:03:27 +02:00
Vladimír Čunát
52b10ee872
vmTools refactor: don't use huge with pkgs;
... especially when scoped over hundreds of lines of code.
2021-09-30 21:26:35 +02:00
Robert Hensing
8863a5199d vmTools.createEmptyImage: Add destination parameter 2021-09-29 09:33:14 +02:00
Timothy DeHerrera
895f3956d2
Merge pull request #127933 from rnhmjoj/qemu-restoration
Qemu restoration
2021-09-28 21:35:23 -06:00
Jörg Thalheim
57e69a608a
Merge pull request #109636 from mroi/patch-vmtools
vmTools: fix cross compilation
2021-09-22 00:51:22 +01:00
rnhmjoj
b29c2f97c3
nixos/lib/qemu-flags: rename to qemu-common
The current name is misleading: it doesn't contain cli arguments,
but several constants and utility functions related to qemu.
This commit also removes the use of `with import ...` for clarity.
2021-09-18 16:58:16 +02:00
Felix Buehler
ae9337179b vm: deprecate phases 2021-08-20 23:31:26 +02:00
Jörg Thalheim
eb0034927d
vmTools: update current maintained debian versions
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-05-27 07:33:11 +02:00
Jörg Thalheim
e71c4f4628
vmTools: update current lts versions of ubuntu 2021-05-26 23:12:26 +02:00
Sandro Jäckel
3453b89f4b
lzma: deprecate alias 2021-04-04 19:49:52 +02:00
Michael Roitzsch
e56bddf0df vmTools: fix cross compilation
executables used at build-time should be taken from buildPackages
2021-03-23 13:16:17 +01:00
Pavol Rusnak
90f7338112
treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
John Ericson
9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer
0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson
8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05:00
Damien Diederen
3363377530 vmTools.debClosureGenerator: Fix non-determinism in dependency graph
By default, Perl versions since 5.8.1 use randomization to make hashes
resistant to complexity attacks.

That randomization makes building VM images such as ubuntu1804x86_64
non-deterministic because the (imported) derivations built by
deb/deb-closure.pl are not stable.

This can easily be observed by repeating the following sequence of
commands and noting the path of the image's .drv:

    nix-instantiate -E '(import <nixpkgs> {}).vmTools.diskImageFuns.ubuntu1804x86_64 {}'
    nix-store --delete /nix/store/*ubuntu-18.04-bionic-amd64.nix

One source of non-determinism is the handling of Provides/Replaces,
which depends on the order of iteration over %packages.  Here is a
diff showing the corresponding change in output:

     >>> awk
    -virtual awk: using original-awk
    -    original-awk: libc6 (>= 2.14)
    +virtual awk: using mawk
    +    mawk: libc6 (>= 2.14)

    -    mawk: libc6 (>= 2.14)
    ->>> libc6

This patch sorts packages by name for Provides/Replaces processing,
which seems to result in stable output.

(If the above turns out not to be sufficient, one could also set the
PERL_HASH_SEED and PERL_PERTURB_KEYS environment variables, documented
in 'perlrun', to disable Perl's built-in randomization.  Complexity
attacks are not an issue as we control and trust all inputs.)
2020-12-30 11:37:37 +01:00
aszlig
1152978cda
vm: Remove runInWindowsVM implementation
Originally this was meant to support other Windows versions than just
Windows XP, but before I actually got a chance to implement this I left
the project that I implemented this for.

The code has been broken for years now and I highly doubt anyone is
interested in resurrecting this (including me), so in order to make this
less of a maintenance burden for everybody, let's remove it.

Signed-off-by: aszlig <aszlig@nix.build>
2020-12-17 07:03:36 +01:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Florian Klink
8a388c8296
Merge pull request #82258 from erikarvstedt/fix-xchg-caching
fix inconsistent caching of VM xchg dirs
2020-06-01 22:34:48 +02:00
Erik Arvstedt
d85dc4f690
qemu-vm: fix inconsistent caching of xchg dirs
xchg is advertised as a bidirectional exchange dir, but file content
transfer from host to VM fails due to caching:
If a file is read in the VM and then modified on the host, subsequent
re-reads in the VM can yield old, cached data.
This is caused by the use of 9p's cache=loose mode that is explicitly
meant for read-only mounts.

9p doesn't provide any suitable cache modes, so fix this by disabling
caching.

Also, remove a now unnecessary sync in the test driver.
2020-06-01 21:55:33 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Symphorien Gibol
671dc2a5ca vmTools.diskImageFuns.debian9i386: update source url
referenced packets were removed from the mirrors

Fixes #77396 #80041
2020-03-29 15:30:15 +02:00
Samuel Dionne-Riel
687e2195d8 runInLinuxVM: Ensure tools requiring /etc/passwd work
This includes, but is not limited to:

 * whoami
 * nix >= 2.3.1

See

 * https://github.com/NixOS/nixpkgs/issues/71157
 * https://github.com/NixOS/nixops/issues/1216
 * https://github.com/nix-community/nixops-libvirtd/issues/5
2020-02-20 18:51:17 -05:00