Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libxml2: 2.12.7 → 2.13.2 #324629

Closed
wants to merge 115 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
c2ad2aa
pkgsMusl.jdk8: mark broken for musl
superherointj Jan 17, 2024
f199cf1
rocmPackages.composable_kernel: compress output to make it small enou…
mschwaig Mar 27, 2024
5c9bd5b
moreutils: minor packaging improvements
uninsane Jun 1, 2024
470ab4f
nixos/ibus: improve error message for non-engine packages
symphorien Jun 2, 2024
833049f
build(deps): bump korthout/backport-action from 2.5.0 to 3.0.2
dependabot[bot] Jun 3, 2024
d490a7e
sturmflut: init at 0-unstable-2023-04-25
zebreus Jun 1, 2024
7f7ec52
nixos/tests/postgresql: add tls client cert test
erictapen Jun 5, 2024
abce0bd
maintainers/scripts/update.py: support skipping prompts
superherointj Jun 14, 2024
749aec8
nixos/nspawn: cgroupsv2 by default
Ma27 Jun 23, 2024
06336ad
urh: add wayland support
Jun 24, 2024
f3851cb
swiProlog: 9.1.21 -> 9.2.5
matko Jul 7, 2024
6ec7cc3
treewide: remove vrthra and lovek323 from meta.maintainers [no orphans]
AndersonTorres Jul 5, 2024
084dc9a
treewide: remove vrthra from meta.maintainers [no orphans]
AndersonTorres Jul 5, 2024
3cbea45
tk: remove vrthra and lovek323 from meta.maintainers [all orphans]
AndersonTorres Jul 5, 2024
9ffac6d
treewide: remove vrthra from meta.maintainers [all orphans]
AndersonTorres Jul 5, 2024
990e7c3
treewide: remove cpages from meta.maintainers [all orphans]
AndersonTorres Jul 7, 2024
699ee6b
treewide: remove cpages from meta.maintainers [no orphans]
AndersonTorres Jul 7, 2024
3e08817
goldwarden: 0.2.13 -> 0.3.3
justanotherariel Jul 8, 2024
259d274
doc: warn against zero-byte or missing shell completion files
SFrijters Jul 8, 2024
9e622dc
openconnect: enable Yubikey support
panicgh Jul 9, 2024
29577a6
ols: include `odinfmt` in derivation
spitulax Jul 10, 2024
06cbcd0
uftrace: add optional dependencies
xal-0 Jul 10, 2024
16d84c9
python312Packages.zha: 0.0.15 -> 0.0.19
fabaff Jul 10, 2024
d8f6f61
python312Packages.zha: 0.0.19 -> 0.0.20
fabaff Jul 10, 2024
1309e2e
metasploit: 6.4.16 -> 6.4.17
fabaff Jul 11, 2024
bb9beec
python312Packages.pymsteams: 0.2.2 -> 0.2.3
r-ryantm Jul 12, 2024
7f30c01
cpuinfo: 0-unstable-2024-06-02 -> 0-unstable-2024-07-10
r-ryantm Jul 12, 2024
036adc0
hmat-oss: 1.9.0 -> 1.10.0
r-ryantm Jul 12, 2024
486d8c4
prometheus-node-exporter: move to by-name
mkg20001 Jul 12, 2024
d0ddc65
python312Packages.xkbcommon: 1.0 -> 1.5.1
r-ryantm Jul 12, 2024
e35afbc
unpackerr: 0.13.1 -> 0.14.0
r-ryantm Jul 12, 2024
267e9b0
python312Packages.pudb: 2024.1 -> 2024.1.1
r-ryantm Jul 12, 2024
7dd53c5
maturin: migrate to by-name
getchoo Jun 12, 2024
929a0f4
maturin: format with nixfmt
getchoo Jun 12, 2024
4cb0079
maturin: adopt
getchoo Jun 12, 2024
10516a7
maturin: don't overuse `with lib`
getchoo Jun 12, 2024
5bf72c9
maturin: add version test
getchoo Jun 12, 2024
c64a719
maturin: add updateScript
getchoo Jun 12, 2024
a0292e4
python312Packages.dbt-adapters: 1.3.2 -> 1.3.3
r-ryantm Jul 12, 2024
b72105c
python312Packages.microsoft-kiota-http: 1.3.1 -> 1.3.2
r-ryantm Jul 12, 2024
3b880f5
python312Packages.netutils: 1.8.1 -> 1.9.0
r-ryantm Jul 12, 2024
0e083a3
python312Packages.geoalchemy2: 0.15.1 -> 0.15.2
r-ryantm Jul 12, 2024
146d8a7
python311Packages.numpyro: 0.15.0 -> 0.15.1
GaetanLepage Jul 12, 2024
dd99a18
python311Packages.devito: 4.8.9 -> 4.8.10
GaetanLepage Jul 12, 2024
563a6f8
ocamlPackages.zarith: 1.13 → 1.14
vbgl Jul 12, 2024
2a198b2
checkSSLCert: 2.81.1 -> 2.82.0
r-ryantm Jul 12, 2024
a7bda90
open-webui: 0.3.7 -> 0.3.8
drupol Jul 11, 2024
d6e14ec
python3Packages.ctranslate2: disable TensorFlow tests
drupol Jul 11, 2024
076063a
python3Packages.langchain-community: disable tests requiring `duckdb-…
drupol Jul 12, 2024
a9afe0c
houdini: move meta to package definition
pedohorse Jul 11, 2024
3910384
maintainers: add pedohorse
pedohorse Jul 11, 2024
10cb58e
osc: update from 1.8.0 to 1.8.3
peti Jul 12, 2024
03d414a
nixos/vim: improve warning message
Aleksanaa Jul 12, 2024
7188fd1
python312Packages.opower: 0.5.0 -> 0.5.2
r-ryantm Jul 12, 2024
d9779c5
python312Packages.pytest: remove optional nose dependency
mweinelt Jul 12, 2024
07c1bf2
Merge pull request #326531 from Aleksanaa/nixos/vim
jopejoe1 Jul 12, 2024
bbc168a
k3s: use team for maintainers
superherointj Jul 12, 2024
e23552c
Merge pull request #326337 from NixOS/open-webui/bump/0-3-8
drupol Jul 12, 2024
3cfacf2
pixelorama: copy icon during install phase
Iorvethe Jul 12, 2024
7bc73b0
Merge pull request #326488 from vbgl/ocaml-zarith-1.14
ulrikstrid Jul 12, 2024
20d8c32
Merge pull request #316658 from symphorien/ibus_engine_option_error_m…
JohnRTitor Jul 12, 2024
07a733a
Merge pull request #316446 from uninsane/pr-moreutils-cleanup
JohnRTitor Jul 12, 2024
15173ed
Merge pull request #316460 from zebreus/init-sturmflut
JohnRTitor Jul 12, 2024
8ba87fc
Merge pull request #326411 from mgit-at/node-exp
mkg20001 Jul 12, 2024
5266d2d
k3s/tests/auto-deploy: fix auto-deploy reference
superherointj Jul 12, 2024
9dd9522
Merge pull request #326329 from pedohorse/houdini-maintainer-update
Aleksanaa Jul 12, 2024
130ef08
Merge pull request #319173 from getchoo/pkgs/maturin/adopt
SuperSandro2000 Jul 12, 2024
7dbc74b
Merge pull request #326287 from fabaff/metasploit-bump
fabaff Jul 12, 2024
c8d7f1f
Merge pull request #325002 from fabaff/zha-bump
fabaff Jul 12, 2024
0f519fa
Merge pull request #326541 from mweinelt/pytest-cleanup
mweinelt Jul 12, 2024
eaccfa4
Merge pull request #326537 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
68effbc
Merge pull request #326509 from r-ryantm/auto-update/checkSSLCert
fabaff Jul 12, 2024
ea19d5e
Merge pull request #326470 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
3959170
Merge pull request #326424 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
74ad670
Merge pull request #326428 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
fa25901
Merge pull request #326472 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
0415486
Merge pull request #326460 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
dc8a77c
Merge pull request #326417 from r-ryantm/auto-update/cpuinfo
fabaff Jul 12, 2024
fd6726c
python312Packages.pymsteams: add changelog to meta
fabaff Jul 12, 2024
61ff097
Merge pull request #319860 from superherointj/update-script-skip-prompt
superherointj Jul 12, 2024
266720f
python312Packages.pymsteams: refactor
fabaff Jul 12, 2024
59578e0
Merge pull request #326490 from GaetanLepage/devito
SuperSandro2000 Jul 12, 2024
467af33
Merge pull request #326529 from peti/t/update-osc
peti Jul 12, 2024
0910a76
Merge pull request #326480 from GaetanLepage/numpyro
natsukium Jul 12, 2024
5020770
Merge pull request #318926 from mschwaig/compress-composable-kernel-e…
doronbehar Jul 12, 2024
4c8eaad
Merge pull request #326542 from superherointj/k3s-use-teams
superherointj Jul 12, 2024
8f4e996
Merge pull request #322265 from wucke13/dev/fix-urh-on-wayland
Artturin Jul 12, 2024
68767b5
Merge pull request #321935 from Ma27/nspawn-cgroupsv2
flokli Jul 12, 2024
dc6634e
tiny-dfr: 0.3.0 -> 0.3.0-unstable-2024-07-10
soopyc Jul 12, 2024
8d75ee9
Merge pull request #317567 from erictapen/postgresql-tls-client-cert-…
Ma27 Jul 12, 2024
953ace5
python312Packages.homeconnect: 0.7.4 -> 0.8.0
fabaff Jul 12, 2024
1f7897b
vdr: 2.6.7 -> 2.6.8
r-ryantm Jul 12, 2024
e3aa0f6
Merge pull request #326200 from fabaff/homeconnect-bump
mweinelt Jul 12, 2024
d20388f
Merge pull request #325955 from panicgh/openconnect-with-yubi
thiagokokada Jul 12, 2024
e505595
Merge pull request #326036 from spitulax/odinfmt
thiagokokada Jul 12, 2024
7d76db3
Merge pull request #326176 from xal-0/uftrace-optional-deps
thiagokokada Jul 12, 2024
23f1a71
Merge pull request #325280 from matko/swipl_to_9.2.5
thiagokokada Jul 12, 2024
c4200b0
Merge pull request #325664 from justanotherariel/goldwarden
thiagokokada Jul 12, 2024
bd3e369
vscode-extensions.phind.phind: 0.22.2 -> 0.25.3
onny Jun 27, 2024
1dfd09c
Merge pull request #326587 from r-ryantm/auto-update/vdr
ck3d Jul 12, 2024
3e37f9d
prom2json: 1.3.3 -> 1.4.0 (#326447)
r-ryantm Jul 12, 2024
2d419e7
Merge pull request #325591 from SFrijters/install-shell-completion-doc
LeSuisse Jul 12, 2024
fe14ac8
Merge pull request #324539 from atorres1985-contrib/remove-vrthra
superherointj Jul 12, 2024
b860563
Merge pull request #281621 from superherointj/pkgsMusl.jdk8-mark-broken
superherointj Jul 12, 2024
836c11a
nim: 2.0.4 -> 2.0.8
volesen Jul 11, 2024
8e1664e
Merge pull request #322962 from onny/phind-update
drupol Jul 12, 2024
9afce28
itsycal: rfc format; itsycal: add meta.changelog; ityscal: 0.15.3 -> …
DontEatOreo Jul 12, 2024
883a8a2
Merge pull request #326426 from r-ryantm/auto-update/unpackerr
NickCao Jul 12, 2024
0ca79fd
Merge pull request #326421 from r-ryantm/auto-update/hmat-oss
NickCao Jul 12, 2024
cd538b4
Merge pull request #316876 from NixOS/dependabot/github_actions/korth…
Artturin Jul 12, 2024
4120b62
Merge pull request #326543 from Iorvethe/pixelorama_add_icon
Artturin Jul 12, 2024
7278f16
Merge pull request #326467 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
dd25bc2
Merge pull request #326409 from r-ryantm/auto-update/python312Package…
fabaff Jul 12, 2024
3bdbe2f
libxml2: 2.12.7 → 2.13.2
jtojnar Jul 4, 2024
1eeb1fa
libxslt: 1.1.41 → 1.1.42
jtojnar Jul 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@ef20d86abccbac3ee3a73cb2efbdc06344c390e5 # v2.5.0
uses: korthout/backport-action@bd410d37cdcae80be6d969823ff5a225fe5c833f # v3.0.2
with:
# Config README: https://github.com/korthout/backport-action#backport-action
copy_labels_pattern: 'severity:\ssecurity'
Expand Down
14 changes: 13 additions & 1 deletion doc/hooks/installShellFiles.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This hook helps with installing manpages and shell completion files. It exposes

The `installManPage` function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with `.gz` suffix). This function will place them into the correct `share/man/man<section>/` directory, in [`outputMan`](#outputman).

The `installShellCompletion` function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of `--bash`, `--fish`, or `--zsh`. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag `--name NAME` before the path. If this flag is not provided, zsh completions will be renamed automatically such that `foobar.zsh` becomes `_foobar`. A root name may be provided for all paths using the flag `--cmd NAME`; this synthesizes the appropriate name depending on the shell (e.g. `--cmd foo` will synthesize the name `foo.bash` for bash and `_foo` for zsh). The path may also be a fifo or named fd (such as produced by `<(cmd)`), in which case the shell and name must be provided.
The `installShellCompletion` function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of `--bash`, `--fish`, or `--zsh`. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag `--name NAME` before the path. If this flag is not provided, zsh completions will be renamed automatically such that `foobar.zsh` becomes `_foobar`. A root name may be provided for all paths using the flag `--cmd NAME`; this synthesizes the appropriate name depending on the shell (e.g. `--cmd foo` will synthesize the name `foo.bash` for bash and `_foo` for zsh).

```nix
{
Expand All @@ -17,6 +17,18 @@ The `installShellCompletion` function takes one or more paths to shell completio
installShellCompletion --zsh --name _foobar share/completions.zsh
# implicit behavior
installShellCompletion share/completions/foobar.{bash,fish,zsh}
'';
}
```

The path may also be a fifo or named fd (such as produced by `<(cmd)`), in which case the shell and name must be provided (see below).

If the destination shell completion file is not actually present or consists of zero bytes after calling `installShellCompletion` this is treated as a build failure. In particular, if completion files are not vendored but are generated by running an executable, this is likely to fail in cross compilation scenarios. The result will be a zero byte completion file and hence a build failure. To prevent this, guard the completion commands against this, e.g.

```nix
{
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# using named fd
installShellCompletion --cmd foobar \
--bash <($out/bin/foobar --bash-completion) \
Expand Down
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15519,6 +15519,11 @@
githubId = 943430;
name = "David Hagege";
};
pedohorse = {
github = "pedohorse";
githubId = 13556996;
name = "pedohorse";
};
pedrohlc = {
email = "root@pedrohlc.com";
github = "PedroHLC";
Expand Down
8 changes: 7 additions & 1 deletion maintainers/scripts/update.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
, include-overlays ? false
, keep-going ? null
, commit ? null
, skip-prompt ? null
}:

