Commit graph

2552 commits

Author SHA1 Message Date
Florian Klink
e148a72377
Merge pull request #86067 from NinjaTrappeur/nin-sane-prosody-defaults
nixos/prosody: make module defaults comply with XEP-0423
2020-05-01 20:07:13 +02:00
Andreas Rammhold
47529bcf7f
nixos/tests: add systemd-networkd-ipv6-prefix-delegation
This is a follow-up to the PR #82026 that contains the promised tests.

In this test I am testing if we can properly propagate prefixes received
via DHCPv6 PD with the networkd options in our module system.

The comments in the test should be sufficient to follow the idea and
what is going on.
2020-05-01 16:55:53 +02:00
Aaron Andersen
5445b8d8d0
Merge pull request #83436 from mmilata/mediawiki-default-extensions
nixos/mediawiki: allow using default extensions
2020-04-30 21:03:15 -04:00
Félix Baylac-Jacqué
8aea528872
nixos/prosody: make defaults comply with XEP-0423
Setting up a XMPP chat server is a pretty deep rabbit whole to jump in
when you're not familiar with this whole universe. Your experience
with this environment will greatly depends on whether or not your
server implements the right set of XEPs.

To tackle this problem, the XMPP community came with the idea of
creating a meta-XEP in charge of listing the desirable XEPs to comply
with. This meta-XMP is issued every year under an new XEP number. The
2020 one being XEP-0423[1].

This prosody nixos module refactoring makes complying with XEP-0423
easier. All the necessary extensions are enabled by default. For some
extensions (MUC and HTTP_UPLOAD), we need some input from the user and
cannot provide a sensible default nixpkgs-wide. For those, we guide
the user using a couple of assertions explaining the remaining manual
steps to perform.

We took advantage of this substential refactoring to refresh the
associated nixos test.

Changelog:
- Update the prosody package to provide the necessary community
  modules in order to comply with XEP-0423. This is a tradeoff, as
  depending on their configuration, the user might end up not using them
  and wasting some disk space. That being said, adding those will
  allow the XEP-0423 users, which I expect to be the majority of
  users, to leverage a bit more the binary cache.
- Add a muc submodule populated with the prosody muc defaults.
- Add a http_upload submodule in charge of setting up a basic http
  server handling the user uploads. This submodule is in is
  spinning up an HTTP(s) server in charge of receiving and serving the
  user's attachments.
- Advertise both the MUCs and the http_upload endpoints using mod disco.
- Use the slixmpp library in place of the now defunct sleekxmpp for
  the prosody NixOS test.
- Update the nixos test to setup and test the MUC and http upload
  features.
- Add a couple of assertions triggered if the setup is not xep-0423
  compliant.

[1] https://xmpp.org/extensions/xep-0423.html
2020-04-30 20:39:54 +02:00
Maximilian Bosch
41bd6d2614
nixos/wireguard: test against multiple kernel versions
When testing WireGuard updates, I usually run the VM-tests with
different kernels to make sure we're not introducing accidental
regressions for e.g. older kernels.

I figured that we should automate this process to ensure continuously
that WireGuard works fine on several kernels.

For now I decided to test the latest LTS version (5.4) and
the latest kernel (currently 5.6). We can add more kernels in the
future, however this seems to significantly slow down evaluation and
time.

The list can be customized by running a command like this:

   nix-build nixos/tests/wireguard --arg kernelVersionsToTest '["4.19"]'

The `kernelPackages` argument in the tests is null by default to make
sure that it's still possible to invoke the test-files directly. In that
case the default kernel of NixOS (currently 5.4) is used.
2020-04-29 23:10:53 +02:00
Elis Hirwing
3e10bd8762
nixosTests.php: Add maintainer team as maintainers 2020-04-29 20:17:08 +02:00
Elis Hirwing
410c38f317
Revert "PHP maintainer team" 2020-04-29 19:56:37 +02:00
Elis Hirwing
3b21abb3d3
Merge pull request #85575 from etu/php-maintainer-team
PHP maintainer team
2020-04-29 19:56:03 +02:00
Bas van Dijk
e26ec76d0d
Merge pull request #86321 from basvandijk/fix-elk-test
nixos/tests/elk.nix: fix issue in the elasticsearch-curator
2020-04-29 17:06:57 +02:00
Bas van Dijk
dcb01353b3 nixos/tests/elk.nix: fix issue in the elasticsearch-curator
The elasticsearch-curator was not deleting indices because the indices
had ILM policies associated with them. This is now fixed by
configuring the elasticsearch-curator with `allow_ilm_indices: true`.

Also see: https://github.com/elastic/curator/issues/1490
2020-04-29 15:23:50 +02:00
Florian Klink
21da5c4f6f nixos/oslogin: put mockuser and mockadmin in constants, rename
This allows us to change them easily without search/replacing.
Afterwards, we rename them to look a bit more like they are on GCP.
2020-04-29 14:36:35 +02:00
Florian Klink
f38e45c2e0 nixos/google-oslogin: improve mock server
some slightly better error handling for nonexistent users, less parsing
of URLs and query strings by hand.
2020-04-29 14:36:35 +02:00
worldofpeace
10bf212b4f
Merge pull request #85589 from emilazy/add-acme-maintainers-team
Add ACME maintainers team
2020-04-28 18:38:12 -04:00
Jacek Galowicz
002b553b14
Merge pull request #85781 from blitz/spike-test
Add spike integration test to nixosTests
2020-04-25 15:50:38 +02:00
worldofpeace
ee5cba24c3
Revert "ibus: fix dconf db installation" 2020-04-24 18:22:59 -04:00
worldofpeace
78a9359b2a
Merge pull request #85892 from symphorien/ibus-db
ibus: fix dconf db installation
2020-04-24 15:49:01 -04:00
Symphorien Gibol
5b7ffe6140 nixos/tests/ibus: fix test 2020-04-24 12:00:00 +00:00
adisbladis
67a61fbd34
nixos/podman: Add rootless containers to test 2020-04-24 10:50:17 +01:00
Benjamin Staffin
f09b8be73d installer test: Fix grub extraConfig syntax
It looks like `terminal_output.serial` is incorrect, according to the
grub documentation:

