summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix10
-rw-r--r--nixos/doc/manual/development/running-nixos-tests-interactively.section.md4
-rw-r--r--nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml4
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2205.section.xml9
-rw-r--r--nixos/doc/manual/release-notes/rl-2205.section.md2
-rwxr-xr-xnixos/lib/test-driver/test_driver/__init__.py34
-rw-r--r--nixos/lib/test-driver/test_driver/driver.py33
-rw-r--r--nixos/lib/test-driver/test_driver/machine.py9
-rw-r--r--nixos/lib/testing-python.nix5
-rw-r--r--nixos/modules/config/xdg/portal.nix35
-rw-r--r--nixos/modules/programs/tmux.nix15
-rw-r--r--nixos/modules/services/networking/kresd.nix2
-rw-r--r--nixos/tests/geth.nix2
-rw-r--r--pkgs/applications/audio/cyanrip/default.nix6
-rw-r--r--pkgs/applications/misc/cherrytree/default.nix4
-rw-r--r--pkgs/applications/misc/fme/default.nix59
-rw-r--r--pkgs/applications/misc/rivercarro/default.nix4
-rw-r--r--pkgs/applications/networking/cluster/helm/default.nix15
-rw-r--r--pkgs/applications/networking/cluster/sonobuoy/default.nix8
-rw-r--r--pkgs/applications/networking/cluster/talosctl/default.nix44
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix4
-rw-r--r--pkgs/applications/networking/mullvad-vpn/default.nix8
-rw-r--r--pkgs/applications/science/logic/isabelle/default.nix14
-rw-r--r--pkgs/applications/science/machine-learning/shogun/default.nix18
-rw-r--r--pkgs/applications/terminal-emulators/mlterm/default.nix2
-rw-r--r--pkgs/applications/version-management/commitizen/default.nix64
-rw-r--r--pkgs/applications/video/lbry/default.nix4
-rw-r--r--pkgs/applications/video/vlc/default.nix10
-rw-r--r--pkgs/desktops/pantheon/apps/elementary-files/default.nix14
-rw-r--r--pkgs/development/compilers/qbe/default.nix6
-rw-r--r--pkgs/development/coq-modules/serapi/default.nix17
-rw-r--r--pkgs/development/interpreters/clojure/obb.nix4
-rw-r--r--pkgs/development/libraries/aws-c-common/default.nix2
-rw-r--r--pkgs/development/libraries/live555/default.nix37
-rw-r--r--pkgs/development/node-packages/node-packages.json1
-rw-r--r--pkgs/development/node-packages/node-packages.nix631
-rw-r--r--pkgs/development/ocaml-modules/ocaml-libvirt/default.nix11
-rw-r--r--pkgs/development/ocaml-modules/ppx_import/default.nix33
-rw-r--r--pkgs/development/python-modules/adafruit-platformdetect/default.nix4
-rw-r--r--pkgs/development/python-modules/ailment/default.nix4
-rw-r--r--pkgs/development/python-modules/angr/default.nix4
-rw-r--r--pkgs/development/python-modules/angrop/default.nix4
-rw-r--r--pkgs/development/python-modules/archinfo/default.nix4
-rwxr-xr-xpkgs/development/python-modules/atlassian-python-api/default.nix4
-rw-r--r--pkgs/development/python-modules/bandit/default.nix4
-rw-r--r--pkgs/development/python-modules/cftime/default.nix42
-rw-r--r--pkgs/development/python-modules/claripy/default.nix4
-rw-r--r--pkgs/development/python-modules/cle/default.nix4
-rw-r--r--pkgs/development/python-modules/databricks-connect/default.nix16
-rw-r--r--pkgs/development/python-modules/dropbox/default.nix37
-rw-r--r--pkgs/development/python-modules/nkdfu/default.nix31
-rw-r--r--pkgs/development/python-modules/python-fsutil/default.nix4
-rw-r--r--pkgs/development/python-modules/pyvex/default.nix4
-rw-r--r--pkgs/development/python-modules/qcengine/default.nix4
-rw-r--r--pkgs/development/python-modules/schiene/default.nix16
-rw-r--r--pkgs/development/tools/go-swag/default.nix2
-rw-r--r--pkgs/development/web/minify/default.nix6
-rw-r--r--pkgs/misc/vscode-extensions/default.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-lqx.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/generic.nix3
-rw-r--r--pkgs/servers/http/nginx/modules.nix107
-rw-r--r--pkgs/servers/mail/postfix/default.nix4
-rw-r--r--pkgs/tools/admin/google-cloud-sdk/data.nix22
-rwxr-xr-xpkgs/tools/admin/google-cloud-sdk/update.sh2
-rw-r--r--pkgs/tools/archivers/unrar/default.nix4
-rw-r--r--pkgs/tools/misc/diffoscope/ignore_links.patch2
-rw-r--r--pkgs/tools/misc/disfetch/default.nix4
-rw-r--r--pkgs/tools/misc/mmctl/default.nix4
-rw-r--r--pkgs/tools/misc/vector/default.nix10
-rw-r--r--pkgs/tools/networking/dnstake/default.nix6
-rw-r--r--pkgs/tools/security/amber/default.nix6
-rw-r--r--pkgs/tools/security/beyond-identity/default.nix4
-rw-r--r--pkgs/tools/security/dnspeep/default.nix6
-rw-r--r--pkgs/tools/security/nitrokey-app/default.nix2
-rw-r--r--pkgs/tools/security/pynitrokey/default.nix44
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix8
-rw-r--r--pkgs/top-level/python-packages.nix2
78 files changed, 999 insertions, 634 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index e991280a0f28..6ae60956ae97 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -6068,6 +6068,16 @@
githubId = 2396926;
name = "Justin Woo";
};
+ jvanbruegge = {
+ email = "supermanitu@gmail.com";
+ github = "jvanbruegge";
+ githubId = 1529052;
+ name = "Jan van Brügge";
+ keys = [{
+ longkeyid = "rsa4096/0x366572BE7D6C78A2";
+ fingerprint = "3513 5CE5 77AD 711F 3825 9A99 3665 72BE 7D6C 78A2";
+ }];
+ };
jwatt = {
email = "jwatt@broken.watch";
github = "jjwatt";
diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
index 4c399586eb52..a1431859ff59 100644
--- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
+++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
@@ -5,7 +5,7 @@ when developing or debugging a test:
```ShellSession
$ nix-build . -A nixosTests.login.driverInteractive
-$ ./result/bin/nixos-test-driver --interactive
+$ ./result/bin/nixos-test-driver
[...]
>>>
```
@@ -28,7 +28,7 @@ You can re-use the VM states coming from a previous run by setting the
`--keep-vm-state` flag.
```ShellSession
-$ ./result/bin/nixos-test-driver --interactive --keep-vm-state
+$ ./result/bin/nixos-test-driver --keep-vm-state
```
The machine state is stored in the `$TMPDIR/vm-state-machinename`
diff --git a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml
index 8348ab56deb3..0e47350a0d24 100644
--- a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml
+++ b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml
@@ -6,7 +6,7 @@
</para>
<programlisting>
$ nix-build . -A nixosTests.login.driverInteractive
-$ ./result/bin/nixos-test-driver --interactive
+$ ./result/bin/nixos-test-driver
[...]
&gt;&gt;&gt;
</programlisting>
@@ -30,7 +30,7 @@ $ ./result/bin/nixos-test-driver --interactive
the <literal>--keep-vm-state</literal> flag.
</para>
<programlisting>
-$ ./result/bin/nixos-test-driver --interactive --keep-vm-state
+$ ./result/bin/nixos-test-driver --keep-vm-state
</programlisting>
<para>
The machine state is stored in the
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index 436157515ebe..9f5279732fe4 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -712,6 +712,15 @@
warning.
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>programs.tmux</literal> has a new option
+ <literal>plugins</literal> that accepts a list of packages
+ from the <literal>tmuxPlugins</literal> group. The specified
+ packages are added to the system and loaded by
+ <literal>tmux</literal>.
+ </para>
+ </listitem>
</itemizedlist>
</section>
</section>
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index 9d919711cb7f..629672259b21 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -243,4 +243,6 @@ In addition to numerous new and upgraded packages, this release has the followin
Reason is that the old name has been deprecated upstream.
Using the old option name will still work, but produce a warning.
+- `programs.tmux` has a new option `plugins` that accepts a list of packages from the `tmuxPlugins` group. The specified packages are added to the system and loaded by `tmux`.
+
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
diff --git a/nixos/lib/test-driver/test_driver/__init__.py b/nixos/lib/test-driver/test_driver/__init__.py
index 5477ab5cd038..61d91c9ed654 100755
--- a/nixos/lib/test-driver/test_driver/__init__.py
+++ b/nixos/lib/test-driver/test_driver/__init__.py
@@ -33,6 +33,22 @@ class EnvDefault(argparse.Action):
setattr(namespace, self.dest, values)
+def writeable_dir(arg: str) -> Path:
+ """Raises an ArgumentTypeError if the given argument isn't a writeable directory
+ Note: We want to fail as early as possible if a directory isn't writeable,
+ since an executed nixos-test could fail (very late) because of the test-driver
+ writing in a directory without proper permissions.
+ """
+ path = Path(arg)
+ if not path.is_dir():
+ raise argparse.ArgumentTypeError("{0} is not a directory".format(path))
+ if not os.access(path, os.W_OK):
+ raise argparse.ArgumentTypeError(
+ "{0} is not a writeable directory".format(path)
+ )
+ return path
+
+
def main() -> None:
arg_parser = argparse.ArgumentParser(prog="nixos-test-driver")
arg_parser.add_argument(
@@ -45,7 +61,7 @@ def main() -> None:
"-I",
"--interactive",
help="drop into a python repl and run the tests interactively",
- action="store_true",
+ action=argparse.BooleanOptionalAction,
)
arg_parser.add_argument(
"--start-scripts",
@@ -64,6 +80,14 @@ def main() -> None:
help="vlans to span by the driver",
)
arg_parser.add_argument(
+ "-o",
+ "--output_directory",
+ help="""The path to the directory where outputs copied from the VM will be placed.
+ By e.g. Machine.copy_from_vm or Machine.screenshot""",
+ default=Path.cwd(),
+ type=writeable_dir,
+ )
+ arg_parser.add_argument(
"testscript",
action=EnvDefault,
envvar="testScript",
@@ -77,7 +101,11 @@ def main() -> None:
rootlog.info("Machine state will be reset. To keep it, pass --keep-vm-state")
with Driver(
- args.start_scripts, args.vlans, args.testscript.read_text(), args.keep_vm_state
+ args.start_scripts,
+ args.vlans,
+ args.testscript.read_text(),
+ args.output_directory.resolve(),
+ args.keep_vm_state,
) as driver:
if args.interactive:
ptpython.repl.embed(driver.test_symbols(), {})
@@ -94,7 +122,7 @@ def generate_driver_symbols() -> None:
in user's test scripts. That list is then used by pyflakes to lint those
scripts.
"""
- d = Driver([], [], "")
+ d = Driver([], [], "", Path())
test_symbols = d.test_symbols()
with open("driver-symbols", "w") as fp:
fp.write(",".join(test_symbols.keys()))
diff --git a/nixos/lib/test-driver/test_driver/driver.py b/nixos/lib/test-driver/test_driver/driver.py
index 49a42fe5fb4e..880b1c5fdec0 100644
--- a/nixos/lib/test-driver/test_driver/driver.py
+++ b/nixos/lib/test-driver/test_driver/driver.py
@@ -10,6 +10,28 @@ from test_driver.vlan import VLan
from test_driver.polling_condition import PollingCondition
+def get_tmp_dir() -> Path:
+ """Returns a temporary directory that is defined by TMPDIR, TEMP, TMP or CWD
+ Raises an exception in case the retrieved temporary directory is not writeable
+ See https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir
+ """
+ tmp_dir = Path(tempfile.gettempdir())
+ tmp_dir.mkdir(mode=0o700, exist_ok=True)
+ if not tmp_dir.is_dir():
+ raise NotADirectoryError(
+ "The directory defined by TMPDIR, TEMP, TMP or CWD: {0} is not a directory".format(
+ tmp_dir
+ )
+ )
+ if not os.access(tmp_dir, os.W_OK):
+ raise PermissionError(
+ "The directory defined by TMPDIR, TEMP, TMP, or CWD: {0} is not writeable".format(
+ tmp_dir
+ )
+ )
+ return tmp_dir
+
+
class Driver:
"""A handle to the driver that sets up the environment
and runs the tests"""
@@ -24,12 +46,13 @@ class Driver:
start_scripts: List[str],
vlans: List[int],
tests: str,
+ out_dir: Path,
keep_vm_state: bool = False,
):
self.tests = tests
+ self.out_dir = out_dir
- tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
- tmp_dir.mkdir(mode=0o700, exist_ok=True)
+ tmp_dir = get_tmp_dir()
with rootlog.nested("start all VLans"):
self.vlans = [VLan(nr, tmp_dir) for nr in vlans]
@@ -47,6 +70,7 @@ class Driver:
name=cmd.machine_name,
tmp_dir=tmp_dir,
callbacks=[self.check_polling_conditions],
+ out_dir=self.out_dir,
)
for cmd in cmd(start_scripts)
]
@@ -141,8 +165,8 @@ class Driver:
"Using legacy create_machine(), please instantiate the"
"Machine class directly, instead"
)
- tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
- tmp_dir.mkdir(mode=0o700, exist_ok=True)
+
+ tmp_dir = get_tmp_dir()
if args.get("startCommand"):
start_command: str = args.get("startCommand", "")
@@ -154,6 +178,7 @@ class Driver: