* gnu/packages/linux.scm (%dummy-linux-kernel-for-container): New variable.
* gnu/system/linux-container.scm (containerized-operating-system): Use it.
Change-Id: Ica49a0cd0b8ae4a78ba5fca879ae73f94e64474a
This allows specifying the following skeleton, for example:
--8<---------------cut here---------------start------------->8---
`((".config/test.txt" ,[...])
--8<---------------cut here---------------end--------------->8---
* gnu/system/shadow.scm (skeleton-directory): Create parent directory for
target.
Change-Id: I49649000bd6cdab9060f057b47a5122b17027f10
Fixes a regression introduced in c743d646ee.
Without this, the fish shell integration is broken, and PATH does not include
~/.config/guix/current/bin.
* gnu/system/shadow.scm (%default-bashrc): Fix return value.
Change-Id: I54170caeef7ae541a4901743fcdcbfb353fa09d4
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
Fixes#420.
Previously, in systems produced by ‘guix system container’, the
‘loopback’ Shepherd service would fail to start with EEXIST, because the
“lo” interface already exists in the container. This commit provides a
fake ‘loopback’ Shepherd service that does nothing.
* gnu/system/linux-container.scm (dummy-networking-service-type): Change
to honor its configuration value.
(containerized-operating-system)[services-to-drop]: Add
‘static-networking-service-type’ in the non-‘shared-network?’ case.
[services-to-add]: Add ‘dummy-networking-service-type’ for loopback in
the non-‘shared-network?’ case.
Reported-by: Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br>
Change-Id: I326b5f3b5e08f67b6613c186497c44b1e887b02e
Fixesguix/guix#422.
* gnu/system/install.scm (%installation-services)[guix-package-commit]:
New procedure.
<guix-configuration>: Use it instead of ‘channel-commit’.
Change-Id: I6ed5bc3f21a375e639fabfcbcdaf70b6347d1c5c
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.
Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.
* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here. Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value. Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.
Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
This causes Bash to treat /etc/bashrc as a startup file, removing the need to
source /etc/bashrc from ~/.bashrc.
* gnu/packages/bash.scm (bash-fixed): New package, with added SYS_BASHRC
define.
(bash) [replacement]: Use it.
* gnu/system/shadow.scm (%default-bashrc): Do not source /etc/bashrc, now done
implicitly.
Change-Id: I5b0afd7d81653ef19c482e5501efdf7e50ef37c0
* gnu/system/hurd.scm (%hurd-default-operating-system-kernel,
%hurd64-default-operating-system-kernel): Set to gnumach.
Change-Id: I7d5515c95e2994e2f0c4ae3a43afe4e6575a53ed
Fixes <https://issues.guix.gnu.org/67707>.
Previously ‘guix describe’ in the installation image would show the
URL of the local checkout that was used to build the image. It now
shows the default URL.
* gnu/system/install.scm (%installation-services): Change channel of
‘guix’ package to inherit from ‘%default-guix-channel’.
Change-Id: If848b5a6166904e982e0f9a0780f3e3f53bdfc28
Until now, the read-only file system set up by ‘call-with-container’
would always be writable. With this change, it can be made read-only.
With this patch, only ‘least-authority-wrapper’ switches to a read-only
root file system.
* gnu/build/linux-container.scm (remount-read-only): New procedure.
(mount-file-systems): Add #:writable-root? and #:populate-file-system
and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* gnu/system/linux-container.scm (container-script): Pass #:writable-root?
to ‘call-with-container’.
(eval/container): Add #:populate-file-system and #:writable-root? and
honor them.
* guix/scripts/environment.scm (launch-environment/container):
Pass #:writable-root? to ‘call-with-container’.
* guix/scripts/home.scm (spawn-home-container): Likewise.
* tests/containers.scm ("call-with-container, mnt namespace, read-only root")
("call-with-container, mnt namespace, writable root"): New tests.
Change-Id: I603e2fd08851338b737bb16c8af3f765e2538906
* gnu/system/vm.scm (virtualized-operating-system): Choose the module name based
on the kernel version
Change-Id: I77d70fa44a8d5d2412ae0aaa645fa67146b76432
This module is required when booting from MMC block device.
* gnu/system/linux-initrd.scm (default-initrd-modules): Add mmc_block.
Change-Id: I91474a62e9d7b5be07e89f657fd59d37d061b127
This is a followup to d0510dcd82, which
wrongfully assumed that this was already the case.
* gnu/system/install.scm (%installation-services): Replace
‘syslog-service-type’ by ‘shepherd-system-log-service-type’.
Change-Id: I349454b8d005c67d2c6d6b5475f74d16c9006006
The result returned so far by ‘common-qemu-options’ assumed that it
would be passed to a shell. This is the case when using
‘system-qemu-image/shared-store-script’ but possibly not in other cases.
* gnu/system/vm.scm (common-qemu-options): Add #:image-format.
[virtfs-option]: Return a list of strings instead of a single
"-virtfs xyz" string. Update caller to use ‘append-map’.
Separate "-drive" string.
Change-Id: Ib07c27e2c4b2d222d7db2c612bb045d330bc7f68
The parameter should take the values #t, #f or 'default.
In a container environment, 'default amounts to #f, otherwise it
amounts to #t.
* gnu/services/base.scm (guix-configuration)<chroot?>: New field.
(guix-shepherd-service): If chroot? is #f, add "--disable-chroot".
If it is #t or 'default, do nothing.
* gnu/system/linux-container.scm (containerized-operating-system):
If chroot? is 'default, replace it by #f.
* doc/guix.texi: Document the parameter.
Change-Id: I8b9c3f46ad8650fa6ed4acee947b4ae5d002d03d
The virtual-machine syntax would not accept a single operating-system field,
which was puzzling.
* gnu/system/vm.scm (virtual-machine): Add a pattern matching a single literal
'operating-system' field and value.
Change-Id: If207fd71df3a3f763b2e63229eafa82f63e80773
* gnu/system/images/pinebook-pro.scm: augment partition offset
to make room for the bootloader.
Change-Id: I91a3758243a13960165d40b94efe017e6e059a22
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
This commit adds a Guix System service to handle allocation of subuid
and subgid requests. Users that don't care can just add themselves as a
subid-range and don't need to specify anything but their user name.
Users that care about specific ranges, such as possibly LXD, can specify
a start and a count.
* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/build/activation.scm (activate-subuids+subgids): New variable.
* gnu/local.mk: Add gnu/tests/shadow.scm.
* gnu/system/accounts.scm (sexp->subid-range): New variable.
* gnu/system/shadow.scm (%root-subid): New variable;
(subids-configuration): new record;
(subid-range->gexp): new variable;
(assert-valid-subids): new variable;
(delete-duplicate-ranges): new variable;
(subids-activation): new variable;
(subids-extension): new record;
(append-subid-ranges): new variable;
(subids-extension-merge): new variable;
(subids-service-type): new variable.
* gnu/tests/shadow.scm (subids): New system test.
Change-Id: I3755e1c75771220c74fe8ae5de1a7d90f2376635
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit adds allocation logic for subid ranges. Subid ranges are
ranges of contiguous subids that are mapped to a user in the host
system. This patch implements a flexible allocation algorithm allowing
users that do not want (or need) to specify details of the subid ranges
that they are requesting to avoid doing so, while upholding requests of
users that need to have specific ranges.
* gnu/build/accounts.scm (%subordinate-id-min): New variable;
(%subordinate-id-max): new variable;
(%subordinate-id-count): new variable;
(subordinate-id?): new variable;
(&subordinate-id-error): new variable;
(&subordinate-id-overflow-error): new variable;
(&illegal-subid-range-error): new variable;
(&specific-subid-range-expected-error): new variable;
(&generic-subid-range-expected-error): new variable;
(within-interval?): new variable;
(allocate-unused-range): new variable;
(allocate-generic-range): new variable;
(allocate-specific-range): new variable;
(reserve-subids): new variable;
(range->entry): new variable;
(entry->range): new variable;
(allocate-subids): new variable;
(subuid+subgid-databases): new variable.
* gnu/system/accounts.scm (subid-range-end): New variable;
(subid-range-has-start?): new variable;
(subid-range-less): new variable.
* test/accounts.scm: Test them.
Change-Id: I8de1fd7cfe508b9c76408064d6f498471da0752d
Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit adds a new record type, <subid-entry> and serializers
and deserializers for it in (gnu build accounts). Each instance of this
record represents one line in either /etc/subuid or /etc/subgid. Since
Shadow uses the same representation for both files, it should be ok if
we do it as well.
This commit adds also <subid-range>, a user facing representation of
<subid-entry>. It is supposed to be usable directly in OS configurations.
* gnu/build/accounts.scm (subid-entry): New record;
(write-subgid): add serializer for subgids;
(write-subuid): add serializer for subuids;
(read-subgid): add serializer for subgids;
(read-subuid): add serializer for subuids.
* gnu/system/accounts.scm (subid-range): New record.
* test/accounts.scm: Test them.
Change-Id: I6b037e40e354c069bf556412bb5b626bd3ea1b2c
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system/examples/bare-hurd64.tmpl: Remove --machine q35, there seems to
be no longer any need for this. Mention that there is no login prompt.
* gnu/system/examples/devel-hurd64.tmpl: Likewise.
Change-Id: Ib918cff3ca96f2a199869e876b6a75fedb09c983
This also updates comments and removes the comment about a very old
`bootstrap-profile' hack.
* gnu/system/examples/devel-hurd.tmpl (hurd-packages): New variable
(%hurd-devel-os): Use it.
* gnu/system/examples/devel-hurd64.tmpl: New file.
Change-Id: I54b6b0843f0dd635d89cca483ae43d23b20d21e8
Because pt_PT and pt_BR have many differences, such as how
the word “file” gets translated, Guix’ pt_BR info manual is
called (guix.pt_BR) instead of (guix.pt).
* gnu/system/install.scm (log-to-info): Try region coded manual
file names.
(%installation-node-names): Add node names for pt_BR and zh_CN.
Change-Id: I89beebd323ee69ca83c22321c9d9e664b32cf6f3
This adds a "Kernel" page to the installer with the option to (cross-) install
the Hurd, if applicable (only available on x86 machines for now).
* gnu/installer/newt.scm (kernel-page): New procedure.
(newt-installer)[kernel-page]: New field.
* gnu/installer/kernel.scm,
gnu/installer/newt/kernel.scm: New files.
* gnu/local.mk (INSTALLER_MODULES): Add them.
* gnu/installer.scm (installer-steps): Use them to select kernel if
applicable.
* gnu/installer/newt/partition.scm (run-label-page): Default to "msdos" when
instaling the Hurd.
(run-fs-type-page): Add ext2 for the hurd.
(run-partitioning-page-partition): Remove `entire-encrypted' option when
installing the Hurd.
* gnu/installer/services.scm (system-services->configuration): Cater for the
Hurd with %base-services/hurd, and with %base-packages/hurd that must always
be set.
(%system-services): Change to procedure. When installing the the Hurd, do not
recommend `ntp-service-type' and USE `openssh-sans-x' package for
`openssh-service-type'.
(system-service-none): New variable.
* gnu/installer/newt/services.scm (run-network-management-page): Include it
when installing the Hurd.
(run-desktop-environments-cbt-page): When installing the Hurd, recommend to
not select any desktop enviroment. Update users.
* gnu/installer/parted.scm (efi-installation?): Return #f when installing for
the Hurd.
(create-ext2-file-system): New procedure.
(user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type,
format-user-partitions): Support `ext2'.
(<user-partition> partition->user-partition): Use `ext2' when installing the
Hurd.
(auto-partition!): Likewise. No swap partition when installing the Hurd.
* gnu/installer/final.scm (install-system): Cater for cross installation of
the Hurd.
(bootloader-configuration): Use `grub-minimal-bootloader' when installing the
Hurd.
(user-partition-missing-modules): Cater for empty user-partitions.
(initrd-configuration, user-partitions->configuration): Cater for the Hurd.
* gnu/installer/steps.scm (format-configuration,
configuration->file): Cater for the Hurd.
* gnu/system/hurd.scm (%desktop-services/hurd): New variable.
* gnu/installer/tests.scm (choose-kernel): New procedure.
* gnu/tests/install.scm (gui-test-program): Use it.
Change-Id: Ifafb27b8a2f933944c77223a27ec151757237e36
This operating system specification for the Hurd creates a system that
supports building the guix package from git natively.
Do something like
./pre-inst-env guix system build --target=i586-pc-gnu \
gnu/system/examples/devel-hurd.tmpl
./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=15G \
--no-offload gnu/system/examples/devel-hurd.tmpl
cp /gnu/store/...disk-image devel.img
guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \
-device rtl8139,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
-hda devel-hurd.img
ssh -p 10022 root@localhost
GUIX_PROFILE=/run/current-system/bootstrap-profile
source $GUIX_PROFILE/etc/profile
mkdir -p ~/src/guix
cd src/guix
git clone git://git.savannah.gnu.org/guix
cd guix
./bootstrap
./configure --with-courage
make
* gnu/system/examples/devel-hurd.tmpl: New file.
Change-Id: I097c7c00a9ab9602db7f8f3305827c815f308d1e
This allows us to use %base-services/hurd for services in a Hurd config for a
real machine without removing static-networking.
* gnu/system/hurd.scm (%base-services/hurd): Factor networking out to...
(%base-services+qemu-networking/hurd): ..this new variable.
* gnu/system/examples/bare-hurd.tmpl (%hurd-os): Use it.
* gnu/services/virtualization.scm (%hurd-vm-operating-system): Use it.
* gnu/system/images/hurd.scm (hurd-barebones-os): Use it. Add comment about
QEMU and networking for a real machine.
Change-Id: I777a63410383b9bf8b5740e4513dbc1e9fb0fd41