https://www.gnu.org/software/grub/manual/grub/html_node/Serial-terminal.html

Related PR: #79406
2020-04-22 20:30:19 -04:00
Florian Klink
32516e4fee
Merge pull request #80103 from tfc/port-systemd-confinement-test
nixosTests.systemd-confinement: Port to Python
2020-04-23 01:00:51 +02:00
Julian Stecklina
a33ce7e4fb spike: add test to nixosTests 2020-04-22 14:45:12 +02:00
Jacek Galowicz
0b1bef70a9 nixosTests.redmine: Port to python 2020-04-22 08:36:27 +02:00
Elis Hirwing
9be2cbf27b
nixosTests.php: Add maintainer team as maintainers 2020-04-22 06:48:06 +02:00
Jan Tojnar
b231ac2101
Merge pull request #85402 from jtojnar/httpd-php 2020-04-22 04:23:24 +02:00
adisbladis
2d91da909e
Merge pull request #85604 from adisbladis/podman-module
nixos/virtualisation.podman: Init module
2020-04-21 23:48:48 +02:00
Robin Gloster
134c66b584
privacyidea module: init 2020-04-21 16:54:51 +02:00
Tom Fitzhenry
0a49d329cb systemd-networkd: add DHCPServer test 2020-04-22 00:12:00 +10:00
adisbladis
f0a92ef1d9
nixos/podman: Add maintainer team & add myself to podman team 2020-04-21 10:03:22 +01:00
adisbladis
b512a788a4
nixos/virtualisation.podman: Init module 2020-04-21 10:03:18 +01:00
Marek Mahut
60100a7c92
Merge pull request #83769 from dadada/nixos/dokuwiki-multi-server
nixos/dokuwiki: add support for multi-site, additional plugins and templates
2020-04-20 19:39:48 +02:00
adisbladis
ab37d7e7ea
nixos-containers: Add support for custom nixpkgs argument 2020-04-20 07:33:46 +01:00
Emily
bfffee9364 nixos/tests/acme: set maintainers to acme team 2020-04-20 01:39:31 +01:00
Florian Klink
ab0da25762
Merge pull request #85503 from emilazy/acme-test-cleanups
ACME test cleanups
2020-04-19 23:57:03 +02:00
Florian Klink
a88d17bc69
Merge pull request #83301 from evils/tuptime
Tuptime: Init Package, Module and Test
2020-04-19 23:38:53 +02:00
worldofpeace
f882896cc8
Merge pull request #73934 from flokli/nixos-test-port-cockroachdb
nixosTests.cockroachdb: port to python
2020-04-19 16:30:45 -04:00
Yegor Timoshenko
6f1165a0cb
Merge pull request #84522 from emilazy/add-linux-hardened-patches
linux_*_hardened: use linux-hardened patch set
2020-04-19 20:01:35 +03:00
dadada
2d86cca35e
nixos/dokuwiki: change default of aclFile and usersFile
`aclFile` and `usersFile` will be set to a default value if `aclUse` is
specified and aclFile is not overriden by `acl`.
2020-04-18 23:37:19 +02:00
dadada
af6a7a0486
nixos/dokuwiki: add plugins and templates options
Adds support for additional plugins and templates similarly to how
wordpress.nix does it.

Plugins and templates need to be packaged as in the example.
2020-04-18 23:37:18 +02:00
dadada
dc7ed06615
nixos/dokuwiki: add <name?> option
Enables multi-site configurations.

This break compatibility with prior configurations that expect options
for a single dokuwiki instance in `services.dokuwiki`.
2020-04-18 23:37:18 +02:00
Vladimír Čunát
e233a9d4dd
Merge #84442: staging-next branch 2020-04-18 23:11:00 +02:00
Jan Tojnar
09c4736405
Merge pull request #83755 from jtojnar/jcat-0.1 2020-04-18 20:38:24 +02:00
Vladimír Čunát
d96487b9ca
Merge branch 'master' into staging-next
Hydra nixpkgs: ?compare=1582510
2020-04-18 07:42:26 +02:00
Emily
21f183a3fe nixos/tests/common/acme: don't set nameservers for client
The resolver is mainly useful for the ACME server, and acme.nix uses its
own DNS server to test DNS-01 challenges.
2020-04-18 05:15:47 +01:00
Emily
e6d5e83cf1 nixos/tests/common/acme: enable Pebble strict mode
This lets us get early warning about any bugs or backwards-compatibility
hazards in lego.

Pebble will default to this in the future, but doesn't currently;
see https://github.com/letsencrypt/pebble/blob/v2.3.0/README.md#strict-mode.
2020-04-18 05:15:47 +01:00
Emily
695fd78ac4 nixos/tests/acme: use CAP_NET_BIND_SERVICE 2020-04-18 05:15:47 +01:00
Emily
d0f04c1623 nixos/tests/acme: use *.test domains
Shimming out the Let's Encrypt domain name to reuse client configuration
doesn't work properly (Pebble uses different endpoint URL formats), is
recommended against by upstream,[1] and is unnecessary now that the ACME
module supports specifying an ACME server. This commit changes the tests
to use the domain name acme.test instead, and renames the letsencrypt
node to acme to reflect that it has nothing to do with the ACME server
that Let's Encrypt runs. The imports are renamed for clarity:

* nixos/tests/common/{letsencrypt => acme}/{common.nix => client}
* nixos/tests/common/{letsencrypt => acme}/{default.nix => server}

The test's other domain names are also adjusted to use *.test for
consistency (and to avoid misuse of non-reserved domain names such
as standalone.com).

