;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2022 Ricardo Wurmus ;;; Copyright © 2017, 2018, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2021, 2024 Timotej Lazar ;;; Copyright © 2021, 2022 Remco van 't Veer ;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; 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 GN
aboutsummaryrefslogtreecommitdiff
blob: 7599d450b6c06c2fc28c186d026ede6ba344faed (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (gnu installer newt substitutes)
  #:use-module (gnu installer substitutes)
  #:use-module (gnu installer utils)
  #:use-module (guix i18n)
  #:use-module (newt)
  #:use-module (ice-9 match)
  #:export (run-substitutes-page))

(define* (run-substitutes-page)
  (match (current-clients)
    (()
     (case (choice-window
            (G_ "Substitute server discovery")
            (G_ "Enable") (G_ "Disable")
            (G_ " By turning this option on, you allow Guix to fetch \
substitutes (pre-built binaries) during installation from servers \
discovered on your local area network (LAN) in addition to the official \
server.  This can increase download throughput.

 There are no security risks: only genuine substitutes may be retrieved from \
those servers.  However, eavesdroppers on your LAN may be able to see what \
software you are installing."))
       ((1) (enable-discovery))
       ((2) (disable-discovery))))
    (_ #f)))
ckage-version (this-package-native-input "docbook-xsl")) "/manpages/docbook.xsl")) #:configure-flags #~(list "--localstatedir=/var" ; for /var/lib/sss, /var/run/sssd.pid, etc. "--sysconfdir=/etc" ; /etc/sssd "--disable-cifs-idmap-plugin" "--without-nfsv4-idmapd-plugin" (string-append "--with-plugin-path=" #$output "/lib/sssd") (string-append "--with-krb5-plugin-path=" #$output "/lib/krb5/plugins/libkrb5") (string-append "--with-cifs-plugin-path=" #$output "/lib/cifs-utils") (string-append "--with-init-dir=" #$output "/etc/init.d") (string-append "--with-ldb-lib-dir=" #$output "/lib/ldb/modules/ldb") (string-append "--with-xml-catalog-path=" #$(this-package-native-input "docbook-xml") "/xml/dtd/docbook/catalog.xml")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'ensure-no-mtimes-pre-1980 (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980)) (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda _ (substitute* '("src/tools/analyzer/sss_analyze" "src/tools/sss_obfuscate") (("#!/usr/bin/.*python") (string-append "#!" #$(this-package-input "python") "/bin/python3"))))) (add-before 'bootstrap 'fix-configure-macros (lambda _ ;; A configure test for nsupdate realm support fails without this. (substitute* "src/external/nsupdate.m4" (("\\$NSUPDATE ") "$NSUPDATE -i ")) ;; Let tests find softhsm lib. (substitute* "src/external/test_ca.m4" (("/usr/lib/softhsm") (string-append #$(this-package-native-input "softhsm") "/lib/softhsm"))))) (add-before 'configure 'disable-failing-tests (lambda _ ;; Disable tests that needs /etc/passwd. (substitute* "Makefile.am" (("pam-srv-tests") "") (("test-negcache") "")) ;; This test fails for unknown reason. (substitute* "src/tests/responder_socket_access-tests.c" (("tcase_add_test\\(tc_utils, resp_str_to_array_test\\);") "")))) (add-before 'check 'set-libpython-path (lambda _ (setenv "LD_LIBRARY_PATH" (string-append #$(this-package-input "python") "/lib")))) (add-after 'install 'remove-static-libs (lambda _ ;; Remove a static library that produces a (harmless) warning ;; when starting a program that uses sssd’s LDB modules. (delete-file (string-append #$output "/lib/ldb/modules/ldb/memberof.la")))) (add-after 'install 'wrap-binaries (lambda _ (with-directory-excursion #$output ;; Set path to LDB modules for sssd and utilities. (for-each (lambda (bin) (wrap-program (string-append "sbin/" bin) `("LDB_MODULES_PATH" ":" prefix (,(string-append #$output "/lib/ldb/modules/ldb"))))) '("sssd" "sssctl" "sss_cache" "sss_override" "sss_seed")) ;; Set path to sssd’s site-packages for scripts. (for-each (lambda (script) (wrap-program script `("GUIX_PYTHONPATH" ":" prefix (,(string-append #$output "/lib/python" #$(version-major+minor (package-version (this-package-input "python"))) "/site-packages"))))) '("libexec/sssd/sss_analyze" "sbin/sss_obfuscate")))))))) (inputs (list adcli bash-minimal c-ares curl ; for OpenID Connect support cyrus-sasl dbus ding-libs glib gnutls http-parser `(,isc-bind "utils") jansson jose ; for OpenID Connect support keyutils ldb libnl libselinux libsemanage libunistring linux-pam mit-krb5 nss openldap openssl p11-kit ; for PKCS#11 support pcre2 popt python ; for wrap-program phase samba/pinned talloc tdb tevent)) (native-inputs (list autoconf automake bc ; for tests check ; for tests cmocka ; for tests docbook-xml-4.4 docbook-xsl doxygen gettext-minimal libfaketime ; for tests libtool libxml2 ; for xmllint libxslt openssh ; for tests pkg-config python-toolchain po4a softhsm ; for tests `(,util-linux "lib"))) ; for uuid.h, reqired for KCM (home-page "https://pagure.io/SSSD/sssd/") (synopsis "System security services daemon") (description "SSSD is a system daemon. Its primary function is to provide access to identity and authentication remote resource through a common framework that can provide caching and offline support to the system. It provides PAM and NSS modules, and in the future will support D-BUS based interfaces for extended user information. It also provides a better database to store local users as well as extended user data.") (license license:gpl3+)))