Add a specific procedure to read luks partition uuid.
* gnu/build/file-systems.scm (luks-partition-field-reader): New procedure ...
(luks-partition-uuid-predicate): ... used here,
(read-luks-partition-uuid): new exported procedure.
The workaround is apparently no longer needed with Linux-libre 4.19.2
in the host.
* gnu/build/vm.scm (load-in-linux-vm): Remove special case for
"qemu-system-i386", thereby re-enabling KVM.
This fixes a bug whereby all emergency REPL output would go to /dev/klog
and thus, each line would be prefixed by "[12324.432] shepherd[1]: ".
* gnu/build/file-systems.scm (check-file-system): Wrap 'start-repl' call
in 'with-output-to-file'.
Fixes <https://bugs.gnu.org/23697>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.
* gnu/build/file-systems.scm (check-file-system): Call 'start-repl' only
if current-input-port passes 'isatty?'.
* gnu/services/shepherd.scm (shepherd-configuration-file): After
'for-each' expression, call 'redirect-port'.
* gnu/tests/base.scm (run-basic-test)["stdin is /dev/null"]: New test.
Fixes <https://bugs.gnu.org/33639>.
Thanks to Ricardo Wurmus and Thomas Schmitt for their suggestions!
* gnu/build/vm.scm (make-iso9660-image): Pass "-padding 10m" to
xorriso.
Previously 'expression->initrd' would return the directory that contains
the 'initrd' file; now it returns the complete file name for that file.
* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Change
output file name to "initrd.cpio.gz". Tail-call 'file-append' to return
the complete file name.
* gnu/system.scm (operating-system-initrd-file): Remove 'file-append'
call.
* gnu/build/linux-initrd.scm (write-cpio-archive): Check whether OUTPUT
already has the ".gz" suffix; rename if before invoking GZIP if it does,
and otherwise after.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[builder]: Do
not append "/initrd" to #$initrd.
Fixes <https://bugs.gnu.org/33422>.
Reported by fps.
* gnu/build/activation.scm (add-user): Always pass "-d HOME" when HOME
is true. Pass "--create-home" only when HOME, CREATE-HOME?, and SYSTEM?
are true.
(activate-users+groups): Pass #:create-home? create-home? to
'ensure-user'.
* gnu/tests/base.scm (run-basic-test)["accounts"]: Test 'passwd:dir' as
well.
Fixes <https://bugs.gnu.org/33297>.
Reported by Mark H Weaver <mhw@netris.org>.
This fixes a regression introduced in
72dc64f8f7, which made files read-only.
* gnu/build/linux-initrd.scm (build-initrd): Call 'make-file-writable'
on all the files under contents/.
* gnu/build/install.scm (%root-profile): New variable.
(install-database-and-gc-roots): New procedure.
(populate-single-profile-directory): Replace inline code with a call to
'install-database-and-gc-roots'.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.
* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here. New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
* guix/scripts/pack.scm (store-database): New procedure.
(self-contained-tarball): Use it when LOCALSTATEDIR? is true.
Remove 'schema' and add 'database'.
[build]: Pass DATABASE to 'populate-single-profile-directory'.
(squashfs-image): Remove #:deduplicate? parameter.
[build]: Remove (gnu build install) and (guix config) from the imported
modules. Remove 'with-extensions'.
* gnu/build/install.scm (populate-single-profile-directory): Remove
#:deduplicate?, #:register?, and #:schema; add #:database. Remove call
to 'register-closure' and simply copy DATABASE instead.
* gnu/build/install.scm (populate-single-profile-directory): Add
#:profile-name. Replace hard-coded occurrences of "guix-profile" with
PROFILE-NAME. Make the symlink part under /root a function of
PROFILE-NAME.
Previously we'd get an unhelpful backtrace like this:
In gnu/build/linux-modules.scm:
184:47 4 (recursive-module-dependencies _ #:lookup-module _)
98:14 3 (module-dependencies _)
85:18 2 (modinfo-section-contents _)
In ice-9/ports.scm:
439:11 1 (call-with-input-file #f #<procedure get-bytevector-al?> ?)
In unknown file:
0 (open-file #f "r" #:encoding #f #:guess-encoding #f)
ERROR: In procedure open-file:
Wrong type (expecting string): #f
builder for `/gnu/store/…-linux-modules.drv' failed with exit code 1
* gnu/build/linux-modules.scm (find-module-file): When MODULE cannot be
found, raise an error instead of returning #f. This is more useful to
the user.
* gnu/build/linux-modules.scm (section-contents): Honor SECTION as was
intended.
(modinfo-section-contents): Pass 'section-contents' a section, not a
section name.
Previously we would not strip the ".ko" suffix if present.
* gnu/build/linux-modules.scm (file-name->module-name): Export.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use
'file-name->module-name' instead of 'normalize-module-name'.
Previously 'guix system disk-image --file-system-type=iso9660' would
fail because 'register-closure' would try to reset timestamps/ownership
on the bind-mounted store, which fails with EPERM.
* gnu/build/vm.scm (make-iso9660-image): Pass #:reset-timestamps? to
'register-closure'.
* guix/build/store-copy.scm (store-info): Export.
* guix/store/database.scm (register-items): New procedure.
(register-path): Implement in terms of 'register-items'.
* gnu/build/install.scm (register-closure): Use 'register-items' instead
of 'for-each' and 'register-path'.
* gnu/build/install.scm (register-closure): Add #:reset-timestamps? and
and #:schema; honor them. Rewrite in terms of 'register-path'.
(populate-single-profile-directory): Add #:schema and honor it. Make
/var/guix/profiles and /var/guix/gcroots.
* gnu/build/vm.scm (root-partition-initializer): Pass
#:reset-timestamps? to 'register-closure'.
* gnu/system/vm.scm (not-config?): New procedure.
(guile-sqlite3&co): New variable.
(expression->derivation-in-linux-vm)[config]: New variable.
[builder]: Use 'with-extensions'.
(iso9660-image)[schema, config]: New variables.
Wrap build expression in 'with-extensions'; add 'sql-schema' call.
Remove GUIX from INPUTS.
(qemu-image)[schema, config]: New variables.
Wrap body in 'with-extensions'.
(system-docker-image)[not-config?]: Remove.
[config]: Use 'make-config.scm'.
[schema]: New variable.
[build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX
from INPUTS.
* gnu/system/file-systems.scm (%store-prefix): Check whether
'%store-prefix' is defined.
* guix/scripts/pack.scm (self-contained-tarball)[not-config?]
[libgcrypt, schema]: New variables.
[build]: Wrap in 'with-extensions'. Adjust imported module list to use
'make-config.scm' for (guix config).
* gnu/bootloader/grub.scm (svg->png): Use 'with-extensions'. Remove
'add-to-load-path' calls.
* gnu/build/svg.scm: Use (rsvg) and (cairo) the normal way. Remove
'module-autoload!' calls.
* gnu/build/marionette.scm (wait-for-tcp-port): New procedure.
* gnu/tests/dict.scm (run-dicod-test)["connect inside"]: Use it instead
of the inline loop.
Previously, 'canonicalize-device-spec' would wait for devices when they
were specified as a label or UUID, but would not wait when the user
passed a "/dev" file name directly. This could cause problems when
the /dev node takes a while to show up.
* gnu/build/file-systems.scm (canonicalize-device-spec): Add 'resolve'
call in the 'string?' case.
The 'title' field was easily overlooked and was an endless source of
confusion. Now, the value of the 'device' field is self-contained.
* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field. Rewrite documentation of 'device' and document
'file-system-label'.
Fixes a bug whereby changes to user home directories in the OS config
would never be effective.
Reported by Pierre Neidhardt <ambrevar@gmail.com>.
* gnu/build/activation.scm (modify-user): Pass '-d HOME'.
* gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory
available in the VM.
* gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.