[1] https://github.com/letsencrypt/pebble/issues/283#issuecomment-545123242

Co-authored-by: Yegor Timoshenko <yegortimoshenko@riseup.net>
2020-04-18 05:15:47 +01:00
Emily
352e30df8a nixos/tests/acme: don't restrict to x86_64
This was added in aade4e577b, but the
implementation of the ACME module has been entirely rewritten since
then, and the test seems to run fine on AArch64.
2020-04-18 05:15:47 +01:00
Milan Pässler
16a4332d60 nixos/deluge: support 2.x 2020-04-18 02:00:04 +02:00
Emily
fe031d07f8 nixos/tests/hardened: add latestKernel argument 2020-04-17 16:13:39 +01:00
Emily
ad9bfe2254 nixos/hardened: enable user namespaces for root
linux-hardened sets kernel.unprivileged_userns_clone=0 by default; see
anthraxx/linux-hardened@104f44058f.

This allows the Nix sandbox to function while reducing the attack
surface posed by user namespaces, which allow unprivileged code to
exercise lots of root-only code paths and have lead to privilege
escalation vulnerabilities in the past.

We can safely leave user namespaces on for privileged users, as root
already has root privileges, but if you're not running builds on your
machine and really want to minimize the kernel attack surface then you
can set security.allowUserNamespaces to false.

Note that Chrome's sandbox requires either unprivileged CLONE_NEWUSER or
setuid, and Firefox's silently reduces the security level if it isn't
allowed (see about:support), so desktop users may want to set:

    boot.kernel.sysctl."kernel.unprivileged_userns_clone" = true;
2020-04-17 16:13:39 +01:00
Euan Kemp
bc138f407f
nixos/k3s: add initial k3s service
* nixos/k3s: simplify config expression

* nixos/k3s: add config assertions and trim unneeded bits

* nixos/k3s: add a test that k3s works; minor module improvements

This is a single-node test. Eventually we should also have a multi-node
test to verify the agent bit works, but that one's more involved.

* nixos/k3s: add option description

* nixos/k3s: add defaults for token/serveraddr

Now that the assertion enforces their presence, we dont' need to use the typesystem for it.

* nixos/k3s: remove unneeded sudo in test

* nixos/k3s: add to test list
2020-04-17 16:39:54 +02:00
Jan Tojnar
23a6903bb7
nixosTests.php.fpm: Clean up to match httpd test 2020-04-17 14:41:20 +02:00
Jan Tojnar
b69556c580
nixosTests.php.pcre: Clean up
And add assertion messages
2020-04-17 14:41:20 +02:00
Jan Tojnar
aac9832b96
nixosTests.php.httpd: init 2020-04-17 14:40:12 +02:00
Jan Tojnar
3d8e436917
Merge branch 'master' into staging-next 2020-04-16 10:09:43 +02:00
Maximilian Bosch
5e124e5abd
nixos/tests: fix inclusion of hydra test 2020-04-16 02:17:25 +02:00
Jan Tojnar
1fade973fc
libjcat: init at 0.1.1 2020-04-15 20:30:06 +02:00
Florian Klink
28ef43824b nixosTests.flannel: port to python, unbreak
For reasons yet unknown, the vxlan backend doesn't work (at least inside
the qemu networking), so this is moved to the udp backend.

Note changing the backend apparently also changes the interface name,
it's now `flannel0`, not `flannel.1`

fixes #74941
2020-04-14 23:56:42 +02:00
Michele Guerini Rocco
86d71ddbed
Merge pull request #85170 from flokli/networking-virtual
nixos/networking: fix setting MAC Address and MTU in networkd, fix tests
2020-04-14 14:20:49 +02:00
worldofpeace
57b862bb53
Merge pull request #85125 from iblech/patch-iodine-test
iodine: improve test in view of #58806
2020-04-14 08:03:23 -04:00
Florian Klink
d1edd8b2f6 nixosTests.networking: test setting MTU and MAC Address
Both the scripted and networkd backend now support setting MTU and MAC
Address, so do this in a test to ensure it doesn't break.
2020-04-13 22:03:35 +02:00
Florian Klink
5150378c2f nixosTests.networking.virtual: fix with networkd
We only need to wait for network.target to get up, and the
network-addresses-${interfaceName} units are scripted networking only.
2020-04-13 22:03:35 +02:00
Florian Klink
1e1945319c nixosTests.networking: make routing table comparison more reliable
This was whitespace-sensitive, kept fighting with my editor and broke
the tests easily. To fix this, let python convert the output to
individual lines, and strip whitespace from them before comparing.
2020-04-13 22:03:35 +02:00
Jan Tojnar
a04625379a
Merge branch 'master' into staging-next 2020-04-13 18:50:35 +02:00
Ingo Blechschmidt
f379e74f1e iodine: improve test in view of #58806 2020-04-13 06:22:27 +02:00
Ioannis Koutras
9360e3723d nixos/traefik: add test 2020-04-12 22:50:36 +02:00
Graham Christensen
35d8514a91
Merge pull request #81848 from grahamc/nested-specialisation
specialisation: replace nesting with named configurations
2020-04-12 08:56:11 -04:00
Graham Christensen
ec2d28e323
specialisation: replace nesting with named configurations
Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
2020-04-12 08:12:50 -04:00
Maximilian Bosch
c9504b0b68
Merge pull request #84940 from symphorien/rouncube-spell
roundcube: use pspell for spellchecking
2020-04-11 14:33:43 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Symphorien Gibol
9e417bc9e3 roundcube: use pspell for spellchecking
By default, upstream enables a third party service in the cloud:
https://github.com/roundcube/roundcubemail/blob/1.4.3/config/defaults.inc.php#L790-L798
2020-04-10 12:00:00 +00:00
Jan Tojnar
1ab03c3a76
Merge branch 'master' into staging-next 2020-04-10 12:12:56 +02:00
Maximilian Bosch
e8a4b9fe9b
Merge pull request #84501 from Ma27/bump-hydra
hydra: 2020-03-24 -> 2020-04-07
2020-04-08 20:08:29 +02:00
Jörg Thalheim
0b5d6d9e39
Merge pull request #84556 from Mic92/runtime-shell
treewide: use runtimeShell in nixos/
2020-04-08 16:34:55 +01:00
Michael Bishop
8b7e843dab
nixos: kafka test: fix building for other arches 2020-04-07 12:50:58 -03:00
Maximilian Bosch
0f5c38feed
hydra: 2020-03-24 -> 2020-04-07
Also removed `pkgs.hydra-flakes` since flake-support has been merged
into master[1]. Because of that, `pkgs.hydra-unstable` is now compiled
against `pkgs.nixFlakes` and currently requires a patch since Hydra's
master doesn't compile[2] atm.

