* gnu/build/marionette.scm (%qwerty-us-keystrokes): Use shit-comma and
shift-dot for #\< and #\> because the "less" key doesn't work the same
in "US intl." layouts.
This is a followup to 2073b55e6b.
* gnu/build/cross-toolchain.scm (%gcc-include-paths): Switch back to
'C_INCLUDE_PATH' & co.
* gnu/packages/cross-base.scm (%gcc-include-paths): Likewise.
(cross-gcc-arguments): Remove 'treat-glibc-as-system-header' phase.
(cross-gcc)[native-inputs]: Reorder so that libc comes last.
[search-paths]: Add "include/c++" for 'CROSS_CPLUS_INCLUDE_PATH'.
* guix/build-system/gnu.scm (standard-cross-packages): Have "cross-gcc"
appear both for 'host and 'target.
* gnu/build/activation.scm (activate-modprobe): Check whether
/proc/sys/kernel/modprobe exists before writing to it.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://bugs.gnu.org/38800>.
Reported by Jakub Kądziołka <kuba@kadziolka.net>.
* gnu/build/activation.scm (activate-setuid-programs): Catch
'system-error' around 'make-setuid-program' calls.
* gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from
ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of Qemu
instead of "-device" and "-net".
* gnu/system/vm.scm (common-qemu-options): Do not add a '-net' command.
(virtual-machine-compiler): Use "-nic user,..." instead of "-net".
* doc/guix.texi (Installing Guix in a VM, Invoking guix system, Running Guix
in a VM): Do the same for examples.
* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword
argument and use it when mounting the root file system.
(boot-system): Pass the root file system flags to 'mount-root-file-system'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/syscalls.scm (MS_LAZYTIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for
'strict-atime' and 'lazy-time'.
* doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list
of supported flags.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/build/vm.scm (load-in-linux-vm): Add target-arm64? argument and use it
to pass correct arguments to qemu.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass the new
target-arm64? argument added above. Do not add ESP partition on all ARM
targets. Do not pass grub-efi package to initialize-hard-disk on ARM targets.
Fixes <https://bugs.gnu.org/37977>.
* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'options'
keyword argument and use it when mounting the root file system.
(boot-system): Pass the root file system options to
'mount-root-file-system'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/build/file-systems.scm (mount-file-system): Clean the documentation from
the no longer existing parameters (these are now encapsulated within a
<file-system> record).
* gnu/build/linux-container.scm (call-with-container): Add
#:process-spawned-hook and honor it.
* gnu/system/linux-container.scm (container-script)[script]:
Define 'explain' and pass it as #:process-spawned-hook'.
This allows containers created by "guix environment -CN" or by
"guix system container -N" to talk to the host nscd.
* gnu/system/file-systems.scm (%network-file-mappings): Add
"/var/run/nscd".
* gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove.
* gnu/system/linux-container.scm (container-script)[nscd-run-directory]
[nscd-mapping, nscd-os, nscd-specs]: Remove.
[script]: Filter out from SPECS bind-mounts where the device does not
exist.
* guix/scripts/environment.scm (launch-environment/container)
[optional-mapping->fs]: New procedure.
[mappings]: Remove %NETWORK-FILE-MAPPINGS.
[file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through
'optional-mapping->fs'.
When adding multiple instances of a service requiring some user
account/group, we could end up with multiple entries for that account or
group in /etc/passwd or /etc/group.
* gnu/build/accounts.scm (database-writer)[write-entries]: Add call to
'delete-duplicates'.
* tests/accounts.scm ("write-passwd with duplicate entry"): New test.
Fixes <https://bugs.gnu.org/34902>.
Reported by Julien Lepiller <julien@lepiller.eu>.
* gnu/build/linux-modules.scm (module-formal-name): New procedure.
(load-linux-modules-from-directory)[lookup-module]: Remove.
[module-name->file-name]: New variable. Use it.
(module-name->file-name/guess, module-name-lookup)
(write-module-name-database): New procedures.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Call
'write-module-name-database'.
* gnu/build/linux-modules.scm (aliases->device-tuple)
(write-module-device-database): New procedures.
(%not-dash): New variable.
Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>.
This patch parameterizes previously hard-coded instances of
i686-w64-mingw32, adding support for x86_64-w64-mingw32.
* gnu/packages/mingw.scm (make-mingw-w64): New procedure.
(mingw-w64-i686, mingw-w64-x86_64): New variables.
(%mingw-triplet): Remove.
(mingw-w64): Update to point to 'mingw-w64-i686'.
* gnu/packages/cross-base.scm (cross-gcc): Use 'libc' keyword argument
if specified, instead of treating it as a boolean.
(native-libc): Return the correct mingw-w64 depending on machine
specified in target.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add "x86_64-mingw".
* gnu/build/cross-toolchain.scm (set-cross-path/mingw): Replace
hardcoded 'i686-w64-mingw32' instances with 'target' keyword argument.
(cross-gcc-build-phases): Update accordingly; use 'target-mingw?'
implementation of target checking and add commentary.
* gnu/ci.scm (%cross-targets): Add "x86_64-w64-mingw32".
Fixes <https://bugs.gnu.org/36463>.
Reported by Steffen Rytter Postas <nc@scalehost.eu>.
* gnu/build/linux-container.scm (mount-file-systems): When /dev/ptmx
exists on the host, explicitly mount a new instance of devpts and make
/dev/ptmx a symlink to /dev/pts/ptmx.
Fixes a bug whereby derivations importing (gnu build linux-container),
such as the 'bitlbee' and 'tor' services, would depend on the
user's (guix config) file, which was pulled as a dependency of (guix
utils). As a result, those derivations would vary from user to user.
* gnu/build/linux-container.scm (call-with-temporary-directory): New
procedure.
Fixes <https://bugs.gnu.org/36076>.
Reported by Jack Hill <jackhill@jackhill.us>
and Giovanni Biscuolo <g@xelera.eu>
* gnu/build/locale.scm (locale->name+codeset): New file.
* gnu/packages/base.scm (make-glibc-locales): Add #:modules
and #:imported-modules. Add a 'symlink-normalized-codesets' phase.
Suggested by Florian Pelz <pelzflorian@pelzflorian.de>
in <http://bugs.gnu.org/35996>.
* gnu/build/accounts.scm (%password-lock-file): New variable.
* gnu/build/activation.scm (activate-users+groups): Wrap calls to
'user+group-databases', 'write-group', etc. into 'with-file-lock'.
Fixes a bug whereby Tor (for example) would emit syslog messages with a
UTC timestamp instead of local time.
* gnu/build/shepherd.scm (default-mounts): Add /etc/localtime to
MAPPINGS.
* guix/build/syscalls.scm (MS_NOATIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Support it.
* doc/guix.texi (File Systems): Document it and add cross-references to
the relevant documentation.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Starting from commit 0ae735bcc8, Guix
System would preserve the user shell across reconfigure and reboot.
This was done so as to allow for the use of 'chsh'.
This proved to be a misguided decision. This commit goes back to
considering user shells as config and not "state."
* gnu/build/accounts.scm (allocate-passwd): Do not use shell from
PREVIOUS.
On 32-bit systems, 'string-hash' would raise an out-of-range exception
when the second argument was 2^32.
* gnu/build/vm.scm (make-iso9660-image): Pass 2^32 - 1 to 'string-hash'.
This is a followup to 66ec389580.
This reverts 178be030c0, which is no
longer needed.
* gnu/build/vm.scm (make-iso9660-image): Remove "-padding" option.
Fixes <https://bugs.gnu.org/34788>.
Reported by Jack Hill <jackhill@jackhill.us>.
Regression introduced by the combination of
8bb76f3d44 and
0ae735bcc8: /var/empty would be 700 and
owned by one of the system accounts (thus inaccessible to others), and
/var/run/dbus would be 700 as well, thereby preventing D-Bus clients
from connecting to the daemon.
* gnu/build/activation.scm (duplicates): New procedure.
(activate-users+groups)[system-accounts]: New variable.
Use it. Make shared system account home directories #o555 and
root-owned.
* gnu/services/dbus.scm (dbus-activation): Make /var/run/dbus #o755.
* gnu/tests/base.scm (run-basic-test): Test the ownership and
permissions of /var/empty.
* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New
procedures.
* gnu/system/shadow.scm (account-activation): Call them in the arguments
to 'activate-users+groups'.
(account-shepherd-service): Likewise.
* gnu/build/activation.scm (activate-users+groups): Expect a list of
<user-account> and a list of <user-group>. Replace uses of 'match' on
tuples with calls to record accessors.
(activate-user-home): Likewise.
Until now they'd be #o755, except for /root, which is treated specially
in (gnu build install).
* gnu/build/activation.scm (activate-user-home): Chmod HOME to #o700.
Remove redundant 'unless system?'.
This makes sure it is inherited by packages using (cross-gcc ...). This
commit is a followup to 01e8263feb.
* gnu/build/cross-toolchain.scm (cross-gcc-build-phases): Move
'treat-glibc-as-system-header' phase ...
* gnu/packages/cross-base.scm (cross-gcc-arguments): ... here.
* gnu/packages/cross-base.scm (%gcc-cross-include-paths): Remove
CROSS_C_INCLUDE_PATH & co in favor of CROSS_CPATH.
* gnu/build/cross-toolchain.scm (%gcc-cross-include-paths): Likewise.
(cross-gcc-build-phases): Set CROSS_C_INCLUDE_PATH and
CROSS_CPLUS_INCLUDE_PATH when building the cross GCC.
* gnu/packages/commencement.scm (libstdc++): Add
"--disable-libstdcxx-dual-abi" to #:configure-flags.
(gcc-boot0)[arguments]: Add "--disable-libmpx"
to #:configure-flags.
(gcc-final): Add phase to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH before
building GCC.
(gcc-toolchain-5): Use MAKE-GCC-TOOLCHAIN.
(gcc-toolchain-7): Change to GCC-TOOLCHAIN.
* gnu/packages/gcc.scm (gcc): Change from GCC-5 to GCC-7.
(gfortran): Change to GFORTRAN-7.
(gcc-objc): Change to GCC-OBJC-7.
(gcc-objc++): Change to GCC-OBJC++-7.
* gnu/packages/rust.scm (rust-1.19.0)[native-search-paths]: Change from
C_INCLUDE_PATH & co to CPATH.
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'.