let
Expand Down Expand Up @@ -184,6 +185,10 @@ let
that support it by adding

--argstr commit true

to skip prompt:

--argstr skip-prompt true
'';

/* Transform a matched package into an object for update.py.
Expand All @@ -204,7 +209,8 @@ let
optionalArgs =
lib.optional (max-workers != null) "--max-workers=${max-workers}"
++ lib.optional (keep-going == "true") "--keep-going"
++ lib.optional (commit == "true") "--commit";
++ lib.optional (commit == "true") "--commit"
++ lib.optional (skip-prompt == "true") "--skip-prompt";

args = [ packagesJson ] ++ optionalArgs;

Expand Down
8 changes: 5 additions & 3 deletions maintainers/scripts/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async def start_updates(max_workers: int, keep_going: bool, commit: bool, packag
eprint(e)
sys.exit(1)

def main(max_workers: int, keep_going: bool, commit: bool, packages_path: str) -> None:
def main(max_workers: int, keep_going: bool, commit: bool, packages_path: str, skip_prompt: bool) -> None:
with open(packages_path) as f:
packages = json.load(f)

Expand All @@ -217,7 +217,8 @@ def main(max_workers: int, keep_going: bool, commit: bool, packages_path: str) -
eprint(f" - {package['name']}")
eprint()

confirm = input('Press Enter key to continue...')
confirm = '' if skip_prompt else input('Press Enter key to continue...')

if confirm == '':
eprint()
eprint('Running update for:')
Expand All @@ -236,12 +237,13 @@ def main(max_workers: int, keep_going: bool, commit: bool, packages_path: str) -
parser.add_argument('--keep-going', '-k', dest='keep_going', action='store_true', help='Do not stop after first failure')
parser.add_argument('--commit', '-c', dest='commit', action='store_true', help='Commit the changes')
parser.add_argument('packages', help='JSON file containing the list of package names and their update scripts')
parser.add_argument('--skip-prompt', '-s', dest='skip_prompt', action='store_true', help='Do not stop for prompts')

if __name__ == '__main__':
args = parser.parse_args()

try:
main(args.max_workers, args.keep_going, args.commit, args.packages)
main(args.max_workers, args.keep_going, args.commit, args.packages, args.skip_prompt)
except KeyboardInterrupt as e:
# Let’s cancel outside of the main loop too.
sys.exit(130)
14 changes: 14 additions & 0 deletions maintainers/team-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,20 @@ with lib.maintainers;
shortName = "Jupyter";
};

k3s = {
githubTeams = [ "k3s" ];
members = [
euank
marcusramberg
mic92
superherointj
wrmilling
yajo
];
scope = "Maintain K3s package, NixOS module, NixOS tests, update script";
shortName = "K3s";
};

kubernetes = {
members = [
johanot
Expand Down
3 changes: 2 additions & 1 deletion nixos/modules/i18n/input-method/ibus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ with lib;
let
cfg = config.i18n.inputMethod.ibus;
ibusPackage = pkgs.ibus-with-plugins.override { plugins = cfg.engines; };
ibusEngine = types.package // {
ibusEngine = lib.types.mkOptionType {
name = "ibus-engine";
inherit (lib.types.package) descriptionClass merge;
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x);
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/programs/vim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
# TODO: convert it into assert after 24.11 release
config = lib.mkIf (cfg.enable || cfg.defaultEditor) {
warnings = lib.mkIf (cfg.defaultEditor && !cfg.enable) [
"programs.vim.defaultEditor will only work if programs.vim.enable is enabled, will be encfored after the 24.11 release"
"programs.vim.defaultEditor will only work if programs.vim.enable is enabled, which will be enforced after the 24.11 release"
];
environment = {
systemPackages = [ cfg.package ];
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/services/cluster/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -432,4 +432,6 @@ in
};
};
};

meta.maintainers = lib.teams.k3s.members;
}
3 changes: 3 additions & 0 deletions nixos/modules/system/boot/systemd/nspawn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ in {
})
{
systemd.targets.multi-user.wants = [ "machines.target" ];
systemd.services."systemd-nspawn@".environment = {
SYSTEMD_NSPAWN_UNIFIED_HIERARCHY = mkDefault "1";
};
}
];
}
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ in {
postgresql = handleTest ./postgresql.nix {};
postgresql-jit = handleTest ./postgresql-jit.nix {};
postgresql-wal-receiver = handleTest ./postgresql-wal-receiver.nix {};
postgresql-tls-client-cert = handleTest ./postgresql-tls-client-cert.nix {};
powerdns = handleTest ./powerdns.nix {};
powerdns-admin = handleTest ./powerdns-admin.nix {};
power-profiles-daemon = handleTest ./power-profiles-daemon.nix {};
Expand Down
2 changes: 2 additions & 0 deletions nixos/tests/k3s/auto-deploy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,7 @@ import ../make-test-python.nix (

machine.shutdown()
'';

meta.maintainers = lib.teams.k3s.members;
}
)
4 changes: 2 additions & 2 deletions nixos/tests/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ let
allK3s = lib.filterAttrs (n: _: lib.strings.hasPrefix "k3s_" n) pkgs;
in
{
# Test whether container images are imported and auto deploying manifests work
auto-deploy = lib.mapAttrs (_: k3s: import ./auto-deploy.nix { inherit system pkgs k3s; }) allK3s;
# Testing K3s with Etcd backend
etcd = lib.mapAttrs (
_: k3s:
Expand All @@ -19,6 +21,4 @@ in
single-node = lib.mapAttrs (_: k3s: import ./single-node.nix { inherit system pkgs k3s; }) allK3s;
# Run a multi-node k3s cluster and verify pod networking works across nodes
multi-node = lib.mapAttrs (_: k3s: import ./multi-node.nix { inherit system pkgs k3s; }) allK3s;
# Test wether container images are imported and auto deploying manifests work
auto-deploy = lib.mapAttrs (_: k3s: import ./auto-deploy.nix { inherit system pkgs k3s; }) allK3s;
}
2 changes: 1 addition & 1 deletion nixos/tests/k3s/etcd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ import ../make-test-python.nix (
etcd.shutdown()
'';

meta.maintainers = etcd.meta.maintainers ++ k3s.meta.maintainers;
meta.maintainers = etcd.meta.maintainers ++ lib.teams.k3s.members;
}
)
4 changes: 2 additions & 2 deletions nixos/tests/k3s/multi-node.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ import ../make-test-python.nix (
};
};

meta.maintainers = k3s.meta.maintainers;

testScript = ''
machines = [server, server2, agent]
for m in machines:
Expand Down Expand Up @@ -239,5 +237,7 @@ import ../make-test-python.nix (
for m in machines:
m.shutdown()
'';

meta.maintainers = lib.teams.k3s.members;
}
)
3 changes: 2 additions & 1 deletion nixos/tests/k3s/single-node.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import ../make-test-python.nix (
in
{
name = "${k3s.name}-single-node";
meta.maintainers = k3s.meta.maintainers;

nodes.machine =
{ pkgs, ... }:
Expand Down Expand Up @@ -120,5 +119,7 @@ import ../make-test-python.nix (

machine.shutdown()
'';

meta.maintainers = lib.teams.k3s.members;
}
)
141 changes: 141 additions & 0 deletions nixos/tests/postgresql-tls-client-cert.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
, package ? null
}:

with import ../lib/testing-python.nix { inherit system pkgs; };

let
lib = pkgs.lib;

# Makes a test for a PostgreSQL package, given by name and looked up from `pkgs`.
makeTestAttribute = name:
{
inherit name;
value = makePostgresqlTlsClientCertTest pkgs."${name}";
};

makePostgresqlTlsClientCertTest = pkg:
let
runWithOpenSSL = file: cmd: pkgs.runCommand file
{
buildInputs = [ pkgs.openssl ];
}
cmd;
caKey = runWithOpenSSL "ca.key" "openssl ecparam -name prime256v1 -genkey -noout -out $out";
caCert = runWithOpenSSL
"ca.crt"
''
openssl req -new -x509 -sha256 -key ${caKey} -out $out -subj "/CN=test.example" -days 36500
'';
serverKey =
runWithOpenSSL "server.key" "openssl ecparam -name prime256v1 -genkey -noout -out $out";
serverKeyPath = "/var/lib/postgresql";
serverCert =
runWithOpenSSL "server.crt" ''
openssl req -new -sha256 -key ${serverKey} -out server.csr -subj "/CN=db.test.example"
openssl x509 -req -in server.csr -CA ${caCert} -CAkey ${caKey} \
-CAcreateserial -out $out -days 36500 -sha256
'';
clientKey =
runWithOpenSSL "client.key" "openssl ecparam -name prime256v1 -genkey -noout -out $out";
clientCert =
runWithOpenSSL "client.crt" ''
openssl req -new -sha256 -key ${clientKey} -out client.csr -subj "/CN=test"
openssl x509 -req -in client.csr -CA ${caCert} -CAkey ${caKey} \
-CAcreateserial -out $out -days 36500 -sha256
'';
clientKeyPath = "/root";

in
makeTest {
name = "postgresql-tls-client-cert-${pkg.name}";
meta.maintainers = with lib.maintainers; [ erictapen ];

nodes.server = { ... }: {
system.activationScripts = {
keyPlacement.text = ''
mkdir -p '${serverKeyPath}'
cp '${serverKey}' '${serverKeyPath}/server.key'
chown postgres:postgres '${serverKeyPath}/server.key'
chmod 600 '${serverKeyPath}/server.key'
'';
};
services.postgresql = {
package = pkg;
enable = true;
enableTCPIP = true;
ensureUsers = [
{
name = "test";
ensureDBOwnership = true;
}
];
ensureDatabases = [ "test" ];
settings = {
ssl = "on";
ssl_ca_file = toString caCert;
ssl_cert_file = toString serverCert;
ssl_key_file = "${serverKeyPath}/server.key";
};
authentication = ''
hostssl test test ::/0 cert clientcert=verify-full
'';
};
networking = {
interfaces.eth1 = {
ipv6.addresses = [
{ address = "fc00::1"; prefixLength = 120; }
];
};
firewall.allowedTCPPorts = [ 5432 ];
};
};

nodes.client = { ... }: {
system.activationScripts = {
keyPlacement.text = ''
mkdir -p '${clientKeyPath}'
cp '${clientKey}' '${clientKeyPath}/client.key'
chown root:root '${clientKeyPath}/client.key'
chmod 600 '${clientKeyPath}/client.key'
'';
};
environment = {
variables = {
PGHOST = "db.test.example";
PGPORT = "5432";
PGDATABASE = "test";
PGUSER = "test";
PGSSLMODE = "verify-full";
PGSSLCERT = clientCert;
PGSSLKEY = "${clientKeyPath}/client.key";
PGSSLROOTCERT = caCert;
};
systemPackages = [ pkg ];
};
networking = {
interfaces.eth1 = {
ipv6.addresses = [
{ address = "fc00::2"; prefixLength = 120; }
];
};
hosts = { "fc00::1" = [ "db.test.example" ]; };
};
};

testScript = ''
server.wait_for_unit("multi-user.target")
client.wait_for_unit("multi-user.target")
client.succeed("psql -c \"SELECT 1;\"")
'';
};

in
if package == null then
# all-tests.nix: Maps the generic function over all attributes of PostgreSQL packages
builtins.listToAttrs (map makeTestAttribute (builtins.attrNames (import ../../pkgs/servers/sql/postgresql pkgs)))
else
# Called directly from <package>.tests
makePostgresqlTlsClientCertTest package
2 changes: 1 addition & 1 deletion pkgs/applications/editors/edit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ stdenv.mkDerivation {
description = "Relaxing mix of Vi and ACME";
homepage = "https://c9x.me/edit";
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ AndersonTorres vrthra ];
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
mainProgram = "edit";
};
Expand Down
Loading
Loading