[1] https://github.com/NixOS/hydra/pull/730
[2] https://github.com/NixOS/hydra/pull/732
2020-04-07 14:11:12 +02:00
Jörg Thalheim
cf3328e7e3
treewide: use runtimeShell in nixos/
This is needed for cross-compilation.
2020-04-07 07:26:47 +01:00
Frederik Rietdijk
2420184727 Merge staging into staging-next 2020-04-06 08:54:28 +02:00
Sarah Brofeldt
b256b2253c
Merge pull request #83749 from srhb/ceph-14.2.8
ceph: 14.2.7 -> 14.2.8
2020-04-06 07:44:02 +02:00
Elis Hirwing
3b6539896b
Merge pull request #83896 from etu/slim-down-default-php-v3
PHP: Make the default package more sane [v3]
2020-04-05 20:00:03 +02:00
Elis Hirwing
0dc95728ba
nixos/php: Move the pcre tests to the php test attribute 2020-04-05 16:44:59 +02:00
Elis Hirwing
29e1f0d169
nixos/php: Add tests for phpfpm
This test checks that we evaluate PHP properly and that certain
extensions are actually loaded.
2020-04-05 16:44:54 +02:00
Frederik Rietdijk
edaa972160 Merge staging-next into staging 2020-04-03 21:55:10 +02:00
Frederik Rietdijk
92124ed660 Merge master into staging-next 2020-04-03 21:54:40 +02:00
Evils
b7b99c93f5 nixosTests.tuptime: init test 2020-04-03 17:30:35 +02:00
Florian Klink
fe6dd71f72 nixosTests.cockroachdb: set ConditionPathExists=/dev/ptp0 to chronyd 2020-04-03 00:34:18 +02:00
Florian Klink
98906dfdef nixosTests.cockroachdb: bump memory
cockroachdb complained about not enough memory available.
2020-04-03 00:34:18 +02:00
Florian Klink
e7e05ad957 nixosTests.cockroachdb: port to python 2020-04-03 00:34:18 +02:00
Florian Klink
8e9e77ee7d nixosTests.cockroachdb: add to all-tests.nix 2020-04-03 00:34:18 +02:00
Sarah Brofeldt
6ccd347e46 nixos/tests/ceph: Fix pg number to power of 2 2020-04-02 21:11:45 +02:00
Jan Tojnar
15002f1cfd
tree-wide: Switch from gnome3.maintainers to lib.teams.gnome 2020-04-01 14:41:43 +02:00
Léo Gaspard
a3ee24b2ff
Merge pull request #83894 from symphorien/unbreak-os-prober-test
Unbreak os prober test
2020-03-31 22:17:27 +02:00
Jan Tojnar
3e0f4e202f
Merge branch 'master' into staging-next 2020-03-31 21:32:15 +02:00
Florian Klink
a3d67bfd42
Merge pull request #83765 from Izorkin/mariadb-test
nixos/mysql: add test mariadb with tokudb plugin
2020-03-31 20:23:45 +02:00
Izorkin
6af90a3df8 nixos/mysql: add test mariadb with rocksdb plugin 2020-03-31 14:46:04 +03:00
Marek Mahut
af75bb17b9 nixos/tests: add magic-wormhole-mailbox-server 2020-03-30 16:15:15 +02:00
Izorkin
ba55f84b5d nixos/mysql: add test mariadb with tokudb plugin 2020-03-30 13:42:51 +03:00
Florian Klink
f4f8921f97
nixos/gerrit: stop setting jvmPackage (#83696)
jdk12_headless disappeared in d00559ebb8,
and just using the default in the VM test should be fine IMHO.
2020-03-29 18:50:19 +00:00
Symphorien Gibol
6a2f64a542 nixos/tests/os-prober.nix: fix out of memory 2020-03-29 15:30:33 +02:00
Maximilian Bosch
2c133fbb4b
nixos/tests/mongodb: also test mongodb-3_4 2020-03-29 01:09:53 +01:00
Jan Tojnar
fa4e1bbe07
Merge branch 'master' into staging-next
Fix eval of nixos/nginx
2020-03-29 00:35:29 +01:00
Graham Christensen
4d226bad77
Merge pull request #83600 from Ma27/hydra-two-stage-deploy
hydra: 2020-02-06 -> 2020-03-{24,27}
2020-03-28 19:18:10 -04:00
Maximilian Bosch
bd5324c4fc
hydra: 2020-02-06 -> 2020-03-{24,27}
Upgrades Hydra to the latest master/flake branch. To perform this
upgrade, it's needed to do a non-trivial db-migration which provides a
massive performance-improvement[1].

The basic ideas behind multi-step upgrades of services between NixOS versions
have been gathered already[2]. For further context it's recommended to
read this first.

Basically, the following steps are needed:

* Upgrade to a non-breaking version of Hydra with the db-changes
  (columns are still nullable here). If `system.stateVersion` is set to
  something older than 20.03, the package will be selected
  automatically, otherwise `pkgs.hydra-migration` needs to be used.

* Run `hydra-backfill-ids` on the server.

* Deploy either `pkgs.hydra-unstable` (for Hydra master) or
  `pkgs.hydra-flakes` (for flakes-support) to activate the optimization.

The steps are also documented in the release-notes and in the module
using `warnings`.

`pkgs.hydra` has been removed as latest Hydra doesn't compile with
`pkgs.nixStable` and to ensure a graceful migration using the newly
introduced packages.

To verify the approach, a simple vm-test has been added which verifies
the migration steps.

[1] https://github.com/NixOS/hydra/pull/711
[2] https://github.com/NixOS/nixpkgs/pull/82353#issuecomment-598269471
2020-03-28 23:33:25 +01:00
worldofpeace
b1bffdf67f
Merge pull request #83425 from xfix/mark-hibernation-test-as-broken-on-aarch
nixos/tests/hibernate: disable for platforms other than x86_64
2020-03-28 18:22:08 -04:00
Frederik Rietdijk
a36be028f5 Merge staging-next into staging 2020-03-28 21:15:15 +01:00
Maximilian Bosch
63e81053b0
Merge pull request #74504 from xwvvvvwx/wg-quick-tests
tests/wireguard: init wg-quick
2020-03-28 16:26:43 +01:00
Konrad Borowski
d85fb28414 nixos/tests/hibernate: disable for platforms other than x86_64
Due to 9pnet_virtio bugs, /nix is no longer available after
hibernation. It happens to work on x86_64, but not on other
platforms.
2020-03-28 09:31:36 +01:00
Yegor Timoshenko
5626cb9486
Merge pull request #82603 from emilazy/nixos-initrd-openssh
nixos/initrd-ssh: switch from Dropbear to OpenSSH
2020-03-28 09:22:02 +01:00
Marek Mahut
42d03aabbd
Merge pull request #83309 from mmahut/quorum
nixos/quorum: init
2020-03-28 09:04:12 +01:00
aszlig
e1d63ada02
nginx: Fix ETag patch to ignore realpath(3) error
While our ETag patch works pretty fine if it comes to serving data off
store paths, it unfortunately broke something that might be a bit more
common, namely when using regexes to extract path components of
location directives for example.

Recently, @devhell has reported a bug with a nginx location directive
like this:

  location ~^/\~([a-z0-9_]+)(/.*)?$" {
    alias /home/$1/public_html$2;
  }

