;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Felix Lechner ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu tests pam) #:use-module (gnu tests) #:use-module (gnu services) #:use-module (gnu services base) #:use-module (gnu system) #:use-module (gnu system pam) #:use-module (gnu system vm) #:use-module (guix gexp) #:use-module (ice-9 format) #:export (%test-pam-limits)) ;;; ;;; pam-limits-service-type ;;; (define pam-limit-entries (list ;; make sure the limits apply to root (uid 0) (pam-limits-entry ":0" 'both 'rtprio 99) ;default is 0 (pam-limits-entry ":0" 'both 'memlock 'unlimited))) ;default is 8192 kbytes (define (run-test-pam-limits config) "Run tests in a os with pam-limits-service-type configured." (define os (marionette-operating-system (simple-operating-system (service pam-limits-service-type config)) #:imported-modules '((gnu services herd)))) (define vm (virtual-machine os)) (define name "pam-limits-service") (define test (with-imported-modules '((gnu build marionette) (guix build syscalls)) #~(begin (use-modules (gnu build marionette) (guix build syscalls) (srfi srfi-64)) (let ((marionette (make-marionette (list #$vm)))) (test-runner-current (system-test-runner #$output)) (test-begin #$name) (test-equal "log in on tty1 and read limits" '(("99") ;real-time priority ("unlimited")) ;max locked memory (begin ;; Wait for tty1. (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'term-tty1)) marionette) (marionette-control "sendkey ctrl-alt-f1" marionette) ;; Now we can type. (marionette-type "root\n" marionette) (marionette-type "ulimit -r > real-time-priority\n" marionette) (marionette-type "ulimit -l > max-locked-memory\n" marionette) ;; Read the two files. (marionette-eval '(use-modules (rnrs io ports)) marionette) (let ((guest-file (lambda (file) (string-tokenize (wait-for-file file marionette #:read 'get-string-all))))) (list (guest-file "/root/real-time-priority") (guest-file "/root/max-locked-memory"))))) (test-end))))) (gexp->derivation (string-append name "-test") test)) (define %test-pam-limits (system-test (name "pam-limits-service") (description "Test that pam-limits-service actually sets the limits as configured.") (value (run-test-pam-limits pam-limit-entries)))) 808157a9 jgart 2024-07-19gnu: python-pyopenssl: Update to 24.1.0....* gnu/packages/python-crypto.scm (python-pyopenssl): Update to 24.1.0. [arguments]: Adjust custom 'check phase to disable fewer tests and update faketime. [native-inputs]: Add python-pytest-rerunfailures. Remove python-pretend. [properties]: Add package updater helpers updater-extra-inputs, updater-extra-native-inputs. Change-Id: I3a152e6c66d27c912e18e67c114672397426e6e3 Efraim Flashner 2024-07-19gnu: python-cryptography: Update to 42.0.5....* gnu/packages/python-crypto.scm (python-cryptography-vectors): Update to 42.0.5. [native-inputs]: Add python-flit-core. (python-cryptography): Update to 42.0.5. [arguments]: Adjust 'disable-rust-extension-build phase. [native-inputs]: Add python-certifi. Remove python-hypothesis, python-subtests. (python-cryptography-rust)[cargo-inputs]: Add rust-cfg-if-1, rust-self-cell-1. Replace rust-pem-1 with 3, rust-pyo3-0.18 with 0.20. Remove rust-ouroboros-0.15. Change-Id: I1d17ee8ca60eaa65a86b2f6f8054391dda4201c8 Efraim Flashner 2024-04-07gnu: python-certifi: Use system SSL certificates....* gnu/packages/python-crypto.scm (python-certifi)[replacement]: New field. (python-certifi/fixed): Provide a python-certifi which only offers to use the system's SSL certificates. Change-Id: Ie1871be42988dff3cccfe24bca626149fee0f371 Efraim Flashner 2024-03-28gnu: python-pynacl: Use pyproject-build-system....* gnu/packages/python-crypto.scm (python-pynacl)[build-system]: Use pyproject-build-system. [arguments]: Remove custom check phase. [source]: Remove unnecessary substitution. Change-Id: Idf2409022abde9f3a59e71cd1fa69ce9f1df6b1f Ricardo Wurmus 2024-03-28gnu: python-pynacl: Update to 1.5.0....* gnu/packages/python-crypto.scm (python-pynacl): Update to 1.5.0. Change-Id: Iadf81b8d67a5d4fa08fbcb9937afa86de33385dc Signed-off-by: Ricardo Wurmus <rekado@elephly.net> nafkhamdc 2024-02-20gnu: rust-asn1: Move to (gnu packages crates-tls)....* gnu/packages/crates-io.scm (rust-asn1-0.15, rust-asn1-0.13, rust-asn1-derive-0.15, rust-asn1-derive-0.13, rust-asn1-rs-0.5, rust-asn1-rs-0.3, rust-asn1-rs-derive-0.4, rust-asn1-rs-derive-0.1, rust-asn1-rs-impl-0.1): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I1293490ef4afe2a9609337e996bc8f2b0eb0e3e6 Efraim Flashner