diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index d7d40ceb223..fc25b653f32 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -146,6 +146,7 @@ Copyright @copyright{} 2025 Artur Wroblewski@* | |||
| 146 | Copyright @copyright{} 2025 Edouard Klein@* | 146 | Copyright @copyright{} 2025 Edouard Klein@* |
| 147 | Copyright @copyright{} 2025 Rodion Goritskov@* | 147 | Copyright @copyright{} 2025 Rodion Goritskov@* |
| 148 | Copyright @copyright{} 2025 dan@* | 148 | Copyright @copyright{} 2025 dan@* |
| 149 | Copyright @copyright{} 2025 NoƩ Lopez@* | ||
| 149 | 150 | ||
| 150 | Permission is granted to copy, distribute and/or modify this document | 151 | Permission is granted to copy, distribute and/or modify this document |
| 151 | under the terms of the GNU Free Documentation License, Version 1.3 or | 152 | under the terms of the GNU Free Documentation License, Version 1.3 or |
| @@ -919,6 +920,7 @@ pre-built binaries. | |||
| 919 | * Build Environment Setup:: Preparing the isolated build environment. | 920 | * Build Environment Setup:: Preparing the isolated build environment. |
| 920 | * Daemon Offload Setup:: Offloading builds to remote machines. | 921 | * Daemon Offload Setup:: Offloading builds to remote machines. |
| 921 | * SELinux Support:: Using an SELinux policy for the daemon. | 922 | * SELinux Support:: Using an SELinux policy for the daemon. |
| 923 | * AppArmor Support:: Using an AppArmor profile for the daemon. | ||
| 922 | @end menu | 924 | @end menu |
| 923 | 925 | ||
| 924 | @node Build Environment Setup | 926 | @node Build Environment Setup |
| @@ -1097,6 +1099,8 @@ systemctl daemon-reload | |||
| 1097 | systemctl start guix-daemon | 1099 | systemctl start guix-daemon |
| 1098 | @end example | 1100 | @end example |
| 1099 | 1101 | ||
| 1102 | If your system has AppArmor enabled, @pxref{AppArmor Support}. | ||
| 1103 | |||
| 1100 | @quotation Warning | 1104 | @quotation Warning |
| 1101 | The commands above assume that @command{guix pull} was run for the root | 1105 | The commands above assume that @command{guix pull} was run for the root |
| 1102 | user. You can check whether this is the case by running this command: | 1106 | user. You can check whether this is the case by running this command: |
| @@ -1526,6 +1530,43 @@ installation time whenever the Guix package that provides the | |||
| 1526 | effectively running @code{guix-daemon} executable is upgraded. | 1530 | effectively running @code{guix-daemon} executable is upgraded. |
| 1527 | @end enumerate | 1531 | @end enumerate |
| 1528 | 1532 | ||
| 1533 | @node AppArmor Support | ||
| 1534 | @subsection AppArmor Support | ||
| 1535 | |||
| 1536 | @cindex AppArmor | ||
| 1537 | |||
| 1538 | Guix includes an AppArmor profile for the build daemon in | ||
| 1539 | @file{etc/apparmor.d/guix-daemon} that can be installed on systems with | ||
| 1540 | strict AppArmor policies to allow it to run unprivileged | ||
| 1541 | (@pxref{Build Environment Setup}). Indeed, the unprivileged daemon makes | ||
| 1542 | use of Linux user namespaces but these are disallowed | ||
| 1543 | without an AppArmor policy on some systems like Ubuntu. | ||
| 1544 | |||
| 1545 | To know if this applies to you, check if the | ||
| 1546 | @code{kernel.apparmor_restrict_unprivileged_userns} kernel parameter is | ||
| 1547 | enabled. | ||
| 1548 | |||
| 1549 | @subsubsection Installing the AppArmor profile | ||
| 1550 | @cindex AppArmor, profile installation | ||
| 1551 | |||
| 1552 | @quotation Note | ||
| 1553 | The @code{guix-install.sh} binary installation script offers to perform | ||
| 1554 | the steps below for you (@pxref{Binary Installation}). | ||
| 1555 | @end quotation | ||
| 1556 | |||
| 1557 | Run these commands as root to install the profile: | ||
| 1558 | |||
| 1559 | @example | ||
| 1560 | export apparmor_sources=/var/guix/profiles/per-user/root/current-guix/etc/apparmor.d | ||
| 1561 | cp -f -t /etc/apparmor.d/tunables "$apparmor_sources/tunables/guix" | ||
| 1562 | cp -f -t /etc/apparmor.d "$apparmor_sources/guix-daemon" | ||
| 1563 | cp -f -t /etc/apparmor.d "$apparmor_sources/guix" | ||
| 1564 | apparmor_parser -r /etc/apparmor.d/guix-daemon | ||
| 1565 | apparmor_parser -r /etc/apparmor.d/guix | ||
| 1566 | @end example | ||
| 1567 | |||
| 1568 | After this, the build daemon will be able to function correctly. | ||
| 1569 | |||
| 1529 | @node Invoking guix-daemon | 1570 | @node Invoking guix-daemon |
| 1530 | @section Invoking @command{guix-daemon} | 1571 | @section Invoking @command{guix-daemon} |
| 1531 | @cindex @command{guix-daemon} | 1572 | @cindex @command{guix-daemon} |