While this might look harmless at first glance, it does however cause
issues with our ETag patch. The alias directive gets broken up by nginx
like this:

  *2 http script copy: "/home/"
  *2 http script capture: "foo"
  *2 http script copy: "/public_html/"
  *2 http script capture: "bar.txt"

In our patch however, we use realpath(3) to get the canonicalised path
from ngx_http_core_loc_conf_s.root, which returns the *configured* value
from the root or alias directive. So in the example above, realpath(3)
boils down to the following syscalls:

  lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
  lstat("/home/$1", 0x7ffd08da6f60) = -1 ENOENT (No such file or directory)

During my review[1] of the initial patch, I didn't actually notice that
what we're doing here is returning NGX_ERROR if the realpath(3) call
fails, which in turn causes an HTTP 500 error.

Since our patch actually made the canonicalisation (and thus additional
syscalls) necessary, we really shouldn't introduce an additional error
so let's - at least for now - silently skip return value if realpath(3)
has failed.

However since we're using the unaltered root from the config we have
another issue, consider this root:

  /nix/store/...-abcde/$1

Calling realpath(3) on this path will fail (except if there's a file
called "$1" of course), so even this fix is not enough because it
results in the ETag not being set to the store path hash.

While this is very ugly and we should fix this very soon, it's not as
serious as getting HTTP 500 errors for serving static files.

I added a small NixOS VM test, which uses the example above as a
regression test.

It seems that my memory is failing these days, since apparently I *knew*
about this issue since digging for existing issues in nixpkgs, I found
this similar pull request which I even reviewed:

https://github.com/NixOS/nixpkgs/pull/66532

However, since the comments weren't addressed and the author hasn't
responded to the pull request, I decided to keep this very commit and do
a follow-up pull request.

[1]: https://github.com/NixOS/nixpkgs/pull/48337

Signed-off-by: aszlig <aszlig@nix.build>
Reported-by: @devhell
Acked-by: @7c6f434c
Acked-by: @yorickvP
Merges: https://github.com/NixOS/nixpkgs/pull/80671
Fixes: https://github.com/NixOS/nixpkgs/pull/66532
2020-03-28 02:57:21 +01:00
Marek Mahut
870a6e262d nixos/quorum: init 2020-03-27 19:31:01 +01:00
Martin Milata
9bbd1037ec nixos/mediawiki: allow using default extensions 2020-03-26 18:26:07 +01:00
Maximilian Bosch
2934f04641
nixos/tests/mongodb: rewrite with python
perl-based VM tests are deprecated.
2020-03-26 14:02:49 +01:00
Nathan Smyth
44641ed00b
nixos/tests/mongodb: test against mongodb versions 3.4, 3.6, 4.0
Now has tests for 3.4, 3.6, 4.0. Has some duplication, but it appears to
work on my machine.
2020-03-26 14:02:49 +01:00
zimbatm
d8f0c5407e
Merge pull request #82929 from zimbatm/nixos-gerrit
nixos gerrit module
2020-03-26 12:47:15 +01:00
zimbatm
d37a0dca13
nixos: add gerrit module
Co-authored-by: edef <edef@edef.eu>
Co-authored-by: Florian Klink <flokli@flokli.de>
2020-03-26 09:28:42 +01:00
Michael Weiss
216a7e7a98
nixosTests.installer: Don't wait for the nixos-manual service
The nixos-manual service was removed in #83199 but we missed the check
in this test which prevents the "tested" job from succeeding [0][1].

