aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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 (test-upstream)
  #:use-module (gnu packages base)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix import print)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix upstream)
  #:use-module (guix tests)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))


(test-begin "upstream")

(test-equal "coalesce-sources same version"
  '((source "foo" "1"
            ("ftp://example.org/foo-1.tar.xz"
             "ftp://example.org/foo-1.tar.gz")
            ("ftp://example.org/foo-1.tar.xz.sig"
             "ftp://example.org/foo-1.tar.gz.sig")))

  (map (lambda (source)
         `(source ,(upstream-source-package source)
                  ,(upstream-source-version source)
                  ,(upstream-source-urls source)
                  ,(upstream-source-signature-urls source)))
       (coalesce-sources (list (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.gz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.gz.sig")))
                               (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.xz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.xz.sig")))))))

(test-end)
with-handler/tty): New procedure. (run-external-command-with-line-hooks, run-command): Add a TTY? argument. * gnu/installer/final.scm (install-system): Call run-command with TTY? argument set to #true. 2022-02-02installer: Use system-wide guix for system init.Josselin Poiret * gnu/installer.scm (installer-program): Remove dependency on the guix package for the PATH. * gnu/installer/final.scm (install-system): Set PATH inside container to /run/current-system/profile/bin/. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-02-02installer: Turn passwords into opaque records.Josselin Poiret * gnu/installer/user.scm (<secret>, secret?, make-secret, secret-content): Add opaque <secret> record that boxes its contents, with a custom printer that doesn't display anything. * gnu/installer/newt/user.scm (run-user-add-page, run-user-page): Box it. * gnu/installer/final.scm (create-user-database): Unbox it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-02-02installer: Remove specific logging code.Josselin Poiret * gnu/installer/final.scm (install-system): Remove command logging to syslog, as this is taken care of by the new facilities. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-02-02installer: Keep PATH inside the install container.Josselin Poiret * gnu/installer/final.scm (install-system): Set PATH inside the container. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-02-02installer: Use new installer-log-line everywhere.Josselin Poiret * gnu/installer.scm (installer-program) * gnu/installer/final.scm (install-locale) * gnu/installer/newt.scm (init) * gnu/installer/newt/final.scm (run-final-page) * gnu/installer/newt/page.scm (run-form-with-clients) * gnu/installer/newt/partition.scm (run-partitioning-page) * gnu/installer/parted.scm (eligible-devices, mkpart, luks-format-and-open, luks-close, mount-user-partitions, umount-user-partitions, free-parted): * gnu/installer/steps.scm (run-installer-steps): * gnu/installer/utils.scm (run-command, send-to-clients): Use it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> 2022-01-14installer: Install the locale before mounting the cow-store.Mathieu Othacehe Fixes: <https://issues.guix.gnu.org/52831>. Make sure to install the en_US.utf8 fallback locale if the selected locale is not supported. * gnu/installer/final.scm (install-locale): New procedure. (install-system): Call it. 2022-01-14installer: Do not set the locale in run-command.Mathieu Othacehe Installing the locale inside the container, once the cow-store is mounted, causes the process to keep opened locale files that can later prevent the cow-store umount. * gnu/installer/utils.scm (run-command): Remove locale argument. * gnu/installer/final.scm (install-system): Adapt it. 2022-01-14installer: Remove an unused procedure.Mathieu Othacehe * gnu/installer/final.scm (kill-cow-users): Remove it.