[0]: https://hydra.nixos.org/build/115472896
[1]: https://hydra.nixos.org/build/115472896/nixlog/94/tail
2020-03-26 01:21:34 +01:00
Emily
d930466b77 nixos/initrd-ssh: switch from Dropbear to OpenSSH
Dropbear lags behind OpenSSH significantly in both support for modern
key formats like `ssh-ed25519`, let alone the recently-introduced
U2F/FIDO2-based `sk-ssh-ed25519@openssh.com` (as I found when I switched
my `authorizedKeys` over to it and promptly locked myself out of my
server's initrd SSH, breaking reboots), as well as security features
like multiprocess isolation. Using the same SSH daemon for stage-1 and
the main system ensures key formats will always remain compatible, as
well as more conveniently allowing the sharing of configuration and
host keys.

The main reason to use Dropbear over OpenSSH would be initrd space
concerns, but NixOS initrds are already large (17 MiB currently on my
server), and the size difference between the two isn't huge (the test's
initrd goes from 9.7 MiB to 12 MiB with this change). If the size is
still a problem, then it would be easy to shrink sshd down to a few
hundred kilobytes by using an initrd-specific build that uses musl and
disables things like Kerberos support.

This passes the test and works on my server, but more rigorous testing
and review from people who use initrd SSH would be appreciated!
2020-03-25 08:26:50 +00:00
Jan Tojnar
986fbf4799
Merge branch 'staging-next' into staging 2020-03-24 01:51:55 +01:00
Orivej Desh (NixOS)
aa049c802b
Merge pull request #83042 from aanderse/mysql-fixup
nixos/mysql: fix service so it works with mysql80 package
2020-03-23 16:37:58 +00:00
Lancelot SIX
37ffa6ea51 nixos/griphite: Migrate to python3, drop graphite-pager 2020-03-22 22:47:53 -07:00
Orivej Desh
1b89aa3f7a Merge branch 'master' into staging 2020-03-23 00:53:16 +00:00
markuskowa
a9d7a1ee5b
Merge pull request #81277 from markuskowa/upd-rdma-core
nixos/rdma-core: 27.0 -> 28.0, update RXE module
2020-03-22 18:01:09 +01:00
Aaron Andersen
6c47902e01 nixos/mysql: test with mysql80 package 2020-03-21 15:47:38 -04:00
Josef Kemetmüller
bffc749210 nixosTests.fenics: Add basic test 2020-03-19 21:48:27 -07:00
Florian Klink
355c58e485 nixos/networkd: respect systemd.network.links also with disabled systemd-networkd
This mirrors the behaviour of systemd - It's udev that parses `.link`
files, not `systemd-networkd`.

This was originally applied in 36ef112a47,
but was reverted due to 1115959a8d causing
evaluation errors on hydra.
2020-03-19 14:15:32 +01:00
Léo Gaspard
a0307bad46
Merge pull request #79120 from symphorien/iodine
Iodine: ipv6 support, updates, hardening, nixos test....
2020-03-16 23:42:12 +01:00
Maximilian Bosch
8be61f7a36
matrix-synapse: 1.9.1 -> 1.11.1
https://github.com/matrix-org/synapse/releases/tag/v1.10.0
https://github.com/matrix-org/synapse/releases/tag/v1.10.1
https://github.com/matrix-org/synapse/releases/tag/v1.11.0
https://github.com/matrix-org/synapse/releases/tag/v1.11.1
2020-03-15 17:09:51 +01:00
Vladimír Čunát
0729b8c55e
Revert Merge #82310: nixos/systemd: apply .link
...even when networkd is disabled

This reverts commit ce78f3ac70, reversing
changes made to dc34da0755.

I'm sorry; Hydra has been unable to evaluate, always returning
> error: unexpected EOF reading a line
and I've been unable to reproduce the problem locally.  Bisecting
pointed to this merge, but I still can't see what exactly was wrong.
2020-03-13 22:05:33 +01:00
Michele Guerini Rocco
7b15d6cee4
Merge pull request #81241 from thefloweringash/nesting-system
nixos/activation: propagate system to nested configurations
2020-03-13 09:58:10 +01:00
Florian Klink
ce78f3ac70
Merge pull request #82310 from flokli/systemd-network-link-no-networkd
nixos/systemd: apply .link even when networkd is disabled
2020-03-12 15:47:59 -07:00
Markus Kowalewski
2c7f8d56dc
nixos/rxe: use iproute instead of rdma-core
The rdma-core packages dropped rxe_cfg in favour
of iproute's rdma utility (see https://github.com/linux-rdma/rdma-core/pull/678/files)
2020-03-12 22:32:44 +01:00
Florian Klink
2220060133
Merge pull request #82148 from devhell/tests_signal-desktop
tests: Fix signal-desktop
2020-03-11 17:52:48 -07:00
Florian Klink
36ef112a47 nixos/networkd: respect systemd.network.links also with disabled systemd-networkd
This mirrors the behaviour of systemd - It's udev that parses `.link`
files, not `systemd-networkd`.
2020-03-11 10:21:37 +01:00
Félix Baylac-Jacqué
1115959a8d tests/networking: remove pkgs.lib usages. 2020-03-11 10:21:37 +01:00
Sarah Brofeldt
9093928444
Merge pull request #81941 from volth/patch-390
tests/kubernetes: remove unreferenced variable and import from inexisting file
2020-03-11 07:45:33 +01:00
devhell
534f1337c1 tests: Fix signal-desktop
This test fails due to OOM on the VM. Setting the memory of the VM to
1024 lets the test succeed.

Cc: @flokli
2020-03-09 13:13:51 +00:00
Domen Kožar
508a2c6849
Merge pull request #80921 from hercules-ci/buildLayeredImage-allow-empty-store
buildLayeredImage: Allow empty store, no paths to add
2020-03-08 23:05:27 +01:00
volth
78ee22041a
tests/kubernetes: remove unreferenced variable and import from inexsisting file 2020-03-07 00:21:11 +00:00
Martin Milata
421a18f42b nixos/prometheus-mikrotik-exporter: init 2020-03-06 10:39:05 +01:00
WilliButz
0d832ee98e
nixos/tests/prometheus-exporters: increase memory for rspamd
Before this, the test failed because rspamd did invoke the oom-killer.
2020-03-06 10:17:22 +01:00
Martin Milata
e7ed7901a8 nixos/prometheus-mail-exporter: misc fixes
- Fix misspelled option. mkRenamedOptionModule is not used because the
   option hasn't really worked before.
 - Add missing cfg.telemetryPath arg to ExecStart.
 - Fix mkdir invocation in test.
2020-03-06 01:44:05 +01:00
Maximilian Bosch
7f9131f260
Merge pull request #81405 from NinjaTrappeur/nin-networkd-policy-rules
nixos/networkd: add RoutingPolicyRules-related options
2020-03-04 12:29:29 +01:00
Florian Klink
407be0a577
Merge pull request #81327 from flokli/add-cage
nixos/cage: init
2020-03-03 12:04:33 -08:00
Robert Hensing
6734e58da3
Merge pull request #81292 from hercules-ci/fix-service-runner-quotes
nixos/service-runner.nix: Allow quotes in commands + test
2020-03-03 14:31:00 +01:00
Andreas Rammhold
f8325b6ce6
Merge pull request #81060 from andir/opensmtpd-timeout
nixos/tests/opensmtpd: bump test (&build) timeout to 30m from 30s
2020-03-03 11:14:49 +01:00
Florian Klink
d6587c0444
Merge pull request #80096 from tfc/port-rsyslogd-test
nixosTests.rsyslogd: Port to python
2020-03-02 14:16:51 -08:00
Matthew Bauer
e0e4d591cc nixos/cage: init
Add a cage module to nixos. This can be used to make kiosk-style
systems that boot directly to a single application. The user (demo by
default) is automatically logged in by this service and the
program (xterm by default) is automatically started.

This is useful for some embedded, single-user systems where we want
automatic booting. To keep the system secure, the user should have
limited privileges.

Based on the service provided in the Cage wiki here:

https://github.com/Hjdskes/cage/wiki/Starting-Cage-on-boot-with-systemd

Co-Authored-By: Florian Klink <flokli@flokli.de>
2020-03-02 13:43:20 -08:00
WilliButz
eaef96093a
prometheus-nginx-exporter: 0.5.0 -> 0.6.0 (#81285)
* prometheus-nginx-exporter: 0.5.0 -> 0.6.0

* nixos/prometheus-nginx-exporter: update for 0.6.0

Added new option constLabels and updated virtualHost name in the
exporter's test.
2020-03-02 14:48:40 -05:00
Maximilian Bosch
70325e63d8
Merge pull request #79532 from NixOS/fix-predictable-ifnames-in-initrd
nixos/stage-1: fix predictable interface names in initrd
2020-03-02 17:14:06 +01:00
Félix Baylac-Jacqué
9897d83f58 nixos/networkd: test routingPolicyRules with a nixos vm test 2020-03-02 15:37:40 +01:00
worldofpeace
21c971a732
Merge pull request #81118 from tilpner/gitdaemon-usercreation
nixos/git-daemon: only create git user if it will be used
2020-03-01 13:40:57 +00:00
Ben Wolsieffer
07727dbd16
buildbot: 2.6.0 -> 2.7.0 (#81406) 2020-02-29 18:24:02 -05:00
Robert Hensing
6dab1b50a6 buildLayeredImage: Allow empty store, no paths to add
This is useful when buildLayeredImage is called in a generic way
that should allow simple (base) images to be built, which may not
reference any store paths.
2020-02-28 14:59:04 +01:00
Robert Hensing
43521ac965 nixos/service-runner.nix: Allow quotes in commands + test 2020-02-28 14:26:29 +01:00
worldofpeace
2e89e0d0cd
Merge pull request #80048 from tfc/port-docker-tools-test
nixosTests.docker-tools: Port to Python
2020-02-28 11:22:09 +00:00
Jacek Galowicz
0a49699499 nixosTests.docker-tools: Port to Python 2020-02-27 17:15:31 +01:00
Jacek Galowicz
1320f23a6b nixosTests.systemd-confinement: Port to Python 2020-02-27 16:58:59 +01:00
Jacek Galowicz
cb3b472b14 nixosTests.rsyslogd: Port to python 2020-02-27 16:43:45 +01:00
Andrew Childs
98791845cb nixosTests.nesting: fix subtest scoping 2020-02-27 23:57:36 +09:00
tilpner
6df119a6ec
nixos/git-daemon: only create git user if it will be used 2020-02-26 15:04:36 +01:00
Andreas Rammhold
1464a412ff
nixos/tests/opensmtpd: bump test (&build) timeout to 30m from 30s
I am not sure how this ever passed on hydra but 30s is barely enough to
pass the configure phase of opensmtpd. It is likely the package was
built as part of another jobset. Whenever it is built as part of the
test execution the timeout propagates and 30s is clearly not enough for
that.
2020-02-25 23:08:32 +01:00
Maximilian Bosch
58c7a952a1
nixos/networkd: disable vrf sub-test which tests the behavior of tcp-packets
The subtest was mainly written to demonstrate the VRF-issues with a
5.x-kernel. However this breaks the entire test now as we have 5.4 as
default kernel. Disabling the test for now, I still need to find some
time to investigate.
2020-02-25 19:54:57 +01:00
Danylo Hlynskyi
9336b084ae
Merge pull request #79736 from Ma27/minor-imperative-container-fixes
nixos-container: minor fixes
2020-02-22 21:26:04 +02:00
Sergey Lukjanov
c8a873560f nixos/tinydns: use local dns server to fix test 2020-02-19 12:27:29 -08:00
Konrad Borowski
a803234213 nixos/acme: Fix a.example.com test 2020-02-19 15:46:14 +01:00
David Wood
60a3d9dd6b nixos/jirefeau: add services.jirafeau module
Signed-off-by: David Wood <david.wood@codeplay.com>
2020-02-18 09:37:44 -08:00
worldofpeace
c4de30cce1
Merge pull request #80099 from tfc/port-run-in-machine-test
nixosTests.run-in-machine: Port to Python
2020-02-18 12:03:16 -05:00
Danylo Hlynskyi
69efb5cd34
Merge pull request #80346 from rnhmjoj/loaof
tests: fix more loaOf deprecation warnings
2020-02-17 21:03:40 +02:00
rnhmjoj
d7bc3a7534
tests: fix more loaOf deprecation warnings 2020-02-17 09:57:35 +01:00
Danylo Hlynskyi
56c4800e7f
postgresql-wal-receiver: fix test for Pg12 (#80268)
Fixes https://github.com/NixOS/nixpkgs/issues/80060
2020-02-16 22:58:34 +02:00
Jörg Thalheim
466c1df3e2
Merge pull request #79266 from Mic92/knot
nixos/knot: add keyFiles option
2020-02-15 11:15:03 +00:00
worldofpeace
2eb87c0bf7
Merge pull request #80049 from tfc/port-docker-containers-test
nixosTests.docker-containers: Port to python
2020-02-14 14:15:21 -05:00
worldofpeace
5bb3eaa223
Merge pull request #80130 from tfc/port-krb5-test
nixosTests.krb5: Port to python
2020-02-14 14:09:54 -05:00
Jacek Galowicz
965c1785d0 nixosTests.run-in-machine: Port to python 2020-02-14 19:05:03 +01:00
Jacek Galowicz
32e3d15638 nixosTests.krb5: Add to all-tests.nix 2020-02-14 09:56:43 +01:00
Jacek Galowicz
0c0a338d20 nixosTests.krb5: Port to python 2020-02-14 09:56:32 +01:00
Antoine Eiche
baa78de594 nixosTests.docker-tools: add bulk-layer test
A regression test for https://github.com/NixOS/nixpkgs/issues/78744.
2020-02-14 09:26:26 +01:00
Florian Klink
591fca255e
Merge pull request #80065 from tfc/port-nsd-test
nixosTests.nsd: Port to python
2020-02-14 00:26:16 +01:00
worldofpeace
a07a8b473c
Merge pull request #80063 from tfc/port-solr-test
nixosTests.solr: Port to python
2020-02-13 17:58:03 -05:00
Jacek Galowicz
acef369bc3 nixosTests.plotinus: Port to Python 2020-02-13 23:36:13 +01:00
Jacek Galowicz
36b808de5f nixosTests.solr: Port to python 2020-02-13 22:40:47 +01:00
Jacek Galowicz
de9bac3b86 nixosTests.nsd: Port to python 2020-02-13 16:34:02 +01:00
Jacek Galowicz
967daec1ee nixosTests.docker-containers: Port to python 2020-02-13 12:01:38 +01:00
Marek Mahut
004b379cd5
Merge pull request #79016 from mayflower/nixos/openarena-test
nixos/tests/openarena: run real openarena clients
2020-02-13 10:01:54 +01:00
Chuck
f6e9deee3c nixos/bcache: Installer test for / on bcache 2020-02-12 17:40:05 -08:00
Jörg Thalheim
e2ef8b439f
knot: add keyFiles option
This useful to include tsig keys using nixops without adding those
world-readable to the nix store.
2020-02-12 16:36:42 +00:00
Maximilian Bosch
93943acbc5
nixos/nixos-container: ensure that the state-dir is cleaned up if a build fails 2020-02-11 14:42:30 +01:00
Andreas Rammhold
7a625e7453
nixos/tests/firefox: support running the test with the firefox ESR version
Also adds this to the release jobset.
2020-02-11 08:58:13 +01:00
worldofpeace
09f7e376c2
Merge pull request #79416 from jtojnar/flatpak-1.6
flatpak: 1.4.2 → 1.6.1
2020-02-10 12:57:19 -05:00
Jan Tojnar
f1aa8416d7 xdg-desktop-portal: 1.4.2 → 1.6.0
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.6.0
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.5.4
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.5.3
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.5.2
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.5.1
* https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.5.0
2020-02-10 12:55:25 -05:00
Jan Tojnar
102fa4aaec malcontent: init at 0.4.0 2020-02-10 12:55:24 -05:00
Jan Tojnar
ea06e0055e glib-testing: init at 0.1.0 2020-02-10 12:55:24 -05:00
Yorick van Pelt
f003810989
nixos/buildkite-agents: support multiple buildkite agents 2020-02-10 13:35:14 +01:00
Florian Klink
4e0fea3fe2 Merge pull request #77578 from m1cr0man/master
Replace simp-le with lego and support DNS-01 challenge
2020-02-10 11:47:30 +01:00
Matt Layher
065ec9a28c nixos/corerad: update advertisement argument 2020-02-09 18:09:22 -08:00
Silvan Mosberger
637bb9fa98
Merge pull request #72060 from lopsided98/sanoid-init
sanoid: add package, NixOS module and test
2020-02-10 01:28:41 +01:00
Silvan Mosberger
b9d7f1fe24 Merge pull request #65397 from mmilata/sympa
sympa: init at 6.2.52 + NixOS module
2020-02-10 01:23:45 +01:00
Ben Wolsieffer
7684537e33
nixos/sanoid, nixos/syncoid: init module and test 2020-02-10 01:12:39 +01:00
Maximilian Bosch
c2f2366f5c Merge pull request #79485 from Ma27/grocy
grocy: init at 2.6.0
2020-02-09 23:11:46 +01:00