diff options
Diffstat (limited to 'doc/guix.de.texi')
| -rw-r--r-- | doc/guix.de.texi | 26536 |
1 files changed, 0 insertions, 26536 deletions
diff --git a/doc/guix.de.texi b/doc/guix.de.texi deleted file mode 100644 index 419d40379e6..00000000000 --- a/doc/guix.de.texi +++ /dev/null | |||
| @@ -1,26536 +0,0 @@ | |||
| 1 | \input texinfo | ||
| 2 | @c =========================================================================== | ||
| 3 | @c | ||
| 4 | @c This file was generated with po4a. Translate the source file. | ||
| 5 | @c | ||
| 6 | @c =========================================================================== | ||
| 7 | @c -*-texinfo-*- | ||
| 8 | |||
| 9 | @c %**start of header | ||
| 10 | @setfilename guix.de.info | ||
| 11 | @documentencoding UTF-8 | ||
| 12 | @documentlanguage de | ||
| 13 | @frenchspacing on | ||
| 14 | @settitle Referenzhandbuch zu GNU Guix | ||
| 15 | @c %**end of header | ||
| 16 | |||
| 17 | @include version-de.texi | ||
| 18 | |||
| 19 | @c Identifier of the OpenPGP key used to sign tarballs and such. | ||
| 20 | @set OPENPGP-SIGNING-KEY-ID 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 | ||
| 21 | @set KEY-SERVER pool.sks-keyservers.net | ||
| 22 | |||
| 23 | @c The official substitute server used by default. | ||
| 24 | @set SUBSTITUTE-SERVER ci.guix.de.info | ||
| 25 | |||
| 26 | @copying | ||
| 27 | Copyright @copyright{} 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 | ||
| 28 | Ludovic Courtès@* Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@* | ||
| 29 | Copyright @copyright{} 2013 Nikita Karetnikov@* Copyright @copyright{} 2014, | ||
| 30 | 2015, 2016 Alex Kost@* Copyright @copyright{} 2015, 2016 Mathieu Lirzin@* | ||
| 31 | Copyright @copyright{} 2014 Pierre-Antoine Rault@* Copyright @copyright{} | ||
| 32 | 2015 Taylan Ulrich Bayırlı/Kammer@* Copyright @copyright{} 2015, 2016, 2017 | ||
| 33 | Leo Famulari@* Copyright @copyright{} 2015, 2016, 2017, 2018, 2019 Ricardo | ||
| 34 | Wurmus@* Copyright @copyright{} 2016 Ben Woodcroft@* Copyright @copyright{} | ||
| 35 | 2016, 2017, 2018 Chris Marusich@* Copyright @copyright{} 2016, 2017, 2018, | ||
| 36 | 2019 Efraim Flashner@* Copyright @copyright{} 2016 John Darrington@* | ||
| 37 | Copyright @copyright{} 2016, 2017 ng0@* Copyright @copyright{} 2016, 2017, | ||
| 38 | 2018, 2019 Jan Nieuwenhuizen@* Copyright @copyright{} 2016 Julien Lepiller@* | ||
| 39 | Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016, | ||
| 40 | 2017, 2018, 2019 Christopher Baines@* Copyright @copyright{} 2017, 2018 | ||
| 41 | Clément Lassieur@* Copyright @copyright{} 2017, 2018 Mathieu Othacehe@* | ||
| 42 | Copyright @copyright{} 2017 Federico Beffa@* Copyright @copyright{} 2017, | ||
| 43 | 2018 Carlo Zancanaro@* Copyright @copyright{} 2017 Thomas Danckaert@* | ||
| 44 | Copyright @copyright{} 2017 humanitiesNerd@* Copyright @copyright{} 2017 | ||
| 45 | Christopher Allan Webber@* Copyright @copyright{} 2017, 2018 Marius Bakke@* | ||
| 46 | Copyright @copyright{} 2017 Hartmut Goebel@* Copyright @copyright{} 2017 | ||
| 47 | Maxim Cournoyer@* Copyright @copyright{} 2017, 2018 Tobias Geerinckx-Rice@* | ||
| 48 | Copyright @copyright{} 2017 George Clemmer@* Copyright @copyright{} 2017 | ||
| 49 | Andy Wingo@* Copyright @copyright{} 2017, 2018, 2019 Arun Isaac@* Copyright | ||
| 50 | @copyright{} 2017 nee@* Copyright @copyright{} 2018 Rutger Helling@* | ||
| 51 | Copyright @copyright{} 2018 Oleg Pykhalov@* Copyright @copyright{} 2018 Mike | ||
| 52 | Gerwitz@* Copyright @copyright{} 2018 Pierre-Antoine Rouby@* Copyright | ||
| 53 | @copyright{} 2018 Gábor Boskovits@* Copyright @copyright{} 2018 Florian | ||
| 54 | Pelz@* Copyright @copyright{} 2018 Laura Lazzati@* Copyright @copyright{} | ||
| 55 | 2018 Alex Vong@* | ||
| 56 | |||
| 57 | Es ist Ihnen gestattet, dieses Dokument zu vervielfältigen, weiterzugeben | ||
| 58 | und/oder zu verändern, unter den Bedingungen der GNU Free Documentation | ||
| 59 | License, entweder gemäß Version 1.3 der Lizenz oder (nach Ihrer Option) | ||
| 60 | einer späteren Version, die von der Free Software Foundation veröffentlicht | ||
| 61 | wurde, ohne unveränderliche Abschnitte, ohne vorderen Umschlagtext und ohne | ||
| 62 | hinteren Umschlagtext. Eine Kopie der Lizenz finden Sie im Abschnitt mit dem | ||
| 63 | Titel »GNU Free Documentation License«. | ||
| 64 | @end copying | ||
| 65 | |||
| 66 | @dircategory Systemadministration | ||
| 67 | @direntry | ||
| 68 | * Guix: (guix.de). Installierte Software und Systemkonfigurationen | ||
| 69 | verwalten. | ||
| 70 | * guix package: (guix.de)guix package aufrufen. Pakete installieren, | ||
| 71 | entfernen und | ||
| 72 | aktualisieren. | ||
| 73 | * guix gc: (guix.de)guix gc aufrufen. Unbenutzten Plattenspeicher wieder | ||
| 74 | freigeben. | ||
| 75 | * guix pull: (guix.de)guix pull aufrufen. Die Liste verfügbarer Pakete | ||
| 76 | aktualisieren. | ||
| 77 | * guix system: (guix.de)guix system aufrufen. Die | ||
| 78 | Betriebssystemkonfiguration | ||
| 79 | verwalten. | ||
| 80 | @end direntry | ||
| 81 | |||
| 82 | @dircategory Softwareentwicklung | ||
| 83 | @direntry | ||
| 84 | * guix environment: (guix.de)guix environment aufrufen. Umgebungen für | ||
| 85 | Entwickler | ||
| 86 | erstellen | ||
| 87 | * guix build: (guix.de)guix build aufrufen. Erstellen von Paketen. | ||
| 88 | * guix pack: (guix.de)guix pack aufrufen. Bündel aus Binärdateien | ||
| 89 | erstellen. | ||
| 90 | @end direntry | ||
| 91 | |||
| 92 | @titlepage | ||
| 93 | @title Referenzhandbuch zu GNU Guix | ||
| 94 | @subtitle Den funktionalen Paketmanager GNU Guix benutzen | ||
| 95 | @author Die GNU-Guix-Entwickler | ||
| 96 | |||
| 97 | @page | ||
| 98 | @vskip 0pt plus 1filll | ||
| 99 | Edition @value{EDITION} @* @value{UPDATED} @* | ||
| 100 | |||
| 101 | @insertcopying | ||
| 102 | @end titlepage | ||
| 103 | |||
| 104 | @contents | ||
| 105 | |||
| 106 | @c ********************************************************************* | ||
| 107 | @node Top | ||
| 108 | @top GNU Guix | ||
| 109 | |||
| 110 | Dieses Dokument beschreibt GNU Guix, Version @value{VERSION}, ein Werkzeug | ||
| 111 | zur funktionalen Verwaltung von Softwarepaketen, das für das GNU-System | ||
| 112 | geschrieben wurde. | ||
| 113 | |||
| 114 | @c TRANSLATORS: You can replace the following paragraph with information on | ||
| 115 | @c how to join your own translation team and how to report issues with the | ||
| 116 | @c translation. | ||
| 117 | Dieses Handbuch ist auch auf Englisch (siehe @ref{Top,,, guix, GNU Guix | ||
| 118 | Reference Manual}) und Französisch verfügbar (siehe @ref{Top,,, guix.fr, | ||
| 119 | Manuel de référence de GNU Guix}). Wenn Sie es in Ihre eigene Sprache | ||
| 120 | übersetzen möchten, dann sind Sie beim | ||
| 121 | @uref{https://translationproject.org/domain/guix-manual.html, Translation | ||
| 122 | Project} herzlich willkommen. | ||
| 123 | |||
| 124 | @menu | ||
| 125 | * Einführung:: Was ist Guix überhaupt? | ||
| 126 | * Installation:: Guix installieren. | ||
| 127 | * Systeminstallation:: Das ganze Betriebssystem installieren. | ||
| 128 | * Paketverwaltung:: Pakete installieren, aktualisieren usw. | ||
| 129 | * Entwicklung:: Von Guix unterstützte Softwareentwicklung. | ||
| 130 | * Programmierschnittstelle:: Guix in Scheme verwenden. | ||
| 131 | * Zubehör:: Befehle zur Paketverwaltung. | ||
| 132 | * Systemkonfiguration:: Das Betriebssystem konfigurieren. | ||
| 133 | * Dokumentation:: Wie man Nutzerhandbücher von Software liest. | ||
| 134 | * Dateien zur Fehlersuche installieren:: Womit man seinen Debugger | ||
| 135 | füttert. | ||
| 136 | * Sicherheitsaktualisierungen:: Sicherheits-Patches schnell einspielen. | ||
| 137 | * Bootstrapping:: GNU/Linux von Grund auf selbst erstellen. | ||
| 138 | * Portierung:: Guix auf andere Plattformen und Kernels | ||
| 139 | bringen. | ||
| 140 | * Mitwirken:: Ihre Hilfe ist nötig! | ||
| 141 | |||
| 142 | * Danksagungen:: Danke! | ||
| 143 | * GNU-Lizenz für freie Dokumentation:: Die Lizenz dieses Handbuchs. | ||
| 144 | * Konzeptverzeichnis:: Konzepte. | ||
| 145 | * Programmierverzeichnis:: Datentypen, Funktionen und Variable. | ||
| 146 | |||
| 147 | @detailmenu | ||
| 148 | --- Detaillierte Liste der Knoten --- | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | Einführung | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | * Auf Guix-Art Software verwalten:: Was Guix besonders macht. | ||
| 157 | * GNU-Distribution:: Die Pakete und Werkzeuge. | ||
| 158 | |||
| 159 | Installation | ||
| 160 | |||
| 161 | |||
| 162 | |||
| 163 | * Aus Binärdatei installieren:: Guix installieren, ohne Zeit zu verlieren! | ||
| 164 | * Voraussetzungen:: Zum Erstellen und Benutzen von Guix nötige | ||
| 165 | Software. | ||
| 166 | * Den Testkatalog laufen lassen:: Guix testen. | ||
| 167 | * Den Daemon einrichten:: Wie man die Umgebung des Erstellungs-Daemons | ||
| 168 | einrichtet. | ||
| 169 | * Aufruf des guix-daemon:: Den Erstellungs-Daemon laufen lassen. | ||
| 170 | * Anwendungen einrichten:: Anwendungsspezifische Einstellungen. | ||
| 171 | |||
| 172 | Den Daemon einrichten | ||
| 173 | |||
| 174 | |||
| 175 | |||
| 176 | * Einrichten der Erstellungsumgebung:: Die isolierte Umgebung zum Erstellen | ||
| 177 | vorbereiten. | ||
| 178 | * Auslagern des Daemons einrichten:: Erstellungen auf entfernte Maschinen | ||
| 179 | auslagern. | ||
| 180 | * SELinux-Unterstützung:: Wie man eine SELinux-Richtlinie für den Daemon | ||
| 181 | einrichtet. | ||
| 182 | |||
| 183 | Systeminstallation | ||
| 184 | |||
| 185 | |||
| 186 | |||
| 187 | * Einschränkungen:: Was Sie erwarten dürfen. | ||
| 188 | * Hardware-Überlegungen:: Unterstützte Hardware. | ||
| 189 | * Installation von USB-Stick oder DVD:: Das Installationsmedium | ||
| 190 | vorbereiten. | ||
| 191 | * Vor der Installation:: Netzwerkanbindung, Partitionierung etc. | ||
| 192 | * Geführte grafische Installation:: Leichte grafische Installation. | ||
| 193 | * Manuelle Installation:: Manuelle Installation für Zauberer. | ||
| 194 | * Nach der Systeminstallation:: Wenn die Installation erfolgreich war. | ||
| 195 | * Guix in einer VM installieren:: Ein »Guix System«-Spielplatz. | ||
| 196 | * Ein Abbild zur Installation erstellen:: Wie ein solches entsteht. | ||
| 197 | |||
| 198 | Manuelle Installation | ||
| 199 | |||
| 200 | |||
| 201 | |||
| 202 | * Tastaturbelegung und Netzwerkanbindung und Partitionierung:: Erstes | ||
| 203 | Einrichten. | ||
| 204 | * Fortfahren mit der Installation:: Installieren. | ||
| 205 | |||
| 206 | Paketverwaltung | ||
| 207 | |||
| 208 | |||
| 209 | |||
| 210 | * Funktionalitäten:: Wie Guix Ihr Leben schöner machen wird. | ||
| 211 | * Aufruf von guix package:: Pakete installieren, entfernen usw. | ||
| 212 | * Substitute:: Vorerstelle Binärdateien herunterladen. | ||
| 213 | * Pakete mit mehreren Ausgaben.:: Ein Quellpaket, mehrere Ausgaben. | ||
| 214 | * Aufruf von guix gc:: Den Müllsammler laufen lassen. | ||
| 215 | * Aufruf von guix pull:: Das neueste Guix samt Distribution laden. | ||
| 216 | * Kanäle:: Die Paketsammlung anpassen. | ||
| 217 | * Untergeordnete:: Mit einer anderen Version von Guix | ||
| 218 | interagieren. | ||
| 219 | * Aufruf von guix describe:: Informationen über Ihre Guix-Version | ||
| 220 | anzeigen. | ||
| 221 | * Aufruf von guix archive:: Import und Export von Store-Dateien. | ||
| 222 | |||
| 223 | Substitute | ||
| 224 | |||
| 225 | |||
| 226 | |||
| 227 | * Offizieller Substitut-Server:: Eine besondere Quelle von Substituten. | ||
| 228 | * Substitut-Server autorisieren:: Wie man Substitute an- und abschaltet. | ||
| 229 | * Substitutauthentifizierung:: Wie Guix Substitute verifiziert. | ||
| 230 | * Proxy-Einstellungen:: Wie Sie Substitute über einen Proxy beziehen. | ||
| 231 | * Fehler bei der Substitution:: Was passiert, wenn die Substitution | ||
| 232 | fehlschlägt. | ||
| 233 | * Vom Vertrauen gegenüber Binärdateien:: Wie können Sie diesem binären | ||
| 234 | Blob trauen? | ||
| 235 | |||
| 236 | Entwicklung | ||
| 237 | |||
| 238 | |||
| 239 | |||
| 240 | * Aufruf von guix environment:: Entwicklungsumgebungen einrichten. | ||
| 241 | * Aufruf von guix pack:: Software-Bündel erstellen. | ||
| 242 | |||
| 243 | Programmierschnittstelle | ||
| 244 | |||
| 245 | |||
| 246 | |||
| 247 | * Paketmodule:: Pakete aus Sicht des Programmierers. | ||
| 248 | * Pakete definieren:: Wie Sie neue Pakete definieren. | ||
| 249 | * Erstellungssysteme:: Angeben, wie Pakete erstellt werden. | ||
| 250 | * Der Store:: Den Paket-Store verändern. | ||
| 251 | * Ableitungen:: Systemnahe Schnittstelle für Paketableitungen. | ||
| 252 | * Die Store-Monade:: Rein funktionale Schnittstelle zum Store. | ||
| 253 | * G-Ausdrücke:: Erstellungsausdrücke verarbeiten. | ||
| 254 | * Aufruf von guix repl:: Interaktiv an Guix herumbasteln. | ||
| 255 | |||
| 256 | Pakete definieren | ||
| 257 | |||
| 258 | |||
| 259 | |||
| 260 | * »package«-Referenz:: Der Datentyp für Pakete. | ||
| 261 | * »origin«-Referenz:: Datentyp für Paketursprünge. | ||
| 262 | |||
| 263 | Zubehör | ||
| 264 | |||
| 265 | |||
| 266 | |||
| 267 | * Aufruf von guix build:: Pakete aus der Befehlszeile heraus erstellen. | ||
| 268 | * Aufruf von guix edit:: Paketdefinitionen bearbeiten. | ||
| 269 | * Aufruf von guix download:: Herunterladen einer Datei und Ausgabe ihres | ||
| 270 | Hashes. | ||
| 271 | * Aufruf von guix hash:: Den kryptografischen Hash einer Datei | ||
| 272 | berechnen. | ||
| 273 | * Aufruf von guix import:: Paketdefinitionen importieren. | ||
| 274 | * Aufruf von guix refresh:: Paketdefinitionen aktualisieren. | ||
| 275 | * Aufruf von guix lint:: Fehler in Paketdefinitionen finden. | ||
| 276 | * Aufruf von guix size:: Plattenplatzverbrauch profilieren. | ||
| 277 | * Aufruf von guix graph:: Den Paketgraphen visualisieren. | ||
| 278 | * Aufruf von guix publish:: Substitute teilen. | ||
| 279 | * Aufruf von guix challenge:: Die Substitut-Server anfechten. | ||
| 280 | * Aufruf von guix copy:: Mit einem entfernten Store Dateien austauschen. | ||
| 281 | * Aufruf von guix container:: Prozesse isolieren. | ||
| 282 | * Aufruf von guix weather:: Die Verfügbarkeit von Substituten | ||
| 283 | einschätzen. | ||
| 284 | * Aufruf von guix processes:: Auflisten der Client-Prozesse | ||
| 285 | |||
| 286 | Aufruf von @command{guix build} | ||
| 287 | |||
| 288 | |||
| 289 | |||
| 290 | * Gemeinsame Erstellungsoptionen:: Erstellungsoptionen für die meisten | ||
| 291 | Befehle. | ||
| 292 | * Paketumwandlungsoptionen:: Varianten von Paketen erzeugen. | ||
| 293 | * Zusätzliche Erstellungsoptionen:: Optionen spezifisch für »guix | ||
| 294 | build«. | ||
| 295 | * Fehlschläge beim Erstellen untersuchen:: Praxiserfahrung bei der | ||
| 296 | Paketerstellung. | ||
| 297 | |||
| 298 | Systemkonfiguration | ||
| 299 | |||
| 300 | |||
| 301 | |||
| 302 | * Das Konfigurationssystem nutzen:: Ihr GNU-System anpassen. | ||
| 303 | * »operating-system«-Referenz:: Details der Betriebssystem-Deklarationen. | ||
| 304 | * Dateisysteme:: Die Dateisystemeinbindungen konfigurieren. | ||
| 305 | * Zugeordnete Geräte:: Näheres zu blockorientierten Speichermedien. | ||
| 306 | * Benutzerkonten:: Benutzerkonten festlegen. | ||
| 307 | * Tastaturbelegung:: Wie das System Tastendrücke interpretiert. | ||
| 308 | * Locales:: Sprache und kulturelle Konventionen. | ||
| 309 | * Dienste:: Systemdienste festlegen. | ||
| 310 | * Setuid-Programme:: Mit Administratorrechten startende Programme. | ||
| 311 | * X.509-Zertifikate:: HTTPS-Server authentifizieren. | ||
| 312 | * Name Service Switch:: Den Name Service Switch von libc konfigurieren. | ||
| 313 | * Initiale RAM-Disk:: Linux-libre hochfahren. | ||
| 314 | * Bootloader-Konfiguration:: Den Bootloader konfigurieren. | ||
| 315 | * Aufruf von guix system:: Instanziierung einer Systemkonfiguration. | ||
| 316 | * Guix in einer VM starten:: Wie man »Guix System« in einer virtuellen | ||
| 317 | Maschine startet. | ||
| 318 | * Dienste definieren:: Neue Dienstdefinitionen hinzufügen. | ||
| 319 | |||
| 320 | Dienste | ||
| 321 | |||
| 322 | |||
| 323 | |||
| 324 | * Basisdienste:: Essenzielle Systemdienste. | ||
| 325 | * Geplante Auftragsausführung:: Der mcron-Dienst. | ||
| 326 | * Log-Rotation:: Der rottlog-Dienst. | ||
| 327 | * Netzwerkdienste:: Netzwerkeinrichtung, SSH-Daemon etc. | ||
| 328 | * X Window:: Grafische Anzeige. | ||
| 329 | * Druckdienste:: Unterstützung für lokale und entfernte | ||
| 330 | Drucker. | ||
| 331 | * Desktop-Dienste:: D-Bus- und Desktop-Dienste. | ||
| 332 | * Tondienste:: Dienste für ALSA und Pulseaudio. | ||
| 333 | * Datenbankdienste:: SQL-Datenbanken, Schlüssel-Wert-Speicher etc. | ||
| 334 | * Mail-Dienste:: IMAP, POP3, SMTP und so weiter. | ||
| 335 | * Kurznachrichtendienste:: Dienste für Kurznachrichten. | ||
| 336 | * Telefondienste:: Telefoniedienste. | ||
| 337 | * Überwachungsdienste:: Dienste zur Systemüberwachung. | ||
| 338 | * Kerberos-Dienste:: Kerberos-Dienste. | ||
| 339 | * Web-Dienste:: Web-Server. | ||
| 340 | * Zertifikatsdienste:: TLS-Zertifikate via Let’s Encrypt. | ||
| 341 | * DNS-Dienste:: DNS-Daemons. | ||
| 342 | * VPN-Dienste:: VPN-Daemons. | ||
| 343 | * Network File System:: Dienste mit Bezug zum Netzwerkdateisystem. | ||
| 344 | * Kontinuierliche Integration:: Der Cuirass-Dienst. | ||
| 345 | * Dienste zur Stromverbrauchsverwaltung:: Den Akku schonen. | ||
| 346 | * Audio-Dienste:: Der MPD. | ||
| 347 | * Virtualisierungsdienste:: Dienste für virtuelle Maschinen. | ||
| 348 | * Versionskontrolldienste:: Entfernten Zugang zu Git-Repositorys bieten. | ||
| 349 | * Spieldienste:: Spielserver. | ||
| 350 | * Verschiedene Dienste:: Andere Dienste. | ||
| 351 | |||
| 352 | Dienste definieren | ||
| 353 | |||
| 354 | |||
| 355 | |||
| 356 | * Dienstkompositionen:: Wie Dienste zusammengestellt werden. | ||
| 357 | * Diensttypen und Dienste:: Typen und Dienste. | ||
| 358 | * Service-Referenz:: Referenz zur Programmierschnittstelle. | ||
| 359 | * Shepherd-Dienste:: Eine spezielle Art von Dienst. | ||
| 360 | |||
| 361 | @end detailmenu | ||
| 362 | @end menu | ||
| 363 | |||
| 364 | @c ********************************************************************* | ||
| 365 | @node Einführung | ||
| 366 | @chapter Einführung | ||
| 367 | |||
| 368 | @cindex Zweck | ||
| 369 | GNU Guix@footnote{»Guix« wird wie »geeks« ausgesprochen, also als »ɡiːks« in | ||
| 370 | der Notation des Internationalen Phonetischen Alphabets (IPA).} ist ein | ||
| 371 | Werkzeug zur Verwaltung von Softwarepaketen für das GNU-System und eine | ||
| 372 | Distribution desselbigen GNU-Systems. Guix macht es @emph{nicht} mit | ||
| 373 | besonderen Berechtigungen ausgestatteten, »unprivilegierten« Nutzern leicht, | ||
| 374 | Softwarepakete zu installieren, zu aktualisieren oder zu entfernen, zu einem | ||
| 375 | vorherigen Satz von Paketen zurückzuwechseln, Pakete aus ihrem Quellcode | ||
| 376 | heraus zu erstellen und hilft allgemein bei der Erzeugung und Wartung von | ||
| 377 | Software-Umgebungen. | ||
| 378 | |||
| 379 | @cindex Guix System | ||
| 380 | @cindex GuixSD, was jetzt Guix System heißt | ||
| 381 | @cindex Guix System Distribution, welche jetzt Guix System heißt | ||
| 382 | Sie können GNU@tie{}Guix auf ein bestehendes GNU/Linux-System aufsetzen, wo | ||
| 383 | es die bereits verfügbaren Werkzeuge ergänzt, ohne zu stören (siehe | ||
| 384 | @ref{Installation}), oder Sie können es als eine eigenständige | ||
| 385 | Betriebssystem-Distribution namens @dfn{Guix@tie{}System} | ||
| 386 | verwenden@footnote{Der Name @dfn{Guix@tie{}System} wird auf englische Weise | ||
| 387 | ausgesprochen. Früher hatten wir »Guix System« als »Guix System | ||
| 388 | Distribution« bezeichnet und mit »GuixSD« abgekürzt. Wir denken mittlerweile | ||
| 389 | aber, dass es sinnvoller ist, alles unter der Fahne von Guix zu gruppieren, | ||
| 390 | weil schließlich »Guix System« auch über den Befehl @command{guix system} | ||
| 391 | verfügbar ist, selbst wenn Sie Guix auf einer fremden Distribution | ||
| 392 | benutzen!}. Siehe @ref{GNU-Distribution}. | ||
| 393 | |||
| 394 | @menu | ||
| 395 | * Auf Guix-Art Software verwalten:: Was Guix besonders macht. | ||
| 396 | * GNU-Distribution:: Die Pakete und Werkzeuge. | ||
| 397 | @end menu | ||
| 398 | |||
| 399 | @node Auf Guix-Art Software verwalten | ||
| 400 | @section Auf Guix-Art Software verwalten | ||
| 401 | |||
| 402 | @cindex Benutzeroberflächen | ||
| 403 | Guix bietet eine befehlszeilenbasierte Paketverwaltungsschnittstelle (siehe | ||
| 404 | @ref{Aufruf von guix package}), Werkzeuge als Hilfestellung bei der | ||
| 405 | Software-Entwicklung (siehe @ref{Entwicklung}), Befehlszeilenwerkzeuge für | ||
| 406 | fortgeschrittenere Nutzung (siehe @ref{Zubehör}) sowie Schnittstellen zur | ||
| 407 | Programmierung in Scheme (siehe @ref{Programmierschnittstelle}). | ||
| 408 | @cindex Erstellungs-Daemon | ||
| 409 | Der @dfn{Erstellungs-Daemon} ist für das Erstellen von Paketen im Auftrag | ||
| 410 | von Nutzern verantwortlich (siehe @ref{Den Daemon einrichten}) und für das | ||
| 411 | Herunterladen vorerstellter Binärdateien aus autorisierten Quellen (siehe | ||
| 412 | @ref{Substitute}). | ||
| 413 | |||
| 414 | @cindex Erweiterbarkeit der Distribution | ||
| 415 | @cindex Anpassung, von Paketen | ||
| 416 | Guix enthält Paketdefinitionen für viele Pakete, von GNU und nicht von GNU, | ||
| 417 | die alle @uref{https://www.gnu.org/philosophy/free-sw.html, die Freiheit des | ||
| 418 | Computernutzers respektieren}. Es ist @emph{erweiterbar}: Nutzer können ihre | ||
| 419 | eigenen Paketdefinitionen schreiben (siehe @ref{Pakete definieren}) und sie | ||
| 420 | als unabhängige Paketmodule verfügbar machen (siehe @ref{Paketmodule}). Es ist auch @emph{anpassbar}: Nutzer können spezialisierte | ||
| 421 | Paketdefinitionen aus bestehenden @emph{ableiten}, auch von der Befehlszeile | ||
| 422 | (siehe @ref{Paketumwandlungsoptionen}). | ||
| 423 | |||
| 424 | @cindex funktionale Paketverwaltung | ||
| 425 | @cindex Isolierung | ||
| 426 | Intern implementiert Guix die Disziplin der @dfn{funktionalen | ||
| 427 | Paketverwaltung}, zu der Nix schon die Pionierarbeit geleistet hat (siehe | ||
| 428 | @ref{Danksagungen}). In Guix wird der Prozess, ein Paket zu erstellen und | ||
| 429 | zu installieren, als eine @emph{Funktion} im mathematischen Sinn | ||
| 430 | aufgefasst. Diese Funktion hat Eingaben, wie zum Beispiel | ||
| 431 | Erstellungs-Skripts, einen Compiler und Bibliotheken, und liefert ein | ||
| 432 | installiertes Paket. Als eine reine Funktion hängt sein Ergebnis allein von | ||
| 433 | seinen Eingaben ab — zum Beispiel kann er nicht auf Software oder Skripts | ||
| 434 | Bezug nehmen, die nicht ausdrücklich als Eingaben übergeben wurden. Eine | ||
| 435 | Erstellungsfunktion führt immer zum selben Ergebnis, wenn ihr die gleiche | ||
| 436 | Menge an Eingaben übergeben wurde. Sie kann die Umgebung des laufenden | ||
| 437 | Systems auf keine Weise beeinflussen, zum Beispiel kann sie keine Dateien | ||
| 438 | außerhalb ihrer Erstellungs- und Installationsverzeichnisse verändern. Um | ||
| 439 | dies zu erreichen, laufen Erstellungsprozesse in isolieren Umgebungen | ||
| 440 | (sogenannte @dfn{Container}), wo nur ausdrückliche Eingaben sichtbar sind. | ||
| 441 | |||
| 442 | @cindex Store | ||
| 443 | Das Ergebnis von Paketerstellungsfunktionen wird im Dateisystem | ||
| 444 | @dfn{zwischengespeichert} in einem besonderen Verzeichnis, was als @dfn{der | ||
| 445 | Store} bezeichnet wird (siehe @ref{Der Store}). Jedes Paket wird in sein | ||
| 446 | eigenes Verzeichnis im Store installiert — standardmäßig ist er unter | ||
| 447 | @file{/gnu/store} zu finden. Der Verzeichnisname enthält einen Hash aller | ||
| 448 | Eingaben, anhand derer das Paket erzeugt wurde, somit hat das Ändern einer | ||
| 449 | Eingabe einen völlig anderen Verzeichnisnamen zur Folge. | ||
| 450 | |||
| 451 | Dieses Vorgehen ist die Grundlage für die Guix auszeichnenden | ||
| 452 | Funktionalitäten: Unterstützung transaktionsbasierter Paketaktualisierungen | ||
| 453 | und -rücksetzungen, Installation von Paketen als einfacher Nutzer sowie | ||
| 454 | Garbage Collection für Pakete (siehe @ref{Funktionalitäten}). | ||
| 455 | |||
| 456 | |||
| 457 | @node GNU-Distribution | ||
| 458 | @section GNU-Distribution | ||
| 459 | |||
| 460 | @cindex Guix System | ||
| 461 | Mit Guix kommt eine Distribution des GNU-Systems, die nur aus freier | ||
| 462 | Software@footnote{Die Bezeichnung »frei« steht hier für die | ||
| 463 | @url{http://www.gnu.org/philosophy/free-sw.html,Freiheiten, die Nutzern der | ||
| 464 | Software geboten werden}.} besteht. Die Distribution kann für sich allein | ||
| 465 | installiert werden (siehe @ref{Systeminstallation}), aber Guix kann auch | ||
| 466 | auf einem bestehenden GNU/Linux-System installiert werden. Wenn wir die | ||
| 467 | Anwendungsfälle unterscheiden möchten, bezeichnen wir die alleinstehende | ||
| 468 | Distribution als »Guix@tie{}System« (mit englischer Aussprache). | ||
| 469 | |||
| 470 | Die Distribution stellt den Kern der GNU-Pakete, also insbesondere GNU libc, | ||
| 471 | GCC und Binutils, sowie zahlreiche zum GNU-Projekt gehörende und nicht dazu | ||
| 472 | gehörende Anwendungen zur Verfügung. Die vollständige Liste verfügbarer | ||
| 473 | Pakete können Sie @url{http://www.gnu.org/software/guix/packages,online} | ||
| 474 | einsehen, oder indem Sie @command{guix package} ausführen (siehe | ||
| 475 | @ref{Aufruf von guix package}): | ||
| 476 | |||
| 477 | @example | ||
| 478 | guix package --list-available | ||
| 479 | @end example | ||
| 480 | |||
| 481 | Unser Ziel ist, eine zu 100% freie Software-Distribution von Linux-basierten | ||
| 482 | und von anderen GNU-Varianten anzubieten, mit dem Fokus darauf, das | ||
| 483 | GNU-Projekt und die enge Zusammenarbeit seiner Bestandteile zu befördern, | ||
| 484 | sowie die Programme und Werkzeuge hervorzuheben, die die Nutzer dabei | ||
| 485 | unterstützen, von dieser Freiheit Gebrauch zu machen. | ||
| 486 | |||
| 487 | Pakete sind zur Zeit auf folgenden Plattformen verfügbar: | ||
| 488 | |||
| 489 | @table @code | ||
| 490 | |||
| 491 | @item x86_64-linux | ||
| 492 | Intel/AMD-@code{x86_64}-Architektur, Linux-Libre als Kernel, | ||
| 493 | |||
| 494 | @item i686-linux | ||
| 495 | Intel-32-Bit-Architektur (IA-32), Linux-Libre als Kernel, | ||
| 496 | |||
| 497 | @item armhf-linux | ||
| 498 | ARMv7-A-Architektur mit »hard float«, Thumb-2 und NEON, für die EABI | ||
| 499 | »hard-float application binary interface«, mit Linux-Libre als Kernel. | ||
| 500 | |||
| 501 | @item aarch64-linux | ||
| 502 | 64-Bit-ARMv8-A-Prozessoren, little-endian, Linux-Libre als Kernel. Derzeit | ||
| 503 | ist dies noch in der Erprobungsphase mit begrenzter Unterstützung. Unter | ||
| 504 | @ref{Mitwirken} steht, wie Sie dabei helfen können! | ||
| 505 | |||
| 506 | @item mips64el-linux | ||
| 507 | 64-Bit-MIPS-Prozessoren, little-endian, insbesondere die Loongson-Reihe, | ||
| 508 | n32-ABI, mit Linux-Libre als Kernel. | ||
| 509 | |||
| 510 | @end table | ||
| 511 | |||
| 512 | Mit Guix@tie{}System @emph{deklarieren} Sie alle Aspekte der | ||
| 513 | Betriebssystemkonfiguration und Guix kümmert sich darum, die Konfiguration | ||
| 514 | auf transaktionsbasierte, reproduzierbare und zustandslose Weise zu | ||
| 515 | instanziieren (siehe @ref{Systemkonfiguration}). Guix System benutzt den | ||
| 516 | Kernel Linux-libre, das Shepherd-Initialisierungssystem (siehe | ||
| 517 | @ref{Einführung,,, shepherd, The GNU Shepherd Manual}), die wohlbekannten | ||
| 518 | GNU-Werkzeuge mit der zugehörigen Werkzeugkette sowie die grafische Umgebung | ||
| 519 | und Systemdienste Ihrer Wahl. | ||
| 520 | |||
| 521 | Guix System ist auf allen oben genannten Plattformen außer | ||
| 522 | @code{mips64el-linux} verfügbar. | ||
| 523 | |||
| 524 | @noindent | ||
| 525 | Informationen, wie auf andere Architekturen oder Kernels portiert werden | ||
| 526 | kann, finden Sie im Abschnitt @ref{Portierung}. | ||
| 527 | |||
| 528 | Diese Distribution aufzubauen basiert auf Kooperation, und Sie sind herzlich | ||
| 529 | eingeladen, dabei mitzumachen! Im Abschnitt @ref{Mitwirken} stehen | ||
| 530 | weitere Informationen, wie Sie uns helfen können. | ||
| 531 | |||
| 532 | |||
| 533 | @c ********************************************************************* | ||
| 534 | @node Installation | ||
| 535 | @chapter Installation | ||
| 536 | |||
| 537 | @cindex Guix installieren | ||
| 538 | |||
| 539 | @quotation Anmerkung | ||
| 540 | Wir empfehlen, dieses | ||
| 541 | @uref{https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh, | ||
| 542 | Shell-basierte Installationsskript} zu benutzen, um Guix auf ein bestehendes | ||
| 543 | GNU/Linux-System zu installieren — im Folgenden als @dfn{Fremddistribution} | ||
| 544 | bezeichnet.@footnote{Dieser Abschnitt bezieht sich auf die Installation des | ||
| 545 | Paketverwaltungswerkzeugs, das auf ein bestehendes GNU/Linux-System | ||
| 546 | aufsetzend installiert werden kann. Wenn Sie stattdessen das vollständige | ||
| 547 | GNU-Betriebssystem installieren möchten, lesen Sie @ref{Systeminstallation}.} Das Skript automatisiert das Herunterladen, das Installieren | ||
| 548 | und die anfängliche Konfiguration von Guix. Es sollte als der | ||
| 549 | Administratornutzer »root« ausgeführt werden. | ||
| 550 | @end quotation | ||
| 551 | |||
| 552 | @cindex Fremddistribution | ||
| 553 | @cindex Verzeichnisse auf einer Fremddistribution | ||
| 554 | Wenn es auf einer Fremddistribution installiert wird, ergänzt GNU@tie{}Guix | ||
| 555 | die verfügbaren Werkzeuge, ohne dass sie sich gegenseitig stören. Guix’ | ||
| 556 | Daten befinden sich ausschließlich in zwei Verzeichnissen, üblicherweise | ||
| 557 | @file{/gnu/store} und @file{/var/guix}; andere Dateien auf Ihrem System wie | ||
| 558 | @file{/etc} bleiben unberührt. | ||
| 559 | |||
| 560 | Sobald es installiert ist, kann Guix durch Ausführen von @command{guix pull} | ||
| 561 | aktualisiert werden (siehe @ref{Aufruf von guix pull}). | ||
| 562 | |||
| 563 | Sollten Sie es vorziehen, die Installationsschritte manuell durchzuführen, | ||
| 564 | oder falls Sie Anpassungen daran vornehmen möchten, könnten sich die | ||
| 565 | folgenden Unterabschnitte als nützlich erweisen. Diese beschreiben die | ||
| 566 | Software-Voraussetzungen von Guix und wie man es manuell installiert, so | ||
| 567 | dass man es benutzen kann. | ||
| 568 | |||
| 569 | @menu | ||
| 570 | * Aus Binärdatei installieren:: Guix installieren, ohne Zeit zu verlieren! | ||
| 571 | * Voraussetzungen:: Zum Erstellen und Benutzen von Guix nötige | ||
| 572 | Software. | ||
| 573 | * Den Testkatalog laufen lassen:: Guix testen. | ||
| 574 | * Den Daemon einrichten:: Wie man die Umgebung des Erstellungs-Daemons | ||
| 575 | einrichtet. | ||
| 576 | * Aufruf des guix-daemon:: Den Erstellungs-Daemon laufen lassen. | ||
| 577 | * Anwendungen einrichten:: Anwendungsspezifische Einstellungen. | ||
| 578 | @end menu | ||
| 579 | |||
| 580 | @node Aus Binärdatei installieren | ||
| 581 | @section Aus Binärdatei installieren | ||
| 582 | |||
| 583 | @cindex Guix aus Binärdateien installieren | ||
| 584 | @cindex Installations-Skript | ||
| 585 | Dieser Abschnitt beschreibt, wie sich Guix auf einem beliebigen System aus | ||
| 586 | einem alle Komponenten umfassenden Tarball installieren lässt, der | ||
| 587 | Binärdateien für Guix und all seine Abhängigkeiten liefert. Dies geht in der | ||
| 588 | Regel schneller, als Guix aus seinen Quelldateien zu installieren, was in | ||
| 589 | den nächsten Abschnitten beschrieben wird. Vorausgesetzt wird hier | ||
| 590 | lediglich, dass GNU@tie{}tar und Xz verfügbar sind. | ||
| 591 | |||
| 592 | Die Installation läuft so ab: | ||
| 593 | |||
| 594 | @enumerate | ||
| 595 | @item | ||
| 596 | @cindex Guix-Binärdatei herunterladen | ||
| 597 | Laden Sie den binären Tarball von | ||
| 598 | @indicateurl{https://alpha.gnu.org/gnu/guix/guix-binary-@value{VERSION}.@var{System}.tar.xz} | ||
| 599 | herunter, wobei @var{System} für @code{x86_64-linux} steht, falls Sie es auf | ||
| 600 | einer Maschine mit @code{x86_64}-Architektur einrichten, auf der bereits der | ||
| 601 | Linux-Kernel läuft, oder entsprechend für andere Maschinen. | ||
| 602 | |||
| 603 | @c The following is somewhat duplicated in ``System Installation''. | ||
| 604 | Achten Sie darauf, auch die zugehörige @file{.sig}-Datei herunterzuladen und | ||
| 605 | verifizieren Sie damit die Authentizität des Tarballs, ungefähr so: | ||
| 606 | |||
| 607 | @example | ||
| 608 | $ wget https://alpha.gnu.org/gnu/guix/guix-binary-@value{VERSION}.@var{System}.tar.xz.sig | ||
| 609 | $ gpg --verify guix-binary-@value{VERSION}.@var{System}.tar.xz.sig | ||
| 610 | @end example | ||
| 611 | |||
| 612 | Falls dieser Befehl fehlschlägt, weil Sie nicht über den nötigen | ||
| 613 | öffentlichen Schlüssel verfügen, können Sie ihn mit diesem Befehl | ||
| 614 | importieren: | ||
| 615 | |||
| 616 | @example | ||
| 617 | $ gpg --keyserver @value{KEY-SERVER} \ | ||
| 618 | --recv-keys @value{OPENPGP-SIGNING-KEY-ID} | ||
| 619 | @end example | ||
| 620 | |||
| 621 | @noindent | ||
| 622 | @c end authentication part | ||
| 623 | und den Befehl @code{gpg --verify} erneut ausführen. | ||
| 624 | |||
| 625 | @item | ||
| 626 | Nun müssen Sie zum Administratornutzer @code{root} wechseln. Abhängig von | ||
| 627 | Ihrer Distribution müssen Sie dazu etwa @code{su -} oder @code{sudo -i} | ||
| 628 | ausführen. Danach führen Sie als @code{root}-Nutzer aus: | ||
| 629 | |||
| 630 | @example | ||
| 631 | # cd /tmp | ||
| 632 | # tar --warning=no-timestamp -xf \ | ||
| 633 | guix-binary-@value{VERSION}.@var{System}.tar.xz | ||
| 634 | # mv var/guix /var/ && mv gnu / | ||
| 635 | @end example | ||
| 636 | |||
| 637 | Dadurch wird @file{/gnu/store} (siehe @ref{Der Store}) und @file{/var/guix} | ||
| 638 | erzeugt. Letzteres enthält ein fertiges Guix-Profil für den | ||
| 639 | Administratornutzer @code{root} (wie im nächsten Schritt beschrieben). | ||
| 640 | |||
| 641 | Entpacken Sie den Tarball @emph{nicht} auf einem schon funktionierenden | ||
| 642 | Guix-System, denn es würde seine eigenen essenziellen Dateien überschreiben. | ||
| 643 | |||
| 644 | Die Befehlszeilenoption @code{--warning=no-timestamp} stellt sicher, dass | ||
| 645 | GNU@tie{}tar nicht vor »unplausibel alten Zeitstempeln« warnt (solche | ||
| 646 | Warnungen traten bei GNU@tie{}tar 1.26 und älter auf, neue Versionen machen | ||
| 647 | keine Probleme). Sie treten auf, weil alle Dateien im Archiv als | ||
| 648 | Änderungszeitpunkt null eingetragen bekommen haben (das bezeichnet den | ||
| 649 | 1. Januar 1970). Das ist Absicht, damit der Inhalt des Archivs nicht davon | ||
| 650 | abhängt, wann es erstellt wurde, und es somit reproduzierbar wird. | ||
| 651 | |||
| 652 | @item | ||
| 653 | Machen Sie das Profil als @file{~root/.config/guix/current} verfügbar, wo | ||
| 654 | @command{guix pull} es aktualisieren kann (siehe @ref{Aufruf von guix pull}): | ||
| 655 | |||
| 656 | @example | ||
| 657 | # mkdir -p ~root/.config/guix | ||
| 658 | # ln -sf /var/guix/profiles/per-user/root/current-guix \ | ||
| 659 | ~root/.config/guix/current | ||
| 660 | @end example | ||
| 661 | |||
| 662 | »Sourcen« Sie @file{etc/profile}, um @code{PATH} und andere relevante | ||
| 663 | Umgebungsvariable zu ergänzen: | ||
| 664 | |||
| 665 | @example | ||
| 666 | # GUIX_PROFILE="`echo ~root`/.config/guix/current" ; \ | ||
| 667 | source $GUIX_PROFILE/etc/profile | ||
| 668 | @end example | ||
| 669 | |||
| 670 | @item | ||
| 671 | Erzeugen Sie Nutzergruppe und Nutzerkonten für die Erstellungs-Benutzer wie | ||
| 672 | folgt (siehe @ref{Einrichten der Erstellungsumgebung}). | ||
| 673 | |||
| 674 | @item | ||
| 675 | Führen Sie den Daemon aus, und lassen Sie ihn automatisch bei jedem | ||
| 676 | Hochfahren starten. | ||
| 677 | |||
| 678 | Wenn Ihre Wirts-Distribution systemd als »init«-System verwendet, können Sie | ||
| 679 | das mit folgenden Befehlen veranlassen: | ||
| 680 | |||
| 681 | @c Versions of systemd that supported symlinked service files are not | ||
| 682 | @c yet widely deployed, so we should suggest that users copy the service | ||
| 683 | @c files into place. | ||
| 684 | @c | ||
| 685 | @c See this thread for more information: | ||
| 686 | @c http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01199.html | ||
| 687 | |||
| 688 | @example | ||
| 689 | # cp ~root/.config/guix/current/lib/systemd/system/guix-daemon.service \ | ||
| 690 | /etc/systemd/system/ | ||
| 691 | # systemctl start guix-daemon && systemctl enable guix-daemon | ||
| 692 | @end example | ||
| 693 | |||
| 694 | Wenn Ihre Wirts-Distribution als »init«-System Upstart verwendet: | ||
| 695 | |||
| 696 | @example | ||
| 697 | # initctl reload-configuration | ||
| 698 | # cp ~root/.config/guix/current/lib/upstart/system/guix-daemon.conf \ | ||
| 699 | /etc/init/ | ||
| 700 | # start guix-daemon | ||
| 701 | @end example | ||
| 702 | |||
| 703 | Andernfalls können Sie den Daemon immer noch manuell starten, mit: | ||
| 704 | |||
| 705 | @example | ||
| 706 | # ~root/.config/guix/current/bin/guix-daemon \ | ||
| 707 | --build-users-group=guixbuild | ||
| 708 | @end example | ||
| 709 | |||
| 710 | @item | ||
| 711 | Stellen Sie den @command{guix}-Befehl auch anderen Nutzern Ihrer Maschine | ||
| 712 | zur Verfügung, zum Beispiel so: | ||
| 713 | |||
| 714 | @example | ||
| 715 | # mkdir -p /usr/local/bin | ||
| 716 | # cd /usr/local/bin | ||
| 717 | # ln -s /var/guix/profiles/per-user/root/current-guix/bin/guix | ||
| 718 | @end example | ||
| 719 | |||
| 720 | Es ist auch eine gute Idee, die Info-Version dieses Handbuchs ebenso | ||
| 721 | verfügbar zu machen: | ||
| 722 | |||
| 723 | @example | ||
| 724 | # mkdir -p /usr/local/share/info | ||
| 725 | # cd /usr/local/share/info | ||
| 726 | # for i in /var/guix/profiles/per-user/root/current-guix/share/info/* ; | ||
| 727 | do ln -s $i ; done | ||
| 728 | @end example | ||
| 729 | |||
| 730 | Auf diese Art wird, unter der Annahme, dass bei Ihnen | ||
| 731 | @file{/usr/local/share/info} im Suchpfad eingetragen ist, das Ausführen von | ||
| 732 | @command{info guix.de} dieses Handbuch öffnen (siehe @ref{Other Info | ||
| 733 | Directories,,, texinfo, GNU Texinfo} hat weitere Details, wie Sie den | ||
| 734 | Info-Suchpfad ändern können). | ||
| 735 | |||
| 736 | @item | ||
| 737 | @cindex Substitute, deren Autorisierung | ||
| 738 | Um Substitute von @code{@value{SUBSTITUTE-SERVER}} oder einem Spiegelserver | ||
| 739 | davon zu benutzen (siehe @ref{Substitute}), müssen sie erst autorisiert | ||
| 740 | werden: | ||
| 741 | |||
| 742 | @example | ||
| 743 | # guix archive --authorize < \ | ||
| 744 | ~root/.config/guix/current/share/guix/@value{SUBSTITUTE-SERVER}.pub | ||
| 745 | @end example | ||
| 746 | |||
| 747 | @item | ||
| 748 | Alle Nutzer müssen womöglich ein paar zusätzliche Schritte ausführen, damit | ||
| 749 | ihre Guix-Umgebung genutzt werden kann, siehe @ref{Anwendungen einrichten}. | ||
| 750 | @end enumerate | ||
| 751 | |||
| 752 | Voilà, die Installation ist fertig! | ||
| 753 | |||
| 754 | Sie können nachprüfen, dass Guix funktioniert, indem Sie ein Beispielpaket | ||
| 755 | in das root-Profil installieren: | ||
| 756 | |||
| 757 | @example | ||
| 758 | # guix package -i hello | ||
| 759 | @end example | ||
| 760 | |||
| 761 | Das @code{guix}-Paket muss im Profil von @code{root} installiert bleiben, | ||
| 762 | damit es nicht vom Müllsammler geholt wird, denn ohne den | ||
| 763 | @command{guix}-Befehl wären Sie lahmgelegt. Anders gesagt, entfernen Sie | ||
| 764 | @code{guix} @emph{nicht} mit @code{guix package -r guix}. | ||
| 765 | |||
| 766 | Der Tarball zur Installation aus einer Binärdatei kann einfach durch | ||
| 767 | Ausführung des folgenden Befehls im Guix-Quellbaum (re-)produziert und | ||
| 768 | verifiziert werden: | ||
| 769 | |||
| 770 | @example | ||
| 771 | make guix-binary.@var{System}.tar.xz | ||
| 772 | @end example | ||
| 773 | |||
| 774 | @noindent | ||
| 775 | …@: was wiederum dies ausführt: | ||
| 776 | |||
| 777 | @example | ||
| 778 | guix pack -s @var{System} --localstatedir \ | ||
| 779 | --profile-name=current-guix guix | ||
| 780 | @end example | ||
| 781 | |||
| 782 | Siehe @ref{Aufruf von guix pack} für weitere Informationen zu diesem | ||
| 783 | praktischen Werkzeug. | ||
| 784 | |||
| 785 | @node Voraussetzungen | ||
| 786 | @section Voraussetzungen | ||
| 787 | |||
| 788 | Dieser Abschnitt listet Voraussetzungen auf, um Guix aus seinem Quellcode zu | ||
| 789 | erstellen. Der Erstellungsprozess für Guix ist derselbe wie für andere | ||
| 790 | GNU-Software und wird hier nicht beschrieben. Bitte lesen Sie die Dateien | ||
| 791 | @file{README} und @file{INSTALL} im Guix-Quellbaum, um weitere Details zu | ||
| 792 | erfahren. | ||
| 793 | |||
| 794 | @cindex Offizielle Webpräsenz | ||
| 795 | GNU Guix kann von seiner Webpräsenz unter | ||
| 796 | @url{http://www.gnu.org/software/guix/} heruntergeladen werden. | ||
| 797 | |||
| 798 | GNU Guix hat folgende Pakete als Abhängigkeiten: | ||
| 799 | |||
| 800 | @itemize | ||
| 801 | @item @url{http://gnu.org/software/guile/, GNU Guile}, Version 2.2.x, | ||
| 802 | @item @url{https://notabug.org/cwebber/guile-gcrypt, Guile-Gcrypt}, Version | ||
| 803 | 0.1.0 oder neuer, | ||
| 804 | @item | ||
| 805 | @uref{http://gnutls.org/, GnuTLS}, im Speziellen dessen Anbindungen für | ||
| 806 | Guile (siehe @ref{Guile Preparations, how to install the GnuTLS bindings for | ||
| 807 | Guile,, gnutls-guile, GnuTLS-Guile}), | ||
| 808 | @item | ||
| 809 | @uref{https://notabug.org/guile-sqlite3/guile-sqlite3, Guile-SQLite3}, | ||
| 810 | Version 0.1.0 oder neuer, | ||
| 811 | @item | ||
| 812 | @c FIXME: Specify a version number once a release has been made. | ||
| 813 | @uref{https://gitlab.com/guile-git/guile-git, Guile-Git}, vom August 2017 | ||
| 814 | oder neuer, | ||
| 815 | @item @uref{https://savannah.nongnu.org/projects/guile-json/, Guile-JSON}, | ||
| 816 | @item @url{http://zlib.net, zlib}, | ||
| 817 | @item @url{http://www.gnu.org/software/make/, GNU Make}. | ||
| 818 | @end itemize | ||
| 819 | |||
| 820 | Folgende Abhängigkeiten sind optional: | ||
| 821 | |||
| 822 | @itemize | ||
| 823 | @item | ||
| 824 | @c Note: We need at least 0.10.2 for 'channel-send-eof'. | ||
| 825 | Unterstützung für das Auslagern von Erstellungen (siehe @ref{Auslagern des Daemons einrichten}) und @command{guix copy} (siehe @ref{Aufruf von guix copy}) hängt von | ||
| 826 | @uref{https://github.com/artyom-poptsov/guile-ssh, Guile-SSH}, Version | ||
| 827 | 0.10.2 oder neuer, ab. | ||
| 828 | |||
| 829 | @item | ||
| 830 | Wenn @url{http://www.bzip.org, libbz2} verfügbar ist, kann | ||
| 831 | @command{guix-daemon} damit Erstellungsprotokolle komprimieren. | ||
| 832 | @end itemize | ||
| 833 | |||
| 834 | Sofern nicht @code{--disable-daemon} beim Aufruf von @command{configure} | ||
| 835 | übergeben wurde, benötigen Sie auch folgende Pakete: | ||
| 836 | |||
| 837 | @itemize | ||
| 838 | @item @url{http://gnupg.org/, GNU libgcrypt}, | ||
| 839 | @item @url{http://sqlite.org, SQLite 3}, | ||
| 840 | @item @url{http://gcc.gnu.org, GCC's g++} mit Unterstützung für den | ||
| 841 | C++11-Standard. | ||
| 842 | @end itemize | ||
| 843 | |||
| 844 | @cindex Zustandsverzeichnis | ||
| 845 | Sollten Sie Guix auf einem System konfigurieren, auf dem Guix bereits | ||
| 846 | installiert ist, dann stellen Sie sicher, dasselbe Zustandsverzeichnis wie | ||
| 847 | für die bestehende Installation zu verwenden. Benutzen Sie dazu die | ||
| 848 | Befehlszeilenoption @code{--localstatedir} des @command{configure}-Skripts | ||
| 849 | (siehe @ref{Directory Variables, @code{localstatedir},, standards, GNU | ||
| 850 | Coding Standards}). Das @command{configure}-Skript schützt vor ungewollter | ||
| 851 | Fehlkonfiguration der @var{localstatedir}, damit sie nicht versehentlich | ||
| 852 | Ihren Store verfälschen (siehe @ref{Der Store}). | ||
| 853 | |||
| 854 | @cindex Nix, Kompatibilität | ||
| 855 | Wenn eine funktionierende Installation of @url{http://nixos.org/nix/, the | ||
| 856 | Nix package manager} verfügbar ist, können Sie Guix stattdessen mit | ||
| 857 | @code{--disable-daemon} konfigurieren. In diesem Fall ersetzt Nix die drei | ||
| 858 | oben genannten Abhängigkeiten. | ||
| 859 | |||
| 860 | Guix ist mit Nix kompatibel, daher ist es möglich, denselben Store für beide | ||
| 861 | zu verwenden. Dazu müssen Sie an @command{configure} nicht nur denselben | ||
| 862 | Wert für @code{--with-store-dir} übergeben, sondern auch denselben Wert für | ||
| 863 | @code{--localstatedir}. Letzterer ist deswegen essenziell, weil er unter | ||
| 864 | anderem angibt, wo die Datenbank liegt, in der sich die Metainformationen | ||
| 865 | über den Store befinden. Für Nix sind die Werte standardmäßig | ||
| 866 | @code{--with-store-dir=/nix/store} und | ||
| 867 | @code{--localstatedir=/nix/var}. Beachten Sie, dass @code{--disable-daemon} | ||
| 868 | nicht erforderlich ist, wenn Sie die Absicht haben, den Store mit Nix zu | ||
| 869 | teilen. | ||
| 870 | |||
| 871 | @node Den Testkatalog laufen lassen | ||
| 872 | @section Den Testkatalog laufen lassen | ||
| 873 | |||
| 874 | @cindex Testkatalog | ||
| 875 | Nachdem @command{configure} und @code{make} erfolgreich durchgelaufen sind, | ||
| 876 | ist es ratsam, den Testkatalog auszuführen. Er kann dabei helfen, Probleme | ||
| 877 | mit der Einrichtung oder Systemumgebung zu finden, oder auch Probleme in | ||
| 878 | Guix selbst — und Testfehler zu melden ist eine wirklich gute Art und Weise, | ||
| 879 | bei der Verbesserung von Guix mitzuhelfen. Um den Testkatalog auszuführen, | ||
| 880 | geben Sie Folgendes ein: | ||
| 881 | |||
| 882 | @example | ||
| 883 | make check | ||
| 884 | @end example | ||
| 885 | |||
| 886 | Testfälle können parallel ausgeführt werden. Sie können die | ||
| 887 | Befehlszeiltenoption @code{-j} von GNU@tie{}make benutzen, damit es | ||
| 888 | schneller geht. Der erste Durchlauf kann auf neuen Maschinen ein paar | ||
| 889 | Minuten dauern, nachfolgende Ausführungen werden schneller sein, weil der | ||
| 890 | für die Tests erstellte Store schon einige Dinge zwischengespeichert haben | ||
| 891 | wird. | ||
| 892 | |||
| 893 | Es ist auch möglich, eine Teilmenge der Tests laufen zu lassen, indem Sie | ||
| 894 | die @code{TESTS}-Variable des Makefiles ähnlich wie in diesem Beispiel | ||
| 895 | definieren: | ||
| 896 | |||
| 897 | @example | ||
| 898 | make check TESTS="tests/store.scm tests/cpio.scm" | ||
| 899 | @end example | ||
| 900 | |||
| 901 | Standardmäßig werden Testergebnisse pro Datei angezeigt. Um die Details | ||
| 902 | jedes einzelnen Testfalls zu sehen, können Sie wie in diesem Beispiel die | ||
| 903 | @code{SCM_LOG_DRIVER_FLAGS}-Variable des Makefiles definieren: | ||
| 904 | |||
| 905 | @example | ||
| 906 | make check TESTS="tests/base64.scm" SCM_LOG_DRIVER_FLAGS="--brief=no" | ||
| 907 | @end example | ||
| 908 | |||
| 909 | Kommt es zum Fehlschlag, senden Sie bitte eine E-Mail an | ||
| 910 | @email{bug-guix@@gnu.org} und fügen Sie die Datei @file{test-suite.log} als | ||
| 911 | Anhang bei. Bitte geben Sie dabei in Ihrer Nachricht die benutzte Version | ||
| 912 | von Guix an sowie die Versionsnummern der Abhängigkeiten (siehe | ||
| 913 | @ref{Voraussetzungen}). | ||
| 914 | |||
| 915 | Guix wird auch mit einem Testkatalog für das ganze System ausgeliefert, der | ||
| 916 | vollständige Instanzen des »Guix System«-Betriebssystems testet. Er kann nur | ||
| 917 | auf Systemen benutzt werden, auf denen Guix bereits installiert ist, mit | ||
| 918 | folgendem Befehl: | ||
| 919 | |||
| 920 | @example | ||
| 921 | make check-system | ||
| 922 | @end example | ||
| 923 | |||
| 924 | @noindent | ||
| 925 | Oder, auch hier, indem Sie @code{TESTS} definieren, um eine Teilmenge der | ||
| 926 | auszuführenden Tests anzugeben: | ||
| 927 | |||
| 928 | @example | ||
| 929 | make check-system TESTS="basic mcron" | ||
| 930 | @end example | ||
| 931 | |||
| 932 | Diese Systemtests sind in den @code{(gnu tests @dots{})}-Modulen | ||
| 933 | definiert. Sie funktionieren, indem Sie das getestete Betriebssystem mitsamt | ||
| 934 | schlichter Instrumentierung in einer virtuellen Maschine (VM) ausführen. Die | ||
| 935 | Tests können aufwendige Berechnungen durchführen oder sie günstig umgehen, | ||
| 936 | je nachdem, ob für ihre Abhängigkeiten Substitute zur Verfügung stehen | ||
| 937 | (siehe @ref{Substitute}). Manche von ihnen nehmen viel Speicherplatz in | ||
| 938 | Anspruch, um die VM-Abbilder zu speichern. | ||
| 939 | |||
| 940 | Auch hier gilt: Falls Testfehler auftreten, senden Sie bitte alle Details an | ||
| 941 | @email{bug-guix@@gnu.org}. | ||
| 942 | |||
| 943 | @node Den Daemon einrichten | ||
| 944 | @section Den Daemon einrichten | ||
| 945 | |||
| 946 | @cindex Daemon | ||
| 947 | Operationen wie das Erstellen eines Pakets oder Laufenlassen des | ||
| 948 | Müllsammlers werden alle durch einen spezialisierten Prozess durchgeführt, | ||
| 949 | den @dfn{Erstellungs-Daemon}, im Auftrag seiner Kunden (den Clients). Nur | ||
| 950 | der Daemon darf auf den Store und seine zugehörige Datenbank | ||
| 951 | zugreifen. Daher wird jede den Store verändernde Operation durch den Daemon | ||
| 952 | durchgeführt. Zum Beispiel kommunizieren Befehlszeilenwerkzeuge wie | ||
| 953 | @command{guix package} und @command{guix build} mit dem Daemon (mittels | ||
| 954 | entfernter Prozeduraufrufe), um ihm Anweisungen zu geben, was er tun soll. | ||
| 955 | |||
| 956 | Folgende Abschnitte beschreiben, wie Sie die Umgebung des | ||
| 957 | Erstellungs-Daemons ausstatten sollten. Siehe auch @ref{Substitute} für | ||
| 958 | Informationen darüber, wie Sie es dem Daemon ermöglichen, vorerstellte | ||
| 959 | Binärdateien herunterzuladen. | ||
| 960 | |||
| 961 | @menu | ||
| 962 | * Einrichten der Erstellungsumgebung:: Die isolierte Umgebung zum Erstellen | ||
| 963 | vorbereiten. | ||
| 964 | * Auslagern des Daemons einrichten:: Erstellungen auf entfernte Maschinen | ||
| 965 | auslagern. | ||
| 966 | * SELinux-Unterstützung:: Wie man eine SELinux-Richtlinie für den Daemon | ||
| 967 | einrichtet. | ||
| 968 | @end menu | ||
| 969 | |||
| 970 | @node Einrichten der Erstellungsumgebung | ||
| 971 | @subsection Einrichten der Erstellungsumgebung | ||
| 972 | |||
| 973 | @cindex Erstellungsumgebung | ||
| 974 | In einem normalen Mehrbenutzersystem werden Guix und sein Daemon — das | ||
| 975 | Programm @command{guix-daemon} — vom Systemadministrator installiert; | ||
| 976 | @file{/gnu/store} gehört @code{root} und @command{guix-daemon} läuft als | ||
| 977 | @code{root}. Nicht mit erweiterten Rechten ausgestattete Nutzer können | ||
| 978 | Guix-Werkzeuge benutzen, um Pakete zu erstellen oder anderweitig auf den | ||
| 979 | Store zuzugreifen, und der Daemon wird dies für sie erledigen und dabei | ||
| 980 | sicherstellen, dass der Store in einem konsistenten Zustand verbleibt und | ||
| 981 | sich die Nutzer erstellte Pakete teilen. | ||
| 982 | |||
| 983 | @cindex Erstellungsbenutzer | ||
| 984 | Wenn @command{guix-daemon} als Administratornutzer @code{root} läuft, wollen | ||
| 985 | Sie aber vielleicht dennoch nicht, dass Paketerstellungsprozesse auch als | ||
| 986 | @code{root} ablaufen, aus offensichtlichen Sicherheitsgründen. Um dies zu | ||
| 987 | vermeiden, sollte ein besonderer Pool aus @dfn{Erstellungsbenutzern} | ||
| 988 | geschaffen werden, damit vom Daemon gestartete Erstellungsprozesse ihn | ||
| 989 | benutzen. Diese Erstellungsbenutzer müssen weder eine Shell noch ein | ||
| 990 | Persönliches Verzeichnis zugewiesen bekommen, sie werden lediglich benutzt, | ||
| 991 | wenn der Daemon @code{root}-Rechte in Erstellungsprozessen ablegt. Mehrere | ||
| 992 | solche Benutzer zu haben, ermöglicht es dem Daemon, verschiedene | ||
| 993 | Erstellungsprozessen unter verschiedenen Benutzeridentifikatoren (UIDs) zu | ||
| 994 | starten, was garantiert, dass sie einander nicht stören — eine essenzielle | ||
| 995 | Funktionalität, da Erstellungen als reine Funktionen angesehen werden (siehe | ||
| 996 | @ref{Einführung}). | ||
| 997 | |||
| 998 | Auf einem GNU/Linux-System kann ein Pool von Erstellungsbenutzern wie folgt | ||
| 999 | erzeugt werden (mit Bash-Syntax und den Befehlen von @code{shadow}): | ||
| 1000 | |||
| 1001 | @c See http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00239.html | ||
| 1002 | @c for why `-G' is needed. | ||
| 1003 | @example | ||
| 1004 | # groupadd --system guixbuild | ||
| 1005 | # for i in `seq -w 1 10`; | ||
| 1006 | do | ||
| 1007 | useradd -g guixbuild -G guixbuild \ | ||
| 1008 | -d /var/empty -s `which nologin` \ | ||
| 1009 | -c "Guix-Erstellungsbenutzer $i" --system \ | ||
| 1010 | guixbuilder$i; | ||
| 1011 | done | ||
| 1012 | @end example | ||
| 1013 | |||
| 1014 | @noindent | ||
| 1015 | Die Anzahl der Erstellungsbenutzer entscheidet, wieviele Erstellungsaufträge | ||
| 1016 | parallel ausgeführt werden können, wie es mit der Befehlszeilenoption | ||
| 1017 | @option{--max-jobs} vorgegeben werden kann (siehe @ref{Aufruf des guix-daemon, | ||
| 1018 | @option{--max-jobs}}). Um @command{guix system vm} und ähnliche Befehle | ||
| 1019 | nutzen zu können, müssen Sie die Erstellungsbenutzer unter Umständen zur | ||
| 1020 | @code{kvm}-Benutzergruppe hinzufügen, damit sie Zugriff auf @file{/dev/kvm} | ||
| 1021 | haben, mit @code{-G guixbuild,kvm} statt @code{-G guixbuild} (siehe | ||
| 1022 | @ref{Aufruf von guix system}). | ||
| 1023 | |||
| 1024 | Das Programm @code{guix-daemon} kann mit dem folgenden Befehl als | ||
| 1025 | @code{root} gestartet werden@footnote{Wenn Ihre Maschine systemd als | ||
| 1026 | »init«-System verwendet, genügt es, die Datei | ||
| 1027 | @file{@var{prefix}/lib/systemd/system/guix-daemon.service} in | ||
| 1028 | @file{/etc/systemd/system} zu platzieren, damit @command{guix-daemon} | ||
| 1029 | automatisch gestartet wird. Ebenso können Sie, wenn Ihre Maschine Upstart | ||
| 1030 | als »init«-System benutzt, die Datei | ||
| 1031 | @file{@var{prefix}/lib/upstart/system/guix-daemon.conf} in @file{/etc/init} | ||
| 1032 | platzieren.}: | ||
| 1033 | |||
| 1034 | @example | ||
| 1035 | # guix-daemon --build-users-group=guixbuild | ||
| 1036 | @end example | ||
| 1037 | |||
| 1038 | @cindex chroot | ||
| 1039 | @noindent | ||
| 1040 | Auf diese Weise startet der Daemon Erstellungsprozesse in einem chroot als | ||
| 1041 | einer der @code{guixbuilder}-Benutzer. Auf GNU/Linux enthält die | ||
| 1042 | chroot-Umgebung standardmäßig nichts außer: | ||
| 1043 | |||
| 1044 | @c Keep this list in sync with libstore/build.cc! ----------------------- | ||
| 1045 | @itemize | ||
| 1046 | @item | ||
| 1047 | einem minimalen @code{/dev}-Verzeichnis, was größtenteils vom @code{/dev} | ||
| 1048 | des Wirtssystems unabhängig erstellt wurde@footnote{»Größtenteils«, denn | ||
| 1049 | obwohl die Menge an Dateien, die im @code{/dev} des chroots vorkommen, fest | ||
| 1050 | ist, können die meisten dieser Dateien nur dann erstellt werden, wenn das | ||
| 1051 | Wirtssystem sie auch hat.}, | ||
| 1052 | |||
| 1053 | @item | ||
| 1054 | dem @code{/proc}-Verzeichnis, es zeigt nur die Prozesse des Containers, weil | ||
| 1055 | ein separater Namensraum für Prozess-IDs (PIDs) benutzt wird, | ||
| 1056 | |||
| 1057 | @item | ||
| 1058 | @file{/etc/passwd} mit einem Eintrag für den aktuellen Benutzer und einem | ||
| 1059 | Eintrag für den Benutzer @file{nobody}, | ||
| 1060 | |||
| 1061 | @item | ||
| 1062 | @file{/etc/group} mit einem Eintrag für die Gruppe des Benutzers, | ||
| 1063 | |||
| 1064 | @item | ||
| 1065 | @file{/etc/hosts} mit einem Eintrag, der @code{localhost} auf | ||
| 1066 | @code{127.0.0.1} abbildet, | ||
| 1067 | |||
| 1068 | @item | ||
| 1069 | einem @file{/tmp}-Verzeichnis mit Schreibrechten. | ||
| 1070 | @end itemize | ||
| 1071 | |||
| 1072 | Sie können beeinflussen, in welchem Verzeichnis der Daemon Verzeichnisbäume | ||
| 1073 | zur Erstellung unterbringt, indem sie den Wert der Umgebungsvariablen | ||
| 1074 | @code{TMPDIR} ändern. Allerdings heißt innerhalb des chroots der | ||
| 1075 | Erstellungsbaum immer @file{/tmp/guix-build-@var{Name}.drv-0}, wobei | ||
| 1076 | @var{Name} der Ableitungsname ist — z.B.@: @code{coreutils-8.24}. Dadurch | ||
| 1077 | hat der Wert von @code{TMPDIR} keinen Einfluss auf die Erstellungsumgebung, | ||
| 1078 | wodurch Unterschiede vermieden werden, falls Erstellungsprozesse den Namen | ||
| 1079 | ihres Erstellungsbaumes einfangen. | ||
| 1080 | |||
| 1081 | @vindex http_proxy | ||
| 1082 | Der Daemon befolgt außerdem den Wert der Umgebungsvariablen | ||
| 1083 | @code{http_proxy} für von ihm durchgeführte HTTP-Downloads, sei es für | ||
| 1084 | Ableitungen mit fester Ausgabe (siehe @ref{Ableitungen}) oder für Substitute | ||
| 1085 | (siehe @ref{Substitute}). | ||
| 1086 | |||
| 1087 | Wenn Sie Guix als ein Benutzer ohne erweiterte Rechte installieren, ist es | ||
| 1088 | dennoch möglich, @command{guix-daemon} auszuführen, sofern Sie | ||
| 1089 | @code{--disable-chroot} übergeben. Allerdings können Erstellungsprozesse | ||
| 1090 | dann nicht voneinander und vom Rest des Systems isoliert werden. Daher | ||
| 1091 | können sich Erstellungsprozesse gegenseitig stören und auf Programme, | ||
| 1092 | Bibliotheken und andere Dateien zugreifen, die dem restlichen System zur | ||
| 1093 | Verfügung stehen — was es deutlich schwerer macht, sie als @emph{reine} | ||
| 1094 | Funktionen aufzufassen. | ||
| 1095 | |||
| 1096 | |||
| 1097 | @node Auslagern des Daemons einrichten | ||
| 1098 | @subsection Nutzung der Auslagerungsfunktionalität | ||
| 1099 | |||
| 1100 | @cindex auslagern | ||
| 1101 | @cindex Build-Hook | ||
| 1102 | Wenn erwünscht, kann der Erstellungs-Daemon Ableitungserstellungen auf | ||
| 1103 | andere Maschinen @dfn{auslagern}, auf denen Guix läuft, mit Hilfe des | ||
| 1104 | @code{offload}-@dfn{Build-Hooks}@footnote{Diese Funktionalität ist nur | ||
| 1105 | verfügbar, wenn @uref{https://github.com/artyom-poptsov/guile-ssh, | ||
| 1106 | Guile-SSH} vorhanden ist.}. Wenn diese Funktionalität aktiviert ist, wird | ||
| 1107 | eine nutzerspezifizierte Liste von Erstellungsmaschinen aus | ||
| 1108 | @file{/etc/guix/machines.scm} gelesen. Wann immer eine Erstellung angefragt | ||
| 1109 | wird, zum Beispiel durch @code{guix build}, versucht der Daemon, sie an eine | ||
| 1110 | der Erstellungsmaschinen auszulagern, die die Einschränkungen der Ableitung | ||
| 1111 | erfüllen, insbesondere ihren Systemtyp — z.B.@: | ||
| 1112 | @file{x86_64-linux}. Fehlende Voraussetzungen für die Erstellung werden über | ||
| 1113 | SSH auf die Zielmaschine kopiert, welche dann mit der Erstellung | ||
| 1114 | weitermacht. Hat sie Erfolg damit, so werden die Ausgabe oder Ausgaben der | ||
| 1115 | Erstellung zurück auf die ursprüngliche Maschine kopiert. | ||
| 1116 | |||
| 1117 | Die Datei @file{/etc/guix/machines.scm} sieht normalerweise so aus: | ||
| 1118 | |||
| 1119 | @example | ||
| 1120 | (list (build-machine | ||
| 1121 | (name "eightysix.example.org") | ||
| 1122 | (system "x86_64-linux") | ||
| 1123 | (host-key "ssh-ed25519 AAAAC3Nza@dots{}") | ||
| 1124 | (user "bob") | ||
| 1125 | (speed 2.)) ;unglaublich schnell! | ||
| 1126 | |||
| 1127 | (build-machine | ||
| 1128 | (name "meeps.example.org") | ||
| 1129 | (system "mips64el-linux") | ||
| 1130 | (host-key "ssh-rsa AAAAB3Nza@dots{}") | ||
| 1131 | (user "alice") | ||
| 1132 | (private-key | ||
| 1133 | (string-append (getenv "HOME") | ||
| 1134 | "/.ssh/identität-für-guix")))) | ||
| 1135 | @end example | ||
| 1136 | |||
| 1137 | @noindent | ||
| 1138 | Im obigen Beispiel geben wir eine Liste mit zwei Erstellungsmaschinen vor, | ||
| 1139 | eine für die @code{x86_64}-Architektur und eine für die | ||
| 1140 | @code{mips64el}-Architektur. | ||
| 1141 | |||
| 1142 | Tatsächlich ist diese Datei — wenig überraschend! — eine Scheme-Datei, die | ||
| 1143 | ausgewertet wird, wenn der @code{offload}-Hook gestartet wird. Der Wert, den | ||
| 1144 | sie zurückliefert, muss eine Liste von @code{build-machine}-Objekten | ||
| 1145 | sein. Obwohl dieses Beispiel eine feste Liste von Erstellungsmaschinen | ||
| 1146 | zeigt, könnte man auch auf die Idee kommen, etwa mit DNS-SD eine Liste | ||
| 1147 | möglicher im lokalen Netzwerk entdeckter Erstellungsmaschinen zu liefern | ||
| 1148 | (siehe @ref{Einführung, Guile-Avahi,, guile-avahi, Using Avahi in Guile | ||
| 1149 | Scheme Programs}). Der Datentyp @code{build-machine} wird im Folgenden | ||
| 1150 | weiter ausgeführt. | ||
| 1151 | |||
| 1152 | @deftp {Datentyp} build-machine | ||
| 1153 | Dieser Datentyp repräsentiert Erstellungsmaschinen, an die der Daemon | ||
| 1154 | Erstellungen auslagern darf. Die wichtigen Felder sind: | ||
| 1155 | |||
| 1156 | @table @code | ||
| 1157 | |||
| 1158 | @item name | ||
| 1159 | Der Hostname (d.h.@: der Rechnername) der entfernten Maschine. | ||
| 1160 | |||
| 1161 | @item system | ||
| 1162 | Der Systemtyp der entfernten Maschine — z.B.@: @code{"x86_64-linux"}. | ||
| 1163 | |||
| 1164 | @item user | ||
| 1165 | Das Benutzerkonto, mit dem eine Verbindung zur entfernten Maschine über SSH | ||
| 1166 | aufgebaut werden soll. Beachten Sie, dass das SSH-Schlüsselpaar @emph{nicht} | ||
| 1167 | durch eine Passphrase geschützt sein darf, damit nicht-interaktive | ||
| 1168 | Anmeldungen möglich sind. | ||
| 1169 | |||
| 1170 | @item host-key | ||
| 1171 | Dies muss der @dfn{öffentliche SSH-Host-Schlüssel} der Maschine im | ||
| 1172 | OpenSSH-Format sein. Er wird benutzt, um die Identität der Maschine zu | ||
| 1173 | prüfen, wenn wir uns mit ihr verbinden. Er ist eine lange Zeichenkette, die | ||
| 1174 | ungefähr so aussieht: | ||
| 1175 | |||
| 1176 | @example | ||
| 1177 | ssh-ed25519 AAAAC3NzaC@dots{}mde+UhL hint@@example.org | ||
| 1178 | @end example | ||
| 1179 | |||
| 1180 | Wenn auf der Maschine der OpenSSH-Daemon, @command{sshd}, läuft, ist der | ||
| 1181 | Host-Schlüssel in einer Datei wie @file{/etc/ssh/ssh_host_ed25519_key.pub} | ||
| 1182 | zu finden. | ||
| 1183 | |||
| 1184 | Wenn auf der Maschine der SSH-Daemon von GNU@tie{}lsh, nämlich | ||
| 1185 | @command{lshd}, läuft, befindet sich der Host-Schlüssel in | ||
| 1186 | @file{/etc/lsh/host-key.pub} oder einer ähnlichen Datei. Er kann ins | ||
| 1187 | OpenSSH-Format umgewandelt werden durch @command{lsh-export-key} (siehe | ||
| 1188 | @ref{Converting keys,,, lsh, LSH Manual}): | ||
| 1189 | |||
| 1190 | @example | ||
| 1191 | $ lsh-export-key --openssh < /etc/lsh/host-key.pub | ||
| 1192 | ssh-rsa AAAAB3NzaC1yc2EAAAAEOp8FoQAAAQEAs1eB46LV@dots{} | ||
| 1193 | @end example | ||
| 1194 | |||
| 1195 | @end table | ||
| 1196 | |||
| 1197 | Eine Reihe optionaler Felder kann festgelegt werden: | ||
| 1198 | |||
| 1199 | @table @asis | ||
| 1200 | |||
| 1201 | @item @code{port} (Vorgabe: @code{22}) | ||
| 1202 | Portnummer des SSH-Servers auf der Maschine. | ||
| 1203 | |||
| 1204 | @item @code{private-key} (Vorgabe: @file{~root/.ssh/id_rsa}) | ||
| 1205 | Die Datei mit dem privaten SSH-Schlüssel, der beim Verbinden zur Maschine | ||
| 1206 | genutzt werden soll, im OpenSSH-Format. Dieser Schlüssel darf nicht mit | ||
| 1207 | einer Passphrase geschützt sein. | ||
| 1208 | |||
| 1209 | Beachten Sie, dass als Vorgabewert der private Schlüssel @emph{des | ||
| 1210 | root-Benutzers} genommen wird. Vergewissern Sie sich, dass er existiert, | ||
| 1211 | wenn Sie die Standardeinstellung verwenden. | ||
| 1212 | |||
| 1213 | @item @code{compression} (Vorgabe: @code{"zlib@@openssh.com,zlib"}) | ||
| 1214 | @itemx @code{compression-level} (Vorgabe: @code{3}) | ||
| 1215 | Die Kompressionsmethoden auf SSH-Ebene und das angefragte | ||
| 1216 | Kompressionsniveau. | ||
| 1217 | |||
| 1218 | Beachten Sie, dass Auslagerungen SSH-Kompression benötigen, um beim | ||
| 1219 | Übertragen von Dateien an Erstellungsmaschinen und zurück weniger Bandbreite | ||
| 1220 | zu benutzen. | ||
| 1221 | |||
| 1222 | @item @code{daemon-socket} (Vorgabe: @code{"/var/guix/daemon-socket/socket"}) | ||
| 1223 | Dateiname des Unix-Sockets, auf dem @command{guix-daemon} auf der Maschine | ||
| 1224 | lauscht. | ||
| 1225 | |||
| 1226 | @item @code{parallel-builds} (Vorgabe: @code{1}) | ||
| 1227 | Die Anzahl der Erstellungen, die auf der Maschine parallel ausgeführt werden | ||
| 1228 | können. | ||
| 1229 | |||
| 1230 | @item @code{speed} (Vorgabe: @code{1.0}) | ||
| 1231 | Ein »relativer Geschwindigkeitsfaktor«. Der Auslagerungsplaner gibt | ||
| 1232 | tendenziell Maschinen mit höherem Geschwindigkeitsfaktor den Vorrang. | ||
| 1233 | |||
| 1234 | @item @code{features} (Vorgabe: @code{'()}) | ||
| 1235 | Eine Liste von Zeichenketten, die besondere von der Maschine unterstützte | ||
| 1236 | Funktionalitäten bezeichnen. Ein Beispiel ist @code{"kvm"} für Maschinen, | ||
| 1237 | die über die KVM-Linux-Module zusammen mit entsprechender | ||
| 1238 | Hardware-Unterstützung verfügen. Ableitungen können Funktionalitäten dem | ||
| 1239 | Namen nach anfragen und werden dann auf passenden Erstellungsmaschinen | ||
| 1240 | eingeplant. | ||
| 1241 | |||
| 1242 | @end table | ||
| 1243 | @end deftp | ||
| 1244 | |||
| 1245 | Der Befehl @code{guix} muss sich im Suchpfad der Erstellungsmaschinen | ||
| 1246 | befinden. Um dies nachzuprüfen, können Sie Folgendes ausführen: | ||
| 1247 | |||
| 1248 | @example | ||
| 1249 | ssh build-machine guix repl --version | ||
| 1250 | @end example | ||
| 1251 | |||
| 1252 | Es gibt noch eine weitere Sache zu tun, sobald @file{machines.scm} | ||
| 1253 | eingerichtet ist. Wie zuvor erklärt, werden beim Auslagern Dateien zwischen | ||
| 1254 | den Stores der Maschinen hin- und hergeschickt. Damit das funktioniert, | ||
| 1255 | müssen Sie als Erstes ein Schlüsselpaar auf jeder Maschine erzeugen, damit | ||
| 1256 | der Daemon signierte Archive mit den Dateien aus dem Store versenden kann | ||
| 1257 | (siehe @ref{Aufruf von guix archive}): | ||
| 1258 | |||
| 1259 | @example | ||
| 1260 | # guix archive --generate-key | ||
| 1261 | @end example | ||
| 1262 | |||
| 1263 | @noindent | ||
| 1264 | Jede Erstellungsmaschine muss den Schlüssel der Hauptmaschine autorisieren, | ||
| 1265 | damit diese Store-Objekte von der Hauptmaschine empfangen kann: | ||
| 1266 | |||
| 1267 | @example | ||
| 1268 | # guix archive --authorize < öffentlicher-schlüssel-hauptmaschine.txt | ||
| 1269 | @end example | ||
| 1270 | |||
| 1271 | @noindent | ||
| 1272 | Andersherum muss auch die Hauptmaschine den jeweiligen Schlüssel jeder | ||
| 1273 | Erstellungsmaschine autorisieren. | ||
| 1274 | |||
| 1275 | Der ganze Umstand mit den Schlüsseln soll ausdrücken, dass sich Haupt- und | ||
| 1276 | Erstellungsmaschinen paarweise gegenseitig vertrauen. Konkret kann der | ||
| 1277 | Erstellungs-Daemon auf der Hauptmaschine die Echtheit von den | ||
| 1278 | Erstellungsmaschinen empfangener Dateien gewährleisten (und umgekehrt), und | ||
| 1279 | auch dass sie nicht sabotiert wurden und mit einem autorisierten Schlüssel | ||
| 1280 | signiert wurden. | ||
| 1281 | |||
| 1282 | @cindex Auslagerung testen | ||
| 1283 | Um zu testen, ob Ihr System funktioniert, führen Sie diesen Befehl auf der | ||
| 1284 | Hauptmaschine aus: | ||
| 1285 | |||
| 1286 | @example | ||
| 1287 | # guix offload test | ||
| 1288 | @end example | ||
| 1289 | |||
| 1290 | Dadurch wird versucht, zu jeder Erstellungsmaschine eine Verbindung | ||
| 1291 | herzustellen, die in @file{/etc/guix/machines.scm} angegeben wurde, | ||
| 1292 | sichergestellt, dass auf jeder Guile und die Guix-Module nutzbar sind, und | ||
| 1293 | jeweils versucht, etwas auf die Erstellungsmaschine zu exportieren und von | ||
| 1294 | dort zu imporieren. Dabei auftretende Fehler werden gemeldet. | ||
| 1295 | |||
| 1296 | Wenn Sie stattdessen eine andere Maschinendatei verwenden möchten, geben Sie | ||
| 1297 | diese einfach auf der Befehlszeile an: | ||
| 1298 | |||
| 1299 | @example | ||
| 1300 | # guix offload test maschinen-qualif.scm | ||
| 1301 | @end example | ||
| 1302 | |||
| 1303 | Letztendlich können Sie hiermit nur die Teilmenge der Maschinen testen, | ||
| 1304 | deren Name zu einem regulären Ausdruck passt: | ||
| 1305 | |||
| 1306 | @example | ||
| 1307 | # guix offload test maschinen.scm '\.gnu\.org$' | ||
| 1308 | @end example | ||
| 1309 | |||
| 1310 | @cindex Auslagerungs-Lagebericht | ||
| 1311 | Um die momentane Auslastung aller Erstellungs-Hosts anzuzeigen, führen Sie | ||
| 1312 | diesen Befehl auf dem Hauptknoten aus: | ||
| 1313 | |||
| 1314 | @example | ||
| 1315 | # guix offload status | ||
| 1316 | @end example | ||
| 1317 | |||
| 1318 | |||
| 1319 | @node SELinux-Unterstützung | ||
| 1320 | @subsection SELinux-Unterstützung | ||
| 1321 | |||
| 1322 | @cindex SELinux, Policy für den Daemon | ||
| 1323 | @cindex Mandatory Access Control, SELinux | ||
| 1324 | @cindex Sicherheit, des guix-daemon | ||
| 1325 | Guix enthält eine SELinux-Richtliniendatei (»Policy«) unter | ||
| 1326 | @file{etc/guix-daemon.cil}, die auf einem System installiert werden kann, | ||
| 1327 | auf dem SELinux aktiviert ist, damit Guix-Dateien gekennzeichnet sind und um | ||
| 1328 | das erwartete Verhalten des Daemons anzugeben. Da Guix System keine | ||
| 1329 | Grundrichtlinie (»Base Policy«) für SELinux bietet, kann diese Richtlinie | ||
| 1330 | für den Daemon auf Guix System nicht benutzt werden. | ||
| 1331 | |||
| 1332 | @subsubsection Installieren der SELinux-Policy | ||
| 1333 | @cindex SELinux, Policy installieren | ||
| 1334 | Um die Richtlinie (Policy) zu installieren, führen Sie folgenden Befehl mit | ||
| 1335 | Administratorrechten aus: | ||
| 1336 | |||
| 1337 | @example | ||
| 1338 | semodule -i etc/guix-daemon.cil | ||
| 1339 | @end example | ||
| 1340 | |||
| 1341 | Kennzeichnen Sie dann das Dateisystem neu mit @code{restorecon} oder einem | ||
| 1342 | anderen, von Ihrem System angebotenen Mechanismus. | ||
| 1343 | |||
| 1344 | Sobald die Richtlinie installiert ist, das Dateisystem neu gekennzeichnet | ||
| 1345 | wurde und der Daemon neugestartet wurde, sollte er im Kontext | ||
| 1346 | @code{guix_daemon_t} laufen. Sie können dies mit dem folgenden Befehl | ||
| 1347 | nachprüfen: | ||
| 1348 | |||
| 1349 | @example | ||
| 1350 | ps -Zax | grep guix-daemon | ||
| 1351 | @end example | ||
| 1352 | |||
| 1353 | Beobachten Sie die Protokolldateien von SELinux, wenn Sie einen Befehl wie | ||
| 1354 | @code{guix build hello} ausführen, um sich zu überzeugen, dass SELinux alle | ||
| 1355 | notwendigen Operationen gestattet. | ||
| 1356 | |||
| 1357 | @subsubsection Einschränkungen | ||
| 1358 | @cindex SELinux, Einschränkungen | ||
| 1359 | |||
| 1360 | Diese Richtlinie ist nicht perfekt. Im Folgenden finden Sie eine Liste von | ||
| 1361 | Einschränkungen oder merkwürdigen Verhaltensweisen, die bedacht werden | ||
| 1362 | sollten, wenn man die mitgelieferte SELinux-Richtlinie für den Guix-Daemon | ||
| 1363 | einspielt. | ||
| 1364 | |||
| 1365 | @enumerate | ||
| 1366 | @item | ||
| 1367 | @code{guix_daemon_socket_t} wird nicht wirklich benutzt. Keine der | ||
| 1368 | Socket-Operationen benutzt Kontexte, die irgendetwas mit | ||
| 1369 | @code{guix_daemon_socket_t} zu tun haben. Es schadet nicht, diese ungenutzte | ||
| 1370 | Kennzeichnung zu haben, aber es wäre besser, für die Kennzeichnung auch | ||
| 1371 | Socket-Regeln festzulegen. | ||
| 1372 | |||
| 1373 | @item | ||
| 1374 | @code{guix gc} kann nicht auf beliebige Verknüpfungen zu Profilen | ||
| 1375 | zugreifen. Die Kennzeichnung des Ziels einer symbolischen Verknüpfung ist | ||
| 1376 | notwendigerweise unabhängig von der Dateikennzeichnung der | ||
| 1377 | Verknüpfung. Obwohl alle Profile unter $localstatedir gekennzeichnet sind, | ||
| 1378 | erben die Verknüpfungen auf diese Profile die Kennzeichnung desjenigen | ||
| 1379 | Verzeichnisses, in dem sie sich befinden. Für Verknüpfungen im Persönlichen | ||
| 1380 | Verzeichnis des Benutzers ist das @code{user_home_t}, aber Verknüpfungen aus | ||
| 1381 | dem Persönlichen Verzeichnis des Administratornutzers, oder @file{/tmp}, | ||
| 1382 | oder das Arbeitsverzeichnis des HTTP-Servers, etc., funktioniert das | ||
| 1383 | nicht. @code{guix gc} würde es nicht gestattet, diese Verknüpfungen | ||
| 1384 | auszulesen oder zu verfolgen. | ||
| 1385 | |||
| 1386 | @item | ||
| 1387 | Die vom Daemon gebotene Funktionalität, auf TCP-Verbindungen zu lauschen, | ||
| 1388 | könnte nicht mehr funktionieren. Dies könnte zusätzliche Regeln brauchen, | ||
| 1389 | weil SELinux Netzwerk-Sockets anders behandelt als Dateien. | ||
| 1390 | |||
| 1391 | @item | ||
| 1392 | Derzeit wird allen Dateien mit einem Namen, der zum regulären Ausdruck | ||
| 1393 | @code{/gnu/store/.+-(guix-.+|profile)/bin/guix-daemon} passt, die | ||
| 1394 | Kennzeichnung @code{guix_daemon_exec_t} zugewiesen, wodurch @emph{jede | ||
| 1395 | beliebige} Datei mit diesem Namen in irgendeinem Profil gestattet wäre, in | ||
| 1396 | der Domäne @code{guix_daemon_t} ausgeführt zu werden. Das ist nicht | ||
| 1397 | ideal. Ein Angreifer könnte ein Paket erstellen, dass solch eine ausführbare | ||
| 1398 | Datei enthält, und den Nutzer überzeugen, es zu installieren und | ||
| 1399 | auszuführen. Dadurch käme es in die Domäne @code{guix_daemon_t}. Ab diesem | ||
| 1400 | Punkt könnte SELinux nicht mehr verhindern, dass es auf Dateien zugreift, | ||
| 1401 | auf die Prozesse in dieser Domäne zugreifen dürfen. | ||
| 1402 | |||
| 1403 | Wir könnten zum Zeitpunkt der Installation eine wesentlich restriktivere | ||
| 1404 | Richtlinie generieren, für die nur @emph{genau derselbe} Dateiname des | ||
| 1405 | gerade installierten @code{guix-daemon}-Programms als | ||
| 1406 | @code{guix_daemon_exec_t} gekennzeichnet würde, statt einen vieles | ||
| 1407 | umfassenden regulären Ausdruck zu benutzen. Aber dann müsste der | ||
| 1408 | Administratornutzer zum Zeitpunkt der Installation jedes Mal die Richtlinie | ||
| 1409 | installieren oder aktualisieren müssen, sobald das Guix-Paket aktualisiert | ||
| 1410 | wird, dass das tatsächlich in Benutzung befindliche | ||
| 1411 | @code{guix-daemon}-Programm enthält. | ||
| 1412 | @end enumerate | ||
| 1413 | |||
| 1414 | @node Aufruf des guix-daemon | ||
| 1415 | @section Aufruf von @command{guix-daemon} | ||
| 1416 | |||
| 1417 | Das Programm @command{guix-daemon} implementiert alle Funktionalitäten, um | ||
| 1418 | auf den Store zuzugreifen. Dazu gehört das Starten von Erstellungsprozessen, | ||
| 1419 | das Ausführen des Müllsammlers, das Abfragen, ob ein Erstellungsergebnis | ||
| 1420 | verfügbar ist, etc. Normalerweise wird er so als Administratornutzer | ||
| 1421 | (@code{root}) gestartet: | ||
| 1422 | |||
| 1423 | @example | ||
| 1424 | # guix-daemon --build-users-group=guixbuild | ||
| 1425 | @end example | ||
| 1426 | |||
| 1427 | @noindent | ||
| 1428 | Details, wie Sie ihn einrichten, finden Sie im Abschnitt @ref{Den Daemon einrichten}. | ||
| 1429 | |||
| 1430 | @cindex chroot | ||
| 1431 | @cindex Container, Erstellungsumgebung | ||
| 1432 | @cindex Erstellungsumgebung | ||
| 1433 | @cindex Reproduzierbare Erstellungen | ||
| 1434 | Standardmäßig führt @command{guix-daemon} Erstellungsprozesse mit | ||
| 1435 | unterschiedlichen UIDs aus, die aus der Erstellungsgruppe stammen, deren | ||
| 1436 | Name mit @code{--build-users-group} übergeben wurde. Außerdem läuft jeder | ||
| 1437 | Erstellungsprozess in einer chroot-Umgebung, die nur die Teilmenge des | ||
| 1438 | Stores enthält, von der der Erstellungsprozess abhängt, entsprechend seiner | ||
| 1439 | Ableitung (siehe @ref{Programmierschnittstelle, derivation}), und ein paar | ||
| 1440 | bestimmte Systemverzeichnisse, darunter standardmäßig auch @file{/dev} und | ||
| 1441 | @file{/dev/pts}. Zudem ist die Erstellungsumgebung auf GNU/Linux ein | ||
| 1442 | @dfn{Container}: Nicht nur hat er seinen eigenen Dateisystembaum, er hat | ||
| 1443 | auch einen separaten Namensraum zum Einhängen von Dateisystemen, seinen | ||
| 1444 | eigenen Namensraum für PIDs, für Netzwerke, etc. Dies hilft dabei, | ||
| 1445 | reproduzierbare Erstellungen zu garantieren (siehe @ref{Funktionalitäten}). | ||
| 1446 | |||
| 1447 | Wenn der Daemon im Auftrag des Nutzers eine Erstellung durchführt, erzeugt | ||
| 1448 | er ein Erstellungsverzeichnis, entweder in @file{/tmp} oder im Verzeichnis, | ||
| 1449 | das durch die Umgebungsvariable @code{TMPDIR} angegeben wurde. Dieses | ||
| 1450 | Verzeichnis wird mit dem Container geteilt, solange die Erstellung noch | ||
| 1451 | läuft, allerdings trägt es im Container stattdessen immer den Namen | ||
| 1452 | »/tmp/guix-build-NAME.drv-0«. | ||
| 1453 | |||
| 1454 | Nach Abschluss der Erstellung wird das Erstellungsverzeichnis automatisch | ||
| 1455 | entfernt, außer wenn die Erstellung fehlgeschlagen ist und der Client | ||
| 1456 | @option{--keep-failed} angegeben hat (siehe @ref{Aufruf von guix build, | ||
| 1457 | @option{--keep-failed}}). | ||
| 1458 | |||
| 1459 | Der Daemon lauscht auf Verbindungen und erstellt jeweils einen Unterprozess | ||
| 1460 | für jede von einem Client begonnene Sitzung (d.h.@: von einem der | ||
| 1461 | @command{guix}-Unterbefehle). Der Befehl @command{guix processes} zeigt | ||
| 1462 | Ihnen eine Übersicht solcher Systemaktivitäten; damit werden Ihnen alle | ||
| 1463 | aktiven Sitzungen und Clients gezeigt. Weitere Informationen finden Sie | ||
| 1464 | unter @ref{Aufruf von guix processes}. | ||
| 1465 | |||
| 1466 | Die folgenden Befehlszeilenoptionen werden unterstützt: | ||
| 1467 | |||
| 1468 | @table @code | ||
| 1469 | @item --build-users-group=@var{Gruppe} | ||
| 1470 | Verwende die Benutzerkonten aus der @var{Gruppe}, um Erstellungsprozesse | ||
| 1471 | auszuführen (siehe @ref{Den Daemon einrichten, build users}). | ||
| 1472 | |||
| 1473 | @item --no-substitutes | ||
| 1474 | @cindex Substitute | ||
| 1475 | Benutze keine Substitute für Erstellungsergebnisse. Das heißt, dass alle | ||
| 1476 | Objekte lokal erstellt werden müssen, und kein Herunterladen von vorab | ||
| 1477 | erstellten Binärdateien erlaubt ist (siehe @ref{Substitute}). | ||
| 1478 | |||
| 1479 | Wenn der Daemon mit @code{--no-substitutes} ausgeführt wird, können Clients | ||
| 1480 | trotzdem Substitute explizit aktivieren über den entfernten Prozeduraufruf | ||
| 1481 | @code{set-build-options} (siehe @ref{Der Store}). | ||
| 1482 | |||
| 1483 | @item --substitute-urls=@var{URLs} | ||
| 1484 | @anchor{daemon-substitute-urls} | ||
| 1485 | @var{URLs} als standardmäßige, leerzeichengetrennte Liste der Quell-URLs für | ||
| 1486 | Substitute benutzen. Wenn diese Befehlszeilenoption @emph{nicht} angegeben | ||
| 1487 | wird, wird @indicateurl{https://@value{SUBSTITUTE-SERVER}} verwendet. | ||
| 1488 | |||
| 1489 | Das hat zur Folge, dass Substitute von den @var{URLs} heruntergeladen werden | ||
| 1490 | können, solange sie mit einer Signatur versehen sind, der vertraut wird | ||
| 1491 | (siehe @ref{Substitute}). | ||
| 1492 | |||
| 1493 | @cindex Build-Hook | ||
| 1494 | @item --no-build-hook | ||
| 1495 | Den @dfn{Build-Hook} nicht benutzen. | ||
| 1496 | |||
| 1497 | »Build-Hook« ist der Name eines Hilfsprogramms, das der Daemon starten kann | ||
| 1498 | und an das er Erstellungsanfragen übermittelt. Durch diesen Mechanismus | ||
| 1499 | können Erstellungen an andere Maschinen ausgelagert werden (siehe | ||
| 1500 | @ref{Auslagern des Daemons einrichten}). | ||
| 1501 | |||
| 1502 | @item --cache-failures | ||
| 1503 | Fehler bei der Erstellung zwischenspeichern. Normalerweise werden nur | ||
| 1504 | erfolgreiche Erstellungen gespeichert. | ||
| 1505 | |||
| 1506 | Wenn diese Befehlszeilenoption benutzt wird, kann @command{guix gc | ||
| 1507 | --list-failures} benutzt werden, um die Menge an Store-Objekten abzufragen, | ||
| 1508 | die als Fehlschläge markiert sind; @command{guix gc --clear-failures} | ||
| 1509 | entfernt Store-Objekte aus der Menge zwischengespeicherter | ||
| 1510 | Fehlschläge. Siehe @ref{Aufruf von guix gc}. | ||
| 1511 | |||
| 1512 | @item --cores=@var{n} | ||
| 1513 | @itemx -c @var{n} | ||
| 1514 | @var{n} CPU-Kerne zum Erstellen jeder Ableitung benutzen; @code{0} heißt, so | ||
| 1515 | viele wie verfügbar sind. | ||
| 1516 | |||
| 1517 | Der Vorgabewert ist @code{0}, jeder Client kann jedoch eine abweichende | ||
| 1518 | Anzahl vorgeben, zum Beispiel mit der Befehlszeilenoption @code{--cores} von | ||
| 1519 | @command{guix build} (siehe @ref{Aufruf von guix build}). | ||
| 1520 | |||
| 1521 | Dadurch wird die Umgebungsvariable @code{NIX_BUILD_CORES} im | ||
| 1522 | Erstellungsprozess definiert, welcher sie benutzen kann, um intern parallele | ||
| 1523 | Ausführungen zuzulassen — zum Beispiel durch Nutzung von @code{make | ||
| 1524 | -j$NIX_BUILD_CORES}. | ||
| 1525 | |||
| 1526 | @item --max-jobs=@var{n} | ||
| 1527 | @itemx -M @var{n} | ||
| 1528 | Höchstenss @var{n} Erstellungsaufträge parallel bearbeiten. Der Vorgabewert | ||
| 1529 | liegt bei @code{1}. Wird er auf @code{0} gesetzt, werden keine Erstellungen | ||
| 1530 | lokal durchgeführt, stattdessen lagert der Daemon sie nur aus (siehe | ||
| 1531 | @ref{Auslagern des Daemons einrichten}) oder sie schlagen einfach fehl. | ||
| 1532 | |||
| 1533 | @item --max-silent-time=@var{Sekunden} | ||
| 1534 | Wenn der Erstellungs- oder Substitutionsprozess länger als | ||
| 1535 | @var{Sekunden}-lang keine Ausgabe erzeugt, wird er abgebrochen und ein | ||
| 1536 | Fehler beim Erstellen gemeldet. | ||
| 1537 | |||
| 1538 | Der Vorgabewert ist @code{0}, was bedeutet, dass es keine Zeitbeschränkung | ||
| 1539 | gibt. | ||
| 1540 | |||
| 1541 | Clients können einen anderen Wert als den hier angegebenen verwenden lassen | ||
| 1542 | (siehe @ref{Gemeinsame Erstellungsoptionen, @code{--max-silent-time}}). | ||
| 1543 | |||
| 1544 | @item --timeout=@var{Sekunden} | ||
| 1545 | Entsprechend wird hier der Erstellungs- oder Substitutionsprozess | ||
| 1546 | abgebrochen und als Fehlschlag gemeldet, wenn er mehr als | ||
| 1547 | @var{Sekunden}-lang dauert. | ||
| 1548 | |||
| 1549 | Der Vorgabewert ist @code{0}, was bedeutet, dass es keine Zeitbeschränkung | ||
| 1550 | gibt. | ||
| 1551 | |||
| 1552 | Clients können einen anderen Wert verwenden lassen (siehe @ref{Gemeinsame Erstellungsoptionen, @code{--timeout}}). | ||
| 1553 | |||
| 1554 | @item --rounds=@var{N} | ||
| 1555 | Jede Ableitung @var{n}-mal hintereinander erstellen und einen Fehler melden, | ||
| 1556 | wenn nacheinander ausgewertete Erstellungsergebnisse nicht Bit für Bit | ||
| 1557 | identisch sind. Beachten Sie, dass Clients wie @command{guix build} einen | ||
| 1558 | anderen Wert verwenden lassen können (siehe @ref{Aufruf von guix build}). | ||
| 1559 | |||
| 1560 | Wenn dies zusammen mit @option{--keep-failed} benutzt wird, bleiben die sich | ||
| 1561 | unterscheidenden Ausgaben im Store unter dem Namen | ||
| 1562 | @file{/gnu/store/@dots{}-check}. Dadurch können Unterschiede zwischen den | ||
| 1563 | beiden Ergebnissen leicht erkannt werden. | ||
| 1564 | |||
| 1565 | @item --debug | ||
| 1566 | Informationen zur Fehlersuche ausgeben. | ||
| 1567 | |||
| 1568 | Dies ist nützlich, um Probleme beim Starten des Daemons nachzuvollziehen; | ||
| 1569 | Clients könn aber auch ein abweichenden Wert verwenden lassen, zum Beispiel | ||
| 1570 | mit der Befehlszeilenoption @code{--verbosity} von @command{guix build} | ||
| 1571 | (siehe @ref{Aufruf von guix build}). | ||
| 1572 | |||
| 1573 | @item --chroot-directory=@var{Verzeichnis} | ||
| 1574 | Füge das @var{Verzeichnis} zum chroot von Erstellungen hinzu. | ||
| 1575 | |||
| 1576 | Dadurch kann sich das Ergebnis von Erstellungsprozessen ändern — zum | ||
| 1577 | Beispiel, wenn diese optionale Abhängigkeiten aus dem @var{Verzeichnis} | ||
| 1578 | verwenden, wenn sie verfügbar sind, und nicht, wenn es fehlt. Deshalb ist es | ||
| 1579 | nicht empfohlen, dass Sie diese Befehlszeilenoption verwenden, besser | ||
| 1580 | sollten Sie dafür sorgen, dass jede Ableitung alle von ihr benötigten | ||
| 1581 | Eingabgen deklariert. | ||
| 1582 | |||
| 1583 | @item --disable-chroot | ||
| 1584 | Erstellungen ohne chroot durchführen. | ||
| 1585 | |||
| 1586 | Diese Befehlszeilenoption zu benutzen, wird nicht empfohlen, denn auch | ||
| 1587 | dadurch bekämen Erstellungsprozesse Zugriff auf nicht deklarierte | ||
| 1588 | Abhängigkeiten. Sie ist allerdings unvermeidlich, wenn @command{guix-daemon} | ||
| 1589 | auf einem Benutzerkonto ohne ausreichende Berechtigungen ausgeführt wird. | ||
| 1590 | |||
| 1591 | @item --log-compression=@var{Typ} | ||
| 1592 | Erstellungsprotokolle werden entsprechend dem @var{Typ} komprimiert, der | ||
| 1593 | entweder @code{gzip}, @code{bzip2} oder @code{none} (für keine Kompression) | ||
| 1594 | sein muss. | ||
| 1595 | |||
| 1596 | Sofern nicht @code{--lose-logs} angegeben wurde, werden alle | ||
| 1597 | Erstellungsprotokolle in der @var{localstatedir} gespeichert. Um Platz zu | ||
| 1598 | sparen, komprimiert sie der Daemon standardmäßig automatisch mit bzip2. | ||
| 1599 | |||
| 1600 | @item --disable-deduplication | ||
| 1601 | @cindex Deduplizieren | ||
| 1602 | Automatische Dateien-»Deduplizierung« im Store ausschalten. | ||
| 1603 | |||
| 1604 | Standardmäßig werden zum Store hinzugefügte Objekte automatisch | ||
| 1605 | »dedupliziert«: Wenn eine neue Datei mit einer anderen im Store | ||
| 1606 | übereinstimmt, wird die neue Datei stattdessen als harte Verknüpfung auf die | ||
| 1607 | andere Datei angelegt. Dies reduziert den Speicherverbrauch auf der Platte | ||
| 1608 | merklich, jedoch steigt andererseits die Auslastung bei der Ein-/Ausgabe im | ||
| 1609 | Erstellungsprozess geringfügig. Durch diese Option wird keine solche | ||
| 1610 | Optimierung durchgeführt. | ||
| 1611 | |||
| 1612 | @item --gc-keep-outputs[=yes|no] | ||
| 1613 | Gibt an, ob der Müllsammler (Garbage Collector, GC) die Ausgaben lebendiger | ||
| 1614 | Ableitungen behalten muss (»yes«) oder nicht (»no«). | ||
| 1615 | |||
| 1616 | @cindex GC-Wurzeln | ||
| 1617 | @cindex Müllsammlerwurzeln | ||
| 1618 | Für »yes« behält der Müllsammler die Ausgaben aller lebendigen Ableitungen | ||
| 1619 | im Store — die @code{.drv}-Dateien. Der Vorgabewert ist aber »no«, so dass | ||
| 1620 | Ableitungsausgaben nur vorgehalten werden, wenn sie von einer | ||
| 1621 | Müllsammlerwurzel aus erreichbar sind. Siehe den Abschnitt @ref{Aufruf von guix gc} für weitere Informationen zu Müllsammlerwurzeln. | ||
| 1622 | |||
| 1623 | @item --gc-keep-derivations[=yes|no] | ||
| 1624 | Gibt an, ob der Müllsammler (GC) Ableitungen behalten muss (»yes«), wenn sie | ||
| 1625 | lebendige Ausgaben haben, oder nicht (»no«). | ||
| 1626 | |||
| 1627 | Für »yes«, den Vorgabewert, behält der Müllsammler Ableitungen — z.B.@: | ||
| 1628 | @code{.drv}-Dateien —, solange zumindest eine ihrer Ausgaben lebendig | ||
| 1629 | ist. Dadurch können Nutzer den Ursprung der Dateien in ihrem Store | ||
| 1630 | nachvollziehen. Setzt man den Wert auf »no«, wird ein bisschen weniger | ||
| 1631 | Speicher auf der Platte verbraucht. | ||
| 1632 | |||
| 1633 | Auf diese Weise überträgt sich, wenn @code{--gc-keep-derivations} auf »yes« | ||
| 1634 | steht, die Lebendigkeit von Ausgaben auf Ableitungen, und wenn | ||
| 1635 | @code{--gc-keep-outputs} auf »yes« steht, die Lebendigkeit von Ableitungen | ||
| 1636 | auf Ausgaben. Stehen beide auf »yes«, bleiben so alle | ||
| 1637 | Erstellungsvoraussetzungen wie Quelldateien, Compiler, Bibliotheken und | ||
| 1638 | andere Erstellungswerkzeuge lebendiger Objekte im Store erhalten, ob sie von | ||
| 1639 | einer Müllsammlerwurzel aus erreichbar sind oder nicht. Entwickler können | ||
| 1640 | sich so erneute Erstellungen oder erneutes Herunterladen sparen. | ||
| 1641 | |||
| 1642 | @item --impersonate-linux-2.6 | ||
| 1643 | Auf Linux-basierten Systemen wird hiermit vorgetäuscht, dass es sich um | ||
| 1644 | Linux 2.6 handeln würde, indem der Kernel für einen | ||
| 1645 | @code{uname}-Systemaufruf als Version der Veröffentlichung mit 2.6 | ||
| 1646 | antwortet. | ||
| 1647 | |||
| 1648 | Dies kann hilfreich sein, um Programme zu erstellen, die (normalerweise zu | ||
| 1649 | Unrecht) von der Kernel-Versionsnummer abhängen. | ||
| 1650 | |||
| 1651 | @item --lose-logs | ||
| 1652 | Keine Protokolle der Erstellungen vorhalten. Normalerweise würden solche in | ||
| 1653 | @code{@var{localstatedir}/guix/log} gespeichert. | ||
| 1654 | |||
| 1655 | @item --system=@var{System} | ||
| 1656 | Verwende @var{System} als aktuellen Systemtyp. Standardmäßig ist dies das | ||
| 1657 | Paar aus Befehlssatz und Kernel, welches beim Aufruf von @code{configure} | ||
| 1658 | erkannt wurde, wie zum Beispiel @code{x86_64-linux}. | ||
| 1659 | |||
| 1660 | @item --listen=@var{Endpunkt} | ||
| 1661 | Lausche am @var{Endpunkt} auf Verbindungen. Dabei wird der @var{Endpunkt} | ||
| 1662 | als Dateiname eines Unix-Sockets verstanden, wenn er mit einem @code{/} | ||
| 1663 | (Schrägstrich) beginnt. Andernfalls wird der @var{Endpunkt} als Hostname | ||
| 1664 | (d.h.@: Rechnername) oder als Hostname-Port-Paar verstanden, auf dem | ||
| 1665 | gelauscht wird. Hier sind ein paar Beispiele: | ||
| 1666 | |||
| 1667 | @table @code | ||
| 1668 | @item --listen=/gnu/var/daemon | ||
| 1669 | Lausche auf Verbindungen am Unix-Socket @file{/gnu/var/daemon}, falls nötig | ||
| 1670 | wird er dazu erstellt. | ||
| 1671 | |||
| 1672 | @item --listen=localhost | ||
| 1673 | @cindex Daemon, Fernzugriff | ||
| 1674 | @cindex Fernzugriff auf den Daemon | ||
| 1675 | @cindex Daemon, Einrichten auf Clustern | ||
| 1676 | @cindex Cluster, Einrichtung des Daemons | ||
| 1677 | Lausche auf TCP-Verbindungen an der Netzwerkschnittstelle, die | ||
| 1678 | @code{localhost} entspricht, auf Port 44146. | ||
| 1679 | |||
| 1680 | @item --listen=128.0.0.42:1234 | ||
| 1681 | Lausche auf TCP-Verbindungen an der Netzwerkschnittstelle, die | ||
| 1682 | @code{128.0.0.42} entspricht, auf Port 1234. | ||
| 1683 | @end table | ||
| 1684 | |||
| 1685 | Diese Befehlszeilenoption kann mehrmals wiederholt werden. In diesem Fall | ||
| 1686 | akzeptiert @command{guix-daemon} Verbindungen auf allen angegebenen | ||
| 1687 | Endpunkten. Benutzer können bei Client-Befehlen angeben, mit welchem | ||
| 1688 | Endpunkt sie sich verbinden möchten, indem sie die Umgebungsvariable | ||
| 1689 | @code{GUIX_DAEMON_SOCKET} festlegen (siehe @ref{Der Store, | ||
| 1690 | @code{GUIX_DAEMON_SOCKET}}). | ||
| 1691 | |||
| 1692 | @quotation Anmerkung | ||
| 1693 | Das Daemon-Protokoll ist @emph{weder authentifiziert noch | ||
| 1694 | verschlüsselt}. Die Benutzung von @code{--listen=@var{Host}} eignet sich für | ||
| 1695 | lokale Netzwerke, wie z.B.@: in Rechen-Clustern, wo sich nur solche Knoten | ||
| 1696 | mit dem Daemon verbinden, denen man vertraut. In Situationen, wo ein | ||
| 1697 | Fernzugriff auf den Daemon durchgeführt wird, empfehlen wir, über | ||
| 1698 | Unix-Sockets in Verbindung mit SSH zuzugreifen. | ||
| 1699 | @end quotation | ||
| 1700 | |||
| 1701 | Wird @code{--listen} nicht angegeben, lauscht @command{guix-daemon} auf | ||
| 1702 | Verbindungen auf dem Unix-Socket, der sich unter | ||
| 1703 | @file{@var{localstatedir}/guix/daemon-socket/socket} befindet. | ||
| 1704 | @end table | ||
| 1705 | |||
| 1706 | |||
| 1707 | @node Anwendungen einrichten | ||
| 1708 | @section Anwendungen einrichten | ||
| 1709 | |||
| 1710 | @cindex Fremddistribution | ||
| 1711 | Läuft Guix aufgesetzt auf einer GNU/Linux-Distribution außer Guix System — | ||
| 1712 | einer sogenannten @dfn{Fremddistribution} —, so sind ein paar zusätzliche | ||
| 1713 | Schritte bei der Einrichtung nötig. Hier finden Sie manche davon. | ||
| 1714 | |||
| 1715 | @subsection Locales | ||
| 1716 | |||
| 1717 | @anchor{locales-and-locpath} | ||
| 1718 | @cindex Locales, nicht auf Guix System | ||
| 1719 | @vindex LOCPATH | ||
| 1720 | @vindex GUIX_LOCPATH | ||
| 1721 | Über Guix installierte Pakete benutzen nicht die Daten zu Regions- und | ||
| 1722 | Spracheinstellungen (Locales) des Wirtssystems. Stattdessen müssen Sie erst | ||
| 1723 | eines der Locale-Pakete installieren, die für Guix verfügbar sind, und dann | ||
| 1724 | den Wert Ihrer Umgebungsvariablen @code{GUIX_LOCPATH} passend festlegen: | ||
| 1725 | |||
| 1726 | @example | ||
| 1727 | $ guix package -i glibc-locales | ||
| 1728 | $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale | ||
| 1729 | @end example | ||
| 1730 | |||
| 1731 | Beachten Sie, dass das Paket @code{glibc-locales} Daten für alle von | ||
| 1732 | GNU@tie{}libc unterstützten Locales enthält und deswegen um die 110@tie{}MiB | ||
| 1733 | wiegt. Alternativ gibt es auch @code{glibc-utf8-locales}, was kleiner, aber | ||
| 1734 | auf ein paar UTF-8-Locales beschränkt ist. | ||
| 1735 | |||
| 1736 | Die Variable @code{GUIX_LOCPATH} spielt eine ähnliche Rolle wie | ||
| 1737 | @code{LOCPATH} (siehe @ref{Locale Names, @code{LOCPATH},, libc, The GNU C | ||
| 1738 | Library Reference Manual}). Es gibt jedoch zwei wichtige Unterschiede: | ||
| 1739 | |||
| 1740 | @enumerate | ||
| 1741 | @item | ||
| 1742 | @code{GUIX_LOCPATH} wird nur von der libc in Guix beachtet und nicht der von | ||
| 1743 | Fremddistributionen bereitgestellten libc. Mit @code{GUIX_LOCPATH} können | ||
| 1744 | Sie daher sicherstellen, dass die Programme der Fremddistribution keine | ||
| 1745 | inkompatiblen Locale-Daten von Guix laden. | ||
| 1746 | |||
| 1747 | @item | ||
| 1748 | libc hängt an jeden @code{GUIX_LOCPATH}-Eintrag @code{/X.Y} an, wobei | ||
| 1749 | @code{X.Y} die Version von libc ist — z.B.@: @code{2.22}. Sollte Ihr | ||
| 1750 | Guix-Profil eine Mischung aus Programmen enthalten, die an verschiedene | ||
| 1751 | libc-Versionen gebunden sind, wird jede nur die Locale-Daten im richtigen | ||
| 1752 | Format zu laden versuchen. | ||
| 1753 | @end enumerate | ||
| 1754 | |||
| 1755 | Das ist wichtig, weil das Locale-Datenformat verschiedener libc-Versionen | ||
| 1756 | inkompatibel sein könnte. | ||
| 1757 | |||
| 1758 | @subsection Name Service Switch | ||
| 1759 | |||
| 1760 | @cindex Name Service Switch, glibc | ||
| 1761 | @cindex NSS (Name Service Switch), glibc | ||
| 1762 | @cindex nscd (Name Service Caching Daemon) | ||
| 1763 | @cindex Name Service Caching Daemon (nscd) | ||
| 1764 | Wenn Sie Guix auf einer Fremddistribution verwenden, @emph{empfehlen wir | ||
| 1765 | stärkstens}, dass Sie den @dfn{Name Service Cache Daemon} der | ||
| 1766 | GNU-C-Bibliothek, @command{nscd}, laufen lassen, welcher auf dem Socket | ||
| 1767 | @file{/var/run/nscd/socket} lauschen sollte. Wenn Sie das nicht tun, könnten | ||
| 1768 | mit Guix installierte Anwendungen Probleme beim Auflösen von Hostnamen | ||
| 1769 | (d.h.@: Rechnernamen) oder Benutzerkonten haben, oder sogar abstürzen. Die | ||
| 1770 | nächsten Absätze erklären warum. | ||
| 1771 | |||
| 1772 | @cindex @file{nsswitch.conf} | ||
| 1773 | Die GNU-C-Bibliothek implementiert einen @dfn{Name Service Switch} (NSS), | ||
| 1774 | welcher einen erweiterbaren Mechanismus zur allgemeinen »Namensauflösung« | ||
| 1775 | darstellt: Hostnamensauflösung, Benutzerkonten und weiteres (siehe @ref{Name Service Switch,,, libc, The GNU C Library Reference Manual}). | ||
| 1776 | |||
| 1777 | @cindex Network Information Service (NIS) | ||
| 1778 | @cindex NIS (Network Information Service) | ||
| 1779 | Für die Erweiterbarkeit unterstützt der NSS @dfn{Plugins}, welche neue | ||
| 1780 | Implementierungen zur Namensauflösung bieten: Zum Beispiel ermöglicht das | ||
| 1781 | Plugin @code{nss-mdns} die Namensauflösung für @code{.local}-Hostnamen, das | ||
| 1782 | Plugin @code{nis} gestattet die Auflösung von Benutzerkonten über den | ||
| 1783 | Network Information Service (NIS) und so weiter. Diese zusätzlichen | ||
| 1784 | »Auflösungsdienste« werden systemweit konfiguriert in | ||
| 1785 | @file{/etc/nsswitch.conf} und alle auf dem System laufenden Programme halten | ||
| 1786 | sich an diese Einstellungen (siehe @ref{NSS Configuration File,,, libc, The | ||
| 1787 | GNU C Reference Manual}). | ||
| 1788 | |||
| 1789 | Wenn sie eine Namensauflösung durchführen — zum Beispiel, indem sie die | ||
| 1790 | @code{getaddrinfo}-Funktion in C aufrufen — versuchen die Anwendungen als | ||
| 1791 | Erstes, sich mit dem nscd zu verbinden; ist dies erfolgreich, führt nscd für | ||
| 1792 | sie die weiteren Namensauflösungen durch. Falls nscd nicht läuft, führen sie | ||
| 1793 | selbst die Namensauflösungen durch, indem sie die Namensauflösungsdienste in | ||
| 1794 | ihren eigenen Adressraum laden und ausführen. Diese Namensauflösungsdienste | ||
| 1795 | — die @file{libnss_*.so}-Dateien — werden mit @code{dlopen} geladen, aber | ||
| 1796 | sie kommen von der C-Bibliothek des Wirtssystems und nicht von der | ||
| 1797 | C-Bibliothek, mit der die Anwendung gebunden wurde (also der C-Bibliothek | ||
| 1798 | von Guix). | ||
| 1799 | |||
| 1800 | Und hier kommt es zum Problem: Wenn die Anwendung mit der C-Bibliothek von | ||
| 1801 | Guix (etwa glibc 2.24) gebunden wurde und die NSS-Plugins von einer anderen | ||
| 1802 | C-Bibliothek (etwa @code{libnss_mdns.so} für glibc 2.22) zu laden versucht, | ||
| 1803 | wird sie vermutlich abstürzen oder die Namensauflösungen werden unerwartet | ||
| 1804 | fehlschlagen. | ||
| 1805 | |||
| 1806 | Durch das Ausführen von @command{nscd} auf dem System wird, neben anderen | ||
| 1807 | Vorteilen, dieses Problem der binären Inkompatibilität vermieden, weil diese | ||
| 1808 | @code{libnss_*.so}-Dateien vom @command{nscd}-Prozess geladen werden, nicht | ||
| 1809 | in den Anwendungen selbst. | ||
| 1810 | |||
| 1811 | @subsection X11-Schriftarten | ||
| 1812 | |||
| 1813 | @cindex Schriftarten | ||
| 1814 | Die Mehrheit der grafischen Anwendungen benutzen Fontconfig zum Finden und | ||
| 1815 | Laden von Schriftarten und für die Darstellung im X11-Client. Im Paket | ||
| 1816 | @code{fontconfig} in Guix werden Schriftarten standardmäßig in | ||
| 1817 | @file{$HOME/.guix-profile} gesucht. Um es grafischen Anwendungen, die mit | ||
| 1818 | Guix installiert wurden, zu ermöglichen, Schriftarten anzuzeigen, müssen Sie | ||
| 1819 | die Schriftarten auch mit Guix installieren. Essenzielle Pakete für | ||
| 1820 | Schriftarten sind unter anderem @code{gs-fonts}, @code{font-dejavu} und | ||
| 1821 | @code{font-gnu-freefont-ttf}. | ||
| 1822 | |||
| 1823 | Um auf Chinesisch, Japanisch oder Koreanisch verfassten Text in grafischen | ||
| 1824 | Anwendungen anzeigen zu können, möchten Sie vielleicht | ||
| 1825 | @code{font-adobe-source-han-sans} oder @code{font-wqy-zenhei} | ||
| 1826 | installieren. Ersteres hat mehrere Ausgaben, für jede Sprachfamilie eine | ||
| 1827 | (siehe @ref{Pakete mit mehreren Ausgaben.}). Zum Beispiel installiert | ||
| 1828 | folgender Befehl Schriftarten für chinesische Sprachen: | ||
| 1829 | |||
| 1830 | @example | ||
| 1831 | guix package -i font-adobe-source-han-sans:cn | ||
| 1832 | @end example | ||
| 1833 | |||
| 1834 | @cindex @code{xterm} | ||
| 1835 | Ältere Programme wie @command{xterm} benutzen kein Fontconfig, sondern | ||
| 1836 | X-Server-seitige Schriftartendarstellung. Solche Programme setzen voraus, | ||
| 1837 | dass der volle Name einer Schriftart mit XLFD (X Logical Font Description) | ||
| 1838 | angegeben wird, z.B.@: so: | ||
| 1839 | |||
| 1840 | @example | ||
| 1841 | -*-dejavu sans-medium-r-normal-*-*-100-*-*-*-*-*-1 | ||
| 1842 | @end example | ||
| 1843 | |||
| 1844 | Um solche vollen Namen für die in Ihrem Guix-Profil installierten | ||
| 1845 | TrueType-Schriftarten zu verwenden, müssen Sie den Pfad für Schriftarten | ||
| 1846 | (Font Path) des X-Servers anpassen: | ||
| 1847 | |||
| 1848 | @c Note: 'xset' does not accept symlinks so the trick below arranges to | ||
| 1849 | @c get at the real directory. See <https://bugs.gnu.org/30655>. | ||
| 1850 | @example | ||
| 1851 | xset +fp $(dirname $(readlink -f ~/.guix-profile/share/fonts/truetype/fonts.dir)) | ||
| 1852 | @end example | ||
| 1853 | |||
| 1854 | @cindex @code{xlsfonts} | ||
| 1855 | Danach können Sie den Befehl @code{xlsfonts} ausführen (aus dem Paket | ||
| 1856 | @code{xlsfonts}), um sicherzustellen, dass dort Ihre TrueType-Schriftarten | ||
| 1857 | aufgeführt sind. | ||
| 1858 | |||
| 1859 | @cindex @code{fc-cache} | ||
| 1860 | @cindex Font-Cache | ||
| 1861 | Nach der Installation der Schriftarten müssen Sie unter Umständen den | ||
| 1862 | Schriftarten-Zwischenspeicher (Font-Cache) erneuern, um diese in Anwendungen | ||
| 1863 | benutzen zu können. Gleiches gilt, wenn mit Guix installierte Anwendungen | ||
| 1864 | anscheinend keine Schriftarten finden können. Um das Erneuern des | ||
| 1865 | Font-Caches zu erzwingen, führen Sie @code{fc-cache -f} aus. Der Befehl | ||
| 1866 | @code{fc-cache} wird vom Paket @code{fontconfig} angeboten. | ||
| 1867 | |||
| 1868 | @subsection X.509-Zertifikate | ||
| 1869 | |||
| 1870 | @cindex @code{nss-certs} | ||
| 1871 | Das Paket @code{nss-certs} bietet X.509-Zertifikate, womit Programme die | ||
| 1872 | Identität von Web-Servern authentifizieren können, auf die über HTTPS | ||
| 1873 | zugegriffen wird. | ||
| 1874 | |||
| 1875 | Wenn Sie Guix auf einer Fremddistribution verwenden, können Sie dieses Paket | ||
| 1876 | installieren und die relevanten Umgebungsvariablen festlegen, damit Pakete | ||
| 1877 | wissen, wo sie Zertifikate finden. Unter @ref{X.509-Zertifikate} stehen | ||
| 1878 | genaue Informationen. | ||
| 1879 | |||
| 1880 | @subsection Emacs-Pakete | ||
| 1881 | |||
| 1882 | @cindex @code{emacs} | ||
| 1883 | Wenn Sie mit Guix Pakete für Emacs installieren, werden deren elisp-Dateien | ||
| 1884 | entweder in @file{$HOME/.guix-profile/share/emacs/site-lisp/} oder in | ||
| 1885 | Unterverzeichnissen von | ||
| 1886 | @file{$HOME/.guix-profile/share/emacs/site-lisp/guix.d/} | ||
| 1887 | gespeichert. Letzteres Verzeichnis gibt es, weil es Tausende von | ||
| 1888 | Emacs-Paketen gibt und sie alle im selben Verzeichnis zu speichern | ||
| 1889 | vielleicht nicht verlässlich funktioniert (wegen Namenskonflikten). Daher | ||
| 1890 | halten wir es für richtig, für jedes Paket ein anderes Verzeichnis zu | ||
| 1891 | benutzen. Das Emacs-Paketsystem organisiert die Dateistruktur ähnlich (siehe | ||
| 1892 | @ref{Package Files,,, emacs, The GNU Emacs Manual}). | ||
| 1893 | |||
| 1894 | Standardmäßig »weiß« Emacs (wenn er mit Guix installiert wurde), wo diese | ||
| 1895 | Pakete liegen, Sie müssen also nichts selbst konfigurieren. Wenn Sie aber | ||
| 1896 | aus irgendeinem Grund mit Guix installierte Pakete nicht automatisch laden | ||
| 1897 | lassen möchten, können Sie Emacs mit der Befehlszeilenoption | ||
| 1898 | @code{--no-site-file} starten (siehe @ref{Init File,,, emacs, The GNU Emacs | ||
| 1899 | Manual}). | ||
| 1900 | |||
| 1901 | @subsection GCC-Toolchain | ||
| 1902 | |||
| 1903 | @cindex GCC | ||
| 1904 | @cindex ld-wrapper | ||
| 1905 | |||
| 1906 | Guix bietet individuelle Compiler-Pakete wie etwa @code{gcc}, aber wenn Sie | ||
| 1907 | einen vollständigen Satz an Werkzeugen zum Kompilieren und Binden von | ||
| 1908 | Quellcode brauchen, werden Sie eigentlich das Paket @code{gcc-toolchain} | ||
| 1909 | haben wollen. Das Paket bietet eine vollständige GCC-Toolchain für die | ||
| 1910 | Entwicklung mit C/C++, einschließlich GCC selbst, der GNU-C-Bibliothek | ||
| 1911 | (Header-Dateien und Binärdateien samt Symbolen zur Fehlersuche/Debugging in | ||
| 1912 | der @code{debug}-Ausgabe), Binutils und einen Wrapper für den Binder/Linker. | ||
| 1913 | |||
| 1914 | Der Zweck des Wrappers ist, die an den Binder übergebenen | ||
| 1915 | Befehlszeilenoptionen mit @code{-L} und @code{-l} zu überprüfen und jeweils | ||
| 1916 | passende Argumente mit @code{-rpath} anzufügen, womit dann der echte Binder | ||
| 1917 | aufgerufen wird. Standardmäßig weigert sich der Binder-Wrapper, mit | ||
| 1918 | Bibliotheken außerhalb des Stores zu binden, um »Reinheit« zu | ||
| 1919 | gewährleisten. Das kann aber stören, wenn man die Toolchain benutzt, um mit | ||
| 1920 | lokalen Bibliotheken zu binden. Um Referenzen auf Bibliotheken außerhalb des | ||
| 1921 | Stores zu erlauben, müssen Sie die Umgebungsvariable | ||
| 1922 | @code{GUIX_LD_WRAPPER_ALLOW_IMPURITIES} setzen. | ||
| 1923 | |||
| 1924 | @c TODO What else? | ||
| 1925 | |||
| 1926 | @c ********************************************************************* | ||
| 1927 | @node Systeminstallation | ||
| 1928 | @chapter Systeminstallation | ||
| 1929 | |||
| 1930 | @cindex Installieren von Guix System | ||
| 1931 | @cindex Guix System, Installation | ||
| 1932 | Dieser Abschnitt beschreibt, wie Sie »Guix System« auf einer Maschine | ||
| 1933 | installieren. Guix kann auch als Paketverwaltungswerkzeug ein bestehendes | ||
| 1934 | GNU/Linux-System ergänzen, mehr dazu finden Sie im Abschnitt | ||
| 1935 | @ref{Installation}. | ||
| 1936 | |||
| 1937 | @ifinfo | ||
| 1938 | @quotation Anmerkung | ||
| 1939 | @c This paragraph is for people reading this from tty2 of the | ||
| 1940 | @c installation image. | ||
| 1941 | Sie lesen diese Dokumentation mit einem Info-Betrachter. Details, wie Sie | ||
| 1942 | ihn bedienen, erfahren Sie, indem Sie die Eingabetaste (auch »Return« oder | ||
| 1943 | »Enter« genannt) auf folgender Verknüpfung drücken: @ref{Top, Info reader,, | ||
| 1944 | info-stnd, Stand-alone GNU Info}. Drücken Sie danach @kbd{l}, um hierher | ||
| 1945 | zurückzukommen. | ||
| 1946 | |||
| 1947 | Führen Sie alternativ @command{info info} auf einer anderen Konsole (tty) | ||
| 1948 | aus, um dieses Handbuch offen zu lassen. | ||
| 1949 | @end quotation | ||
| 1950 | @end ifinfo | ||
| 1951 | |||
| 1952 | @menu | ||
| 1953 | * Einschränkungen:: Was Sie erwarten dürfen. | ||
| 1954 | * Hardware-Überlegungen:: Unterstützte Hardware. | ||
| 1955 | * Installation von USB-Stick oder DVD:: Das Installationsmedium | ||
| 1956 | vorbereiten. | ||
| 1957 | * Vor der Installation:: Netzwerkanbindung, Partitionierung etc. | ||
| 1958 | * Geführte grafische Installation:: Leichte grafische Installation. | ||
| 1959 | * Manuelle Installation:: Manuelle Installation für Zauberer. | ||
| 1960 | * Nach der Systeminstallation:: Wenn die Installation erfolgreich war. | ||
| 1961 | * Guix in einer VM installieren:: Ein »Guix System«-Spielplatz. | ||
| 1962 | * Ein Abbild zur Installation erstellen:: Wie ein solches entsteht. | ||
| 1963 | @end menu | ||
| 1964 | |||
| 1965 | @node Einschränkungen | ||
| 1966 | @section Einschränkungen | ||
| 1967 | |||
| 1968 | We consider Guix System to be ready for a wide range of ``desktop'' and | ||
| 1969 | server use cases. The reliability guarantees it provides---transactional | ||
| 1970 | upgrades and rollbacks, reproducibility---make it a solid foundation. | ||
| 1971 | |||
| 1972 | Nevertheless, before you proceed with the installation, be aware of the | ||
| 1973 | following noteworthy limitations applicable to version @value{VERSION}: | ||
| 1974 | |||
| 1975 | @itemize | ||
| 1976 | @item | ||
| 1977 | Der Logical Volume Manager (LVM) wird nicht unterstützt. | ||
| 1978 | |||
| 1979 | @item | ||
| 1980 | Immer mehr Systemdienste sind verfügbar (siehe @ref{Dienste}), aber manche | ||
| 1981 | könnten noch fehlen. | ||
| 1982 | |||
| 1983 | @item | ||
| 1984 | GNOME, Xfce, LXDE, and Enlightenment are available (@pxref{Desktop-Dienste}), as well as a number of X11 window managers. However, KDE is | ||
| 1985 | currently missing. | ||
| 1986 | @end itemize | ||
| 1987 | |||
| 1988 | More than a disclaimer, this is an invitation to report issues (and success | ||
| 1989 | stories!), and to join us in improving it. @xref{Mitwirken}, for more | ||
| 1990 | info. | ||
| 1991 | |||
| 1992 | |||
| 1993 | @node Hardware-Überlegungen | ||
| 1994 | @section Hardware-Überlegungen | ||
| 1995 | |||
| 1996 | @cindex Hardwareunterstützung von Guix System | ||
| 1997 | GNU@tie{}Guix legt den Fokus darauf, die Freiheit des Nutzers auf seinem | ||
| 1998 | Rechner zu respektieren. Es baut auf Linux-libre als Kernel auf, wodurch nur | ||
| 1999 | Hardware unterstützt wird, für die Treiber und Firmware existieren, die | ||
| 2000 | freie Software sind. Heutzutage wird ein großer Teil der handelsüblichen | ||
| 2001 | Hardware von GNU/Linux-libre unterstützt — von Tastaturen bis hin zu | ||
| 2002 | Grafikkarten, Scannern und Ethernet-Adaptern. Leider gibt es noch Bereiche, | ||
| 2003 | wo die Hardwareanbieter ihren Nutzern die Kontrolle über ihren eigenen | ||
| 2004 | Rechner verweigern. Solche Hardware wird von Guix System nicht unterstützt. | ||
| 2005 | |||
| 2006 | @cindex WLAN, Hardware-Unterstützung | ||
| 2007 | One of the main areas where free drivers or firmware are lacking is WiFi | ||
| 2008 | devices. WiFi devices known to work include those using Atheros chips | ||
| 2009 | (AR9271 and AR7010), which corresponds to the @code{ath9k} Linux-libre | ||
| 2010 | driver, and those using Broadcom/AirForce chips (BCM43xx with Wireless-Core | ||
| 2011 | Revision 5), which corresponds to the @code{b43-open} Linux-libre driver. | ||
| 2012 | Free firmware exists for both and is available out-of-the-box on Guix | ||
| 2013 | System, as part of @code{%base-firmware} (@pxref{»operating-system«-Referenz, | ||
| 2014 | @code{firmware}}). | ||
| 2015 | |||
| 2016 | @cindex RYF, Respects Your Freedom | ||
| 2017 | Die @uref{https://www.fsf.org/, Free Software Foundation} betreibt | ||
| 2018 | @uref{https://www.fsf.org/ryf, @dfn{Respects Your Freedom}} (RYF), ein | ||
| 2019 | Zertifizierungsprogramm für Hardware-Produkte, die Ihre Freiheit und | ||
| 2020 | Privatsphäre respektieren und sicherstellen, dass Sie die Kontrolle über Ihr | ||
| 2021 | Gerät haben. Wir ermutigen Sie dazu, die Liste RYF-zertifizierter Geräte zu | ||
| 2022 | beachten. | ||
| 2023 | |||
| 2024 | Eine weitere nützliche Ressource ist die Website | ||
| 2025 | @uref{https://www.h-node.org/, H-Node}. Dort steht ein Katalog von | ||
| 2026 | Hardware-Geräten mit Informationen darüber, wie gut sie von GNU/Linux | ||
| 2027 | unterstützt werden. | ||
| 2028 | |||
| 2029 | |||
| 2030 | @node Installation von USB-Stick oder DVD | ||
| 2031 | @section Installation von USB-Stick oder DVD | ||
| 2032 | |||
| 2033 | Sie können ein ISO-9660-Installationsabbild von | ||
| 2034 | @indicateurl{https://alpha.gnu.org/gnu/guix/guix-system-install-@value{VERSION}.@var{System}.iso.xz} | ||
| 2035 | herunterladen, dass Sie auf einen USB-Stick aufspielen oder auf eine DVD | ||
| 2036 | brennen können, wobei Sie für @var{System} eines der folgenden schreiben | ||
| 2037 | müssen: | ||
| 2038 | |||
| 2039 | @table @code | ||
| 2040 | @item x86_64-linux | ||
| 2041 | für ein GNU/Linux-System auf Intel/AMD-kompatiblen 64-Bit-Prozessoren, | ||
| 2042 | |||
| 2043 | @item i686-linux | ||
| 2044 | für ein 32-Bit-GNU/Linux-System auf Intel-kompatiblen Prozessoren. | ||
| 2045 | @end table | ||
| 2046 | |||
| 2047 | @c start duplication of authentication part from ``Binary Installation'' | ||
| 2048 | Laden Sie auch die entsprechende @file{.sig}-Datei herunter und verifizieren | ||
| 2049 | Sie damit die Authentizität Ihres Abbilds, indem Sie diese Befehle eingeben: | ||
| 2050 | |||
| 2051 | @example | ||
| 2052 | $ wget https://alpha.gnu.org/gnu/guix/guix-system-install-@value{VERSION}.@var{System}.iso.xz.sig | ||
| 2053 | $ gpg --verify guix-system-install-@value{VERSION}.@var{System}.iso.xz.sig | ||
| 2054 | @end example | ||
| 2055 | |||
| 2056 | Falls dieser Befehl fehlschlägt, weil Sie nicht über den nötigen | ||
| 2057 | öffentlichen Schlüssel verfügen, können Sie ihn mit diesem Befehl | ||
| 2058 | importieren: | ||
| 2059 | |||
| 2060 | @example | ||
| 2061 | $ gpg --keyserver @value{KEY-SERVER} \ | ||
| 2062 | --recv-keys @value{OPENPGP-SIGNING-KEY-ID} | ||
| 2063 | @end example | ||
| 2064 | |||
| 2065 | @noindent | ||
| 2066 | @c end duplication | ||
| 2067 | und den Befehl @code{gpg --verify} erneut ausführen. | ||
| 2068 | |||
| 2069 | Dieses Abbild enthält die Werkzeuge, die Sie zur Installation brauchen. Es | ||
| 2070 | ist dafür gedacht, @emph{so wie es ist} auf einen hinreichend großen | ||
| 2071 | USB-Stick oder eine DVD kopiert zu werden. | ||
| 2072 | |||
| 2073 | @unnumberedsubsec Kopieren auf einen USB-Stick | ||
| 2074 | |||
| 2075 | Um das Abbild auf einen USB-Stick zu kopieren, führen Sie folgende Schritte | ||
| 2076 | durch: | ||
| 2077 | |||
| 2078 | @enumerate | ||
| 2079 | @item | ||
| 2080 | Entpacken Sie das Abbild mit dem @command{xz}-Befehl: | ||
| 2081 | |||
| 2082 | @example | ||
| 2083 | xz -d guix-system-install-@value{VERSION}.@var{System}.iso.xz | ||
| 2084 | @end example | ||
| 2085 | |||
| 2086 | @item | ||
| 2087 | Stecken Sie einen USB-Stick in Ihren Rechner ein, der mindestens 1@tie{}GiB | ||
| 2088 | groß ist, und bestimmen Sie seinen Gerätenamen. Ist der Gerätename des | ||
| 2089 | USB-Sticks @file{/dev/sdX}, dann kopieren Sie das Abbild mit dem Befehl: | ||
| 2090 | |||
| 2091 | @example | ||
| 2092 | dd if=guix-system-install-@value{VERSION}.@var{System}.iso of=/dev/sdX | ||
| 2093 | sync | ||
| 2094 | @end example | ||
| 2095 | |||
| 2096 | Sie benötigen in der Regel Administratorrechte, um auf @file{/dev/sdX} | ||
| 2097 | zuzugreifen. | ||
| 2098 | @end enumerate | ||
| 2099 | |||
| 2100 | @unnumberedsubsec Auf eine DVD brennen | ||
| 2101 | |||
| 2102 | Um das Abbild auf eine DVD zu kopieren, führen Sie diese Schritte durch: | ||
| 2103 | |||
| 2104 | @enumerate | ||
| 2105 | @item | ||
| 2106 | Entpacken Sie das Abbild mit dem @command{xz}-Befehl: | ||
| 2107 | |||
| 2108 | @example | ||
| 2109 | xz -d guix-system-install-@value{VERSION}.@var{System}.iso.xz | ||
| 2110 | @end example | ||
| 2111 | |||
| 2112 | @item | ||
| 2113 | Legen Sie eine unbespielte DVD in Ihren Rechner ein und bestimmen Sie ihren | ||
| 2114 | Gerätenamen. Angenommen der Name des DVD-Laufwerks ist @file{/dev/srX}, | ||
| 2115 | kopieren Sie das Abbild mit: | ||
| 2116 | |||
| 2117 | @example | ||
| 2118 | growisofs -dvd-compat -Z /dev/srX=guix-system-install-@value{VERSION}.@var{System}.iso | ||
| 2119 | @end example | ||
| 2120 | |||
| 2121 | Der Zugriff auf @file{/dev/srX} setzt in der Regel Administratorrechte | ||
| 2122 | voraus. | ||
| 2123 | @end enumerate | ||
| 2124 | |||
| 2125 | @unnumberedsubsec Das System starten | ||
| 2126 | |||
| 2127 | Sobald das erledigt ist, sollten Sie Ihr System neu starten und es vom | ||
| 2128 | USB-Stick oder der DVD hochfahren (»booten«) können. Dazu müssen Sie | ||
| 2129 | wahrscheinlich beim Starten des Rechners in das BIOS- oder UEFI-Boot-Menü | ||
| 2130 | gehen, von wo aus Sie auswählen können, dass vom USB-Stick gebootet werden | ||
| 2131 | soll. | ||
| 2132 | |||
| 2133 | Lesen Sie den Abschnitt @ref{Guix in einer VM installieren}, wenn Sie Guix System | ||
| 2134 | stattdessen in einer virtuellen Maschine (VM) installieren möchten. | ||
| 2135 | |||
| 2136 | |||
| 2137 | @node Vor der Installation | ||
| 2138 | @section Vor der Installation | ||
| 2139 | |||
| 2140 | Wenn Sie Ihren Rechner gebootet haben, können Sie sich vom grafischen | ||
| 2141 | Installationsprogramm durch den Installationsvorgang führen lassen, was den | ||
| 2142 | Einstieg leicht macht (siehe @ref{Geführte grafische Installation}). Alternativ können Sie sich auch für einen »manuellen« | ||
| 2143 | Installationsvorgang entscheiden, wenn Sie bereits mit GNU/Linux vertraut | ||
| 2144 | sind und mehr Kontrolle haben möchten, als sie das grafische | ||
| 2145 | Installationsprogramm bietet (siehe @ref{Manuelle Installation}). | ||
| 2146 | |||
| 2147 | Das grafische Installationsprogramm steht Ihnen auf TTY1 zur Verfügung. Auf | ||
| 2148 | den TTYs 3 bis 6 können Sie vor sich eine Eingabeaufforderung für den | ||
| 2149 | Administratornutzer »root« sehen, nachdem Sie @kbd{strg-alt-f3}, | ||
| 2150 | @kbd{strg-alt-f4} usw.@: gedrückt haben. TTY2 zeigt Ihnen dieses Handbuch, | ||
| 2151 | das Sie über die Tastenkombination @kbd{strg-alt-f2} erreichen. In dieser | ||
| 2152 | Dokumentation können Sie mit den Steuerungsbefehlen Ihres Info-Betrachters | ||
| 2153 | blättern (siehe @ref{Top,,, info-stnd, Stand-alone GNU Info}). Auf dem | ||
| 2154 | Installationssystem läuft der GPM-Maus-Daemon, wodurch Sie Text mit der | ||
| 2155 | linken Maustaste markieren und ihn mit der mittleren Maustaste einfügen | ||
| 2156 | können. | ||
| 2157 | |||
| 2158 | @quotation Anmerkung | ||
| 2159 | Für die Installation benötigen Sie Zugang zum Internet, damit fehlende | ||
| 2160 | Abhängigkeiten Ihrer Systemkonfiguration heruntergeladen werden können. Im | ||
| 2161 | Abschnitt »Netzwerkkonfiguration« weiter unten finden Sie mehr Informationen | ||
| 2162 | dazu. | ||
| 2163 | @end quotation | ||
| 2164 | |||
| 2165 | @node Geführte grafische Installation | ||
| 2166 | @section Geführte grafische Installation | ||
| 2167 | |||
| 2168 | Das grafische Installationsprogramm ist mit einer textbasierten | ||
| 2169 | Benutzeroberfläche ausgestattet. Es kann Sie mit Dialogfeldern durch die | ||
| 2170 | Schritte führen, mit denen Sie GNU@tie{}Guix System installieren. | ||
| 2171 | |||
| 2172 | Die ersten Dialogfelder ermöglichen es Ihnen, das System aufzusetzen, wie | ||
| 2173 | Sie es bei der Installation benutzen: Sie können die Sprache und | ||
| 2174 | Tastaturbelegung festlegen und die Netzwerkanbindung einrichten, die während | ||
| 2175 | der Installation benutzt wird. Das folgende Bild zeigt den Dialog zur | ||
| 2176 | Einrichtung der Netzwerkanbindung. | ||
| 2177 | |||
| 2178 | @image{images/installer-network,5in,, Netzwerkanbindung einrichten mit dem | ||
| 2179 | grafischen Installationsprogramm} | ||
| 2180 | |||
| 2181 | Mit den danach kommenden Schritten können Sie Ihre Festplatte | ||
| 2182 | partitionieren, wie im folgenden Bild gezeigt, und auswählen, ob Ihre | ||
| 2183 | Dateisysteme verschlüsselt werden sollen oder nicht. Sie können Ihren | ||
| 2184 | Rechnernamen und das Administratorpasswort (das »root«-Passwort) festlegen | ||
| 2185 | und ein Benutzerkonto einrichten, und noch mehr. | ||
| 2186 | |||
| 2187 | @image{images/installer-partitions,5in,, Partitionieren mit dem grafischen | ||
| 2188 | Installationsprogramm} | ||
| 2189 | |||
| 2190 | Beachten Sie, dass Sie mit dem Installationsprogramm jederzeit den aktuellen | ||
| 2191 | Installationsschritt verlassen und zu einem vorherigen Schritt zurückkehren | ||
| 2192 | können, wie Sie im folgenden Bild sehen können. | ||
| 2193 | |||
| 2194 | @image{images/installer-resume,5in,, Mit einem Installationsschritt | ||
| 2195 | fortfahren} | ||
| 2196 | |||
| 2197 | Sobald Sie fertig sind, erzeugt das Installationsprogramm eine | ||
| 2198 | Betriebssystemkonfiguration und zeigt sie an (siehe @ref{Das Konfigurationssystem nutzen}). Zu diesem Zeitpunkt können Sie auf »OK« drücken und | ||
| 2199 | die Installation wird losgehen. Ist sie erfolgreich, können Sie neu starten | ||
| 2200 | und Ihr neues System genießen. Siehe @ref{Nach der Systeminstallation} für | ||
| 2201 | Informationen, wie es weitergeht! | ||
| 2202 | |||
| 2203 | |||
| 2204 | @node Manuelle Installation | ||
| 2205 | @section Manuelle Installation | ||
| 2206 | |||
| 2207 | Dieser Abschnitt beschreibt, wie Sie GNU@tie{}Guix System auf manuelle Weise | ||
| 2208 | auf Ihrer Maschine installieren. Diese Alternative setzt voraus, dass Sie | ||
| 2209 | bereits mit GNU/Linux, der Shell und üblichen Administrationswerkzeugen | ||
| 2210 | vertraut sind. Wenn Sie glauben, dass das nichts für Sie ist, dann möchten | ||
| 2211 | Sie vielleicht das geführte grafische Installationsprogramm benutzen (siehe | ||
| 2212 | @ref{Geführte grafische Installation}). | ||
| 2213 | |||
| 2214 | Das Installationssystem macht Eingabeaufforderungen auf den TTYs 3 bis 6 | ||
| 2215 | zugänglich, auf denen Sie als Administratornutzer Befehle eingeben können; | ||
| 2216 | Sie erreichen diese, indem Sie die Tastenkombinationen @kbd{strg-alt-f3}, | ||
| 2217 | @kbd{strg-alt-f4} und so weiter benutzen. Es enthält viele übliche | ||
| 2218 | Werkzeuge, mit denen Sie diese Aufgabe bewältigen können. Da es sich auch um | ||
| 2219 | ein vollständiges »Guix System«-System handelt, können Sie aber auch andere | ||
| 2220 | Pakete mit dem Befehl @command{guix package} nachinstallieren, wenn Sie sie | ||
| 2221 | brauchen (siehe @ref{Aufruf von guix package}). | ||
| 2222 | |||
| 2223 | @menu | ||
| 2224 | * Tastaturbelegung und Netzwerkanbindung und Partitionierung:: Erstes | ||
| 2225 | Einrichten. | ||
| 2226 | * Fortfahren mit der Installation:: Installieren. | ||
| 2227 | @end menu | ||
| 2228 | |||
| 2229 | @node Tastaturbelegung und Netzwerkanbindung und Partitionierung | ||
| 2230 | @subsection Tastaturbelegung, Netzwerkanbindung und Partitionierung | ||
| 2231 | |||
| 2232 | Bevor Sie das System installieren können, wollen Sie vielleicht die | ||
| 2233 | Tastaturbelegung ändern, eine Netzwerkverbindung herstellen und die | ||
| 2234 | Zielfestplatte partitionieren. Dieser Abschnitt wird Sie durch diese | ||
| 2235 | Schritte führen. | ||
| 2236 | |||
| 2237 | @subsubsection Tastaturbelegung | ||
| 2238 | |||
| 2239 | @cindex Tastaturbelegung | ||
| 2240 | Das Installationsabbild verwendet die US-amerikanische | ||
| 2241 | QWERTY-Tastaturbelegung. Wenn Sie dies ändern möchten, können Sie den | ||
| 2242 | @command{loadkeys}-Befehl benutzen. Mit folgendem Befehl würden Sie zum | ||
| 2243 | Beispiel die Dvorak-Tastaturbelegung auswählen: | ||
| 2244 | |||
| 2245 | @example | ||
| 2246 | loadkeys dvorak | ||
| 2247 | @end example | ||
| 2248 | |||
| 2249 | Schauen Sie sich an, welche Dateien im Verzeichnis | ||
| 2250 | @file{/run/current-system/profile/share/keymaps} stehen, um eine Liste | ||
| 2251 | verfügbarer Tastaturbelegungen zu sehen. Wenn Sie mehr Informationen | ||
| 2252 | brauchen, führen Sie @command{man loadkeys} aus. | ||
| 2253 | |||
| 2254 | @subsubsection Netzwerkkonfiguration | ||
| 2255 | |||
| 2256 | Führen Sie folgenden Befehl aus, um zu sehen, wie Ihre | ||
| 2257 | Netzwerkschnittstellen benannt sind: | ||
| 2258 | |||
| 2259 | @example | ||
| 2260 | ifconfig -a | ||
| 2261 | @end example | ||
| 2262 | |||
| 2263 | @noindent | ||
| 2264 | @dots{} oder mit dem GNU/Linux-eigenen @command{ip}-Befehl: | ||
| 2265 | |||
| 2266 | @example | ||
| 2267 | ip a | ||
| 2268 | @end example | ||
| 2269 | |||
| 2270 | @c http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20 | ||
| 2271 | Der Name kabelgebundener Schnittstellen (engl. Interfaces) beginnt mit dem | ||
| 2272 | Buchstaben @samp{e}, zum Beispiel heißt die dem ersten fest eingebauten | ||
| 2273 | Ethernet-Adapter entsprechende Schnittstelle @samp{eno1}. Drahtlose | ||
| 2274 | Schnittstellen werden mit einem Namen bezeichnet, der mit dem Buchstaben | ||
| 2275 | @samp{w} beginnt, etwa @samp{w1p2s0}. | ||
| 2276 | |||
| 2277 | @table @asis | ||
| 2278 | @item Kabelverbindung | ||
| 2279 | Um ein kabelgebundenes Netzwerk einzurichten, führen Sie den folgenden | ||
| 2280 | Befehl aus, wobei Sie statt @var{Schnittstelle} den Namen der | ||
| 2281 | kabelgebundenen Schnittstelle eintippen, die Sie benutzen möchten. | ||
| 2282 | |||
| 2283 | @example | ||
| 2284 | ifconfig @var{Schnittstelle} up | ||
| 2285 | @end example | ||
| 2286 | |||
| 2287 | @item Drahtlose Verbindung | ||
| 2288 | @cindex WLAN | ||
| 2289 | @cindex WiFi | ||
| 2290 | Um Drahtlosnetzwerke einzurichten, können Sie eine Konfigurationsdatei für | ||
| 2291 | das Konfigurationswerkzeug des @command{wpa_supplicant} schreiben (wo Sie | ||
| 2292 | sie speichern, ist nicht wichtig), indem Sie eines der verfügbaren | ||
| 2293 | Textbearbeitungsprogramme wie etwa @command{nano} benutzen: | ||
| 2294 | |||
| 2295 | @example | ||
| 2296 | nano wpa_supplicant.conf | ||
| 2297 | @end example | ||
| 2298 | |||
| 2299 | Zum Beispiel können Sie die folgende Formulierung in der Datei speichern, | ||
| 2300 | die für viele Drahtlosnetzwerke funktioniert, sofern Sie die richtige SSID | ||
| 2301 | und Passphrase für das Netzwerk eingeben, mit dem Sie sich verbinden | ||
| 2302 | möchten: | ||
| 2303 | |||
| 2304 | @example | ||
| 2305 | network=@{ | ||
| 2306 | ssid="@var{meine-ssid}" | ||
| 2307 | key_mgmt=WPA-PSK | ||
| 2308 | psk="geheime Passphrase des Netzwerks" | ||
| 2309 | @} | ||
| 2310 | @end example | ||
| 2311 | |||
| 2312 | Starten Sie den Dienst für Drahtlosnetzwerke und lassen Sie ihn im | ||
| 2313 | Hintergrund laufen, indem Sie folgenden Befehl eintippen (ersetzen Sie dabei | ||
| 2314 | @var{Schnittstelle} durch den Namen der Netzwerkschnittstelle, die Sie | ||
| 2315 | benutzen möchten): | ||
| 2316 | |||
| 2317 | @example | ||
| 2318 | wpa_supplicant -c wpa_supplicant.conf -i @var{Schnittstelle} -B | ||
| 2319 | @end example | ||
| 2320 | |||
| 2321 | Führen Sie @command{man wpa_supplicant} aus, um mehr Informationen zu | ||
| 2322 | erhalten. | ||
| 2323 | @end table | ||
| 2324 | |||
| 2325 | @cindex DHCP | ||
| 2326 | Zu diesem Zeitpunkt müssen Sie sich eine IP-Adresse beschaffen. Auf einem | ||
| 2327 | Netzwerk, wo IP-Adressen automatisch @i{via} DHCP zugewiesen werden, können | ||
| 2328 | Sie das hier ausführen: | ||
| 2329 | |||
| 2330 | @example | ||
| 2331 | dhclient -v @var{Schnittstelle} | ||
| 2332 | @end example | ||
| 2333 | |||
| 2334 | Versuchen Sie, einen Server zu pingen, um zu prüfen, ob sie mit dem Internet | ||
| 2335 | verbunden sind und alles richtig funktioniert: | ||
| 2336 | |||
| 2337 | @example | ||
| 2338 | ping -c 3 gnu.org | ||
| 2339 | @end example | ||
| 2340 | |||
| 2341 | Einen Internetzugang herzustellen, ist in jedem Fall nötig, weil das Abbild | ||
| 2342 | nicht alle Software und Werkzeuge enthält, die nötig sein könnten. | ||
| 2343 | |||
| 2344 | @cindex Über SSH installieren | ||
| 2345 | Wenn Sie möchten, können Sie die weitere Installation auch per Fernwartung | ||
| 2346 | durchführen, indem Sie einen SSH-Server starten: | ||
| 2347 | |||
| 2348 | @example | ||
| 2349 | herd start ssh-daemon | ||
| 2350 | @end example | ||
| 2351 | |||
| 2352 | Vergewissern Sie sich vorher, dass Sie entweder ein Passwort mit | ||
| 2353 | @command{passwd} festgelegt haben, oder dass Sie für OpenSSH eine | ||
| 2354 | Authentifizierung über öffentliche Schlüssel eingerichtet haben, bevor Sie | ||
| 2355 | sich anmelden. | ||
| 2356 | |||
| 2357 | @subsubsection Plattenpartitionierung | ||
| 2358 | |||
| 2359 | Sofern nicht bereits geschehen, ist der nächste Schritt, zu partitionieren | ||
| 2360 | und dann die Zielpartition zu formatieren. | ||
| 2361 | |||
| 2362 | Auf dem Installationsabbild sind mehrere Partitionierungswerkzeuge zu | ||
| 2363 | finden, einschließlich (siehe @ref{Overview,,, parted, GNU Parted User | ||
| 2364 | Manual}), @command{fdisk} und @command{cfdisk}. Starten Sie eines davon und | ||
| 2365 | partitionieren Sie Ihre Festplatte oder sonstigen Massenspeicher: | ||
| 2366 | |||
| 2367 | @example | ||
| 2368 | cfdisk | ||
| 2369 | @end example | ||
| 2370 | |||
| 2371 | Wenn Ihre Platte mit einer »GUID Partition Table« (GPT) formatiert ist, und | ||
| 2372 | Sie vorhaben, die BIOS-basierte Variante des GRUB-Bootloaders zu | ||
| 2373 | installieren (was der Vorgabe entspricht), stellen Sie sicher, dass eine | ||
| 2374 | Partition als BIOS-Boot-Partition ausgewiesen ist (siehe @ref{BIOS | ||
| 2375 | installation,,, grub, GNU GRUB manual}). | ||
| 2376 | |||
| 2377 | @cindex EFI, Installation | ||
| 2378 | @cindex UEFI, Installation | ||
| 2379 | @cindex ESP, EFI-Systempartition | ||
| 2380 | Falls Sie stattdessen einen EFI-basierten GRUB installieren möchten, muss | ||
| 2381 | auf der Platte eine FAT32-formatierte @dfn{EFI-Systempartition} (ESP) | ||
| 2382 | vorhanden sein. Diese Partition kann unter dem Pfad @file{/boot/efi} | ||
| 2383 | eingebunden (»gemountet«) werden und die @code{esp}-Flag der Partition muss | ||
| 2384 | gesetzt sein. Dazu würden Sie beispielsweise in @command{parted} eintippen: | ||
| 2385 | |||
| 2386 | @example | ||
| 2387 | parted /dev/sda set 1 esp on | ||
| 2388 | @end example | ||
| 2389 | |||
| 2390 | @quotation Anmerkung | ||
| 2391 | @vindex grub-bootloader | ||
| 2392 | @vindex grub-efi-bootloader | ||
| 2393 | Falls Sie nicht wissen, ob Sie einen EFI- oder BIOS-basierten GRUB | ||
| 2394 | installieren möchten: Wenn bei Ihnen das Verzeichnis | ||
| 2395 | @file{/sys/firmware/efi} im Dateisystem existiert, möchten Sie vermutlich | ||
| 2396 | eine EFI-Installation durchführen, wozu Sie in Ihrer Konfiguration | ||
| 2397 | @code{grub-efi-bootloader} benutzen. Ansonsten sollten Sie den | ||
| 2398 | BIOS-basierten GRUB benutzen, der mit @code{grub-bootloader} bezeichnet | ||
| 2399 | wird. Siehe @ref{Bootloader-Konfiguration}, wenn Sie mehr Informationen | ||
| 2400 | über Bootloader brauchen. | ||
| 2401 | @end quotation | ||
| 2402 | |||
| 2403 | Sobald Sie die Platte fertig partitioniert haben, auf die Sie installieren | ||
| 2404 | möchten, müssen Sie ein Dateisystem auf Ihrer oder Ihren für Guix System | ||
| 2405 | vorgesehenen Partition(en) erzeugen@footnote{Derzeit unterstützt Guix System | ||
| 2406 | nur die Dateisystemtypen ext4 und btrfs. Insbesondere funktioniert | ||
| 2407 | Guix-Code, der Dateisystem-UUIDs und -Labels ausliest, nur auf diesen | ||
| 2408 | Dateisystemtypen.}. Wenn Sie eine ESP brauchen und dafür die Partition | ||
| 2409 | @file{/dev/sda1} vorgesehen haben, müssen Sie diesen Befehl ausführen: | ||
| 2410 | |||
| 2411 | @example | ||
| 2412 | mkfs.fat -F32 /dev/sda1 | ||
| 2413 | @end example | ||
| 2414 | |||
| 2415 | Geben Sie Ihren Dateisystemen auch besser eine Bezeichnung (»Label«), damit | ||
| 2416 | Sie sie zuverlässig wiedererkennen und später in den | ||
| 2417 | @code{file-system}-Deklarationen darauf Bezug nehmen können (siehe @ref{Dateisysteme}). Dazu benutzen Sie typischerweise die Befehlszeilenoption | ||
| 2418 | @code{-L} des Befehls @command{mkfs.ext4} oder entsprechende Optionen für | ||
| 2419 | andere Befehle. Wenn wir also annehmen, dass @file{/dev/sda2} die Partition | ||
| 2420 | ist, auf der Ihr Wurzeldateisystem (englisch »root«) wohnen soll, können Sie | ||
| 2421 | dort mit diesem Befehl ein Dateisystem mit der Bezeichnung @code{my-root} | ||
| 2422 | erstellen: | ||
| 2423 | |||
| 2424 | @example | ||
| 2425 | mkfs.ext4 -L my-root /dev/sda2 | ||
| 2426 | @end example | ||
| 2427 | |||
| 2428 | @cindex verschlüsselte Partition | ||
| 2429 | Falls Sie aber vorhaben, die Partition mit dem Wurzeldateisystem zu | ||
| 2430 | verschlüsseln, können Sie dazu die Cryptsetup-/LUKS-Werkzeuge verwenden | ||
| 2431 | (siehe @inlinefmtifelse{html, @uref{https://linux.die.net/man/8/cryptsetup, | ||
| 2432 | @code{man cryptsetup}}, @code{man cryptsetup}}, um mehr darüber zu | ||
| 2433 | erfahren). Angenommen Sie wollen die Partition für das Wurzeldateisystem | ||
| 2434 | verschlüsselt auf @file{/dev/sda2} installieren, dann brauchen Sie eine | ||
| 2435 | Befehlsfolge ähnlich wie diese: | ||
| 2436 | |||
| 2437 | @example | ||
| 2438 | cryptsetup luksFormat /dev/sda2 | ||
| 2439 | cryptsetup open --type luks /dev/sda2 my-partition | ||
| 2440 | mkfs.ext4 -L my-root /dev/mapper/my-partition | ||
| 2441 | @end example | ||
| 2442 | |||
| 2443 | Sobald das erledigt ist, binden Sie dieses Dateisystem als Installationsziel | ||
| 2444 | mit dem Einhängepunkt @file{/mnt} ein, wozu Sie einen Befehl wie hier | ||
| 2445 | eintippen (auch hier unter der Annahme, dass @code{my-root} die Bezeichnung | ||
| 2446 | des künftigen Wurzeldateisystems ist): | ||
| 2447 | |||
| 2448 | @example | ||
| 2449 | mount LABEL=my-root /mnt | ||
| 2450 | @end example | ||
| 2451 | |||
| 2452 | Binden Sie auch alle anderen Dateisysteme ein, die Sie auf dem Zielsystem | ||
| 2453 | benutzen möchten, mit Einhängepunkten relativ zu diesem Pfad. Wenn Sie sich | ||
| 2454 | zum Beispiel für einen Einhängepunkt @file{/boot/efi} für die | ||
| 2455 | EFI-Systempartition entschieden haben, binden Sie sie jetzt als | ||
| 2456 | @file{/mnt/boot/efi} ein, damit @code{guix system init} sie später findet. | ||
| 2457 | |||
| 2458 | Wenn Sie zudem auch vorhaben, eine oder mehrere Swap-Partitionen zu benutzen | ||
| 2459 | (siehe @ref{Memory Concepts, swap space,, libc, The GNU C Library Reference | ||
| 2460 | Manual}), initialisieren Sie diese nun mit @command{mkswap}. Angenommen Sie | ||
| 2461 | haben eine Swap-Partition auf @file{/dev/sda3}, dann würde der Befehl so | ||
| 2462 | lauten: | ||
| 2463 | |||
| 2464 | @example | ||
| 2465 | mkswap /dev/sda3 | ||
| 2466 | swapon /dev/sda3 | ||
| 2467 | @end example | ||
| 2468 | |||
| 2469 | Alternativ können Sie eine Swap-Datei benutzen. Angenommen, Sie wollten die | ||
| 2470 | Datei @file{/swapdatei} im neuen System als eine Swapdatei benutzen, dann | ||
| 2471 | müssten Sie Folgendes ausführen@footnote{Dieses Beispiel wird auf vielen | ||
| 2472 | Arten von Dateisystemen funktionieren (z.B.@: auf ext4). Auf Dateisystemen | ||
| 2473 | mit Copy-on-Write (wie z.B.@: btrfs) können sich die nötigen Schritte | ||
| 2474 | unterscheiden. Details finden Sie in der Dokumentation auf den | ||
| 2475 | Handbuchseiten von @command{mkswap} und @command{swapon}.}: | ||
| 2476 | |||
| 2477 | @example | ||
| 2478 | # Das bedeutet 10 GiB Swapspeicher. "count" anpassen zum ändern. | ||
| 2479 | dd if=/dev/zero of=/mnt/swapfile bs=1MiB count=10240 | ||
| 2480 | # Zur Sicherheit darf nur der Administrator lesen und schreiben. | ||
| 2481 | chmod 600 /mnt/swapfile | ||
| 2482 | mkswap /mnt/swapfile | ||
| 2483 | swapon /mnt/swapfile | ||
| 2484 | @end example | ||
| 2485 | |||
| 2486 | Bedenken Sie, dass, wenn Sie die Partition für das Wurzeldateisystem | ||
| 2487 | (»root«) verschlüsselt und eine Swap-Datei in diesem Dateisystem wie oben | ||
| 2488 | beschrieben erstellt haben, die Verschlüsselung auch die Swap-Datei schützt, | ||
| 2489 | genau wie jede andere Datei in dem Dateisystem. | ||
| 2490 | |||
| 2491 | @node Fortfahren mit der Installation | ||
| 2492 | @subsection Fortfahren mit der Installation | ||
| 2493 | |||
| 2494 | Wenn die Partitionen des Installationsziels bereit sind und dessen | ||
| 2495 | Wurzeldateisystem unter @file{/mnt} eingebunden wurde, kann es losgehen mit | ||
| 2496 | der Installation. Führen Sie zuerst aus: | ||
| 2497 | |||
| 2498 | @example | ||
| 2499 | herd start cow-store /mnt | ||
| 2500 | @end example | ||
| 2501 | |||
| 2502 | Dadurch wird @file{/gnu/store} copy-on-write, d.h.@: dorthin von Guix | ||
| 2503 | erstellte Pakete werden in ihrer Installationsphase auf dem unter | ||
| 2504 | @file{/mnt} befindlichen Zieldateisystem gespeichert, statt den | ||
| 2505 | Arbeitsspeicher auszulasten. Das ist nötig, weil die erste Phase des Befehls | ||
| 2506 | @command{guix system init} (siehe unten) viele Dateien nach | ||
| 2507 | @file{/gnu/store} herunterlädt oder sie erstellt, Änderungen am | ||
| 2508 | @file{/gnu/store} aber bis dahin wie das übrige Installationssystem nur im | ||
| 2509 | Arbeitsspeicher gelagert werden konnten. | ||
| 2510 | |||
| 2511 | Als Nächstes müssen Sie eine Datei bearbeiten und dort eine Deklaration des | ||
| 2512 | Betriebssystems, das Sie installieren möchten, hineinschreiben. Zu diesem | ||
| 2513 | Zweck sind im Installationssystem drei Texteditoren enthalten. Wir | ||
| 2514 | empfehlen, dass Sie GNU nano benutzen (siehe @ref{Top,,, nano, GNU nano | ||
| 2515 | Manual}), welcher Syntax und zueinander gehörende Klammern hervorheben | ||
| 2516 | kann. Andere mitgelieferte Texteditoren, die Sie benutzen können, sind GNU | ||
| 2517 | Zile (ein Emacs-Klon) und nvi (ein Klon des ursprünglichen | ||
| 2518 | @command{vi}-Editors von BSD). Wir empfehlen sehr, dass Sie diese Datei im | ||
| 2519 | Zieldateisystem der Installation speichern, etwa als | ||
| 2520 | @file{/mnt/etc/config.scm}, weil Sie Ihre Konfigurationsdatei im frisch | ||
| 2521 | installierten System noch brauchen werden. | ||
| 2522 | |||
| 2523 | Der Abschnitt @ref{Das Konfigurationssystem nutzen} gibt einen Überblick über | ||
| 2524 | die Konfigurationsdatei. Die in dem Abschnitt diskutierten | ||
| 2525 | Beispielkonfigurationen sind im Installationsabbild im Verzeichnis | ||
| 2526 | @file{/etc/configuration} zu finden. Um also mit einer Systemkonfiguration | ||
| 2527 | anzufangen, die einen grafischen »Display-Server« (eine | ||
| 2528 | »Desktop«-Arbeitsumgebung) bietet, könnten Sie so etwas ausführen: | ||
| 2529 | |||
| 2530 | @example | ||
| 2531 | # mkdir /mnt/etc | ||
| 2532 | # cp /etc/configuration/desktop.scm /mnt/etc/config.scm | ||
| 2533 | # nano /mnt/etc/config.scm | ||
| 2534 | @end example | ||
| 2535 | |||
| 2536 | Achten Sie darauf, was in Ihrer Konfigurationsdatei steht, und besonders auf | ||
| 2537 | Folgendes: | ||
| 2538 | |||
| 2539 | @itemize | ||
| 2540 | @item | ||
| 2541 | Ihre @code{bootloader-configuration}-Form muss sich auf dasjenige Ziel | ||
| 2542 | beziehen, auf das Sie GRUB installieren möchten. Sie sollte genau dann | ||
| 2543 | @code{grub-bootloader} nennen, wenn Sie GRUB im alten BIOS-Modus | ||
| 2544 | installieren, und für neuere UEFI-Systeme sollten Sie | ||
| 2545 | @code{grub-efi-bootloader} nennen. Bei Altsystemen bezeichnet das | ||
| 2546 | @code{target}-Feld ein Gerät wie @code{/dev/sda}, bei UEFI-Systemen | ||
| 2547 | bezeichnet es den Pfad zu einer eingebundenen EFI-Partition wie | ||
| 2548 | @code{/boot/efi}; stellen Sie sicher, dass die ESP tatsächlich dort | ||
| 2549 | eingebunden ist und ein @code{file-system}-Eintrag dafür in Ihrer | ||
| 2550 | Konfiguration festgelegt wurde. | ||
| 2551 | |||
| 2552 | @item | ||
| 2553 | Dateisystembezeichnungen müssen mit den jeweiligen @code{device}-Feldern in | ||
| 2554 | Ihrer @code{file-system}-Konfiguration übereinstimmen, sofern Sie in Ihrer | ||
| 2555 | @code{file-system}-Konfiguration die Prozedur @code{file-system-label} für | ||
| 2556 | ihre @code{device}-Felder benutzen. | ||
| 2557 | |||
| 2558 | @item | ||
| 2559 | Gibt es verschlüsselte Partitionen oder RAID-Partitionen, dann müssen sie im | ||
| 2560 | @code{mapped-devices}-Feld genannt werden (siehe @ref{Zugeordnete Geräte}). | ||
| 2561 | @end itemize | ||
| 2562 | |||
| 2563 | Wenn Sie damit fertig sind, Ihre Konfigurationsdatei vorzubereiten, können | ||
| 2564 | Sie das neue System initialisieren (denken Sie daran, dass zukünftige | ||
| 2565 | Wurzeldateisystem muss unter @file{/mnt} wie bereits beschrieben eingebunden | ||
| 2566 | sein): | ||
| 2567 | |||
| 2568 | @example | ||
| 2569 | guix system init /mnt/etc/config.scm /mnt | ||
| 2570 | @end example | ||
| 2571 | |||
| 2572 | @noindent | ||
| 2573 | Dies kopiert alle notwendigen Dateien und installiert GRUB auf | ||
| 2574 | @file{/dev/sdX}, sofern Sie nicht noch die Befehlszeilenoption | ||
| 2575 | @option{--no-bootloader} benutzen. Weitere Informationen finden Sie im | ||
| 2576 | Abschnitt @ref{Aufruf von guix system}. Der Befehl kann das Herunterladen oder | ||
| 2577 | Erstellen fehlender Softwarepakete auslösen, was einige Zeit in Anspruch | ||
| 2578 | nehmen kann. | ||
| 2579 | |||
| 2580 | Sobald der Befehl erfolgreich — hoffentlich! — durchgelaufen ist, können Sie | ||
| 2581 | mit dem Befehl @command{reboot} das neue System booten lassen. Der | ||
| 2582 | Administratornutzer @code{root} hat im neuen System zunächst ein leeres | ||
| 2583 | Passwort, und Passwörter der anderen Nutzer müssen Sie später setzen, indem | ||
| 2584 | Sie den Befehl @command{passwd} als @code{root} ausführen, außer Ihre | ||
| 2585 | Konfiguration enthält schon Passwörter (siehe @ref{user-account-password, | ||
| 2586 | user account passwords}). Siehe @ref{Nach der Systeminstallation} für | ||
| 2587 | Informationen, wie es weiter geht! | ||
| 2588 | |||
| 2589 | |||
| 2590 | @node Nach der Systeminstallation | ||
| 2591 | @section Nach der Systeminstallation | ||
| 2592 | |||
| 2593 | Sie haben es geschafft: Sie haben Guix System erfolgreich gebootet! Von | ||
| 2594 | jetzt an können Sie Guix System aktualisieren, wann Sie möchten, indem Sie | ||
| 2595 | zum Beispiel das hier ausführen: | ||
| 2596 | |||
| 2597 | @example | ||
| 2598 | guix pull | ||
| 2599 | sudo guix system reconfigure /etc/config.scm | ||
| 2600 | @end example | ||
| 2601 | |||
| 2602 | @noindent | ||
| 2603 | Dadurch wird eine neue Systemgeneration aus den neuesten Paketen und | ||
| 2604 | Diensten erstellt (siehe @ref{Aufruf von guix system}). Wir empfehlen, diese | ||
| 2605 | Schritte regelmäßig zu wiederholen, damit Ihr System die aktuellen | ||
| 2606 | Sicherheitsaktualisierungen benutzt (siehe @ref{Sicherheitsaktualisierungen}). | ||
| 2607 | |||
| 2608 | @c See <https://lists.gnu.org/archive/html/guix-devel/2019-01/msg00268.html>. | ||
| 2609 | @quotation Anmerkung | ||
| 2610 | @cindex sudo, Wirkung auf @command{guix pull} | ||
| 2611 | Beachten Sie, dass bei Nutzung von @command{sudo guix} der | ||
| 2612 | @command{guix}-Befehl des aktiven Benutzers ausgeführt wird und @emph{nicht} | ||
| 2613 | der des Administratornutzers »root«, weil @command{sudo} die | ||
| 2614 | Umgebungsvariable @code{PATH} unverändert lässt. Um ausdrücklich das | ||
| 2615 | @command{guix}-Programm des Administrators aufzurufen, müssen Sie | ||
| 2616 | @command{sudo -i guix @dots{}} eintippen. | ||
| 2617 | @end quotation | ||
| 2618 | |||
| 2619 | Besuchen Sie uns auf @code{#guix} auf dem Freenode-IRC-Netzwerk oder auf der | ||
| 2620 | Mailing-Liste @file{guix-devel@@gnu.org}, um uns Rückmeldung zu geben! | ||
| 2621 | |||
| 2622 | |||
| 2623 | @node Guix in einer VM installieren | ||
| 2624 | @section Guix in einer virtuellen Maschine installieren | ||
| 2625 | |||
| 2626 | @cindex virtuelle Maschine, Guix System installieren | ||
| 2627 | @cindex Virtual Private Server (VPS) | ||
| 2628 | @cindex VPS (Virtual Private Server) | ||
| 2629 | Wenn Sie Guix System auf einer virtuellen Maschine (VM) oder einem »Virtual | ||
| 2630 | Private Server« (VPS) statt auf Ihrer echten Maschine installieren möchten, | ||
| 2631 | ist dieser Abschnitt hier richtig für Sie. | ||
| 2632 | |||
| 2633 | Um eine virtuelle Maschine für @uref{http://qemu.org/,QEMU} aufzusetzen, mit | ||
| 2634 | der Sie Guix System in ein »Disk-Image« installieren können (also in eine | ||
| 2635 | Datei mit einem Abbild eines Plattenspeichers), gehen Sie so vor: | ||
| 2636 | |||
| 2637 | @enumerate | ||
| 2638 | @item | ||
| 2639 | Zunächst laden Sie das Installationsabbild des Guix-Systems wie zuvor | ||
| 2640 | beschrieben herunter und entpacken es (siehe @ref{Installation von USB-Stick oder DVD}). | ||
| 2641 | |||
| 2642 | @item | ||
| 2643 | Legen Sie nun ein Disk-Image an, das das System nach der Installation | ||
| 2644 | enthalten soll. Um ein qcow2-formatiertes Disk-Image zu erstellen, benutzen | ||
| 2645 | Sie den Befehl @command{qemu-img}: | ||
| 2646 | |||
| 2647 | @example | ||
| 2648 | qemu-img create -f qcow2 guixsd.img 50G | ||
| 2649 | @end example | ||
| 2650 | |||
| 2651 | Die Datei, die Sie herausbekommen, wird wesentlich kleiner als 50 GB sein | ||
| 2652 | (typischerweise kleiner als 1 MB), vergrößert sich aber, wenn der | ||
| 2653 | virtualisierte Speicher gefüllt wird. | ||
| 2654 | |||
| 2655 | @item | ||
| 2656 | Starten Sie das USB-Installationsabbild auf einer virtuellen Maschine: | ||
| 2657 | |||
| 2658 | @example | ||
| 2659 | qemu-system-x86_64 -m 1024 -smp 1 \ | ||
| 2660 | -net user -net nic,model=virtio -boot menu=on \ | ||
| 2661 | -drive file=guix-system-install-@value{VERSION}.@var{System}.iso \ | ||
| 2662 | -drive file=guixsd.img | ||
| 2663 | @end example | ||
| 2664 | |||
| 2665 | Halten Sie obige Reihenfolge der @option{-drive}-Befehlszeilenoptionen für | ||
| 2666 | die Laufwerke ein. | ||
| 2667 | |||
| 2668 | Drücken Sie auf der Konsole der virtuellen Maschine schnell die | ||
| 2669 | @kbd{F12}-Taste, um ins Boot-Menü zu gelangen. Drücken Sie dort erst die | ||
| 2670 | Taste @kbd{2} und dann die Eingabetaste @kbd{RET}, um Ihre Auswahl zu | ||
| 2671 | bestätigen. | ||
| 2672 | |||
| 2673 | @item | ||
| 2674 | Sie sind nun in der virtuellen Maschine als Administratornutzer @code{root} | ||
| 2675 | angemeldet und können mit der Installation wie gewohnt fortfahren. Folgen | ||
| 2676 | Sie der Anleitung im Abschnitt @ref{Vor der Installation}. | ||
| 2677 | @end enumerate | ||
| 2678 | |||
| 2679 | Wurde die Installation abgeschlossen, können Sie das System starten, das | ||
| 2680 | sich nun als Abbild in der Datei @file{guixsd.img} befindet. Der Abschnitt | ||
| 2681 | @ref{Guix in einer VM starten} erklärt, wie Sie das tun können. | ||
| 2682 | |||
| 2683 | @node Ein Abbild zur Installation erstellen | ||
| 2684 | @section Ein Abbild zur Installation erstellen | ||
| 2685 | |||
| 2686 | @cindex Installationsabbild | ||
| 2687 | Das oben beschriebene Installationsabbild wurde mit dem Befehl @command{guix | ||
| 2688 | system} erstellt, genauer gesagt mit: | ||
| 2689 | |||
| 2690 | @example | ||
| 2691 | guix system disk-image --file-system-type=iso9660 \ | ||
| 2692 | gnu/system/install.scm | ||
| 2693 | @end example | ||
| 2694 | |||
| 2695 | Die Datei @file{gnu/system/install.scm} finden Sie im Quellbaum von | ||
| 2696 | Guix. Schauen Sie sich die Datei und auch den Abschnitt @ref{Aufruf von guix system} an, um mehr Informationen über das Installationsabbild zu erhalten. | ||
| 2697 | |||
| 2698 | @section Abbild zur Installation für ARM-Rechner erstellen | ||
| 2699 | |||
| 2700 | Viele ARM-Chips funktionieren nur mit ihrer eigenen speziellen Variante des | ||
| 2701 | @uref{http://www.denx.de/wiki/U-Boot/, U-Boot}-Bootloaders. | ||
| 2702 | |||
| 2703 | Wenn Sie ein Disk-Image erstellen und der Bootloader nicht anderweitig schon | ||
| 2704 | installiert ist (auf einem anderen Laufwerk), ist es ratsam, ein Disk-Image | ||
| 2705 | zu erstellen, was den Bootloader enthält, mit dem Befehl: | ||
| 2706 | |||
| 2707 | @example | ||
| 2708 | guix system disk-image --system=armhf-linux -e '((@@ (gnu system install) os-with-u-boot) (@@ (gnu system install) installation-os) "A20-OLinuXino-Lime2")' | ||
| 2709 | @end example | ||
| 2710 | |||
| 2711 | @code{A20-OLinuXino-Lime2} ist der Name des Chips. Wenn Sie einen ungültigen | ||
| 2712 | Namen eingeben, wird eine Liste möglicher Chip-Namen ausgegeben. | ||
| 2713 | |||
| 2714 | @c ********************************************************************* | ||
| 2715 | @node Paketverwaltung | ||
| 2716 | @chapter Paketverwaltung | ||
| 2717 | |||
| 2718 | @cindex Pakete | ||
| 2719 | Der Zweck von GNU Guix ist, Benutzern die leichte Installation, | ||
| 2720 | Aktualisierung und Entfernung von Software-Paketen zu ermöglichen, ohne dass | ||
| 2721 | sie ihre Erstellungsprozeduren oder Abhängigkeiten kennen müssen. Guix kann | ||
| 2722 | natürlich noch mehr als diese offensichtlichen Funktionalitäten. | ||
| 2723 | |||
| 2724 | Dieses Kapitel beschreibt die Hauptfunktionalitäten von Guix, sowie die von | ||
| 2725 | Guix angebotenen Paketverwaltungswerkzeuge. Zusätzlich von den im Folgenden | ||
| 2726 | beschriebenen Befehlszeilen-Benutzerschnittstellen (siehe @ref{Aufruf von guix package, @code{guix package}}) können Sie auch mit der | ||
| 2727 | Emacs-Guix-Schnittstelle (siehe @ref{Top,,, emacs-guix, The Emacs-Guix | ||
| 2728 | Reference Manual}) arbeiten, nachdem Sie das Paket @code{emacs-guix} | ||
| 2729 | installiert haben (führen Sie zum Einstieg in Emacs-Guix den Emacs-Befehl | ||
| 2730 | @kbd{M-x guix-help} aus): | ||
| 2731 | |||
| 2732 | @example | ||
| 2733 | guix package -i emacs-guix | ||
| 2734 | @end example | ||
| 2735 | |||
| 2736 | @menu | ||
| 2737 | * Funktionalitäten:: Wie Guix Ihr Leben schöner machen wird. | ||
| 2738 | * Aufruf von guix package:: Pakete installieren, entfernen usw. | ||
| 2739 | * Substitute:: Vorerstelle Binärdateien herunterladen. | ||
| 2740 | * Pakete mit mehreren Ausgaben.:: Ein Quellpaket, mehrere Ausgaben. | ||
| 2741 | * Aufruf von guix gc:: Den Müllsammler laufen lassen. | ||
| 2742 | * Aufruf von guix pull:: Das neueste Guix samt Distribution laden. | ||
| 2743 | * Kanäle:: Die Paketsammlung anpassen. | ||
| 2744 | * Untergeordnete:: Mit einer anderen Version von Guix | ||
| 2745 | interagieren. | ||
| 2746 | * Aufruf von guix describe:: Informationen über Ihre Guix-Version | ||
| 2747 | anzeigen. | ||
| 2748 | * Aufruf von guix archive:: Import und Export von Store-Dateien. | ||
| 2749 | @end menu | ||
| 2750 | |||
| 2751 | @node Funktionalitäten | ||
| 2752 | @section Funktionalitäten | ||
| 2753 | |||
| 2754 | Wenn Sie Guix benutzen, landet jedes Paket schließlich im @dfn{Paket-Store} | ||
| 2755 | in seinem eigenen Verzeichnis — der Name ist ähnlich wie | ||
| 2756 | @file{/gnu/store/xxx-package-1.2}, wobei @code{xxx} eine Zeichenkette in | ||
| 2757 | Base32-Darstellung ist. | ||
| 2758 | |||
| 2759 | Statt diese Verzeichnisse direkt anzugeben, haben Nutzer ihr eigenes | ||
| 2760 | @dfn{Profil}, welches auf diejenigen Pakete zeigt, die sie tatsächlich | ||
| 2761 | benutzen wollen. Diese Profile sind im Persönlichen Verzeichnis des | ||
| 2762 | jeweiligen Nutzers gespeichert als @code{$HOME/.guix-profile}. | ||
| 2763 | |||
| 2764 | Zum Beispiel installiert @code{alice} GCC 4.7.2. Dadurch zeigt dann | ||
| 2765 | @file{/home/alice/.guix-profile/bin/gcc} auf | ||
| 2766 | @file{/gnu/store/@dots{}-gcc-4.7.2/bin/gcc}. Auf demselben Rechner hat | ||
| 2767 | @code{bob} bereits GCC 4.8.0 installiert. Das Profil von @code{bob} zeigt | ||
| 2768 | dann einfach weiterhin auf @file{/gnu/store/@dots{}-gcc-4.8.0/bin/gcc} — | ||
| 2769 | d.h.@: beide Versionen von GCC koexistieren auf demselben System, ohne sich | ||
| 2770 | zu stören. | ||
| 2771 | |||
| 2772 | Der Befehl @command{guix package} ist das zentrale Werkzeug, um Pakete zu | ||
| 2773 | verwalten (siehe @ref{Aufruf von guix package}). Es arbeitet auf dem eigenen | ||
| 2774 | Profil jedes Nutzers und kann @emph{mit normalen Benutzerrechten} ausgeführt | ||
| 2775 | werden. | ||
| 2776 | |||
| 2777 | @cindex Transaktionen | ||
| 2778 | Der Befehl stellt die offensichtlichen Installations-, Entfernungs- und | ||
| 2779 | Aktualisierungsoperationen zur Verfügung. Jeder Aufruf ist tatsächlich eine | ||
| 2780 | eigene @emph{Transaktion}: Entweder die angegebene Operation wird | ||
| 2781 | erfolgreich durchgeführt, oder gar nichts passiert. Wenn also der Prozess | ||
| 2782 | von @command{guix package} während der Transaktion beendet wird, oder es zum | ||
| 2783 | Stromausfall während der Transaktion kommt, dann bleibt der alte, nutzbare | ||
| 2784 | Zustands des Nutzerprofils erhalten. | ||
| 2785 | |||
| 2786 | Zudem kann jede Pakettransaktion @emph{zurückgesetzt} werden | ||
| 2787 | (Rollback). Wird also zum Beispiel durch eine Aktualisierung eine neue | ||
| 2788 | Version eines Pakets installiert, die einen schwerwiegenden Fehler zur Folge | ||
| 2789 | hat, können Nutzer ihr Profil einfach auf die vorherige Profilinstanz | ||
| 2790 | zurücksetzen, von der sie wissen, dass sie gut lief. Ebenso unterliegt bei | ||
| 2791 | Guix auch die globale Systemkonfiguration transaktionellen Aktualisierungen | ||
| 2792 | und Rücksetzungen (siehe @ref{Das Konfigurationssystem nutzen}). | ||
| 2793 | |||
| 2794 | Alle Pakete im Paket-Store können vom @emph{Müllsammler} (Garbage Collector) | ||
| 2795 | gelöscht werden. Guix ist in der Lage, festzustellen, welche Pakete noch | ||
| 2796 | durch Benutzerprofile referenziert werden, und entfernt nur diese, die | ||
| 2797 | nachweislich nicht mehr referenziert werden (siehe @ref{Aufruf von guix gc}). Benutzer können auch ausdrücklich alte Generationen ihres Profils | ||
| 2798 | löschen, damit die zugehörigen Pakete vom Müllsammler gelöscht werden | ||
| 2799 | können. | ||
| 2800 | |||
| 2801 | @cindex Reproduzierbarkeit | ||
| 2802 | @cindex Reproduzierbare Erstellungen | ||
| 2803 | Guix verfolgt einen @dfn{rein funktionalen} Ansatz bei der Paketverwaltung, | ||
| 2804 | wie er in der Einleitung beschrieben wurde (siehe @ref{Einführung}). Jedes | ||
| 2805 | Paketverzeichnis im @file{/gnu/store} hat einen Hash all seiner bei der | ||
| 2806 | Erstellung benutzten Eingaben im Namen — Compiler, Bibliotheken, | ||
| 2807 | Erstellungs-Skripts etc. Diese direkte Entsprechung ermöglicht es Benutzern, | ||
| 2808 | eine Paketinstallation zu benutzen, die sicher dem aktuellen Stand ihrer | ||
| 2809 | Distribution entspricht. Sie maximiert auch die @dfn{Reproduzierbarkeit der | ||
| 2810 | Erstellungen} zu maximieren: Dank der isolierten Erstellungsumgebungen, die | ||
| 2811 | benutzt werden, resultiert eine Erstellung wahrscheinlich in bitweise | ||
| 2812 | identischen Dateien, auch wenn sie auf unterschiedlichen Maschinen | ||
| 2813 | durchgeführt wird (siehe @ref{Aufruf des guix-daemon, container}). | ||
| 2814 | |||
| 2815 | @cindex Substitute | ||
| 2816 | Auf dieser Grundlage kann Guix @dfn{transparent Binär- oder Quelldateien | ||
| 2817 | ausliefern}. Wenn eine vorerstellte Binärdatei für ein | ||
| 2818 | @file{/gnu/store}-Objekt von einer externen Quelle verfügbar ist — ein | ||
| 2819 | @dfn{Substitut} —, lädt Guix sie einfach herunter und entpackt sie, | ||
| 2820 | andernfalls erstellt Guix das Paket lokal aus seinem Quellcode (siehe | ||
| 2821 | @ref{Substitute}). Weil Erstellungsergebnisse normalerweise Bit für Bit | ||
| 2822 | reproduzierbar sind, müssen die Nutzer den Servern, die Substitute anbieten, | ||
| 2823 | nicht blind vertrauen; sie können eine lokale Erstellung erzwingen und | ||
| 2824 | Substitute @emph{anfechten} (siehe @ref{Aufruf von guix challenge}). | ||
| 2825 | |||
| 2826 | Kontrolle über die Erstellungsumgebung ist eine auch für Entwickler | ||
| 2827 | nützliche Funktionalität. Der Befehl @command{guix environment} ermöglicht | ||
| 2828 | es Entwicklern eines Pakets, schnell die richtige Entwicklungsumgebung für | ||
| 2829 | ihr Paket einzurichten, ohne manuell die Abhängigkeiten des Pakets in ihr | ||
| 2830 | Profil installieren zu müssen (siehe @ref{Aufruf von guix environment}). | ||
| 2831 | |||
| 2832 | @cindex Nachbildung, von Software-Umgebungen | ||
| 2833 | @cindex Provenienzverfolgung, von Software-Artefakten | ||
| 2834 | Ganz Guix und all seine Paketdefinitionen stehen unter Versionskontrolle und | ||
| 2835 | @command{guix pull} macht es möglich, auf dem Verlauf der Entwicklung von | ||
| 2836 | Guix selbst »in der Zeit zu reisen« (siehe @ref{Aufruf von guix pull}). Dadurch kann eine Instanz von Guix auf einer anderen Maschine oder | ||
| 2837 | zu einem späteren Zeitpunkt genau nachgebildet werden, wodurch auch | ||
| 2838 | @emph{vollständige Software-Umgebungen gänzlich nachgebildet} werden können, | ||
| 2839 | mit genauer @dfn{Provenienzverfolgung}, wo diese Software herkommt. | ||
| 2840 | |||
| 2841 | @node Aufruf von guix package | ||
| 2842 | @section Invoking @command{guix package} | ||
| 2843 | |||
| 2844 | @cindex Installieren von Paketen | ||
| 2845 | @cindex Entfernen von Paketen | ||
| 2846 | @cindex Paketinstallation | ||
| 2847 | @cindex Paketentfernung | ||
| 2848 | Der Befehl @command{guix package} ist ein Werkzeug, womit Nutzer Pakete | ||
| 2849 | installieren, aktualisieren, entfernen und auf vorherige Konfigurationen | ||
| 2850 | zurücksetzen können. Dabei wird nur das eigene Profil des Nutzers verwendet, | ||
| 2851 | und es funktioniert mit normalen Benutzerrechten, ohne Administratorrechte | ||
| 2852 | (siehe @ref{Funktionalitäten}). Die Syntax ist: | ||
| 2853 | |||
| 2854 | @example | ||
| 2855 | guix package @var{Optionen} | ||
| 2856 | @end example | ||
| 2857 | @cindex Transaktionen | ||
| 2858 | In erster Linie geben die @var{Optionen} an, welche Operationen in der | ||
| 2859 | Transaktion durchgeführt werden sollen. Nach Abschluss wird ein neues Profil | ||
| 2860 | erzeugt, aber vorherige @dfn{Generationen} des Profils bleiben verfügbar, | ||
| 2861 | falls der Benutzer auf sie zurückwechseln will. | ||
| 2862 | |||
| 2863 | Um zum Beispiel @code{lua} zu entfernen und @code{guile} und | ||
| 2864 | @code{guile-cairo} in einer einzigen Transaktion zu installieren: | ||
| 2865 | |||
| 2866 | @example | ||
| 2867 | guix package -r lua -i guile guile-cairo | ||
| 2868 | @end example | ||
| 2869 | |||
| 2870 | @command{guix package} unterstützt auch ein @dfn{deklaratives Vorgehen}, | ||
| 2871 | wobei der Nutzer die genaue Menge an Paketen, die verfügbar sein sollen, | ||
| 2872 | festlegt und über die Befehlszeilenoption @option{--manifest} übergibt | ||
| 2873 | (siehe @ref{profile-manifest, @option{--manifest}}). | ||
| 2874 | |||
| 2875 | @cindex Profil | ||
| 2876 | Für jeden Benutzer wird automatisch eine symbolische Verknüpfung zu seinem | ||
| 2877 | Standardprofil angelegt als @file{$HOME/.guix-profile}. Diese symbolische | ||
| 2878 | Verknüpfung zeigt immer auf die aktuelle Generation des Standardprofils des | ||
| 2879 | Benutzers. Somit können Nutzer @file{$HOME/.guix-profile/bin} z.B.@: zu | ||
| 2880 | ihrer Umgebungsvariablen @code{PATH} hinzufügen. | ||
| 2881 | @cindex Suchpfade | ||
| 2882 | Wenn Sie nicht die Guix System Distribution benutzen, sollten Sie in | ||
| 2883 | Betracht ziehen, folgende Zeilen zu Ihrem @file{~/.bash_profile} | ||
| 2884 | hinzuzufügen (siehe @ref{Bash Startup Files,,, bash, The GNU Bash Reference | ||
| 2885 | Manual}), damit in neu erzeugten Shells alle Umgebungsvariablen richtig | ||
| 2886 | definiert werden: | ||
| 2887 | |||
| 2888 | @example | ||
| 2889 | GUIX_PROFILE="$HOME/.guix-profile" ; \ | ||
| 2890 | source "$HOME/.guix-profile/etc/profile" | ||
| 2891 | @end example | ||
| 2892 | |||
| 2893 | Ist Ihr System für mehrere Nutzer eingerichtet, werden Nutzerprofile an | ||
| 2894 | einem Ort gespeichert, der als @dfn{Müllsammlerwurzel} registriert ist, auf | ||
| 2895 | die @file{$HOME/.guix-profile} zeigt (siehe @ref{Aufruf von guix gc}). Dieses | ||
| 2896 | Verzeichnis ist normalerweise | ||
| 2897 | @code{@var{localstatedir}/guix/profiles/per-user/@var{Benutzer}}, wobei | ||
| 2898 | @var{localstatedir} der an @code{configure} als @code{--localstatedir} | ||
| 2899 | übergebene Wert ist und @var{Benutzer} für den jeweiligen Benutzernamen | ||
| 2900 | steht. Das @file{per-user}-Verzeichnis wird erstellt, wenn | ||
| 2901 | @command{guix-daemon} gestartet wird, und das Unterverzeichnis | ||
| 2902 | @var{Benutzer} wird durch @command{guix package} erstellt. | ||
| 2903 | |||
| 2904 | Als @var{Optionen} kann vorkommen: | ||
| 2905 | |||
| 2906 | @table @code | ||
| 2907 | |||
| 2908 | @item --install=@var{Paket} @dots{} | ||
| 2909 | @itemx -i @var{Paket} @dots{} | ||
| 2910 | Die angegebenen @var{Paket}e installieren. | ||
| 2911 | |||
| 2912 | Jedes @var{Paket} kann entweder einfach durch seinen Paketnamen aufgeführt | ||
| 2913 | werden, wie @code{guile}, oder als Paketname gefolgt von einem At-Zeichen @@ | ||
| 2914 | und einer Versionsnummer, wie @code{guile@@1.8.8} oder auch nur | ||
| 2915 | @code{guile@@1.8} (in letzterem Fall wird die neueste Version mit Präfix | ||
| 2916 | @code{1.8} ausgewählt.) | ||
| 2917 | |||
| 2918 | Wird keine Versionsnummer angegeben, wird die neueste verfügbare Version | ||
| 2919 | ausgewählt. Zudem kann im @var{Paket} ein Doppelpunkt auftauchen, gefolgt | ||
| 2920 | vom Namen einer der Ausgaben des Pakets, wie @code{gcc:doc} oder | ||
| 2921 | @code{binutils@@2.22:lib} (siehe @ref{Pakete mit mehreren Ausgaben.}). Pakete mit zugehörigem Namen (und optional der Version) werden | ||
| 2922 | unter den Modulen der GNU-Distribution gesucht (siehe @ref{Paketmodule}). | ||
| 2923 | |||
| 2924 | @cindex propagierte Eingaben | ||
| 2925 | Manchmal haben Pakete @dfn{propagierte Eingaben}: Als solche werden | ||
| 2926 | Abhängigkeiten bezeichnet, die automatisch zusammen mit dem angeforderten | ||
| 2927 | Paket installiert werden (im Abschnitt @ref{package-propagated-inputs, | ||
| 2928 | @code{propagated-inputs} in @code{package} objects} sind weitere | ||
| 2929 | Informationen über propagierte Eingaben in Paketdefinitionen zu finden). | ||
| 2930 | |||
| 2931 | @anchor{package-cmd-propagated-inputs} | ||
| 2932 | Ein Beispiel ist die GNU-MPC-Bibliothek: Ihre C-Headerdateien verweisen auf | ||
| 2933 | die der GNU-MPFR-Bibliothek, welche wiederum auf die der GMP-Bibliothek | ||
| 2934 | verweisen. Wenn also MPC installiert wird, werden auch die MPFR- und | ||
| 2935 | GMP-Bibliotheken in das Profil installiert; entfernt man MPC, werden auch | ||
| 2936 | MPFR und GMP entfernt — außer sie wurden noch auf andere Art ausdrücklich | ||
| 2937 | vom Nutzer installiert. | ||
| 2938 | |||
| 2939 | Abgesehen davon setzen Pakete manchmal die Definition von Umgebungsvariablen | ||
| 2940 | für ihre Suchpfade voraus (siehe die Erklärung von @code{--search-paths} | ||
| 2941 | weiter unten). Alle fehlenden oder womöglich falschen Definitionen von | ||
| 2942 | Umgebungsvariablen werden hierbei gemeldet. | ||
| 2943 | |||
| 2944 | @item --install-from-expression=@var{Ausdruck} | ||
| 2945 | @itemx -e @var{Ausdruck} | ||
| 2946 | Das Paket installieren, zu dem der @var{Ausdruck} ausgewertet wird. | ||
| 2947 | |||
| 2948 | Beim @var{Ausdruck} muss es sich um einen Scheme-Ausdruck handeln, der zu | ||
| 2949 | einem @code{<package>}-Objekt ausgewertet wird. Diese Option ist besonders | ||
| 2950 | nützlich, um zwischen gleichnamigen Varianten eines Pakets zu unterscheiden, | ||
| 2951 | durch Ausdrücke wie @code{(@@ (gnu packages base) guile-final)}. | ||
| 2952 | |||
| 2953 | Beachten Sie, dass mit dieser Option die erste Ausgabe des angegebenen | ||
| 2954 | Pakets installiert wird, was unzureichend sein kann, wenn eine bestimmte | ||
| 2955 | Ausgabe eines Pakets mit mehreren Ausgaben gewünscht ist. | ||
| 2956 | |||
| 2957 | @item --install-from-file=@var{Datei} | ||
| 2958 | @itemx -f @var{Datei} | ||
| 2959 | Das Paket installieren, zu dem der Code in der @var{Datei} ausgewertet wird. | ||
| 2960 | |||
| 2961 | Zum Beispiel könnte die @var{Datei} eine Definition wie diese enthalten | ||
| 2962 | (siehe @ref{Pakete definieren}): | ||
| 2963 | |||
| 2964 | @example | ||
| 2965 | @verbatiminclude package-hello.scm | ||
| 2966 | @end example | ||
| 2967 | |||
| 2968 | Entwickler könnten es für nützlich erachten, eine solche | ||
| 2969 | @file{guix.scm}-Datei im Quellbaum ihres Projekts abzulegen, mit der | ||
| 2970 | Zwischenstände der Entwicklung getestet und reproduzierbare | ||
| 2971 | Erstellungsumgebungen aufgebaut werden können (siehe @ref{Aufruf von guix environment}). | ||
| 2972 | |||
| 2973 | @item --remove=@var{Paket} @dots{} | ||
| 2974 | @itemx -r @var{Paket} @dots{} | ||
| 2975 | Die angegebenen @var{Paket}e entfernen. | ||
| 2976 | |||
| 2977 | Wie auch bei @code{--install} kann jedes @var{Paket} neben dem Paketnamen | ||
| 2978 | auch eine Versionsnummer und/oder eine Ausgabe benennen. Zum Beispiel würde | ||
| 2979 | @code{-r glibc:debug} die @code{debug}-Ausgabe von @code{glibc} aus dem | ||
| 2980 | Profil entfernen. | ||
| 2981 | |||
| 2982 | @item --upgrade[=@var{Regexp} @dots{}] | ||
| 2983 | @itemx -u [@var{Regexp} @dots{}] | ||
| 2984 | @cindex Pakete aktualisieren | ||
| 2985 | Alle installierten Pakete aktualisieren. Wenn einer oder mehr reguläre | ||
| 2986 | Ausdrücke (Regexps) angegeben wurden, werden nur diejenigen installierten | ||
| 2987 | Pakete aktualisiert, deren Name zu einer der @var{Regexp}s passt. Siehe auch | ||
| 2988 | weiter unten die Befehlszeilenoption @code{--do-not-upgrade}. | ||
| 2989 | |||
| 2990 | Beachten Sie, dass das Paket so auf die neueste Version unter den Paketen | ||
| 2991 | gebracht wird, die in der aktuell installierten Distribution vorliegen. Um | ||
| 2992 | jedoch Ihre Distribution zu aktualisieren, sollten Sie regelmäßig | ||
| 2993 | @command{guix pull} ausführen (siehe @ref{Aufruf von guix pull}). | ||
| 2994 | |||
| 2995 | @item --do-not-upgrade[=@var{Regexp} @dots{}] | ||
| 2996 | In Verbindung mit der Befehlszeilenoption @code{--upgrade}, führe | ||
| 2997 | @emph{keine} Aktualisierung von Paketen durch, deren Name zum regulären | ||
| 2998 | Ausdruck @var{Regexp} passt. Um zum Beispiel alle Pakete im aktuellen Profil | ||
| 2999 | zu aktualisieren mit Ausnahme derer, die »emacs« im Namen haben: | ||
| 3000 | |||
| 3001 | @example | ||
| 3002 | $ guix package --upgrade . --do-not-upgrade emacs | ||
| 3003 | @end example | ||
| 3004 | |||
| 3005 | @item @anchor{profile-manifest}--manifest=@var{Datei} | ||
| 3006 | @itemx -m @var{Datei} | ||
| 3007 | @cindex Profildeklaration | ||
| 3008 | @cindex Profilmanifest | ||
| 3009 | Erstellt eine neue Generation des Profils aus dem vom Scheme-Code in | ||
| 3010 | @var{Datei} gelieferten Manifest-Objekt. | ||
| 3011 | |||
| 3012 | Dadurch könnrn Sie den Inhalt des Profils @emph{deklarieren}, statt ihn | ||
| 3013 | durch eine Folge von Befehlen wie @code{--install} u.Ä. zu generieren. Der | ||
| 3014 | Vorteil ist, dass die @var{Datei} unter Versionskontrolle gestellt werden | ||
| 3015 | kann, auf andere Maschinen zum Reproduzieren desselben Profils kopiert | ||
| 3016 | werden kann und Ähnliches. | ||
| 3017 | |||
| 3018 | @c FIXME: Add reference to (guix profile) documentation when available. | ||
| 3019 | Der Code in der @var{Datei} muss ein @dfn{Manifest}-Objekt liefern, was | ||
| 3020 | ungefähr einer Liste von Paketen entspricht: | ||
| 3021 | |||
| 3022 | @findex packages->manifest | ||
| 3023 | @example | ||
| 3024 | (use-package-modules guile emacs) | ||
| 3025 | |||
| 3026 | (packages->manifest | ||
| 3027 | (list emacs | ||
| 3028 | guile-2.0 | ||
| 3029 | ;; Eine bestimmte Paketausgabe nutzen. | ||
| 3030 | (list guile-2.0 "debug"))) | ||
| 3031 | @end example | ||
| 3032 | |||
| 3033 | @findex specifications->manifest | ||
| 3034 | In diesem Beispiel müssen wir wissen, welche Module die Variablen | ||
| 3035 | @code{emacs} und @code{guile-2.0} definieren, um die richtige Angabe mit | ||
| 3036 | @code{use-package-modules} machen zu können, was umständlich sein kann. Wir | ||
| 3037 | können auch normale Paketnamen angeben und sie durch | ||
| 3038 | @code{specifications->manifest} zu den entsprechenden Paketobjekten | ||
| 3039 | auflösen, zum Beispiel so: | ||
| 3040 | |||
| 3041 | @example | ||
| 3042 | (specifications->manifest | ||
| 3043 | '("emacs" "guile@@2.2" "guile@@2.2:debug")) | ||
| 3044 | @end example | ||
| 3045 | |||
| 3046 | @item --roll-back | ||
| 3047 | @cindex rücksetzen | ||
| 3048 | @cindex Zurücksetzen von Transaktionen | ||
| 3049 | @cindex Transaktionen, zurücksetzen | ||
| 3050 | Wechselt zur vorherigen @dfn{Generation} des Profils zurück — d.h.@: macht | ||
| 3051 | die letzte Transaktion rückgängig. | ||
| 3052 | |||
| 3053 | In Verbindung mit Befehlszeilenoptionen wie @code{--install} wird zuerst | ||
| 3054 | zurückgesetzt, bevor andere Aktionen durchgeführt werden. | ||
| 3055 | |||
| 3056 | Ein Rücksetzen der ersten Generation, die installierte Pakete enthält, | ||
| 3057 | wechselt das Profil zur @dfn{nullten Generation}, die keinerlei Dateien | ||
| 3058 | enthält, abgesehen von Metadaten über sich selbst. | ||
| 3059 | |||
| 3060 | Nach dem Zurücksetzen überschreibt das Installieren, Entfernen oder | ||
| 3061 | Aktualisieren von Paketen vormals zukünftige Generationen, d.h.@: der | ||
| 3062 | Verlauf der Generationen eines Profils ist immer linear. | ||
| 3063 | |||
| 3064 | @item --switch-generation=@var{Muster} | ||
| 3065 | @itemx -S @var{Muster} | ||
| 3066 | @cindex Generationen | ||
| 3067 | Wechselt zu der bestimmten Generation, die durch das @var{Muster} bezeichnet | ||
| 3068 | wird. | ||
| 3069 | |||
| 3070 | Als @var{Muster} kann entweder die Nummer einer Generation oder eine Nummer | ||
| 3071 | mit vorangestelltem »+« oder »-« dienen. Letzteres springt die angegebene | ||
| 3072 | Anzahl an Generationen vor oder zurück. Zum Beispiel kehrt | ||
| 3073 | @code{--switch-generation=+1} nach einem Zurücksetzen wieder zur neueren | ||
| 3074 | Generation zurück. | ||
| 3075 | |||
| 3076 | Der Unterschied zwischen @code{--roll-back} und | ||
| 3077 | @code{--switch-generation=-1} ist, dass @code{--switch-generation} keine | ||
| 3078 | nullte Generation erzeugen wird; existiert die angegebene Generation nicht, | ||
| 3079 | bleibt schlicht die aktuelle Generation erhalten. | ||
| 3080 | |||
| 3081 | @item --search-paths[=@var{Art}] | ||
| 3082 | @cindex Suchpfade | ||
| 3083 | Führe die Definitionen von Umgebungsvariablen auf, in Bash-Syntax, die nötig | ||
| 3084 | sein könnten, um alle installierten Pakete nutzen zu können. Diese | ||
| 3085 | Umgebungsvariablen werden benutzt, um die @dfn{Suchpfade} für Dateien | ||
| 3086 | festzulegen, die von einigen installierten Paketen benutzt werden. | ||
| 3087 | |||
| 3088 | Zum Beispiel braucht GCC die Umgebungsvariablen @code{CPATH} und | ||
| 3089 | @code{LIBRARY_PATH}, um zu wissen, wo sich im Benutzerprofil Header und | ||
| 3090 | Bibliotheken befinden (siehe @ref{Environment Variables,,, gcc, Using the | ||
| 3091 | GNU Compiler Collection (GCC)}). Wenn GCC und, sagen wir, die C-Bibliothek | ||
| 3092 | im Profil installiert sind, schlägt @code{--search-paths} also vor, diese | ||
| 3093 | Variablen jeweils auf @code{@var{profile}/include} und | ||
| 3094 | @code{@var{profile}/lib} verweisen zu lassen. | ||
| 3095 | |||
| 3096 | Die typische Nutzung ist, in der Shell diese Variablen zu definieren: | ||
| 3097 | |||
| 3098 | @example | ||
| 3099 | $ eval `guix package --search-paths` | ||
| 3100 | @end example | ||
| 3101 | |||
| 3102 | Als @var{Art} kann entweder @code{exact}, @code{prefix} oder @code{suffix} | ||
| 3103 | gewählt werden, wodurch die gelieferten Definitionen der Umgebungsvariablen | ||
| 3104 | entweder exakt die Einstellungen für Guix meldet, oder sie als Präfix oder | ||
| 3105 | Suffix an den aktuellen Wert dieser Variablen anhängt. Gibt man keine | ||
| 3106 | @var{Art} an, wird der Vorgabewert @code{exact} verwendet. | ||
| 3107 | |||
| 3108 | Diese Befehlszeilenoption kann auch benutzt werden, um die | ||
| 3109 | @emph{kombinierten} Suchpfade mehrerer Profile zu berechnen. Betrachten Sie | ||
| 3110 | dieses Beispiel: | ||
| 3111 | |||
| 3112 | @example | ||
| 3113 | $ guix package -p foo -i guile | ||
| 3114 | $ guix package -p bar -i guile-json | ||
| 3115 | $ guix package -p foo -p bar --search-paths | ||
| 3116 | @end example | ||
| 3117 | |||
| 3118 | Der letzte Befehl oben meldet auch die Definition der Umgebungsvariablen | ||
| 3119 | @code{GUILE_LOAD_PATH}, obwohl für sich genommen weder @file{foo} noch | ||
| 3120 | @file{bar} zu dieser Empfehlung führen würden. | ||
| 3121 | |||
| 3122 | |||
| 3123 | @item --profile=@var{Profil} | ||
| 3124 | @itemx -p @var{Profil} | ||
| 3125 | Auf @var{Profil} anstelle des Standardprofils des Benutzers arbeiten. | ||
| 3126 | |||
| 3127 | @cindex Kollisionen, in einem Profil | ||
| 3128 | @cindex Paketkollisionen in Profilen | ||
| 3129 | @cindex Profilkollisionen | ||
| 3130 | @item --allow-collisions | ||
| 3131 | Kollidierende Pakete im neuen Profil zulassen. Benutzung auf eigene Gefahr! | ||
| 3132 | |||
| 3133 | Standardmäßig wird @command{guix package} @dfn{Kollisionen} als Fehler | ||
| 3134 | auffassen und melden. Zu Kollisionen kommt es, wenn zwei oder mehr | ||
| 3135 | verschiedene Versionen oder Varianten desselben Pakets im Profil landen. | ||
| 3136 | |||
| 3137 | @item --bootstrap | ||
| 3138 | Erstellt das Profil mit dem Bootstrap-Guile. Diese Option ist nur für | ||
| 3139 | Entwickler der Distribution nützlich. | ||
| 3140 | |||
| 3141 | @end table | ||
| 3142 | |||
| 3143 | Zusätzlich zu diesen Aktionen unterstützt @command{guix package} folgende | ||
| 3144 | Befehlszeilenoptionen, um den momentanen Zustand eines Profils oder die | ||
| 3145 | Verfügbarkeit von Paketen nachzulesen: | ||
| 3146 | |||
| 3147 | @table @option | ||
| 3148 | |||
| 3149 | @item --search=@var{Regexp} | ||
| 3150 | @itemx -s @var{Regexp} | ||
| 3151 | @cindex Suche nach Paketen | ||
| 3152 | Führt alle verfügbaren Pakete auf, deren Name, Zusammenfassung oder | ||
| 3153 | Beschreibung zum regulären Ausdruck @var{Regexp} passt, ohne Groß- und | ||
| 3154 | Kleinschreibung zu unterscheiden und sortiert nach ihrer Relevanz. Alle | ||
| 3155 | Metadaten passender Pakete werden im @code{recutils}-Format geliefert (siehe | ||
| 3156 | @ref{Top, GNU recutils databases,, recutils, GNU recutils manual}). | ||
| 3157 | |||
| 3158 | So können bestimmte Felder mit dem Befehl @command{recsel} extrahiert | ||
| 3159 | werden, zum Beispiel: | ||
| 3160 | |||
| 3161 | @example | ||
| 3162 | $ guix package -s malloc | recsel -p name,version,relevance | ||
| 3163 | name: jemalloc | ||
| 3164 | version: 4.5.0 | ||
| 3165 | relevance: 6 | ||
| 3166 | |||
| 3167 | name: glibc | ||
| 3168 | version: 2.25 | ||
| 3169 | relevance: 1 | ||
| 3170 | |||
| 3171 | name: libgc | ||
| 3172 | version: 7.6.0 | ||
| 3173 | relevance: 1 | ||
| 3174 | @end example | ||
| 3175 | |||
| 3176 | Ebenso kann der Name aller zu den Bedingungen der GNU@tie{}LGPL, Version 3, | ||
| 3177 | verfügbaren Pakete ermittelt werden: | ||
| 3178 | |||
| 3179 | @example | ||
| 3180 | $ guix package -s "" | recsel -p name -e 'license ~ "LGPL 3"' | ||
| 3181 | name: elfutils | ||
| 3182 | |||
| 3183 | name: gmp | ||
| 3184 | @dots{} | ||
| 3185 | @end example | ||
| 3186 | |||
| 3187 | Es ist auch möglich, Suchergebnisse näher einzuschränken, indem Sie | ||
| 3188 | @code{-s} mehrmals übergeben. Zum Beispiel liefert folgender Befehl eines | ||
| 3189 | Liste von Brettspielen: | ||
| 3190 | |||
| 3191 | @example | ||
| 3192 | $ guix package -s '\<board\>' -s game | recsel -p name | ||
| 3193 | name: gnubg | ||
| 3194 | @dots{} | ||
| 3195 | @end example | ||
| 3196 | |||
| 3197 | Würden wir @code{-s game} weglassen, bekämen wir auch Software-Pakete | ||
| 3198 | aufgelistet, die mit »printed circuit boards« (elektronischen Leiterplatten) | ||
| 3199 | zu tun haben; ohne die spitzen Klammern um @code{board} bekämen wir auch | ||
| 3200 | Pakete, die mit »keyboards« (Tastaturen, oder musikalischen Keyboard) zu tun | ||
| 3201 | haben. | ||
| 3202 | |||
| 3203 | Es ist Zeit für ein komplexeres Beispiel. Folgender Befehl sucht | ||
| 3204 | kryptografische Bibliotheken, filtert Haskell-, Perl-, Python- und | ||
| 3205 | Ruby-Bibliotheken heraus und gibt Namen und Zusammenfassung passender Pakete | ||
| 3206 | aus: | ||
| 3207 | |||
| 3208 | @example | ||
| 3209 | $ guix package -s crypto -s library | \ | ||
| 3210 | recsel -e '! (name ~ "^(ghc|perl|python|ruby)")' -p name,synopsis | ||
| 3211 | @end example | ||
| 3212 | |||
| 3213 | @noindent | ||
| 3214 | Siehe @ref{Selection Expressions,,, recutils, GNU recutils manual}, es | ||
| 3215 | enthält weitere Informationen über @dfn{Auswahlausdrücke} mit @code{recsel | ||
| 3216 | -e}. | ||
| 3217 | |||
| 3218 | @item --show=@var{Paket} | ||
| 3219 | Zeigt Details über das @var{Paket} aus der Liste verfügbarer Pakete, im | ||
| 3220 | @code{recutils}-Format (siehe @ref{Top, GNU recutils databases,, recutils, | ||
| 3221 | GNU recutils manual}). | ||
| 3222 | |||
| 3223 | @example | ||
| 3224 | $ guix package --show=python | recsel -p name,version | ||
| 3225 | name: python | ||
| 3226 | version: 2.7.6 | ||
| 3227 | |||
| 3228 | name: python | ||
| 3229 | version: 3.3.5 | ||
| 3230 | @end example | ||
| 3231 | |||
| 3232 | Sie können auch den vollständigen Namen eines Pakets angeben, um Details nur | ||
| 3233 | über diese Version angezeigt zu bekommen: | ||
| 3234 | @example | ||
| 3235 | $ guix package --show=python@@3.4 | recsel -p name,version | ||
| 3236 | name: python | ||
| 3237 | version: 3.4.3 | ||
| 3238 | @end example | ||
| 3239 | |||
| 3240 | |||
| 3241 | |||
| 3242 | @item --list-installed[=@var{Regexp}] | ||
| 3243 | @itemx -I [@var{Regexp}] | ||
| 3244 | Listet die derzeit installierten Pakete im angegebenen Profil auf, die | ||
| 3245 | zuletzt installierten Pakete zuletzt. Wenn ein regulärer Ausdruck | ||
| 3246 | @var{Regexp} angegeben wird, werden nur installierte Pakete aufgeführt, | ||
| 3247 | deren Name zu @var{Regexp} passt. | ||
| 3248 | |||
| 3249 | Zu jedem installierten Paket werden folgende Informationen angezeigt, durch | ||
| 3250 | Tabulatorzeichen getrennt: der Paketname, die Version als Zeichenkette, | ||
| 3251 | welche Teile des Pakets installiert sind (zum Beispiel @code{out}, wenn die | ||
| 3252 | Standard-Paketausgabe installiert ist, @code{include}, wenn seine Header | ||
| 3253 | installiert sind, usw.)@: und an welchem Pfad das Paket im Store zu finden | ||
| 3254 | ist. | ||
| 3255 | |||
| 3256 | @item --list-available[=@var{Regexp}] | ||
| 3257 | @itemx -A [@var{Regexp}] | ||
| 3258 | Listet Pakete auf, die in der aktuell installierten Distribution dieses | ||
| 3259 | Systems verfügbar sind (siehe @ref{GNU-Distribution}). Wenn ein regulärer | ||
| 3260 | Ausdruck @var{Regexp} angegeben wird, werden nur Pakete aufgeführt, deren | ||
| 3261 | Name zum regulären Ausdruck @var{Regexp} passt. | ||
| 3262 | |||
| 3263 | Zu jedem Paket werden folgende Informationen getrennt durch Tabulatorzeichen | ||
| 3264 | ausgegeben: der Name, die Version als Zeichenkette, die Teile des Programms | ||
| 3265 | (siehe @ref{Pakete mit mehreren Ausgaben.}) und die Stelle im Quellcode, an | ||
| 3266 | der das Paket definiert ist. | ||
| 3267 | |||
| 3268 | @item --list-generations[=@var{Muster}] | ||
| 3269 | @itemx -l [@var{Muster}] | ||
| 3270 | @cindex Generationen | ||
| 3271 | Liefert eine Liste der Generationen zusammen mit dem Datum, an dem sie | ||
| 3272 | erzeugt wurden; zu jeder Generation werden zudem die installierten Pakete | ||
| 3273 | angezeigt, zuletzt installierte Pakete zuletzt. Beachten Sie, dass die | ||
| 3274 | nullte Generation niemals angezeigt wird. | ||
| 3275 | |||
| 3276 | Zu jedem installierten Paket werden folgende Informationen durch | ||
| 3277 | Tabulatorzeichen getrennt angezeigt: der Name des Pakets, die Version als | ||
| 3278 | Zeichenkette, welcher Teil des Pakets installiert ist (siehe @ref{Pakete mit mehreren Ausgaben.}) und an welcher Stelle sich das Paket im Store | ||
| 3279 | befindet. | ||
| 3280 | |||
| 3281 | Wenn ein @var{Muster} angegeben wird, liefert der Befehl nur dazu passende | ||
| 3282 | Generationen. Gültige Muster sind zum Beispiel: | ||
| 3283 | |||
| 3284 | @itemize | ||
| 3285 | @item @emph{Ganze Zahlen und kommagetrennte ganze Zahlen}. Beide Muster bezeichnen | ||
| 3286 | Generationsnummern. Zum Beispiel liefert @code{--list-generations=1} die | ||
| 3287 | erste Generation. | ||
| 3288 | |||
| 3289 | Durch @code{--list-generations=1,8,2} werden drei Generationen in der | ||
| 3290 | angegebenen Reihenfolge angezeigt. Weder Leerzeichen noch ein Komma am | ||
| 3291 | Schluss der Liste ist erlaubt. | ||
| 3292 | |||
| 3293 | @item @emph{Bereiche}. @code{--list-generations=2..9} gibt die | ||
| 3294 | angegebenen Generationen und alles dazwischen aus. Beachten Sie, dass der | ||
| 3295 | Bereichsanfang eine kleinere Zahl als das Bereichsende sein muss. | ||
| 3296 | |||
| 3297 | Sie können auch kein Bereichsende angeben, zum Beispiel liefert | ||
| 3298 | @code{--list-generations=2..} alle Generationen ab der zweiten. | ||
| 3299 | |||
| 3300 | @item @emph{Zeitdauern}. Sie können auch die letzten @emph{N}@tie{}Tage, Wochen | ||
| 3301 | oder Monate angeben, indem Sie eine ganze Zahl gefolgt von jeweils »d«, »w« | ||
| 3302 | oder »m« angeben (dem ersten Buchstaben der Maßeinheit der Dauer im | ||
| 3303 | Englischen). Zum Beispiel listet @code{--list-generations=20d} die | ||
| 3304 | Generationen auf, die höchstens 20 Tage alt sind. | ||
| 3305 | @end itemize | ||
| 3306 | |||
| 3307 | @item --delete-generations[=@var{Muster}] | ||
| 3308 | @itemx -d [@var{Muster}] | ||
| 3309 | Wird kein @var{Muster} angegeben, werden alle Generationen außer der | ||
| 3310 | aktuellen entfernt. | ||
| 3311 | |||
| 3312 | Dieser Befehl akzeptiert dieselben Muster wie | ||
| 3313 | @option{--list-generations}. Wenn ein @var{Muster} angegeben wird, werden | ||
| 3314 | die passenden Generationen gelöscht. Wenn das @var{Muster} für eine | ||
| 3315 | Zeitdauer steht, werden diejenigen Generationen gelöscht, die @emph{älter} | ||
| 3316 | als die angegebene Dauer sind. Zum Beispiel löscht | ||
| 3317 | @code{--delete-generations=1m} die Generationen, die mehr als einen Monat | ||
| 3318 | alt sind. | ||
| 3319 | |||
| 3320 | Falls die aktuelle Generation zum Muster passt, wird sie @emph{nicht} | ||
| 3321 | gelöscht. Auch die nullte Generation wird niemals gelöscht. | ||
| 3322 | |||
| 3323 | Beachten Sie, dass Sie auf gelöschte Generationen nicht zurückwechseln | ||
| 3324 | können. Dieser Befehl sollte also nur mit Vorsicht benutzt werden. | ||
| 3325 | |||
| 3326 | @end table | ||
| 3327 | |||
| 3328 | Zu guter Letzt können Sie, da @command{guix package} Erstellungsprozesse zu | ||
| 3329 | starten vermag, auch alle gemeinsamen Erstellungsoptionen (siehe @ref{Gemeinsame Erstellungsoptionen}) verwenden. Auch Paketumwandlungsoptionen wie | ||
| 3330 | @option{--with-source} sind möglich (siehe @ref{Paketumwandlungsoptionen}). Beachten Sie jedoch, dass die verwendeten | ||
| 3331 | Paketumwandlungsoptionen verloren gehen, nachdem Sie die Pakete aktualisiert | ||
| 3332 | haben. Damit Paketumwandlungen über Aktualisierungen hinweg erhalten | ||
| 3333 | bleiben, sollten Sie Ihre eigene Paketvariante in einem Guile-Modul | ||
| 3334 | definieren und zur Umgebungsvariablen @code{GUIX_PACKAGE_PATH} hinzufügen | ||
| 3335 | (siehe @ref{Pakete definieren}). | ||
| 3336 | |||
| 3337 | @node Substitute | ||
| 3338 | @section Substitute | ||
| 3339 | |||
| 3340 | @cindex Substitute | ||
| 3341 | @cindex vorerstellte Binärdateien | ||
| 3342 | Guix kann transparent Binär- oder Quelldateien ausliefern. Das heißt, Dinge | ||
| 3343 | können sowohl lokal erstellt, als auch als vorerstellte Objekte von einem | ||
| 3344 | Server heruntergeladen werden, oder beides gemischt. Wir bezeichnen diese | ||
| 3345 | vorerstellten Objekte als @dfn{Substitute} — sie substituieren lokale | ||
| 3346 | Erstellungsergebnisse. In vielen Fällen geht das Herunterladen eines | ||
| 3347 | Substituts wesentlich schneller, als Dinge lokal zu erstellen. | ||
| 3348 | |||
| 3349 | Substitute können alles sein, was das Ergebnis einer Ableitungserstellung | ||
| 3350 | ist (siehe @ref{Ableitungen}). Natürlich sind sie üblicherweise vorerstellte | ||
| 3351 | Paket-Binärdateien, aber wenn zum Beispiel ein Quell-Tarball das Ergebnis | ||
| 3352 | einer Ableitungserstellung ist, kann auch er als Substitut verfügbar sein. | ||
| 3353 | |||
| 3354 | @menu | ||
| 3355 | * Offizieller Substitut-Server:: Eine besondere Quelle von Substituten. | ||
| 3356 | * Substitut-Server autorisieren:: Wie man Substitute an- und abschaltet. | ||
| 3357 | * Substitutauthentifizierung:: Wie Guix Substitute verifiziert. | ||
| 3358 | * Proxy-Einstellungen:: Wie Sie Substitute über einen Proxy beziehen. | ||
| 3359 | * Fehler bei der Substitution:: Was passiert, wenn die Substitution | ||
| 3360 | fehlschlägt. | ||
| 3361 | * Vom Vertrauen gegenüber Binärdateien:: Wie können Sie diesem binären | ||
| 3362 | Blob trauen? | ||
| 3363 | @end menu | ||
| 3364 | |||
| 3365 | @node Offizieller Substitut-Server | ||
| 3366 | @subsection Offizieller Substitut-Server | ||
| 3367 | |||
| 3368 | @cindex Hydra | ||
| 3369 | @cindex Build-Farm | ||
| 3370 | Der Server @code{@value{SUBSTITUTE-SERVER}} ist die Fassade für eine | ||
| 3371 | offizielle »Build-Farm«, ein Erstellungswerk, das kontinuierlich Guix-Pakete | ||
| 3372 | für einige Prozessorarchitekturen erstellt und sie als Substitute zur | ||
| 3373 | Verfügung stellt. Dies ist die standardmäßige Quelle von Substituten; durch | ||
| 3374 | Übergeben der Befehlszeilenoption @option{--substitute-urls} an entweder den | ||
| 3375 | @command{guix-daemon} (siehe @ref{daemon-substitute-urls,, @code{guix-daemon | ||
| 3376 | --substitute-urls}}) oder Client-Werkzeuge wie @command{guix package} (siehe | ||
| 3377 | @ref{client-substitute-urls,, die Befehlszeilenoption | ||
| 3378 | @option{--substitute-urls} beim Client}) kann eine abweichende Einstellung | ||
| 3379 | benutzt werden. | ||
| 3380 | |||
| 3381 | Substitut-URLs können entweder HTTP oder HTTPS sein. HTTPS wird empfohlen, | ||
| 3382 | weil die Kommunikation verschlüsselt ist; umgekehrt kann bei HTTP die | ||
| 3383 | Kommunikation belauscht werden, wodurch der Angreifer zum Beispiel erfahren | ||
| 3384 | könnte, ob Ihr System über noch nicht behobene Sicherheitsschwachstellen | ||
| 3385 | verfügt. | ||
| 3386 | |||
| 3387 | Substitute von der offiziellen Build-Farm sind standardmäßig erlaubt, wenn | ||
| 3388 | Sie die Guix-System-Distribution verwenden (siehe @ref{GNU-Distribution}). Auf Fremddistributionen sind sie allerdings standardmäßig | ||
| 3389 | ausgeschaltet, solange Sie sie nicht ausdrücklich in einem der empfohlenen | ||
| 3390 | Installationsschritte erlaubt haben (siehe @ref{Installation}). Die | ||
| 3391 | folgenden Absätze beschreiben, wie Sie Substitute für die offizielle | ||
| 3392 | Build-Farm an- oder ausschalten; dieselbe Prozedur kann auch benutzt werden, | ||
| 3393 | um Substitute für einen beliebigen anderen Substitutsserver zu erlauben. | ||
| 3394 | |||
| 3395 | @node Substitut-Server autorisieren | ||
| 3396 | @subsection Substitut-Server autorisieren | ||
| 3397 | |||
| 3398 | @cindex Sicherheit | ||
| 3399 | @cindex Substitute, deren Autorisierung | ||
| 3400 | @cindex Access Control List (ACL), für Substitute | ||
| 3401 | @cindex ACL (Access Control List), für Substitute | ||
| 3402 | Um es Guix zu gestatten, Substitute von @code{@value{SUBSTITUTE-SERVER}} | ||
| 3403 | oder einem Spiegelserver davon herunterzuladen, müssen Sie den zugehörigen | ||
| 3404 | öffentlichen Schlüssel zur Access Control List (ACL, | ||
| 3405 | Zugriffssteuerungsliste) für Archivimporte hinzufügen, mit Hilfe des Befehls | ||
| 3406 | @command{guix archive} (siehe @ref{Aufruf von guix archive}). Dies impliziert, | ||
| 3407 | dass Sie darauf vertrauen, dass @code{@value{SUBSTITUTE-SERVER}} nicht | ||
| 3408 | kompromittiert wurde und echte Substitute liefert. | ||
| 3409 | |||
| 3410 | Der öffentliche Schlüssel für @code{@value{SUBSTITUTE-SERVER}} wird zusammen | ||
| 3411 | mit Guix installiert, in das Verzeichnis | ||
| 3412 | @code{@var{prefix}/share/guix/hydra.gnu.org.pub}, wobei @var{prefix} das bei | ||
| 3413 | der Installation angegebene Präfix von Guix ist. Wenn Sie Guix aus seinem | ||
| 3414 | Quellcode heraus installieren, sollten Sie sichergehen, dass Sie die | ||
| 3415 | GPG-Signatur (auch »Beglaubigung« genannt) von | ||
| 3416 | @file{guix-@value{VERSION}.tar.gz} prüfen, worin sich dieser öffentliche | ||
| 3417 | Schlüssel befindet. Dann können Sie so etwas wie hier ausführen: | ||
| 3418 | |||
| 3419 | @example | ||
| 3420 | # guix archive --authorize < @var{prefix}/share/guix/@value{SUBSTITUTE-SERVER}.pub | ||
| 3421 | @end example | ||
| 3422 | |||
| 3423 | @quotation Anmerkung | ||
| 3424 | Genauso enthält die Datei @file{hydra.gnu.org.pub} den öffentlichen | ||
| 3425 | Schlüssel für eine unabhängige Build-Farm, die auch vom Guix-Projekt | ||
| 3426 | betrieben wird. Sie ist unter @indicateurl{https://mirror.hydra.gnu.org} | ||
| 3427 | erreichbar ist. | ||
| 3428 | @end quotation | ||
| 3429 | |||
| 3430 | Sobald es eingerichtet wurde, sollte sich die Ausgabe eines Befehls wie | ||
| 3431 | @code{guix build} von so etwas: | ||
| 3432 | |||
| 3433 | @example | ||
| 3434 | $ guix build emacs --dry-run | ||
| 3435 | Folgende Ableitungen würden erstellt: | ||
| 3436 | /gnu/store/yr7bnx8xwcayd6j95r2clmkdl1qh688w-emacs-24.3.drv | ||
| 3437 | /gnu/store/x8qsh1hlhgjx6cwsjyvybnfv2i37z23w-dbus-1.6.4.tar.gz.drv | ||
| 3438 | /gnu/store/1ixwp12fl950d15h2cj11c73733jay0z-alsa-lib-1.0.27.1.tar.bz2.drv | ||
| 3439 | /gnu/store/nlma1pw0p603fpfiqy7kn4zm105r5dmw-util-linux-2.21.drv | ||
| 3440 | @dots{} | ||
| 3441 | @end example | ||
| 3442 | |||
| 3443 | @noindent | ||
| 3444 | in so etwas verwandeln: | ||
| 3445 | |||
| 3446 | @example | ||
| 3447 | $ guix build emacs --dry-run | ||
| 3448 | 112.3 MB würden heruntergeladen: | ||
| 3449 | /gnu/store/pk3n22lbq6ydamyymqkkz7i69wiwjiwi-emacs-24.3 | ||
| 3450 | /gnu/store/2ygn4ncnhrpr61rssa6z0d9x22si0va3-libjpeg-8d | ||
| 3451 | /gnu/store/71yz6lgx4dazma9dwn2mcjxaah9w77jq-cairo-1.12.16 | ||
| 3452 | /gnu/store/7zdhgp0n1518lvfn8mb96sxqfmvqrl7v-libxrender-0.9.7 | ||
| 3453 | @dots{} | ||
| 3454 | @end example | ||
| 3455 | |||
| 3456 | @noindent | ||
| 3457 | Das zeigt an, dass Substitute von @code{@value{SUBSTITUTE-SERVER}} nutzbar | ||
| 3458 | sind und für zukünftige Erstellungen heruntergeladen werden, wann immer es | ||
| 3459 | möglich ist. | ||
| 3460 | |||
| 3461 | @cindex Substitute, wie man sie ausschaltet | ||
| 3462 | Der Substitutsmechanismus kann global ausgeschaltet werden, indem Sie dem | ||
| 3463 | @code{guix-daemon} beim Starten die Befehlszeilenoption | ||
| 3464 | @code{--no-substitutes} übergeben (siehe @ref{Aufruf des guix-daemon}). Er | ||
| 3465 | kann auch temporär ausgeschaltet werden, indem Sie @code{--no-substitutes} | ||
| 3466 | an @command{guix package}, @command{guix build} und andere | ||
| 3467 | Befehlszeilenwerkzeuge übergeben. | ||
| 3468 | |||
| 3469 | @node Substitutauthentifizierung | ||
| 3470 | @subsection Substitutauthentifizierung | ||
| 3471 | |||
| 3472 | @cindex digitale Signaturen | ||
| 3473 | Guix erkennt, wenn ein verfälschtes Substitut benutzt würde, und meldet | ||
| 3474 | einen Fehler. Ebenso werden Substitute ignoriert, die nich signiert sind, | ||
| 3475 | oder nicht mit einem in der ACL aufgelisteten Schlüssel signiert sind. | ||
| 3476 | |||
| 3477 | Es gibt nur eine Ausnahme: Wenn ein unautorisierter Server Substitute | ||
| 3478 | anbietet, die @emph{Bit für Bit identisch} mit denen von einem autorisierten | ||
| 3479 | Server sind, können sie auch vom unautorisierten Server heruntergeladen | ||
| 3480 | werden. Zum Beispiel, angenommen wir haben zwei Substitutserver mit dieser | ||
| 3481 | Befehlszeilenoption ausgewählt: | ||
| 3482 | |||
| 3483 | @example | ||
| 3484 | --substitute-urls="https://a.example.org https://b.example.org" | ||
| 3485 | @end example | ||
| 3486 | |||
| 3487 | @noindent | ||
| 3488 | @cindex Reproduzierbare Erstellungen | ||
| 3489 | Wenn in der ACL nur der Schlüssel für @code{b.example.org} aufgeführt wurde, | ||
| 3490 | aber @code{a.example.org} @emph{exakt dieselben} Substitute anbietet, wird | ||
| 3491 | Guix auch Substitute von @code{a.example.org} herunterladen, weil es in der | ||
| 3492 | Liste zuerst kommt und als Spiegelserver für @code{b.example.org} aufgefasst | ||
| 3493 | werden kann. In der Praxis haben unabhängige Maschinen bei der Erstellung | ||
| 3494 | normalerweise dieselben Binärdateien als Ergebnis, dank bit-reproduzierbarer | ||
| 3495 | Erstellungen (siehe unten). | ||
| 3496 | |||
| 3497 | Wenn Sie HTTPS benutzen, wird das X.509-Zertifikat des Servers @emph{nicht} | ||
| 3498 | validiert (mit anderen Worten, die Identität des Servers wird nicht | ||
| 3499 | authentifiziert), entgegen dem, was HTTPS-Clients wie Web-Browser | ||
| 3500 | normalerweise tun. Da Guix Substitutinformationen selbst überprüft, wie oben | ||
| 3501 | erklärt, wäre es unnötig (wohingegen mit X.509-Zertifikaten geprüft wird, ob | ||
| 3502 | ein Domain-Name zu öffentlichen Schlüsseln passt). | ||
| 3503 | |||
| 3504 | @node Proxy-Einstellungen | ||
| 3505 | @subsection Proxy-Einstellungen | ||
| 3506 | |||
| 3507 | @vindex http_proxy | ||
| 3508 | Substitute werden über HTTP oder HTTPS heruntergeladen. Die | ||
| 3509 | Umgebungsvariable @code{http_proxy} kann in der Umgebung von | ||
| 3510 | @command{guix-daemon} definiert werden und wirkt sich dann auf das | ||
| 3511 | Herunterladen von Substituten aus. Beachten Sie, dass der Wert von | ||
| 3512 | @code{http_proxy} in der Umgebung, in der @command{guix build}, | ||
| 3513 | @command{guix package} und andere Client-Befehle ausgeführt werden, | ||
| 3514 | @emph{keine Rolle spielt}. | ||
| 3515 | |||
| 3516 | @node Fehler bei der Substitution | ||
| 3517 | @subsection Fehler bei der Substitution | ||
| 3518 | |||
| 3519 | Selbst wenn ein Substitut für eine Ableitung verfügbar ist, schlägt die | ||
| 3520 | versuchte Substitution manchmal fehl. Das kann aus vielen Gründen geschehen: | ||
| 3521 | die Substitutsserver könnten offline sein, das Substitut könnte kürzlich | ||
| 3522 | gelöscht worden sein, die Netzwerkverbindunge könnte unterbrochen worden | ||
| 3523 | sein, usw. | ||
| 3524 | |||
| 3525 | Wenn Substitute aktiviert sind und ein Substitut für eine Ableitung zwar | ||
| 3526 | verfügbar ist, aber die versuchte Substitution fehlschlägt, kann Guix | ||
| 3527 | versuchen, die Ableitung lokal zu erstellen, je nachdem, ob | ||
| 3528 | @code{--fallback} übergeben wurde (siehe @ref{fallback-option,, common build | ||
| 3529 | option @code{--fallback}}). Genauer gesagt, wird keine lokale Erstellung | ||
| 3530 | durchgeführt, solange kein @code{--fallback} angegeben wurde, und die | ||
| 3531 | Ableitung wird als Fehlschlag angesehen. Wenn @code{--fallback} übergeben | ||
| 3532 | wurde, wird Guix versuchen, die Ableitung lokal zu erstellen, und ob die | ||
| 3533 | Ableitung erfolgreich ist oder nicht, hängt davon ab, ob die lokale | ||
| 3534 | Erstellung erfolgreich ist oder nicht. Beachten Sie, dass, falls Substitute | ||
| 3535 | ausgeschaltet oder erst gar kein Substitut verfügbar ist, @emph{immer} eine | ||
| 3536 | lokale Erstellung durchgeführt wird, egal ob @code{--fallback} übergeben | ||
| 3537 | wurde oder nicht. | ||
| 3538 | |||
| 3539 | Um eine Vorstellung zu bekommen, wieviele Substitute gerade verfügbar sind, | ||
| 3540 | können Sie den Befehl @command{guix weather} benutzen (siehe @ref{Aufruf von guix weather}). Dieser Befehl zeigt Statistiken darüber an, wie es um die | ||
| 3541 | von einem Server verfügbaren Substitute steht. | ||
| 3542 | |||
| 3543 | @node Vom Vertrauen gegenüber Binärdateien | ||
| 3544 | @subsection Vom Vertrauen gegenüber Binärdateien | ||
| 3545 | |||
| 3546 | @cindex Vertrauen, gegenüber vorerstellten Binärdateien | ||
| 3547 | Derzeit hängt die Kontrolle jedes Individuums über seine Rechner von | ||
| 3548 | Institutionen, Unternehmen und solchen Gruppierungen ab, die über genug | ||
| 3549 | Macht und Entschlusskraft verfügen, die Rechnerinfrastruktur zu sabotieren | ||
| 3550 | und ihre Schwachstellen auszunutzen. Auch wenn es bequem ist, Substitute von | ||
| 3551 | @code{@value{SUBSTITUTE-SERVER}} zu benutzen, ermuntern wir Nutzer, auch | ||
| 3552 | selbst Erstellungen durchzuführen oder gar ihre eigene Build-Farm zu | ||
| 3553 | betreiben, damit @code{@value{SUBSTITUTE-SERVER}} ein weniger interessantes | ||
| 3554 | Ziel wird. Eine Art, uns zu helfen, ist, die von Ihnen erstellte Software | ||
| 3555 | mit dem Befehl @command{guix publish} zu veröffentlichen, damit andere eine | ||
| 3556 | größere Auswahl haben, von welchem Server sie Substitute beziehen möchten | ||
| 3557 | (siehe @ref{Aufruf von guix publish}). | ||
| 3558 | |||
| 3559 | Guix hat die richtigen Grundlagen, um die Reproduzierbarkeit von | ||
| 3560 | Erstellungen zu maximieren (siehe @ref{Funktionalitäten}). In den meisten Fällen | ||
| 3561 | sollten unabhängige Erstellungen eines bestimmten Pakets zu bitweise | ||
| 3562 | identischen Ergebnissen führen. Wir können also mit Hilfe einer | ||
| 3563 | vielschichtigen Menge an unabhängigen Paketerstellungen die Integrität | ||
| 3564 | unseres Systems besser gewährleisten. Der Befehl @command{guix challenge} | ||
| 3565 | hat das Ziel, Nutzern zu ermöglichen, Substitutserver zu beurteilen, und | ||
| 3566 | Entwickler dabei zu unterstützen, nichtdeterministische Paketerstellungen zu | ||
| 3567 | finden (siehe @ref{Aufruf von guix challenge}). Ebenso ermöglicht es die | ||
| 3568 | Befehlszeilenoption @option{--check} von @command{guix build}, dass Nutzer | ||
| 3569 | bereits installierte Substitute auf Echtheit zu prüfen, indem sie lokal | ||
| 3570 | nachgebaut werden (siehe @ref{build-check, @command{guix build --check}}). | ||
| 3571 | |||
| 3572 | In Zukunft wollen wir, dass Guix Binärdateien an und von Nutzern | ||
| 3573 | peer-to-peer veröffentlichen kann. Wenn Sie mit uns dieses Projekt | ||
| 3574 | diskutieren möchten, kommen Sie auf unsere Mailing-Liste | ||
| 3575 | @email{guix-devel@@gnu.org}. | ||
| 3576 | |||
| 3577 | @node Pakete mit mehreren Ausgaben. | ||
| 3578 | @section Pakete mit mehreren Ausgaben. | ||
| 3579 | |||
| 3580 | @cindex mehrere Ausgaben, bei Paketen | ||
| 3581 | @cindex Paketausgaben | ||
| 3582 | @cindex Ausgaben | ||
| 3583 | |||
| 3584 | Oft haben in Guix definierte Pakete eine einzige @dfn{Ausgabe} — d.h.@: aus | ||
| 3585 | dem Quellpaket entsteht genau ein Verzeichnis im Store. Wenn Sie | ||
| 3586 | @command{guix package -i glibc} ausführen, wird die Standard-Paketausgabe | ||
| 3587 | des GNU-libc-Pakets installiert; die Standardausgabe wird @code{out} | ||
| 3588 | genannt, aber ihr Name kann weggelassen werden, wie sie an obigem Befehl | ||
| 3589 | sehen. In diesem speziellen Fall enthält die Standard-Paketausgabe von | ||
| 3590 | @code{glibc} alle C-Headerdateien, gemeinsamen Bibliotheken (»Shared | ||
| 3591 | Libraries«), statischen Bibliotheken (»Static Libraries«), Dokumentation für | ||
| 3592 | Info sowie andere zusätzliche Dateien. | ||
| 3593 | |||
| 3594 | Manchmal ist es besser, die verschiedenen Arten von Dateien, die aus einem | ||
| 3595 | einzelnen Quellpaket hervorgehen, in getrennte Ausgaben zu unterteilen. Zum | ||
| 3596 | Beispiel installiert die GLib-C-Bibliothek (die von GTK und damit | ||
| 3597 | zusammenhängenden Paketen benutzt wird) mehr als 20 MiB an HTML-Seiten mit | ||
| 3598 | Referenzdokumentation. Um den Nutzern, die das nicht brauchen, Platz zu | ||
| 3599 | sparen, wird die Dokumentation in einer separaten Ausgabe abgelegt, genannt | ||
| 3600 | @code{doc}. Um also die Hauptausgabe von GLib zu installieren, zu der alles | ||
| 3601 | außer der Dokumentation gehört, ist der Befehl: | ||
| 3602 | |||
| 3603 | @example | ||
| 3604 | guix package -i glib | ||
| 3605 | @end example | ||
| 3606 | |||
| 3607 | @cindex Dokumentation | ||
| 3608 | Der Befehl, um die Dokumentation zu installieren, ist: | ||
| 3609 | |||
| 3610 | @example | ||
| 3611 | guix package -i glib:doc | ||
| 3612 | @end example | ||
| 3613 | |||
| 3614 | Manche Pakete installieren Programme mit unterschiedlich großem | ||
| 3615 | »Abhängigkeiten-Fußabdruck«. Zum Beispiel installiert das Paket WordNet | ||
| 3616 | sowohl Befehlszeilenwerkzeuge als auch grafische Benutzerschnittstellen | ||
| 3617 | (GUIs). Erstere hängen nur von der C-Bibliothek ab, während Letztere auch | ||
| 3618 | von Tcl/Tk und den zu Grunde liegenden X-Bibliotheken abhängen. Jedenfalls | ||
| 3619 | belassen wir deshalb die Befehlszeilenwerkzeuge in der | ||
| 3620 | Standard-Paketausgabe, während sich die GUIs in einer separaten Ausgabe | ||
| 3621 | befinden. So können Benutzer, die die GUIs nicht brauchen, Platz sparen. Der | ||
| 3622 | Befehl @command{guix size} kann dabei helfen, solche Situationen zu erkennen | ||
| 3623 | (siehe @ref{Aufruf von guix size}). @command{guix graph} kann auch helfen | ||
| 3624 | (siehe @ref{Aufruf von guix graph}). | ||
| 3625 | |||
| 3626 | In der GNU-Distribution gibt es viele solche Pakete mit mehreren | ||
| 3627 | Ausgaben. Andere Konventionen für Ausgabenamen sind zum Beispiel @code{lib} | ||
| 3628 | für Bibliotheken und eventuell auch ihre Header-Dateien,, @code{bin} für | ||
| 3629 | eigenständige Programme und @code{debug} für Informationen zur | ||
| 3630 | Fehlerbehandlung (siehe @ref{Dateien zur Fehlersuche installieren}). Die Ausgaben | ||
| 3631 | eines Pakets stehen in der dritten Spalte der Anzeige von @command{guix | ||
| 3632 | package --list-available} (siehe @ref{Aufruf von guix package}). | ||
| 3633 | |||
| 3634 | |||
| 3635 | @node Aufruf von guix gc | ||
| 3636 | @section @command{guix gc} aufrufen | ||
| 3637 | |||
| 3638 | @cindex Müllsammler | ||
| 3639 | @cindex Plattenspeicher | ||
| 3640 | Pakete, die zwar installiert sind, aber nicht benutzt werden, können vom | ||
| 3641 | @dfn{Müllsammler} entfernt werden. Mit dem Befehl @command{guix gc} können | ||
| 3642 | Benutzer den Müllsammler ausdrücklich aufrufen, um Speicher im Verzeichnis | ||
| 3643 | @file{/gnu/store} freizugeben. Dies ist der @emph{einzige} Weg, Dateien aus | ||
| 3644 | @file{/gnu/store} zu entfernen — das manuelle Entfernen von Dateien kann den | ||
| 3645 | Store irreparabel beschädigen! | ||
| 3646 | |||
| 3647 | @cindex GC-Wurzeln | ||
| 3648 | @cindex Müllsammlerwurzeln | ||
| 3649 | Der Müllsammler kennt eine Reihe von @dfn{Wurzeln}: Jede Datei in | ||
| 3650 | @file{/gnu/store}, die von einer Wurzel aus erreichbar ist, gilt als | ||
| 3651 | @dfn{lebendig} und kann nicht entfernt werden; jede andere Datei gilt als | ||
| 3652 | @dfn{tot} und ist ein Kandidat, gelöscht zu werden. Die Menge der | ||
| 3653 | Müllsammlerwurzeln (kurz auch »GC-Wurzeln«, von englisch »Garbage | ||
| 3654 | Collector«) umfasst Standard-Benutzerprofile; standardmäßig werden diese | ||
| 3655 | Müllsammlerwurzeln durch symbolische Verknüpfungen in | ||
| 3656 | @file{/var/guix/gcroots} dargestellt. Neue Müllsammlerwurzeln können zum | ||
| 3657 | Beispiel mit @command{guix build --root} festgelegt werden (siehe | ||
| 3658 | @ref{Aufruf von guix build}). Der Befehl @command{guix gc --list-roots} listet | ||
| 3659 | sie auf. | ||
| 3660 | |||
| 3661 | Bevor Sie mit @code{guix gc --collect-garbage} Speicher freimachen, wollen | ||
| 3662 | Sie vielleicht alte Generationen von Benutzerprofilen löschen, damit alte | ||
| 3663 | Paketerstellungen von diesen Generationen entfernt werden können. Führen Sie | ||
| 3664 | dazu @code{guix package --delete-generations} aus (siehe @ref{Aufruf von guix package}). | ||
| 3665 | |||
| 3666 | Unsere Empfehlung ist, dass Sie den Müllsammler regelmäßig laufen lassen und | ||
| 3667 | wenn Sie wenig freien Speicherplatz zur Verfügung haben. Um zum Beispiel | ||
| 3668 | sicherzustellen, dass Sie mindestens 5@tie{}GB auf Ihrer Platte zur | ||
| 3669 | Verfügung haben, benutzen Sie einfach: | ||
| 3670 | |||
| 3671 | @example | ||
| 3672 | guix gc -F 5G | ||
| 3673 | @end example | ||
| 3674 | |||
| 3675 | Es ist völlig sicher, dafür eine nicht interaktive, regelmäßige | ||
| 3676 | Auftragsausführung vorzugeben (siehe @ref{Geplante Auftragsausführung} für eine | ||
| 3677 | Erklärung, wie man das tun kann). @command{guix gc} ohne | ||
| 3678 | Befehlszeilenargumente auszuführen, lässt so viel Müll wie möglich sammeln, | ||
| 3679 | aber das ist oft nicht, was man will, denn so muss man unter Umständen | ||
| 3680 | Software erneut erstellen oder erneut herunterladen, weil der Müllsammler | ||
| 3681 | sie als »tot« ansieht, sie aber zur Erstellung anderer Software wieder | ||
| 3682 | gebraucht wird — das trifft zum Beispiel auf die Compiler-Toolchain zu. | ||
| 3683 | |||
| 3684 | Der Befehl @command{guix gc} hat drei Arbeitsmodi: Er kann benutzt werden, | ||
| 3685 | um als Müllsammler tote Dateien zu entfernen (das Standardverhalten), um | ||
| 3686 | ganz bestimmte, angegebene Datein zu löschen (mit der Befehlszeilenoption | ||
| 3687 | @code{--delete}), um Müllsammlerinformationen auszugeben oder | ||
| 3688 | fortgeschrittenere Anfragen zu verarbeiten. Die | ||
| 3689 | Müllsammler-Befehlszeilenoptionen sind wie folgt: | ||
| 3690 | |||
| 3691 | @table @code | ||
| 3692 | @item --collect-garbage[=@var{Minimum}] | ||
| 3693 | @itemx -C [@var{Minimum}] | ||
| 3694 | Lässt Müll sammeln — z.B.@: nicht erreichbare Dateien in @file{/gnu/store} | ||
| 3695 | und seinen Unterverzeichnissen. Wird keine andere Befehlszeilenoption | ||
| 3696 | angegeben, wird standardmäßig diese durchgeführt. | ||
| 3697 | |||
| 3698 | Wenn ein @var{Minimum} angegeben wurde, hört der Müllsammler auf, sobald | ||
| 3699 | @var{Minimum} Bytes gesammelt wurden. Das @var{Minimum} kann die Anzahl der | ||
| 3700 | Bytes bezeichnen oder mit einer Einheit als Suffix versehen sein, wie etwa | ||
| 3701 | @code{MiB} für Mebibytes und @code{GB} für Gigabytes (siehe @ref{Block size, | ||
| 3702 | size specifications,, coreutils, GNU Coreutils}). | ||
| 3703 | |||
| 3704 | Wird kein @var{Minimum} angegeben, sammelt der Müllsammler allen Müll. | ||
| 3705 | |||
| 3706 | @item --free-space=@var{Menge} | ||
| 3707 | @itemx -F @var{Menge} | ||
| 3708 | Sammelt Müll, bis die angegebene @var{Menge} an freiem Speicher in | ||
| 3709 | @file{/gnu/store} zur Verfügung steht, falls möglich; die @var{Menge} ist | ||
| 3710 | eine Speichergröße wie @code{500MiB}, wie oben beschrieben. | ||
| 3711 | |||
| 3712 | Wenn die angegebene @var{Menge} oder mehr bereits in @file{/gnu/store} frei | ||
| 3713 | verfügbar ist, passiert nichts. | ||
| 3714 | |||
| 3715 | @item --delete-generations[=@var{Dauer}] | ||
| 3716 | @itemx -d [@var{Dauer}] | ||
| 3717 | Bevor der Müllsammelvorgang beginnt, werden hiermit alle Generationen von | ||
| 3718 | allen Benutzerprofilen gelöscht, die älter sind als die angegebene | ||
| 3719 | @var{Dauer}; wird es als Administratornutzer »root« ausgeführt, geschieht | ||
| 3720 | dies mit den Profilen @emph{von allen Benutzern}. | ||
| 3721 | |||
| 3722 | Zum Beispiel löscht der folgende Befehl alle Generationen Ihrer Profile, die | ||
| 3723 | älter als zwei Monate sind (ausgenommen die momentanen Generationen), und | ||
| 3724 | schmeißt dann den Müllsammler an, um Platz freizuräumen, bis mindestens 10 | ||
| 3725 | GiB verfügbar sind: | ||
| 3726 | |||
| 3727 | @example | ||
| 3728 | guix gc -d 2m -F 10G | ||
| 3729 | @end example | ||
| 3730 | |||
| 3731 | @item --delete | ||
| 3732 | @itemx -D | ||
| 3733 | Versucht, alle als Argumente angegebenen Dateien oder Verzeichnisse im Store | ||
| 3734 | zu löschen. Dies schlägt fehl, wenn manche der Dateien oder Verzeichnisse | ||
| 3735 | nicht im Store oder noch immer lebendig sind. | ||
| 3736 | |||
| 3737 | @item --list-failures | ||
| 3738 | Store-Objekte auflisten, die zwischengespeicherten Erstellungsfehlern | ||
| 3739 | entsprechen. | ||
| 3740 | |||
| 3741 | Hierbei wird nichts ausgegeben, sofern der Daemon nicht mit | ||
| 3742 | @option{--cache-failures} gestartet wurde (siehe @ref{Aufruf des guix-daemon, | ||
| 3743 | @option{--cache-failures}}). | ||
| 3744 | |||
| 3745 | @item --list-roots | ||
| 3746 | Die Müllsammlerwurzeln auflisten, die dem Nutzer gehören. Wird der Befehl | ||
| 3747 | als Administratornutzer ausgeführt, werden @emph{alle} Müllsammlerwurzeln | ||
| 3748 | aufgelistet. | ||
| 3749 | |||
| 3750 | @item --clear-failures | ||
| 3751 | Die angegebenen Store-Objekte aus dem Zwischenspeicher für fehlgeschlagene | ||
| 3752 | Erstellungen entfernen. | ||
| 3753 | |||
| 3754 | Auch diese Option macht nur Sinn, wenn der Daemon mit | ||
| 3755 | @option{--cache-failures} gestartet wurde. Andernfalls passiert nichts. | ||
| 3756 | |||
| 3757 | @item --list-dead | ||
| 3758 | Zeigt die Liste toter Dateien und Verzeichnisse an, die sich noch im Store | ||
| 3759 | befinden — das heißt, Dateien, die von keiner Wurzel mehr erreichbar sind. | ||
| 3760 | |||
| 3761 | @item --list-live | ||
| 3762 | Zeige die Liste lebendiger Store-Dateien und -Verzeichnisse. | ||
| 3763 | |||
| 3764 | @end table | ||
| 3765 | |||
| 3766 | Außerdem können Referenzen unter bestehenden Store-Dateien gefunden werden: | ||
| 3767 | |||
| 3768 | @table @code | ||
| 3769 | |||
| 3770 | @item --references | ||
| 3771 | @itemx --referrers | ||
| 3772 | @cindex Paketabhängigkeiten | ||
| 3773 | Listet die referenzierten bzw. sie referenzierenden Objekte der angegebenen | ||
| 3774 | Store-Dateien auf. | ||
| 3775 | |||
| 3776 | @item --requisites | ||
| 3777 | @itemx -R | ||
| 3778 | @cindex Abschluss | ||
| 3779 | Listet alle Voraussetzungen der als Argumente übergebenen Store-Dateien | ||
| 3780 | auf. Voraussetzungen sind die Store-Dateien selbst, ihre Referenzen sowie | ||
| 3781 | die Referenzen davon, rekursiv. Mit anderen Worten, die zurückgelieferte | ||
| 3782 | Liste ist der @dfn{transitive Abschluss} dieser Store-Dateien. | ||
| 3783 | |||
| 3784 | Der Abschnitt @ref{Aufruf von guix size} erklärt ein Werkzeug, um den | ||
| 3785 | Speicherbedarf des Abschlusses eines Elements zu ermitteln. Siehe | ||
| 3786 | @ref{Aufruf von guix graph} für ein Werkzeug, um den Referenzgraphen zu | ||
| 3787 | veranschaulichen. | ||
| 3788 | |||
| 3789 | @item --derivers | ||
| 3790 | @cindex Ableitung | ||
| 3791 | Liefert die Ableitung(en), die zu den angegebenen Store-Objekten führen | ||
| 3792 | (siehe @ref{Ableitungen}). | ||
| 3793 | |||
| 3794 | Zum Beispiel liefert dieser Befehl: | ||
| 3795 | |||
| 3796 | @example | ||
| 3797 | guix gc --derivers `guix package -I ^emacs$ | cut -f4` | ||
| 3798 | @end example | ||
| 3799 | |||
| 3800 | @noindent | ||
| 3801 | die @file{.drv}-Datei(en), die zum in Ihrem Profil installierten | ||
| 3802 | @code{emacs}-Paket führen. | ||
| 3803 | |||
| 3804 | Beachten Sie, dass es auch sein kann, dass keine passenden | ||
| 3805 | @file{.drv}-Dateien existieren, zum Beispiel wenn diese Dateien bereits dem | ||
| 3806 | Müllsammler zum Opfer gefallen sind. Es kann auch passieren, dass es mehr | ||
| 3807 | als eine passende @file{.drv} gibt, bei Ableitungen mit fester Ausgabe. | ||
| 3808 | @end table | ||
| 3809 | |||
| 3810 | Zuletzt können Sie mit folgenden Befehlszeilenoptionen die Integrität des | ||
| 3811 | Stores prüfen und den Plattenspeicherverbrauch im Zaum halten. | ||
| 3812 | |||
| 3813 | @table @option | ||
| 3814 | |||
| 3815 | @item --verify[=@var{Optionen}] | ||
| 3816 | @cindex Integrität, des Stores | ||
| 3817 | @cindex Integritätsprüfung | ||
| 3818 | Die Integrität des Stores verifizieren | ||
| 3819 | |||
| 3820 | Standardmäßig wird sichergestellt, dass alle Store-Objekte, die in der | ||
| 3821 | Datenbank des Daemons als gültig markiert wurden, auch tatsächlich in | ||
| 3822 | @file{/gnu/store} existieren. | ||
| 3823 | |||
| 3824 | Wenn angegeben, müssen die @var{Optionen} eine kommagetrennte Liste aus | ||
| 3825 | mindestens einem der Worte @code{contents} und @code{repair} sein. | ||
| 3826 | |||
| 3827 | Wenn Sie @option{--verify=contents} übergeben, berechnet der Daemon den Hash | ||
| 3828 | des Inhalts jedes Store-Objekts und vergleicht ihn mit dem Hash in der | ||
| 3829 | Datenbank. Sind die Hashes ungleich, wird eine Datenbeschädigung | ||
| 3830 | gemeldet. Weil dabei @emph{alle Dateien im Store} durchlaufen werden, kann | ||
| 3831 | der Befehl viel Zeit brauchen, besonders auf Systemen mit langsamer Platte. | ||
| 3832 | |||
| 3833 | @cindex Store, reparieren | ||
| 3834 | @cindex Datenbeschädigung, Behebung | ||
| 3835 | Mit @option{--verify=repair} oder @option{--verify=contents,repair} versucht | ||
| 3836 | der Daemon, beschädigte Store-Objekte zu reparieren, indem er Substitute für | ||
| 3837 | selbige herunterlädt (siehe @ref{Substitute}). Weil die Reparatur nicht | ||
| 3838 | atomar und daher womöglich riskant ist, kann nur der Systemadministrator den | ||
| 3839 | Befehl benutzen. Eine weniger aufwendige Alternative, wenn Sie wissen, | ||
| 3840 | welches Objekt beschädigt ist, ist, @command{guix build --repair} zu | ||
| 3841 | benutzen (siehe @ref{Aufruf von guix build}). | ||
| 3842 | |||
| 3843 | @item --optimize | ||
| 3844 | @cindex Deduplizieren | ||
| 3845 | Den Store durch Nutzung harter Verknüpfungen für identische Dateien | ||
| 3846 | optimieren — mit anderen Worten wird der Store @dfn{dedupliziert}. | ||
| 3847 | |||
| 3848 | Der Daemon führt Deduplizierung automatisch nach jeder erfolgreichen | ||
| 3849 | Erstellung und jedem Importieren eines Archivs durch, sofern er nicht mit | ||
| 3850 | @code{--disable-deduplication} (siehe @ref{Aufruf des guix-daemon, | ||
| 3851 | @code{--disable-deduplication}}) gestartet wurde. Diese Befehlszeilenoption | ||
| 3852 | brauchen Sie also in erster Linie dann, wenn der Daemon zuvor mit | ||
| 3853 | @code{--disable-deduplication} gestartet worden ist. | ||
| 3854 | |||
| 3855 | @end table | ||
| 3856 | |||
| 3857 | @node Aufruf von guix pull | ||
| 3858 | @section @command{guix pull} aufrufen | ||
| 3859 | |||
| 3860 | @cindex Aktualisieren von Guix | ||
| 3861 | @cindex Updaten von Guix | ||
| 3862 | @cindex @command{guix pull} | ||
| 3863 | @cindex pull | ||
| 3864 | Nach der Installation oder Aktualisierung wird stets die neueste Version von | ||
| 3865 | Paketen verwendet, die in der aktuell installierten Distribution verfügbar | ||
| 3866 | ist. Um die Distribution und die Guix-Werkzeuge zu aktualisieren, führen Sie | ||
| 3867 | @command{guix pull} aus. Der Befehl lädt den neuesten Guix-Quellcode | ||
| 3868 | einschließlich Paketbeschreibungen herunter und installiert ihn. Quellcode | ||
| 3869 | wird aus einem @uref{https://git-scm.com, Git}-Repository geladen, | ||
| 3870 | standardmäßig dem offiziellen Repository von GNU@tie{}Guix, was Sie aber | ||
| 3871 | auch ändern können. | ||
| 3872 | |||
| 3873 | Danach wird @command{guix package} Pakete und ihre Versionen entsprechend | ||
| 3874 | der gerade heruntergeladenen Kopie von Guix benutzen. Nicht nur das, auch | ||
| 3875 | alle Guix-Befehle und Scheme-Module werden aus der neuesten Version von Guix | ||
| 3876 | kommen. Neue @command{guix}-Unterbefehle, die durch die Aktualisierung | ||
| 3877 | hinzugekommen sind, werden also auch verfügbar. | ||
| 3878 | |||
| 3879 | Jeder Nutzer kann seine Kopie von Guix mittels @command{guix pull} | ||
| 3880 | aktualisieren, wodurch sich nur für den Nutzer etwas verändert, der | ||
| 3881 | @command{guix pull} ausgeführt hat. Wenn also zum Beispiel der | ||
| 3882 | Administratornutzer @code{root} den Befehl @command{guix pull} ausführt, hat | ||
| 3883 | das keine Auswirkungen auf die für den Benutzer @code{alice} sichtbare | ||
| 3884 | Guix-Version, und umgekehrt. | ||
| 3885 | |||
| 3886 | Das Ergebnis von @command{guix pull} ist ein als | ||
| 3887 | @file{~/.config/guix/current} verfügbares @dfn{Profil} mit dem neuesten | ||
| 3888 | Guix. Stellen Sie sicher, dass es am Anfang Ihres Suchpfades steht, damit | ||
| 3889 | Sie auch wirklich das neueste Guix und sein Info-Handbuch sehen (siehe | ||
| 3890 | @ref{Dokumentation}): | ||
| 3891 | |||
| 3892 | @example | ||
| 3893 | export PATH="$HOME/.config/guix/current/bin:$PATH" | ||
| 3894 | export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH" | ||
| 3895 | @end example | ||
| 3896 | |||
| 3897 | Die Befehlszeilenoption @code{--list-generations} oder kurz @code{-l} listet | ||
| 3898 | ältere von @command{guix pull} erzeugte Generationen auf, zusammen mit | ||
| 3899 | Informationen zu deren Provenienz. | ||
| 3900 | |||
| 3901 | @example | ||
| 3902 | $ guix pull -l | ||
| 3903 | Generation 1 Jun 10 2018 00:18:18 | ||
| 3904 | guix 65956ad | ||
| 3905 | repository URL: https://git.savannah.gnu.org/git/guix.git | ||
| 3906 | branch: origin/master | ||
| 3907 | commit: 65956ad3526ba09e1f7a40722c96c6ef7c0936fe | ||
| 3908 | |||
| 3909 | Generation 2 Jun 11 2018 11:02:49 | ||
| 3910 | guix e0cc7f6 | ||
| 3911 | repository URL: https://git.savannah.gnu.org/git/guix.git | ||
| 3912 | branch: origin/master | ||
| 3913 | commit: e0cc7f669bec22c37481dd03a7941c7d11a64f1d | ||
| 3914 | 2 new packages: keepalived, libnfnetlink | ||
| 3915 | 6 packages upgraded: emacs-nix-mode@@2.0.4, | ||
| 3916 | guile2.0-guix@@0.14.0-12.77a1aac, guix@@0.14.0-12.77a1aac, | ||
| 3917 | heimdal@@7.5.0, milkytracker@@1.02.00, nix@@2.0.4 | ||
| 3918 | |||
| 3919 | Generation 3 Jun 13 2018 23:31:07 (current) | ||
| 3920 | guix 844cc1c | ||
| 3921 | repository URL: https://git.savannah.gnu.org/git/guix.git | ||
| 3922 | branch: origin/master | ||
| 3923 | commit: 844cc1c8f394f03b404c5bb3aee086922373490c | ||
| 3924 | 28 new packages: emacs-helm-ls-git, emacs-helm-mu, @dots{} | ||
| 3925 | 69 packages upgraded: borg@@1.1.6, cheese@@3.28.0, @dots{} | ||
| 3926 | @end example | ||
| 3927 | |||
| 3928 | Im Abschnitt @ref{Aufruf von guix describe, @command{guix describe}} werden | ||
| 3929 | andere Möglichkeiten erklärt, sich den momentanen Zustand von Guix | ||
| 3930 | beschreiben zu lassen. | ||
| 3931 | |||
| 3932 | Das Profil @code{~/.config/guix/current} verhält sich genau wie jedes andere | ||
| 3933 | Profil, das von @command{guix package} erzeugt wurde (siehe @ref{Aufruf von guix package}). Das bedeutet, Sie können seine Generationen auflisten und es | ||
| 3934 | auf die vorherige Generation — also das vorherige Guix — zurücksetzen und so | ||
| 3935 | weiter: | ||
| 3936 | |||
| 3937 | @example | ||
| 3938 | $ guix package -p ~/.config/guix/current --roll-back | ||
| 3939 | switched from generation 3 to 2 | ||
| 3940 | $ guix package -p ~/.config/guix/current --delete-generations=1 | ||
| 3941 | deleting /var/guix/profiles/per-user/charlie/current-guix-1-link | ||
| 3942 | @end example | ||
| 3943 | |||
| 3944 | Der Befehl @command{guix pull} wird in der Regel ohne Befehlszeilenargumente | ||
| 3945 | aufgerufen, aber er versteht auch folgende Befehlszeilenoptionen: | ||
| 3946 | |||
| 3947 | @table @code | ||
| 3948 | @item --url=@var{URL} | ||
| 3949 | @itemx --commit=@var{Commit} | ||
| 3950 | @itemx --branch=@var{Branch} | ||
| 3951 | Download code for the @code{guix} channel from the specified @var{url}, at | ||
| 3952 | the given @var{commit} (a valid Git commit ID represented as a hexadecimal | ||
| 3953 | string), or @var{branch}. | ||
| 3954 | |||
| 3955 | @cindex @file{channels.scm}, Konfigurationsdatei | ||
| 3956 | @cindex Konfigurationsdatei für Kanäle | ||
| 3957 | Diese Befehlszeilenoptionen sind manchmal bequemer, aber Sie können Ihre | ||
| 3958 | Konfiguration auch in der Datei @file{~/.config/guix/channels.scm} oder über | ||
| 3959 | die Option @option{--channels} angeben (siehe unten). | ||
| 3960 | |||
| 3961 | @item --channels=@var{Datei} | ||
| 3962 | @itemx -C @var{Datei} | ||
| 3963 | Die Liste der Kanäle aus der angegebenen @var{Datei} statt aus | ||
| 3964 | @file{~/.config/guix/channels.scm} auslesen. Die @var{Datei} muss | ||
| 3965 | Scheme-Code enthalten, der zu einer Liste von Kanalobjekten ausgewertet | ||
| 3966 | wird. Siehe @ref{Kanäle} für nähere Informationen. | ||
| 3967 | |||
| 3968 | @item --list-generations[=@var{Muster}] | ||
| 3969 | @itemx -l [@var{Muster}] | ||
| 3970 | Alle Generationen von @file{~/.config/guix/current} bzw., wenn ein | ||
| 3971 | @var{Muster} angegeben wird, die dazu passenden Generationen auflisten. Die | ||
| 3972 | Syntax für das @var{Muster} ist dieselbe wie bei @code{guix package | ||
| 3973 | --list-generations} (siehe @ref{Aufruf von guix package}). | ||
| 3974 | |||
| 3975 | Im Abschnitt @ref{Aufruf von guix describe, @command{guix describe}} wird eine | ||
| 3976 | Möglichkeit erklärt, sich Informationen nur über die aktuelle Generation | ||
| 3977 | anzeigen zu lassen. | ||
| 3978 | |||
| 3979 | @item --profile=@var{Profil} | ||
| 3980 | @itemx -p @var{Profil} | ||
| 3981 | Auf @var{Profil} anstelle von @file{~/.config/guix/current} arbeiten. | ||
| 3982 | |||
| 3983 | @item --dry-run | ||
| 3984 | @itemx -n | ||
| 3985 | Anzeigen, welche(r) Commit(s) für die Kanäle benutzt würde(n) und was | ||
| 3986 | jeweils erstellt oder substituiert würde, ohne es tatsächlich durchzuführen. | ||
| 3987 | |||
| 3988 | @item --system=@var{System} | ||
| 3989 | @itemx -s @var{System} | ||
| 3990 | Versuchen, für die angegebene Art von @var{System} geeignete Binärdateien zu | ||
| 3991 | erstellen — z.B.@: @code{i686-linux} — statt für die Art von System, das die | ||
| 3992 | Erstellung durchführt. | ||
| 3993 | |||
| 3994 | @item --verbose | ||
| 3995 | Ausführliche Informationen ausgeben und Erstellungsprotokolle auf der | ||
| 3996 | Standardfehlerausgabe ausgeben. | ||
| 3997 | |||
| 3998 | @item --bootstrap | ||
| 3999 | Das neueste Guix mit dem Bootstrap-Guile erstellen. Diese | ||
| 4000 | Befehlszeilenoption ist nur für Guix-Entwickler von Nutzen. | ||
| 4001 | @end table | ||
| 4002 | |||
| 4003 | Mit Hilfe von @dfn{Kanälen} können Sie bei @command{guix pull} anweisen, von | ||
| 4004 | welchem Repository und welchem Branch Guix aktualisiert werden soll, sowie | ||
| 4005 | von welchen @emph{weiteren} Repositorys Paketmodule bezogen werden | ||
| 4006 | sollen. Im Abschnitt @ref{Kanäle} finden Sie nähere Informationen. | ||
| 4007 | |||
| 4008 | Außerdem unterstützt @command{guix pull} alle gemeinsamen | ||
| 4009 | Erstellungsoptionen (siehe @ref{Gemeinsame Erstellungsoptionen}). | ||
| 4010 | |||
| 4011 | @node Kanäle | ||
| 4012 | @section Kanäle | ||
| 4013 | |||
| 4014 | @cindex Kanäle | ||
| 4015 | @cindex @file{channels.scm}, Konfigurationsdatei | ||
| 4016 | @cindex Konfigurationsdatei für Kanäle | ||
| 4017 | @cindex @command{guix pull}, Konfigurationsdatei | ||
| 4018 | @cindex Konfiguration von @command{guix pull} | ||
| 4019 | Guix und die Sammlung darin verfügbarer Pakete können Sie durch Ausführen | ||
| 4020 | von @command{guix pull} aktualisieren (siehe @ref{Aufruf von guix pull}). Standardmäßig lädt @command{guix pull} Guix selbst vom offiziellen | ||
| 4021 | Repository von GNU@tie{}Guix herunter und installiert es. Diesen Vorgang | ||
| 4022 | können Sie anpassen, indem Sie @dfn{Kanäle} in der Datei | ||
| 4023 | @file{~/.config/guix/channels.scm} angeben. Ein Kanal enthält eine Angabe | ||
| 4024 | einer URL und eines Branches eines zu installierenden Git-Repositorys und | ||
| 4025 | Sie können @command{guix pull} veranlassen, die Aktualisierungen von einem | ||
| 4026 | oder mehreren Kanälen zu beziehen. Mit anderen Worten können Kanäle benutzt | ||
| 4027 | werden, um Guix @emph{anzupassen} und zu @emph{erweitern}, wie wir im | ||
| 4028 | Folgenden sehen werden. | ||
| 4029 | |||
| 4030 | @subsection Einen eigenen Guix-Kanal benutzen | ||
| 4031 | |||
| 4032 | Der Kanal namens @code{guix} gibt an, wovon Guix selbst — seine | ||
| 4033 | Befehlszeilenwerkzeuge und seine Paketsammlung — heruntergeladen werden | ||
| 4034 | sollten. Wenn Sie zum Beispiel mit Ihrer eigenen Kopie des Guix-Repositorys | ||
| 4035 | arbeiten möchten und diese auf @code{example.org} zu finden ist, und zwar im | ||
| 4036 | Branch namens @code{super-hacks}, dann schreiben Sie folgende Spezifikation | ||
| 4037 | in @code{~/.config/guix/channels.scm}: | ||
| 4038 | |||
| 4039 | @lisp | ||
| 4040 | ;; 'guix pull' mein eigenes Repository benutzen lassen. | ||
| 4041 | (list (channel | ||
| 4042 | (name 'guix) | ||
| 4043 | (url "https://example.org/my-guix.git") | ||
| 4044 | (branch "super-hacks"))) | ||
| 4045 | @end lisp | ||
| 4046 | |||
| 4047 | @noindent | ||
| 4048 | Ab dann wird @command{guix pull} seinen Code vom Branch @code{super-hacks} | ||
| 4049 | des Repositorys auf @code{example.org} beziehen. | ||
| 4050 | |||
| 4051 | @subsection Weitere Kanäle angeben | ||
| 4052 | |||
| 4053 | @cindex Paketsammlung erweitern (Kanäle) | ||
| 4054 | @cindex Eigene Pakete (Kanäle) | ||
| 4055 | @cindex Kanäle, für eigene Pakete | ||
| 4056 | Sie können auch @emph{weitere Kanäle} als Bezugsquelle angeben. Sagen wir, | ||
| 4057 | Sie haben ein paar eigene Paketvarianten oder persönliche Pakete, von denen | ||
| 4058 | Sie meinen, dass sie @emph{nicht} geeignet sind, ins Guix-Projekt selbst | ||
| 4059 | aufgenommen zu werden, die Ihnen aber dennoch wie andere Pakete auf der | ||
| 4060 | Befehlszeile zur Verfügung stehen sollen. Dann würden Sie zunächst Module | ||
| 4061 | mit diesen Paketdefinitionen schreiben (siehe @ref{Paketmodule}) und | ||
| 4062 | diese dann in einem Git-Repository verwalten, welches Sie selbst oder jeder | ||
| 4063 | andere dann als zusätzlichen Kanal eintragen können, von dem Pakete geladen | ||
| 4064 | werden. Klingt gut, oder? | ||
| 4065 | |||
| 4066 | @c What follows stems from discussions at | ||
| 4067 | @c <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22629#134> as well as | ||
| 4068 | @c earlier discussions on guix-devel@gnu.org. | ||
| 4069 | @quotation Warnung | ||
| 4070 | Bevor Sie, verehrter Nutzer, ausrufen: »Wow, das ist @emph{soooo coool}!«, | ||
| 4071 | und Ihren eigenen Kanal der Welt zur Verfügung stellen, möchten wir Ihnen | ||
| 4072 | auch ein paar Worte der Warnung mit auf den Weg geben: | ||
| 4073 | |||
| 4074 | @itemize | ||
| 4075 | @item | ||
| 4076 | Bevor Sie einen Kanal veröffentlichen, überlegen Sie sich bitte erst, ob Sie | ||
| 4077 | die Pakete nicht besser zum eigentlichen Guix-Projekt beisteuern (siehe | ||
| 4078 | @ref{Mitwirken}). Das Guix-Projekt ist gegenüber allen Arten freier | ||
| 4079 | Software offen und zum eigentlichen Guix gehörende Pakete stehen allen | ||
| 4080 | Guix-Nutzern zur Verfügung, außerdem profitieren sie von Guix’ | ||
| 4081 | Qualitätssicherungsprozess. | ||
| 4082 | |||
| 4083 | @item | ||
| 4084 | Wenn Sie Paketdefinitionen außerhalb von Guix betreuen, sehen wir | ||
| 4085 | Guix-Entwickler es als @emph{Ihre Aufgabe an, deren Kompatibilität | ||
| 4086 | sicherzstellen}. Bedenken Sie, dass Paketmodule und Paketdefinitionen nur | ||
| 4087 | Scheme-Code sind, der verschiedene Programmierschnittstellen (APIs) | ||
| 4088 | benutzt. Wir nehmen uns das Recht heraus, diese APIs jederzeit zu ändern, | ||
| 4089 | damit wir Guix besser machen können, womöglich auf eine Art, wodurch Ihr | ||
| 4090 | Kanal nicht mehr funktioniert. Wir ändern APIs nie einfach so, werden aber | ||
| 4091 | auch @emph{nicht} versprechen, APIs nicht zu verändern. | ||
| 4092 | |||
| 4093 | @item | ||
| 4094 | Das bedeutet auch, dass Sie, wenn Sie einen externen Kanal verwenden und | ||
| 4095 | dieser kaputt geht, Sie dies bitte @emph{den Autoren des Kanals} und nicht | ||
| 4096 | dem Guix-Projekt melden. | ||
| 4097 | @end itemize | ||
| 4098 | |||
| 4099 | Wir haben Sie gewarnt! Allerdings denken wir auch, dass externe Kanäle eine | ||
| 4100 | praktische Möglichkeit sind, die Paketsammlung von Guix zu ergänzen und Ihre | ||
| 4101 | Verbesserungen mit anderen zu teilen, wie es dem Grundgedanken | ||
| 4102 | @uref{https://www.gnu.org/philosophy/free-sw.html, freier Software} | ||
| 4103 | entspricht. Bitte schicken Sie eine E-Mail an @email{guix-devel@@gnu.org}, | ||
| 4104 | wenn Sie dies diskutieren möchten. | ||
| 4105 | @end quotation | ||
| 4106 | |||
| 4107 | Um einen Kanal zu benutzen, tragen Sie ihn in | ||
| 4108 | @code{~/.config/guix/channels.scm} ein, damit @command{guix pull} diesen | ||
| 4109 | Kanal @emph{zusätzlich} zu den standardmäßigen Guix-Kanälen als Paketquelle | ||
| 4110 | verwendet: | ||
| 4111 | |||
| 4112 | @vindex %default-channels | ||
| 4113 | @lisp | ||
| 4114 | ;; Meine persönlichen Pakete zu denen von Guix dazunehmen. | ||
| 4115 | (cons (channel | ||
| 4116 | (name 'meine-persönlichen-pakete) | ||
| 4117 | (url "https://example.org/personal-packages.git")) | ||
| 4118 | %default-channels) | ||
| 4119 | @end lisp | ||
| 4120 | |||
| 4121 | @noindent | ||
| 4122 | Beachten Sie, dass der obige Schnipsel (wie immer!)@: Scheme-Code ist; mit | ||
| 4123 | @code{cons} fügen wir einen Kanal zur Liste der Kanäle hinzu, an die die | ||
| 4124 | Variable @code{%default-channels} gebunden ist (siehe @ref{Pairs, | ||
| 4125 | @code{cons} and lists,, guile, GNU Guile Reference Manual}). Mit diesem | ||
| 4126 | Dateiinhalt wird @command{guix pull} nun nicht mehr nur Guix, sondern auch | ||
| 4127 | die Paketmodule aus Ihrem Repository erstellen. Das Ergebnis in | ||
| 4128 | @file{~/.config/guix/current} ist so die Vereinigung von Guix und Ihren | ||
| 4129 | eigenen Paketmodulen. | ||
| 4130 | |||
| 4131 | @example | ||
| 4132 | $ guix pull --list-generations | ||
| 4133 | @dots{} | ||
| 4134 | Generation 19 Aug 27 2018 16:20:48 | ||
| 4135 | guix d894ab8 | ||
| 4136 | repository URL: https://git.savannah.gnu.org/git/guix.git | ||
| 4137 | branch: master | ||
| 4138 | commit: d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300 | ||
| 4139 | meine-persönlichen-pakete dd3df5e | ||
| 4140 | repository URL: https://example.org/personal-packages.git | ||
| 4141 | branch: master | ||
| 4142 | commit: dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb | ||
| 4143 | 11 new packages: mein-gimp, mein-emacs-mit-coolen-features, @dots{} | ||
| 4144 | 4 packages upgraded: emacs-racket-mode@@0.0.2-2.1b78827, @dots{} | ||
| 4145 | @end example | ||
| 4146 | |||
| 4147 | @noindent | ||
| 4148 | Obige Ausgabe von @command{guix pull} zeigt an, dass Generation@tie{}19 | ||
| 4149 | sowohl Guix als auch Pakete aus dem Kanal @code{meine-persönlichen-pakete} | ||
| 4150 | enthält. Unter den aufgeführten neuen und aktualisierten Paketen kommen | ||
| 4151 | vielleicht manche wie @code{mein-gimp} und | ||
| 4152 | @code{mein-emacs-mit-coolen-features} aus @code{meine-persönlichen-pakete}, | ||
| 4153 | während andere aus dem Standard-Guix-Kanal kommen. | ||
| 4154 | |||
| 4155 | Um einen Kanal zu erzeugen, müssen Sie ein Git-Repository mit Ihren eigenen | ||
| 4156 | Paketmodulen erzeugen und den Zugriff darauf ermöglichen. Das Repository | ||
| 4157 | kann beliebigen Inhalt haben, aber wenn es ein nützlicher Kanal sein soll, | ||
| 4158 | muss es Guile-Module enthalten, die Pakete exportieren. Sobald Sie anfangen, | ||
| 4159 | einen Kanal zu benutzen, verhält sich Guix, als wäre das Wurzelverzeichnis | ||
| 4160 | des Git-Repositorys des Kanals in Guiles Ladepfad enthalten (siehe @ref{Load | ||
| 4161 | Paths,,, guile, GNU Guile Reference Manual}). Wenn Ihr Kanal also zum | ||
| 4162 | Beispiel eine Datei als @file{my-packages/my-tools.scm} enthält, die ein | ||
| 4163 | Guile-Modul definiert, dann wird das Modul unter dem Namen | ||
| 4164 | @code{(my-packages my-tools)} verfügbar sein und Sie werden es wie jedes | ||
| 4165 | andere Modul benutzen können (siehe @ref{Module,,, guile, GNU Guile | ||
| 4166 | Reference Manual}). | ||
| 4167 | |||
| 4168 | @cindex Abhängigkeiten, bei Kanälen | ||
| 4169 | @cindex Metadaten, bei Kanälen | ||
| 4170 | @subsection Kanalabhängigkeiten deklarieren | ||
| 4171 | |||
| 4172 | Kanalautoren können auch beschließen, die Paketsammlung von anderen Kanälen | ||
| 4173 | zu erweitern. Dazu können sie in einer Metadatendatei @file{.guix-channel} | ||
| 4174 | deklarieren, dass ihr Kanal von anderen Kanälen abhängt. Diese Datei muss im | ||
| 4175 | Wurzelverzeichnis des Kanal-Repositorys platziert werden. | ||
| 4176 | |||
| 4177 | Die Metadatendatei sollte einen einfachen S-Ausdruck wie diesen enthalten: | ||
| 4178 | |||
| 4179 | @lisp | ||
| 4180 | (channel | ||
| 4181 | (version 0) | ||
| 4182 | (dependencies | ||
| 4183 | (channel | ||
| 4184 | (name irgendeine-sammlung) | ||
| 4185 | (url "https://example.org/erste-sammlung.git")) | ||
| 4186 | (channel | ||
| 4187 | (name eine-andere-sammlung) | ||
| 4188 | (url "https://example.org/zweite-sammlung.git") | ||
| 4189 | (branch "testing")))) | ||
| 4190 | @end lisp | ||
| 4191 | |||
| 4192 | Im Beispiel oben wird deklariert, dass dieser Kanal von zwei anderen Kanälen | ||
| 4193 | abhängt, die beide automatisch geladen werden. Die vom Kanal angebotenen | ||
| 4194 | Module werden in einer Umgebung kompiliert, in der die Module all dieser | ||
| 4195 | deklarierten Kanäle verfügbar sind. | ||
| 4196 | |||
| 4197 | Um Verlässlichkeit und Wartbarkeit zu gewährleisten, sollen Sie darauf | ||
| 4198 | verzichten, eine Abhängigkeit von Kanälen herzustellen, die Sie nicht | ||
| 4199 | kontrollieren, außerdem sollten Sie sich auf eine möglichst kleine Anzahl | ||
| 4200 | von Abhängigkeiten beschränken. | ||
| 4201 | |||
| 4202 | @subsection Guix nachbilden | ||
| 4203 | |||
| 4204 | @cindex Festsetzen, bei Kanälen | ||
| 4205 | @cindex Nachbilden von Guix | ||
| 4206 | @cindex Reproduzierbarkeit von Guix | ||
| 4207 | Die Ausgabe von @command{guix pull --list-generations} oben zeigt genau, aus | ||
| 4208 | welchen Commits diese Guix-Instanz erstellt wurde. Wir können Guix so zum | ||
| 4209 | Beispiel auf einer anderen Maschine nachbilden, indem wir eine | ||
| 4210 | Kanalspezifikation in @file{~/.config/guix/channels.scm} angeben, die auf | ||
| 4211 | diese Commits »festgesetzt« ist. | ||
| 4212 | |||
| 4213 | @lisp | ||
| 4214 | ;; Ganz bestimmte Commits der relevanten Kanäle installieren. | ||
| 4215 | (list (channel | ||
| 4216 | (name 'guix) | ||
| 4217 | (url "https://git.savannah.gnu.org/git/guix.git") | ||
| 4218 | (commit "d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300")) | ||
| 4219 | (channel | ||
| 4220 | (name 'meine-persönlichen-pakete) | ||
| 4221 | (url "https://example.org/personal-packages.git") | ||
| 4222 | (branch "dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb"))) | ||
| 4223 | @end lisp | ||
| 4224 | |||
| 4225 | Der Befehl @command{guix describe --format=channels} kann diese Kanalliste | ||
| 4226 | sogar direkt erzeugen (siehe @ref{Aufruf von guix describe}). | ||
| 4227 | |||
| 4228 | Somit läuft auf beiden Maschinen @emph{genau dasselbe Guix} und es hat | ||
| 4229 | Zugang zu @emph{genau denselben Paketen}. Die Ausgabe von @command{guix | ||
| 4230 | build gimp} auf der einen Maschine wird Bit für Bit genau dieselbe wie die | ||
| 4231 | desselben Befehls auf der anderen Maschine sein. Das bedeutet auch, dass | ||
| 4232 | beide Maschinen Zugang zum gesamten Quellcode von Guix und daher auch | ||
| 4233 | transitiv Zugang zum Quellcode jedes davon definierten Pakets haben. | ||
| 4234 | |||
| 4235 | Das verleiht Ihnen Superkräfte, mit denen Sie die Provenienz binärer | ||
| 4236 | Artefakte sehr feinkörnig nachverfolgen können und Software-Umgebungen nach | ||
| 4237 | Belieben nachbilden können. Sie können es als eine Art Fähigkeit zur | ||
| 4238 | »Meta-Reproduzierbarkeit« auffassen, wenn Sie möchten. Der Abschnitt | ||
| 4239 | @ref{Untergeordnete} beschreibt eine weitere Möglichkeit, diese Superkräfte zu | ||
| 4240 | nutzen. | ||
| 4241 | |||
| 4242 | @node Untergeordnete | ||
| 4243 | @section Untergeordnete | ||
| 4244 | |||
| 4245 | @c TODO: Remove this once we're more confident about API stability. | ||
| 4246 | @quotation Anmerkung | ||
| 4247 | Die hier beschriebenen Funktionalitäten sind in der Version @value{VERSION} | ||
| 4248 | bloß eine »Technologie-Vorschau«, daher kann sich die Schnittstelle in | ||
| 4249 | Zukunft noch ändern. | ||
| 4250 | @end quotation | ||
| 4251 | |||
| 4252 | @cindex Untergeordnete | ||
| 4253 | @cindex Mischen von Guix-Versionen | ||
| 4254 | Manchmal könnten Sie Pakete aus der gerade laufenden Fassung von Guix mit | ||
| 4255 | denen mischen wollen, die in einer anderen Guix-Version verfügbar sind. | ||
| 4256 | Guix-@dfn{Untergeordnete} ermöglichen dies, indem Sie verschiedene | ||
| 4257 | Guix-Versionen beliebig mischen können. | ||
| 4258 | |||
| 4259 | @cindex untergeordnete Pakete | ||
| 4260 | Aus technischer Sicht ist ein »Untergeordneter« im Kern ein separater | ||
| 4261 | Guix-Prozess, der über eine REPL (siehe @ref{Aufruf von guix repl}) mit Ihrem | ||
| 4262 | Haupt-Guix-Prozess verbunden ist. Das Modul @code{(guix inferior)} | ||
| 4263 | ermöglicht es Ihnen, Untergeordnete zu erstellen und mit ihnen zu | ||
| 4264 | kommunizieren. Dadurch steht Ihnen auch eine hochsprachliche Schnittstelle | ||
| 4265 | zur Verfügung, um die von einem Untergeordneten angebotenen Pakete zu | ||
| 4266 | durchsuchen und zu verändern — @dfn{untergeordnete Pakete}. | ||
| 4267 | |||
| 4268 | In Kombination mit Kanälen (siehe @ref{Kanäle}) bieten Untergeordnete eine | ||
| 4269 | einfache Möglichkeit, mit einer anderen Version von Guix zu | ||
| 4270 | interagieren. Nehmen wir zum Beispiel an, Sie wollen das aktuelle | ||
| 4271 | @code{guile}-Paket in Ihr Profil installieren, zusammen mit dem | ||
| 4272 | @code{guile-json}, wie es in einer früheren Guix-Version existiert hat — | ||
| 4273 | vielleicht weil das neuere @code{guile-json} eine inkompatible API hat und | ||
| 4274 | Sie daher Ihren Code mit der alten API benutzen möchten. Dazu könnten Sie | ||
| 4275 | ein Manifest für @code{guix package --manifest} schreiben (siehe | ||
| 4276 | @ref{Aufruf von guix package}); in diesem Manifest würden Sie einen | ||
| 4277 | Untergeordneten für diese alte Guix-Version erzeugen, für die Sie sich | ||
| 4278 | interessieren, und aus diesem Untergeordneten das @code{guile-json}-Paket | ||
| 4279 | holen: | ||
| 4280 | |||
| 4281 | @lisp | ||
| 4282 | (use-modules (guix inferior) (guix channels) | ||
| 4283 | (srfi srfi-1)) ;für die Prozedur 'first' | ||
| 4284 | |||
| 4285 | (define channels | ||
| 4286 | ;; Dies ist die alte Version, aus der wir | ||
| 4287 | ;; guile-json extrahieren möchten. | ||
| 4288 | (list (channel | ||
| 4289 | (name 'guix) | ||
| 4290 | (url "https://git.savannah.gnu.org/git/guix.git") | ||
| 4291 | (commit | ||
| 4292 | "65956ad3526ba09e1f7a40722c96c6ef7c0936fe")))) | ||
| 4293 | |||
| 4294 | (define inferior | ||
| 4295 | ;; Ein Untergeordneter, der obige Version repräsentiert. | ||
| 4296 | (inferior-for-channels channels)) | ||
| 4297 | |||
| 4298 | ;; Daraus erzeugen wir jetzt ein Manifest mit dem aktuellen | ||
| 4299 | ;; »guile«-Paket und dem alten »guile-json«-Paket. | ||
| 4300 | (packages->manifest | ||
| 4301 | (list (first (lookup-inferior-packages inferior "guile-json")) | ||
| 4302 | (specification->package "guile"))) | ||
| 4303 | @end lisp | ||
| 4304 | |||
| 4305 | Bei seiner ersten Ausführung könnte für @command{guix package --manifest} | ||
| 4306 | erst der angegebene Kanal erstellt werden müssen, bevor der Untergeordnete | ||
| 4307 | erstellt werden kann; nachfolgende Durchläufe sind wesentlich schneller, | ||
| 4308 | weil diese Guix-Version bereits zwischengespeichert ist. | ||
| 4309 | |||
| 4310 | Folgende Prozeduren werden im Modul @code{(guix inferior)} angeboten, um | ||
| 4311 | einen Untergeordneten zu öffnen: | ||
| 4312 | |||
| 4313 | @deffn {Scheme-Prozedur} inferior-for-channels @var{Kanäle} @ | ||
| 4314 | [#:cache-directory] [#:ttl] Liefert einen Untergeordneten für die | ||
| 4315 | @var{Kanäle}, einer Liste von Kanälen. Dazu wird der Zwischenspeicher im | ||
| 4316 | Verzeichnis @var{cache-directory} benutzt, dessen Einträge nach @var{ttl} | ||
| 4317 | Sekunden gesammelt werden dürfen. Mit dieser Prozedur wird eine neue | ||
| 4318 | Verbindung zum Erstellungs-Daemon geöffnet. | ||
| 4319 | |||
| 4320 | Als Nebenwirkung erstellt oder substituiert diese Prozedur unter Umständen | ||
| 4321 | Binärdateien für die @var{Kanäle}, was einige Zeit in Anspruch nehmen kann. | ||
| 4322 | @end deffn | ||
| 4323 | |||
| 4324 | @deffn {Scheme-Prozedur} open-inferior @var{Verzeichnis} @ | ||
| 4325 | [#:command "bin/guix"] Öffnet das untergeordnete Guix mit dem Befehl | ||
| 4326 | @var{command} im angegebenen @var{Verzeichnis} durch Ausführung von | ||
| 4327 | @code{@var{Verzeichnis}/@var{command} repl} oder entsprechend. Liefert | ||
| 4328 | @code{#f}, wenn der Untergeordnete nicht gestartet werden konnte. | ||
| 4329 | @end deffn | ||
| 4330 | |||
| 4331 | @cindex untergeordnete Pakete | ||
| 4332 | Die im Folgenden aufgeführten Prozeduren ermöglichen es Ihnen, | ||
| 4333 | untergeordnete Pakete abzurufen und zu verändern. | ||
| 4334 | |||
| 4335 | @deffn {Scheme-Prozedur} inferior-packages @var{Untergeordneter} | ||
| 4336 | Liefert die Liste der Pakete in @var{Untergeordneter}. | ||
| 4337 | @end deffn | ||
| 4338 | |||
| 4339 | @deffn {Scheme-Prozedur} lookup-inferior-packages @var{Untergeordneter} @var{Name} @ | ||
| 4340 | [@var{Version}] Liefert die sortierte Liste der untergeordneten Pakete in | ||
| 4341 | @var{Untergeordneter}, die zum Muster @var{Name} in @var{Untergeordneter} | ||
| 4342 | passen, dabei kommen höhere Versionsnummern zuerst. Wenn @var{Version} auf | ||
| 4343 | wahr gesetzt ist, werden nur Pakete geliefert, deren Versionsnummer mit dem | ||
| 4344 | Präfix @var{Version} beginnt. | ||
| 4345 | @end deffn | ||
| 4346 | |||
| 4347 | @deffn {Scheme-Prozedur} inferior-package? @var{Objekt} | ||
| 4348 | Liefert wahr, wenn das @var{obj} ein Untergeordneter ist. | ||
| 4349 | @end deffn | ||
| 4350 | |||
| 4351 | @deffn {Scheme-Prozedur} inferior-package-name @var{Paket} | ||
| 4352 | @deffnx {Scheme-Prozedur} inferior-package-version @var{Paket} | ||
| 4353 | @deffnx {Scheme-Prozedur} inferior-package-synopsis @var{Paket} | ||
| 4354 | @deffnx {Scheme-Prozedur} inferior-package-description @var{Paket} | ||
| 4355 | @deffnx {Scheme-Prozedur} inferior-package-home-page @var{Paket} | ||
| 4356 | @deffnx {Scheme-Prozedur} inferior-package-location @var{Paket} | ||
| 4357 | @deffnx {Scheme-Prozedur} inferior-package-inputs @var{Paket} | ||
| 4358 | @deffnx {Scheme-Prozedur} inferior-package-native-inputs @var{Paket} | ||
| 4359 | @deffnx {Scheme-Prozedur} inferior-package-propagated-inputs @var{Paket} | ||
| 4360 | @deffnx {Scheme-Prozedur} inferior-package-transitive-propagated-inputs @var{Paket} | ||
| 4361 | @deffnx {Scheme-Prozedur} inferior-package-native-search-paths @var{Paket} | ||
| 4362 | @deffnx {Scheme-Prozedur} inferior-package-transitive-native-search-paths @var{Paket} | ||
| 4363 | @deffnx {Scheme-Prozedur} inferior-package-search-paths @var{Paket} | ||
| 4364 | Diese Prozeduren sind das Gegenstück zu den Zugriffsmethoden des Verbunds | ||
| 4365 | »package« für Pakete (siehe @ref{»package«-Referenz}). Die meisten davon | ||
| 4366 | funktionieren durch eine Abfrage auf dem Untergeordneten, von dem das | ||
| 4367 | @var{Paket} kommt, weshalb der Untergeordnete noch lebendig sein muss, wenn | ||
| 4368 | Sie diese Prozeduren aufrufen. | ||
| 4369 | @end deffn | ||
| 4370 | |||
| 4371 | Untergeordnete Pakete können transparent wie jedes andere Paket oder | ||
| 4372 | dateiartige Objekt in G-Ausdrücken verwendet werden (siehe | ||
| 4373 | @ref{G-Ausdrücke}). Sie werden auch transparent wie reguläre Pakete von | ||
| 4374 | der Prozedur @code{packages->manifest} behandelt, welche oft in Manifesten | ||
| 4375 | benutzt wird (siehe @ref{Aufruf von guix package, siehe die | ||
| 4376 | Befehlszeilenoption @option{--manifest} von @command{guix package}}). Somit | ||
| 4377 | können Sie ein untergeordnetes Paket ziemlich überall dort verwenden, wo Sie | ||
| 4378 | ein reguläres Paket einfügen würden: in Manifesten, im Feld @code{packages} | ||
| 4379 | Ihrer @code{operating-system}-Deklaration und so weiter. | ||
| 4380 | |||
| 4381 | @node Aufruf von guix describe | ||
| 4382 | @section @command{guix describe} aufrufen | ||
| 4383 | |||
| 4384 | @cindex Reproduzierbarkeit | ||
| 4385 | @cindex Nachbilden von Guix | ||
| 4386 | Sie könnten sich des Öfteren Fragen stellen wie: »Welche Version von Guix | ||
| 4387 | benutze ich gerade?« oder »Welche Kanäle benutze ich?« Diese Informationen | ||
| 4388 | sind in vielen Situationen nützlich: wenn Sie eine Umgebung auf einer | ||
| 4389 | anderen Maschine oder mit einem anderen Benutzerkonto @emph{nachbilden} | ||
| 4390 | möchten, wenn Sie einen Fehler melden möchten, wenn Sie festzustellen | ||
| 4391 | versuchen, welche Änderung an den von Ihnen verwendeten Kanälen diesen | ||
| 4392 | Fehler verursacht hat, oder wenn Sie Ihren Systemzustand zum Zweck der | ||
| 4393 | Reproduzierbarkeit festhalten möchten. Der Befehl @command{guix describe} | ||
| 4394 | gibt Ihnen Antwort auf diese Fragen. | ||
| 4395 | |||
| 4396 | Wenn Sie ihn aus einem mit @command{guix pull} bezogenen @command{guix} | ||
| 4397 | heraus ausführen, zeigt Ihnen @command{guix describe} die Kanäle an, aus | ||
| 4398 | denen es erstellt wurde, jeweils mitsamt ihrer Repository-URL und Commit-ID | ||
| 4399 | (siehe @ref{Kanäle}): | ||
| 4400 | |||
| 4401 | @example | ||
| 4402 | $ guix describe | ||
| 4403 | Generation 10 Sep 03 2018 17:32:44 (current) | ||
| 4404 | guix e0fa68c | ||
| 4405 | repository URL: https://git.savannah.gnu.org/git/guix.git | ||
| 4406 | branch: master | ||
| 4407 | commit: e0fa68c7718fffd33d81af415279d6ddb518f727 | ||
| 4408 | @end example | ||
| 4409 | |||
| 4410 | Wenn Sie mit dem Versionskontrollsystem Git vertraut sind, erkennen Sie | ||
| 4411 | vielleicht die Ähnlichkeit zu @command{git describe}; die Ausgabe ähnelt | ||
| 4412 | auch der von @command{guix pull --list-generations} eingeschränkt auf die | ||
| 4413 | aktuelle Generation (siehe @ref{Aufruf von guix pull, die Befehlszeilenoption | ||
| 4414 | @option{--list-generations}}). Weil die oben gezeigte Git-Commit-ID | ||
| 4415 | eindeutig eine bestimmte Version von Guix bezeichnet, genügt diese | ||
| 4416 | Information, um die von Ihnen benutzte Version von Guix zu beschreiben, und | ||
| 4417 | auch, um sie nachzubilden. | ||
| 4418 | |||
| 4419 | Damit es leichter ist, Guix nachzubilden, kann Ihnen @command{guix describe} | ||
| 4420 | auch eine Liste der Kanäle statt einer menschenlesbaren Beschreibung wie | ||
| 4421 | oben liefern: | ||
| 4422 | |||
| 4423 | @example | ||
| 4424 | $ guix describe -f channels | ||
| 4425 | (list (channel | ||
| 4426 | (name 'guix) | ||
| 4427 | (url "https://git.savannah.gnu.org/git/guix.git") | ||
| 4428 | (commit | ||
| 4429 | "e0fa68c7718fffd33d81af415279d6ddb518f727"))) | ||
| 4430 | @end example | ||
| 4431 | |||
| 4432 | @noindent | ||
| 4433 | Sie können die Ausgabe in einer Datei speichern, die Sie an @command{guix | ||
| 4434 | pull -C} auf einer anderen Maschine oder zu einem späteren Zeitpunkt | ||
| 4435 | übergeben, wodurch dann eine Instanz @emph{von genau derselben Guix-Version} | ||
| 4436 | installiert wird (siehe @ref{Aufruf von guix pull, die Befehlszeilenoption | ||
| 4437 | @option{-C}}). Daraufhin können Sie, weil Sie jederzeit dieselbe Version von | ||
| 4438 | Guix installieren können, auch gleich @emph{eine vollständige | ||
| 4439 | Softwareumgebung genau nachbilden}. Wir halten das trotz aller | ||
| 4440 | Bescheidenheit für @emph{klasse} und hoffen, dass Ihnen das auch gefällt! | ||
| 4441 | |||
| 4442 | Die genauen Befehlszeilenoptionen, die @command{guix describe} unterstützt, | ||
| 4443 | lauten wie folgt: | ||
| 4444 | |||
| 4445 | @table @code | ||
| 4446 | @item --format=@var{Format} | ||
| 4447 | @itemx -f @var{Format} | ||
| 4448 | Die Ausgabe im angegebenen @var{Format} generieren, was eines der Folgenden | ||
| 4449 | sein muss: | ||
| 4450 | |||
| 4451 | @table @code | ||
| 4452 | @item human | ||
| 4453 | für menschenlesbare Ausgabe, | ||
| 4454 | @item Kanäle | ||
| 4455 | eine Liste von Kanalspezifikationen erzeugen, die an @command{guix pull -C} | ||
| 4456 | übergeben werden oder als @file{~/.config/guix/channels.scm} eingesetzt | ||
| 4457 | werden können (siehe @ref{Aufruf von guix pull}), | ||
| 4458 | @item json | ||
| 4459 | @cindex JSON | ||
| 4460 | generiert eine Liste von Kanalspezifikationen im JSON-Format, | ||
| 4461 | @item recutils | ||
| 4462 | generiert eine Liste von Kanalspezifikationen im Recutils-Format. | ||
| 4463 | @end table | ||
| 4464 | |||
| 4465 | @item --profile=@var{Profil} | ||
| 4466 | @itemx -p @var{Profil} | ||
| 4467 | Informationen über das @var{Profil} anzeigen. | ||
| 4468 | @end table | ||
| 4469 | |||
| 4470 | @node Aufruf von guix archive | ||
| 4471 | @section @command{guix archive} aufrufen | ||
| 4472 | |||
| 4473 | @cindex @command{guix archive} | ||
| 4474 | @cindex Archivdateien | ||
| 4475 | Der Befehl @command{guix archive} ermöglicht es Nutzern, Dateien im Store in | ||
| 4476 | eine einzelne Archivdatei zu @dfn{exportieren} und diese später auf einer | ||
| 4477 | Maschine, auf der Guix läuft, zu @dfn{importieren}. Insbesondere können so | ||
| 4478 | Store-Objekte von einer Maschine in den Store einer anderen Maschine | ||
| 4479 | übertragen werden. | ||
| 4480 | |||
| 4481 | @quotation Anmerkung | ||
| 4482 | Wenn Sie nach einer Möglichkeit suchen, Archivdateien für andere Werkzeuge | ||
| 4483 | als Guix zu erstellen, finden Sie Informationen dazu im Abschnitt | ||
| 4484 | @ref{Aufruf von guix pack}. | ||
| 4485 | @end quotation | ||
| 4486 | |||
| 4487 | @cindex Store-Objekte exportieren | ||
| 4488 | Führen Sie Folgendes aus, um Store-Dateien als ein Archiv auf die | ||
| 4489 | Standardausgabe zu exportieren: | ||
| 4490 | |||
| 4491 | @example | ||
| 4492 | guix archive --export @var{Optionen} @var{Spezifikationen}... | ||
| 4493 | @end example | ||
| 4494 | |||
| 4495 | @var{Spezifikationen} sind dabei entweder die Namen von Store-Dateien oder | ||
| 4496 | Paketspezifikationen wie bei @command{guix package} (siehe @ref{Aufruf von guix package}). Zum Beispiel erzeugt der folgende Befehl ein Archiv der | ||
| 4497 | @code{gui}-Ausgabe des Pakets @code{git} sowie die Hauptausgabe von | ||
| 4498 | @code{emacs}: | ||
| 4499 | |||
| 4500 | @example | ||
| 4501 | guix archive --export git:gui /gnu/store/...-emacs-24.3 > groß.nar | ||
| 4502 | @end example | ||
| 4503 | |||
| 4504 | Wenn die angegebenen Pakete noch nicht erstellt worden sind, werden sie | ||
| 4505 | durch @command{guix archive} automatisch erstellt. Der Erstellungsprozess | ||
| 4506 | kann durch die gemeinsamen Erstellungsoptionen gesteuert werden (siehe | ||
| 4507 | @ref{Gemeinsame Erstellungsoptionen}). | ||
| 4508 | |||
| 4509 | Um das @code{emacs}-Paket auf eine über SSH verbundene Maschine zu | ||
| 4510 | übertragen, würde man dies ausführen: | ||
| 4511 | |||
| 4512 | @example | ||
| 4513 | guix archive --export -r emacs | ssh die-maschine guix archive --import | ||
| 4514 | @end example | ||
| 4515 | |||
| 4516 | @noindent | ||
| 4517 | Auf gleiche Art kann auch ein vollständiges Benutzerprofil von einer | ||
| 4518 | Maschine auf eine andere übertragen werden: | ||
| 4519 | |||
| 4520 | @example | ||
| 4521 | guix archive --export -r $(readlink -f ~/.guix-profile) | \ | ||
| 4522 | ssh die-maschine guix-archive --import | ||
| 4523 | @end example | ||
| 4524 | |||
| 4525 | @noindent | ||
| 4526 | Jedoch sollten Sie in beiden Beispielen beachten, dass alles, was zu | ||
| 4527 | @code{emacs}, dem Profil oder deren Abhängigkeiten (wegen @code{-r}) gehört, | ||
| 4528 | übertragen wird, egal ob es schon im Store der Zielmaschine vorhanden ist | ||
| 4529 | oder nicht. Mit der Befehlszeilenoption @code{--missing} lässt sich | ||
| 4530 | herausfinden, welche Objekte im Ziel-Store noch fehlen. Der Befehl | ||
| 4531 | @command{guix copy} vereinfacht und optimiert diesen gesamten Prozess, ist | ||
| 4532 | also, was Sie in diesem Fall wahrscheinlich eher benutzen wollten (siehe | ||
| 4533 | @ref{Aufruf von guix copy}). | ||
| 4534 | |||
| 4535 | @cindex Nar, Archivformat | ||
| 4536 | @cindex Normalisiertes Archiv (Nar) | ||
| 4537 | Archive werden als »Normalisiertes Archiv«, kurz »Nar«, formatiert. Diese | ||
| 4538 | Technik folgt einem ähnlichen Gedanken wie beim »tar«-Format, unterscheidet | ||
| 4539 | sich aber auf eine für unsere Zwecke angemessene Art. Erstens werden im | ||
| 4540 | Nar-Format nicht sämtliche Unix-Metadaten aller Dateien aufgenommen, sondern | ||
| 4541 | nur der Dateityp (ob es sich um eine reguläre Datei, ein Verzeichnis oder | ||
| 4542 | eine symbolische Verknüpfung handelt). Unix-Dateiberechtigungen sowie | ||
| 4543 | Besitzer und Gruppe werden nicht gespeichert. Zweitens entspricht die | ||
| 4544 | Reihenfolge, in der der Inhalt von Verzeichnissen abgelegt wird, immer der | ||
| 4545 | Reihenfolge, in der die Dateinamen gemäß der C-Locale sortiert | ||
| 4546 | würden. Dadurch wird die Erstellung von Archivdateien völlig | ||
| 4547 | deterministisch. | ||
| 4548 | |||
| 4549 | @c FIXME: Add xref to daemon doc about signatures. | ||
| 4550 | Beim Exportieren versieht der Daemon den Inhalt des Archivs mit einer | ||
| 4551 | digitalen Signatur, auch Beglaubigung genannt. Diese digitale Signatur wird | ||
| 4552 | an das Archiv angehängt. Beim Importieren verifiziert der Daemon die | ||
| 4553 | Signatur und lehnt den Import ab, falls die Signatur ungültig oder der | ||
| 4554 | signierende Schlüssel nicht autorisiert ist. | ||
| 4555 | |||
| 4556 | Die wichtigsten Befehlszeilenoptionen sind: | ||
| 4557 | |||
| 4558 | @table @code | ||
| 4559 | @item --export | ||
| 4560 | Exportiert die angegebenen Store-Dateien oder Pakete (siehe unten) und | ||
| 4561 | schreibt das resultierende Archiv auf die Standardausgabe. | ||
| 4562 | |||
| 4563 | Abhängigkeiten @emph{fehlen} in der Ausgabe, außer wenn @code{--recursive} | ||
| 4564 | angegeben wurde. | ||
| 4565 | |||
| 4566 | @item -r | ||
| 4567 | @itemx --recursive | ||
| 4568 | Zusammen mit @code{--export} wird @command{guix archive} hiermit angewiesen, | ||
| 4569 | Abhängigkeiten der angegebenen Objekte auch ins Archiv aufzunehmen. Das | ||
| 4570 | resultierende Archiv ist somit eigenständig; es enthält den Abschluss der | ||
| 4571 | exportierten Store-Objekte. | ||
| 4572 | |||
| 4573 | @item --import | ||
| 4574 | Ein Archiv von der Standardeingabe lesen und darin enthaltende Dateien in | ||
| 4575 | den Store importieren. Der Import bricht ab, wenn das Archiv keine gültige | ||
| 4576 | digitale Signatur hat oder wenn es von einem öffentlichen Schlüssel signiert | ||
| 4577 | wurde, der keiner der autorisierten Schlüssel ist (siehe @code{--authorize} | ||
| 4578 | weiter unten). | ||
| 4579 | |||
| 4580 | @item --missing | ||
| 4581 | Eine Liste der Store-Dateinamen von der Standardeingabe lesen, je ein Name | ||
| 4582 | pro Zeile, und auf die Standardausgabe die Teilmenge dieser Dateien | ||
| 4583 | schreiben, die noch nicht im Store vorliegt. | ||
| 4584 | |||
| 4585 | @item --generate-key[=@var{Parameter}] | ||
| 4586 | @cindex Signieren, von Archiven | ||
| 4587 | Ein neues Schlüsselpaar für den Daemon erzeugen. Dies ist erforderlich, | ||
| 4588 | damit Archive mit @code{--export} exportiert werden können. Beachten Sie, | ||
| 4589 | dass diese Option normalerweise einige Zeit in Anspruch nimmt, da erst | ||
| 4590 | Entropie für die Erzeugung des Schlüsselpaares gesammelt werden muss. | ||
| 4591 | |||
| 4592 | Das erzeugte Schlüsselpaar wird typischerweise unter @file{/etc/guix} | ||
| 4593 | gespeichert, in den Dateien @file{signing-key.pub} (für den öffentlichen | ||
| 4594 | Schlüssel) und @file{signing-key.sec} (für den privaten Schlüssel, der | ||
| 4595 | geheim gehalten werden muss). Wurden keine @var{Parameters} angegeben, wird | ||
| 4596 | ein ECDSA-Schlüssel unter Verwendung der Kurve Ed25519 erzeugt, oder, falls | ||
| 4597 | die Libgcrypt-Version älter als 1.6.0 ist, ein 4096-Bit-RSA-Schlüssel. Sonst | ||
| 4598 | geben die @var{Parameter} für Libgcrypt geeignete Parameter für | ||
| 4599 | @code{genkey} an (siehe @ref{General public-key related Functions, | ||
| 4600 | @code{gcry_pk_genkey},, gcrypt, The Libgcrypt Reference Manual}). | ||
| 4601 | |||
| 4602 | @item --authorize | ||
| 4603 | @cindex Autorisieren, von Archiven | ||
| 4604 | Mit dem auf der Standardeingabe übergebenen öffentlichen Schlüssel signierte | ||
| 4605 | Importe autorisieren. Der öffentliche Schlüssel muss als | ||
| 4606 | »advanced«-formatierter S-Ausdruck gespeichert sein, d.h.@: im selben Format | ||
| 4607 | wie die Datei @file{signing-key.pub}. | ||
| 4608 | |||
| 4609 | Die Liste autorisierter Schlüssel wird in der Datei @file{/etc/guix/acl} | ||
| 4610 | gespeichert, die auch von Hand bearbeitet werden kann. Die Datei enthält | ||
| 4611 | @url{http://people.csail.mit.edu/rivest/Sexp.txt, »advanced«-formatierte | ||
| 4612 | S-Ausdrücke} und ist als eine Access Control List für die | ||
| 4613 | @url{http://theworld.com/~cme/spki.txt, Simple Public-Key Infrastructure | ||
| 4614 | (SPKI)} aufgebaut. | ||
| 4615 | |||
| 4616 | @item --extract=@var{Verzeichnis} | ||
| 4617 | @itemx -x @var{Verzeichnis} | ||
| 4618 | Ein Archiv mit einem einzelnen Objekt lesen, wie es von Substitutservern | ||
| 4619 | geliefert wird (siehe @ref{Substitute}) und ins @var{Verzeichnis} | ||
| 4620 | entpacken. Dies ist eine systemnahe Operation, die man nur selten direkt | ||
| 4621 | benutzt; siehe unten. | ||
| 4622 | |||
| 4623 | Zum Beispiel entpackt folgender Befehl das Substitut für Emacs, wie es von | ||
| 4624 | @code{@value{SUBSTITUTE-SERVER}} geliefert wird, nach @file{/tmp/emacs}: | ||
| 4625 | |||
| 4626 | @example | ||
| 4627 | $ wget -O - \ | ||
| 4628 | https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-emacs-24.5 \ | ||
| 4629 | | bunzip2 | guix archive -x /tmp/emacs | ||
| 4630 | @end example | ||
| 4631 | |||
| 4632 | Archive mit nur einem einzelnen Objekt unterscheiden sich von Archiven für | ||
| 4633 | mehrere Dateien, wie sie @command{guix archive --export} erzeugt; sie | ||
| 4634 | enthalten nur ein einzelnes Store-Objekt und @emph{keine} eingebettete | ||
| 4635 | Signatur. Beim Entpacken findet also @emph{keine} Signaturprüfung statt und | ||
| 4636 | ihrer Ausgabe sollte so erst einmal nicht vertraut werden. | ||
| 4637 | |||
| 4638 | Der eigentliche Zweck dieser Operation ist, die Inspektion von | ||
| 4639 | Archivinhalten von Substitutservern möglich zu machen, auch wenn diesen | ||
| 4640 | unter Umständen nicht vertraut wird. | ||
| 4641 | |||
| 4642 | @end table | ||
| 4643 | |||
| 4644 | |||
| 4645 | @c ********************************************************************* | ||
| 4646 | @node Entwicklung | ||
| 4647 | @chapter Entwicklung | ||
| 4648 | |||
| 4649 | @cindex Softwareentwicklung | ||
| 4650 | Wenn Sie ein Software-Entwickler sind, gibt Ihnen Guix Werkzeuge an die | ||
| 4651 | Hand, die Sie für hilfreich erachten dürften — ganz unabhängig davon, in | ||
| 4652 | welcher Sprache Sie entwickeln. Darum soll es in diesem Kapitel gehen. | ||
| 4653 | |||
| 4654 | Der Befehl @command{guix environment} stellt eine bequeme Möglichkeit dar, | ||
| 4655 | wie Sie eine @dfn{Entwicklungsumgebung} aufsetzen können, in der all die | ||
| 4656 | Abhängigkeiten und Werkzeuge enthalten sind, die Sie brauchen, wenn Sie an | ||
| 4657 | Ihrem Lieblingssoftwarepaket arbeiten. Der Befehl @command{guix pack} macht | ||
| 4658 | es Ihnen möglich, @dfn{Anwendungsbündel} zu erstellen, die leicht an Nutzer | ||
| 4659 | verteilt werden können, die kein Guix benutzen. | ||
| 4660 | |||
| 4661 | @menu | ||
| 4662 | * Aufruf von guix environment:: Entwicklungsumgebungen einrichten. | ||
| 4663 | * Aufruf von guix pack:: Software-Bündel erstellen. | ||
| 4664 | @end menu | ||
| 4665 | |||
| 4666 | @node Aufruf von guix environment | ||
| 4667 | @section @command{guix environment} aufrufen | ||
| 4668 | |||
| 4669 | @cindex reproduzierbare Erstellungsumgebungen | ||
| 4670 | @cindex Entwicklungsumgebungen | ||
| 4671 | @cindex @command{guix environment} | ||
| 4672 | @cindex Umgebung, Paketerstellungsumgebung | ||
| 4673 | Der Zweck von @command{guix environment} ist es, Hacker beim Aufbau einer | ||
| 4674 | reproduzierbaren Entwicklungsumgebung zu unterstützen, ohne dass diese ihr | ||
| 4675 | Paketprofil verunreinigen müssen. Das Werkzeug @command{guix environment} | ||
| 4676 | nimmt eines oder mehrere Pakete entgegen und erstellt erst all ihre | ||
| 4677 | Eingaben, um dann eine Shell-Umgebung herzustellen, in der diese benutzt | ||
| 4678 | werden können. | ||
| 4679 | |||
| 4680 | Die allgemeine Syntax lautet: | ||
| 4681 | |||
| 4682 | @example | ||
| 4683 | guix environment @var{Optionen} @var{Paket}@dots{} | ||
| 4684 | @end example | ||
| 4685 | |||
| 4686 | Folgendes Beispiel zeigt, wie eine neue Shell gestartet wird, auf der alles | ||
| 4687 | für die Entwicklung von GNU@tie{}Guile eingerichtet ist: | ||
| 4688 | |||
| 4689 | @example | ||
| 4690 | guix environment guile | ||
| 4691 | @end example | ||
| 4692 | |||
| 4693 | Wenn benötigte Abhängigkeiten noch nicht erstellt worden sind, wird | ||
| 4694 | @command{guix environment} sie automatisch erstellen lassen. Die Umgebung | ||
| 4695 | der neuen Shell ist eine ergänzte Version der Umgebung, in der @command{guix | ||
| 4696 | environment} ausgeführt wurde. Sie enthält neben den existierenden | ||
| 4697 | Umgebungsvariablen auch die nötigen Suchpfade, um das angegebene Paket | ||
| 4698 | erstellen zu können. Um eine »reine« Umgebung zu erstellen, in der die | ||
| 4699 | ursprünglichen Umgebungsvariablen nicht mehr vorkommen, kann die | ||
| 4700 | Befehlszeilenoption @code{--pure} benutzt werden@footnote{Manchmal ergänzen | ||
| 4701 | Nutzer fälschlicherweise Umgebungsvariable wie @code{PATH} in ihrer | ||
| 4702 | @file{~/.bashrc}-Datei. Das hat zur Folge, dass wenn @code{guix environment} | ||
| 4703 | Bash startet, selbige @file{~/.bashrc} von Bash gelesen wird und die neuen | ||
| 4704 | Umgebungen somit »verunreinigt«. Es ist ein Fehler, solche Umgebungsvariable | ||
| 4705 | in @file{.bashrc} zu definieren, stattdessen sollten sie in | ||
| 4706 | @file{.bash_profile} geschrieben werden, was nur von Login-Shells mit | ||
| 4707 | »source« geladen wird. Siehe @ref{Bash Startup Files,,, bash, The GNU Bash | ||
| 4708 | Reference Manual} für Details über beim Starten von Bash gelesene Dateien}. | ||
| 4709 | |||
| 4710 | @vindex GUIX_ENVIRONMENT | ||
| 4711 | @command{guix environment} definiert die Variable @code{GUIX_ENVIRONMENT} in | ||
| 4712 | der neu erzeugten Shell. Ihr Wert ist der Dateiname des Profils dieser neuen | ||
| 4713 | Umgebung. Das könnten Nutzer verwenden, um zum Beispiel eine besondere | ||
| 4714 | Prompt als Eingabeaufforderung für Entwicklungsumgebungen in ihrer | ||
| 4715 | @file{.bashrc} festzulegen (siehe @ref{Bash Startup Files,,, bash, The GNU | ||
| 4716 | Bash Reference Manual}): | ||
| 4717 | |||
| 4718 | @example | ||
| 4719 | if [ -n "$GUIX_ENVIRONMENT" ] | ||
| 4720 | then | ||
| 4721 | export PS1="\u@@\h \w [dev]\$ " | ||
| 4722 | fi | ||
| 4723 | @end example | ||
| 4724 | |||
| 4725 | @noindent | ||
| 4726 | …@: oder um ihr Profil durchzusehen: | ||
| 4727 | |||
| 4728 | @example | ||
| 4729 | $ ls "$GUIX_ENVIRONMENT/bin" | ||
| 4730 | @end example | ||
| 4731 | |||
| 4732 | Des Weiteren kann mehr als ein Paket angegeben werden. In diesem Fall wird | ||
| 4733 | die Vereinigung der Eingaben der jeweiligen Pakete zugänglich gemacht. Zum | ||
| 4734 | Beispiel erzeugt der folgende Befehl eine Shell, in der alle Abhängigkeiten | ||
| 4735 | von sowohl Guile als auch Emacs verfügbar sind: | ||
| 4736 | |||
| 4737 | @example | ||
| 4738 | guix environment guile emacs | ||
| 4739 | @end example | ||
| 4740 | |||
| 4741 | Manchmal will man keine interaktive Shell-Sitzung. Ein beliebiger Befehl | ||
| 4742 | kann aufgerufen werden, indem man nach Angabe der Pakete noch @code{--} vor | ||
| 4743 | den gewünschten Befehl schreibt, um ihn von den übrigen Argumenten | ||
| 4744 | abzutrennen: | ||
| 4745 | |||
| 4746 | @example | ||
| 4747 | guix environment guile -- make -j4 | ||
| 4748 | @end example | ||
| 4749 | |||
| 4750 | In anderen Situationen ist es bequemer, aufzulisten, welche Pakete in der | ||
| 4751 | Umgebung benötigt werden. Zum Beispiel führt der folgende Befehl | ||
| 4752 | @command{python} aus einer Umgebung heraus aus, in der Python@tie{}2.7 und | ||
| 4753 | NumPy enthalten sind: | ||
| 4754 | |||
| 4755 | @example | ||
| 4756 | guix environment --ad-hoc python2-numpy python-2.7 -- python | ||
| 4757 | @end example | ||
| 4758 | |||
| 4759 | Man kann auch sowohl die Abhängigkeiten eines Pakets haben wollen, als auch | ||
| 4760 | ein paar zusätzliche Pakete, die nicht Erstellungs- oder | ||
| 4761 | Laufzeitabhängigkeiten davon sind, aber trotzdem bei der Entwicklung | ||
| 4762 | nützlich sind. Deshalb hängt die Wirkung von der Position der | ||
| 4763 | Befehlszeilenoption @code{--ad-hoc} ab. Pakete, die links von | ||
| 4764 | @code{--ad-hoc} stehen, werden als Pakete interpretiert, deren | ||
| 4765 | Abhängigkeiten zur Umgebung hinzugefügt werden. Pakete, die rechts stehen, | ||
| 4766 | werden selbst zur Umgebung hinzugefügt. Zum Beispiel erzeugt der folgende | ||
| 4767 | Befehl eine Guix-Entwicklungsumgebung, die zusätzlich Git und strace | ||
| 4768 | umfasst: | ||
| 4769 | |||
| 4770 | @example | ||
| 4771 | guix environment guix --ad-hoc git strace | ||
| 4772 | @end example | ||
| 4773 | |||
| 4774 | Manchmal ist es wünschenswert, die Umgebung so viel wie möglich zu | ||
| 4775 | isolieren, um maximale Reinheit und Reproduzierbarkeit zu | ||
| 4776 | bekommen. Insbesondere ist es wünschenswert, den Zugriff auf @file{/usr/bin} | ||
| 4777 | und andere Systemressourcen aus der Entwicklungsumgebung heraus zu | ||
| 4778 | verhindern, wenn man Guix auf einer fremden Wirtsdistribution benutzt, die | ||
| 4779 | nicht Guix System ist. Zum Beispiel startet der folgende Befehl eine | ||
| 4780 | Guile-REPL in einer isolierten Umgebung, einem sogenannten »Container«, in | ||
| 4781 | der nur der Store und das aktuelle Arbeitsverzeichnis eingebunden sind: | ||
| 4782 | |||
| 4783 | @example | ||
| 4784 | guix environment --ad-hoc --container guile -- guile | ||
| 4785 | @end example | ||
| 4786 | |||
| 4787 | @quotation Anmerkung | ||
| 4788 | Die Befehlszeilenoption @code{--container} funktioniert nur mit Linux-libre | ||
| 4789 | 3.19 oder neuer. | ||
| 4790 | @end quotation | ||
| 4791 | |||
| 4792 | Im Folgenden werden die verfügbaren Befehlszeilenoptionen zusammengefasst. | ||
| 4793 | |||
| 4794 | @table @code | ||
| 4795 | @item --root=@var{Datei} | ||
| 4796 | @itemx -r @var{Datei} | ||
| 4797 | @cindex persistente Umgebung | ||
| 4798 | @cindex Müllsammlerwurzel, für Umgebungen | ||
| 4799 | Die @var{Datei} zu einer symbolischen Verknüpfung auf das Profil dieser | ||
| 4800 | Umgebung machen und als eine Müllsammlerwurzel registrieren. | ||
| 4801 | |||
| 4802 | Das ist nützlich, um seine Umgebung vor dem Müllsammler zu schützen und sie | ||
| 4803 | »persistent« zu machen. | ||
| 4804 | |||
| 4805 | Wird diese Option weggelassen, ist die Umgebung nur, solange die Sitzung von | ||
| 4806 | @command{guix environment} besteht, vor dem Müllsammler sicher. Das | ||
| 4807 | bedeutet, wenn Sie das nächste Mal dieselbe Umgebung neu erzeugen, müssen | ||
| 4808 | Sie vielleicht Pakete neu erstellen oder neu herunterladen. @ref{Aufruf von guix gc} hat mehr Informationen über Müllsammlerwurzeln. | ||
| 4809 | |||
| 4810 | @item --expression=@var{Ausdruck} | ||
| 4811 | @itemx -e @var{Ausdruck} | ||
| 4812 | Eine Umgebung für das Paket oder die Liste von Paketen erzeugen, zu der der | ||
| 4813 | @var{Ausdruck} ausgewertet wird. | ||
| 4814 | |||
| 4815 | Zum Beispiel startet dies: | ||
| 4816 | |||
| 4817 | @example | ||
| 4818 | guix environment -e '(@@ (gnu packages maths) petsc-openmpi)' | ||
| 4819 | @end example | ||
| 4820 | |||
| 4821 | eine Shell mit der Umgebung für eben diese bestimmte Variante des Pakets | ||
| 4822 | PETSc. | ||
| 4823 | |||
| 4824 | Wenn man dies ausführt: | ||
| 4825 | |||
| 4826 | @example | ||
| 4827 | guix environment --ad-hoc -e '(@@ (gnu) %base-packages)' | ||
| 4828 | @end example | ||
| 4829 | |||
| 4830 | bekommt man eine Shell, in der alle Basis-Pakete verfügbar sind. | ||
| 4831 | |||
| 4832 | Die obigen Befehle benutzen nur die Standard-Ausgabe des jeweiligen | ||
| 4833 | Pakets. Um andere Ausgaben auszuwählen, können zweielementige Tupel | ||
| 4834 | spezifiziert werden: | ||
| 4835 | |||
| 4836 | @example | ||
| 4837 | guix environment --ad-hoc -e '(list (@@ (gnu packages bash) bash) "include")' | ||
| 4838 | @end example | ||
| 4839 | |||
| 4840 | @item --load=@var{Datei} | ||
| 4841 | @itemx -l @var{Datei} | ||
| 4842 | Eine Umgebung erstellen für das Paket oder die Liste von Paketen, zu der der | ||
| 4843 | Code in der @var{Datei} ausgewertet wird. | ||
| 4844 | |||
| 4845 | Zum Beispiel könnte die @var{Datei} eine Definition wie diese enthalten | ||
| 4846 | (siehe @ref{Pakete definieren}): | ||
| 4847 | |||
| 4848 | @example | ||
| 4849 | @verbatiminclude environment-gdb.scm | ||
| 4850 | @end example | ||
| 4851 | |||
| 4852 | @item --manifest=@var{Datei} | ||
| 4853 | @itemx -m @var{Datei} | ||
| 4854 | Eine Umgebung für die Pakete erzeugen, die im Manifest-Objekt enthalten | ||
| 4855 | sind, das vom Scheme-Code in der @var{Datei} geliefert wird. | ||
| 4856 | |||
| 4857 | Dies verhält sich ähnlich wie die gleichnamige Option des Befehls | ||
| 4858 | @command{guix package} (siehe @ref{profile-manifest, @option{--manifest}}) | ||
| 4859 | und benutzt auch dieselben Manifestdateien. | ||
| 4860 | |||
| 4861 | @item --ad-hoc | ||
| 4862 | Alle angegebenen Pakete in der resultierenden Umgebung einschließen, als | ||
| 4863 | wären sie Eingaben eines @i{ad hoc} definierten Pakets. Diese | ||
| 4864 | Befehlszeilenoption ist nützlich, um schnell Umgebungen aufzusetzen, ohne | ||
| 4865 | dafür einen Paketausdruck schreiben zu müssen, der die gewünschten Eingaben | ||
| 4866 | enthält. | ||
| 4867 | |||
| 4868 | Zum Beispiel wird mit diesem Befehl: | ||
| 4869 | |||
| 4870 | @example | ||
| 4871 | guix environment --ad-hoc guile guile-sdl -- guile | ||
| 4872 | @end example | ||
| 4873 | |||
| 4874 | @command{guile} in einer Umgebung ausgeführt, in der sowohl Guile als auch | ||
| 4875 | Guile-SDL zur Verfügung stehen. | ||
| 4876 | |||
| 4877 | Beachten Sie, dass in diesem Beispiel implizit die vorgegebene Ausgabe von | ||
| 4878 | @code{guile} und @code{guile-sdl} verwendet wird, es aber auch möglich ist, | ||
| 4879 | eine bestimmte Ausgabe auszuwählen — z.B.@: wird mit @code{glib:bin} die | ||
| 4880 | Ausgabe @code{bin} von @code{glib} gewählt (siehe @ref{Pakete mit mehreren Ausgaben.}). | ||
| 4881 | |||
| 4882 | Diese Befehlszeilenoption kann mit dem standardmäßigen Verhalten von | ||
| 4883 | @command{guix environment} verbunden werden. Pakete, die vor @code{--ad-hoc} | ||
| 4884 | aufgeführt werden, werden als Pakete interpretiert, deren Abhängigkeiten zur | ||
| 4885 | Umgebung hinzugefügt werden, was dem standardmäßigen Verhalten | ||
| 4886 | entspricht. Pakete, die danach aufgeführt werden, werden selbst zur Umgebung | ||
| 4887 | hinzugefügt. | ||
| 4888 | |||
| 4889 | @item --pure | ||
| 4890 | Bestehende Umgebungsvariable deaktivieren, wenn die neue Umgebung erzeugt | ||
| 4891 | wird, mit Ausnahme der mit @option{--preserve} angegebenen Variablen (siehe | ||
| 4892 | unten). Dies bewirkt, dass eine Umgebung erzeugt wird, in der die Suchpfade | ||
| 4893 | nur Paketeingaben nennen und sonst nichts. | ||
| 4894 | |||
| 4895 | @item --preserve=@var{Regexp} | ||
| 4896 | @itemx -E @var{Regexp} | ||
| 4897 | Wenn das hier zusammen mit @option{--pure} angegeben wird, bleiben die zum | ||
| 4898 | regulären Ausdruck @var{Regexp} passenden Umgebungsvariablen erhalten — mit | ||
| 4899 | anderen Worten werden sie auf eine »weiße Liste« von Umgebungsvariablen | ||
| 4900 | gesetzt, die erhalten bleiben müssen. Diese Befehlszeilenoption kann | ||
| 4901 | mehrmals wiederholt werden. | ||
| 4902 | |||
| 4903 | @example | ||
| 4904 | guix environment --pure --preserve=^SLURM --ad-hoc openmpi @dots{} \ | ||
| 4905 | -- mpirun @dots{} | ||
| 4906 | @end example | ||
| 4907 | |||
| 4908 | In diesem Beispiel wird @command{mpirun} in einem Kontext ausgeführt, in dem | ||
| 4909 | die einzig definierten Umgebungsvariablen @code{PATH} und solche sind, deren | ||
| 4910 | Name mit @code{SLURM} beginnt, sowie die üblichen besonders »kostbaren« | ||
| 4911 | Variablen (@code{HOME}, @code{USER}, etc.). | ||
| 4912 | |||
| 4913 | @item --search-paths | ||
| 4914 | Die Umgebungsvariablendefinitionen anzeigen, aus denen die Umgebung besteht. | ||
| 4915 | |||
| 4916 | @item --system=@var{System} | ||
| 4917 | @itemx -s @var{System} | ||
| 4918 | Versuchen, für das angegebene @var{System} zu erstellen — z.B.@: | ||
| 4919 | @code{i686-linux}. | ||
| 4920 | |||
| 4921 | @item --container | ||
| 4922 | @itemx -C | ||
| 4923 | @cindex container | ||
| 4924 | Den @var{Befehl} in einer isolierten Umgebung (einem sogenannten | ||
| 4925 | »Container«) ausführen. Das aktuelle Arbeitsverzeichnis außerhalb des | ||
| 4926 | Containers wird in den Container zugeordnet. Zusätzlich wird, wenn es mit | ||
| 4927 | der Befehlszeilenoption @code{--user} nicht anders spezifiziert wurde, ein | ||
| 4928 | stellvertretendes persönliches Verzeichnis erzeugt, dessen Inhalt der des | ||
| 4929 | wirklichen persönlichen Verzeichnisses ist, sowie eine passend konfigurierte | ||
| 4930 | Datei @file{/etc/passwd}. | ||
| 4931 | |||
| 4932 | Der erzeugte Prozess läuft außerhalb des Containers als der momentane | ||
| 4933 | Nutzer. Innerhalb des Containers hat er dieselbe UID und GID wie der | ||
| 4934 | momentane Nutzer, außer die Befehlszeilenoption @option{--user} wird | ||
| 4935 | übergeben (siehe unten). | ||
| 4936 | |||
| 4937 | @item --network | ||
| 4938 | @itemx -N | ||
| 4939 | Bei isolierten Umgebungen (»Containern«) wird hiermit der | ||
| 4940 | Netzwerk-Namensraum mit dem des Wirtssystems geteilt. Container, die ohne | ||
| 4941 | diese Befehlszeilenoption erzeugt wurden, haben nur Zugriff auf das | ||
| 4942 | Loopback-Gerät. | ||
| 4943 | |||
| 4944 | @item --link-profile | ||
| 4945 | @itemx -P | ||
| 4946 | Bei isolierten Umgebungen (»Containern«) wird das Umgebungsprofil im | ||
| 4947 | Container als @file{~/.guix-profile} verknüpft. Das ist äquivalent dazu, den | ||
| 4948 | Befehl @command{ln -s $GUIX_ENVIRONMENT ~/.guix-profile} im Container | ||
| 4949 | auszuführen. Wenn das Verzeichnis bereits existiert, schlägt das Verknüpfen | ||
| 4950 | fehl und die Umgebung wird nicht hergestellt. Dieser Fehler wird immer | ||
| 4951 | eintreten, wenn @command{guix environment} im persönlichen Verzeichnis des | ||
| 4952 | Benutzers aufgerufen wurde. | ||
| 4953 | |||
| 4954 | Bestimmte Pakete sind so eingerichtet, dass sie in @code{~/.guix-profile} | ||
| 4955 | nach Konfigurationsdateien und Daten suchen,@footnote{Zum Beispiel | ||
| 4956 | inspiziert das Paket @code{fontconfig} das Verzeichnis | ||
| 4957 | @file{~/.guix-profile/share/fonts}, um zusätzliche Schriftarten zu finden.} | ||
| 4958 | weshalb @code{--link-profile} benutzt werden kann, damit sich diese | ||
| 4959 | Programme auch in der isolierten Umgebung wie erwartet verhalten. | ||
| 4960 | |||
| 4961 | @item --user=@var{Benutzer} | ||
| 4962 | @itemx -u @var{Benutzer} | ||
| 4963 | Bei isolierten Umgebungen (»Containern«) wird der Benutzername | ||
| 4964 | @var{Benutzer} anstelle des aktuellen Benutzers benutzt. Der erzeugte | ||
| 4965 | Eintrag in @file{/etc/passwd} im Container wird also den Namen | ||
| 4966 | @var{Benutzer} enthalten und das persönliche Verzeichnis wird den Namen | ||
| 4967 | @file{/home/BENUTZER} tragen; keine GECOS-Daten über den Nutzer werden in | ||
| 4968 | die Umgebung übernommen. Des Weiteren sind UID und GID innerhalb der | ||
| 4969 | isolierten Umgebung auf 1000 gesetzt. @var{Benutzer} muss auf dem System | ||
| 4970 | nicht existieren. | ||
| 4971 | |||
| 4972 | Zusätzlich werden alle geteilten oder exponierten Pfade (siehe jeweils | ||
| 4973 | @code{--share} und @code{--expose}), deren Ziel innerhalb des persönlichen | ||
| 4974 | Verzeichnisses des aktuellen Benutzers liegt, relativ zu | ||
| 4975 | @file{/home/BENUTZER} erscheinen, einschließlich der automatischen Zuordnung | ||
| 4976 | des aktuellen Arbeitsverzeichnisses. | ||
| 4977 | |||
| 4978 | @example | ||
| 4979 | # wird Pfade als /home/foo/wd, /home/foo/test und /home/foo/target exponieren | ||
| 4980 | cd $HOME/wd | ||
| 4981 | guix environment --container --user=foo \ | ||
| 4982 | --expose=$HOME/test \ | ||
| 4983 | --expose=/tmp/target=$HOME/target | ||
| 4984 | @end example | ||
| 4985 | |||
| 4986 | Obwohl dies das Datenleck von Nutzerdaten durch Pfade im persönlichen | ||
| 4987 | Verzeichnis und die Benutzereinträge begrenzt, kann dies nur als Teil einer | ||
| 4988 | größeren Lösung für Privatsphäre und Anonymität sinnvoll eingesetzt | ||
| 4989 | werden. Es sollte nicht für sich allein dazu eingesetzt werden. | ||
| 4990 | |||
| 4991 | @item --expose=@var{Quelle}[=@var{Ziel}] | ||
| 4992 | Bei isolierten Umgebungen (»Containern«) wird das Dateisystem unter | ||
| 4993 | @var{Quelle} vom Wirtssystem als Nur-Lese-Dateisystem @var{Ziel} im | ||
| 4994 | Container zugänglich gemacht. Wenn kein @var{Ziel} angegeben wurde, wird die | ||
| 4995 | @var{Quelle} auch als Ziel-Einhängepunkt in der isolierten Umgebung benutzt. | ||
| 4996 | |||
| 4997 | Im folgenden Beispiel wird eine Guile-REPL in einer isolierten Umgebung | ||
| 4998 | gestartet, in der das persönliche Verzeichnis des Benutzers als Verzeichnis | ||
| 4999 | @file{/austausch} nur für Lesezugriffe zugänglich gemacht wurde: | ||
| 5000 | |||
| 5001 | @example | ||
| 5002 | guix environment --container --expose=$HOME=/austausch --ad-hoc guile -- guile | ||
| 5003 | @end example | ||
| 5004 | |||
| 5005 | @item --share=@var{Quelle}[=@var{Ziel}] | ||
| 5006 | Bei isolierten Umgebungen (»Containern«) wird das Dateisystem unter | ||
| 5007 | @var{Quelle} vom Wirtssystem als beschreibbares Dateisystem @var{Ziel} im | ||
| 5008 | Container zugänglich gemacht. Wenn kein @var{Ziel} angegeben wurde, wird die | ||
| 5009 | @var{Quelle} auch als Ziel-Einhängepunkt in der isolierten Umgebung benutzt. | ||
| 5010 | |||
| 5011 | Im folgenden Beispiel wird eine Guile-REPL in einer isolierten Umgebung | ||
| 5012 | gestartet, in der das persönliche Verzeichnis des Benutzers als Verzeichnis | ||
| 5013 | @file{/austausch} sowohl für Lese- als auch für Schreibzugriffe zugänglich | ||
| 5014 | gemacht wurde: | ||
| 5015 | |||
| 5016 | @example | ||
| 5017 | guix environment --container --share=$HOME=/austausch --ad-hoc guile -- guile | ||
| 5018 | @end example | ||
| 5019 | @end table | ||
| 5020 | |||
| 5021 | @command{guix environment} unterstützt auch alle gemeinsamen | ||
| 5022 | Erstellungsoptionen, die von @command{guix build} unterstützt werden (siehe | ||
| 5023 | @ref{Gemeinsame Erstellungsoptionen}), und die Paketumwandlungsoptionen (siehe | ||
| 5024 | @ref{Paketumwandlungsoptionen}). | ||
| 5025 | |||
| 5026 | @node Aufruf von guix pack | ||
| 5027 | @section @command{guix pack} aufrufen | ||
| 5028 | |||
| 5029 | Manchmal möchten Sie Software an Leute weitergeben, die (noch!) nicht das | ||
| 5030 | Glück haben, Guix zu benutzen. Mit Guix würden sie nur @command{guix package | ||
| 5031 | -i @var{irgendetwas}} einzutippen brauchen, aber wenn sie kein Guix haben, | ||
| 5032 | muss es anders gehen. Hier kommt @command{guix pack} ins Spiel. | ||
| 5033 | |||
| 5034 | @quotation Anmerkung | ||
| 5035 | Wenn Sie aber nach einer Möglichkeit suchen, Binärdateien unter Maschinen | ||
| 5036 | auszutauschen, auf denen Guix bereits läuft, sollten Sie einen Blick auf die | ||
| 5037 | Abschnitte @ref{Aufruf von guix copy}, @ref{Aufruf von guix publish} und | ||
| 5038 | @ref{Aufruf von guix archive} werfen. | ||
| 5039 | @end quotation | ||
| 5040 | |||
| 5041 | @cindex Pack | ||
| 5042 | @cindex Bündel | ||
| 5043 | @cindex Anwendungsbündel | ||
| 5044 | @cindex Software-Bündel | ||
| 5045 | Der Befehl @command{guix pack} erzeugt ein gut verpacktes | ||
| 5046 | @dfn{Software-Bündel}: Konkret wird dadurch ein Tarball oder eine andere Art | ||
| 5047 | von Archiv mit den Binärdateien der Software erzeugt, die Sie sich gewünscht | ||
| 5048 | haben, zusammen mit all ihren Abhängigkeiten. Der resultierende Archiv kann | ||
| 5049 | auch auf jeder Maschine genutzt werden, die kein Guix hat, und jeder kann | ||
| 5050 | damit genau dieselben Binärdateien benutzen, die Ihnen unter Guix zur | ||
| 5051 | Verfügung stehen. Das Bündel wird dabei auf eine Bit für Bit reproduzierbare | ||
| 5052 | Art erzeugt, damit auch jeder nachprüfen kann, dass darin wirklich | ||
| 5053 | diejenigen Binärdateien enthalten sind, von denen Sie es behaupten. | ||
| 5054 | |||
| 5055 | Um zum Beispiel ein Bündel mit Guile, Emacs, Geiser und all ihren | ||
| 5056 | Abhängigkeiten zu erzeugen, führen Sie diesen Befehl aus: | ||
| 5057 | |||
| 5058 | @example | ||
| 5059 | $ guix pack guile emacs geiser | ||
| 5060 | @dots{} | ||
| 5061 | /gnu/store/@dots{}-pack.tar.gz | ||
| 5062 | @end example | ||
| 5063 | |||
| 5064 | Als Ergebnis erhalten Sie einen Tarball mit einem Verzeichnis | ||
| 5065 | @file{/gnu/store}, worin sich alles relevanten Pakete befinden. Der | ||
| 5066 | resultierende Tarball enthält auch ein @dfn{Profil} mit den drei angegebenen | ||
| 5067 | Paketen; es ist dieselbe Art von Profil, die auch @command{guix package -i} | ||
| 5068 | erzeugen würde. Mit diesem Mechanismus wird auch der binäre Tarball zur | ||
| 5069 | Installation von Guix erzeugt (siehe @ref{Aus Binärdatei installieren}). | ||
| 5070 | |||
| 5071 | Benutzer des Bündels müssten dann aber zum Beispiel | ||
| 5072 | @file{/gnu/store/@dots{}-profile/bin/guile} eintippen, um Guile auszuführen, | ||
| 5073 | was Ihnen zu unbequem sein könnte. Ein Ausweg wäre, dass Sie etwa eine | ||
| 5074 | symbolische Verknüpfung @file{/opt/gnu/bin} auf das Profil anlegen: | ||
| 5075 | |||
| 5076 | @example | ||
| 5077 | guix pack -S /opt/gnu/bin=bin guile emacs geiser | ||
| 5078 | @end example | ||
| 5079 | |||
| 5080 | @noindent | ||
| 5081 | Benutzer müssten dann nur noch @file{/opt/gnu/bin/guile} eintippen, um Guile | ||
| 5082 | zu genießen. | ||
| 5083 | |||
| 5084 | @cindex pfad-agnostische Binärdateien, mit @command{guix pack} | ||
| 5085 | Doch was ist, wenn die Empfängerin Ihres Bündels keine Administratorrechte | ||
| 5086 | auf ihrer Maschine hat, das Bündel also nicht ins Wurzelverzeichnis ihres | ||
| 5087 | Dateisystems entpacken kann? Dann möchten Sie vielleicht die | ||
| 5088 | Befehlszeilenoption @code{--relocatable} benutzen (siehe weiter unten). Mit | ||
| 5089 | dieser Option werden @dfn{pfad-agnostische Binärdateien} erzeugt, die auch | ||
| 5090 | in einem beliebigen anderen Verzeichnis in der Dateisystemhierarchie | ||
| 5091 | abgelegt und von dort ausgeführt werden können. In obigem Beispiel würden | ||
| 5092 | Benutzer Ihren Tarball in ihr Persönliches Verzeichnis (das | ||
| 5093 | »Home«-Verzeichnis) entpacken und von dort den Befehl | ||
| 5094 | @file{./opt/gnu/bin/guile} ausführen. | ||
| 5095 | |||
| 5096 | @cindex Docker, ein Abbild erstellen mit guix pack | ||
| 5097 | Eine weitere Möglichkeit ist, das Bündel im Format eines Docker-Abbilds | ||
| 5098 | (englisch Docker-Image) zu erzeugen. Das geht mit dem folgenden Befehl: | ||
| 5099 | |||
| 5100 | @example | ||
| 5101 | guix pack -f docker guile emacs geiser | ||
| 5102 | @end example | ||
| 5103 | |||
| 5104 | @noindent | ||
| 5105 | Das Ergebnis ist ein Tarball, der dem Befehl @command{docker load} übergeben | ||
| 5106 | werden kann. In der | ||
| 5107 | @uref{https://docs.docker.com/engine/reference/commandline/load/, | ||
| 5108 | Dokumentation von Docker} finden Sie nähere Informationen. | ||
| 5109 | |||
| 5110 | @cindex Singularity, ein Abbild erstellen mit guix pack | ||
| 5111 | @cindex SquashFS, ein Abbild erstellen mit guix pack | ||
| 5112 | Und noch eine weitere Möglichkeit ist, dass Sie ein SquashFS-Abbild mit | ||
| 5113 | folgendem Befehl erzeugen: | ||
| 5114 | |||
| 5115 | @example | ||
| 5116 | guix pack -f squashfs guile emacs geiser | ||
| 5117 | @end example | ||
| 5118 | |||
| 5119 | @noindent | ||
| 5120 | Das Ergebnis ist ein SquashFS-Dateisystemabbild, dass entweder als | ||
| 5121 | Dateisystem eingebunden oder mit Hilfe der @uref{http://singularity.lbl.gov, | ||
| 5122 | Singularity-Container-Ausführungsumgebung} als Dateisystemcontainer benutzt | ||
| 5123 | werden kann, mit Befehlen wie @command{singularity shell} oder | ||
| 5124 | @command{singularity exec}. | ||
| 5125 | |||
| 5126 | Es gibt mehrere Befehlszeilenoptionen, mit denen Sie Ihr Bündel anpassen | ||
| 5127 | können: | ||
| 5128 | |||
| 5129 | @table @code | ||
| 5130 | @item --format=@var{Format} | ||
| 5131 | @itemx -f @var{Format} | ||
| 5132 | Generiert ein Bündel im angegebenen @var{Format}. | ||
| 5133 | |||
| 5134 | Die verfügbaren Formate sind: | ||
| 5135 | |||
| 5136 | @table @code | ||
| 5137 | @item tarball | ||
| 5138 | Das standardmäßig benutzte Format. Damit wird ein Tarball generiert, der | ||
| 5139 | alle angegebenen Binärdateien und symbolischen Verknüpfungen enthält. | ||
| 5140 | |||
| 5141 | @item docker | ||
| 5142 | Generiert einen Tarball gemäß der | ||
| 5143 | @uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md, | ||
| 5144 | Docker Image Specification}, d.h.@: der Spezifikation für Docker-Abbilder. | ||
| 5145 | |||
| 5146 | @item squashfs | ||
| 5147 | Generiert ein SquashFS-Abbild, das alle angegebenen Binärdateien und | ||
| 5148 | symbolischen Verknüpfungen enthält, sowie leere Einhängepunkte für virtuelle | ||
| 5149 | Dateisysteme wie procfs. | ||
| 5150 | @end table | ||
| 5151 | |||
| 5152 | @cindex pfad-agnostische Binärdateien | ||
| 5153 | @item --relocatable | ||
| 5154 | @itemx -R | ||
| 5155 | Erzeugt @dfn{pfad-agnostische Binärdateien} — also »portable« Binärdateien, | ||
| 5156 | die an einer beliebigen Stelle in der Dateisystemhierarchie platziert und | ||
| 5157 | von dort ausgeführt werden können. | ||
| 5158 | |||
| 5159 | Wenn diese Befehlszeilenoption einmal übergeben wird, funktionieren die | ||
| 5160 | erzeugten Binärdateien nur dann, wenn @dfn{Benutzernamensräume} des | ||
| 5161 | Linux-Kernels unterstützt werden. Wenn sie @emph{zweimal}@footnote{Es gibt | ||
| 5162 | einen Trick, wie Sie sich das merken können: @code{-RR}, womit | ||
| 5163 | PRoot-Unterstützung hinzugefügt wird, kann man sich als Abkürzung für | ||
| 5164 | »Rundum Relocatable« oder englisch »Really Relocatable« vorstellen. Ist das | ||
| 5165 | nicht prima?} übergeben wird, laufen die Binärdateien notfalls mit PRoot, | ||
| 5166 | wenn keine Benutzernamensräume zur Verfügung stehen, funktionieren also | ||
| 5167 | ziemlich überall — siehe unten für die Auswirkungen. | ||
| 5168 | |||
| 5169 | Zum Beispiel können Sie ein Bash enthalltendes Bündel erzeugen mit: | ||
| 5170 | |||
| 5171 | @example | ||
| 5172 | guix pack -RR -S /mybin=bin bash | ||
| 5173 | @end example | ||
| 5174 | |||
| 5175 | @noindent | ||
| 5176 | …@: Sie können dieses dann auf eine Maschine ohne Guix kopieren und als | ||
| 5177 | normaler Nutzer aus Ihrem Persönlichen Verzeichnis (auch »Home«-Verzeichnis | ||
| 5178 | genannt) dann ausführen mit: | ||
| 5179 | |||
| 5180 | @example | ||
| 5181 | tar xf pack.tar.gz | ||
| 5182 | ./meine-bin/sh | ||
| 5183 | @end example | ||
| 5184 | |||
| 5185 | @noindent | ||
| 5186 | Wenn Sie in der so gestarteten Shell dann @code{ls /gnu/store} eintippen, | ||
| 5187 | sehen Sie, dass Ihnen angezeigt wird, in @file{/gnu/store} befänden sich | ||
| 5188 | alle Abhängigkeiten von @code{bash}, obwohl auf der Maschine überhaupt kein | ||
| 5189 | Verzeichnis @file{/gnu/store} existiert! Dies ist vermutlich die einfachste | ||
| 5190 | Art, mit Guix erstellte Software für eine Maschine ohne Guix auszuliefern. | ||
| 5191 | |||
| 5192 | @quotation Anmerkung | ||
| 5193 | Wenn die Voreinstellung verwendet wird, funktionieren pfad-agnostische | ||
| 5194 | Binärdateien nur mit @dfn{Benutzernamensräumen} (englisch @dfn{User | ||
| 5195 | namespaces}), einer Funktionalität des Linux-Kernels, mit der Benutzer ohne | ||
| 5196 | besondere Berechtigungen Dateisysteme einbinden (englisch »mount«) oder die | ||
| 5197 | Wurzel des Dateisystems wechseln können (»change root«, kurz »chroot«). Alte | ||
| 5198 | Versionen von Linux haben diese Funktionalität noch nicht unterstützt und | ||
| 5199 | manche Distributionen von GNU/Linux schalten sie ab. | ||
| 5200 | |||
| 5201 | Um pfad-agnostische Binärdateien zu erzeugen, die auch ohne | ||
| 5202 | Benutzernamensräume funktionieren, können Sie die Befehlszeilenoption | ||
| 5203 | @option{--relocatable} oder @option{-R} @emph{zweimal} angeben. In diesem | ||
| 5204 | Fall werden die Binärdateien zuerst überprüfen, ob Benutzernamensräume | ||
| 5205 | unterstützt werden, und sonst notfalls PRoot benutzen, um das Programm | ||
| 5206 | auszuführen, wenn Benutzernamensräume nicht unterstützt werden. | ||
| 5207 | |||
| 5208 | Das Programm @uref{https://proot-me.github.io/, PRoot} bietet auch | ||
| 5209 | Unterstützung für Dateisystemvirtualisierung, indem der Systemaufruf | ||
| 5210 | @code{ptrace} auf das laufende Programm angewendet wird. Dieser Ansatz | ||
| 5211 | funktioniert auch ohne besondere Kernel-Unterstützung, aber das Programm | ||
| 5212 | braucht mehr Zeit, um selbst Systemaufrufe durchzuführen. | ||
| 5213 | @end quotation | ||
| 5214 | |||
| 5215 | @item --expression=@var{Ausdruck} | ||
| 5216 | @itemx -e @var{Ausdruck} | ||
| 5217 | Als Paket benutzen, wozu der @var{Ausdruck} ausgewertet wird. | ||
| 5218 | |||
| 5219 | Der Zweck hiervon ist derselbe wie bei der gleichnamigen Befehlszeilenoption | ||
| 5220 | in @command{guix build} (siehe @ref{Zusätzliche Erstellungsoptionen, | ||
| 5221 | @code{--expression} in @command{guix build}}). | ||
| 5222 | |||
| 5223 | @item --manifest=@var{Datei} | ||
| 5224 | @itemx -m @var{Datei} | ||
| 5225 | Die Pakete benutzen, die im Manifest-Objekt aufgeführt sind, das vom | ||
| 5226 | Scheme-Code in der angegebenen @var{Datei} geliefert wird. | ||
| 5227 | |||
| 5228 | Dies hat einen ähnlichen Zweck wie die gleichnamige Befehlszeilenoption in | ||
| 5229 | @command{guix package} (siehe @ref{profile-manifest, @option{--manifest}}) | ||
| 5230 | und benutzt dieselben Regeln für Manifest-Dateien. Damit können Sie eine | ||
| 5231 | Reihe von Paketen einmal definieren und dann sowohl zum Erzeugen von | ||
| 5232 | Profilesn als auch zum Erzeugen von Archiven benutzen, letztere für | ||
| 5233 | Maschinen, auf denen Guix nicht installiert ist. Beachten Sie, dass Sie | ||
| 5234 | @emph{entweder} eine Manifest-Datei @emph{oder} eine Liste von Paketen | ||
| 5235 | angeben können, aber nicht beides. | ||
| 5236 | |||
| 5237 | @item --system=@var{System} | ||
| 5238 | @itemx -s @var{System} | ||
| 5239 | Versuchen, für die angegebene Art von @var{System} geeignete Binärdateien zu | ||
| 5240 | erstellen — z.B.@: @code{i686-linux} — statt für die Art von System, das die | ||
| 5241 | Erstellung durchführt. | ||
| 5242 | |||
| 5243 | @item --target=@var{Tripel} | ||
| 5244 | @cindex Cross-Kompilieren | ||
| 5245 | Lässt für das angegebene @var{Tripel} cross-erstellen, dieses muss ein | ||
| 5246 | gültiges GNU-Tripel wie z.B.@: @code{"mips64el-linux-gnu"} sein (siehe | ||
| 5247 | @ref{Specifying target triplets, GNU configuration triplets,, autoconf, | ||
| 5248 | Autoconf}). | ||
| 5249 | |||
| 5250 | @item --compression=@var{Werkzeug} | ||
| 5251 | @itemx -C @var{Werkzeug} | ||
| 5252 | Komprimiert den resultierenden Tarball mit dem angegebenen @var{Werkzeug} — | ||
| 5253 | dieses kann @code{gzip}, @code{bzip2}, @code{xz}, @code{lzip} oder | ||
| 5254 | @code{none} für keine Kompression sein. | ||
| 5255 | |||
| 5256 | @item --symlink=@var{Spezifikation} | ||
| 5257 | @itemx -S @var{Spezifikation} | ||
| 5258 | Fügt die in der @var{Spezifikation} festgelegten symbolischen Verknüpfungen | ||
| 5259 | zum Bündel hinzu. Diese Befehlszeilenoption darf mehrmals vorkommen. | ||
| 5260 | |||
| 5261 | Die @var{Spezifikation} muss von der Form | ||
| 5262 | @code{@var{Quellort}=@var{Zielort}} sein, wobei der @var{Quellort} der Ort | ||
| 5263 | der symbolischen Verknüpfung, die erstellt wird, und @var{Zielort} das Ziel | ||
| 5264 | der symbolischen Verknüpfung ist. | ||
| 5265 | |||
| 5266 | Zum Beispiel wird mit @code{-S /opt/gnu/bin=bin} eine symbolische | ||
| 5267 | Verknüpfung @file{/opt/gnu/bin} auf das Unterverzeichnis @file{bin} im | ||
| 5268 | Profil erzeugt. | ||
| 5269 | |||
| 5270 | @item --save-provenance | ||
| 5271 | Provenienzinformationen für die auf der Befehlszeile übergebenen Pakete | ||
| 5272 | speichern. Zu den Provenienzinformationen gehören die URL und der Commit | ||
| 5273 | jedes benutzten Kanals (siehe @ref{Kanäle}). | ||
| 5274 | |||
| 5275 | Provenienzinformationen werden in der Datei | ||
| 5276 | @file{/gnu/store/@dots{}-profile/manifest} im Bündel zusammen mit den | ||
| 5277 | üblichen Paketmetadaten abgespeichert — also Name und Version jedes Pakets, | ||
| 5278 | welche Eingaben dabei propagiert werden und so weiter. Die Informationen | ||
| 5279 | nützen den Empfängern des Bündels, weil sie dann wissen, woraus das Bündel | ||
| 5280 | (angeblich) besteht. | ||
| 5281 | |||
| 5282 | Der Vorgabe nach wird diese Befehlszeilenoption @emph{nicht} verwendet, weil | ||
| 5283 | Provenienzinformationen genau wie Zeitstempel nichts zum Erstellungsprozess | ||
| 5284 | beitragen. Mit anderen Worten gibt es unendlich viele Kanal-URLs und | ||
| 5285 | Commit-IDs, aus denen dasselbe Bündel stammen könnte. Wenn solche »stillen« | ||
| 5286 | Metadaten Teil des Ausgabe sind, dann wird also die bitweise | ||
| 5287 | Reproduzierbarkeit von Quellcode zu Binärdateien eingeschränkt. | ||
| 5288 | |||
| 5289 | @item --localstatedir | ||
| 5290 | @itemx --profile-name=@var{Name} | ||
| 5291 | Das »lokale Zustandsverzeichnis« @file{/var/guix} ins resultierende Bündel | ||
| 5292 | aufnehmen, speziell auch das Profil | ||
| 5293 | @file{/var/guix/profiles/per-user/root/@var{Name}} — der vorgegebene | ||
| 5294 | @var{Name} ist @code{guix-profile}, was @file{~root/.guix-profile} | ||
| 5295 | entspricht. | ||
| 5296 | |||
| 5297 | @file{/var/guix} enthält die Store-Datenbank (siehe @ref{Der Store}) sowie | ||
| 5298 | die Müllsammlerwurzeln (siehe @ref{Aufruf von guix gc}). Es ins Bündel | ||
| 5299 | aufzunehmen, bedeutet, dass der enthaltene Store »vollständig« ist und von | ||
| 5300 | Guix verwaltet werden kann, andernfalls wäre der Store im Bündel »tot« und | ||
| 5301 | nach dem Auspacken des Bündels könnte Guix keine Objekte mehr dort | ||
| 5302 | hinzufügen oder entfernen. | ||
| 5303 | |||
| 5304 | Ein Anwendungsfall hierfür ist der eigenständige, alle Komponenten | ||
| 5305 | umfassende binäre Tarball von Guix (siehe @ref{Aus Binärdatei installieren}). | ||
| 5306 | |||
| 5307 | @item --bootstrap | ||
| 5308 | Mit den Bootstrap-Binärdateien das Bündel erstellen. Diese Option ist nur | ||
| 5309 | für Guix-Entwickler nützlich. | ||
| 5310 | @end table | ||
| 5311 | |||
| 5312 | Außerdem unterstützt @command{guix pack} alle gemeinsamen | ||
| 5313 | Erstellungsoptionen (siehe @ref{Gemeinsame Erstellungsoptionen}) und alle | ||
| 5314 | Paketumwandlungsoptionen (siehe @ref{Paketumwandlungsoptionen}). | ||
| 5315 | |||
| 5316 | |||
| 5317 | @c ********************************************************************* | ||
| 5318 | @node Programmierschnittstelle | ||
| 5319 | @chapter Programmierschnittstelle | ||
| 5320 | |||
| 5321 | GNU Guix bietet mehrere Programmierschnittstellen (APIs) in der | ||
| 5322 | Programmiersprache Scheme an, mit denen Software-Pakete definiert, erstellt | ||
| 5323 | und gesucht werden können. Die erste Schnittstelle erlaubt es Nutzern, ihre | ||
| 5324 | eigenen Paketdefinitionen in einer Hochsprache zu schreiben. Diese | ||
| 5325 | Definitionen nehmen Bezug auf geläufige Konzepte der Paketverwaltung, wie | ||
| 5326 | den Namen und die Version eines Pakets, sein Erstellungssystem (Build | ||
| 5327 | System) und seine Abhängigkeiten (Dependencies). Diese Definitionen können | ||
| 5328 | dann in konkrete Erstellungsaktionen umgewandelt werden. | ||
| 5329 | |||
| 5330 | Erstellungsaktionen werden vom Guix-Daemon für dessen Nutzer | ||
| 5331 | durchgeführt. Bei einer normalen Konfiguration hat der Daemon Schreibzugriff | ||
| 5332 | auf den Store, also das Verzeichnis @file{/gnu/store}, Nutzer hingegen | ||
| 5333 | nicht. Die empfohlene Konfiguration lässt den Daemon die Erstellungen in | ||
| 5334 | chroot-Umgebungen durchführen, mit eigenen Benutzerkonten für | ||
| 5335 | »Erstellungsbenutzer«, um gegenseitige Beeinflussung der Erstellung und des | ||
| 5336 | übrigen Systems zu minimieren. | ||
| 5337 | |||
| 5338 | @cindex Ableitung | ||
| 5339 | Systemnahe APIs stehen zur Verfügung, um mit dem Daemon und dem Store zu | ||
| 5340 | interagieren. Um den Daemon anzuweisen, eine Erstellungsaktion | ||
| 5341 | durchzuführen, versorgen ihn Nutzer jeweils mit einer @dfn{Ableitung}. Eine | ||
| 5342 | Ableitung ist, wie durchzuführende Erstellungsaktionen, sowie die | ||
| 5343 | Umgebungen, in denen sie durchzuführen sind, in Guix eigentlich intern | ||
| 5344 | dargestellt werden. Ableitungen verhalten sich zu Paketdefinitionen | ||
| 5345 | vergleichbar mit Assembler-Code zu C-Programmen. Der Begriff »Ableitung« | ||
| 5346 | kommt daher, dass Erstellungsergebnisse daraus @emph{abgeleitet} werden. | ||
| 5347 | |||
| 5348 | Dieses Kapitel beschreibt der Reihe nach all diese Programmierschnittstellen | ||
| 5349 | (APIs), angefangen mit hochsprachlichen Paketdefinitionen. | ||
| 5350 | |||
| 5351 | @menu | ||
| 5352 | * Paketmodule:: Pakete aus Sicht des Programmierers. | ||
| 5353 | * Pakete definieren:: Wie Sie neue Pakete definieren. | ||
| 5354 | * Erstellungssysteme:: Angeben, wie Pakete erstellt werden. | ||
| 5355 | * Der Store:: Den Paket-Store verändern. | ||
| 5356 | * Ableitungen:: Systemnahe Schnittstelle für Paketableitungen. | ||
| 5357 | * Die Store-Monade:: Rein funktionale Schnittstelle zum Store. | ||
| 5358 | * G-Ausdrücke:: Erstellungsausdrücke verarbeiten. | ||
| 5359 | * Aufruf von guix repl:: Interaktiv an Guix herumbasteln. | ||
| 5360 | @end menu | ||
| 5361 | |||
| 5362 | @node Paketmodule | ||
| 5363 | @section Paketmodule | ||
| 5364 | |||
| 5365 | Aus Programmierersicht werden die Paketdefinitionen der GNU-Distribution als | ||
| 5366 | Guile-Module in Namensräumen wie @code{(gnu packages @dots{})} sichtbar | ||
| 5367 | gemacht@footnote{Beachten Sie, dass Pakete unter dem Modulnamensraum | ||
| 5368 | @code{(gnu packages @dots{})} nicht notwendigerweise auch »GNU-Pakete« | ||
| 5369 | sind. Dieses Schema für die Benennung von Modulen folgt lediglich den | ||
| 5370 | üblichen Guile-Konventionen: @code{gnu} bedeutet, dass die Module als Teil | ||
| 5371 | des GNU-Systems ausgeliefert werden, und @code{packages} gruppiert Module | ||
| 5372 | mit Paketdefinitionen.} (siehe @ref{Module, Guile modules,, guile, GNU | ||
| 5373 | Guile Reference Manual}). Zum Beispiel exportiert das Modul @code{(gnu | ||
| 5374 | packages emacs)} eine Variable namens @code{emacs}, die an ein | ||
| 5375 | @code{<package>}-Objekt gebunden ist (@pxref{Pakete definieren}). | ||
| 5376 | |||
| 5377 | The @code{(gnu packages @dots{})} module name space is automatically scanned | ||
| 5378 | for packages by the command-line tools. For instance, when running | ||
| 5379 | @code{guix package -i emacs}, all the @code{(gnu packages @dots{})} modules | ||
| 5380 | are scanned until one that exports a package object whose name is | ||
| 5381 | @code{emacs} is found. This package search facility is implemented in the | ||
| 5382 | @code{(gnu packages)} module. | ||
| 5383 | |||
| 5384 | @cindex Anpassung, von Paketen | ||
| 5385 | @cindex package module search path | ||
| 5386 | Users can store package definitions in modules with different names---e.g., | ||
| 5387 | @code{(my-packages emacs)}@footnote{Note that the file name and module name | ||
| 5388 | must match. For instance, the @code{(my-packages emacs)} module must be | ||
| 5389 | stored in a @file{my-packages/emacs.scm} file relative to the load path | ||
| 5390 | specified with @option{--load-path} or @code{GUIX_PACKAGE_PATH}. | ||
| 5391 | @xref{Modules and the File System,,, guile, GNU Guile Reference Manual}, for | ||
| 5392 | details.}. There are two ways to make these package definitions visible to | ||
| 5393 | the user interfaces: | ||
| 5394 | |||
| 5395 | @enumerate | ||
| 5396 | @item | ||
| 5397 | By adding the directory containing your package modules to the search path | ||
| 5398 | with the @code{-L} flag of @command{guix package} and other commands | ||
| 5399 | (@pxref{Gemeinsame Erstellungsoptionen}), or by setting the @code{GUIX_PACKAGE_PATH} | ||
| 5400 | environment variable described below. | ||
| 5401 | |||
| 5402 | @item | ||
| 5403 | By defining a @dfn{channel} and configuring @command{guix pull} so that it | ||
| 5404 | pulls from it. A channel is essentially a Git repository containing package | ||
| 5405 | modules. @xref{Kanäle}, for more information on how to define and use | ||
| 5406 | channels. | ||
| 5407 | @end enumerate | ||
| 5408 | |||
| 5409 | @code{GUIX_PACKAGE_PATH} works similarly to other search path variables: | ||
| 5410 | |||
| 5411 | @defvr {Environment Variable} GUIX_PACKAGE_PATH | ||
| 5412 | This is a colon-separated list of directories to search for additional | ||
| 5413 | package modules. Directories listed in this variable take precedence over | ||
| 5414 | the own modules of the distribution. | ||
| 5415 | @end defvr | ||
| 5416 | |||
| 5417 | The distribution is fully @dfn{bootstrapped} and @dfn{self-contained}: each | ||
| 5418 | package is built based solely on other packages in the distribution. The | ||
| 5419 | root of this dependency graph is a small set of @dfn{bootstrap binaries}, | ||
| 5420 | provided by the @code{(gnu packages bootstrap)} module. For more | ||
| 5421 | information on bootstrapping, @pxref{Bootstrapping}. | ||
| 5422 | |||
| 5423 | @node Pakete definieren | ||
| 5424 | @section Pakete definieren | ||
| 5425 | |||
| 5426 | Mit den Modulen @code{(guix packages)} und @code{(guix build-system)} können | ||
| 5427 | Paketdefinitionen auf einer hohen Abstraktionsebene geschrieben werden. Zum | ||
| 5428 | Beispiel sieht die Paketdefinition bzw. das @dfn{Rezept} für das Paket von | ||
| 5429 | GNU Hello so aus: | ||
| 5430 | |||
| 5431 | @example | ||
| 5432 | (define-module (gnu packages hello) | ||
| 5433 | #:use-module (guix packages) | ||
| 5434 | #:use-module (guix download) | ||
| 5435 | #:use-module (guix build-system gnu) | ||
| 5436 | #:use-module (guix licenses) | ||
| 5437 | #:use-module (gnu packages gawk)) | ||
| 5438 | |||
| 5439 | (define-public hello | ||
| 5440 | (package | ||
| 5441 | (name "hello") | ||
| 5442 | (version "2.10") | ||
| 5443 | (source (origin | ||
| 5444 | (method url-fetch) | ||
| 5445 | (uri (string-append "mirror://gnu/hello/hello-" version | ||
| 5446 | ".tar.gz")) | ||
| 5447 | (sha256 | ||
| 5448 | (base32 | ||
| 5449 | "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))) | ||
| 5450 | (build-system gnu-build-system) | ||
| 5451 | (arguments '(#:configure-flags '("--enable-silent-rules"))) | ||
| 5452 | (inputs `(("gawk" ,gawk))) | ||
| 5453 | (synopsis "Hello, GNU world: An example GNU package") | ||
| 5454 | (description "Guess what GNU Hello prints!") | ||
| 5455 | (home-page "http://www.gnu.org/software/hello/") | ||
| 5456 | (license gpl3+))) | ||
| 5457 | @end example | ||
| 5458 | |||
| 5459 | @noindent | ||
| 5460 | Auch ohne ein Experte in Scheme zu sein, könnten Leser erraten haben, was | ||
| 5461 | die verschiedenen Felder dabei bedeuten. Dieser Ausdruck bindet die Variable | ||
| 5462 | @code{hello} an ein @code{<package>}-Objekt, was an sich nur ein Verbund | ||
| 5463 | (Record) ist (siehe @ref{SRFI-9, Scheme records,, guile, GNU Guile Reference | ||
| 5464 | Manual}). Die Felder dieses Paket-Objekts lassen sich mit den Prozeduren aus | ||
| 5465 | dem Modul @code{(guix packages)} auslesen, zum Beispiel liefert | ||
| 5466 | @code{(package-name hello)} — Überraschung! — @code{"hello"}. | ||
| 5467 | |||
| 5468 | Mit etwas Glück können Sie die Definition vielleicht teilweise oder sogar | ||
| 5469 | ganz aus einer anderen Paketsammlung importieren, indem Sie den Befehl | ||
| 5470 | @code{guix import} verwenden (siehe @ref{Aufruf von guix import}). | ||
| 5471 | |||
| 5472 | In obigem Beispiel wurde @var{hello} in einem eigenen Modul ganz für sich | ||
| 5473 | alleine definiert, und zwar @code{(gnu packages hello)}. Technisch gesehen | ||
| 5474 | muss es nicht unbedingt in einem solchen Modul definiert werden, aber es ist | ||
| 5475 | bequem, denn alle Module unter @code{(gnu packages @dots{})} werden | ||
| 5476 | automatisch von den Befehlszeilenwerkzeugen gefunden (siehe @ref{Paketmodule}). | ||
| 5477 | |||
| 5478 | Ein paar Dinge sind noch erwähnenswert in der obigen Paketdefinition: | ||
| 5479 | |||
| 5480 | @itemize | ||
| 5481 | @item | ||
| 5482 | Das @code{source}-Feld für die Quelle des Pakets ist ein | ||
| 5483 | @code{<origin>}-Objekt, was den Paketursprung angibt (siehe @ref{»origin«-Referenz} für eine vollständige Referenz). Hier wird dafür die Methode | ||
| 5484 | @code{url-fetch} aus dem Modul @code{(guix download)} benutzt, d.h.@: die | ||
| 5485 | Quelle ist eine Datei, die über FTP oder HTTP heruntergeladen werden soll. | ||
| 5486 | |||
| 5487 | Das Präfix @code{mirror://gnu} lässt @code{url-fetch} einen der | ||
| 5488 | GNU-Spiegelserver benutzen, die in @code{(guix download)} definiert sind. | ||
| 5489 | |||
| 5490 | Das Feld @code{sha256} legt den erwarteten SHA256-Hashwert der | ||
| 5491 | herunterzuladenden Datei fest. Ihn anzugeben ist Pflicht und er ermöglicht | ||
| 5492 | es Guix, die Integrität der Datei zu überprüfen. Die Form @code{(base32 | ||
| 5493 | @dots{})} geht der base32-Darstellung des Hash-Wertes voraus. Sie finden die | ||
| 5494 | base32-Darstellung mit Hilfe der Befehle @code{guix download} (siehe | ||
| 5495 | @ref{Aufruf von guix download}) und @code{guix hash} (siehe @ref{Aufruf von guix hash}). | ||
| 5496 | |||
| 5497 | @cindex Patches | ||
| 5498 | Wenn nötig kann in der @code{origin}-Form auch ein @code{patches}-Feld | ||
| 5499 | stehen, wo anzuwendende Patches aufgeführt werden, sowie ein | ||
| 5500 | @code{snippet}-Feld mit einem Scheme-Ausdruck mit den Anweisungen, wie der | ||
| 5501 | Quellcode zu modifizieren ist. | ||
| 5502 | |||
| 5503 | @item | ||
| 5504 | @cindex GNU-Erstellungssystem | ||
| 5505 | Das Feld @code{build-system} legt fest, mit welcher Prozedur das Paket | ||
| 5506 | erstellt werden soll (siehe @ref{Erstellungssysteme}). In diesem Beispiel steht | ||
| 5507 | @var{gnu-build-system} für das wohlbekannte GNU-Erstellungssystem, wo Pakete | ||
| 5508 | mit der üblichen Befehlsfolge @code{./configure && make && make check && | ||
| 5509 | make install} konfiguriert, erstellt und installiert werden. | ||
| 5510 | |||
| 5511 | @item | ||
| 5512 | Das Feld @code{arguments} gibt an, welche Optionen dem Erstellungssystem | ||
| 5513 | mitgegeben werden sollen (siehe @ref{Erstellungssysteme}). In diesem Fall | ||
| 5514 | interpretiert @var{gnu-build-system} diese als Auftrag, @file{configure} mit | ||
| 5515 | der Befehlszeilenoption @code{--enable-silent-rules} auszuführen. | ||
| 5516 | |||
| 5517 | @cindex quote | ||
| 5518 | @cindex Maskierung | ||
| 5519 | @findex ' | ||
| 5520 | @findex quote | ||
| 5521 | Was hat es mit diesen einfachen Anführungszeichen (@code{'}) auf sich? Sie | ||
| 5522 | gehören zur Syntax von Scheme und führen eine wörtlich zu interpretierende | ||
| 5523 | Datenlisten ein; dies nennt sich Maskierung oder Quotierung. @code{'} ist | ||
| 5524 | synonym mit @code{quote}. @ref{Expression Syntax, quoting,, guile, GNU Guile | ||
| 5525 | Reference Manual} enthält weitere Details. Hierbei ist also der Wert des | ||
| 5526 | @code{arguments}-Feldes eine Liste von Argumenten, die an das | ||
| 5527 | Erstellungssystem weitergereicht werden, wie bei @code{apply} (siehe | ||
| 5528 | @ref{Fly Evaluation, @code{apply},, guile, GNU Guile Reference Manual}). | ||
| 5529 | |||
| 5530 | Ein Doppelkreuz gefolgt von einem Doppelpunkt (@code{#:}) definiert ein | ||
| 5531 | Scheme-@dfn{Schlüsselwort} (siehe @ref{Keywords,,, guile, GNU Guile | ||
| 5532 | Reference Manual}) und @code{#:configure-flags} ist ein Schlüsselwort, um | ||
| 5533 | eine Befehlszeilenoption an das Erstellungssystem mitzugeben (siehe | ||
| 5534 | @ref{Coding With Keywords,,, guile, GNU Guile Reference Manual}). | ||
| 5535 | |||
| 5536 | @item | ||
| 5537 | Das Feld @code{inputs} legt Eingaben an den Erstellungsprozess fest — d.h.@: | ||
| 5538 | Abhängigkeiten des Pakets zur Erstellungs- oder Laufzeit. Hier definieren | ||
| 5539 | wir eine Eingabe namens @code{"gawk"}, deren Wert wir auf den Wert der | ||
| 5540 | @var{gawk}-Variablen festlegen; @var{gawk} ist auch selbst wiederum an ein | ||
| 5541 | @code{<package>}-Objekt als Variablenwert gebunden. | ||
| 5542 | |||
| 5543 | @cindex Backquote (Quasimaskierung) | ||
| 5544 | @findex ` | ||
| 5545 | @findex quasiquote | ||
| 5546 | @cindex Komma (Demaskierung) | ||
| 5547 | @findex , | ||
| 5548 | @findex unquote | ||
| 5549 | @findex ,@@ | ||
| 5550 | @findex unquote-splicing | ||
| 5551 | Auch mit @code{`} (einem Backquote, stattdessen kann man auch das längere | ||
| 5552 | Synonym @code{quasiquote} schreiben) können wir eine wörtlich als Daten | ||
| 5553 | interpretierte Liste im @code{inputs}-Feld einführen, aber bei dieser | ||
| 5554 | »Quasimaskierung« kann @code{,} (ein Komma, oder dessen Synonym | ||
| 5555 | @code{unquote}) benutzt werden, um den ausgewerteten Wert eines Ausdrucks in | ||
| 5556 | diese Liste einzufügen (siehe @ref{Expression Syntax, unquote,, guile, GNU | ||
| 5557 | Guile Reference Manual}). | ||
| 5558 | |||
| 5559 | Beachten Sie, dass GCC, Coreutils, Bash und andere essenzielle Werkzeuge | ||
| 5560 | hier nicht als Eingaben aufgeführt werden müssen. Stattdessen sorgt schon | ||
| 5561 | @var{gnu-build-system} dafür, dass diese vorhanden sein müssen (siehe | ||
| 5562 | @ref{Erstellungssysteme}). | ||
| 5563 | |||
| 5564 | Sämtliche anderen Abhängigkeiten müssen aber im @code{inputs}-Feld | ||
| 5565 | aufgezählt werden. Jede hier nicht angegebene Abhängigkeit wird während des | ||
| 5566 | Erstellungsprozesses schlicht nicht verfügbar sein, woraus ein | ||
| 5567 | Erstellungsfehler resultieren kann. | ||
| 5568 | @end itemize | ||
| 5569 | |||
| 5570 | Siehe @ref{»package«-Referenz} für eine umfassende Beschreibung aller | ||
| 5571 | erlaubten Felder. | ||
| 5572 | |||
| 5573 | Sobald eine Paketdefinition eingesetzt wurde, können Sie das Paket mit Hilfe | ||
| 5574 | des Befehlszeilenwerkzeugs @code{guix build} dann auch tatsächlich erstellen | ||
| 5575 | (siehe @ref{Aufruf von guix build}) und dabei jegliche Erstellungsfehler, auf | ||
| 5576 | die Sie stoßen, beseitigen (siehe @ref{Fehlschläge beim Erstellen untersuchen}). Sie | ||
| 5577 | können den Befehl @command{guix edit} benutzen, um leicht zur | ||
| 5578 | Paketdefinition zurückzuspringen (siehe @ref{Aufruf von guix edit}). Unter | ||
| 5579 | @ref{Paketrichtlinien} finden Sie mehr Informationen darüber, wie Sie | ||
| 5580 | Paketdefinitionen testen, und unter @ref{Aufruf von guix lint} finden Sie | ||
| 5581 | Informationen, wie Sie prüfen, ob eine Definition alle Stilkonventionen | ||
| 5582 | einhält. | ||
| 5583 | @vindex GUIX_PACKAGE_PATH | ||
| 5584 | Zuletzt finden Sie unter @ref{Kanäle} Informationen, wie Sie die | ||
| 5585 | Distribution um Ihre eigenen Pakete in einem »Kanal« erweitern. | ||
| 5586 | |||
| 5587 | Zu all dem sei auch erwähnt, dass Sie das Aktualisieren einer | ||
| 5588 | Paketdefinition auf eine vom Anbieter neu veröffentlichte Version mit dem | ||
| 5589 | Befehl @command{guix refresh} teilweise automatisieren können (siehe | ||
| 5590 | @ref{Aufruf von guix refresh}). | ||
| 5591 | |||
| 5592 | Hinter den Kulissen wird die einem @code{<package>}-Objekt entsprechende | ||
| 5593 | Ableitung zuerst durch @code{package-derivation} berechnet. Diese Ableitung | ||
| 5594 | wird in der @code{.drv}-Datei unter @file{/gnu/store} gespeichert. Die von | ||
| 5595 | ihr vorgeschriebenen Erstellungsaktionen können dann durch die Prozedur | ||
| 5596 | @code{build-derivations} umgesetzt werden (siehe @ref{Der Store}). | ||
| 5597 | |||
| 5598 | @deffn {Scheme-Prozedur} package-derivation @var{Store} @var{Paket} [@var{System}] | ||
| 5599 | Das @code{<derivation>}-Objekt zum @var{Paket} für das angegebene | ||
| 5600 | @var{System} liefern (siehe @ref{Ableitungen}). | ||
| 5601 | |||
| 5602 | Als @var{Paket} muss ein gültiges @code{<package>}-Objekt angegeben werden | ||
| 5603 | und das @var{System} muss eine Zeichenkette sein, die das Zielsystem angibt | ||
| 5604 | — z.B.@: @code{"x86_64-linux"} für ein auf x86_64 laufendes, Linux-basiertes | ||
| 5605 | GNU-System. @var{Store} muss eine Verbindung zum Daemon sein, der die | ||
| 5606 | Operationen auf dem Store durchführt (siehe @ref{Der Store}). | ||
| 5607 | @end deffn | ||
| 5608 | |||
| 5609 | @noindent | ||
| 5610 | @cindex Cross-Kompilieren | ||
| 5611 | Auf ähnliche Weise kann eine Ableitung berechnet werden, die ein Paket für | ||
| 5612 | ein anderes System cross-erstellt. | ||
| 5613 | |||
| 5614 | @deffn {Scheme-Prozedur} package-cross-derivation @var{Store} @ | ||
| 5615 | @var{Paket} @var{Ziel} [@var{System}] Liefert das | ||
| 5616 | @code{<derivation>}-Objekt, um das @var{Paket} zu cross-erstellen vom | ||
| 5617 | @var{System} aus für das @var{Ziel}-System. | ||
| 5618 | |||
| 5619 | Als @var{Ziel} muss ein gültiges GNU-Tripel angegeben werden, was die | ||
| 5620 | Ziel-Hardware und das zugehörige Betriebssystem beschreibt, wie z.B.@: | ||
| 5621 | @code{"mips64el-linux-gnu"} (siehe @ref{Configuration Names, GNU | ||
| 5622 | configuration triplets,, configure, GNU Configure and Build System}). | ||
| 5623 | @end deffn | ||
| 5624 | |||
| 5625 | @cindex Paketumwandlungen | ||
| 5626 | @cindex Eingaben umschreiben | ||
| 5627 | @cindex Abhängigkeitsbaum umschreiben | ||
| 5628 | Pakete können auf beliebige Art verändert werden. Ein Beispiel für eine | ||
| 5629 | nützliche Veränderung ist das @dfn{Umschreiben von Eingaben}, womit der | ||
| 5630 | Abhängigkeitsbaum eines Pakets umgeschrieben wird, indem bestimmte Eingaben | ||
| 5631 | durch andere ersetzt werden: | ||
| 5632 | |||
| 5633 | @deffn {Scheme-Prozedur} package-input-rewriting @var{Ersetzungen} @ | ||
| 5634 | [@var{umgeschriebener-Name}] Eine Prozedur liefern, die für ein ihr | ||
| 5635 | übergebenes Paket dessen direkte und indirekte Abhängigkeit (aber nicht | ||
| 5636 | dessen implizite Eingaben) gemäß den @var{Ersetzungen} | ||
| 5637 | umschreibt. @var{Ersetzungen} ist eine Liste von Paketpaaren; das erste | ||
| 5638 | Element eines Paares ist das zu ersetzende Paket und das zweite ist, wodurch | ||
| 5639 | es ersetzt werden soll. | ||
| 5640 | |||
| 5641 | Optional kann als @var{umgeschriebener-Name} eine ein Argument nehmende | ||
| 5642 | Prozedur angegeben werden, die einen Paketnamen nimmt und den Namen nach dem | ||
| 5643 | Umschreiben zurückliefert. | ||
| 5644 | @end deffn | ||
| 5645 | |||
| 5646 | @noindent | ||
| 5647 | Betrachten Sie dieses Beispiel: | ||
| 5648 | |||
| 5649 | @example | ||
| 5650 | (define libressl-statt-openssl | ||
| 5651 | ;; Dies ist eine Prozedur, mit der OPENSSL durch LIBRESSL | ||
| 5652 | ;; rekursiv ersetzt wird. | ||
| 5653 | (package-input-rewriting `((,openssl . ,libressl)))) | ||
| 5654 | |||
| 5655 | (define git-mit-libressl | ||
| 5656 | (libressl-statt-openssl git)) | ||
| 5657 | @end example | ||
| 5658 | |||
| 5659 | @noindent | ||
| 5660 | Hier definieren wir zuerst eine Umschreibeprozedur, die @var{openssl} durch | ||
| 5661 | @var{libressl} ersetzt. Dann definieren wir damit eine @dfn{Variante} des | ||
| 5662 | @var{git}-Pakets, die @var{libressl} statt @var{openssl} benutzt. Das ist | ||
| 5663 | genau, was auch die Befehlszeilenoption @option{--with-input} tut (siehe | ||
| 5664 | @ref{Paketumwandlungsoptionen, @option{--with-input}}). | ||
| 5665 | |||
| 5666 | The following variant of @code{package-input-rewriting} can match packages | ||
| 5667 | to be replaced by name rather than by identity. | ||
| 5668 | |||
| 5669 | @deffn {Scheme-Prozedur} package-input-rewriting/spec @var{Ersetzungen} | ||
| 5670 | Return a procedure that, given a package, applies the given | ||
| 5671 | @var{replacements} to all the package graph (excluding implicit inputs). | ||
| 5672 | @var{replacements} is a list of spec/procedures pair; each spec is a package | ||
| 5673 | specification such as @code{"gcc"} or @code{"guile@@2"}, and each procedure | ||
| 5674 | takes a matching package and returns a replacement for that package. | ||
| 5675 | @end deffn | ||
| 5676 | |||
| 5677 | The example above could be rewritten this way: | ||
| 5678 | |||
| 5679 | @example | ||
| 5680 | (define libressl-statt-openssl | ||
| 5681 | ;; Rekursiv alle Pakete namens "openssl" durch LibreSSL ersetzen. | ||
| 5682 | (package-input-rewriting/spec `(("openssl" . ,(const libressl))))) | ||
| 5683 | @end example | ||
| 5684 | |||
| 5685 | The key difference here is that, this time, packages are matched by spec and | ||
| 5686 | not by identity. In other words, any package in the graph that is called | ||
| 5687 | @code{openssl} will be replaced. | ||
| 5688 | |||
| 5689 | Eine allgemeiner anwendbare Prozedur, um den Abhängigkeitsgraphen eines | ||
| 5690 | Pakets umzuschreiben, ist @code{package-mapping}. Sie unterstützt beliebige | ||
| 5691 | Änderungen an den Knoten des Graphen. | ||
| 5692 | |||
| 5693 | @deffn {Scheme-Prozedur} package-mapping @var{Prozedur} [@var{Schnitt?}] | ||
| 5694 | Liefert eine Prozedur, die, wenn ihr ein Paket übergeben wird, die an | ||
| 5695 | @code{package-mapping} übergebene @var{Prozedur} auf alle vom Paket | ||
| 5696 | abhängigen Pakete anwendet. Die Prozedur liefert das resultierende | ||
| 5697 | Paket. Wenn @var{Schnitt?} für ein Paket davon einen wahren Wert liefert, | ||
| 5698 | findet kein rekursiver Abstieg in dessen Abhängigkeiten statt. | ||
| 5699 | @end deffn | ||
| 5700 | |||
| 5701 | @menu | ||
| 5702 | * »package«-Referenz:: Der Datentyp für Pakete. | ||
| 5703 | * »origin«-Referenz:: Datentyp für Paketursprünge. | ||
| 5704 | @end menu | ||
| 5705 | |||
| 5706 | |||
| 5707 | @node »package«-Referenz | ||
| 5708 | @subsection @code{package}-Referenz | ||
| 5709 | |||
| 5710 | Dieser Abschnitt fasst alle in @code{package}-Deklarationen zur Verfügung | ||
| 5711 | stehenden Optionen zusammen (siehe @ref{Pakete definieren}). | ||
| 5712 | |||
| 5713 | @deftp {Datentyp} package | ||
| 5714 | Dieser Datentyp steht für ein Paketrezept. | ||
| 5715 | |||
| 5716 | @table @asis | ||
| 5717 | @item @code{name} | ||
| 5718 | Der Name des Pakets als Zeichenkette. | ||
| 5719 | |||
| 5720 | @item @code{version} | ||
| 5721 | Die Version des Pakets als Zeichenkette. | ||
| 5722 | |||
| 5723 | @item @code{source} | ||
| 5724 | Ein Objekt, das beschreibt, wie der Quellcode des Pakets bezogen werden | ||
| 5725 | soll. Meistens ist es ein @code{origin}-Objekt, welches für eine aus dem | ||
| 5726 | Internet heruntergeladene Datei steht (siehe @ref{»origin«-Referenz}). Es | ||
| 5727 | kann aber auch ein beliebiges anderes »dateiähnliches« Objekt sein, wie | ||
| 5728 | z.B.@: ein @code{local-file}, was eine Datei im lokalen Dateisystem | ||
| 5729 | bezeichnet (siehe @ref{G-Ausdrücke, @code{local-file}}). | ||
| 5730 | |||
| 5731 | @item @code{build-system} | ||
| 5732 | Das Erstellungssystem, mit dem das Paket erstellt werden soll (siehe | ||
| 5733 | @ref{Erstellungssysteme}). | ||
| 5734 | |||
| 5735 | @item @code{arguments} (Vorgabe: @code{'()}) | ||
| 5736 | Die Argumente, die an das Erstellungssystem übergeben werden sollen. Dies | ||
| 5737 | ist eine Liste, typischerweise eine Reihe von Schlüssel-Wert-Paaren. | ||
| 5738 | |||
| 5739 | @item @code{inputs} (Vorgabe: @code{'()}) | ||
| 5740 | @itemx @code{native-inputs} (Vorgabe: @code{'()}) | ||
| 5741 | @itemx @code{propagated-inputs} (Vorgabe: @code{'()}) | ||
| 5742 | @cindex Eingaben, von Paketen | ||
| 5743 | In diesen Feldern werden die Abhängigkeiten des Pakets aufgeführt. Jedes | ||
| 5744 | dieser Felder enthält eine Liste von Tupeln, wobei jedes Tupel eine | ||
| 5745 | Bezeichnung für die Eingabe (als Zeichenkette) als erstes Element, dann ein | ||
| 5746 | »package«-, »origin«- oder »derivation«-Objekt (Paket, Ursprung oder | ||
| 5747 | Ableitung) als zweites Element und optional die Benennung der davon zu | ||
| 5748 | benutzenden Ausgabe umfasst; letztere hat als Vorgabewert @code{"out"} | ||
| 5749 | (siehe @ref{Pakete mit mehreren Ausgaben.} für mehr Informationen zu | ||
| 5750 | Paketausgaben). Im folgenden Beispiel etwa werden drei Eingaben festgelegt: | ||
| 5751 | |||
| 5752 | @example | ||
| 5753 | `(("libffi" ,libffi) | ||
| 5754 | ("libunistring" ,libunistring) | ||
| 5755 | ("glib:bin" ,glib "bin")) ;Ausgabe "bin" von Glib | ||
| 5756 | @end example | ||
| 5757 | |||
| 5758 | @cindex Cross-Kompilieren, Paketabhängigkeiten | ||
| 5759 | Die Unterscheidung zwischen @code{native-inputs} und @code{inputs} ist | ||
| 5760 | wichtig, damit Cross-Kompilieren möglich ist. Beim Cross-Kompilieren werden | ||
| 5761 | als @code{inputs} aufgeführte Abhängigkeiten für die | ||
| 5762 | Ziel-Prozessorarchitektur (@emph{target}) erstellt, andersherum werden als | ||
| 5763 | @code{native-inputs} aufgeführte Abhängigkeiten für die Prozessorarchitektur | ||
| 5764 | der erstellenden Maschine (@emph{build}) erstellt. | ||
| 5765 | |||
| 5766 | @code{native-inputs} listet typischerweise die Werkzeuge auf, die während | ||
| 5767 | der Erstellung gebraucht werden, aber nicht zur Laufzeit des Programms | ||
| 5768 | gebraucht werden. Beispiele sind Autoconf, Automake, pkg-config, Gettext | ||
| 5769 | oder Bison. @command{guix lint} kann melden, ob wahrscheinlich Fehler in der | ||
| 5770 | Auflistung sind (siehe @ref{Aufruf von guix lint}). | ||
| 5771 | |||
| 5772 | @anchor{package-propagated-inputs} | ||
| 5773 | Schließlich ist @code{propagated-inputs} ähnlich wie @code{inputs}, aber die | ||
| 5774 | angegebenen Pakete werden automatisch mit ins Profil installiert, wenn das | ||
| 5775 | Paket installiert wird, zu dem sie gehören (siehe | ||
| 5776 | @ref{package-cmd-propagated-inputs, @command{guix package}} für | ||
| 5777 | Informationen darüber, wie @command{guix package} mit propagierten Eingaben | ||
| 5778 | umgeht). | ||
| 5779 | |||
| 5780 | Dies ist zum Beispiel nötig, wenn eine C-/C++-Bibliothek Header-Dateien | ||
| 5781 | einer anderen Bibliothek braucht, um mit ihr kompilieren zu können, oder | ||
| 5782 | wenn sich eine pkg-config-Datei auf eine andere über ihren | ||
| 5783 | @code{Requires}-Eintrag bezieht. | ||
| 5784 | |||
| 5785 | Noch ein Beispiel, wo @code{propagated-inputs} nützlich ist, sind Sprachen, | ||
| 5786 | die den Laufzeit-Suchpfad @emph{nicht} zusammen mit dem Programm abspeichern | ||
| 5787 | (@emph{nicht} wie etwa im @code{RUNPATH} bei ELF-Dateien), also Sprachen wie | ||
| 5788 | Guile, Python, Perl und weitere. Damit auch in solchen Sprachen geschriebene | ||
| 5789 | Bibliotheken zur Laufzeit den von ihnen benötigten Code finden können, | ||
| 5790 | müssen deren Laufzeit-Abhängigkeiten in @code{propagated-inputs} statt in | ||
| 5791 | @code{inputs} aufgeführt werden. | ||
| 5792 | |||
| 5793 | @item @code{outputs} (Vorgabe: @code{'("out")}) | ||
| 5794 | Die Liste der Benennungen der Ausgaben des Pakets. Der Abschnitt | ||
| 5795 | @ref{Pakete mit mehreren Ausgaben.} beschreibt übliche Nutzungen | ||
| 5796 | zusätzlicher Ausgaben. | ||
| 5797 | |||
| 5798 | @item @code{native-search-paths} (Vorgabe: @code{'()}) | ||
| 5799 | @itemx @code{search-paths} (Vorgabe: @code{'()}) | ||
| 5800 | Eine Liste von @code{search-path-specification}-Objekten, die | ||
| 5801 | Umgebungsvariable für von diesem Paket beachtete Suchpfade (»search paths«) | ||
| 5802 | beschreiben. | ||
| 5803 | |||
| 5804 | @item @code{replacement} (Vorgabe: @code{#f}) | ||
| 5805 | Dies muss entweder @code{#f} oder ein package-Objekt sein, das als Ersatz | ||
| 5806 | (@dfn{replacement}) dieses Pakets benutzt werden soll. Im Abschnitt | ||
| 5807 | @ref{Sicherheitsaktualisierungen, grafts} wird dies erklärt. | ||
| 5808 | |||
| 5809 | @item @code{synopsis} | ||
| 5810 | Eine einzeilige Beschreibung des Pakets. | ||
| 5811 | |||
| 5812 | @item @code{description} | ||
| 5813 | Eine ausführlichere Beschreibung des Pakets. | ||
| 5814 | |||
| 5815 | @item @code{license} | ||
| 5816 | @cindex Lizenz, von Paketen | ||
| 5817 | Die Lizenz des Pakets; benutzt werden kann ein Wert aus dem Modul | ||
| 5818 | @code{(guix licenses)} oder eine Liste solcher Werte. | ||
| 5819 | |||
| 5820 | @item @code{home-page} | ||
| 5821 | Die URL, die die Homepage des Pakets angibt, als Zeichenkette. | ||
| 5822 | |||
| 5823 | @item @code{supported-systems} (Vorgabe: @var{%supported-systems}) | ||
| 5824 | Die Liste der vom Paket unterstützten Systeme als Zeichenketten der Form | ||
| 5825 | @code{Architektur-Kernel}, zum Beispiel @code{"x86_64-linux"}. | ||
| 5826 | |||
| 5827 | @item @code{maintainers} (Vorgabe: @code{'()}) | ||
| 5828 | Die Liste der Betreuer (Maintainer) des Pakets als | ||
| 5829 | @code{maintainer}-Objekte. | ||
| 5830 | |||
| 5831 | @item @code{location} (Vorgabe: die Stelle im Quellcode, wo die @code{package}-Form steht) | ||
| 5832 | Wo im Quellcode das Paket definiert wurde. Es ist sinnvoll, dieses Feld | ||
| 5833 | manuell zuzuweisen, wenn das Paket von einem anderen Paket erbt, weil dann | ||
| 5834 | dieses Feld nicht automatisch berichtigt wird. | ||
| 5835 | @end table | ||
| 5836 | @end deftp | ||
| 5837 | |||
| 5838 | @deffn {Scheme Syntax} this-package | ||
| 5839 | When used in the @emph{lexical scope} of a package field definition, this | ||
| 5840 | identifier resolves to the package being defined. | ||
| 5841 | |||
| 5842 | The example below shows how to add a package as a native input of itself | ||
| 5843 | when cross-compiling: | ||
| 5844 | |||
| 5845 | @example | ||
| 5846 | (package | ||
| 5847 | (name "guile") | ||
| 5848 | ;; ... | ||
| 5849 | |||
| 5850 | ;; When cross-compiled, Guile, for example, depends on | ||
| 5851 | ;; a native version of itself. Add it here. | ||
| 5852 | (native-inputs (if (%current-target-system) | ||
| 5853 | `(("self" ,this-package)) | ||
| 5854 | '()))) | ||
| 5855 | @end example | ||
| 5856 | |||
| 5857 | It is an error to refer to @code{this-package} outside a package definition. | ||
| 5858 | @end deffn | ||
| 5859 | |||
| 5860 | @node »origin«-Referenz | ||
| 5861 | @subsection @code{origin}-Referenz | ||
| 5862 | |||
| 5863 | Dieser Abschnitt fasst alle Optionen zusammen, die in | ||
| 5864 | @code{origin}-Deklarationen zur Verfügung stehen (siehe @ref{Pakete definieren}). | ||
| 5865 | |||
| 5866 | @deftp {Datentyp} origin | ||
| 5867 | Mit diesem Datentyp wird ein Ursprung, von dem Quellcode geladen werden | ||
| 5868 | kann, beschrieben. | ||
| 5869 | |||
| 5870 | @table @asis | ||
| 5871 | @item @code{uri} | ||
| 5872 | Ein Objekt, was die URI des Quellcodes enthält. Der Objekttyp hängt von der | ||
| 5873 | @code{Methode} ab (siehe unten). Zum Beispiel sind, wenn die | ||
| 5874 | @var{url-fetch}-Methode aus @code{(guix download)} benutzt wird, die | ||
| 5875 | gültigen Werte für @code{uri}: eine URL dargestellt als Zeichenkette oder | ||
| 5876 | eine Liste solcher URLs. | ||
| 5877 | |||
| 5878 | @item @code{method} | ||
| 5879 | Eine Prozedur, die die URI verwertet. | ||
| 5880 | |||
| 5881 | Beispiele sind unter anderem: | ||
| 5882 | |||
| 5883 | @table @asis | ||
| 5884 | @item @var{url-fetch} aus @code{(guix download)} | ||
| 5885 | Herunterladen einer Datei von einer HTTP-, HTTPS- oder FTP-URL, die im | ||
| 5886 | @code{uri}-Feld angegeben wurde. | ||
| 5887 | |||
| 5888 | @vindex git-fetch | ||
| 5889 | @item @var{git-fetch} aus @code{(guix git-download)} | ||
| 5890 | Das im @code{uri}-Feld spezifizierte Repository des | ||
| 5891 | Git-Versionskontrollsystems klonen und davon den im @code{uri}-Feld als ein | ||
| 5892 | @code{git-reference}-Objekt angegebenen Commit benutzen; eine | ||
| 5893 | @code{git-reference} sieht so aus: | ||
| 5894 | |||
| 5895 | @example | ||
| 5896 | (git-reference | ||
| 5897 | (url "git://git.debian.org/git/pkg-shadow/shadow") | ||
| 5898 | (commit "v4.1.5.1")) | ||
| 5899 | @end example | ||
| 5900 | @end table | ||
| 5901 | |||
| 5902 | @item @code{sha256} | ||
| 5903 | Ein Bytevektor, der den SHA-256-Hash der Quelldateien | ||
| 5904 | enthält. Typischerweise wird hier mit der @code{base32}-Form der Bytevektor | ||
| 5905 | aus einer Base-32-Zeichenkette generiert. | ||
| 5906 | |||
| 5907 | Diese Informationen liefert Ihnen der Befehl @code{guix download} (siehe | ||
| 5908 | @ref{Aufruf von guix download}) oder @code{guix hash} (siehe @ref{Aufruf von guix hash}). | ||
| 5909 | |||
| 5910 | @item @code{file-name} (Vorgabe: @code{#f}) | ||
| 5911 | Der Dateiname, unter dem der Quellcode abgespeichert werden sollte. Wenn er | ||
| 5912 | auf @code{#f} steht, wird ein vernünftiger Name automatisch gewählt. Falls | ||
| 5913 | der Quellcode von einer URL geladen wird, wird der Dateiname aus der URL | ||
| 5914 | genommen. Wenn der Quellcode von einem Versionskontrollsystem bezogen wird, | ||
| 5915 | empfiehlt es sich, den Dateinamen ausdrücklich anzugeben, weil dann keine | ||
| 5916 | sprechende Benennung automatisch gefunden werden kann. | ||
| 5917 | |||
| 5918 | @item @code{patches} (Vorgabe: @code{'()}) | ||
| 5919 | Eine Liste von Dateinamen, Ursprüngen oder dateiähnlichen Objekten (siehe | ||
| 5920 | @ref{G-Ausdrücke, file-like objects}) mit Patches, welche auf den | ||
| 5921 | Quellcode anzuwenden sind. | ||
| 5922 | |||
| 5923 | Die Liste von Patches kann nicht von Parametern der Erstellung | ||
| 5924 | abhängen. Insbesondere kann sie nicht vom Wert von @code{%current-system} | ||
| 5925 | oder @code{%current-target-system} abḧängen. | ||
| 5926 | |||
| 5927 | @item @code{snippet} (Vorgabe: @code{#f}) | ||
| 5928 | Ein im Quellcode-Verzeichnis auszuführender G-Ausdruck (siehe | ||
| 5929 | @ref{G-Ausdrücke}) oder S-Ausdruck. Hiermit kann der Quellcode bequem | ||
| 5930 | modifiziert werden, manchmal ist dies bequemer als mit einem Patch. | ||
| 5931 | |||
| 5932 | @item @code{patch-flags} (Vorgabe: @code{'("-p1")}) | ||
| 5933 | Eine Liste der Befehlszeilenoptionen, die dem @code{patch}-Befehl übergeben | ||
| 5934 | werden sollen. | ||
| 5935 | |||
| 5936 | @item @code{patch-inputs} (Vorgabe: @code{#f}) | ||
| 5937 | Eingabepakete oder -ableitungen für den Patch-Prozess. Bei @code{#f} werden | ||
| 5938 | die üblichen Patcheingaben wie GNU@tie{}Patch bereitgestellt. | ||
| 5939 | |||
| 5940 | @item @code{modules} (Vorgabe: @code{'()}) | ||
| 5941 | Eine Liste von Guile-Modulen, die während des Patch-Prozesses und während | ||
| 5942 | der Ausführung des @code{snippet}-Felds geladen werden sollten. | ||
| 5943 | |||
| 5944 | @item @code{patch-guile} (Vorgabe: @code{#f}) | ||
| 5945 | Welches Guile-Paket für den Patch-Prozess benutzt werden sollte. Bei | ||
| 5946 | @code{#f} wird ein vernünftiger Vorgabewert angenommen. | ||
| 5947 | @end table | ||
| 5948 | @end deftp | ||
| 5949 | |||
| 5950 | |||
| 5951 | @node Erstellungssysteme | ||
| 5952 | @section Erstellungssysteme | ||
| 5953 | |||
| 5954 | @cindex Erstellungssystem | ||
| 5955 | Jede Paketdefinition legt ein @dfn{Erstellungssystem} (»build system«) sowie | ||
| 5956 | dessen Argumente fest (siehe @ref{Pakete definieren}). Das | ||
| 5957 | @code{build-system}-Feld steht für die Erstellungsprozedur des Pakets sowie | ||
| 5958 | für weitere implizite Eingaben für die Erstellungsprozedur. | ||
| 5959 | |||
| 5960 | Erstellungssysteme sind @code{<build-system>}-Objekte. Die Schnittstelle, um | ||
| 5961 | solche zu erzeugen und zu verändern, ist im Modul @code{(guix build-system)} | ||
| 5962 | zu finden, und die eigentlichen Erstellungssysteme werden jeweils von ihren | ||
| 5963 | eigenen Modulen exportiert. | ||
| 5964 | |||
| 5965 | @cindex Bag (systemnahe Paketrepräsentation) | ||
| 5966 | Intern funktionieren Erstellungssysteme, indem erst Paketobjekte zu | ||
| 5967 | @dfn{Bags} kompiliert werden. Eine Bag (deutsch: Beutel, Sack) ist wie ein | ||
| 5968 | Paket, aber mit weniger Zierrat — anders gesagt ist eine Bag eine | ||
| 5969 | systemnähere Darstellung eines Pakets, die sämtliche Eingaben des Pakets | ||
| 5970 | einschließlich vom Erstellungssystem hinzugefügter Eingaben enthält. Diese | ||
| 5971 | Zwischendarstellung wird dann zur eigentlichen Ableitung kompiliert (siehe | ||
| 5972 | @ref{Ableitungen}). | ||
| 5973 | |||
| 5974 | Erstellungssysteme akzeptieren optional eine Liste von @dfn{Argumenten}. In | ||
| 5975 | Paketdefinitionen werden diese über das @code{arguments}-Feld übergeben | ||
| 5976 | (siehe @ref{Pakete definieren}). Sie sind in der Regel | ||
| 5977 | Schlüsselwort-Argumente (siehe @ref{Optional Arguments, keyword arguments in | ||
| 5978 | Guile,, guile, GNU Guile Reference Manual}). Der Wert dieser Argumente wird | ||
| 5979 | normalerweise vom Erstellungssystem in der @dfn{Erstellungsschicht} | ||
| 5980 | ausgewertet, d.h.@: von einem durch den Daemon gestarteten Guile-Prozess | ||
| 5981 | (siehe @ref{Ableitungen}). | ||
| 5982 | |||
| 5983 | Das häufigste Erstellungssystem ist @var{gnu-build-system}, was die übliche | ||
| 5984 | Erstellungsprozedur für GNU-Pakete und viele andere Pakete darstellt. Es | ||
| 5985 | wird vom Modul @code{(guix build-system gnu)} bereitgestellt. | ||
| 5986 | |||
| 5987 | @defvr {Scheme-Variable} gnu-build-system | ||
| 5988 | @var{gnu-build-system} steht für das GNU-Erstellungssystem und Varianten | ||
| 5989 | desselben (siehe @ref{Configuration, configuration and makefile | ||
| 5990 | conventions,, standards, GNU Coding Standards}). | ||
| 5991 | |||
| 5992 | @cindex Erstellungsphasen | ||
| 5993 | Kurz gefasst werden Pakete, die es benutzen, konfiguriert, erstellt und | ||
| 5994 | installiert mit der üblichen Befehlsfolge @code{./configure && make && make | ||
| 5995 | check && make install}. In der Praxis braucht man oft noch ein paar weitere | ||
| 5996 | Schritte. Alle Schritte sind in voneinander getrennte @dfn{Phasen} | ||
| 5997 | unterteilt. Erwähnt werden sollten@footnote{Bitte schauen Sie in den Modulen | ||
| 5998 | unter @code{(guix build gnu-build-system)}, wenn Sie mehr Details zu | ||
| 5999 | Erstellungsphasen brauchen.}: | ||
| 6000 | |||
| 6001 | @table @code | ||
| 6002 | @item unpack | ||
| 6003 | Den Quell-Tarball entpacken und das Arbeitsverzeichnis wechseln in den | ||
| 6004 | entpackten Quellbaum. Wenn die Quelle bereits ein Verzeichnis ist, wird es | ||
| 6005 | in den Quellbaum kopiert und dorthin gewechselt. | ||
| 6006 | |||
| 6007 | @item patch-source-shebangs | ||
| 6008 | »Shebangs« in Quelldateien beheben, damit Sie sich auf die richtigen | ||
| 6009 | Store-Dateipfade beziehen. Zum Beispiel könnte @code{#!/bin/sh} zu | ||
| 6010 | @code{#!/gnu/store/@dots{}-bash-4.3/bin/sh} geändert werden. | ||
| 6011 | |||
| 6012 | @item configure | ||
| 6013 | Das Skript @file{configure} mit einigen vorgegebenen Befehlszeilenoptionen | ||
| 6014 | ausführen, wie z.B.@: mit @code{--prefix=/gnu/store/@dots{}}, sowie mit den | ||
| 6015 | im @code{#:configure-flags}-Argument angegebenen Optionen. | ||
| 6016 | |||
| 6017 | @item build | ||
| 6018 | @code{make} ausführen mit den Optionen aus der Liste in | ||
| 6019 | @code{#:make-flags}. Wenn das Argument @code{#:parallel-build?} auf wahr | ||
| 6020 | gesetzt ist (was der Vorgabewert ist), wird @code{make -j} zum Erstellen | ||
| 6021 | ausgeführt. | ||
| 6022 | |||
| 6023 | @item check | ||
| 6024 | @code{make check} (oder statt @code{check} ein anderes bei | ||
| 6025 | @code{#:test-target} angegebenes Ziel) ausführen, außer falls @code{#:tests? | ||
| 6026 | #f} gesetzt ist. Wenn das Argument @code{#:parallel-tests?} auf wahr gesetzt | ||
| 6027 | ist (der Vorgabewert), führe @code{make check -j} aus. | ||
| 6028 | |||
| 6029 | @item install | ||
| 6030 | @code{make install} mit den in @code{#:make-flags} aufgelisteten Optionen | ||
| 6031 | ausführen. | ||
| 6032 | |||
| 6033 | @item patch-shebangs | ||
| 6034 | Shebangs in den installierten ausführbaren Dateien beheben. | ||
| 6035 | |||
| 6036 | @item strip | ||
| 6037 | Symbole zur Fehlerbehebung aus ELF-Dateien entfernen (außer | ||
| 6038 | @code{#:strip-binaries?} ist auf falsch gesetzt) und in die | ||
| 6039 | @code{debug}-Ausgabe kopieren, falls diese verfügbar ist (siehe | ||
| 6040 | @ref{Dateien zur Fehlersuche installieren}). | ||
| 6041 | @end table | ||
| 6042 | |||
| 6043 | @vindex %standard-phases | ||
| 6044 | Das erstellungsseitige Modul @code{(guix build gnu-build-system)} definiert | ||
| 6045 | @var{%standard-phases} als die vorgegebene Liste der | ||
| 6046 | Erstellungsphasen. @var{%standard-phases} ist eine Liste von Paaren aus je | ||
| 6047 | einem Symbol und einer Prozedur. Letztere implementiert die eigentliche | ||
| 6048 | Phase. | ||
| 6049 | |||
| 6050 | Die Liste der Phasen, die für ein bestimmtes Paket verwendet werden sollen, | ||
| 6051 | kann vom Parameter @code{#:phases} überschrieben werden. Zum Beispiel werden | ||
| 6052 | bei Übergabe von: | ||
| 6053 | |||
| 6054 | @example | ||
| 6055 | #:phases (modify-phases %standard-phases (delete 'configure)) | ||
| 6056 | @end example | ||
| 6057 | |||
| 6058 | alle oben beschriebenen Phasen benutzt außer der @code{configure}-Phase. | ||
| 6059 | |||
| 6060 | Zusätzlich stellt dieses Erstellungssystem sicher, dass die | ||
| 6061 | »Standard«-Umgebung für GNU-Pakete zur Verfügung steht. Diese umfasst | ||
| 6062 | Werkzeuge wie GCC, libc, Coreutils, Bash, Make, Diffutils, grep und sed | ||
| 6063 | (siehe das Modul @code{(guix build-system gnu)} für eine vollständige | ||
| 6064 | Liste). Wir bezeichnen sie als @dfn{implizite Eingaben} eines Pakets, weil | ||
| 6065 | Paketdefinitionen sie nicht aufführen müssen. | ||
| 6066 | @end defvr | ||
| 6067 | |||
| 6068 | Andere @code{<build-system>}-Objekte werden definiert, um andere | ||
| 6069 | Konventionen und Werkzeuge von Paketen für freie Software zu | ||
| 6070 | unterstützen. Die anderen Erstellungssysteme erben den Großteil vom | ||
| 6071 | @var{gnu-build-system} und unterscheiden sich hauptsächlich darin, welche | ||
| 6072 | Eingaben dem Erstellungsprozess implizit hinzugefügt werden und welche Liste | ||
| 6073 | von Phasen durchlaufen wird. Manche dieser Erstellungssysteme sind im | ||
| 6074 | Folgenden aufgeführt. | ||
| 6075 | |||
| 6076 | @defvr {Scheme-Variable} ant-build-system | ||
| 6077 | Diese Variable wird vom Modul @code{(guix build-system ant)} exportiert. Sie | ||
| 6078 | implementiert die Erstellungsprozedur für Java-Pakete, die mit dem | ||
| 6079 | @url{http://ant.apache.org/, Ant build tool} erstellt werden können. | ||
| 6080 | |||
| 6081 | Sowohl @code{ant} als auch der @dfn{Java Development Kit} (JDK), wie er vom | ||
| 6082 | Paket @code{icedtea} bereitgestellt wird, werden zu den Eingaben | ||
| 6083 | hinzugefügt. Wenn andere Pakete dafür benutzt werden sollen, können sie | ||
| 6084 | jeweils mit den Parametern @code{#:ant} und @code{#:jdk} festgelegt werden. | ||
| 6085 | |||
| 6086 | Falls das ursprüngliche Paket über keine nutzbare Ant-Erstellungsdatei | ||
| 6087 | (»Ant-Buildfile«) verfügt, kann aus der Angabe im Parameter | ||
| 6088 | @code{#:jar-name} eine minimale Ant-Erstellungsdatei @file{build.xml} | ||
| 6089 | erzeugt werden, in der die für die Erstellung durchzuführenden Aufgaben | ||
| 6090 | (Tasks) für die Erstellung des angegebenen Jar-Archivs stehen. In diesem | ||
| 6091 | Fall kann der Parameter @code{#:source-dir} benutzt werden, um das | ||
| 6092 | Unterverzeichnis mit dem Quellcode anzugeben; sein Vorgabewert ist »src«. | ||
| 6093 | |||
| 6094 | Der Parameter @code{#:main-class} kann mit einer minimalen | ||
| 6095 | Ant-Erstellungsdatei benutzt werden, um die Hauptklasse des resultierenden | ||
| 6096 | Jar-Archivs anzugeben. Dies ist nötig, wenn die Jar-Datei ausführbar sein | ||
| 6097 | soll. Mit dem Parameter @code{#:test-include} kann eine Liste angegeben | ||
| 6098 | werden, welche Junit-Tests auszuführen sind. Der Vorgabewert ist @code{(list | ||
| 6099 | "**/*Test.java")}. Mit @code{#:test-exclude} kann ein Teil der Testdateien | ||
| 6100 | ignoriert werden. Der Vorgabewert ist @code{(list "**/Abstract*.java")}, | ||
| 6101 | weil abstrakte Klassen keine ausführbaren Tests enthalten können. | ||
| 6102 | |||
| 6103 | Der Parameter @code{#:build-target} kann benutzt werden, um die Ant-Aufgabe | ||
| 6104 | (Task) anzugeben, die während der @code{build}-Phase ausgeführt werden | ||
| 6105 | soll. Vorgabe ist, dass die Aufgabe (Task) »jar« ausgeführt wird. | ||
| 6106 | |||
| 6107 | @end defvr | ||
| 6108 | |||
| 6109 | @defvr {Scheme-Variable} android-ndk-build-system | ||
| 6110 | @cindex Android-Distribution | ||
| 6111 | @cindex Android-NDK-Erstellungssystem | ||
| 6112 | Diese Variable wird von @code{(guix build-system android-ndk)} | ||
| 6113 | exportiert. Sie implementiert eine Erstellungsprozedur für das Android NDK | ||
| 6114 | (Native Development Kit) benutzende Pakete mit einem Guix-spezifischen | ||
| 6115 | Erstellungsprozess. | ||
| 6116 | |||
| 6117 | Für das Erstellungssystem wird angenommen, dass Pakete die zu ihrer | ||
| 6118 | öffentlichen Schnittstelle gehörenden Header-Dateien im Unterverzeichnis | ||
| 6119 | "include" der Ausgabe "out" und ihre Bibliotheken im Unterverzeichnis "lib" | ||
| 6120 | der Ausgabe "out" platzieren. | ||
| 6121 | |||
| 6122 | Ebenso wird angenommen, dass es keine im Konflikt stehenden Dateien unter | ||
| 6123 | der Vereinigung aller Abhängigkeiten gibt. | ||
| 6124 | |||
| 6125 | Derzeit wird Cross-Kompilieren hierfür nicht unterstützt, also wird dabei | ||
| 6126 | vorausgesetzt, dass Bibliotheken und Header-Dateien dieselben wie im | ||
| 6127 | Wirtssystem sind. | ||
| 6128 | |||
| 6129 | @end defvr | ||
| 6130 | |||
| 6131 | @defvr {Scheme-Variable} asdf-build-system/source | ||
| 6132 | @defvrx {Scheme-Variable} asdf-build-system/sbcl | ||
| 6133 | @defvrx {Scheme-Variable} asdf-build-system/ecl | ||
| 6134 | |||
| 6135 | Diese Variablen, die vom Modul @code{(guix build-system asdf)} exportiert | ||
| 6136 | werden, implementieren Erstellungsprozeduren für Common-Lisp-Pakete, welche | ||
| 6137 | @url{https://common-lisp.net/project/asdf/, »ASDF«} benutzen. ASDF dient der | ||
| 6138 | Systemdefinition für Common-Lisp-Programme und -Bibliotheken. | ||
| 6139 | |||
| 6140 | Das Erstellungssystem @code{asdf-build-system/source} installiert die Pakete | ||
| 6141 | in Quellcode-Form und kann @i{via} ASDF mit jeder | ||
| 6142 | Common-Lisp-Implementierung geladen werden. Die anderen Erstellungssysteme | ||
| 6143 | wie @code{asdf-build-system/sbcl} installieren binäre Systeme in dem Format, | ||
| 6144 | das von einer bestimmten Implementierung verstanden wird. Diese | ||
| 6145 | Erstellungssysteme können auch benutzt werden, um ausführbare Programme zu | ||
| 6146 | erzeugen oder um Lisp-Abbilder mit einem vorab geladenen Satz von Paketen zu | ||
| 6147 | erzeugen. | ||
| 6148 | |||
| 6149 | Das Erstellungssystem benutzt gewisse Namenskonventionen. Bei Binärpaketen | ||
| 6150 | sollte dem Paketnamen die Lispimplementierung als Präfix vorangehen, z.B.@: | ||
| 6151 | @code{sbcl-} für @code{asdf-build-system/sbcl}. | ||
| 6152 | |||
| 6153 | Zudem sollte das entsprechende Quellcode-Paket mit der Konvention wie bei | ||
| 6154 | Python-Paketen (siehe @ref{Python-Module}) ein @code{cl-} als Präfix | ||
| 6155 | bekommen. | ||
| 6156 | |||
| 6157 | Für Binärpakete sollte für jedes System ein Guix-Paket definiert | ||
| 6158 | werden. Wenn für einen Ursprung im @code{origin} mehrere Systeme enthalten | ||
| 6159 | sind, können Paketvarianten geschrieben werden, mit denen alle Systeme | ||
| 6160 | erstellt werden. Quellpakete, die @code{asdf-build-system/source} benutzen, | ||
| 6161 | können mehrere Systeme enthalten. | ||
| 6162 | |||
| 6163 | Um ausführbare Programme und Abbilder zu erzeugen, können die | ||
| 6164 | erstellungsseitigen Prozeduren @code{build-program} und @code{build-image} | ||
| 6165 | benutzt werden. Sie sollten in einer Erstellungsphase nach der | ||
| 6166 | @code{create-symlinks}-Phase aufgerufen werden, damit das gerade erstellte | ||
| 6167 | System Teil des resultierenden Abbilds sein kann. An @code{build-program} | ||
| 6168 | muss eine Liste von Common-Lisp-Ausdrücken über das Argument | ||
| 6169 | @code{#:entry-program} übergeben werden. | ||
| 6170 | |||
| 6171 | Wenn das System nicht in seiner eigenen gleichnamigen @code{.asd}-Datei | ||
| 6172 | definiert ist, sollte der Parameter @code{#:asd-file} benutzt werden, um | ||
| 6173 | anzugeben, in welcher Datei das System definiert ist. Außerdem wird bei | ||
| 6174 | Paketen, für deren Tests ein System in einer separaten Datei definiert | ||
| 6175 | wurde, dieses System geladen, bevor die Tests ablaufen, wenn es im Parameter | ||
| 6176 | @code{#:test-asd-file} steht. Ist dafür kein Wert gesetzt, werden die | ||
| 6177 | Dateien @code{<system>-tests.asd}, @code{<system>-test.asd}, | ||
| 6178 | @code{tests.asd} und @code{test.asd} durchsucht, wenn sie existieren. | ||
| 6179 | |||
| 6180 | Wenn aus irgendeinem Grund der Paketname nicht den Namenskonventionen folgen | ||
| 6181 | kann, kann der Parameter @code{#:asd-system-name} benutzt werden, um den | ||
| 6182 | Namen des Systems anzugeben. | ||
| 6183 | |||
| 6184 | @end defvr | ||
| 6185 | |||
| 6186 | @defvr {Scheme-Variable} cargo-build-system | ||
| 6187 | @cindex Rust-Programmiersprache | ||
| 6188 | @cindex Cargo (Rust-Erstellungssystem) | ||
| 6189 | Diese Variable wird vom Modul @code{(guix build-system cargo)} | ||
| 6190 | exportiert. Damit können Pakete mit Cargo erstellt werden, dem | ||
| 6191 | Erstellungswerkzeug der @uref{https://www.rust-lang.org, | ||
| 6192 | Rust-Programmiersprache}. | ||
| 6193 | |||
| 6194 | In seiner @code{configure}-Phase ersetzt dieses Erstellungssystem in der | ||
| 6195 | Datei @file{Carto.toml} angegebene Abhängigkeiten durch Eingaben im | ||
| 6196 | Guix-Paket. Die Phase @code{install} installiert die Binärdateien und auch | ||
| 6197 | den Quellcode und die @file{Cargo.toml}-Datei. | ||
| 6198 | @end defvr | ||
| 6199 | |||
| 6200 | @cindex Clojure (Programmiersprache) | ||
| 6201 | @cindex einfaches Clojure-Erstellungssystem | ||
| 6202 | @defvr {Scheme-Variable} clojure-build-system | ||
| 6203 | Diese Variable wird durch das Modul @code{(guix build-system clojure)} | ||
| 6204 | exportiert. Sie implementiert eine einfache Erstellungsprozedur für in | ||
| 6205 | @uref{https://clojure.org/, Clojure} geschriebene Pakete mit dem guten alten | ||
| 6206 | @code{compile} in Clojure. Cross-Kompilieren wird noch nicht unterstützt. | ||
| 6207 | |||
| 6208 | Das Erstellungssystem fügt @code{clojure}, @code{icedtea} und @code{zip} zu | ||
| 6209 | den Eingaben hinzu. Sollen stattdessen andere Pakete benutzt werden, können | ||
| 6210 | diese jeweils mit den Parametern @code{#:clojure}, @code{#:jdk} und | ||
| 6211 | @code{#:zip} spezifiziert werden. | ||
| 6212 | |||
| 6213 | Eine Liste der Quellcode-Verzeichnisse, Test-Verzeichnisse und Namen der | ||
| 6214 | Jar-Dateien können jeweils über die Parameter @code{#:source-dirs}, | ||
| 6215 | @code{#:test-dirs} und @code{#:jar-names} angegeben werden. Das Verzeichnis, | ||
| 6216 | in das kompiliert wird, sowie die Hauptklasse können jeweils mit den | ||
| 6217 | Parametern @code{#:compile-dir} und @code{#:main-class} angegeben | ||
| 6218 | werden. Andere Parameter sind im Folgenden dokumentiert. | ||
| 6219 | |||
| 6220 | Dieses Erstellungssystem ist eine Erweiterung des @var{ant-build-system}, | ||
| 6221 | bei der aber die folgenden Phasen geändert wurden: | ||
| 6222 | |||
| 6223 | @table @code | ||
| 6224 | |||
| 6225 | @item build | ||
| 6226 | Diese Phase ruft @code{compile} in Clojure auf, um Quelldateien zu | ||
| 6227 | kompilieren, und führt @command{jar} aus, um Jar-Dateien aus sowohl | ||
| 6228 | Quelldateien als auch kompilierten Dateien zu erzeugen, entsprechend der | ||
| 6229 | jeweils in @code{#:aot-include} und @code{#:aot-exclude} festgelegten Listen | ||
| 6230 | aus in der Menge der Quelldateien eingeschlossenen und ausgeschlossenen | ||
| 6231 | Bibliotheken. Die Ausschlussliste hat Vorrang vor der Einschlussliste. Diese | ||
| 6232 | Listen setzen sich aus Symbolen zusammen, die für Clojure-Bibliotheken | ||
| 6233 | stehen oder dem Schlüsselwort @code{#:all} entsprechen, was für alle im | ||
| 6234 | Quellverzeichis gefundenen Clojure-Bibliotheken steht. Der Parameter | ||
| 6235 | @code{#:omit-source?} entscheidet, ob Quelldateien in die Jar-Archive | ||
| 6236 | aufgenommen werden sollten. | ||
| 6237 | |||
| 6238 | @item check | ||
| 6239 | In dieser Phase werden Tests auf die durch Einschluss- und Ausschlussliste | ||
| 6240 | @code{#:test-include} bzw. @code{#:test-exclude} angegebenen Dateien | ||
| 6241 | ausgeführt. Deren Bedeutung ist analog zu @code{#:aot-include} und | ||
| 6242 | @code{#:aot-exclude}, außer dass das besondere Schlüsselwort @code{#:all} | ||
| 6243 | jetzt für alle Clojure-Bibliotheken in den Test-Verzeichnissen steht. Der | ||
| 6244 | Parameter @code{#:tests?} entscheidet, ob Tests ausgeführt werden sollen. | ||
| 6245 | |||
| 6246 | @item install | ||
| 6247 | In dieser Phase werden alle zuvor erstellten Jar-Dateien installiert. | ||
| 6248 | @end table | ||
| 6249 | |||
| 6250 | Zusätzlich zu den bereits angegebenen enthält dieses Erstellungssystem noch | ||
| 6251 | eine weitere Phase. | ||
| 6252 | |||
| 6253 | @table @code | ||
| 6254 | |||
| 6255 | @item install-doc | ||
| 6256 | Diese Phase installiert alle Dateien auf oberster Ebene, deren Basisnamen | ||
| 6257 | ohne Verzeichnisangabe zu @var{%doc-regex} passen. Ein anderer regulärer | ||
| 6258 | Ausdruck kann mit dem Parameter @code{#:doc-regex} verwendet werden. All die | ||
| 6259 | so gefundenen oder (rekursiv) in den mit @code{#:doc-dirs} angegebenen | ||
| 6260 | Dokumentationsverzeichnissen liegenden Dateien werden installiert. | ||
| 6261 | @end table | ||
| 6262 | @end defvr | ||
| 6263 | |||
| 6264 | @defvr {Scheme-Variable} cmake-build-system | ||
| 6265 | Diese Variable wird von @code{(guix build-system cmake)} exportiert. Sie | ||
| 6266 | implementiert die Erstellungsprozedur für Pakete, die das | ||
| 6267 | @url{http://www.cmake.org, CMake-Erstellungswerkzeug} benutzen. | ||
| 6268 | |||
| 6269 | Das Erstellungssystem fügt automatisch das Paket @code{cmake} zu den | ||
| 6270 | Eingaben hinzu. Welches Paket benutzt wird, kann mit dem Parameter | ||
| 6271 | @code{#:cmake} geändert werden. | ||
| 6272 | |||
| 6273 | Der Parameter @code{#:configure-flags} wird als Liste von | ||
| 6274 | Befehlszeilenoptionen aufgefasst, die an den Befehl @command{cmake} | ||
| 6275 | übergeben werden. Der Parameter @code{#:build-type} abstrahiert, welche | ||
| 6276 | Befehlszeilenoptionen dem Compiler übergeben werden; der Vorgabewert ist | ||
| 6277 | @code{"RelWithDebInfo"} (kurz für »release mode with debugging | ||
| 6278 | information«), d.h.@: kompiliert wird für eine Produktionsumgebung und | ||
| 6279 | Informationen zur Fehlerbehebung liegen bei, was ungefähr @code{-O2 -g} | ||
| 6280 | entspricht, wie bei der Vorgabe für Autoconf-basierte Pakete. | ||
| 6281 | @end defvr | ||
| 6282 | |||
| 6283 | @defvr {Scheme-Variable} dune-build-system | ||
| 6284 | Diese Variable wird vom Modul @code{(guix build-system dune)} | ||
| 6285 | exportiert. Sie unterstützt es, Pakete mit @uref{https://dune.build/, Dune} | ||
| 6286 | zu erstellen, einem Erstellungswerkzeug für die Programmiersprache OCaml, | ||
| 6287 | und ist als Erweiterung des unten beschriebenen OCaml-Erstellungssystems | ||
| 6288 | @code{ocaml-build-system} implementiert. Als solche können auch die | ||
| 6289 | Parameter @code{#:ocaml} und @code{#:findlib} an dieses Erstellungssystem | ||
| 6290 | übergeben werden. | ||
| 6291 | |||
| 6292 | Das Erstellungssystem fügt automatisch das Paket @code{dune} zu den Eingaben | ||
| 6293 | hinzu. Welches Paket benutzt wird, kann mit dem Parameter @code{#:dune} | ||
| 6294 | geändert werden. | ||
| 6295 | |||
| 6296 | There is no @code{configure} phase because dune packages typically don't | ||
| 6297 | need to be configured. The @code{#:build-flags} parameter is taken as a | ||
| 6298 | list of flags passed to the @code{dune} command during the build. | ||
| 6299 | |||
| 6300 | The @code{#:jbuild?} parameter can be passed to use the @code{jbuild} | ||
| 6301 | command instead of the more recent @code{dune} command while building a | ||
| 6302 | package. Its default value is @code{#f}. | ||
| 6303 | |||
| 6304 | The @code{#:package} parameter can be passed to specify a package name, | ||
| 6305 | which is useful when a package contains multiple packages and you want to | ||
| 6306 | build only one of them. This is equivalent to passing the @code{-p} | ||
| 6307 | argument to @code{dune}. | ||
| 6308 | @end defvr | ||
| 6309 | |||
| 6310 | @defvr {Scheme-Variable} go-build-system | ||
| 6311 | Diese Variable wird vom Modul @code{(guix build-system go)} exportiert. Mit | ||
| 6312 | ihr ist eine Erstellungsprozedur für Go-Pakete implementiert, die dem | ||
| 6313 | normalen | ||
| 6314 | @url{https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies, | ||
| 6315 | Go-Erstellungsmechanismus} entspricht. | ||
| 6316 | |||
| 6317 | Beim Aufruf wird ein Wert für den Schlüssel @code{#:import-path} und | ||
| 6318 | manchmal auch für @code{#:unpack-path} erwartet. Der | ||
| 6319 | @url{https://golang.org/doc/code.html#ImportPaths, »import path«} entspricht | ||
| 6320 | dem Dateisystempfad, den die Erstellungsskripts des Pakets und darauf Bezug | ||
| 6321 | nehmende Pakete erwarten; durch ihn wird ein Go-Paket eindeutig | ||
| 6322 | bezeichnet. Typischerweise setzt er sich aus einer Kombination der | ||
| 6323 | entfernten URI des Paketquellcodes und der Dateisystemhierarchie | ||
| 6324 | zusammen. Manchmal ist es nötig, den Paketquellcode in ein anderes als das | ||
| 6325 | vom »import path« bezeichnete Verzeichnis zu entpacken; diese andere | ||
| 6326 | Verzeichnisstruktur sollte dann als @code{#:unpack-path} angegeben werden. | ||
| 6327 | |||
| 6328 | Pakete, die Go-Bibliotheken zur Verfügung stellen, sollten ihren Quellcode | ||
| 6329 | auch in die Erstellungsausgabe installieren. Der Schlüssel | ||
| 6330 | @code{#:install-source?}, sein Vorgabewert ist @code{#t}, steuert, ob | ||
| 6331 | Quellcode installiert wird. Bei Paketen, die nur ausführbare Dateien | ||
| 6332 | liefern, kann der Wert auf @code{#f} gesetzt werden. | ||
| 6333 | @end defvr | ||
| 6334 | |||
| 6335 | @defvr {Scheme-Variable} glib-or-gtk-build-system | ||
| 6336 | Diese Variable wird vom Modul @code{(guix build-system glib-or-gtk)} | ||
| 6337 | exportiert. Sie ist für Pakete gedacht, die GLib oder GTK benutzen. | ||
| 6338 | |||
| 6339 | Dieses Erstellungssystem fügt die folgenden zwei Phasen zu denen von | ||
| 6340 | @var{gnu-build-system} hinzu: | ||
| 6341 | |||
| 6342 | @table @code | ||
| 6343 | @item glib-or-gtk-wrap | ||
| 6344 | Die Phase @code{glib-or-gtk-wrap} stellt sicher, dass Programme in | ||
| 6345 | @file{bin/} in der Lage sind, GLib-»Schemata« und | ||
| 6346 | @uref{https://developer.gnome.org/gtk3/stable/gtk-running.html, GTK-Module} | ||
| 6347 | zu finden. Dazu wird für das Programm ein Wrapper-Skript erzeugt, dass das | ||
| 6348 | eigentliche Programm mit den richtigen Werten für die Umgebungsvariablen | ||
| 6349 | @code{XDG_DATA_DIRS} und @code{GTK_PATH} aufruft. | ||
| 6350 | |||
| 6351 | Es ist möglich, bestimmte Paketausgaben von diesem Wrapping-Prozess | ||
| 6352 | auszunehmen, indem Sie eine Liste ihrer Namen im Parameter | ||
| 6353 | @code{#:glib-or-gtk-wrap-excluded-outputs} angeben. Das ist nützlich, wenn | ||
| 6354 | man von einer Ausgabe weiß, dass sie keine Binärdateien enthält, die GLib | ||
| 6355 | oder GTK benutzen, und diese Ausgabe durch das Wrappen ohne Not eine weitere | ||
| 6356 | Abhängigkeit von GLib und GTK bekäme. | ||
| 6357 | |||
| 6358 | @item glib-or-gtk-compile-schemas | ||
| 6359 | Mit der Phase @code{glib-or-gtk-compile-schemas} wird sichergestellt, dass | ||
| 6360 | alle @uref{https://developer.gnome.org/gio/stable/glib-compile-schemas.html, | ||
| 6361 | GSettings-Schemata} für GLib kompiliert werden. Dazu wird das Programm | ||
| 6362 | @command{glib-compile-schemas} ausgeführt. Es kommt aus dem Paket | ||
| 6363 | @code{glib:bin}, was automatisch vom Erstellungssystem importiert | ||
| 6364 | wird. Welches @code{glib}-Paket dieses @command{glib-compile-schemas} | ||
| 6365 | bereitstellt, kann mit dem Parameter @code{#:glib} spezifiziert werden. | ||
| 6366 | @end table | ||
| 6367 | |||
| 6368 | Beide Phasen finden nach der @code{install}-Phase statt. | ||
| 6369 | @end defvr | ||
| 6370 | |||
| 6371 | @defvr {Scheme-Variable} guile-build-system | ||
| 6372 | Dieses Erstellungssystem ist für Guile-Pakete gedacht, die nur aus | ||
| 6373 | Scheme-Code bestehen und so schlicht sind, dass sie nicht einmal ein | ||
| 6374 | Makefile und erst recht keinen @file{configure}-Skript enthalten. Hierzu | ||
| 6375 | wird Scheme-Code mit @command{guild compile} kompiliert (siehe | ||
| 6376 | @ref{Compilation,,, guile, GNU Guile Reference Manual}) und die @file{.scm}- | ||
| 6377 | und @file{.go}-Dateien an den richtigen Pfad installiert. Auch Dokumentation | ||
| 6378 | wird installiert. | ||
| 6379 | |||
| 6380 | Das Erstellungssystem unterstützt Cross-Kompilieren durch die | ||
| 6381 | Befehlszeilenoption @code{--target} für @command{guild compile}. | ||
| 6382 | |||
| 6383 | Mit @code{guile-build-system} erstellte Pakete müssen ein Guile-Paket in | ||
| 6384 | ihrem @code{native-inputs}-Feld aufführen. | ||
| 6385 | @end defvr | ||
| 6386 | |||
| 6387 | @defvr {Scheme-Variable} minify-build-system | ||
| 6388 | Diese Variable wird vom Modul @code{(guix build-system minify)} | ||
| 6389 | exportiert. Sie implementiert eine Prozedur zur Minifikation einfacher | ||
| 6390 | JavaScript-Pakete. | ||
| 6391 | |||
| 6392 | Es fügt @code{uglify-js} zur Menge der Eingaben hinzu und komprimiert damit | ||
| 6393 | alle JavaScript-Dateien im @file{src}-Verzeichnis. Ein anderes Programm zur | ||
| 6394 | Minifikation kann verwendet werden, indem es mit dem Parameter | ||
| 6395 | @code{#:uglify-js} angegeben wird; es wird erwartet, dass das angegebene | ||
| 6396 | Paket den minifizierten Code auf der Standardausgabe ausgibt. | ||
| 6397 | |||
| 6398 | Wenn die Eingabe-JavaScript-Dateien nicht alle im @file{src}-Verzeichnis | ||
| 6399 | liegen, kann mit dem Parameter @code{#:javascript-files} eine Liste der | ||
| 6400 | Dateinamen übergeben werden, auf die das Minifikationsprogramm aufgerufen | ||
| 6401 | wird. | ||
| 6402 | @end defvr | ||
| 6403 | |||
| 6404 | @defvr {Scheme-Variable} ocaml-build-system | ||
| 6405 | Diese Variable wird vom Modul @code{(guix build-system ocaml)} | ||
| 6406 | exportiert. Mit ihr ist ein Erstellungssystem für @uref{https://ocaml.org, | ||
| 6407 | OCaml}-Pakete implementiert, was bedeutet, dass es die richtigen | ||
| 6408 | auszuführenden Befehle für das jeweilige Paket auswählt. OCaml-Pakete können | ||
| 6409 | sehr unterschiedliche Befehle erwarten. Dieses Erstellungssystem probiert | ||
| 6410 | manche davon durch. | ||
| 6411 | |||
| 6412 | Wenn im Paket eine Datei @file{setup.ml} auf oberster Ebene vorhanden ist, | ||
| 6413 | wird @code{ocaml setup.ml -configure}, @code{ocaml setup.ml -build} und | ||
| 6414 | @code{ocaml setup.ml -install} ausgeführt. Das Erstellungssystem wird | ||
| 6415 | annehmen, dass die Datei durch @uref{http://oasis.forge.ocamlcore.org/, | ||
| 6416 | OASIS} erzeugt wurde, und wird das Präfix setzen und Tests aktivieren, wenn | ||
| 6417 | diese nicht abgeschaltet wurden. Sie können Befehlszeilenoptionen zum | ||
| 6418 | Konfigurieren und Erstellen mit den Parametern @code{#:configure-flags} und | ||
| 6419 | @code{#:build-flags} übergeben. Der Schlüssel @code{#:test-flags} kann | ||
| 6420 | übergeben werden, um die Befehlszeilenoptionen zu ändern, mit denen die | ||
| 6421 | Tests aktiviert werden. Mit dem Parameter @code{#:use-make?} kann dieses | ||
| 6422 | Erstellungssystem für die build- und install-Phasen abgeschaltet werden. | ||
| 6423 | |||
| 6424 | Verfügt das Paket über eine @file{configure}-Datei, wird angenommen, dass | ||
| 6425 | diese von Hand geschrieben wurde mit einem anderen Format für Argumente als | ||
| 6426 | bei einem Skript des @code{gnu-build-system}. Sie können weitere | ||
| 6427 | Befehlszeilenoptionen mit dem Schlüssel @code{#:configure-flags} hinzufügen. | ||
| 6428 | |||
| 6429 | Falls dem Paket ein @file{Makefile} beiliegt (oder @code{#:use-make?} auf | ||
| 6430 | @code{#t} gesetzt wurde), wird dieses benutzt und weitere | ||
| 6431 | Befehlszeilenoptionen können mit dem Schlüssel @code{#:make-flags} zu den | ||
| 6432 | build- und install-Phasen hinzugefügt werden. | ||
| 6433 | |||
| 6434 | Letztlich gibt es in manchen Pakete keine solchen Dateien, sie halten sich | ||
| 6435 | aber an bestimmte Konventionen, wo ihr eigenes Erstellungssystem zu finden | ||
| 6436 | ist. In diesem Fall führt Guix’ OCaml-Erstellungssystem @code{ocaml | ||
| 6437 | pkg/pkg.ml} oder @code{ocaml pkg/build.ml} aus und kümmert sich darum, dass | ||
| 6438 | der Pfad zu dem benötigten findlib-Modul passt. Weitere | ||
| 6439 | Befehlszeilenoptionen können über den Schlüssel @code{#:build-flags} | ||
| 6440 | übergeben werden. Um die Installation kümmert sich | ||
| 6441 | @command{opam-installer}. In diesem Fall muss das @code{opam}-Paket im | ||
| 6442 | @code{native-inputs}-Feld der Paketdefinition stehen. | ||
| 6443 | |||
| 6444 | Beachten Sie, dass die meisten OCaml-Pakete davon ausgehen, dass sie in | ||
| 6445 | dasselbe Verzeichnis wie OCaml selbst installiert werden, was wir in Guix | ||
| 6446 | aber nicht so haben wollen. Solche Pakete installieren ihre | ||
| 6447 | @file{.so}-Dateien in das Verzeichnis ihres Moduls, was für die meisten | ||
| 6448 | anderen Einrichtungen funktioniert, weil es im OCaml-Compilerverzeichnis | ||
| 6449 | liegt. Jedoch können so in Guix die Bibliotheken nicht gefunden werden, | ||
| 6450 | deswegen benutzen wir @code{CAML_LD_LIBRARY_PATH}. Diese Umgebungsvariable | ||
| 6451 | zeigt auf @file{lib/ocaml/site-lib/stubslibs} und dorthin sollten | ||
| 6452 | @file{.so}-Bibliotheken installiert werden. | ||
| 6453 | @end defvr | ||
| 6454 | |||
| 6455 | @defvr {Scheme-Variable} python-build-system | ||
| 6456 | Diese Variable wird vom Modul @code{(guix build-system python)} | ||
| 6457 | exportiert. Sie implementiert mehr oder weniger die konventionelle | ||
| 6458 | Erstellungsprozedur, wie sie für Python-Pakete üblich ist, d.h.@: erst wird | ||
| 6459 | @code{python setup.py build} ausgeführt und dann @code{python setup.py | ||
| 6460 | install --prefix=/gnu/store/@dots{}}. | ||
| 6461 | |||
| 6462 | Für Pakete, die eigenständige Python-Programme nach @code{bin/} | ||
| 6463 | installieren, sorgt dieses Erstellungssystem dafür, dass die Programme in | ||
| 6464 | ein Wrapper-Skript verpackt werden, welches die eigentlichen Programme mit | ||
| 6465 | einer Umgebungsvariablen @code{PYTHONPATH} aufruft, die alle | ||
| 6466 | Python-Bibliotheken auflistet, von denen die Programme abhängen. | ||
| 6467 | |||
| 6468 | Welches Python-Paket benutzt wird, um die Erstellung durchzuführen, kann mit | ||
| 6469 | dem Parameter @code{#:python} bestimmt werden. Das ist nützlich, wenn wir | ||
| 6470 | erzwingen wollen, dass ein Paket mit einer bestimmten Version des | ||
| 6471 | Python-Interpretierers arbeitet, was nötig sein kann, wenn das Programm nur | ||
| 6472 | mit einer einzigen Interpretiererversion kompatibel ist. | ||
| 6473 | |||
| 6474 | Standardmäßig ruft Guix @code{setup.py} auf, was zu @code{setuptools} | ||
| 6475 | gehört, ähnlich wie es auch @command{pip} tut. Manche Pakete sind mit | ||
| 6476 | setuptools (und pip) inkompatibel, deswegen können Sie diese Einstellung | ||
| 6477 | abschalten, indem Sie den Parameter @code{#:use-setuptools} auf @code{#f} | ||
| 6478 | setzen. | ||
| 6479 | @end defvr | ||
| 6480 | |||
| 6481 | @defvr {Scheme-Variable} perl-build-system | ||
| 6482 | Diese Variable wird vom Modul @code{(guix build-system perl)} | ||
| 6483 | exportiert. Mit ihr wird die Standard-Erstellungsprozedur für Perl-Pakete | ||
| 6484 | implementiert, welche entweder darin besteht, @code{perl Build.PL | ||
| 6485 | --prefix=/gnu/store/@dots{}} gefolgt von @code{Build} und @code{Build | ||
| 6486 | install} auszuführen, oder @code{perl Makefile.PL PREFIX=/gnu/store/@dots{}} | ||
| 6487 | gefolgt von @code{make} und @code{make install} auszuführen, je nachdem, ob | ||
| 6488 | eine Datei @code{Build.PL} oder eine Datei @code{Makefile.PL} in der | ||
| 6489 | Paketdistribution vorliegt. Den Vorrang hat erstere, wenn sowohl | ||
| 6490 | @code{Build.PL} als auch @code{Makefile.PL} in der Paketdistribution | ||
| 6491 | existieren. Der Vorrang kann umgekehrt werden, indem @code{#t} für den | ||
| 6492 | Parameter @code{#:make-maker?} angegeben wird. | ||
| 6493 | |||
| 6494 | Der erste Aufruf von @code{perl Makefile.PL} oder @code{perl Build.PL} | ||
| 6495 | übergibt die im Parameter @code{#:make-maker-flags} | ||
| 6496 | bzw. @code{#:module-build-flags} angegebenen Befehlszeilenoptionen, je | ||
| 6497 | nachdem, was verwendet wird. | ||
| 6498 | |||
| 6499 | Welches Perl-Paket dafür benutzt wird, kann mit @code{#:perl} angegeben | ||
| 6500 | werden. | ||
| 6501 | @end defvr | ||
| 6502 | |||
| 6503 | @defvr {Scheme-Variable} r-build-system | ||
| 6504 | Diese Variable wird vom Modul @code{(guix build-system r)} exportiert. Sie | ||
| 6505 | entspricht einer Implementierung der durch @uref{http://r-project.org, | ||
| 6506 | R}-Pakete genutzten Erstellungsprozedur, die wenig mehr tut, als @code{R CMD | ||
| 6507 | INSTALL --library=/gnu/store/@dots{}} in einer Umgebung auszuführen, in der | ||
| 6508 | die Umgebungsvariable @code{R_LIBS_SITE} die Pfade aller R-Pakete unter den | ||
| 6509 | Paketeingaben enthält. Tests werden nach der Installation mit der R-Funktion | ||
| 6510 | @code{tools::testInstalledPackage} ausgeführt. | ||
| 6511 | @end defvr | ||
| 6512 | |||
| 6513 | @defvr {Scheme-Variable} rakudo-build-system | ||
| 6514 | This variable is exported by @code{(guix build-system rakudo)} It implements | ||
| 6515 | the build procedure used by @uref{https://rakudo.org/, Rakudo} for | ||
| 6516 | @uref{https://perl6.org/, Perl6} packages. It installs the package to | ||
| 6517 | @code{/gnu/store/@dots{}/NAME-VERSION/share/perl6} and installs the | ||
| 6518 | binaries, library files and the resources, as well as wrap the files under | ||
| 6519 | the @code{bin/} directory. Tests can be skipped by passing @code{#f} to the | ||
| 6520 | @code{tests?} parameter. | ||
| 6521 | |||
| 6522 | Which rakudo package is used can be specified with @code{rakudo}. Which | ||
| 6523 | perl6-tap-harness package used for the tests can be specified with | ||
| 6524 | @code{#:prove6} or removed by passing @code{#f} to the @code{with-prove6?} | ||
| 6525 | parameter. Which perl6-zef package used for tests and installing can be | ||
| 6526 | specified with @code{#:zef} or removed by passing @code{#f} to the | ||
| 6527 | @code{with-zef?} parameter. | ||
| 6528 | @end defvr | ||
| 6529 | |||
| 6530 | @defvr {Scheme-Variable} texlive-build-system | ||
| 6531 | Diese Variable wird vom Modul @code{(guix build-system texlive)} | ||
| 6532 | exportiert. Mit ihr werden TeX-Pakete in Stapelverarbeitung (»batch mode«) | ||
| 6533 | mit der angegebenen Engine erstellt. Das Erstellungssystem setzt die | ||
| 6534 | Variable @code{TEXINPUTS} so, dass alle TeX-Quelldateien unter den Eingaben | ||
| 6535 | gefunden werden können. | ||
| 6536 | |||
| 6537 | Standardmäßig wird @code{luatex} auf allen Dateien mit der Dateiendung | ||
| 6538 | @code{ins} ausgeführt. Eine andere Engine oder ein anderes Format kann mit | ||
| 6539 | dem Argument @code{#:tex-format} angegeben werden. Verschiedene | ||
| 6540 | Erstellungsziele können mit dem Argument @code{#:build-targets} festgelegt | ||
| 6541 | werden, das eine Liste von Dateinamen erwartet. Das Erstellungssystem fügt | ||
| 6542 | nur @code{texlive-bin} und @code{texlive-latex-base} zu den Eingaben hinzu | ||
| 6543 | (beide kommen aus dem Modul @code{(gnu packages tex}). Für beide kann das zu | ||
| 6544 | benutzende Paket jeweils mit den Argumenten @code{#:texlive-bin} oder | ||
| 6545 | @code{#:texlive-latex-base} geändert werden. | ||
| 6546 | |||
| 6547 | Der Parameter @code{#:tex-directory} sagt dem Erstellungssystem, wohin die | ||
| 6548 | installierten Dateien im texmf-Verzeichnisbaum installiert werden sollen. | ||
| 6549 | @end defvr | ||
| 6550 | |||
| 6551 | @defvr {Scheme-Variable} ruby-build-system | ||
| 6552 | Diese Variable wird vom Modul @code{(guix build-system ruby)} | ||
| 6553 | exportiert. Sie steht für eine Implementierung der | ||
| 6554 | RubyGems-Erstellungsprozedur, die für Ruby-Pakete benutzt wird, wobei | ||
| 6555 | @code{gem build} gefolgt von @code{gem install} ausgeführt wird. | ||
| 6556 | |||
| 6557 | Das @code{source}-Feld eines Pakets, das dieses Erstellungssystem benutzt, | ||
| 6558 | verweist typischerweise auf ein Gem-Archiv, weil Ruby-Entwickler dieses | ||
| 6559 | Format benutzen, wenn sie ihre Software veröffentlichen. Das | ||
| 6560 | Erstellungssystem entpackt das Gem-Archiv, spielt eventuell Patches für den | ||
| 6561 | Quellcode ein, führt die Tests aus, verpackt alles wieder in ein Gem-Archiv | ||
| 6562 | und installiert dieses. Neben Gem-Archiven darf das Feld auch auf | ||
| 6563 | Verzeichnisse und Tarballs verweisen, damit es auch möglich ist, | ||
| 6564 | unveröffentlichte Gems aus einem Git-Repository oder traditionelle | ||
| 6565 | Quellcode-Veröffentlichungen zu benutzen. | ||
| 6566 | |||
| 6567 | Welches Ruby-Paket benutzt werden soll, kann mit dem Parameter @code{#:ruby} | ||
| 6568 | festgelegt werden. Eine Liste zusätzlicher Befehlszeilenoptionen für den | ||
| 6569 | Aufruf des @command{gem}-Befehls kann mit dem Parameter @code{#:gem-flags} | ||
| 6570 | angegeben werden. | ||
| 6571 | @end defvr | ||
| 6572 | |||
| 6573 | @defvr {Scheme-Variable} waf-build-system | ||
| 6574 | Diese Variable wird durch das Modul @code{(guix build-system waf)} | ||
| 6575 | exportiert. Damit ist eine Erstellungsprozedur rund um das @code{waf}-Skript | ||
| 6576 | implementiert. Die üblichen Phasen — @code{configure}, @code{build} und | ||
| 6577 | @code{install} — sind implementiert, indem deren Namen als Argumente an das | ||
| 6578 | @code{waf}-Skript übergeben werden. | ||
| 6579 | |||
| 6580 | Das @code{waf}-Skript wird vom Python-Interpetierer ausgeführt. Mit welchem | ||
| 6581 | Python-Paket das Skript ausgeführt werden soll, kann mit dem Parameter | ||
| 6582 | @code{#:python} angegeben werden. | ||
| 6583 | @end defvr | ||
| 6584 | |||
| 6585 | @defvr {Scheme-Variable} scons-build-system | ||
| 6586 | Diese Variable wird vom Modul @code{(guix build-system scons)} | ||
| 6587 | exportiert. Sie steht für eine Implementierung der Erstellungsprozedur, die | ||
| 6588 | das SCons-Softwarekonstruktionswerkzeug (»software construction tool«) | ||
| 6589 | benutzt. Das Erstellungssystem führt @code{scons} aus, um das Paket zu | ||
| 6590 | erstellen, führt mit @code{scons test} Tests aus und benutzt @code{scons | ||
| 6591 | install}, um das Paket zu installieren. | ||
| 6592 | |||
| 6593 | Zusätzliche Optionen, die an @code{scons} übergeben werden sollen, können | ||
| 6594 | mit dem Parameter @code{#:scons-flags} angegeben werden. Die Python-Version, | ||
| 6595 | die benutzt werden soll, um SCons auszuführen, kann festgelegt werden, indem | ||
| 6596 | das passende SCons-Paket mit dem Parameter @code{#:scons} ausgewählt wird. | ||
| 6597 | @end defvr | ||
| 6598 | |||
| 6599 | @defvr {Scheme-Variable} haskell-build-system | ||
| 6600 | Diese Variable wird vom Modul @code{(guix build-system haskell)} | ||
| 6601 | exportiert. Sie bietet Zugang zur Cabal-Erstellungsprozedur, die von | ||
| 6602 | Haskell-Paketen benutzt wird, was bedeutet, @code{runhaskell Setup.hs | ||
| 6603 | configure --prefix=/gnu/store/@dots{}} und @code{runhaskell Setup.hs build} | ||
| 6604 | auszuführen. Statt das Paket mit dem Befehl @code{runhaskell Setup.hs | ||
| 6605 | install} zu installieren, benutzt das Erstellungssystem @code{runhaskell | ||
| 6606 | Setup.hs copy} gefolgt von @code{runhaskell Setup.hs register}, um keine | ||
| 6607 | Bibliotheken im Store-Verzeichnis des Compilers zu speichern, auf dem keine | ||
| 6608 | Schreibberechtigung besteht. Zusätzlich generiert das Erstellungssystem | ||
| 6609 | Dokumentation durch Ausführen von @code{runhaskell Setup.hs haddock}, außer | ||
| 6610 | @code{#:haddock? #f} wurde übergeben. Optional können an Haddock Parameter | ||
| 6611 | mit Hilfe des Parameters @code{#:haddock-flags} übergeben werden. Wird die | ||
| 6612 | Datei @code{Setup.hs} nicht gefunden, sucht das Erstellungssystem | ||
| 6613 | stattdessen nach @code{Setup.lhs}. | ||
| 6614 | |||
| 6615 | Welcher Haskell-Compiler benutzt werden soll, kann über den | ||
| 6616 | @code{#:haskell}-Parameter angegeben werden. Als Vorgabewert verwendet er | ||
| 6617 | @code{ghc}. | ||
| 6618 | @end defvr | ||
| 6619 | |||
| 6620 | @defvr {Scheme-Variable} dub-build-system | ||
| 6621 | Diese Variable wird vom Modul @code{(guix build-system dub)} exportiert. Sie | ||
| 6622 | verweist auf eine Implementierung des Dub-Erstellungssystems, das von | ||
| 6623 | D-Paketen benutzt wird. Dabei werden @code{dub build} und @code{dub run} | ||
| 6624 | ausgeführt. Die Installation wird durch manuelles Kopieren der Dateien | ||
| 6625 | durchgeführt. | ||
| 6626 | |||
| 6627 | Welcher D-Compiler benutzt wird, kann mit dem Parameter @code{#:ldc} | ||
| 6628 | festgelegt werden, was als Vorgabewert @code{ldc} benutzt. | ||
| 6629 | @end defvr | ||
| 6630 | |||
| 6631 | @defvr {Scheme-Variable} emacs-build-system | ||
| 6632 | Diese Variable wird vom Modul @code{(guix build-system emacs)} | ||
| 6633 | exportiert. Darin wird eine Installationsprozedur ähnlich der des | ||
| 6634 | Paketsystems von Emacs selbst implementiert (siehe @ref{Packages,,, emacs, | ||
| 6635 | The GNU Emacs Manual}). | ||
| 6636 | |||
| 6637 | Zunächst wird eine Datei @code{@var{Paket}-autoloads.el} erzeugt, dann | ||
| 6638 | werden alle Emacs-Lisp-Dateien zu Bytecode kompiliert. Anders als beim | ||
| 6639 | Emacs-Paketsystem werden die Info-Dokumentationsdateien in das | ||
| 6640 | Standardverzeichnis für Dokumentation verschoben und die Datei @file{dir} | ||
| 6641 | gelöscht. Jedes Paket wird in sein eigenes Verzeichnis unter | ||
| 6642 | @file{share/emacs/site-lisp/guix.d} installiert. | ||
| 6643 | @end defvr | ||
| 6644 | |||
| 6645 | @defvr {Scheme-Variable} font-build-system | ||
| 6646 | Diese Variable wird vom Modul @code{(guix build-system font)} | ||
| 6647 | exportiert. Mit ihr steht eine Installationsprozedur für Schriftarten-Pakete | ||
| 6648 | zur Verfügung für vom Anbieter vorkompilierte TrueType-, OpenType- und | ||
| 6649 | andere Schriftartendateien, die nur an die richtige Stelle kopiert werden | ||
| 6650 | müssen. Dieses Erstellungssystem kopiert die Schriftartendateien an den | ||
| 6651 | Konventionen folgende Orte im Ausgabeverzeichnis. | ||
| 6652 | @end defvr | ||
| 6653 | |||
| 6654 | @defvr {Scheme-Variable} meson-build-system | ||
| 6655 | Diese Variable wird vom Modul @code{(guix build-system meson)} | ||
| 6656 | exportiert. Sie enthält die Erstellungsprozedur für Pakete, die | ||
| 6657 | @url{http://mesonbuild.com, Meson} als ihr Erstellungssystem benutzen. | ||
| 6658 | |||
| 6659 | Mit ihr werden sowohl Meson als auch @uref{https://ninja-build.org/, Ninja} | ||
| 6660 | zur Menge der Eingaben hinzugefügt; die Pakete dafür können mit den | ||
| 6661 | Parametern @code{#:meson} und @code{#:ninja} geändert werden, wenn | ||
| 6662 | nötig. Das vorgegebene Meson-Paket ist @code{meson-for-build}, ein | ||
| 6663 | besonderes Paket, dessen Besonderheit darin besteht, den @code{RUNPATH} von | ||
| 6664 | Binärdateien und Bibliotheken @emph{nicht} zu entfernen, wenn sie | ||
| 6665 | installiert werden. | ||
| 6666 | |||
| 6667 | Dieses Erstellungssystem ist eine Erweiterung für das | ||
| 6668 | @var{gnu-build-system}, aber mit Änderungen an den folgenden Phasen, die | ||
| 6669 | Meson-spezifisch sind: | ||
| 6670 | |||
| 6671 | @table @code | ||
| 6672 | |||
| 6673 | @item configure | ||
| 6674 | Diese Phase führt den @code{meson}-Befehl mit den in | ||
| 6675 | @code{#:configure-flags} angegebenen Befehlszeilenoptionen aus. Die | ||
| 6676 | Befehlszeilenoption @code{--build-type} wird immer auf @code{plain} gesetzt, | ||
| 6677 | solange nichts anderes mit dem Parameter @code{#:build-type} angegeben | ||
| 6678 | wurde. | ||
| 6679 | |||
| 6680 | @item build | ||
| 6681 | Diese Phase ruft @code{ninja} auf, um das Paket standardmäßig parallel zu | ||
| 6682 | erstellen. Die Vorgabeeinstellung, dass parallel erstellt wird, kann | ||
| 6683 | verändert werden durch Setzen von @code{#:parallel-build?}. | ||
| 6684 | |||
| 6685 | @item check | ||
| 6686 | Diese Phase führt @code{ninja} mit dem als @code{#:test-target} | ||
| 6687 | spezifizierten Ziel für Tests auf, der Vorgabewert ist das Ziel namens | ||
| 6688 | @code{"test"}. | ||
| 6689 | |||
| 6690 | @item install | ||
| 6691 | Diese Phase führt @code{ninja install} aus und kann nicht verändert werden. | ||
| 6692 | @end table | ||
| 6693 | |||
| 6694 | Dazu fügt das Erstellungssystem noch folgende neue Phasen: | ||
| 6695 | |||
| 6696 | @table @code | ||
| 6697 | |||
| 6698 | @item fix-runpath | ||
| 6699 | In dieser Phase wird sichergestellt, dass alle Binärdateien die von ihnen | ||
| 6700 | benötigten Bibliotheken finden können. Die benötigten Bibliotheken werden in | ||
| 6701 | den Unterverzeichnissen des Pakets, das erstellt wird, gesucht, und zum | ||
| 6702 | @code{RUNPATH} hinzugefügt, wann immer es nötig ist. Auch werden diejenigen | ||
| 6703 | Referenzen zu Bibliotheken aus der Erstellungsphase wieder entfernt, die bei | ||
| 6704 | @code{meson-for-build} hinzugefügt wurden, aber eigentlich zur Laufzeit | ||
| 6705 | nicht gebraucht werden, wie Abhängigkeiten nur für Tests. | ||
| 6706 | |||
| 6707 | @item glib-or-gtk-wrap | ||
| 6708 | Diese Phase ist dieselbe, die auch im @code{glib-or-gtk-build-system} zur | ||
| 6709 | Verfügung gestellt wird, und mit Vorgabeeinstellungen wird sie nicht | ||
| 6710 | durchlaufen. Wenn sie gebraucht wird, kann sie mit dem Parameter | ||
| 6711 | @code{#:glib-or-gtk?} aktiviert werden. | ||
| 6712 | |||
| 6713 | @item glib-or-gtk-compile-schemas | ||
| 6714 | Diese Phase ist dieselbe, die auch im @code{glib-or-gtk-build-system} zur | ||
| 6715 | Verfügung gestellt wird, und mit Vorgabeeinstellungen wird sie nicht | ||
| 6716 | durchlaufen. Wenn sie gebraucht wird, kann sie mit dem Parameter | ||
| 6717 | @code{#:glib-or-gtk?} aktiviert werden. | ||
| 6718 | @end table | ||
| 6719 | @end defvr | ||
| 6720 | |||
| 6721 | @defvr {Scheme Variable} linux-module-build-system | ||
| 6722 | @var{linux-module-build-system} allows building Linux kernel modules. | ||
| 6723 | |||
| 6724 | @cindex Erstellungsphasen | ||
| 6725 | This build system is an extension of @var{gnu-build-system}, but with the | ||
| 6726 | following phases changed: | ||
| 6727 | |||
| 6728 | @table @code | ||
| 6729 | |||
| 6730 | @item configure | ||
| 6731 | This phase configures the environment so that the Linux kernel's Makefile | ||
| 6732 | can be used to build the external kernel module. | ||
| 6733 | |||
| 6734 | @item build | ||
| 6735 | This phase uses the Linux kernel's Makefile in order to build the external | ||
| 6736 | kernel module. | ||
| 6737 | |||
| 6738 | @item install | ||
| 6739 | This phase uses the Linux kernel's Makefile in order to install the external | ||
| 6740 | kernel module. | ||
| 6741 | @end table | ||
| 6742 | |||
| 6743 | It is possible and useful to specify the Linux kernel to use for building | ||
| 6744 | the module (in the "arguments" form of a package using the | ||
| 6745 | linux-module-build-system, use the key #:linux to specify it). | ||
| 6746 | @end defvr | ||
| 6747 | |||
| 6748 | Letztlich gibt es für die Pakete, die bei weitem nichts so komplexes | ||
| 6749 | brauchen, ein »triviales« Erstellungssystem. Es ist in dem Sinn trivial, | ||
| 6750 | dass es praktisch keine Hilfestellungen gibt: Es fügt keine impliziten | ||
| 6751 | Eingaben hinzu und hat kein Konzept von Erstellungsphasen. | ||
| 6752 | |||
| 6753 | @defvr {Scheme-Variable} trivial-build-system | ||
| 6754 | Diese Variable wird vom Modul @code{(guix build-system trivial)} exportiert. | ||
| 6755 | |||
| 6756 | Diesem Erstellungssystem muss im Argument @code{#:builder} ein | ||
| 6757 | Scheme-Ausdruck übergeben werden, der die Paketausgabe(n) erstellt — wie bei | ||
| 6758 | @code{build-expression->derivation} (siehe @ref{Ableitungen, | ||
| 6759 | @code{build-expression->derivation}}). | ||
| 6760 | @end defvr | ||
| 6761 | |||
| 6762 | @node Der Store | ||
| 6763 | @section Der Store | ||
| 6764 | |||
| 6765 | @cindex Store | ||
| 6766 | @cindex Store-Objekte | ||
| 6767 | @cindex Store-Pfade | ||
| 6768 | |||
| 6769 | Konzeptionell ist der @dfn{Store} der Ort, wo Ableitungen nach erfolgreicher | ||
| 6770 | Erstellung gespeichert werden — standardmäßig finden Sie ihn in | ||
| 6771 | @file{/gnu/store}. Unterverzeichnisse im Store werden @dfn{Store-Objekte} | ||
| 6772 | oder manchmal auch @dfn{Store-Pfade} genannt. Mit dem Store ist eine | ||
| 6773 | Datenbank assoziiert, die Informationen enthält wie zum Beispiel, welche | ||
| 6774 | Store-Pfade jeder Store-Pfad jeweils referenziert, und eine Liste, welche | ||
| 6775 | Store-Objekte @emph{gültig} sind, also Ergebnisse erfolgreicher Erstellungen | ||
| 6776 | sind. Die Datenbank befindet sich in @file{@var{localstatedir}/guix/db}, | ||
| 6777 | wobei @var{localstatedir} das mit @option{--localstatedir} bei der | ||
| 6778 | Ausführung von »configure« angegebene Zustandsverzeichnis ist, normalerweise | ||
| 6779 | @file{/var}. | ||
| 6780 | |||
| 6781 | Auf den Store wird @emph{nur} durch den Daemon im Auftrag seiner Clients | ||
| 6782 | zugegriffen (siehe @ref{Aufruf des guix-daemon}). Um den Store zu verändern, | ||
| 6783 | verbinden sich Clients über einen Unix-Socket mit dem Daemon, senden ihm | ||
| 6784 | entsprechende Anfragen und lesen dann dessen Antwort — so etwas nennt sich | ||
| 6785 | entfernter Prozeduraufruf (englisch »Remote Procedure Call« oder kurz RPC). | ||
| 6786 | |||
| 6787 | @quotation Anmerkung | ||
| 6788 | Benutzer dürfen @emph{niemals} Dateien in @file{/gnu/store} direkt | ||
| 6789 | verändern, sonst wären diese nicht mehr konsistent und die Grundannahmen im | ||
| 6790 | funktionalen Modell von Guix, dass die Objekte unveränderlich sind, wären | ||
| 6791 | dahin (siehe @ref{Einführung}). | ||
| 6792 | |||
| 6793 | Siehe @ref{Aufruf von guix gc, @command{guix gc --verify}} für Informationen, | ||
| 6794 | wie die Integrität des Stores überprüft und nach versehentlichen | ||
| 6795 | Veränderungen unter Umständen wiederhergestellt werden kann. | ||
| 6796 | @end quotation | ||
| 6797 | |||
| 6798 | Das Modul @code{(guix store)} bietet Prozeduren an, um sich mit dem Daemon | ||
| 6799 | zu verbinden und entfernte Prozeduraufrufe durchzuführen. Diese werden im | ||
| 6800 | Folgenden beschrieben. Das vorgegebene Verhalten von @code{open-connection}, | ||
| 6801 | und daher allen @command{guix}-Befehlen, ist, sich mit dem lokalen Daemon | ||
| 6802 | oder dem an der in der Umgebungsvariablen @code{GUIX_DAEMON_SOCKET} | ||
| 6803 | angegeben URL zu verbinden. | ||
| 6804 | |||
| 6805 | @defvr {Umgebungsvariable} GUIX_DAEMON_SOCKET | ||
| 6806 | Ist diese Variable gesetzt, dann sollte ihr Wert ein Dateipfad oder eine URI | ||
| 6807 | sein, worüber man sich mit dem Daemon verbinden kann. Ist der Wert der Pfad | ||
| 6808 | zu einer Datei, bezeichnet dieser einen Unix-Socket, mit dem eine Verbindung | ||
| 6809 | hergestellt werden soll. Ist er eine URI, so werden folgende URI-Schemata | ||
| 6810 | unterstützt: | ||
| 6811 | |||
| 6812 | @table @code | ||
| 6813 | @item file | ||
| 6814 | @itemx unix | ||
| 6815 | Für Unix-Sockets. @code{file:///var/guix/daemon-socket/socket} kann | ||
| 6816 | gleichbedeutend auch als @file{/var/guix/daemon-socket/socket} angegeben | ||
| 6817 | werden. | ||
| 6818 | |||
| 6819 | @item guix | ||
| 6820 | @cindex Daemon, Fernzugriff | ||
| 6821 | @cindex Fernzugriff auf den Daemon | ||
| 6822 | @cindex Daemon, Einrichten auf Clustern | ||
| 6823 | @cindex Cluster, Einrichtung des Daemons | ||
| 6824 | Solche URIs benennen Verbindungen über TCP/IP ohne Verschlüsselung oder | ||
| 6825 | Authentifizierung des entfernten Rechners. Die URI muss den Hostnamen, also | ||
| 6826 | den Rechnernamen des entfernten Rechners, und optional eine Port-Nummer | ||
| 6827 | angeben (sonst wird als Vorgabe der Port 44146 benutzt): | ||
| 6828 | |||
| 6829 | @example | ||
| 6830 | guix://master.guix.example.org:1234 | ||
| 6831 | @end example | ||
| 6832 | |||
| 6833 | Diese Konfiguration ist für lokale Netzwerke wie etwa in Rechen-Clustern | ||
| 6834 | geeignet, wo sich nur vertrauenswürdige Knoten mit dem Erstellungs-Daemon | ||
| 6835 | z.B.@: unter @code{master.guix.example.org} verbinden können. | ||
| 6836 | |||
| 6837 | Die Befehlszeilenoption @code{--listen} von @command{guix-daemon} kann | ||
| 6838 | benutzt werden, damit er auf TCP-Verbindungen lauscht (siehe @ref{Aufruf des guix-daemon, @code{--listen}}). | ||
| 6839 | |||
| 6840 | @item ssh | ||
| 6841 | @cindex SSH-Zugriff auf Erstellungs-Daemons | ||
| 6842 | Mit solchen URIs kann eine Verbindung zu einem entfernten Daemon über SSH | ||
| 6843 | hergestellt werden@footnote{Diese Funktionalitäts setzt Guile-SSH voraus | ||
| 6844 | (siehe @ref{Voraussetzungen}).}. Eine typische URL sieht so aus: | ||
| 6845 | |||
| 6846 | @example | ||
| 6847 | ssh://charlie@@guix.example.org:22 | ||
| 6848 | @end example | ||
| 6849 | |||
| 6850 | Was @command{guix copy} betrifft, richtet es sich nach den üblichen | ||
| 6851 | OpenSSH-Client-Konfigurationsdateien (siehe @ref{Aufruf von guix copy}). | ||
| 6852 | @end table | ||
| 6853 | |||
| 6854 | In Zukunft könnten weitere URI-Schemata unterstützt werden. | ||
| 6855 | |||
| 6856 | @c XXX: Remove this note when the protocol incurs fewer round trips | ||
| 6857 | @c and when (guix derivations) no longer relies on file system access. | ||
| 6858 | @quotation Anmerkung | ||
| 6859 | Die Fähigkeit, sich mit entfernten Erstellungs-Daemons zu verbinden, sehen | ||
| 6860 | wir als experimentell an, Stand @value{VERSION}. Bitte diskutieren Sie mit | ||
| 6861 | uns jegliche Probleme oder Vorschläge, die Sie haben könnten (siehe | ||
| 6862 | @ref{Mitwirken}). | ||
| 6863 | @end quotation | ||
| 6864 | @end defvr | ||
| 6865 | |||
| 6866 | @deffn {Scheme-Prozedur} open-connection [@var{Uri}] [#:reserve-space? #t] | ||
| 6867 | Sich mit dem Daemon über den Unix-Socket an @var{Uri} verbinden (einer | ||
| 6868 | Zeichenkette). Wenn @var{reserve-space?} wahr ist, lässt ihn das etwas | ||
| 6869 | zusätzlichen Speicher im Dateisystem reservieren, damit der Müllsammler auch | ||
| 6870 | dann noch funktioniert, wenn die Platte zu voll wird. Liefert ein | ||
| 6871 | Server-Objekt. | ||
| 6872 | |||
| 6873 | @var{Uri} nimmt standardmäßig den Wert von @var{%default-socket-path} an, | ||
| 6874 | was dem bei der Installation mit dem Aufruf von @command{configure} | ||
| 6875 | ausgewählten Vorgabeort entspricht, gemäß den Befehlszeilenoptionen, mit | ||
| 6876 | denen @command{configure} aufgerufen wurde. | ||
| 6877 | @end deffn | ||
| 6878 | |||
| 6879 | @deffn {Scheme-Prozedur} close-connection @var{Server} | ||
| 6880 | Die Verbindung zum @var{Server} trennen. | ||
| 6881 | @end deffn | ||
| 6882 | |||
| 6883 | @defvr {Scheme-Variable} current-build-output-port | ||
| 6884 | Diese Variable ist an einen SRFI-39-Parameter gebunden, der auf den | ||
| 6885 | Scheme-Port verweist, an den vom Daemon empfangene Erstellungsprotokolle und | ||
| 6886 | Fehlerprotokolle geschrieben werden sollen. | ||
| 6887 | @end defvr | ||
| 6888 | |||
| 6889 | Prozeduren, die entfernte Prozeduraufrufe durchführen, nehmen immer ein | ||
| 6890 | Server-Objekt als ihr erstes Argument. | ||
| 6891 | |||
| 6892 | @deffn {Scheme-Prozedur} valid-path? @var{Server} @var{Pfad} | ||
| 6893 | @cindex ungültige Store-Objekte | ||
| 6894 | Liefert @code{#t}, wenn der @var{Pfad} ein gültiges Store-Objekt benennt, | ||
| 6895 | und sonst @code{#f} (ein ungültiges Objekt kann auf der Platte gespeichert | ||
| 6896 | sein, tatsächlich aber ungültig sein, zum Beispiel weil es das Ergebnis | ||
| 6897 | einer abgebrochenen oder fehlgeschlagenen Erstellung ist). | ||
| 6898 | |||
| 6899 | Ein @code{&store-protocol-error}-Fehlerzustand wird ausgelöst, wenn der | ||
| 6900 | @var{Pfad} nicht mit dem Store-Verzeichnis als Präfix beginnt | ||
| 6901 | (@file{/gnu/store}). | ||
| 6902 | @end deffn | ||
| 6903 | |||
| 6904 | @deffn {Scheme-Prozedur} add-text-to-store @var{Server} @var{Name} @var{Text} [@var{Referenzen}] | ||
| 6905 | Den @var{Text} im Store in einer Datei namens @var{Name} ablegen und ihren | ||
| 6906 | Store-Pfad zurückliefern. @var{Referenzen} ist die Liste der Store-Pfade, | ||
| 6907 | die der Store-Pfad dann referenzieren soll. | ||
| 6908 | @end deffn | ||
| 6909 | |||
| 6910 | @deffn {Scheme-Prozedur} build-derivations @var{Server} @var{Ableitungen} | ||
| 6911 | Die @var{Ableitungen} erstellen (eine Liste von @code{<derivation>}-Objekten | ||
| 6912 | oder von Pfaden zu Ableitungen) und terminieren, sobald der Worker-Prozess | ||
| 6913 | mit dem Erstellen fertig ist. Liefert @code{#t} bei erfolgreicher | ||
| 6914 | Erstellung. | ||
| 6915 | @end deffn | ||
| 6916 | |||
| 6917 | Es sei erwähnt, dass im Modul @code{(guix monads)} eine Monade sowie | ||
| 6918 | monadische Versionen obiger Prozeduren angeboten werden, damit an Code, der | ||
| 6919 | auf den Store zugreift, bequemer gearbeitet werden kann (siehe @ref{Die Store-Monade}). | ||
| 6920 | |||
| 6921 | @c FIXME | ||
| 6922 | @i{Dieser Abschnitt ist im Moment noch unvollständig.} | ||
| 6923 | |||
| 6924 | @node Ableitungen | ||
| 6925 | @section Ableitungen | ||
| 6926 | |||
| 6927 | @cindex Ableitungen | ||
| 6928 | Systemnahe Erstellungsaktionen sowie die Umgebung, in der selbige | ||
| 6929 | durchzuführen sind, werden durch @dfn{Ableitungen} dargestellt. Eine | ||
| 6930 | Ableitung enthält folgende Informationen: | ||
| 6931 | |||
| 6932 | @itemize | ||
| 6933 | @item | ||
| 6934 | Die Ausgaben, die die Ableitung hat. Ableitungen erzeugen mindestens eine | ||
| 6935 | Datei bzw. ein Verzeichnis im Store, können aber auch mehrere erzeugen. | ||
| 6936 | |||
| 6937 | @item | ||
| 6938 | @cindex Erstellungszeitabhängigkeiten | ||
| 6939 | @cindex Abhängigkeiten zur Erstellungszeit | ||
| 6940 | Die Eingaben der Ableitung, also Abhängigkeiten zur Zeit ihrer Erstellung, | ||
| 6941 | die entweder andere Ableitungen oder einfache Dateien im Store sind (wie | ||
| 6942 | Patches, Erstellungsskripts usw.). | ||
| 6943 | |||
| 6944 | @item | ||
| 6945 | Das System, wofür mit der Ableitung erstellt wird, also ihr Ziel — z.B.@: | ||
| 6946 | @code{x86_64-linux}. | ||
| 6947 | |||
| 6948 | @item | ||
| 6949 | Der Dateiname eines Erstellungsskripts im Store, zusammen mit den | ||
| 6950 | Argumenten, mit denen es aufgerufen werden soll. | ||
| 6951 | |||
| 6952 | @item | ||
| 6953 | Eine Liste zu definierender Umgebungsvariabler. | ||
| 6954 | |||
| 6955 | @end itemize | ||
| 6956 | |||
| 6957 | @cindex Ableitungspfad | ||
| 6958 | Ableitungen ermöglichen es den Clients des Daemons, diesem | ||
| 6959 | Erstellungsaktionen für den Store mitzuteilen. Es gibt davon zwei Arten, | ||
| 6960 | sowohl Darstellungen im Arbeitsspeicher jeweils für Client und Daemon, als | ||
| 6961 | auch Dateien im Store, deren Namen auf @code{.drv} enden — diese Dateien | ||
| 6962 | werden als @dfn{Ableitungspfade} bezeichnet. Ableitungspfade können an die | ||
| 6963 | Prozedur @code{build-derivations} übergeben werden, damit die darin | ||
| 6964 | niedergeschriebenen Erstellungsaktionen durchgeführt werden (siehe @ref{Der Store}). | ||
| 6965 | |||
| 6966 | @cindex Ableitungen mit fester Ausgabe | ||
| 6967 | Operationen wie das Herunterladen von Dateien und Checkouts von unter | ||
| 6968 | Versionskontrolle stehenden Quelldateien, bei denen der Hash des Inhalts im | ||
| 6969 | Voraus bekannt ist, werden als @dfn{Ableitungen mit fester Ausgabe} | ||
| 6970 | modelliert. Anders als reguläre Ableitungen sind die Ausgaben von | ||
| 6971 | Ableitungen mit fester Ausgabe unabhängig von ihren Eingaben — z.B.@: | ||
| 6972 | liefert das Herunterladen desselben Quellcodes dasselbe Ergebnis unabhängig | ||
| 6973 | davon, mit welcher Methode und welchen Werkzeugen er heruntergeladen wurde. | ||
| 6974 | |||
| 6975 | @cindex references | ||
| 6976 | @cindex Laufzeitabhängigkeiten | ||
| 6977 | @cindex Abhängigkeiten, zur Laufzeit | ||
| 6978 | Den Ausgaben von Ableitungen — d.h.@: Erstellungergebnissen — ist eine Liste | ||
| 6979 | von @dfn{Referenzen} zugeordnet, die auch der entfernte Prozeduraufruf | ||
| 6980 | @code{references} oder der Befehl @command{guix gc --references} liefert | ||
| 6981 | (siehe @ref{Aufruf von guix gc}). Referenzen sind die Menge der | ||
| 6982 | Laufzeitabhängigkeiten von Erstellungsergebnissen. Referenzen sind eine | ||
| 6983 | Teilmenge der Eingaben von Ableitungen; die Teilmenge wird automatisch | ||
| 6984 | ermittelt, indem der Erstellungsdaemon alle Dateien unter den Ausgaben nach | ||
| 6985 | Referenzen durchsucht. | ||
| 6986 | |||
| 6987 | Das Modul @code{(guix derivations)} stellt eine Repräsentation von | ||
| 6988 | Ableitungen als Scheme-Objekte zur Verfügung, zusammen mit Prozeduren, um | ||
| 6989 | Ableitungen zu erzeugen und zu manipulieren. Die am wenigsten abstrahierte | ||
| 6990 | Methode, eine Ableitung zu erzeugen, ist mit der Prozedur @code{derivation}: | ||
| 6991 | |||
| 6992 | @deffn {Scheme-Prozedur} derivation @var{Store} @var{Name} @var{Ersteller} @ | ||
| 6993 | @var{Argumente} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ | ||
| 6994 | [#:recursive? #f] [#:inputs '()] [#:env-vars '()] @ [#:system | ||
| 6995 | (%current-system)] [#:references-graphs #f] @ [#:allowed-references #f] | ||
| 6996 | [#:disallowed-references #f] @ [#:leaked-env-vars #f] [#:local-build? #f] @ | ||
| 6997 | [#:substitutable? #t] [#:properties '()] Eine Ableitungen mit den | ||
| 6998 | @var{Argumente}n erstellen und das resultierende @code{<derivation>}-Objekt | ||
| 6999 | liefern. | ||
| 7000 | |||
| 7001 | Wurden @var{hash} und @var{hash-algo} angegeben, wird eine @dfn{Ableitung | ||
| 7002 | mit fester Ausgabe} erzeugt — d.h.@: eine, deren Ausgabe schon im Voraus | ||
| 7003 | bekannt ist, wie z.B.@: beim Herunterladen einer Datei. Wenn des Weiteren | ||
| 7004 | auch @var{recursive?} wahr ist, darf die Ableitung mit fester Ausgabe eine | ||
| 7005 | ausführbare Datei oder ein Verzeichnis sein und @var{hash} muss die | ||
| 7006 | Prüfsumme eines Archivs mit dieser Ausgabe sein. | ||
| 7007 | |||
| 7008 | Ist @var{references-graphs} wahr, dann muss es eine Liste von Paaren aus je | ||
| 7009 | einem Dateinamen und einem Store-Pfad sein. In diesem Fall wird der | ||
| 7010 | Referenzengraph jedes Store-Pfads in einer Datei mit dem angegebenen Namen | ||
| 7011 | in der Erstellungsumgebung zugänglich gemacht, in einem einfachen | ||
| 7012 | Text-Format. | ||
| 7013 | |||
| 7014 | Ist @var{allowed-references} ein wahr, muss es eine Liste von Store-Objekten | ||
| 7015 | oder Ausgaben sein, die die Ausgabe der Ableitung referenzieren darf. Ebenso | ||
| 7016 | muss @var{disallowed-references}, wenn es auf wahr gesetzt ist, eine Liste | ||
| 7017 | von Dingen bezeichnen, die die Ausgaben @emph{nicht} referenzieren dürfen. | ||
| 7018 | |||
| 7019 | Ist @var{leaked-env-vars} wahr, muss es eine Liste von Zeichenketten sein, | ||
| 7020 | die Umgebungsvariable benennen, die aus der Umgebung des Daemons in die | ||
| 7021 | Erstellungsumgebung überlaufen — ein »Leck«, englisch »leak«. Dies kann nur | ||
| 7022 | in Ableitungen mit fester Ausgabe benutzt werden, also wenn @var{hash} wahr | ||
| 7023 | ist. So ein Leck kann zum Beispiel benutzt werden, um Variable wie | ||
| 7024 | @code{http_proxy} an Ableitungen zu übergeben, die darüber Dateien | ||
| 7025 | herunterladen. | ||
| 7026 | |||
| 7027 | Ist @var{local-build?} wahr, wird die Ableitung als schlechter Kandidat für | ||
| 7028 | das Auslagern deklariert, der besser lokal erstellt werden sollte (siehe | ||
| 7029 | @ref{Auslagern des Daemons einrichten}). Dies betrifft kleine Ableitungen, wo das | ||
| 7030 | Übertragen der Daten aufwendiger als ihre Erstellung ist. | ||
| 7031 | |||
| 7032 | Ist @var{substitutable?} falsch, wird deklariert, dass für die Ausgabe der | ||
| 7033 | Ableitung keine Substitute benutzt werden sollen (siehe | ||
| 7034 | @ref{Substitute}). Das ist nützlich, wenn Pakete erstellt werden, die | ||
| 7035 | Details über den Prozessorbefehlssatz des Wirtssystems auslesen. | ||
| 7036 | |||
| 7037 | @var{properties} muss eine assoziative Liste enthalten, die »Eigenschaften« | ||
| 7038 | der Ableitungen beschreibt. Sie wird genau so, wie sie ist, in der Ableitung | ||
| 7039 | gespeichert. | ||
| 7040 | @end deffn | ||
| 7041 | |||
| 7042 | @noindent | ||
| 7043 | Hier ist ein Beispiel mit einem Shell-Skript, das als Ersteller benutzt | ||
| 7044 | wird. Es wird angenommen, dass @var{Store} eine offene Verbindung zum Daemon | ||
| 7045 | ist und @var{bash} auf eine ausführbare Bash im Store verweist: | ||
| 7046 | |||
| 7047 | @lisp | ||
| 7048 | (use-modules (guix utils) | ||
| 7049 | (guix store) | ||
| 7050 | (guix derivations)) | ||
| 7051 | |||
| 7052 | (let ((builder ; das Ersteller-Bash-Skript in den Store einfügen | ||
| 7053 | (add-text-to-store store "my-builder.sh" | ||
| 7054 | "echo Hallo Welt > $out\n" '()))) | ||
| 7055 | (derivation store "foo" | ||
| 7056 | bash `("-e" ,builder) | ||
| 7057 | #:inputs `((,bash) (,builder)) | ||
| 7058 | #:env-vars '(("HOME" . "/homeless")))) | ||
| 7059 | @result{} #<derivation /gnu/store/@dots{}-foo.drv => /gnu/store/@dots{}-foo> | ||
| 7060 | @end lisp | ||
| 7061 | |||
| 7062 | Wie man sehen kann, ist es umständlich, diese grundlegende Methode direkt zu | ||
| 7063 | benutzen. Natürlich ist es besser, Erstellungsskripts in Scheme zu | ||
| 7064 | schreiben! Am besten schreibt man den Erstellungscode als »G-Ausdruck« und | ||
| 7065 | übergibt ihn an @code{gexp->derivation}. Mehr Informationen finden Sie im | ||
| 7066 | Abschnitt @ref{G-Ausdrücke}. | ||
| 7067 | |||
| 7068 | Doch es gab einmal eine Zeit, zu der @code{gexp->derivation} noch nicht | ||
| 7069 | existiert hatte und wo das Zusammenstellen von Ableitungen mit | ||
| 7070 | Scheme-Erstellungscode noch mit @code{build-expression->derivation} | ||
| 7071 | bewerkstelligt wurde, was im Folgenden beschrieben wird. Diese Prozedur gilt | ||
| 7072 | als veraltet und man sollte nunmehr die viel schönere Prozedur | ||
| 7073 | @code{gexp->derivation} benutzen. | ||
| 7074 | |||
| 7075 | @deffn {Scheme-Prozedur} build-expression->derivation @var{Store} @ | ||
| 7076 | @var{Name} @var{Ausdruck} @ [#:system (%current-system)] [#:inputs '()] @ | ||
| 7077 | [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ [#:recursive? #f] | ||
| 7078 | [#:env-vars '()] [#:modules '()] @ [#:references-graphs #f] | ||
| 7079 | [#:allowed-references #f] @ [#:disallowed-references #f] @ [#:local-build? | ||
| 7080 | #f] [#:substitutable? #t] [#:guile-for-build #f] Liefert eine Ableitung, die | ||
| 7081 | den Scheme-Ausdruck @var{Ausdruck} als Ersteller einer Ableitung namens | ||
| 7082 | @var{Name} ausführt. @var{inputs} muss die Liste der Eingaben enthalten, | ||
| 7083 | jeweils als Tupel @code{(Name Ableitungspfad Unterableitung)}; wird keine | ||
| 7084 | @var{Unterableitung} angegeben, wird @code{"out"} angenommen. @var{Module} | ||
| 7085 | ist eine Liste der Namen von Guile-Modulen im momentanen Suchpfad, die in | ||
| 7086 | den Store kopiert, kompiliert und zur Verfügung gestellt werden, wenn der | ||
| 7087 | @var{Ausdruck} ausgeführt wird — z.B.@: @code{((guix build utils) (guix | ||
| 7088 | build gnu-build-system))}. | ||
| 7089 | |||
| 7090 | Der @var{Ausdruck} wird in einer Umgebung ausgewertet, in der | ||
| 7091 | @code{%outputs} an eine Liste von Ausgabe-/Pfad-Paaren gebunden wurde und in | ||
| 7092 | der @code{%build-inputs} an eine Liste von Zeichenkette-/Ausgabepfad-Paaren | ||
| 7093 | gebunden wurde, die aus den @var{inputs}-Eingaben konstruiert worden | ||
| 7094 | ist. Optional kann in @var{env-vars} eine Liste von Paaren aus Zeichenketten | ||
| 7095 | stehen, die Name und Wert von für den Ersteller sichtbaren | ||
| 7096 | Umgebungsvariablen angeben. Der Ersteller terminiert, indem er @code{exit} | ||
| 7097 | mit dem Ergebnis des @var{Ausdruck}s aufruft; wenn also der @var{Ausdruck} | ||
| 7098 | den Wert @code{#f} liefert, wird angenommen, dass die Erstellung | ||
| 7099 | fehlgeschlagen ist. | ||
| 7100 | |||
| 7101 | @var{Ausdruck} wird mit einer Ableitung @var{guile-for-build} erstellt. Wird | ||
| 7102 | kein @var{guile-for-build} angegeben oder steht es auf @code{#f}, wird | ||
| 7103 | stattdessen der Wert der Fluiden @code{%guile-for-build} benutzt. | ||
| 7104 | |||
| 7105 | Siehe die Erklärungen zur Prozedur @code{derivation} für die Bedeutung von | ||
| 7106 | @var{references-graphs}, @var{allowed-references}, | ||
| 7107 | @var{disallowed-references}, @var{local-build?} und @var{substitutable?}. | ||
| 7108 | @end deffn | ||
| 7109 | |||
| 7110 | @noindent | ||
| 7111 | Hier ist ein Beispiel einer Ableitung mit nur einer Ausgabe, die ein | ||
| 7112 | Verzeichnis erzeugt, in dem eine einzelne Datei enthalten ist: | ||
| 7113 | |||
| 7114 | @lisp | ||
| 7115 | (let ((builder '(let ((out (assoc-ref %outputs "out"))) | ||
| 7116 | (mkdir out) ; das Verzeichnis | ||
| 7117 | ; /gnu/store/@dots{}-goo erstellen | ||
| 7118 | (call-with-output-file (string-append out "/test") | ||
| 7119 | (lambda (p) | ||
| 7120 | (display '(Hallo Guix) p)))))) | ||
| 7121 | (build-expression->derivation store "goo" builder)) | ||
| 7122 | |||
| 7123 | @result{} #<derivation /gnu/store/@dots{}-goo.drv => @dots{}> | ||
| 7124 | @end lisp | ||
| 7125 | |||
| 7126 | |||
| 7127 | @node Die Store-Monade | ||
| 7128 | @section Die Store-Monade | ||
| 7129 | |||
| 7130 | @cindex Monade | ||
| 7131 | |||
| 7132 | Die auf dem Store arbeitenden Prozeduren, die in den vorigen Abschnitten | ||
| 7133 | beschrieben wurden, nehmen alle eine offene Verbindung zum | ||
| 7134 | Erstellungs-Daemon als ihr erstes Argument entgegen. Obwohl das ihnen zu | ||
| 7135 | Grunde liegende Modell funktional ist, weisen sie doch alle Nebenwirkungen | ||
| 7136 | auf oder hängen vom momentanen Zustand des Stores ab. | ||
| 7137 | |||
| 7138 | Ersteres ist umständlich, weil die Verbindung zum Erstellungs-Daemon | ||
| 7139 | zwischen all diesen Funktionen durchgereicht werden muss, so dass eine | ||
| 7140 | Komposition mit Funktionen ohne diesen Parameter unmöglich wird. Letzteres | ||
| 7141 | kann problematisch sein, weil Operationen auf dem Store Nebenwirkungen | ||
| 7142 | und/oder Abhängigkeiten von externem Zustand haben und ihre | ||
| 7143 | Ausführungsreihenfolge deswegen eine Rolle spielt. | ||
| 7144 | |||
| 7145 | @cindex monadische Werte | ||
| 7146 | @cindex monadische Funktionen | ||
| 7147 | Hier kommt das Modul @code{(guix monads)} ins Spiel. Im Rahmen dieses Moduls | ||
| 7148 | können @dfn{Monaden} benutzt werden und dazu gehört insbesondere eine für | ||
| 7149 | unsere Zwecke sehr nützliche Monade, die @dfn{Store-Monade}. Monaden sind | ||
| 7150 | ein Konstrukt, mit dem zwei Dinge möglich sind: eine Assoziation von Werten | ||
| 7151 | mit einem »Kontext« (in unserem Fall ist das die Verbindung zum Store) und | ||
| 7152 | das Festlegen einer Reihenfolge für Berechnungen (hiermit sind auch Zugriffe | ||
| 7153 | auf den Store gemeint). Werte in einer Monade — solche, die mit weiterem | ||
| 7154 | Kontext assoziiert sind — werden @dfn{monadische Werte} genannt; Prozeduren, | ||
| 7155 | die solche Werte liefern, heißen @dfn{monadische Prozeduren}. | ||
| 7156 | |||
| 7157 | Betrachten Sie folgende »normale« Prozedur: | ||
| 7158 | |||
| 7159 | @example | ||
| 7160 | (define (sh-symlink store) | ||
| 7161 | ;; Eine Ableitung liefern, die mit der ausführbaren Datei »bash« | ||
| 7162 | ;; symbolisch verknüpft. | ||
| 7163 | (let* ((drv (package-derivation store bash)) | ||
| 7164 | (out (derivation->output-path drv)) | ||
| 7165 | (sh (string-append out "/bin/bash"))) | ||
| 7166 | (build-expression->derivation store "sh" | ||
| 7167 | `(symlink ,sh %output)))) | ||
| 7168 | @end example | ||
| 7169 | |||
| 7170 | Unter Verwendung von @code{(guix monads)} und @code{(guix gexp)} lässt sie | ||
| 7171 | sich als monadische Funktion aufschreiben: | ||
| 7172 | |||
| 7173 | @example | ||
| 7174 | (define (sh-symlink) | ||
| 7175 | ;; Ebenso, liefert aber einen monadischen Wert. | ||
| 7176 | (mlet %store-monad ((drv (package->derivation bash))) | ||
| 7177 | (gexp->derivation "sh" | ||
| 7178 | #~(symlink (string-append #$drv "/bin/bash") | ||
| 7179 | #$output)))) | ||
| 7180 | @end example | ||
| 7181 | |||
| 7182 | An der zweiten Version lassen sich mehrere Dinge beobachten: Der Parameter | ||
| 7183 | @code{Store} ist jetzt implizit geworden und wurde in die Aufrufe der | ||
| 7184 | monadischen Prozeduren @code{package->derivation} und | ||
| 7185 | @code{gexp->derivation} »eingefädelt« und der von @code{package->derivation} | ||
| 7186 | gelieferte monadische Wert wurde mit @code{mlet} statt einem einfachen | ||
| 7187 | @code{let} @dfn{gebunden}. | ||
| 7188 | |||
| 7189 | Wie sich herausstellt, muss man den Aufruf von @code{package->derivation} | ||
| 7190 | nicht einmal aufschreiben, weil er implizit geschieht, wie wir später sehen | ||
| 7191 | werden (siehe @ref{G-Ausdrücke}): | ||
| 7192 | |||
| 7193 | @example | ||
| 7194 | (define (sh-symlink) | ||
| 7195 | (gexp->derivation "sh" | ||
| 7196 | #~(symlink (string-append #$bash "/bin/bash") | ||
| 7197 | #$output))) | ||
| 7198 | @end example | ||
| 7199 | |||
| 7200 | @c See | ||
| 7201 | @c <https://syntaxexclamation.wordpress.com/2014/06/26/escaping-continuations/> | ||
| 7202 | @c for the funny quote. | ||
| 7203 | Die monadische @code{sh-symlink} einfach aufzurufen, bewirkt nichts. Wie | ||
| 7204 | jemand einst sagte: »Mit einer Monade geht man um, wie mit Gefangenen, gegen | ||
| 7205 | die man keine Beweise hat: Man muss sie laufen lassen.« Um also aus der | ||
| 7206 | Monade auszubrechen und die gewünschte Wirkung zu erzielen, muss man | ||
| 7207 | @code{run-with-store} benutzen: | ||
| 7208 | |||
| 7209 | @example | ||
| 7210 | (run-with-store (open-connection) (sh-symlink)) | ||
| 7211 | @result{} /gnu/store/...-sh-symlink | ||
| 7212 | @end example | ||
| 7213 | |||
| 7214 | Erwähnenswert ist, dass das Modul @code{(guix monad-repl)} die REPL von | ||
| 7215 | Guile um neue »Meta-Befehle« erweitert, mit denen es leichter ist, mit | ||
| 7216 | monadischen Prozeduren umzugehen: @code{run-in-store} und | ||
| 7217 | @code{enter-store-monad}. Mit Ersterer wird ein einzelner monadischer Wert | ||
| 7218 | durch den Store »laufen gelassen«: | ||
| 7219 | |||
| 7220 | @example | ||
| 7221 | scheme@@(guile-user)> ,run-in-store (package->derivation hello) | ||
| 7222 | $1 = #<derivation /gnu/store/@dots{}-hello-2.9.drv => @dots{}> | ||
| 7223 | @end example | ||
| 7224 | |||
| 7225 | Mit Letzterer wird rekursiv eine weitere REPL betreten, in der alle | ||
| 7226 | Rückgabewerte automatisch durch den Store laufen gelassen werden: | ||
| 7227 | |||
| 7228 | @example | ||
| 7229 | scheme@@(guile-user)> ,enter-store-monad | ||
| 7230 | store-monad@@(guile-user) [1]> (package->derivation hello) | ||
| 7231 | $2 = #<derivation /gnu/store/@dots{}-hello-2.9.drv => @dots{}> | ||
| 7232 | store-monad@@(guile-user) [1]> (text-file "foo" "Hallo!") | ||
| 7233 | $3 = "/gnu/store/@dots{}-foo" | ||
| 7234 | store-monad@@(guile-user) [1]> ,q | ||
| 7235 | scheme@@(guile-user)> | ||
| 7236 | @end example | ||
| 7237 | |||
| 7238 | @noindent | ||
| 7239 | Beachten Sie, dass in einer @code{store-monad}-REPL keine nicht-monadischen | ||
| 7240 | Werte zurückgeliefert werden können. | ||
| 7241 | |||
| 7242 | Die wichtigsten syntaktischen Formen, um mit Monaden im Allgemeinen | ||
| 7243 | umzugehen, werden im Modul @code{(guix monads)} bereitgestellt und sind im | ||
| 7244 | Folgenden beschrieben. | ||
| 7245 | |||
| 7246 | @deffn {Scheme-Syntax} with-monad @var{Monade} @var{Rumpf} ... | ||
| 7247 | Alle @code{>>=}- oder @code{return}-Formen im @var{Rumpf} in der | ||
| 7248 | @var{Monade} auswerten. | ||
| 7249 | @end deffn | ||
| 7250 | |||
| 7251 | @deffn {Scheme-Syntax} return @var{Wert} | ||
| 7252 | Einen monadischen Wert liefern, der den übergebenen @var{Wert} kapselt. | ||
| 7253 | @end deffn | ||
| 7254 | |||
| 7255 | @deffn {Scheme-Syntax} >>= @var{mWert} @var{mProz} ... | ||
| 7256 | Den monadischen Wert @var{mWert} @dfn{binden}, wobei sein »Inhalt« an die | ||
| 7257 | monadischen Prozeduren @var{mProz}@dots{} übergeben wird@footnote{Diese | ||
| 7258 | Operation wird gemeinhin »bind« genannt, aber mit diesem Begriff wird in | ||
| 7259 | Guile eine völlig andere Prozedur bezeichnet, die nichts damit zu tun | ||
| 7260 | hat. Also benutzen wir dieses etwas kryptische Symbol als Erbe der | ||
| 7261 | Haskell-Programmiersprache.}. Es kann eine einzelne @var{mProz} oder mehrere | ||
| 7262 | davon geben, wie in diesem Beispiel: | ||
| 7263 | |||
| 7264 | @example | ||
| 7265 | (run-with-state | ||
| 7266 | (with-monad %state-monad | ||
| 7267 | (>>= (return 1) | ||
| 7268 | (lambda (x) (return (+ 1 x))) | ||
| 7269 | (lambda (x) (return (* 2 x))))) | ||
| 7270 | 'irgendein-Zustand) | ||
| 7271 | |||
| 7272 | @result{} 4 | ||
| 7273 | @result{} irgendein-Zustand | ||
| 7274 | @end example | ||
| 7275 | @end deffn | ||
| 7276 | |||
| 7277 | @deffn {Scheme-Syntax} mlet @var{Monade} ((@var{Variable} @var{mWert}) ...) @ | ||
| 7278 | @var{Rumpf} ... | ||
| 7279 | @deffnx {Scheme-Syntax} mlet* @var{Monade} ((@var{Variable} @var{mWert}) ...) @ | ||
| 7280 | @var{Rumpf} ... Die @var{Variable}n an die monadischen Werte @var{mWert} im | ||
| 7281 | @var{Rumpf} binden, der eine Folge von Ausdrücken ist. Wie beim | ||
| 7282 | bind-Operator kann man es sich vorstellen als »Auspacken« des rohen, | ||
| 7283 | nicht-monadischen Werts, der im @var{mWert} steckt, wobei anschließend | ||
| 7284 | dieser rohe, nicht-monadische Wert im Sichtbarkeitsbereich des @var{Rumpf}s | ||
| 7285 | von der @var{Variable}n bezeichnet wird. Die Form (@var{Variable} -> | ||
| 7286 | @var{Wert}) bindet die @var{Variable} an den »normalen« @var{Wert}, wie es | ||
| 7287 | @code{let} tun würde. Die Bindungsoperation geschieht in der Reihenfolge von | ||
| 7288 | links nach rechts. Der letzte Ausdruck des @var{Rumpfs} muss ein monadischer | ||
| 7289 | Ausdruck sein und dessen Ergebnis wird das Ergebnis von @code{mlet} oder | ||
| 7290 | @code{mlet*} werden, wenn es durch die @var{Monad} laufen gelassen wurde. | ||
| 7291 | |||
| 7292 | @code{mlet*} verhält sich gegenüber @code{mlet} wie @code{let*} gegenüber | ||
| 7293 | @code{let} (siehe @ref{Local Bindings,,, guile, GNU Guile Reference | ||
| 7294 | Manual}). | ||
| 7295 | @end deffn | ||
| 7296 | |||
| 7297 | @deffn {Scheme-System} mbegin @var{Monade} @var{mAusdruck} ... | ||
| 7298 | Der Reihe nach den @var{mAusdruck} und die nachfolgenden monadischen | ||
| 7299 | Ausdrücke binden und als Ergebnis das des letzten Ausdrucks liefern. Jeder | ||
| 7300 | Ausdruck in der Abfolge muss ein monadischer Ausdruck sein. | ||
| 7301 | |||
| 7302 | Dies verhält sich ähnlich wie @code{mlet}, außer dass die Rückgabewerte der | ||
| 7303 | monadischen Prozeduren ignoriert werden. In diesem Sinn verhält es sich | ||
| 7304 | analog zu @code{begin}, nur auf monadischen Ausdrücken. | ||
| 7305 | @end deffn | ||
| 7306 | |||
| 7307 | @deffn {Scheme-System} mwhen @var{Bedingung} @var{mAusdr0} @var{mAusdr*} ... | ||
| 7308 | Wenn die @var{Bedingung} wahr ist, wird die Folge monadischer Ausdrücke | ||
| 7309 | @var{mAusdr0}..@var{mAusdr*} wie bei @code{mbegin} ausgewertet. Wenn die | ||
| 7310 | @var{Bedingung} falsch ist, wird @code{*unspecified*} in der momentanen | ||
| 7311 | Monade zurückgeliefert. Jeder Ausdruck in der Folge muss ein monadischer | ||
| 7312 | Ausdruck sein. | ||
| 7313 | @end deffn | ||
| 7314 | |||
| 7315 | @deffn {Scheme-System} munless @var{Bedingung} @var{mAusdr0} @var{mAusdr*} ... | ||
| 7316 | Wenn die @var{Bedingung} falsch ist, wird die Folge monadischer Ausdrücke | ||
| 7317 | @var{mAusdr0}..@var{mAusdr*} wie bei @code{mbegin} ausgewertet. Wenn die | ||
| 7318 | @var{Bedingung} wahr ist, wird @code{*unspecified*} in der momentanen Monade | ||
| 7319 | zurückgeliefert. Jeder Ausdruck in der Folge muss ein monadischer Ausdruck | ||
| 7320 | sein. | ||
| 7321 | @end deffn | ||
| 7322 | |||
| 7323 | @cindex Zustandsmonade | ||
| 7324 | Das Modul @code{(guix monads)} macht die @dfn{Zustandsmonade} (englisch | ||
| 7325 | »state monad«) verfügbar, mit der ein zusätzlicher Wert — der Zustand — | ||
| 7326 | durch die monadischen Prozeduraufrufe @emph{gefädelt} werden kann. | ||
| 7327 | |||
| 7328 | @defvr {Scheme-Variable} %state-monad | ||
| 7329 | Die Zustandsmonade. Prozeduren in der Zustandsmonade können auf den | ||
| 7330 | gefädelten Zustand zugreifen und ihn verändern. | ||
| 7331 | |||
| 7332 | Betrachten Sie das folgende Beispiel. Die Prozedur @code{Quadrat} liefert | ||
| 7333 | einen Wert in der Zustandsmonade zurück. Sie liefert das Quadrat ihres | ||
| 7334 | Arguments, aber sie inkrementiert auch den momentanen Zustandswert: | ||
| 7335 | |||
| 7336 | @example | ||
| 7337 | (define (Quadrat x) | ||
| 7338 | (mlet %state-monad ((Anzahl (current-state))) | ||
| 7339 | (mbegin %state-monad | ||
| 7340 | (set-current-state (+ 1 Anzahl)) | ||
| 7341 | (return (* x x))))) | ||
| 7342 | |||
| 7343 | (run-with-state (sequence %state-monad (map Quadrat (iota 3))) 0) | ||
| 7344 | @result{} (0 1 4) | ||
| 7345 | @result{} 3 | ||
| 7346 | @end example | ||
| 7347 | |||
| 7348 | Wird das »durch« die Zustandsmonade @var{%state-monad} laufen gelassen, | ||
| 7349 | erhalten wir jenen zusätzlichen Zustandswert, der der Anzahl der Aufrufe von | ||
| 7350 | @code{Quadrat} entspricht. | ||
| 7351 | @end defvr | ||
| 7352 | |||
| 7353 | @deffn {Monadische Prozedur} current-state | ||
| 7354 | Liefert den momentanen Zustand als einen monadischen Wert. | ||
| 7355 | @end deffn | ||
| 7356 | |||
| 7357 | @deffn {Monadische Prozedur} set-current-state @var{Wert} | ||
| 7358 | Setzt den momentanen Zustand auf @var{Wert} und liefert den vorherigen | ||
| 7359 | Zustand als einen monadischen Wert. | ||
| 7360 | @end deffn | ||
| 7361 | |||
| 7362 | @deffn {Monadische Prozedur} state-push @var{Wert} | ||
| 7363 | Hängt den @var{Wert} vorne an den momentanen Zustand an, der eine Liste sein | ||
| 7364 | muss. Liefert den vorherigen Zustand als monadischen Wert. | ||
| 7365 | @end deffn | ||
| 7366 | |||
| 7367 | @deffn {Monadische Prozedur} state-pop | ||
| 7368 | Entfernt einen Wert vorne vom momentanen Zustand und liefert ihn als | ||
| 7369 | monadischen Wert zurück. Dabei wird angenommen, dass es sich beim Zustand um | ||
| 7370 | eine Liste handelt. | ||
| 7371 | @end deffn | ||
| 7372 | |||
| 7373 | @deffn {Scheme-Prozedur} run-with-state @var{mWert} [@var{Zustand}] | ||
| 7374 | Den monadischen Wert @var{mWert} mit @var{Zustand} als initialem Zustand | ||
| 7375 | laufen lassen. Dies liefert zwei Werte: den Ergebniswert und den | ||
| 7376 | Ergebniszustand. | ||
| 7377 | @end deffn | ||
| 7378 | |||
| 7379 | Die zentrale Schnittstelle zur Store-Monade, wie sie vom Modul @code{(guix | ||
| 7380 | store)} angeboten wird, ist die Folgende: | ||
| 7381 | |||
| 7382 | @defvr {Scheme-Variable} %store-monad | ||
| 7383 | Die Store-Monade — ein anderer Name für @var{%state-monad}. | ||
| 7384 | |||
| 7385 | Werte in der Store-Monade kapseln Zugriffe auf den Store. Sobald seine | ||
| 7386 | Wirkung gebraucht wird, muss ein Wert der Store-Monade »ausgewertet« werden, | ||
| 7387 | indem er an die Prozedur @code{run-with-store} übergeben wird (siehe unten). | ||
| 7388 | @end defvr | ||
| 7389 | |||
| 7390 | @deffn {Scheme-Prozedur} run-with-store @var{Store} @var{mWert} [#:guile-for-build] [#:system (%current-system)] | ||
| 7391 | Den @var{mWert}, einen monadischen Wert in der Store-Monade, in der offenen | ||
| 7392 | Verbindung @var{Store} laufen lassen. | ||
| 7393 | @end deffn | ||
| 7394 | |||
| 7395 | @deffn {Monadische Prozedur} text-file @var{Name} @var{Text} [@var{Referenzen}] | ||
| 7396 | Als monadischen Wert den absoluten Dateinamen im Store für eine Datei | ||
| 7397 | liefern, deren Inhalt der der Zeichenkette @var{Text} ist. @var{Referenzen} | ||
| 7398 | ist dabei eine Liste von Store-Objekten, die die Ergebnis-Textdatei | ||
| 7399 | referenzieren wird; der Vorgabewert ist die leere Liste. | ||
| 7400 | @end deffn | ||
| 7401 | |||
| 7402 | @deffn {Monadische Prozedur} binary-file @var{Name} @var{Daten} [@var{Referenzen}] | ||
| 7403 | Den absoluten Dateinamen im Store als monadischen Wert für eine Datei | ||
| 7404 | liefern, deren Inhalt der des Byte-Vektors @var{Daten} ist. @var{Referenzen} | ||
| 7405 | ist dabei eine Liste von Store-Objekten, die die Ergebnis-Binärdatei | ||
| 7406 | referenzieren wird; der Vorgabewert ist die leere Liste. | ||
| 7407 | @end deffn | ||
| 7408 | |||
| 7409 | @deffn {Monadische Prozedur} interned-file @var{Datei} [@var{Name}] @ | ||
| 7410 | [#:recursive? #t] [#:select? (const #t)] Liefert den Namen der @var{Datei}, | ||
| 7411 | nachdem sie in den Store interniert wurde. Dabei wird der @var{Name} als ihr | ||
| 7412 | Store-Name verwendet, oder, wenn kein @var{Name} angegeben wurde, der | ||
| 7413 | Basisname der @var{Datei}. | ||
| 7414 | |||
| 7415 | Ist @var{recursive?} wahr, werden in der @var{Datei} enthaltene Dateien | ||
| 7416 | rekursiv hinzugefügt; ist die @var{Datei} eine flache Datei und | ||
| 7417 | @var{recursive?} ist wahr, wird ihr Inhalt in den Store eingelagert und ihre | ||
| 7418 | Berechtigungs-Bits übernommen. | ||
| 7419 | |||
| 7420 | Steht @var{recursive?} auf wahr, wird @code{(@var{select?} @var{Datei} | ||
| 7421 | @var{Stat})} für jeden Verzeichniseintrag aufgerufen, wobei @var{Datei} der | ||
| 7422 | absolute Dateiname und @var{Stat} das Ergebnis von @code{lstat} ist, außer | ||
| 7423 | auf den Einträgen, wo @var{select?} keinen wahren Wert liefert. | ||
| 7424 | |||
| 7425 | Folgendes Beispiel fügt eine Datei unter zwei verschiedenen Namen in den | ||
| 7426 | Store ein: | ||
| 7427 | |||
| 7428 | @example | ||
| 7429 | (run-with-store (open-connection) | ||
| 7430 | (mlet %store-monad ((a (interned-file "README")) | ||
| 7431 | (b (interned-file "README" "LEGU-MIN"))) | ||
| 7432 | (return (list a b)))) | ||
| 7433 | |||
| 7434 | @result{} ("/gnu/store/rwm@dots{}-README" "/gnu/store/44i@dots{}-LEGU-MIN") | ||
| 7435 | @end example | ||
| 7436 | |||
| 7437 | @end deffn | ||
| 7438 | |||
| 7439 | Das Modul @code{(guix packages)} exportiert die folgenden paketbezogenen | ||
| 7440 | monadischen Prozeduren: | ||
| 7441 | |||
| 7442 | @deffn {Monadische Prozedur} package-file @var{Paket} [@var{Datei}] @ | ||
| 7443 | [#:system (%current-system)] [#:target #f] @ [#:output "out"] Liefert als | ||
| 7444 | monadischen Wert den absoluten Dateinamen der @var{Datei} innerhalb des | ||
| 7445 | Ausgabeverzeichnisses @var{output} des @var{Paket}s. Wird keine @var{Datei} | ||
| 7446 | angegeben, wird der Name des Ausgabeverzeichnisses @var{output} für das | ||
| 7447 | @var{Paket} zurückgeliefert. Ist @var{target} wahr, wird sein Wert als das | ||
| 7448 | Zielsystem bezeichnendes Tripel zum Cross-Kompilieren benutzt. | ||
| 7449 | @end deffn | ||
| 7450 | |||
| 7451 | @deffn {Monadische Prozedur} package->derivation @var{Paket} [@var{System}] | ||
| 7452 | @deffnx {Monadische Prozedur} package->cross-derivation @var{Paket} @ | ||
| 7453 | @var{Ziel} [@var{System}] Monadische Version von @code{package-derivation} | ||
| 7454 | und @code{package-cross-derivation} (siehe @ref{Pakete definieren}). | ||
| 7455 | @end deffn | ||
| 7456 | |||
| 7457 | |||
| 7458 | @node G-Ausdrücke | ||
| 7459 | @section G-Ausdrücke | ||
| 7460 | |||
| 7461 | @cindex G-Ausdruck | ||
| 7462 | @cindex Erstellungscode maskieren | ||
| 7463 | Es gibt also »Ableitungen«, die eine Abfolge von Erstellungsaktionen | ||
| 7464 | repräsentieren, die durchgeführt werden müssen, um ein Objekt im Store zu | ||
| 7465 | erzeugen (siehe @ref{Ableitungen}). Diese Erstellungsaktionen werden | ||
| 7466 | durchgeführt, nachdem der Daemon gebeten wurde, die Ableitungen tatsächlich | ||
| 7467 | zu erstellen; dann führt der Daemon sie in einer isolierten Umgebung (einem | ||
| 7468 | sogenannten Container) aus (siehe @ref{Aufruf des guix-daemon}). | ||
| 7469 | |||
| 7470 | @cindex Schichten von Code | ||
| 7471 | Wenig überraschend ist, dass wir diese Erstellungsaktionen gerne in Scheme | ||
| 7472 | schreiben würden. Wenn wir das tun, bekommen wir zwei verschiedene | ||
| 7473 | @dfn{Schichten} von Scheme-Code@footnote{Der Begriff @dfn{Schicht}, englisch | ||
| 7474 | Stratum, wurde in diesem Kontext von Manuel Serrano et al.@: in ihrer Arbeit | ||
| 7475 | an Hop geprägt. Oleg Kiselyov, der aufschlussreiche | ||
| 7476 | @url{http://okmij.org/ftp/meta-programming/#meta-scheme, Essays und Code zu | ||
| 7477 | diesem Thema} geschrieben hat, nennt diese Art der Code-Generierung | ||
| 7478 | @dfn{Staging}, deutsch etwa Inszenierung bzw.@: Aufführung.}: den | ||
| 7479 | »wirtsseitigen Code« (»host code«) — also Code, der Pakete definiert, mit | ||
| 7480 | dem Daemon kommuniziert etc.@: — und den »erstellungsseitigen Code« (»build | ||
| 7481 | code«) — also Code, der die Erstellungsaktionen auch wirklich umsetzt, indem | ||
| 7482 | Dateien erstellt werden, @command{make} aufgerufen wird etc. | ||
| 7483 | |||
| 7484 | Um eine Ableitung und ihre Erstellungsaktionen zu beschreiben, muss man | ||
| 7485 | normalerweise erstellungsseitigen Code im wirtsseitigen Code einbetten. Das | ||
| 7486 | bedeutet, man behandelt den erstellungsseitigen Code als Daten, was wegen | ||
| 7487 | der Homoikonizität von Scheme — dass Code genauso als Daten repräsentiert | ||
| 7488 | werden kann — sehr praktisch ist. Doch brauchen wir hier mehr als nur den | ||
| 7489 | normalen Quasimaskierungsmechanismus mit @code{quasiquote} in Scheme, wenn | ||
| 7490 | wir Erstellungsausdrücke konstruieren möchten. | ||
| 7491 | |||
| 7492 | Das Modul @code{(guix gexp)} implementiert @dfn{G-Ausdrücke}, eine Form von | ||
| 7493 | S-Ausdrücken, die zu Erstellungsausdrücken angepasst wurden. G-Ausdrücke | ||
| 7494 | (englisch »G-expressions«, kurz @dfn{Gexps}) setzen sich grundlegend aus | ||
| 7495 | drei syntaktischen Formen zusammen: @code{gexp}, @code{ungexp} und | ||
| 7496 | @code{ungexp-splicing} (alternativ einfach: @code{#~}, @code{#$} und | ||
| 7497 | @code{#$@@}), die jeweils mit @code{quasiquote}, @code{unquote} und | ||
| 7498 | @code{unquote-splicing} vergleichbar sind (siehe @ref{Expression Syntax, | ||
| 7499 | @code{quasiquote},, guile, GNU Guile Reference Manual}). Es gibt aber auch | ||
| 7500 | erhebliche Unterschiede: | ||
| 7501 | |||
| 7502 | @itemize | ||
| 7503 | @item | ||
| 7504 | G-Ausdrücke sind dafür gedacht, in eine Datei geschrieben zu werden, wo sie | ||
| 7505 | von anderen Prozessen ausgeführt oder manipuliert werden können. | ||
| 7506 | |||
| 7507 | @item | ||
| 7508 | Wenn ein abstraktes Objekt wie ein Paket oder eine Ableitung innerhalb eines | ||
| 7509 | G-Ausdrücks demaskiert wird, ist das Ergebnis davon dasselbe, wie wenn | ||
| 7510 | dessen Ausgabedateiname genannt worden wäre. | ||
| 7511 | |||
| 7512 | @item | ||
| 7513 | G-Ausdrücke tragen Informationen über die Pakete oder Ableitungen mit sich, | ||
| 7514 | auf die sie sich beziehen, und diese Abhängigkeiten werden automatisch zu | ||
| 7515 | den sie benutzenden Erstellungsprozessen als Eingaben hinzugefügt. | ||
| 7516 | @end itemize | ||
| 7517 | |||
| 7518 | @cindex Herunterbrechen, von abstrakten Objekten in G-Ausdrücken | ||
| 7519 | Dieser Mechanismus ist nicht auf Pakete und Ableitung beschränkt: Es können | ||
| 7520 | @dfn{Compiler} definiert werden, die weitere abstrakte, hochsprachliche | ||
| 7521 | Objekte auf Ableitungen oder Dateien im Store »herunterbrechen«, womit diese | ||
| 7522 | Objekte dann auch in G-Ausdrücken eingefügt werden können. Zum Beispiel sind | ||
| 7523 | »dateiartige Objekte« ein nützlicher Typ solcher abstrakter Objekte. Mit | ||
| 7524 | ihnen können Dateien leicht in den Store eingefügt und von Ableitungen und | ||
| 7525 | anderem referenziert werden (siehe unten @code{local-file} und | ||
| 7526 | @code{plain-file}). | ||
| 7527 | |||
| 7528 | Zur Veranschaulichung dieser Idee soll uns dieses Beispiel eines G-Ausdrucks | ||
| 7529 | dienen: | ||
| 7530 | |||
| 7531 | @example | ||
| 7532 | (define build-exp | ||
| 7533 | #~(begin | ||
| 7534 | (mkdir #$output) | ||
| 7535 | (chdir #$output) | ||
| 7536 | (symlink (string-append #$coreutils "/bin/ls") | ||
| 7537 | "list-files"))) | ||
| 7538 | @end example | ||
| 7539 | |||
| 7540 | Indem wir diesen G-Ausdruck an @code{gexp->derivation} übergeben, bekommen | ||
| 7541 | wir eine Ableitung, die ein Verzeichnis mit genau einer symbolischen | ||
| 7542 | Verknüpfung auf @file{/gnu/store/@dots{}-coreutils-8.22/bin/ls} erstellt: | ||
| 7543 | |||
| 7544 | @example | ||
| 7545 | (gexp->derivation "das-ding" build-exp) | ||
| 7546 | @end example | ||
| 7547 | |||
| 7548 | Wie man es erwarten würde, wird die Zeichenkette | ||
| 7549 | @code{"/gnu/store/@dots{}-coreutils-8.22"} anstelle der Referenzen auf das | ||
| 7550 | Paket @var{coreutils} im eigentlichen Erstellungscode eingefügt und | ||
| 7551 | @var{coreutils} automatisch zu einer Eingabe der Ableitung gemacht. Genauso | ||
| 7552 | wird auch @code{#$output} (was äquivalent zur Schreibweise @code{(ungexp | ||
| 7553 | output)} ist) ersetzt durch eine Zeichenkette mit dem Namen der Ausgabe der | ||
| 7554 | Ableitung. | ||
| 7555 | |||
| 7556 | @cindex Cross-Kompilieren | ||
| 7557 | Im Kontext der Cross-Kompilierung bietet es sich an, zwischen Referenzen auf | ||
| 7558 | die @emph{native} Erstellung eines Pakets — also der, die auf dem | ||
| 7559 | Wirtssystem ausgeführt werden kann — und Referenzen auf Cross-Erstellungen | ||
| 7560 | eines Pakets zu unterscheiden. Hierfür spielt @code{#+} dieselbe Rolle wie | ||
| 7561 | @code{#$}, steht aber für eine Referenz auf eine native Paketerstellung. | ||
| 7562 | |||
| 7563 | @example | ||
| 7564 | (gexp->derivation "vi" | ||
| 7565 | #~(begin | ||
| 7566 | (mkdir #$output) | ||
| 7567 | (system* (string-append #+coreutils "/bin/ln") | ||
| 7568 | "-s" | ||
| 7569 | (string-append #$emacs "/bin/emacs") | ||
| 7570 | (string-append #$output "/bin/vi"))) | ||
| 7571 | #:target "mips64el-linux-gnu") | ||
| 7572 | @end example | ||
| 7573 | |||
| 7574 | @noindent | ||
| 7575 | Im obigen Beispiel wird die native Erstellung der @var{coreutils} benutzt, | ||
| 7576 | damit @command{ln} tatsächlich auf dem Wirtssystem ausgeführt werden kann, | ||
| 7577 | aber danach die cross-kompilierte Erstellung von @var{emacs} referenziert. | ||
| 7578 | |||
| 7579 | @cindex importierte Module, in G-Ausdrücken | ||
| 7580 | @findex with-imported-modules | ||
| 7581 | Eine weitere Funktionalität von G-Ausdrücken stellen @dfn{importierte | ||
| 7582 | Module} dar. Manchmal will man bestimmte Guile-Module von der »wirtsseitigen | ||
| 7583 | Umgebung« im G-Ausdruck benutzen können, deswegen sollten diese Module in | ||
| 7584 | die »erstellungsseitige Umgebung« importiert werden. Die | ||
| 7585 | @code{with-imported-modules}-Form macht das möglich: | ||
| 7586 | |||
| 7587 | @example | ||
| 7588 | (let ((build (with-imported-modules '((guix build utils)) | ||
| 7589 | #~(begin | ||
| 7590 | (use-modules (guix build utils)) | ||
| 7591 | (mkdir-p (string-append #$output "/bin")))))) | ||
| 7592 | (gexp->derivation "leeres-Verzeichnis" | ||
| 7593 | #~(begin | ||
| 7594 | #$build | ||
| 7595 | (display "Erfolg!\n") | ||
| 7596 | #t))) | ||
| 7597 | @end example | ||
| 7598 | |||
| 7599 | @noindent | ||
| 7600 | In diesem Beispiel wird das Modul @code{(guix build utils)} automatisch in | ||
| 7601 | die isolierte Erstellungsumgebung unseres G-Ausdrucks geholt, so dass | ||
| 7602 | @code{(use-modules (guix build utils))} wie erwartet funktioniert. | ||
| 7603 | |||
| 7604 | @cindex Modulabschluss | ||
| 7605 | @findex source-module-closure | ||
| 7606 | Normalerweise möchten Sie, dass der @emph{Abschluss} eines Moduls importiert | ||
| 7607 | wird — also das Modul und alle Module, von denen es abhängt — statt nur das | ||
| 7608 | Modul selbst. Ansonsten scheitern Versuche, das Modul zu benutzen, weil | ||
| 7609 | seine Modulabhängigkeiten fehlen. Die Prozedur @code{source-module-closure} | ||
| 7610 | berechnet den Abschluss eines Moduls, indem es den Kopf seiner Quelldatei | ||
| 7611 | analysiert, deswegen schafft die Prozedur hier Abhilfe: | ||
| 7612 | |||
| 7613 | @example | ||
| 7614 | (use-modules (guix modules)) ;»source-module-closure« verfügbar machen | ||
| 7615 | |||
| 7616 | (with-imported-modules (source-module-closure | ||
| 7617 | '((guix build utils) | ||
| 7618 | (gnu build vm))) | ||
| 7619 | (gexp->derivation "etwas-mit-vms" | ||
| 7620 | #~(begin | ||
| 7621 | (use-modules (guix build utils) | ||
| 7622 | (gnu build vm)) | ||
| 7623 | @dots{}))) | ||
| 7624 | @end example | ||
| 7625 | |||
| 7626 | @cindex Erweiterungen, für G-Ausdrücke | ||
| 7627 | @findex with-extensions | ||
| 7628 | Auf die gleiche Art können Sie auch vorgehen, wenn Sie nicht bloß reine | ||
| 7629 | Scheme-Module importieren möchten, sondern auch »Erweiterungen« wie | ||
| 7630 | Guile-Anbindungen von C-Bibliotheken oder andere »vollumfängliche« | ||
| 7631 | Pakete. Sagen wir, Sie bräuchten das Paket @code{guile-json} auf der | ||
| 7632 | Erstellungsseite, dann könnten Sie es hiermit bekommen: | ||
| 7633 | |||
| 7634 | @example | ||
| 7635 | (use-modules (gnu packages guile)) ;für »guile-json« | ||
| 7636 | |||
| 7637 | (with-extensions (list guile-json) | ||
| 7638 | (gexp->derivation "etwas-mit-json" | ||
| 7639 | #~(begin | ||
| 7640 | (use-modules (json)) | ||
| 7641 | @dots{}))) | ||
| 7642 | @end example | ||
| 7643 | |||
| 7644 | Die syntaktische Form, in der G-Ausdrücke konstruiert werden, ist im | ||
| 7645 | Folgenden zusammengefasst. | ||
| 7646 | |||
| 7647 | @deffn {Scheme-Syntax} #~@var{Ausdruck} | ||
| 7648 | @deffnx {Scheme-Syntax} (gexp @var{Ausdruck}) | ||
| 7649 | Liefert einen G-Ausdruck, der den @var{Ausdruck} enthält. Der @var{Ausdruck} | ||
| 7650 | kann eine oder mehrere der folgenden Formen enthalten: | ||
| 7651 | |||
| 7652 | @table @code | ||
| 7653 | @item #$@var{Objekt} | ||
| 7654 | @itemx (ungexp @var{Objekt}) | ||
| 7655 | Eine Referenz auf das @var{Objekt} einführen. Das @var{Objekt} kann einen | ||
| 7656 | der unterstützten Typen haben, zum Beispiel ein Paket oder eine Ableitung, | ||
| 7657 | so dass die @code{ungexp}-Form durch deren Ausgabedateiname ersetzt wird — | ||
| 7658 | z.B.@: @code{"/gnu/store/@dots{}-coreutils-8.22}. | ||
| 7659 | |||
| 7660 | Wenn das @var{Objekt} eine Liste ist, wird diese durchlaufen und alle | ||
| 7661 | unterstützten Objekte darin auf diese Weise ersetzt. | ||
| 7662 | |||
| 7663 | Wenn das @var{Objekt} ein anderer G-Ausdruck ist, wird sein Inhalt eingefügt | ||
| 7664 | und seine Abhängigkeiten zu denen des äußeren G-Ausdrucks hinzugefügt. | ||
| 7665 | |||
| 7666 | Wenn das @var{Objekt} eine andere Art von Objekt ist, wird es so wie es ist | ||
| 7667 | eingefügt. | ||
| 7668 | |||
| 7669 | @item #$@var{Objekt}:@var{Ausgabe} | ||
| 7670 | @itemx (ungexp @var{Objekt} @var{Ausgabe}) | ||
| 7671 | Dies verhält sich wie die Form oben, bezieht sich aber ausdrücklich auf die | ||
| 7672 | angegebene @var{Ausgabe} des @var{Objekt}s — dies ist nützlich, wenn das | ||
| 7673 | @var{Objekt} mehrere Ausgaben generiert (siehe @ref{Pakete mit mehreren Ausgaben.}). | ||
| 7674 | |||
| 7675 | @item #+@var{Objekt} | ||
| 7676 | @itemx #+@var{Objekt}:@var{Ausgabe} | ||
| 7677 | @itemx (ungexp-native @var{Objekt}) | ||
| 7678 | @itemx (ungexp-native @var{Objekt} @var{Ausgabe}) | ||
| 7679 | Das Gleiche wie @code{ungexp}, jedoch wird im Kontext einer | ||
| 7680 | Cross-Kompilierung eine Referenz auf die @emph{native} Erstellung des | ||
| 7681 | @var{Objekt}s eingefügt. | ||
| 7682 | |||
| 7683 | @item #$output[:@var{Ausgabe}] | ||
| 7684 | @itemx (ungexp output [@var{Ausgabe}]) | ||
| 7685 | Fügt eine Referenz auf die angegebene @var{Ausgabe} dieser Ableitung ein, | ||
| 7686 | oder auf die Hauptausgabe, wenn keine @var{Ausgabe} angegeben wurde. | ||
| 7687 | |||
| 7688 | Dies ist nur bei G-Ausdrücken sinnvoll, die an @code{gexp->derivation} | ||
| 7689 | übergeben werden. | ||
| 7690 | |||
| 7691 | @item #$@@@var{Liste} | ||
| 7692 | @itemx (ungexp-splicing @var{Liste}) | ||
| 7693 | Das Gleiche wie oben, jedoch wird nur der Inhalt der @var{Liste} in die | ||
| 7694 | äußere Liste eingespleißt. | ||
| 7695 | |||
| 7696 | @item #+@@@var{Liste} | ||
| 7697 | @itemx (ungexp-native-splicing @var{Liste}) | ||
| 7698 | Das Gleiche, aber referenziert werden native Erstellungen der Objekte in der | ||
| 7699 | @var{Liste}. | ||
| 7700 | |||
| 7701 | @end table | ||
| 7702 | |||
| 7703 | G-Ausdrücke, die mit @code{gexp} oder @code{#~} erzeugt wurden, sind zur | ||
| 7704 | Laufzeit Objekte vom Typ @code{gexp?} (siehe unten). | ||
| 7705 | @end deffn | ||
| 7706 | |||
| 7707 | @deffn {Scheme-Syntax} with-imported-modules @var{Module} @var{Rumpf}@dots{} | ||
| 7708 | Markiert die in @var{Rumpf}@dots{} definierten G-Ausdrücke, dass sie in | ||
| 7709 | ihrer Ausführungsumgebung die angegebenen @var{Module} brauchen. | ||
| 7710 | |||
| 7711 | Jedes Objekt unter den @var{Module}n kann der Name eines Moduls wie | ||
| 7712 | @code{(guix build utils)} sein, oder es kann nacheinander ein Modulname, ein | ||
| 7713 | Pfeil und ein dateiartiges Objekt sein: | ||
| 7714 | |||
| 7715 | @example | ||
| 7716 | `((guix build utils) | ||
| 7717 | (guix gcrypt) | ||
| 7718 | ((guix config) => ,(scheme-file "config.scm" | ||
| 7719 | #~(define-module @dots{})))) | ||
| 7720 | @end example | ||
| 7721 | |||
| 7722 | @noindent | ||
| 7723 | Im Beispiel oben werden die ersten beiden Module vom Suchpfad genommen und | ||
| 7724 | das letzte aus dem angegebenen dateiartigen Objekt erzeugt. | ||
| 7725 | |||
| 7726 | Diese Form hat einen @emph{lexikalischen} Sichtbarkeitsbereich: Sie wirkt | ||
| 7727 | sich auf die direkt in @var{Rumpf}@dots{} definierten G-Ausdrücke aus, aber | ||
| 7728 | nicht auf jene, die, sagen wir, in aus @var{Rumpf}@dots{} heraus | ||
| 7729 | aufgerufenen Prozeduren definiert wurden. | ||
| 7730 | @end deffn | ||
| 7731 | |||
| 7732 | @deffn {Scheme-Syntax} with-extensions @var{Erweiterungen} @var{Rumpf}@dots{} | ||
| 7733 | Markiert die in @var{Rumpf}@dots{} definierten G-Ausdrücke, dass sie | ||
| 7734 | @var{Erweiterungen} in ihrer Erstellungs- und Ausführungsumgebung | ||
| 7735 | benötigen. @var{Erweiterungen} sind typischerweise eine Liste von | ||
| 7736 | Paketobjekten wie zum Beispiel die im Modul @code{(gnu packages guile)} | ||
| 7737 | definierten. | ||
| 7738 | |||
| 7739 | Konkret werden die unter den @var{Erweiterungen} aufgeführten Pakete zum | ||
| 7740 | Ladepfad hinzugefügt, während die in @var{Rumpf}@dots{} aufgeführten | ||
| 7741 | importierten Module kompiliert werden und sie werden auch zum Ladepfad des | ||
| 7742 | von @var{Rumpf}@dots{} gelieferten G-Ausdrucks hinzugefügt. | ||
| 7743 | @end deffn | ||
| 7744 | |||
| 7745 | @deffn {Scheme-Prozedur} gexp? @var{Objekt} | ||
| 7746 | Liefert @code{#t}, wenn das @var{Objekt} ein G-Ausdruck ist. | ||
| 7747 | @end deffn | ||
| 7748 | |||
| 7749 | G-Ausdrücke sind dazu gedacht, auf die Platte geschrieben zu werden, | ||
| 7750 | entweder als Code, der eine Ableitung erstellt, oder als einfache Dateien im | ||
| 7751 | Store. Die monadischen Prozeduren unten ermöglichen Ihnen das (siehe | ||
| 7752 | @ref{Die Store-Monade}, wenn Sie mehr Informationen über Monaden suchen). | ||
| 7753 | |||
| 7754 | @deffn {Monadische Prozedur} gexp->derivation @var{Name} @var{Ausdruck} @ | ||
| 7755 | [#:system (%current-system)] [#:target #f] [#:graft? #t] @ [#:hash #f] | ||
| 7756 | [#:hash-algo #f] @ [#:recursive? #f] [#:env-vars '()] [#:modules '()] @ | ||
| 7757 | [#:module-path @var{%load-path}] @ [#:effective-version "2.2"] @ | ||
| 7758 | [#:references-graphs #f] [#:allowed-references #f] @ | ||
| 7759 | [#:disallowed-references #f] @ [#:leaked-env-vars #f] @ [#:script-name | ||
| 7760 | (string-append @var{Name} "-builder")] @ [#:deprecation-warnings #f] @ | ||
| 7761 | [#:local-build? #f] [#:substitutable? #t] @ [#:properties '()] | ||
| 7762 | [#:guile-for-build #f] Liefert eine Ableitung unter dem @var{Name}n, die | ||
| 7763 | jeden @var{Ausdruck} (ein G-Ausdruck) mit @var{guile-for-build} (eine | ||
| 7764 | Ableitung) für das @var{System} erstellt; der @var{Ausdruck} wird dabei in | ||
| 7765 | einer Datei namens @var{script-name} gespeichert. Wenn »@var{target}« wahr | ||
| 7766 | ist, wird es beim Cross-Kompilieren als Zieltripel für mit @var{Ausdruck} | ||
| 7767 | bezeichnete Pakete benutzt. | ||
| 7768 | |||
| 7769 | @var{modules} gilt als veraltet; stattdessen sollte | ||
| 7770 | @code{with-imported-modules} benutzt werden. Die Bedeutung ist, dass die | ||
| 7771 | @var{Module} im Ausführungskontext des @var{Ausdruck}s verfügbar gemacht | ||
| 7772 | werden; @var{modules} ist dabei eine Liste von Namen von Guile-Modulen, die | ||
| 7773 | im Modulpfad @var{module-path} gesucht werden, um sie in den Store zu | ||
| 7774 | kopieren, zu kompilieren und im Ladepfad während der Ausführung des | ||
| 7775 | @var{Ausdruck}s verfügbar zu machen — z.B.@: @code{((guix build utils) (guix | ||
| 7776 | build gnu-build-system))}. | ||
| 7777 | |||
| 7778 | @var{effective-version} bestimmt, unter welcher Zeichenkette die | ||
| 7779 | Erweiterungen des @var{Ausdruck}s zum Suchpfad hinzugefügt werden (siehe | ||
| 7780 | @code{with-extensions}) — z.B.@: @code{"2.2"}. | ||
| 7781 | |||
| 7782 | @var{graft?} bestimmt, ob vom @var{Ausdruck} benannte Pakete veredelt werden | ||
| 7783 | sollen, falls Veredelungen zur Verfügung stehen. | ||
| 7784 | |||
| 7785 | Ist @var{references-graphs} wahr, muss es eine Liste von Tupeln in einer der | ||
| 7786 | folgenden Formen sein: | ||
| 7787 | |||
| 7788 | @example | ||
| 7789 | (@var{Dateiname} @var{Paket}) | ||
| 7790 | (@var{Dateiname} @var{Paket} @var{Ausgabe}) | ||
| 7791 | (@var{Dateiname} @var{Ableitung}) | ||
| 7792 | (@var{Dateiname} @var{Ableitung} @var{Ausgabe}) | ||
| 7793 | (@var{Dateiname} @var{Store-Objekt}) | ||
| 7794 | @end example | ||
| 7795 | |||
| 7796 | Bei jedem Element von @var{references-graphs} wird das rechts Stehende | ||
| 7797 | automatisch zu einer Eingabe des Erstellungsprozesses vom @var{Ausdruck} | ||
| 7798 | gemacht. In der Erstellungsumgebung enthält das, was mit @var{Dateiname} | ||
| 7799 | bezeichnet wird, den Referenzgraphen des entsprechenden Objekts in einem | ||
| 7800 | einfachen Textformat. | ||
| 7801 | |||
| 7802 | @var{allowed-references} muss entweder @code{#f} oder eine Liste von | ||
| 7803 | Ausgabenamen und Paketen sein. Eine solche Liste benennt Store-Objekte, die | ||
| 7804 | das Ergebnis referenzieren darf. Jede Referenz auf ein nicht dort | ||
| 7805 | aufgeführtes Store-Objekt löst einen Erstellungsfehler aus. Genauso | ||
| 7806 | funktioniert @var{disallowed-references}, was eine Liste von Objekten sein | ||
| 7807 | kann, die von den Ausgaben nicht referenziert werden dürfen. | ||
| 7808 | |||
| 7809 | @var{deprecation-warnings} bestimmt, ob beim Kompilieren von Modulen | ||
| 7810 | Warnungen angezeigt werden sollen, wenn auf als veraltet markierten Code | ||
| 7811 | zugegriffen wird (»deprecation warnings«). @var{deprecation-warnings} kann | ||
| 7812 | @code{#f}, @code{#t} oder @code{'detailed} (detailliert) sein. | ||
| 7813 | |||
| 7814 | Die anderen Argumente verhalten sich wie bei @code{derivation} (siehe | ||
| 7815 | @ref{Ableitungen}). | ||
| 7816 | @end deffn | ||
| 7817 | |||
| 7818 | @cindex dateiartige Objekte | ||
| 7819 | Die im Folgenden erklärten Prozeduren @code{local-file}, @code{plain-file}, | ||
| 7820 | @code{computed-file}, @code{program-file} und @code{scheme-file} liefern | ||
| 7821 | @dfn{dateiartige Objekte}. Das bedeutet, dass diese Objekte, wenn sie in | ||
| 7822 | einem G-Ausdruck demaskiert werden, zu einer Datei im Store | ||
| 7823 | führen. Betrachten Sie zum Beispiel diesen G-Ausdruck: | ||
| 7824 | |||
| 7825 | @example | ||
| 7826 | #~(system* #$(file-append glibc "/sbin/nscd") "-f" | ||
| 7827 | #$(local-file "/tmp/my-nscd.conf")) | ||
| 7828 | @end example | ||
| 7829 | |||
| 7830 | Der Effekt hiervon ist, dass @file{/tmp/my-nscd.conf} »interniert« wird, | ||
| 7831 | indem es in den Store kopiert wird. Sobald er umgeschrieben wurde, zum | ||
| 7832 | Beispiel über @code{gexp->derivation}, referenziert der G-Ausdruck diese | ||
| 7833 | Kopie im @file{/gnu/store}. Die Datei in @file{/tmp} zu bearbeiten oder zu | ||
| 7834 | löschen, hat dann keinen Effekt mehr darauf, was der G-Ausdruck | ||
| 7835 | tut. @code{plain-file} kann in ähnlicher Weise benutzt werden, es | ||
| 7836 | unterscheidet sich aber darin, dass dort der Prozedur der Inhalt der Datei | ||
| 7837 | als eine Zeichenkette übergeben wird. | ||
| 7838 | |||
| 7839 | @deffn {Scheme-Prozedur} local-file @var{Datei} [@var{Name}] @ | ||
| 7840 | [#:recursive? #f] [#:select? (const #t)] Liefert ein Objekt, dass die lokale | ||
| 7841 | Datei @var{Datei} repräsentiert und sie zum Store hinzufügen lässt; dieses | ||
| 7842 | Objekt kann in einem G-Ausdruck benutzt werden. Wurde für die @var{Datei} | ||
| 7843 | ein relativer Dateiname angegeben, wird sie relativ zur Quelldatei gesucht, | ||
| 7844 | in der diese Form steht. Die @var{Datei} wird unter dem angegebenen | ||
| 7845 | @var{Name}n im Store abgelegt — als Vorgabe wird dabei der Basisname der | ||
| 7846 | @var{Datei} genommen. | ||
| 7847 | |||
| 7848 | Ist @var{recursive?} wahr, werden in der @var{Datei} enthaltene Dateien | ||
| 7849 | rekursiv hinzugefügt; ist die @var{Datei} eine flache Datei und | ||
| 7850 | @var{recursive?} ist wahr, wird ihr Inhalt in den Store eingelagert und ihre | ||
| 7851 | Berechtigungs-Bits übernommen. | ||
| 7852 | |||
| 7853 | Steht @var{recursive?} auf wahr, wird @code{(@var{select?} @var{Datei} | ||
| 7854 | @var{Stat})} für jeden Verzeichniseintrag aufgerufen, wobei @var{Datei} der | ||
| 7855 | absolute Dateiname und @var{Stat} das Ergebnis von @code{lstat} ist, außer | ||
| 7856 | auf den Einträgen, wo @var{select?} keinen wahren Wert liefert. | ||
| 7857 | |||
| 7858 | Dies ist das deklarative Gegenstück zur monadischen Prozedur | ||
| 7859 | @code{interned-file} (siehe @ref{Die Store-Monade, @code{interned-file}}). | ||
| 7860 | @end deffn | ||
| 7861 | |||
| 7862 | @deffn {Scheme-Prozedur} plain-file @var{Name} @var{Inhalt} | ||
| 7863 | Liefert ein Objekt, das eine Textdatei mit dem angegebenen @var{Name}n | ||
| 7864 | repräsentiert, die den angegebenen @var{Inhalt} hat (eine Zeichenkette oder | ||
| 7865 | ein Bytevektor), welche zum Store hinzugefügt werden soll. | ||
| 7866 | |||
| 7867 | Dies ist das deklarative Gegenstück zu @code{text-file}. | ||
| 7868 | @end deffn | ||
| 7869 | |||
| 7870 | @deffn {Scheme-Prozedur} computed-file @var{Name} @var{G-Ausdruck} @ | ||
| 7871 | [#:options '(#:local-build? #t)] Liefert ein Objekt, das das Store-Objekt | ||
| 7872 | mit dem @var{Name}n repräsentiert, eine Datei oder ein Verzeichnis, das vom | ||
| 7873 | @var{G-Ausdruck} berechnet wurde. @var{options} ist eine Liste zusätzlicher | ||
| 7874 | Argumente, die an @code{gexp->derivation} übergeben werden. | ||
| 7875 | |||
| 7876 | Dies ist das deklarative Gegenstück zu @code{gexp->derivation}. | ||
| 7877 | @end deffn | ||
| 7878 | |||
| 7879 | @deffn {Monadische Prozedur} gexp->script @var{Name} @var{Ausdruck} @ | ||
| 7880 | [#:guile (default-guile)] [#:module-path %load-path] Liefert ein | ||
| 7881 | ausführbares Skript namens @var{Name}, das den @var{Ausdruck} mit dem | ||
| 7882 | angegebenen @var{guile} ausführt, wobei vom @var{Ausdruck} importierte | ||
| 7883 | Module in seinem Suchpfad stehen. Die Module des @var{Ausdruck}s werden dazu | ||
| 7884 | im Modulpfad @var{module-path} gesucht. | ||
| 7885 | |||
| 7886 | Folgendes Beispiel erstellt ein Skript, das einfach nur den Befehl | ||
| 7887 | @command{ls} ausführt: | ||
| 7888 | |||
| 7889 | @example | ||
| 7890 | (use-modules (guix gexp) (gnu packages base)) | ||
| 7891 | |||
| 7892 | (gexp->script "list-files" | ||
| 7893 | #~(execl #$(file-append coreutils "/bin/ls") | ||
| 7894 | "ls")) | ||
| 7895 | @end example | ||
| 7896 | |||
| 7897 | Lässt man es durch den Store »laufen« (siehe @ref{Die Store-Monade, | ||
| 7898 | @code{run-with-store}}), erhalten wir eine Ableitung, die eine ausführbare | ||
| 7899 | Datei @file{/gnu/store/@dots{}-list-files} generiert, ungefähr so: | ||
| 7900 | |||
| 7901 | @example | ||
| 7902 | #!/gnu/store/@dots{}-guile-2.0.11/bin/guile -ds | ||
| 7903 | !# | ||
| 7904 | (execl "/gnu/store/@dots{}-coreutils-8.22"/bin/ls" "ls") | ||
| 7905 | @end example | ||
| 7906 | @end deffn | ||
| 7907 | |||
| 7908 | @deffn {Scheme-Prozedur} program-file @var{Name} @var{G-Ausdruck} @ | ||
| 7909 | [#:guile #f] [#:module-path %load-path] Liefert ein Objekt, das eine | ||
| 7910 | ausführbare Store-Datei @var{Name} repräsentiert, die den @var{G-Ausdruck} | ||
| 7911 | ausführt. @var{guile} ist das zu verwendende Guile-Paket, mit dem das Skript | ||
| 7912 | ausgeführt werden kann. Importierte Module des @var{G-Ausdruck}s werden im | ||
| 7913 | Modulpfad @var{module-path} gesucht. | ||
| 7914 | |||
| 7915 | Dies ist das deklarative Gegenstück zu @code{gexp->script}. | ||
| 7916 | @end deffn | ||
| 7917 | |||
| 7918 | @deffn {Monadische Prozedur} gexp->file @var{Name} @var{G-Ausdruck} @ | ||
| 7919 | [#:set-load-path? #t] [#:module-path %load-path] @ [#:splice? #f] @ [#:guile | ||
| 7920 | (default-guile)] Liefert eine Ableitung, die eine Datei @var{Name} erstellen | ||
| 7921 | wird, deren Inhalt der @var{G-Ausdruck} ist. Ist @var{splice?} wahr, dann | ||
| 7922 | wird @var{G-Ausdruck} stattdessen als eine Liste von mehreren G-Ausdrücken | ||
| 7923 | behandelt, die alle in die resultierende Datei gespleißt werden. | ||
| 7924 | |||
| 7925 | Ist @var{set-load-path?} wahr, wird in die resultierende Datei Code | ||
| 7926 | hinzugefügt, der den Ladepfad @code{%load-path} und den Ladepfad für | ||
| 7927 | kompilierte Dateien @code{%load-compiled-path} festlegt, die für die | ||
| 7928 | importierten Module des @var{G-Ausdruck}s nötig sind. Die Module des | ||
| 7929 | @var{G-Ausdruck}s werden im Modulpfad @var{module-path} gesucht. | ||
| 7930 | |||
| 7931 | Die resultierende Datei referenziert alle Abhängigkeiten des | ||
| 7932 | @var{G-Ausdruck}s oder eine Teilmenge davon. | ||
| 7933 | @end deffn | ||
| 7934 | |||
| 7935 | @deffn {Scheme-Prozedur} scheme-file @var{Name} @var{G-Ausdruck} [#:splice? #f] | ||
| 7936 | Liefert ein Objekt, das die Scheme-Datei @var{Name} mit dem @var{G-Ausdruck} | ||
| 7937 | als Inhalt repräsentiert. | ||
| 7938 | |||
| 7939 | Dies ist das deklarative Gegenstück zu @code{gexp->file}. | ||
| 7940 | @end deffn | ||
| 7941 | |||
| 7942 | @deffn {Monadische Prozedur} text-file* @var{Name} @var{Text} @dots{} | ||
| 7943 | Liefert eine Ableitung als monadischen Wert, welche eine Textdatei erstellt, | ||
| 7944 | in der der gesamte @var{Text} enthalten ist. @var{Text} kann eine Folge | ||
| 7945 | nicht nur von Zeichenketten, sondern auch Objekten beliebigen Typs sein, die | ||
| 7946 | in einem G-Ausdruck benutzt werden können, also Paketen, Ableitungen, | ||
| 7947 | Objekte lokaler Dateien und so weiter. Die resultierende Store-Datei | ||
| 7948 | referenziert alle davon. | ||
| 7949 | |||
| 7950 | Diese Variante sollte gegenüber @code{text-file} bevorzugt verwendet werden, | ||
| 7951 | wann immer die zu erstellende Datei Objekte im Store referenzieren | ||
| 7952 | wird. Typischerweise ist das der Fall, wenn eine Konfigurationsdatei | ||
| 7953 | erstellt wird, die Namen von Store-Dateien enthält, so wie hier: | ||
| 7954 | |||
| 7955 | @example | ||
| 7956 | (define (profile.sh) | ||
| 7957 | ;; Liefert den Namen eines Shell-Skripts im Store, | ||
| 7958 | ;; welcher die Umgebungsvariable »PATH« initialisiert. | ||
| 7959 | (text-file* "profile.sh" | ||
| 7960 | "export PATH=" coreutils "/bin:" | ||
| 7961 | grep "/bin:" sed "/bin\n")) | ||
| 7962 | @end example | ||
| 7963 | |||
| 7964 | In diesem Beispiel wird die resultierende Datei | ||
| 7965 | @file{/gnu/store/@dots{}-profile.sh} sowohl @var{coreutils}, @var{grep} als | ||
| 7966 | auch @var{sed} referenzieren, so dass der Müllsammler diese nicht löscht, | ||
| 7967 | während die resultierende Datei noch lebendig ist. | ||
| 7968 | @end deffn | ||
| 7969 | |||
| 7970 | @deffn {Scheme-Prozedur} mixed-text-file @var{Name} @var{Text} @dots{} | ||
| 7971 | Liefert ein Objekt, was die Store-Datei @var{Name} repräsentiert, die | ||
| 7972 | @var{Text} enthält. @var{Text} ist dabei eine Folge von Zeichenketten und | ||
| 7973 | dateiartigen Objekten wie zum Beispiel: | ||
| 7974 | |||
| 7975 | @example | ||
| 7976 | (mixed-text-file "profile" | ||
| 7977 | "export PATH=" coreutils "/bin:" grep "/bin") | ||
| 7978 | @end example | ||
| 7979 | |||
| 7980 | Dies ist das deklarative Gegenstück zu @code{text-file*}. | ||
| 7981 | @end deffn | ||
| 7982 | |||
| 7983 | @deffn {Scheme-Prozedur} file-union @var{Name} @var{Dateien} | ||
| 7984 | Liefert ein @code{<computed-file>}, das ein Verzeichnis mit allen | ||
| 7985 | @var{Dateien} enthält. Jedes Objekt in @var{Dateien} muss eine | ||
| 7986 | zweielementige Liste sein, deren erstes Element der im neuen Verzeichnis zu | ||
| 7987 | benutzende Dateiname ist und deren zweites Element ein G-Ausdruck ist, der | ||
| 7988 | die Zieldatei benennt. Hier ist ein Beispiel: | ||
| 7989 | |||
| 7990 | @example | ||
| 7991 | (file-union "etc" | ||
| 7992 | `(("hosts" ,(plain-file "hosts" | ||
| 7993 | "127.0.0.1 localhost")) | ||
| 7994 | ("bashrc" ,(plain-file "bashrc" | ||
| 7995 | "alias ls='ls --color=auto'")))) | ||
| 7996 | @end example | ||
| 7997 | |||
| 7998 | Dies liefert ein Verzeichnis @code{etc}, das zwei Dateien enthält. | ||
| 7999 | @end deffn | ||
| 8000 | |||
| 8001 | @deffn {Scheme-Prozedur} directory-union @var{Name} @var{Dinge} | ||
| 8002 | Liefert ein Verzeichnis, was die Vereinigung (englisch »Union«) der | ||
| 8003 | @var{Dinge} darstellt, wobei @var{Dinge} eine Liste dateiartiger Objekte | ||
| 8004 | sein muss, die Verzeichnisse bezeichnen. Zum Beispiel: | ||
| 8005 | |||
| 8006 | @example | ||
| 8007 | (directory-union "guile+emacs" (list guile emacs)) | ||
| 8008 | @end example | ||
| 8009 | |||
| 8010 | Das liefert ein Verzeichnis, welches die Vereinigung der Pakete @code{guile} | ||
| 8011 | und @code{emacs} ist. | ||
| 8012 | @end deffn | ||
| 8013 | |||
| 8014 | @deffn {Scheme-Prozedur} file-append @var{Objekt} @var{Suffix} @dots{} | ||
| 8015 | Liefert ein dateiartiges Objekt, das zur Aneinanderreihung von @var{Objekt} | ||
| 8016 | und @var{Suffix} umgeschrieben wird, wobei das @var{Objekt} ein | ||
| 8017 | herunterbrechbares Objekt und jedes @var{Suffix} eine Zeichenkette sein | ||
| 8018 | muss. | ||
| 8019 | |||
| 8020 | Betrachten Sie zum Beispiel diesen G-Ausdruck: | ||
| 8021 | |||
| 8022 | @example | ||
| 8023 | (gexp->script "uname-ausfuehren" | ||
| 8024 | #~(system* #$(file-append coreutils | ||
| 8025 | "/bin/uname"))) | ||
| 8026 | @end example | ||
| 8027 | |||
| 8028 | Denselben Effekt könnte man erreichen mit: | ||
| 8029 | |||
| 8030 | @example | ||
| 8031 | (gexp->script "uname-ausfuehren" | ||
| 8032 | #~(system* (string-append #$coreutils | ||
| 8033 | "/bin/uname"))) | ||
| 8034 | @end example | ||
| 8035 | |||
| 8036 | Es gibt jedoch einen Unterschied, nämlich enthält das resultierende Skript | ||
| 8037 | bei @code{file-append} tatsächlich den absoluten Dateinamen als | ||
| 8038 | Zeichenkette, während im anderen Fall das resultierende Skript einen | ||
| 8039 | Ausdruck @code{(string-append @dots{})} enthält, der den Dateinamen erst | ||
| 8040 | @emph{zur Laufzeit} zusammensetzt. | ||
| 8041 | @end deffn | ||
| 8042 | |||
| 8043 | |||
| 8044 | Natürlich gibt es zusätzlich zu in »wirtsseitigem« Code eingebetteten | ||
| 8045 | G-Ausdrücken auch Module mit »erstellungsseitig« nutzbaren Werkzeugen. Um | ||
| 8046 | klarzustellen, dass sie dafür gedacht sind, in der Erstellungsschicht | ||
| 8047 | benutzt zu werden, bleiben diese Module im Namensraum @code{(guix build | ||
| 8048 | @dots{})}. | ||
| 8049 | |||
| 8050 | @cindex Herunterbrechen, von abstrakten Objekten in G-Ausdrücken | ||
| 8051 | Intern werden hochsprachliche, abstrakte Objekte mit ihrem Compiler entweder | ||
| 8052 | zu Ableitungen oder zu Store-Objekten @dfn{heruntergebrochen}. Wird zum | ||
| 8053 | Beispiel ein Paket heruntergebrochen, bekommt man eine Ableitung, während | ||
| 8054 | ein @code{plain-file} zu einem Store-Objekt heruntergebrochen wird. Das wird | ||
| 8055 | mit der monadischen Prozedur @code{lower-object} bewerkstelligt. | ||
| 8056 | |||
| 8057 | @deffn {Monadische Prozedur} lower-object @var{Objekt} [@var{System}] @ | ||
| 8058 | [#:target #f] Liefert die Ableitung oder das Store-Objekt, das dem | ||
| 8059 | @var{Objekt} für @var{System} als Wert in der Store-Monade | ||
| 8060 | @var{%store-monad} entspricht, cross-kompiliert für das Zieltripel | ||
| 8061 | @var{target}, wenn @var{target} wahr ist. Das @var{Objekt} muss ein Objekt | ||
| 8062 | sein, für das es einen mit ihm assoziierten G-Ausdruck-Compiler gibt, wie | ||
| 8063 | zum Beispiel ein @code{<package>}. | ||
| 8064 | @end deffn | ||
| 8065 | |||
| 8066 | @node Aufruf von guix repl | ||
| 8067 | @section @command{guix repl} aufrufen | ||
| 8068 | |||
| 8069 | @cindex REPL (Lese-Auswerten-Schreiben-Schleife) | ||
| 8070 | Der Befehl @command{guix repl} startet eine Guile-REPL (@dfn{Read-Eval-Print | ||
| 8071 | Loop}, kurz REPL, deutsch Lese-Auswerten-Schreiben-Schleife) zur | ||
| 8072 | interaktiven Programmierung (siehe @ref{Using Guile Interactively,,, guile, | ||
| 8073 | GNU Guile Reference Manual}). Im Vergleich dazu, einfach den Befehl | ||
| 8074 | @command{guile} aufzurufen, garantiert @command{guix repl}, dass alle | ||
| 8075 | Guix-Module und deren Abhängigkeiten im Suchpfad verfügbar sind. Sie können | ||
| 8076 | die REPL so benutzen: | ||
| 8077 | |||
| 8078 | @example | ||
| 8079 | $ guix repl | ||
| 8080 | scheme@@(guile-user)> ,use (gnu packages base) | ||
| 8081 | scheme@@(guile-user)> coreutils | ||
| 8082 | $1 = #<package coreutils@@8.29 gnu/packages/base.scm:327 3e28300> | ||
| 8083 | @end example | ||
| 8084 | |||
| 8085 | @cindex Untergeordnete | ||
| 8086 | @command{guix repl} implementiert zusätzlich ein einfaches maschinenlesbares | ||
| 8087 | Protokoll für die REPL, das von @code{(guix inferior)} benutzt wird, um mit | ||
| 8088 | @dfn{Untergeordneten} zu interagieren, also mit getrennten Prozessen einer | ||
| 8089 | womöglich anderen Version von Guix. | ||
| 8090 | |||
| 8091 | Folgende @var{Optionen} gibt es: | ||
| 8092 | |||
| 8093 | @table @code | ||
| 8094 | @item --type=@var{Typ} | ||
| 8095 | @itemx -t @var{Typ} | ||
| 8096 | Startet eine REPL des angegebenen @var{Typ}s, der einer der Folgenden sein | ||
| 8097 | darf: | ||
| 8098 | |||
| 8099 | @table @code | ||
| 8100 | @item guile | ||
| 8101 | Die Voreinstellung, mit der eine normale, voll funktionsfähige Guile-REPL | ||
| 8102 | gestartet wird. | ||
| 8103 | @item machine | ||
| 8104 | Startet eine REPL, die ein maschinenlesbares Protokoll benutzt. Dieses | ||
| 8105 | Protokoll wird vom Modul @code{(guix inferior)} gesprochen. | ||
| 8106 | @end table | ||
| 8107 | |||
| 8108 | @item --listen=@var{Endpunkt} | ||
| 8109 | Der Vorgabe nach würde @command{guix repl} von der Standardeingabe lesen und | ||
| 8110 | auf die Standardausgabe schreiben. Wird diese Befehlszeilenoption angegeben, | ||
| 8111 | lauscht die REPL stattdessen auf dem @var{Endpunkt} auf Verbindungen. Hier | ||
| 8112 | sind Beispiele gültiger Befehlszeilenoptionen: | ||
| 8113 | |||
| 8114 | @table @code | ||
| 8115 | @item --listen=tcp:37146 | ||
| 8116 | Verbindungen mit dem »localhost« auf Port 37146 akzeptieren. | ||
| 8117 | |||
| 8118 | @item --listen=unix:/tmp/socket | ||
| 8119 | Verbindungen zum Unix-Socket @file{/tmp/socket} akzeptieren. | ||
| 8120 | @end table | ||
| 8121 | @end table | ||
| 8122 | |||
| 8123 | @c ********************************************************************* | ||
| 8124 | @node Zubehör | ||
| 8125 | @chapter Zubehör | ||
| 8126 | |||
| 8127 | Dieser Abschnitt beschreibt die Befehlszeilenwerkzeuge von Guix. Manche | ||
| 8128 | davon richten sich hauptsächlich an Entwickler und solche Nutzer, die neue | ||
| 8129 | Paketdefinitionen schreiben, andere sind auch für ein breiteres Publikum | ||
| 8130 | nützlich. Sie ergänzen die Scheme-Programmierschnittstelle um bequeme | ||
| 8131 | Befehle. | ||
| 8132 | |||
| 8133 | @menu | ||
| 8134 | * Aufruf von guix build:: Pakete aus der Befehlszeile heraus erstellen. | ||
| 8135 | * Aufruf von guix edit:: Paketdefinitionen bearbeiten. | ||
| 8136 | * Aufruf von guix download:: Herunterladen einer Datei und Ausgabe ihres | ||
| 8137 | Hashes. | ||
| 8138 | * Aufruf von guix hash:: Den kryptografischen Hash einer Datei | ||
| 8139 | berechnen. | ||
| 8140 | * Aufruf von guix import:: Paketdefinitionen importieren. | ||
| 8141 | * Aufruf von guix refresh:: Paketdefinitionen aktualisieren. | ||
| 8142 | * Aufruf von guix lint:: Fehler in Paketdefinitionen finden. | ||
| 8143 | * Aufruf von guix size:: Plattenplatzverbrauch profilieren. | ||
| 8144 | * Aufruf von guix graph:: Den Paketgraphen visualisieren. | ||
| 8145 | * Aufruf von guix publish:: Substitute teilen. | ||
| 8146 | * Aufruf von guix challenge:: Die Substitut-Server anfechten. | ||
| 8147 | * Aufruf von guix copy:: Mit einem entfernten Store Dateien austauschen. | ||
| 8148 | * Aufruf von guix container:: Prozesse isolieren. | ||
| 8149 | * Aufruf von guix weather:: Die Verfügbarkeit von Substituten | ||
| 8150 | einschätzen. | ||
| 8151 | * Aufruf von guix processes:: Auflisten der Client-Prozesse | ||
| 8152 | @end menu | ||
| 8153 | |||
| 8154 | @node Aufruf von guix build | ||
| 8155 | @section Aufruf von @command{guix build} | ||
| 8156 | |||
| 8157 | @cindex Paketerstellung | ||
| 8158 | @cindex @command{guix build} | ||
| 8159 | Der Befehl @command{guix build} lässt Pakete oder Ableitungen samt ihrer | ||
| 8160 | Abhängigkeiten erstellen und gibt die resultierenden Pfade im Store | ||
| 8161 | aus. Beachten Sie, dass das Nutzerprofil dadurch nicht modifiziert wird — | ||
| 8162 | eine solche Installation bewirkt der Befehl @command{guix package} (siehe | ||
| 8163 | @ref{Aufruf von guix package}). @command{guix build} wird also hauptsächlich | ||
| 8164 | von Entwicklern der Distribution benutzt. | ||
| 8165 | |||
| 8166 | Die allgemeine Syntax lautet: | ||
| 8167 | |||
| 8168 | @example | ||
| 8169 | guix build @var{Optionen} @var{Paket-oder-Ableitung}@dots{} | ||
| 8170 | @end example | ||
| 8171 | |||
| 8172 | Zum Beispiel wird mit folgendem Befehl die neueste Version von Emacs und von | ||
| 8173 | Guile erstellt, das zugehörige Erstellungsprotokoll angezeigt und | ||
| 8174 | letztendlich werden die resultierenden Verzeichnisse ausgegeben: | ||
| 8175 | |||
| 8176 | @example | ||
| 8177 | guix build emacs guile | ||
| 8178 | @end example | ||
| 8179 | |||
| 8180 | Folgender Befehl erstellt alle Pakete, die zur Verfügung stehen: | ||
| 8181 | |||
| 8182 | @example | ||
| 8183 | guix build --quiet --keep-going \ | ||
| 8184 | `guix package -A | cut -f1,2 --output-delimiter=@@` | ||
| 8185 | @end example | ||
| 8186 | |||
| 8187 | Als @var{Paket-oder-Ableitung} muss entweder der Name eines in der | ||
| 8188 | Software-Distribution zu findenden Pakets, wie etwa @code{coreutils} oder | ||
| 8189 | @code{coreutils@@8.20}, oder eine Ableitung wie | ||
| 8190 | @file{/gnu/store/@dots{}-coreutils-8.19.drv} sein. Im ersten Fall wird nach | ||
| 8191 | einem Paket mit entsprechendem Namen (und optional der entsprechenden | ||
| 8192 | Version) in den Modulen der GNU-Distribution gesucht (siehe @ref{Paketmodule}). | ||
| 8193 | |||
| 8194 | Alternativ kann die Befehlszeilenoption @code{--expression} benutzt werden, | ||
| 8195 | um einen Scheme-Ausdruck anzugeben, der zu einem Paket ausgewertet wird; | ||
| 8196 | dies ist nützlich, wenn zwischen mehreren gleichnamigen Paketen oder | ||
| 8197 | Paket-Varianten unterschieden werden muss. | ||
| 8198 | |||
| 8199 | Null oder mehr @var{Optionen} können angegeben werden. Zur Verfügung stehen | ||
| 8200 | die in den folgenden Unterabschnitten beschriebenen Befehlszeilenoptionen. | ||
| 8201 | |||
| 8202 | @menu | ||
| 8203 | * Gemeinsame Erstellungsoptionen:: Erstellungsoptionen für die meisten | ||
| 8204 | Befehle. | ||
| 8205 | * Paketumwandlungsoptionen:: Varianten von Paketen erzeugen. | ||
| 8206 | * Zusätzliche Erstellungsoptionen:: Optionen spezifisch für »guix | ||
| 8207 | build«. | ||
| 8208 | * Fehlschläge beim Erstellen untersuchen:: Praxiserfahrung bei der | ||
| 8209 | Paketerstellung. | ||
| 8210 | @end menu | ||
| 8211 | |||
| 8212 | @node Gemeinsame Erstellungsoptionen | ||
| 8213 | @subsection Gemeinsame Erstellungsoptionen | ||
| 8214 | |||
| 8215 | Einige dieser Befehlszeilenoptionen zur Steuerung des Erstellungsprozess | ||
| 8216 | haben @command{guix build} und andere Befehle, mit denen Erstellungen | ||
| 8217 | ausgelöst werden können, wie @command{guix package} oder @command{guix | ||
| 8218 | archive}, gemeinsam. Das sind folgende: | ||
| 8219 | |||
| 8220 | @table @code | ||
| 8221 | |||
| 8222 | @item --load-path=@var{Verzeichnis} | ||
| 8223 | @itemx -L @var{Verzeichnis} | ||
| 8224 | Das @var{Verzeichnis} vorne an den Suchpfad für Paketmodule anfügen (siehe | ||
| 8225 | @ref{Paketmodule}). | ||
| 8226 | |||
| 8227 | Damit können Nutzer dafür sorgen, dass ihre eigenen selbstdefinierten Pakete | ||
| 8228 | für die Befehlszeilenwerkzeuge sichtbar sind. | ||
| 8229 | |||
| 8230 | @item --keep-failed | ||
| 8231 | @itemx -K | ||
| 8232 | Den Verzeichnisbaum, in dem fehlgeschlagene Erstellungen durchgeführt | ||
| 8233 | wurden, behalten. Wenn also eine Erstellung fehlschlägt, bleibt ihr | ||
| 8234 | Erstellungsbaum in @file{/tmp} erhalten. Der Name dieses Unterverzeichnisses | ||
| 8235 | wird am Ende dem Erstellungsprotokolls ausgegeben. Dies hilft bei der Suche | ||
| 8236 | nach Fehlern in Erstellungen. Der Abschnitt @ref{Fehlschläge beim Erstellen untersuchen} | ||
| 8237 | zeigt Ihnen Hinweise und Tricks, wie Erstellungsfehler untersucht werden | ||
| 8238 | können. | ||
| 8239 | |||
| 8240 | Diese Option hat keine Auswirkungen, wenn eine Verbindung zu einem | ||
| 8241 | entfernten Daemon über eine @code{guix://}-URI verwendet wurde (siehe | ||
| 8242 | @ref{Der Store, the @code{GUIX_DAEMON_SOCKET} variable}). | ||
| 8243 | |||
| 8244 | @item --keep-going | ||
| 8245 | @itemx -k | ||
| 8246 | Weitermachen, auch wenn ein Teil der Erstellungen fehlschlägt. Das bedeutet, | ||
| 8247 | dass der Befehl erst terminiert, wenn alle Erstellungen erfolgreich oder mit | ||
| 8248 | Fehler durchgeführt wurden. | ||
| 8249 | |||
| 8250 | Das normale Verhalten ist, abzubrechen, sobald eine der angegebenen | ||
| 8251 | Ableitungen fehlschlägt. | ||
| 8252 | |||
| 8253 | @item --dry-run | ||
| 8254 | @itemx -n | ||
| 8255 | Die Ableitungen nicht erstellen. | ||
| 8256 | |||
| 8257 | @anchor{fallback-option} | ||
| 8258 | @item --fallback | ||
| 8259 | Wenn das Substituieren vorerstellter Binärdateien fehlschlägt, diese als | ||
| 8260 | »Fallback« lokal selbst erstellen (siehe @ref{Fehler bei der Substitution}). | ||
| 8261 | |||
| 8262 | @item --substitute-urls=@var{URLs} | ||
| 8263 | @anchor{client-substitute-urls} | ||
| 8264 | Die @var{urls} als durch Leerraumzeichen getrennte Liste von Quell-URLs für | ||
| 8265 | Substitute anstelle der vorgegebenen URL-Liste für den @command{guix-daemon} | ||
| 8266 | verwenden (siehe @ref{daemon-substitute-urls,, @command{guix-daemon} URLs}). | ||
| 8267 | |||
| 8268 | Das heißt, die Substitute dürfen von den @var{urls} heruntergeladen werden, | ||
| 8269 | sofern sie mit einem durch den Systemadministrator autorisierten Schlüssel | ||
| 8270 | signiert worden sind (siehe @ref{Substitute}). | ||
| 8271 | |||
| 8272 | Wenn als @var{urls} eine leere Zeichenkette angegeben wurde, verhält es | ||
| 8273 | sich, als wären Substitute abgeschaltet. | ||
| 8274 | |||
| 8275 | @item --no-substitutes | ||
| 8276 | Benutze keine Substitute für Erstellungsergebnisse. Das heißt, dass alle | ||
| 8277 | Objekte lokal erstellt werden müssen, und kein Herunterladen von vorab | ||
| 8278 | erstellten Binärdateien erlaubt ist (siehe @ref{Substitute}). | ||
| 8279 | |||
| 8280 | @item --no-grafts | ||
| 8281 | Pakete nicht »veredeln« (engl. »graft«). Praktisch heißt das, dass als | ||
| 8282 | Veredelungen verfügbare Paketaktualisierungen nicht angewandt werden. Der | ||
| 8283 | Abschnitt @ref{Sicherheitsaktualisierungen} hat weitere Informationen zu Veredelungen. | ||
| 8284 | |||
| 8285 | @item --rounds=@var{n} | ||
| 8286 | Jede Ableitung @var{n}-mal nacheinander erstellen und einen Fehler melden, | ||
| 8287 | wenn die aufeinanderfolgenden Erstellungsergebnisse nicht Bit für Bit | ||
| 8288 | identisch sind. | ||
| 8289 | |||
| 8290 | Das ist eine nützliche Methode, um nicht-deterministische | ||
| 8291 | Erstellungsprozesse zu erkennen. Nicht-deterministische Erstellungsprozesse | ||
| 8292 | sind ein Problem, weil Nutzer dadurch praktisch nicht @emph{verifizieren} | ||
| 8293 | können, ob von Drittanbietern bereitgestellte Binärdateien echt sind. Der | ||
| 8294 | Abschnitt @ref{Aufruf von guix challenge} erklärt dies genauer. | ||
| 8295 | |||
| 8296 | Beachten Sie, dass die sich unterscheidenden Erstellungsergebnisse nicht | ||
| 8297 | erhalten bleiben, so dass Sie eventuelle Fehler manuell untersuchen müssen, | ||
| 8298 | z.B.@: indem Sie eines oder mehrere der Erstellungsergebnisse @code{guix | ||
| 8299 | archive --export} auslagern (siehe @ref{Aufruf von guix archive}), dann neu | ||
| 8300 | erstellen und letztlich die beiden Erstellungsergebnisse vergleichen. | ||
| 8301 | |||
| 8302 | @item --no-build-hook | ||
| 8303 | Nicht versuchen, Erstellungen über den »Build-Hook« des Daemons auszulagern | ||
| 8304 | (siehe @ref{Auslagern des Daemons einrichten}). Somit wird lokal erstellt, statt | ||
| 8305 | Erstellungen auf entfernte Maschinen auszulagern. | ||
| 8306 | |||
| 8307 | @item --max-silent-time=@var{Sekunden} | ||
| 8308 | Wenn der Erstellungs- oder Substitutionsprozess länger als | ||
| 8309 | @var{Sekunden}-lang keine Ausgabe erzeugt, wird er abgebrochen und ein | ||
| 8310 | Fehler beim Erstellen gemeldet. | ||
| 8311 | |||
| 8312 | Standardmäßig wird die Einstellung für den Daemon benutzt (siehe | ||
| 8313 | @ref{Aufruf des guix-daemon, @code{--max-silent-time}}). | ||
| 8314 | |||
| 8315 | @item --timeout=@var{Sekunden} | ||
| 8316 | Entsprechend wird hier der Erstellungs- oder Substitutionsprozess | ||
| 8317 | abgebrochen und als Fehlschlag gemeldet, wenn er mehr als | ||
| 8318 | @var{Sekunden}-lang dauert. | ||
| 8319 | |||
| 8320 | Standardmäßig wird die Einstellung für den Daemon benutzt (siehe | ||
| 8321 | @ref{Aufruf des guix-daemon, @code{--timeout}}). | ||
| 8322 | |||
| 8323 | @c Note: This option is actually not part of %standard-build-options but | ||
| 8324 | @c most programs honor it. | ||
| 8325 | @cindex Ausführlichkeit der Befehlszeilenwerkzeuge | ||
| 8326 | @cindex Erstellungsprotokolle, Ausführlichkeit | ||
| 8327 | @item -v @var{Stufe} | ||
| 8328 | @itemx --verbosity=@var{Stufe} | ||
| 8329 | Die angegebene Ausführlichkeitsstufe verwenden. Als @var{Stufe} muss eine | ||
| 8330 | ganze Zahl angegeben werden. Wird 0 gewählt, wird keine Ausgabe zur | ||
| 8331 | Fehlersuche angezeigt, 1 bedeutet eine knappe Ausgabe und 2 lässt alle | ||
| 8332 | Erstellungsprotokollausgaben auf die Standardfehlerausgabe schreiben. | ||
| 8333 | |||
| 8334 | @item --cores=@var{n} | ||
| 8335 | @itemx -c @var{n} | ||
| 8336 | Die Nutzung von bis zu @var{n} Prozessorkernen für die Erstellungen | ||
| 8337 | gestatten. Der besondere Wert @code{0} bedeutet, dass so viele wie möglich | ||
| 8338 | benutzt werden. | ||
| 8339 | |||
| 8340 | @item --max-jobs=@var{n} | ||
| 8341 | @itemx -M @var{n} | ||
| 8342 | Höchstens @var{n} gleichzeitige Erstellungsaufträge erlauben. Im Abschnitt | ||
| 8343 | @ref{Aufruf des guix-daemon, @code{--max-jobs}} finden Sie Details zu dieser | ||
| 8344 | Option und der äquivalenten Option des @command{guix-daemon}. | ||
| 8345 | |||
| 8346 | @item --debug=@var{Stufe} | ||
| 8347 | Ein Protokoll zur Fehlersuche ausgeben, das vom Erstellungsdaemon kommt. Als | ||
| 8348 | @var{Stufe} muss eine ganze Zahl zwischen 0 und 5 angegeben werden; höhere | ||
| 8349 | Zahlen stehen für ausführlichere Ausgaben. Stufe 4 oder höher zu wählen, | ||
| 8350 | kann bei der Suche nach Fehlern, wie der Erstellungs-Daemon eingerichtet | ||
| 8351 | ist, helfen. | ||
| 8352 | |||
| 8353 | @end table | ||
| 8354 | |||
| 8355 | Intern ist @command{guix build} im Kern eine Schnittstelle zur Prozedur | ||
| 8356 | @code{package-derivation} aus dem Modul @code{(guix packages)} und zu der | ||
| 8357 | Prozedur @code{build-derivations} des Moduls @code{(guix derivations)}. | ||
| 8358 | |||
| 8359 | Neben auf der Befehlszeile übergebenen Optionen beachten @command{guix | ||
| 8360 | build} und andere @command{guix}-Befehle, die Erstellungen durchführen | ||
| 8361 | lassen, die Umgebungsvariable @code{GUIX_BUILD_OPTIONS}. | ||
| 8362 | |||
| 8363 | @defvr {Umgebungsvariable} GUIX_BUILD_OPTIONS | ||
| 8364 | Nutzer können diese Variable auf eine Liste von Befehlszeilenoptionen | ||
| 8365 | definieren, die automatisch von @command{guix build} und anderen | ||
| 8366 | @command{guix}-Befehlen, die Erstellungen durchführen lassen, benutzt wird, | ||
| 8367 | wie in folgendem Beispiel: | ||
| 8368 | |||
| 8369 | @example | ||
| 8370 | $ export GUIX_BUILD_OPTIONS="--no-substitutes -c 2 -L /foo/bar" | ||
| 8371 | @end example | ||
| 8372 | |||
| 8373 | Diese Befehlszeilenoptionen werden unabhängig von den auf der Befehlszeile | ||
| 8374 | übergebenen Befehlszeilenoptionen grammatikalisch analysiert und das | ||
| 8375 | Ergebnis an die bereits analysierten auf der Befehlszeile übergebenen | ||
| 8376 | Befehlszeilenoptionen angehängt. | ||
| 8377 | @end defvr | ||
| 8378 | |||
| 8379 | |||
| 8380 | @node Paketumwandlungsoptionen | ||
| 8381 | @subsection Paketumwandlungsoptionen | ||
| 8382 | |||
| 8383 | @cindex Paketvarianten | ||
| 8384 | Eine weitere Gruppe von Befehlszeilenoptionen, die @command{guix build} und | ||
| 8385 | auch @command{guix package} unterstützen, sind | ||
| 8386 | @dfn{Paketumwandlungsoptionen}. Diese Optionen ermöglichen es, | ||
| 8387 | @dfn{Paketvarianten} zu definieren — zum Beispiel können Pakete aus einem | ||
| 8388 | anderen Quellcode als normalerweise erstellt werden. Damit ist es leicht, | ||
| 8389 | angepasste Pakete schnell zu erstellen, ohne die vollständigen Definitionen | ||
| 8390 | von Paketvarianten einzutippen (siehe @ref{Pakete definieren}). | ||
| 8391 | |||
| 8392 | @table @code | ||
| 8393 | |||
| 8394 | @item --with-source=@var{Quelle} | ||
| 8395 | @itemx --with-source=@var{Paket}=@var{Quelle} | ||
| 8396 | @itemx --with-source=@var{Paket}@@@var{Version}=@var{Quelle} | ||
| 8397 | Den Paketquellcode für das @var{Paket} von der angegebenen @var{Quelle} | ||
| 8398 | holen und die @var{Version} als seine Versionsnummer verwenden. Die | ||
| 8399 | @var{Quelle} muss ein Dateiname oder eine URL sein wie bei @command{guix | ||
| 8400 | download} (siehe @ref{Aufruf von guix download}). | ||
| 8401 | |||
| 8402 | Wird kein @var{Paket} angegeben, wird als Paketname derjenige auf der | ||
| 8403 | Befehlszeile angegebene Paketname angenommen, der zur Basis am Ende der | ||
| 8404 | @var{Quelle} passt — wenn z.B.@: als @var{Quelle} die Datei | ||
| 8405 | @code{/src/guile-2.0.10.tar.gz} angegeben wurde, entspricht das dem | ||
| 8406 | @code{guile}-Paket. | ||
| 8407 | |||
| 8408 | Ebenso wird, wenn keine @var{Version} angegeben wurde, die Version als | ||
| 8409 | Zeichenkette aus der @var{Quelle} abgeleitet; im vorherigen Beispiel wäre | ||
| 8410 | sie @code{2.0.10}. | ||
| 8411 | |||
| 8412 | Mit dieser Option können Nutzer versuchen, eine andere Version ihres Pakets | ||
| 8413 | auszuprobieren, als die in der Distribution enthaltene Version. Folgendes | ||
| 8414 | Beispiel lädt @file{ed-1.7.tar.gz} von einem GNU-Spiegelserver herunter und | ||
| 8415 | benutzt es als Quelle für das @code{ed}-Paket: | ||
| 8416 | |||
| 8417 | @example | ||
| 8418 | guix build ed --with-source=mirror://gnu/ed/ed-1.7.tar.gz | ||
| 8419 | @end example | ||
| 8420 | |||
| 8421 | Für Entwickler wird es einem durch @code{--with-source} leicht gemacht, | ||
| 8422 | »Release Candidates«, also Vorabversionen, zu testen: | ||
| 8423 | |||
| 8424 | @example | ||
| 8425 | guix build guile --with-source=../guile-2.0.9.219-e1bb7.tar.xz | ||
| 8426 | @end example | ||
| 8427 | |||
| 8428 | @dots{} oder ein Checkout eines versionskontrollierten Repositorys in einer | ||
| 8429 | isolierten Umgebung zu erstellen: | ||
| 8430 | |||
| 8431 | @example | ||
| 8432 | $ git clone git://git.sv.gnu.org/guix.git | ||
| 8433 | $ guix build guix --with-source=guix@@1.0=./guix | ||
| 8434 | @end example | ||
| 8435 | |||
| 8436 | @item --with-input=@var{Paket}=@var{Ersatz} | ||
| 8437 | Abhängigkeiten vom @var{Paket} durch eine Abhängigkeit vom | ||
| 8438 | @var{Ersatz}-Paket ersetzen. Als @var{Paket} muss ein Paketname angegeben | ||
| 8439 | werden und als @var{Ersatz} eine Paketspezifikation wie @code{guile} oder | ||
| 8440 | @code{guile@@1.8}. | ||
| 8441 | |||
| 8442 | Mit folgendem Befehl wird zum Beispiel Guix erstellt, aber statt der | ||
| 8443 | aktuellen stabilen Guile-Version hängt es von der alten Guile-Version | ||
| 8444 | @code{guile@@2.0} ab: | ||
| 8445 | |||
| 8446 | @example | ||
| 8447 | guix build --with-input=guile=guile@@2.0 guix | ||
| 8448 | @end example | ||
| 8449 | |||
| 8450 | Die Ersetzung ist rekursiv und umfassend. In diesem Beispiel würde nicht nur | ||
| 8451 | @code{guix}, sondern auch seine Abhängigkeit @code{guile-json} (was auch von | ||
| 8452 | @code{guile} abhängt) für @code{guile@@2.0} neu erstellt. | ||
| 8453 | |||
| 8454 | Implementiert wird das alles mit der Scheme-Prozedur | ||
| 8455 | @code{package-input-rewriting} (siehe @ref{Pakete definieren, | ||
| 8456 | @code{package-input-rewriting}}). | ||
| 8457 | |||
| 8458 | @item --with-graft=@var{Paket}=@var{Ersatz} | ||
| 8459 | Dies verhält sich ähnlich wie mit @code{--with-input}, aber mit dem | ||
| 8460 | wichtigen Unterschied, dass nicht die gesamte Abhängigkeitskette neu | ||
| 8461 | erstellt wird, sondern das @var{Ersatz}-Paket erstellt und die | ||
| 8462 | ursprünglichen Binärdateien, die auf das @var{Paket} verwiesen haben, damit | ||
| 8463 | @dfn{veredelt} werden. Im Abschnitt @ref{Sicherheitsaktualisierungen} finden Sie | ||
| 8464 | weitere Informationen über Veredelungen. | ||
| 8465 | |||
| 8466 | Zum Beispiel veredelt folgender Befehl Wget und alle Abhängigkeiten davon | ||
| 8467 | mit der Version 3.5.4 von GnuTLS, indem Verweise auf die ursprünglich | ||
| 8468 | verwendete GnuTLS-Version ersetzt werden: | ||
| 8469 | |||
| 8470 | @example | ||
| 8471 | guix build --with-graft=gnutls=gnutls@@3.5.4 wget | ||
| 8472 | @end example | ||
| 8473 | |||
| 8474 | Das hat den Vorteil, dass es viel schneller geht, als alles neu zu | ||
| 8475 | erstellen. Die Sache hat aber einen Haken: Veredelung funktioniert nur, wenn | ||
| 8476 | das @var{Paket} und sein @var{Ersatz} miteinander streng kompatibel sind — | ||
| 8477 | zum Beispiel muss, wenn diese eine Programmbibliothek zur Verfügung stellen, | ||
| 8478 | deren Binärschnittstelle (»Application Binary Interface«, kurz ABI) | ||
| 8479 | kompatibel sein. Wenn das @var{Ersatz}-Paket auf irgendeine Art inkompatibel | ||
| 8480 | mit dem @var{Paket} ist, könnte das Ergebnispaket unbrauchbar sein. Vorsicht | ||
| 8481 | ist also geboten! | ||
| 8482 | |||
| 8483 | @item --with-git-url=@var{Paket}=@var{URL} | ||
| 8484 | @cindex Git, den neuesten Commit benutzen | ||
| 8485 | @cindex latest commit, building | ||
| 8486 | Build @var{package} from the latest commit of the @code{master} branch of | ||
| 8487 | the Git repository at @var{url}. Git sub-modules of the repository are | ||
| 8488 | fetched, recursively. | ||
| 8489 | |||
| 8490 | For example, the following command builds the NumPy Python library against | ||
| 8491 | the latest commit of the master branch of Python itself: | ||
| 8492 | |||
| 8493 | @example | ||
| 8494 | guix build python-numpy \ | ||
| 8495 | --with-git-url=python=https://github.com/python/cpython | ||
| 8496 | @end example | ||
| 8497 | |||
| 8498 | This option can also be combined with @code{--with-branch} or | ||
| 8499 | @code{--with-commit} (see below). | ||
| 8500 | |||
| 8501 | @cindex continuous integration | ||
| 8502 | Obviously, since it uses the latest commit of the given branch, the result | ||
| 8503 | of such a command varies over time. Nevertheless it is a convenient way to | ||
| 8504 | rebuild entire software stacks against the latest commit of one or more | ||
| 8505 | packages. This is particularly useful in the context of continuous | ||
| 8506 | integration (CI). | ||
| 8507 | |||
| 8508 | Checkouts are kept in a cache under @file{~/.cache/guix/checkouts} to speed | ||
| 8509 | up consecutive accesses to the same repository. You may want to clean it up | ||
| 8510 | once in a while to save disk space. | ||
| 8511 | |||
| 8512 | @item --with-branch=@var{Paket}=@var{Branch} | ||
| 8513 | Build @var{package} from the latest commit of @var{branch}. If the | ||
| 8514 | @code{source} field of @var{package} is an origin with the @code{git-fetch} | ||
| 8515 | method (@pxref{»origin«-Referenz}) or a @code{git-checkout} object, the | ||
| 8516 | repository URL is taken from that @code{source}. Otherwise you have to use | ||
| 8517 | @code{--with-git-url} to specify the URL of the Git repository. | ||
| 8518 | |||
| 8519 | For instance, the following command builds @code{guile-sqlite3} from the | ||
| 8520 | latest commit of its @code{master} branch, and then builds @code{guix} | ||
| 8521 | (which depends on it) and @code{cuirass} (which depends on @code{guix}) | ||
| 8522 | against this specific @code{guile-sqlite3} build: | ||
| 8523 | |||
| 8524 | @example | ||
| 8525 | guix build --with-branch=guile-sqlite3=master cuirass | ||
| 8526 | @end example | ||
| 8527 | |||
| 8528 | @item --with-commit=@var{Paket}=@var{Commit} | ||
| 8529 | This is similar to @code{--with-branch}, except that it builds from | ||
| 8530 | @var{commit} rather than the tip of a branch. @var{commit} must be a valid | ||
| 8531 | Git commit SHA1 identifier. | ||
| 8532 | @end table | ||
| 8533 | |||
| 8534 | @node Zusätzliche Erstellungsoptionen | ||
| 8535 | @subsection Zusätzliche Erstellungsoptionen | ||
| 8536 | |||
| 8537 | Die unten aufgeführten Befehlszeilenoptionen funktionieren nur mit | ||
| 8538 | @command{guix build}. | ||
| 8539 | |||
| 8540 | @table @code | ||
| 8541 | |||
| 8542 | @item --quiet | ||
| 8543 | @itemx -q | ||
| 8544 | Schweigend erstellen, ohne das Erstellungsprotokoll anzuzeigen — dies ist | ||
| 8545 | äquivalent zu @code{--verbosity=0}. Nach Abschluss der Erstellung ist das | ||
| 8546 | Protokoll in @file{/var} (oder einem entsprechenden Ort) einsehbar und kann | ||
| 8547 | jederzeit mit der Befehlszeilenoption @option{--log-file} gefunden werden. | ||
| 8548 | |||
| 8549 | @item --file=@var{Datei} | ||
| 8550 | @itemx -f @var{Datei} | ||
| 8551 | Das Paket, die Ableitung oder das dateiähnliche Objekt erstellen, zu dem der | ||
| 8552 | Code in der @var{Datei} ausgewertet wird (siehe @ref{G-Ausdrücke, | ||
| 8553 | file-like objects}). | ||
| 8554 | |||
| 8555 | Zum Beispiel könnte in der @var{Datei} so eine Paketdefinition stehen (siehe | ||
| 8556 | @ref{Pakete definieren}): | ||
| 8557 | |||
| 8558 | @example | ||
| 8559 | @verbatiminclude package-hello.scm | ||
| 8560 | @end example | ||
| 8561 | |||
| 8562 | @item --expression=@var{Ausdruck} | ||
| 8563 | @itemx -e @var{Ausdruck} | ||
| 8564 | Das Paket oder die Ableitung erstellen, zu der der @var{Ausdruck} | ||
| 8565 | ausgewertet wird. | ||
| 8566 | |||
| 8567 | Zum Beispiel kann der @var{Ausdruck} @code{(@@ (gnu packages guile) | ||
| 8568 | guile-1.8)} sein, was diese bestimmte Variante der Version 1.8 von Guile | ||
| 8569 | eindeutig bezeichnet. | ||
| 8570 | |||
| 8571 | Alternativ kann der @var{Ausdruck} ein G-Ausdruck sein. In diesem Fall wird | ||
| 8572 | er als Erstellungsprogramm an @code{gexp->derivation} übergeben (siehe | ||
| 8573 | @ref{G-Ausdrücke}). | ||
| 8574 | |||
| 8575 | Zudem kann der @var{Ausdruck} eine monadische Prozedur mit null Argumenten | ||
| 8576 | bezeichnen (siehe @ref{Die Store-Monade}). Die Prozedur muss eine Ableitung | ||
| 8577 | als monadischen Wert zurückliefern, die dann durch @code{run-with-store} | ||
| 8578 | laufen gelassen wird. | ||
| 8579 | |||
| 8580 | @item --source | ||
| 8581 | @itemx -S | ||
| 8582 | Die Quellcode-Ableitung der Pakete statt die Pakete selbst erstellen. | ||
| 8583 | |||
| 8584 | Zum Beispiel liefert @code{guix build -S gcc} etwas in der Art von | ||
| 8585 | @file{/gnu/store/@dots{}-gcc-4.7.2.tar.bz2}, also den Tarball mit dem | ||
| 8586 | GCC-Quellcode. | ||
| 8587 | |||
| 8588 | Der gelieferte Quell-Tarball ist das Ergebnis davon, alle Patches und | ||
| 8589 | Code-Schnipsel aufzuspielen, die im @code{origin}-Objekt des Pakets | ||
| 8590 | festgelegt wurden (siehe @ref{Pakete definieren}). | ||
| 8591 | |||
| 8592 | @item --sources | ||
| 8593 | Den Quellcode für @var{Paket-oder-Ableitung} und alle Abhängigkeiten davon | ||
| 8594 | rekursiv herunterladen und zurückliefern. Dies ist eine praktische Methode, | ||
| 8595 | eine lokale Kopie des gesamten Quellcodes zu beziehen, der nötig ist, um die | ||
| 8596 | Pakete zu erstellen, damit Sie diese später auch ohne Netzwerkzugang | ||
| 8597 | erstellen lassen können. Es handelt sich um eine Erweiterung der | ||
| 8598 | Befehlszeilenoption @code{--source}, die jeden der folgenden Argumentwerte | ||
| 8599 | akzeptiert: | ||
| 8600 | |||
| 8601 | @table @code | ||
| 8602 | @item package | ||
| 8603 | Mit diesem Wert verhält sich die Befehlszeilenoption @code{--sources} auf | ||
| 8604 | genau die gleiche Weise wie die Befehlszeilenoption @code{--source}. | ||
| 8605 | |||
| 8606 | @item all | ||
| 8607 | Erstellt die Quellcode-Ableitungen aller Pakete einschließlich allen | ||
| 8608 | Quellcodes, der als Teil der Eingaben im @code{inputs}-Feld aufgelistet | ||
| 8609 | ist. Dies ist der vorgegebene Wert, wenn sonst keiner angegeben wird. | ||
| 8610 | |||
| 8611 | @example | ||
| 8612 | $ guix build --sources tzdata | ||
| 8613 | Folgende Ableitungen werden erstellt: | ||
| 8614 | /gnu/store/@dots{}-tzdata2015b.tar.gz.drv | ||
| 8615 | /gnu/store/@dots{}-tzcode2015b.tar.gz.drv | ||
| 8616 | @end example | ||
| 8617 | |||
| 8618 | @item transitive | ||
| 8619 | Die Quellcode-Ableitungen aller Pakete sowie aller transitiven Eingaben der | ||
| 8620 | Pakete erstellen. Damit kann z.B.@: Paket-Quellcode vorab heruntergeladen | ||
| 8621 | und später offline erstellt werden. | ||
| 8622 | |||
| 8623 | @example | ||
| 8624 | $ guix build --sources=transitive tzdata | ||
| 8625 | Folgende Ableitungen werden erstellt: | ||
| 8626 | /gnu/store/@dots{}-tzcode2015b.tar.gz.drv | ||
| 8627 | /gnu/store/@dots{}-findutils-4.4.2.tar.xz.drv | ||
| 8628 | /gnu/store/@dots{}-grep-2.21.tar.xz.drv | ||
| 8629 | /gnu/store/@dots{}-coreutils-8.23.tar.xz.drv | ||
| 8630 | /gnu/store/@dots{}-make-4.1.tar.xz.drv | ||
| 8631 | /gnu/store/@dots{}-bash-4.3.tar.xz.drv | ||
| 8632 | @dots{} | ||
| 8633 | @end example | ||
| 8634 | |||
| 8635 | @end table | ||
| 8636 | |||
| 8637 | @item --system=@var{System} | ||
| 8638 | @itemx -s @var{System} | ||
| 8639 | Versuchen, für die angegebene Art von @var{System} geeignete Binärdateien zu | ||
| 8640 | erstellen — z.B.@: @code{i686-linux} — statt für die Art von System, das die | ||
| 8641 | Erstellung durchführt. | ||
| 8642 | |||
| 8643 | @quotation Anmerkung | ||
| 8644 | Die Befehlszeilenoption @code{--system} dient der @emph{nativen} | ||
| 8645 | Kompilierung (nicht zu verwechseln mit Cross-Kompilierung). Siehe | ||
| 8646 | @code{--target} unten für Informationen zur Cross-Kompilierung. | ||
| 8647 | @end quotation | ||
| 8648 | |||
| 8649 | Ein Beispiel sind Linux-basierte Systeme, die verschiedene Persönlichkeiten | ||
| 8650 | emulieren können. Zum Beispiel können Sie @code{--system=i686-linux} auf | ||
| 8651 | einem @code{x86_64-linux}-System oder @code{--system=armhf-linux} auf einem | ||
| 8652 | @code{aarch64-linux}-System angeben, um Pakete in einer vollständigen | ||
| 8653 | 32-Bit-Umgebung zu erstellen. | ||
| 8654 | |||
| 8655 | @quotation Anmerkung | ||
| 8656 | Das Erstellen für ein @code{armhf-linux}-System ist ungeprüft auf allen | ||
| 8657 | @code{aarch64-linux}-Maschinen aktiviert, obwohl bestimmte aarch64-Chipsätze | ||
| 8658 | diese Funktionalität nicht unterstützen, darunter auch ThunderX. | ||
| 8659 | @end quotation | ||
| 8660 | |||
| 8661 | Ebenso können Sie, wenn transparente Emulation mit QEMU und | ||
| 8662 | @code{binfmt_misc} aktiviert sind (siehe @ref{Virtualisierungsdienste, | ||
| 8663 | @code{qemu-binfmt-service-type}}), für jedes System Erstellungen | ||
| 8664 | durchführen, für das ein QEMU-@code{binfmt_misc}-Handler installiert ist. | ||
| 8665 | |||
| 8666 | Erstellungen für ein anderes System, das nicht dem System der Maschine, die | ||
| 8667 | Sie benutzen, entspricht, können auch auf eine entfernte Maschine mit der | ||
| 8668 | richtigen Architektur ausgelagert werden. Siehe @ref{Auslagern des Daemons einrichten} | ||
| 8669 | für mehr Informationen über das Auslagern. | ||
| 8670 | |||
| 8671 | @item --target=@var{Tripel} | ||
| 8672 | @cindex Cross-Kompilieren | ||
| 8673 | Lässt für das angegebene @var{Tripel} cross-erstellen, dieses muss ein | ||
| 8674 | gültiges GNU-Tripel wie z.B.@: @code{"mips64el-linux-gnu"} sein (siehe | ||
| 8675 | @ref{Specifying target triplets, GNU configuration triplets,, autoconf, | ||
| 8676 | Autoconf}). | ||
| 8677 | |||
| 8678 | @anchor{build-check} | ||
| 8679 | @item --check | ||
| 8680 | @cindex Determinismus, Überprüfung | ||
| 8681 | @cindex Reproduzierbarkeit, Überprüfung | ||
| 8682 | @var{Paket-oder-Ableitung} erneut erstellen, wenn diese bereits im Store | ||
| 8683 | verfügbar ist, und einen Fehler melden, wenn die Erstellungsergebnisse nicht | ||
| 8684 | Bit für Bit identisch sind. | ||
| 8685 | |||
| 8686 | Mit diesem Mechanismus können Sie überprüfen, ob zuvor installierte | ||
| 8687 | Substitute unverfälscht sind (siehe @ref{Substitute}) oder auch ob das | ||
| 8688 | Erstellungsergebnis eines Pakets deterministisch ist. Siehe @ref{Aufruf von guix challenge} für mehr Hintergrundinformationen und Werkzeuge. | ||
| 8689 | |||
| 8690 | Wenn dies zusammen mit @option{--keep-failed} benutzt wird, bleiben die sich | ||
| 8691 | unterscheidenden Ausgaben im Store unter dem Namen | ||
| 8692 | @file{/gnu/store/@dots{}-check}. Dadurch können Unterschiede zwischen den | ||
| 8693 | beiden Ergebnissen leicht erkannt werden. | ||
| 8694 | |||
| 8695 | @item --repair | ||
| 8696 | @cindex Reparieren von Store-Objekten | ||
| 8697 | @cindex Datenbeschädigung, Behebung | ||
| 8698 | Versuchen, die angegebenen Store-Objekte zu reparieren, wenn sie beschädigt | ||
| 8699 | sind, indem sie neu heruntergeladen oder neu erstellt werden. | ||
| 8700 | |||
| 8701 | Diese Operation ist nicht atomar und nur der Administratornutzer @code{root} | ||
| 8702 | kann sie verwenden. | ||
| 8703 | |||
| 8704 | @item --derivations | ||
| 8705 | @itemx -d | ||
| 8706 | Liefert die Ableitungspfade und @emph{nicht} die Ausgabepfade für die | ||
| 8707 | angegebenen Pakete. | ||
| 8708 | |||
| 8709 | @item --root=@var{Datei} | ||
| 8710 | @itemx -r @var{Datei} | ||
| 8711 | @cindex GC-Wurzeln, Hinzufügen | ||
| 8712 | @cindex Müllsammlerwurzeln, Hinzufügen | ||
| 8713 | Die @var{Datei} zu einer symbolischen Verknüpfung auf das Ergebnis machen | ||
| 8714 | und als Müllsammlerwurzel registrieren. | ||
| 8715 | |||
| 8716 | Dadurch wird das Ergebnis dieses Aufrufs von @command{guix build} vor dem | ||
| 8717 | Müllsammler geschützt, bis die @var{Datei} gelöscht wird. Wird diese | ||
| 8718 | Befehlszeilenoption @emph{nicht} angegeben, können Erstellungsergebnisse vom | ||
| 8719 | Müllsammler geholt werden, sobald die Erstellung abgeschlossen ist. Siehe | ||
| 8720 | @ref{Aufruf von guix gc} für mehr Informationen zu Müllsammlerwurzeln. | ||
| 8721 | |||
| 8722 | @item --log-file | ||
| 8723 | @cindex Erstellungsprotokolle, Zugriff | ||
| 8724 | Liefert die Dateinamen oder URLs der Erstellungsprotokolle für das | ||
| 8725 | angegebene @var{Paket-oder-Ableitung} oder meldet einen Fehler, falls | ||
| 8726 | Protokolldateien fehlen. | ||
| 8727 | |||
| 8728 | Dies funktioniert, egal wie die Pakete oder Ableitungen angegeben | ||
| 8729 | werden. Zum Beispiel sind folgende Aufrufe alle äquivalent: | ||
| 8730 | |||
| 8731 | @example | ||
| 8732 | guix build --log-file `guix build -d guile` | ||
| 8733 | guix build --log-file `guix build guile` | ||
| 8734 | guix build --log-file guile | ||
| 8735 | guix build --log-file -e '(@@ (gnu packages guile) guile-2.0)' | ||
| 8736 | @end example | ||
| 8737 | |||
| 8738 | Wenn ein Protokoll lokal nicht verfügbar ist und sofern | ||
| 8739 | @code{--no-substitutes} nicht übergeben wurde, sucht der Befehl nach einem | ||
| 8740 | entsprechenden Protokoll auf einem der Substitutserver (die mit | ||
| 8741 | @code{--substitute-urls} angegeben werden können). | ||
| 8742 | |||
| 8743 | Stellen Sie sich zum Beispiel vor, sie wollten das Erstellungsprotokoll von | ||
| 8744 | GDB auf einem MIPS-System sehen, benutzen aber selbst eine | ||
| 8745 | @code{x86_64}-Maschine: | ||
| 8746 | |||
| 8747 | @example | ||
| 8748 | $ guix build --log-file gdb -s mips64el-linux | ||
| 8749 | https://@value{SUBSTITUTE-SERVER}/log/@dots{}-gdb-7.10 | ||
| 8750 | @end example | ||
| 8751 | |||
| 8752 | So haben Sie umsonst Zugriff auf eine riesige Bibliothek von | ||
| 8753 | Erstellungsprotokollen! | ||
| 8754 | @end table | ||
| 8755 | |||
| 8756 | @node Fehlschläge beim Erstellen untersuchen | ||
| 8757 | @subsection Fehlschläge beim Erstellen untersuchen | ||
| 8758 | |||
| 8759 | @cindex Erstellungsfehler, Fehlersuche | ||
| 8760 | Wenn Sie ein neues Paket definieren (siehe @ref{Pakete definieren}), werden | ||
| 8761 | Sie sich vermutlich einige Zeit mit der Fehlersuche beschäftigen und die | ||
| 8762 | Erstellung so lange anpassen, bis sie funktioniert. Dazu müssen Sie die | ||
| 8763 | Erstellungsbefehle selbst in einer Umgebung benutzen, die der, die der | ||
| 8764 | Erstellungsdaemon aufbaut, so ähnlich wie möglich ist. | ||
| 8765 | |||
| 8766 | Das Erste, was Sie dafür tun müssen, ist die Befehlszeilenoption | ||
| 8767 | @option{--keep-failed} oder @option{-K} von @command{guix build} | ||
| 8768 | einzusetzen, wodurch Verzeichnisbäume fehlgeschlagener Erstellungen in | ||
| 8769 | @file{/tmp} oder dem von Ihnen als @code{TMPDIR} ausgewiesenen Verzeichnis | ||
| 8770 | erhalten und nicht gelöscht werden (siehe @ref{Aufruf von guix build, | ||
| 8771 | @code{--keep-failed}}). | ||
| 8772 | |||
| 8773 | Im Anschluss können Sie mit @command{cd} in die Verzeichnisse dieses | ||
| 8774 | fehlgeschlagenen Erstellungsbaums wechseln und mit @command{source} dessen | ||
| 8775 | @file{environment-variables}-Datei laden, die alle | ||
| 8776 | Umgebungsvariablendefinitionen enthält, die zum Zeitpunkt des Fehlschlags | ||
| 8777 | der Erstellung galten. Sagen wir, Sie suchen Fehler in einem Paket | ||
| 8778 | @code{foo}, dann würde eine typische Sitzung so aussehen: | ||
| 8779 | |||
| 8780 | @example | ||
| 8781 | $ guix build foo -K | ||
| 8782 | @dots{} @i{build fails} | ||
| 8783 | $ cd /tmp/guix-build-foo.drv-0 | ||
| 8784 | $ source ./environment-variables | ||
| 8785 | $ cd foo-1.2 | ||
| 8786 | @end example | ||
| 8787 | |||
| 8788 | Nun können Sie Befehle (fast) so aufrufen, als wären Sie der Daemon, und | ||
| 8789 | Fehlerursachen in Ihrem Erstellungsprozess ermitteln. | ||
| 8790 | |||
| 8791 | Manchmal passiert es, dass zum Beispiel die Tests eines Pakets erfolgreich | ||
| 8792 | sind, wenn Sie sie manuell aufrufen, aber scheitern, wenn der Daemon sie | ||
| 8793 | ausführt. Das kann passieren, weil der Daemon Erstellungen in isolierten | ||
| 8794 | Umgebungen (»Containern«) durchführt, wo, anders als in der obigen Umgebung, | ||
| 8795 | kein Netzwerkzugang möglich ist, @file{/bin/sh} nicht exisiert usw.@: (siehe | ||
| 8796 | @ref{Einrichten der Erstellungsumgebung}). | ||
| 8797 | |||
| 8798 | In solchen Fällen müssen Sie den Erstellungsprozess womöglich aus einer zu | ||
| 8799 | der des Daemons ähnlichen isolierten Umgebung heraus ausprobieren: | ||
| 8800 | |||
| 8801 | @example | ||
| 8802 | $ guix build -K foo | ||
| 8803 | @dots{} | ||
| 8804 | $ cd /tmp/guix-build-foo.drv-0 | ||
| 8805 | $ guix environment --no-grafts -C foo --ad-hoc strace gdb | ||
| 8806 | [env]# source ./environment-variables | ||
| 8807 | [env]# cd foo-1.2 | ||
| 8808 | @end example | ||
| 8809 | |||
| 8810 | Hierbei erzeugt @command{guix environment -C} eine isolierte Umgebung und | ||
| 8811 | öffnet darin eine Shell (siehe @ref{Aufruf von guix environment}). Der Teil | ||
| 8812 | mit @command{--ad-hoc strace gdb} fügt die Befehle @command{strace} und | ||
| 8813 | @command{gdb} zur isolierten Umgebung hinzu, die Sie gut gebrauchen könnten, | ||
| 8814 | während Sie Fehler suchen. Wegen der Befehlszeilenoption | ||
| 8815 | @option{--no-grafts} bekommen Sie haargenau dieselbe Umgebung ohne veredelte | ||
| 8816 | Pakete (siehe @ref{Sicherheitsaktualisierungen} für mehr Informationen zu | ||
| 8817 | Veredelungen). | ||
| 8818 | |||
| 8819 | Um der isolierten Umgebung des Erstellungsdaemons noch näher zu kommen, | ||
| 8820 | können wir @file{/bin/sh} entfernen: | ||
| 8821 | |||
| 8822 | @example | ||
| 8823 | [env]# rm /bin/sh | ||
| 8824 | @end example | ||
| 8825 | |||
| 8826 | (Keine Sorge, das ist harmlos: All dies passiert nur in der zuvor von | ||
| 8827 | @command{guix environment} erzeugten Wegwerf-Umgebung.) | ||
| 8828 | |||
| 8829 | Der Befehl @command{strace} befindet sich wahrscheinlich nicht in Ihrem | ||
| 8830 | Suchpfad, aber wir können ihn so benutzen: | ||
| 8831 | |||
| 8832 | @example | ||
| 8833 | [env]# $GUIX_ENVIRONMENT/bin/strace -f -o log make check | ||
| 8834 | @end example | ||
| 8835 | |||
| 8836 | Auf diese Weise haben Sie nicht nur die Umgebungsvariablen, die der Daemon | ||
| 8837 | benutzt, nachgebildet, sondern lassen auch den Erstellungsprozess in einer | ||
| 8838 | isolierten Umgebung ähnlich der des Daemons laufen. | ||
| 8839 | |||
| 8840 | |||
| 8841 | @node Aufruf von guix edit | ||
| 8842 | @section @command{guix edit} aufrufen | ||
| 8843 | |||
| 8844 | @cindex @command{guix edit} | ||
| 8845 | @cindex Paketdefinition, Bearbeiten | ||
| 8846 | So viele Pakete, so viele Quelldateien! Der Befehl @command{guix edit} | ||
| 8847 | erleichtert das Leben von sowohl Nutzern als auch Paketentwicklern, indem er | ||
| 8848 | Ihren Editor anweist, die Quelldatei mit der Definition des jeweiligen | ||
| 8849 | Pakets zu bearbeiten. Zum Beispiel startet dies: | ||
| 8850 | |||
| 8851 | @example | ||
| 8852 | guix edit gcc@@4.9 vim | ||
| 8853 | @end example | ||
| 8854 | |||
| 8855 | @noindent | ||
| 8856 | das mit der Umgebungsvariablen @code{VISUAL} ode @code{EDITOR} angegebene | ||
| 8857 | Programm und lässt es das Rezept von GCC@tie{}4.9.3 und von Vim anzeigen. | ||
| 8858 | |||
| 8859 | Wenn Sie ein Git-Checkout von Guix benutzen (siehe @ref{Erstellung aus dem Git}) | ||
| 8860 | oder Ihre eigenen Pakete im @code{GUIX_PACKAGE_PATH} erstellt haben (siehe | ||
| 8861 | @ref{Paketmodule}), werden Sie damit die Paketrezepte auch bearbeiten | ||
| 8862 | können. Andernfalls werden Sie zumindest in die Lage versetzt, die nur | ||
| 8863 | lesbaren Rezepte für sich im Moment im Store befindliche Pakete zu | ||
| 8864 | untersuchen. | ||
| 8865 | |||
| 8866 | |||
| 8867 | @node Aufruf von guix download | ||
| 8868 | @section @command{guix download} aufrufen | ||
| 8869 | |||
| 8870 | @cindex @command{guix download} | ||
| 8871 | @cindex Paketquellcode herunterladen | ||
| 8872 | Wenn Entwickler einer Paketdefinition selbige schreiben, müssen diese | ||
| 8873 | normalerweise einen Quellcode-Tarball herunterladen, seinen SHA256-Hash als | ||
| 8874 | Prüfsumme berechnen und diese in der Paketdefinition eintragen (siehe | ||
| 8875 | @ref{Pakete definieren}). Das Werkzeug @command{guix download} hilft bei | ||
| 8876 | dieser Aufgabe: Damit wird eine Datei von der angegebenen URI | ||
| 8877 | heruntergeladen, in den Store eingelagert und sowohl ihr Dateiname im Store | ||
| 8878 | als auch ihr SHA256-Hash als Prüfsumme angezeigt. | ||
| 8879 | |||
| 8880 | Dadurch, dass die heruntergeladene Datei in den Store eingefügt wird, wird | ||
| 8881 | Bandbreite gespart: Wenn der Entwickler schließlich versucht, das neu | ||
| 8882 | definierte Paket mit @command{guix build} zu erstellen, muss der | ||
| 8883 | Quell-Tarball nicht erneut heruntergeladen werden, weil er sich bereits im | ||
| 8884 | Store befindet. Es ist auch eine bequeme Methode, Dateien temporär | ||
| 8885 | aufzubewahren, die letztlich irgendwann gelöscht werden (siehe @ref{Aufruf von guix gc}). | ||
| 8886 | |||
| 8887 | Der Befehl @command{guix download} unterstützt dieselben URIs, die in | ||
| 8888 | Paketdefinitionen verwendet werden. Insbesondere unterstützt er | ||
| 8889 | @code{mirror://}-URIs. @code{https}-URIs (HTTP über TLS) werden unterstützt, | ||
| 8890 | @emph{vorausgesetzt} die Guile-Anbindungen für GnuTLS sind in der Umgebung | ||
| 8891 | des Benutzers verfügbar; wenn nicht, wird ein Fehler gemeldet. Siehe | ||
| 8892 | @ref{Guile Preparations, how to install the GnuTLS bindings for Guile,, | ||
| 8893 | gnutls-guile, GnuTLS-Guile}, hat mehr Informationen. | ||
| 8894 | |||
| 8895 | Mit @command{guix download} werden HTTPS-Serverzertifikate verifiziert, | ||
| 8896 | indem die Zertifikate der X.509-Autoritäten in das durch die | ||
| 8897 | Umgebungsvariable @code{SSL_CERT_DIR} bezeichnete Verzeichnis | ||
| 8898 | heruntergeladen werden (siehe @ref{X.509-Zertifikate}), außer | ||
| 8899 | @option{--no-check-certificate} wird benutzt. | ||
| 8900 | |||
| 8901 | Folgende Befehlszeilenoptionen stehen zur Verfügung: | ||
| 8902 | |||
| 8903 | @table @code | ||
| 8904 | @item --format=@var{Format} | ||
| 8905 | @itemx -f @var{Format} | ||
| 8906 | Die Hash-Prüfsumme im angegebenen @var{Format} ausgeben. Für weitere | ||
| 8907 | Informationen, was gültige Werte für das @var{Format} sind, siehe | ||
| 8908 | @ref{Aufruf von guix hash}. | ||
| 8909 | |||
| 8910 | @item --no-check-certificate | ||
| 8911 | X.509-Zertifikate von HTTPS-Servern @emph{nicht} validieren. | ||
| 8912 | |||
| 8913 | Wenn Sie diese Befehlszeilenoption benutzen, haben Sie @emph{keinerlei | ||
| 8914 | Garantie}, dass Sie tatsächlich mit dem authentischen Server, der für die | ||
| 8915 | angegebene URL verantwortlich ist, kommunizieren. Das macht Sie anfällig | ||
| 8916 | gegen sogenannte »Man-in-the-Middle«-Angriffe. | ||
| 8917 | |||
| 8918 | @item --output=@var{Datei} | ||
| 8919 | @itemx -o @var{Datei} | ||
| 8920 | Die heruntergeladene Datei @emph{nicht} in den Store, sondern in die | ||
| 8921 | angegebene @var{Datei} abspeichern. | ||
| 8922 | @end table | ||
| 8923 | |||
| 8924 | @node Aufruf von guix hash | ||
| 8925 | @section @command{guix hash} aufrufen | ||
| 8926 | |||
| 8927 | @cindex @command{guix hash} | ||
| 8928 | Der Befehl @command{guix hash} berechnet den SHA256-Hash einer Datei. Er ist | ||
| 8929 | primär ein Werkzeug, dass es bequemer macht, etwas zur Distribution | ||
| 8930 | beizusteuern: Damit wird die kryptografische Hash-Prüfsumme berechnet, die | ||
| 8931 | bei der Definition eines Pakets benutzt werden kann (siehe @ref{Pakete definieren}). | ||
| 8932 | |||
| 8933 | Die allgemeine Syntax lautet: | ||
| 8934 | |||
| 8935 | @example | ||
| 8936 | guix hash @var{Option} @var{Datei} | ||
| 8937 | @end example | ||
| 8938 | |||
| 8939 | Wird als @var{Datei} ein Bindestrich @code{-} angegeben, berechnet | ||
| 8940 | @command{guix hash} den Hash der von der Standardeingabe gelesenen | ||
| 8941 | Daten. @command{guix hash} unterstützt die folgenden Optionen: | ||
| 8942 | |||
| 8943 | @table @code | ||
| 8944 | |||
| 8945 | @item --format=@var{Format} | ||
| 8946 | @itemx -f @var{Format} | ||
| 8947 | Gibt die Prüfsumme im angegebenen @var{Format} aus. | ||
| 8948 | |||
| 8949 | Unterstützte Formate: @code{nix-base32}, @code{base32}, @code{base16} | ||
| 8950 | (@code{hex} und @code{hexadecimal} können auch benutzt werden). | ||
| 8951 | |||
| 8952 | Wird keine Befehlszeilenoption @option{--format} angegeben, wird | ||
| 8953 | @command{guix hash} die Prüfsumme im @code{nix-base32}-Format | ||
| 8954 | ausgeben. Diese Darstellung wird bei der Definition von Paketen benutzt. | ||
| 8955 | |||
| 8956 | @item --recursive | ||
| 8957 | @itemx -r | ||
| 8958 | Die Prüfsumme der @var{Datei} rekursiv berechnen. | ||
| 8959 | |||
| 8960 | @c FIXME: Replace xref above with xref to an ``Archive'' section when | ||
| 8961 | @c it exists. | ||
| 8962 | In diesem Fall wird die Prüfsumme eines Archivs berechnet, das die | ||
| 8963 | @var{Datei} enthält, und auch ihre Kinder, wenn es sich um ein Verzeichnis | ||
| 8964 | handelt. Einige der Metadaten der @var{Datei} sind Teil dieses Archivs. Zum | ||
| 8965 | Beispiel unterscheidet sich die berechnete Prüfsumme, wenn die @var{Datei} | ||
| 8966 | eine reguläre Datei ist, je nachdem, ob die @var{Datei} ausführbar ist oder | ||
| 8967 | nicht. Metadaten wie der Zeitstempel haben keinen Einfluss auf die Prüfsumme | ||
| 8968 | (siehe @ref{Aufruf von guix archive}). | ||
| 8969 | |||
| 8970 | @item --exclude-vcs | ||
| 8971 | @itemx -x | ||
| 8972 | Wenn dies zusammen mit der Befehlszeilenoption @option{--recursive} | ||
| 8973 | angegeben wird, werden Verzeichnisse zur Versionskontrolle (@file{.bzr}, | ||
| 8974 | @file{.git}, @file{.hg}, etc.)@: vom Archiv ausgenommen. | ||
| 8975 | |||
| 8976 | @vindex git-fetch | ||
| 8977 | Zum Beispiel würden Sie auf diese Art die Prüfsumme eines Git-Checkouts | ||
| 8978 | berechnen, was nützlich ist, wenn Sie die Prüfsumme für die Methode | ||
| 8979 | @code{git-fetch} benutzen (siehe @ref{»origin«-Referenz}): | ||
| 8980 | |||
| 8981 | @example | ||
| 8982 | $ git clone http://example.org/foo.git | ||
| 8983 | $ cd foo | ||
| 8984 | $ guix hash -rx . | ||
| 8985 | @end example | ||
| 8986 | @end table | ||
| 8987 | |||
| 8988 | @node Aufruf von guix import | ||
| 8989 | @section @command{guix import} aufrufen | ||
| 8990 | |||
| 8991 | @cindex Pakete importieren | ||
| 8992 | @cindex Paketimport | ||
| 8993 | @cindex Pakete an Guix anpassen | ||
| 8994 | @cindex @command{guix import} aufrufen | ||
| 8995 | Der Befehl @command{guix import} ist für Leute hilfreich, die ein Paket | ||
| 8996 | gerne mit so wenig Arbeit wie möglich zur Distribution hinzufügen würden — | ||
| 8997 | ein legitimer Anspruch. Der Befehl kennt ein paar Sammlungen, aus denen mit | ||
| 8998 | ihm Paketmetadaten »importiert« werden können. Das Ergebnis ist eine | ||
| 8999 | Paketdefinition oder eine Vorlage dafür in dem uns bekannten Format (siehe | ||
| 9000 | @ref{Pakete definieren}). | ||
| 9001 | |||
| 9002 | Die allgemeine Syntax lautet: | ||
| 9003 | |||
| 9004 | @example | ||
| 9005 | guix import @var{Importer} @var{Optionen}@dots{} | ||
| 9006 | @end example | ||
| 9007 | |||
| 9008 | Der @var{Importer} gibt die Quelle an, aus der Paketmetadaten importiert | ||
| 9009 | werden, und die @var{Optionen} geben eine Paketbezeichnung und andere vom | ||
| 9010 | @var{Importer} abhängige Daten an. Derzeit sind folgende »Importer« | ||
| 9011 | verfügbar: | ||
| 9012 | |||
| 9013 | @table @code | ||
| 9014 | @item gnu | ||
| 9015 | Metadaten für das angegebene GNU-Paket importieren. Damit wird eine Vorlage | ||
| 9016 | für die neueste Version dieses GNU-Pakets zur Verfügung gestellt, | ||
| 9017 | einschließlich der Prüfsumme seines Quellcode-Tarballs, seiner kanonischen | ||
| 9018 | Zusammenfassung und seiner Beschreibung. | ||
| 9019 | |||
| 9020 | Zusätzliche Informationen wie Paketabhängigkeiten und seine Lizenz müssen | ||
| 9021 | noch manuell ermittelt werden. | ||
| 9022 | |||
| 9023 | Zum Beispiel liefert der folgende Befehl eine Paketdefinition für | ||
| 9024 | GNU@tie{}Hello: | ||
| 9025 | |||
| 9026 | @example | ||
| 9027 | guix import gnu hello | ||
| 9028 | @end example | ||
| 9029 | |||
| 9030 | Speziell für diesen Importer stehen noch folgende Befehlszeilenoptionen zur | ||
| 9031 | Verfügung: | ||
| 9032 | |||
| 9033 | @table @code | ||
| 9034 | @item --key-download=@var{Richtlinie} | ||
| 9035 | Die Richtlinie zum Umgang mit fehlenden OpenPGP-Schlüsseln beim Verifizieren | ||
| 9036 | der Paketsignatur (auch »Beglaubigung« genannt) festlegen, wie bei | ||
| 9037 | @code{guix refresh}. Siehe @ref{Aufruf von guix refresh, | ||
| 9038 | @code{--key-download}}. | ||
| 9039 | @end table | ||
| 9040 | |||
| 9041 | @item pypi | ||
| 9042 | @cindex pypi | ||
| 9043 | Metadaten aus dem @uref{https://pypi.python.org/, Python Package Index} | ||
| 9044 | importieren. Informationen stammen aus der JSON-formatierten Beschreibung, | ||
| 9045 | die unter @code{pypi.python.org} verfügbar ist, und enthalten meistens alle | ||
| 9046 | relevanten Informationen einschließlich der Abhängigkeiten des Pakets. Für | ||
| 9047 | maximale Effizienz wird empfohlen, das Hilfsprogramm @command{unzip} zu | ||
| 9048 | installieren, damit der Importer »Python Wheels« entpacken und daraus Daten | ||
| 9049 | beziehen kann. | ||
| 9050 | |||
| 9051 | Der folgende Befehl importiert Metadaten für das Python-Paket namens | ||
| 9052 | @code{itsdangerous}: | ||
| 9053 | |||
| 9054 | @example | ||
| 9055 | guix import pypi itsdangerous | ||
| 9056 | @end example | ||
| 9057 | |||
| 9058 | @table @code | ||
| 9059 | @item --recursive | ||
| 9060 | @itemx -r | ||
| 9061 | Den Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9062 | durchlaufen und Paketausdrücke für alle solchen Pakete erzeugen, die es in | ||
| 9063 | Guix noch nicht gibt. | ||
| 9064 | @end table | ||
| 9065 | |||
| 9066 | @item gem | ||
| 9067 | @cindex gem | ||
| 9068 | Metadaten von @uref{https://rubygems.org/, RubyGems} | ||
| 9069 | importieren. Informationen kommen aus der JSON-formatierten Beschreibung, | ||
| 9070 | die auf @code{rubygems.org} verfügbar ist, und enthält die relevantesten | ||
| 9071 | Informationen einschließlich der Laufzeitabhängigkeiten. Dies hat aber auch | ||
| 9072 | Schattenseiten — die Metadaten unterscheiden nicht zwischen | ||
| 9073 | Zusammenfassungen und Beschreibungen, daher wird dieselbe Zeichenkette für | ||
| 9074 | beides eingesetzt. Zudem fehlen Informationen zu nicht in Ruby geschriebenen | ||
| 9075 | Abhängigkeiten, die benötigt werden, um native Erweiterungen zu in Ruby | ||
| 9076 | geschriebenem Code zu erstellen. Diese herauszufinden bleibt dem | ||
| 9077 | Paketentwickler überlassen. | ||
| 9078 | |||
| 9079 | Der folgende Befehl importiert Metadaten aus dem Ruby-Paket @code{rails}. | ||
| 9080 | |||
| 9081 | @example | ||
| 9082 | guix import gem rails | ||
| 9083 | @end example | ||
| 9084 | |||
| 9085 | @table @code | ||
| 9086 | @item --recursive | ||
| 9087 | @itemx -r | ||
| 9088 | Den Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9089 | durchlaufen und Paketausdrücke für alle solchen Pakete erzeugen, die es in | ||
| 9090 | Guix noch nicht gibt. | ||
| 9091 | @end table | ||
| 9092 | |||
| 9093 | @item cpan | ||
| 9094 | @cindex CPAN | ||
| 9095 | Importiert Metadaten von @uref{https://www.metacpan.org/, | ||
| 9096 | MetaCPAN}. Informationen werden aus den JSON-formatierten Metadaten | ||
| 9097 | genommen, die über die @uref{https://fastapi.metacpan.org/, | ||
| 9098 | Programmierschnittstelle (»API«) von MetaCPAN} angeboten werden, und | ||
| 9099 | enthalten die relevantesten Informationen wie zum Beispiel | ||
| 9100 | Modulabhängigkeiten. Lizenzinformationen sollten genau nachgeprüft | ||
| 9101 | werden. Wenn Perl im Store verfügbar ist, wird das Werkzeug @code{corelist} | ||
| 9102 | benutzt, um Kernmodule in der Abhängigkeitsliste wegzulassen. | ||
| 9103 | |||
| 9104 | Folgender Befehl importiert Metadaten für das Perl-Modul | ||
| 9105 | @code{Acme::Boolean}: | ||
| 9106 | |||
| 9107 | @example | ||
| 9108 | guix import cpan Acme::Boolean | ||
| 9109 | @end example | ||
| 9110 | |||
| 9111 | @item cran | ||
| 9112 | @cindex CRAN | ||
| 9113 | @cindex Bioconductor | ||
| 9114 | Metadaten aus dem @uref{https://cran.r-project.org/, CRAN} importieren, der | ||
| 9115 | zentralen Sammlung für die @uref{http://r-project.org, statistische und | ||
| 9116 | grafische Umgebung GNU@tie{}R}. | ||
| 9117 | |||
| 9118 | Informationen werden aus der Datei namens @code{DESCRIPTION} des Pakets | ||
| 9119 | extrahiert. | ||
| 9120 | |||
| 9121 | Der folgende Befehl importiert Metadaten für das @code{Cairo}-R-Paket: | ||
| 9122 | |||
| 9123 | @example | ||
| 9124 | guix import cran Cairo | ||
| 9125 | @end example | ||
| 9126 | |||
| 9127 | Wird zudem @code{--recursive} angegeben, wird der Importer den | ||
| 9128 | Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9129 | durchlaufen und Paketausdrücke für all die Pakete erzeugen, die noch nicht | ||
| 9130 | Teil von Guix sind. | ||
| 9131 | |||
| 9132 | Wird @code{--archive=bioconductor} angegeben, werden Metadaten vom | ||
| 9133 | @uref{https://www.bioconductor.org/, Bioconductor} importiert, einer | ||
| 9134 | Sammlung von R-Paketen zur Analyse und zum Verständnis von großen Mengen | ||
| 9135 | genetischer Daten in der Bioinformatik. | ||
| 9136 | |||
| 9137 | Informationen werden aus der @code{DESCRIPTION}-Datei im Paket extrahiert, | ||
| 9138 | das auf der Weboberfläche des Bioconductor-SVN-Repositorys veröffentlicht | ||
| 9139 | wurde. | ||
| 9140 | |||
| 9141 | Der folgende Befehl importiert Metadaten für das R-Paket | ||
| 9142 | @code{GenomicRanges}: | ||
| 9143 | |||
| 9144 | @example | ||
| 9145 | guix import cran --archive=bioconductor GenomicRanges | ||
| 9146 | @end example | ||
| 9147 | |||
| 9148 | @item texlive | ||
| 9149 | @cindex TeX Live | ||
| 9150 | @cindex CTAN | ||
| 9151 | Metadaten aus @uref{http://www.ctan.org/, CTAN}, dem umfassenden | ||
| 9152 | TeX-Archivnetzwerk, herunterladen, was für TeX-Pakete benutzt wird, die Teil | ||
| 9153 | der @uref{https://www.tug.org/texlive/, TeX-Live-Distribution} sind. | ||
| 9154 | |||
| 9155 | Informationen über das Paket werden über die von CTAN angebotene | ||
| 9156 | XML-Programmierschnittstelle bezogen, wohingegen der Quellcode aus dem | ||
| 9157 | SVN-Repository des TeX-Live-Projekts heruntergeladen wird. Das wird so | ||
| 9158 | gemacht, weil CTAN keine versionierten Archive vorhält. | ||
| 9159 | |||
| 9160 | Der folgende Befehl importiert Metadaten für das TeX-Paket @code{fontspec}: | ||
| 9161 | |||
| 9162 | @example | ||
| 9163 | guix import texlive fontspec | ||
| 9164 | @end example | ||
| 9165 | |||
| 9166 | Wenn @code{--archive=VERZEICHNIS} angegeben wird, wird der Quellcode | ||
| 9167 | @emph{nicht} aus dem Unterverzeichnis @file{latex} des | ||
| 9168 | @file{texmf-dist/source}-Baums im SVN-Repository von TeX Live | ||
| 9169 | heruntergeladen, sondern aus dem angegebenen Schwesterverzeichnis im selben | ||
| 9170 | Wurzelverzeichnis. | ||
| 9171 | |||
| 9172 | Der folgende Befehl importiert Metadaten für das Paket @code{ifxetex} aus | ||
| 9173 | CTAN und lädt die Quelldateien aus dem Verzeichnis | ||
| 9174 | @file{texmf/source/generic}: | ||
| 9175 | |||
| 9176 | @example | ||
| 9177 | guix import texlive --archive=generic ifxetex | ||
| 9178 | @end example | ||
| 9179 | |||
| 9180 | @item json | ||
| 9181 | @cindex JSON, Import | ||
| 9182 | Paketmetadaten aus einer lokalen JSON-Datei importieren. Betrachten Sie | ||
| 9183 | folgende Beispiel-Paketdefinition im JSON-Format: | ||
| 9184 | |||
| 9185 | @example | ||
| 9186 | @{ | ||
| 9187 | "name": "hello", | ||
| 9188 | "version": "2.10", | ||
| 9189 | "source": "mirror://gnu/hello/hello-2.10.tar.gz", | ||
| 9190 | "build-system": "gnu", | ||
| 9191 | "home-page": "https://www.gnu.org/software/hello/", | ||
| 9192 | "synopsis": "Hello, GNU world: An example GNU package", | ||
| 9193 | "description": "GNU Hello prints a greeting.", | ||
| 9194 | "license": "GPL-3.0+", | ||
| 9195 | "native-inputs": ["gcc@@6"] | ||
| 9196 | @} | ||
| 9197 | @end example | ||
| 9198 | |||
| 9199 | Die Felder sind genauso benannt wie bei einem @code{<package>}-Verbundstyp | ||
| 9200 | (siehe @ref{Pakete definieren}). Referenzen zu anderen Paketen stehen darin | ||
| 9201 | als JSON-Liste von mit Anführungszeichen quotierten Zeichenketten wie | ||
| 9202 | @code{guile} oder @code{guile@@2.0}. | ||
| 9203 | |||
| 9204 | Der Importer unterstützt auch eine ausdrücklichere Definition der | ||
| 9205 | Quelldateien mit den üblichen Feldern eines @code{<origin>}-Verbunds: | ||
| 9206 | |||
| 9207 | @example | ||
| 9208 | @{ | ||
| 9209 | @dots{} | ||
| 9210 | "source": @{ | ||
| 9211 | "method": "url-fetch", | ||
| 9212 | "uri": "mirror://gnu/hello/hello-2.10.tar.gz", | ||
| 9213 | "sha256": @{ | ||
| 9214 | "base32": "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i" | ||
| 9215 | @} | ||
| 9216 | @} | ||
| 9217 | @dots{} | ||
| 9218 | @} | ||
| 9219 | @end example | ||
| 9220 | |||
| 9221 | Der folgende Befehl liest Metadaten aus der JSON-Datei @code{hello.json} und | ||
| 9222 | gibt einen Paketausdruck aus: | ||
| 9223 | |||
| 9224 | @example | ||
| 9225 | guix import json hello.json | ||
| 9226 | @end example | ||
| 9227 | |||
| 9228 | @item nix | ||
| 9229 | Metadaten aus einer lokalen Kopie des Quellcodes der | ||
| 9230 | @uref{http://nixos.org/nixpkgs/, Nixpkgs-Distribution} | ||
| 9231 | importieren@footnote{Dazu wird der Befehl @command{nix-instantiate} von | ||
| 9232 | @uref{http://nixos.org/nix/, Nix} verwendet.}. Paketdefinitionen in Nixpkgs | ||
| 9233 | werden typischerweise in einer Mischung aus der Sprache von Nix und aus | ||
| 9234 | Bash-Code geschrieben. Dieser Befehl wird nur die abstrakte Paketstruktur, | ||
| 9235 | die in der Nix-Sprache geschrieben ist, importieren. Dazu gehören | ||
| 9236 | normalerweise alle grundlegenden Felder einer Paketdefinition. | ||
| 9237 | |||
| 9238 | Beim Importieren eines GNU-Pakets werden Zusammenfassung und Beschreibung | ||
| 9239 | stattdessen durch deren kanonische Variante bei GNU ersetzt. | ||
| 9240 | |||
| 9241 | Normalerweise würden Sie zunächst dies ausführen: | ||
| 9242 | |||
| 9243 | @example | ||
| 9244 | export NIX_REMOTE=daemon | ||
| 9245 | @end example | ||
| 9246 | |||
| 9247 | @noindent | ||
| 9248 | damit @command{nix-instantiate} nicht versucht, die Nix-Datenbank zu öffnen. | ||
| 9249 | |||
| 9250 | Zum Beispiel importiert der Befehl unten die Paketdefinition von LibreOffice | ||
| 9251 | (genauer gesagt importiert er die Definition des an das Attribut | ||
| 9252 | @code{libreoffice} auf oberster Ebene gebundenen Pakets): | ||
| 9253 | |||
| 9254 | @example | ||
| 9255 | guix import nix ~/path/to/nixpkgs libreoffice | ||
| 9256 | @end example | ||
| 9257 | |||
| 9258 | @item hackage | ||
| 9259 | @cindex hackage | ||
| 9260 | Metadaten aus @uref{https://hackage.haskell.org/, Hackage}, dem zentralen | ||
| 9261 | Paketarchiv der Haskell-Gemeinde, importieren. Informationen werden aus | ||
| 9262 | Cabal-Dateien ausgelesen. Darin sind alle relevanten Informationen | ||
| 9263 | einschließlich der Paketabhängigkeiten enthalten. | ||
| 9264 | |||
| 9265 | Speziell für diesen Importer stehen noch folgende Befehlszeilenoptionen zur | ||
| 9266 | Verfügung: | ||
| 9267 | |||
| 9268 | @table @code | ||
| 9269 | @item --stdin | ||
| 9270 | @itemx -s | ||
| 9271 | Eine Cabal-Datei von der Standardeingabe lesen. | ||
| 9272 | @item --no-test-dependencies | ||
| 9273 | @itemx -t | ||
| 9274 | Keine Abhängigkeiten übernehmen, die nur von Testkatalogen benötigt werden. | ||
| 9275 | @item --cabal-environment=@var{Aliste} | ||
| 9276 | @itemx -e @var{Aliste} | ||
| 9277 | @var{Aliste} muss eine assoziative Liste der Scheme-Programmiersprache sein, | ||
| 9278 | die die Umgebung definiert, in der bedingte Ausdrücke von Cabal ausgewertet | ||
| 9279 | werden. Dabei werden folgende Schlüssel akzeptiert: @code{os}, @code{arch}, | ||
| 9280 | @code{impl} und eine Zeichenkette, die dem Namen einer Option (einer »Flag«) | ||
| 9281 | entspricht. Der mit einer »Flag« assoziierte Wert muss entweder das Symbol | ||
| 9282 | @code{true} oder @code{false} sein. Der anderen Schlüsseln zugeordnete Wert | ||
| 9283 | muss mit der Definition des Cabal-Dateiformats konform sein. Der vorgegebene | ||
| 9284 | Wert zu den Schlüsseln @code{os}, @code{arch} and @code{impl} ist jeweils | ||
| 9285 | @samp{linux}, @samp{x86_64} bzw. @samp{ghc}. | ||
| 9286 | @item --recursive | ||
| 9287 | @itemx -r | ||
| 9288 | Den Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9289 | durchlaufen und Paketausdrücke für alle solchen Pakete erzeugen, die es in | ||
| 9290 | Guix noch nicht gibt. | ||
| 9291 | @end table | ||
| 9292 | |||
| 9293 | Der folgende Befehl importiert Metadaten für die neuste Version des | ||
| 9294 | Haskell-@code{HTTP}-Pakets, ohne Testabhängigkeiten zu übernehmen und bei | ||
| 9295 | Übergabe von @code{false} als Wert der Flag @samp{network-uri}: | ||
| 9296 | |||
| 9297 | @example | ||
| 9298 | guix import hackage -t -e "'((\"network-uri\" . false))" HTTP | ||
| 9299 | @end example | ||
| 9300 | |||
| 9301 | Eine ganz bestimmte Paketversion kann optional ausgewählt werden, indem man | ||
| 9302 | nach dem Paketnamen anschließend ein At-Zeichen und eine Versionsnummer | ||
| 9303 | angibt wie in folgendem Beispiel: | ||
| 9304 | |||
| 9305 | @example | ||
| 9306 | guix import hackage mtl@@2.1.3.1 | ||
| 9307 | @end example | ||
| 9308 | |||
| 9309 | @item stackage | ||
| 9310 | @cindex stackage | ||
| 9311 | Der @code{stackage}-Importer ist ein Wrapper um den | ||
| 9312 | @code{hackage}-Importer. Er nimmt einen Paketnamen und schaut dafür die | ||
| 9313 | Paketversion nach, die Teil einer @uref{https://www.stackage.org, | ||
| 9314 | Stackage}-Veröffentlichung mit Langzeitunterstützung (englisch »Long-Term | ||
| 9315 | Support«, kurz LTS) ist, deren Metadaten er dann mit dem | ||
| 9316 | @code{hackage}-Importer bezieht. Beachten Sie, dass es Ihre Aufgabe ist, | ||
| 9317 | eine LTS-Veröffentlichung auszuwählen, die mit dem von Guix benutzten | ||
| 9318 | GHC-Compiler kompatibel ist. | ||
| 9319 | |||
| 9320 | Speziell für diesen Importer stehen noch folgende Befehlszeilenoptionen zur | ||
| 9321 | Verfügung: | ||
| 9322 | |||
| 9323 | @table @code | ||
| 9324 | @item --no-test-dependencies | ||
| 9325 | @itemx -t | ||
| 9326 | Keine Abhängigkeiten übernehmen, die nur von Testkatalogen benötigt werden. | ||
| 9327 | @item --lts-version=@var{Version} | ||
| 9328 | @itemx -l @var{Version} | ||
| 9329 | @var{Version} ist die gewünschte Version der LTS-Veröffentlichung. Wird | ||
| 9330 | keine angegeben, wird die neueste benutzt. | ||
| 9331 | @item --recursive | ||
| 9332 | @itemx -r | ||
| 9333 | Den Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9334 | durchlaufen und Paketausdrücke für alle solchen Pakete erzeugen, die es in | ||
| 9335 | Guix noch nicht gibt. | ||
| 9336 | @end table | ||
| 9337 | |||
| 9338 | Der folgende Befehl importiert Metadaten für dasjenige | ||
| 9339 | @code{HTTP}-Haskell-Paket, das in der LTS-Stackage-Veröffentlichung mit | ||
| 9340 | Version 7.18 vorkommt: | ||
| 9341 | |||
| 9342 | @example | ||
| 9343 | guix import stackage --lts-version=7.18 HTTP | ||
| 9344 | @end example | ||
| 9345 | |||
| 9346 | @item elpa | ||
| 9347 | @cindex elpa | ||
| 9348 | Metadaten aus der Paketsammlung »Emacs Lisp Package Archive« (ELPA) | ||
| 9349 | importieren (siehe @ref{Packages,,, emacs, The GNU Emacs Manual}). | ||
| 9350 | |||
| 9351 | Speziell für diesen Importer stehen noch folgende Befehlszeilenoptionen zur | ||
| 9352 | Verfügung: | ||
| 9353 | |||
| 9354 | @table @code | ||
| 9355 | @item --archive=@var{Repo} | ||
| 9356 | @itemx -a @var{Repo} | ||
| 9357 | Mit @var{Repo} wird die Archiv-Sammlung (ein »Repository«) bezeichnet, von | ||
| 9358 | dem die Informationen bezogen werden sollen. Derzeit sind die unterstützten | ||
| 9359 | Repositorys und ihre Bezeichnungen folgende: | ||
| 9360 | @itemize - | ||
| 9361 | @item | ||
| 9362 | @uref{http://elpa.gnu.org/packages, GNU}, bezeichnet mit @code{gnu}. Dies | ||
| 9363 | ist die Vorgabe. | ||
| 9364 | |||
| 9365 | Pakete aus @code{elpa.gnu.org} wurden mit einem der Schlüssel im | ||
| 9366 | GnuPG-Schlüsselbund in @file{share/emacs/25.1/etc/package-keyring.gpg} (oder | ||
| 9367 | einem ähnlichen Pfad) des @code{emacs}-Pakets signiert (siehe @ref{Package | ||
| 9368 | Installation, ELPA package signatures,, emacs, The GNU Emacs Manual}). | ||
| 9369 | |||
| 9370 | @item | ||
| 9371 | @uref{http://stable.melpa.org/packages, MELPA-Stable}, bezeichnet mit | ||
| 9372 | @code{melpa-stable}. | ||
| 9373 | |||
| 9374 | @item | ||
| 9375 | @uref{http://melpa.org/packages, MELPA}, bezeichnet mit @code{melpa}. | ||
| 9376 | @end itemize | ||
| 9377 | |||
| 9378 | @item --recursive | ||
| 9379 | @itemx -r | ||
| 9380 | Den Abhängigkeitsgraphen des angegebenen Pakets beim Anbieter rekursiv | ||
| 9381 | durchlaufen und Paketausdrücke für alle solchen Pakete erzeugen, die es in | ||
| 9382 | Guix noch nicht gibt. | ||
| 9383 | @end table | ||
| 9384 | |||
| 9385 | @item crate | ||
| 9386 | @cindex crate | ||
| 9387 | Metadaten aus der Paketsammlung crates.io für Rust importieren | ||
| 9388 | @uref{https://crates.io, crates.io}. | ||
| 9389 | |||
| 9390 | @item opam | ||
| 9391 | @cindex OPAM | ||
| 9392 | @cindex OCaml | ||
| 9393 | Metadaten aus der Paketsammlung @uref{https://opam.ocaml.org/, OPAM} der | ||
| 9394 | OCaml-Gemeinde importieren. | ||
| 9395 | @end table | ||
| 9396 | |||
| 9397 | @command{guix import} verfügt über eine modulare Code-Struktur. Mehr | ||
| 9398 | Importer für andere Paketformate zu haben, wäre nützlich, und Ihre Hilfe ist | ||
| 9399 | hierbei gerne gesehen (siehe @ref{Mitwirken}). | ||
| 9400 | |||
| 9401 | @node Aufruf von guix refresh | ||
| 9402 | @section @command{guix refresh} aufrufen | ||
| 9403 | |||
| 9404 | @cindex @command{guix refresh} | ||
| 9405 | Die Zielgruppe des Befehls @command{guix refresh} zum Auffrischen von | ||
| 9406 | Paketen sind in erster Linie Entwickler der GNU-Software-Distribution. Nach | ||
| 9407 | Vorgabe werden damit alle Pakete in der Distribution gemeldet, die nicht der | ||
| 9408 | neuesten Version des Anbieters entsprechen, indem Sie dies ausführen: | ||
| 9409 | |||
| 9410 | @example | ||
| 9411 | $ guix refresh | ||
| 9412 | gnu/packages/gettext.scm:29:13: gettext would be upgraded from 0.18.1.1 to 0.18.2.1 | ||
| 9413 | gnu/packages/glib.scm:77:12: glib would be upgraded from 2.34.3 to 2.37.0 | ||
| 9414 | @end example | ||
| 9415 | |||
| 9416 | Alternativ können die zu betrachtenden Pakete dabei angegeben werden, was | ||
| 9417 | zur Ausgabe einer Warnung führt, wenn es für Pakete kein | ||
| 9418 | Aktualisierungsprogramm gibt: | ||
| 9419 | |||
| 9420 | @example | ||
| 9421 | $ guix refresh coreutils guile guile-ssh | ||
| 9422 | gnu/packages/ssh.scm:205:2: warning: no updater for guile-ssh | ||
| 9423 | gnu/packages/guile.scm:136:12: guile would be upgraded from 2.0.12 to 2.0.13 | ||
| 9424 | @end example | ||
| 9425 | |||
| 9426 | @command{guix refresh} durchsucht die Paketsammlung beim Anbieter jedes | ||
| 9427 | Pakets und bestimmt, was die höchste Versionsnummer ist, zu der es dort eine | ||
| 9428 | Veröffentlichung gibt. Zum Befehl gehören Aktualisierungsprogramme, mit | ||
| 9429 | denen bestimmte Typen von Paketen automatisch aktualisiert werden können: | ||
| 9430 | GNU-Pakete, ELPA-Pakete usw.@: — siehe die Dokumentation von @option{--type} | ||
| 9431 | unten. Es gibt jedoch auch viele Pakete, für die noch keine Methode | ||
| 9432 | enthalten ist, um das Vorhandensein einer neuen Veröffentlichung zu | ||
| 9433 | prüfen. Der Mechanismus ist aber erweiterbar, also können Sie gerne mit uns | ||
| 9434 | in Kontakt treten, wenn Sie eine neue Methode hinzufügen möchten! | ||
| 9435 | |||
| 9436 | @table @code | ||
| 9437 | |||
| 9438 | @item --recursive | ||
| 9439 | Consider the packages specified, and all the packages upon which they | ||
| 9440 | depend. | ||
| 9441 | |||
| 9442 | @example | ||
| 9443 | $ guix refresh --recursive coreutils | ||
| 9444 | gnu/packages/acl.scm:35:2: warning: no updater for acl | ||
| 9445 | gnu/packages/m4.scm:30:12: info: 1.4.18 is already the latest version of m4 | ||
| 9446 | gnu/packages/xml.scm:68:2: warning: no updater for expat | ||
| 9447 | gnu/packages/multiprecision.scm:40:12: info: 6.1.2 is already the latest version of gmp | ||
| 9448 | @dots{} | ||
| 9449 | @end example | ||
| 9450 | |||
| 9451 | @end table | ||
| 9452 | |||
| 9453 | Manchmal unterscheidet sich der vom Anbieter benutzte Name von dem | ||
| 9454 | Paketnamen, der in Guix verwendet wird, so dass @command{guix refresh} etwas | ||
| 9455 | Unterstützung braucht. Die meisten Aktualisierungsprogramme folgen der | ||
| 9456 | Eigenschaft @code{upstream-name} in Paketdefinitionen, die diese | ||
| 9457 | Unterstützung bieten kann. | ||
| 9458 | |||
| 9459 | @example | ||
| 9460 | (define-public network-manager | ||
| 9461 | (package | ||
| 9462 | (name "network-manager") | ||
| 9463 | ;; @dots{} | ||
| 9464 | (properties '((upstream-name . "NetworkManager"))))) | ||
| 9465 | @end example | ||
| 9466 | |||
| 9467 | Wenn @code{--update} übergeben wird, werden die Quelldateien der | ||
| 9468 | Distribution verändert, so dass für diese Paketrezepte die aktuelle Version | ||
| 9469 | und die aktuelle Hash-Prüfsumme des Quellcode-Tarballs eingetragen wird | ||
| 9470 | (siehe @ref{Pakete definieren}). Dazu werden der neueste Quellcode-Tarball | ||
| 9471 | jedes Pakets sowie die jeweils zugehörige OpenPGP-Signatur heruntergeladen; | ||
| 9472 | mit Letzterer wird der heruntergeladene Tarball gegen seine Signatur mit | ||
| 9473 | @command{gpg} authentifiziert und schließlich dessen Hash berechnet. Wenn | ||
| 9474 | der öffentliche Schlüssel, mit dem der Tarball signiert wurde, im | ||
| 9475 | Schlüsselbund des Benutzers fehlt, wird versucht, ihn automatisch von einem | ||
| 9476 | Schlüssel-Server zu holen; wenn das klappt, wird der Schlüssel zum | ||
| 9477 | Schlüsselbund des Benutzers hinzugefügt, ansonsten meldet @command{guix | ||
| 9478 | refresh} einen Fehler. | ||
| 9479 | |||
| 9480 | Die folgenden Befehlszeilenoptionen werden unterstützt: | ||
| 9481 | |||
| 9482 | @table @code | ||
| 9483 | |||
| 9484 | @item --expression=@var{Ausdruck} | ||
| 9485 | @itemx -e @var{Ausdruck} | ||
| 9486 | Als Paket benutzen, wozu der @var{Ausdruck} ausgewertet wird. | ||
| 9487 | |||
| 9488 | Dies ist nützlich, um genau ein bestimmtes Paket zu referenzieren, wie in | ||
| 9489 | diesem Beispiel: | ||
| 9490 | |||
| 9491 | @example | ||
| 9492 | guix refresh -l -e '(@@@@ (gnu packages commencement) glibc-final)' | ||
| 9493 | @end example | ||
| 9494 | |||
| 9495 | Dieser Befehls listet auf, was alles von der »endgültigen« Erstellung von | ||
| 9496 | libc abhängt (praktisch alle Pakete). | ||
| 9497 | |||
| 9498 | @item --update | ||
| 9499 | @itemx -u | ||
| 9500 | Die Quelldateien der Distribution (die Paketrezepte) werden direkt »in | ||
| 9501 | place« verändert. Normalerweise führen Sie dies aus einem Checkout des | ||
| 9502 | Guix-Quellbaums heraus aus (siehe @ref{Guix vor der Installation ausführen}): | ||
| 9503 | |||
| 9504 | @example | ||
| 9505 | $ ./pre-inst-env guix refresh -s non-core -u | ||
| 9506 | @end example | ||
| 9507 | |||
| 9508 | Siehe @ref{Pakete definieren} für mehr Informationen zu Paketdefinitionen. | ||
| 9509 | |||
| 9510 | @item --select=[@var{Teilmenge}] | ||
| 9511 | @itemx -s @var{Teilmenge} | ||
| 9512 | Wählt alle Pakete aus der @var{Teilmenge} aus, die entweder @code{core} oder | ||
| 9513 | @code{non-core} sein muss. | ||
| 9514 | |||
| 9515 | Die @code{core}-Teilmenge bezieht sich auf alle Pakete, die den Kern der | ||
| 9516 | Distribution ausmachen, d.h.@: Pakete, aus denen heraus »alles andere« | ||
| 9517 | erstellt wird. Dazu gehören GCC, libc, Binutils, Bash und so weiter. In der | ||
| 9518 | Regel ist die Folge einer Änderung an einem dieser Pakete in der | ||
| 9519 | Distribution, dass alle anderen neu erstellt werden müssen. Daher sind | ||
| 9520 | solche Änderungen unangenehm für Nutzer, weil sie einiges an Erstellungszeit | ||
| 9521 | oder Bandbreite investieren müssen, um die Aktualisierung abzuschließen. | ||
| 9522 | |||
| 9523 | Die @code{non-core}-Teilmenge bezieht sich auf die übrigen Pakete. Sie wird | ||
| 9524 | typischerweise dann benutzt, wenn eine Aktualisierung der Kernpakete zu | ||
| 9525 | viele Umstände machen würde. | ||
| 9526 | |||
| 9527 | @item --manifest=@var{Datei} | ||
| 9528 | @itemx -m @var{Datei} | ||
| 9529 | Wählt alle Pakete im in der @var{Datei} stehenden Manifest aus. Das ist | ||
| 9530 | nützlich, um zu überprüfen, welche Pakete aus dem Manifest des Nutzers | ||
| 9531 | aktualisiert werden können. | ||
| 9532 | |||
| 9533 | @item --type=@var{Aktualisierungsprogramm} | ||
| 9534 | @itemx -t @var{Aktualisierungsprogramm} | ||
| 9535 | Nur solche Pakete auswählen, die vom angegebenen | ||
| 9536 | @var{Aktualisierungsprogramm} behandelt werden. Es darf auch eine | ||
| 9537 | kommagetrennte Liste mehrerer Aktualisierungsprogramme angegeben werden. Zur | ||
| 9538 | Zeit kann als @var{Aktualisierungsprogramm} eines der folgenden angegeben | ||
| 9539 | werden: | ||
| 9540 | |||
| 9541 | @table @code | ||
| 9542 | @item gnu | ||
| 9543 | Aktualisierungsprogramm für GNU-Pakete, | ||
| 9544 | @item gnome | ||
| 9545 | Aktualisierungsprogramm für GNOME-Pakete, | ||
| 9546 | @item kde | ||
| 9547 | Aktualisierungsprogramm für KDE-Pakete, | ||
| 9548 | @item xorg | ||
| 9549 | Aktualisierungsprogramm für X.org-Pakete, | ||
| 9550 | @item kernel.org | ||
| 9551 | Aktualisierungsprogramm auf kernel.org angebotener Pakete, | ||
| 9552 | @item elpa | ||
| 9553 | Aktualisierungsprogramm für @uref{http://elpa.gnu.org/, ELPA-Pakete}, | ||
| 9554 | @item cran | ||
| 9555 | Aktualisierungsprogramm für @uref{https://cran.r-project.org/, CRAN-Pakete}, | ||
| 9556 | @item bioconductor | ||
| 9557 | Aktualisierungsprogramm für R-Pakete vom | ||
| 9558 | @uref{https://www.bioconductor.org/, Bioconductor}, | ||
| 9559 | @item cpan | ||
| 9560 | Aktualisierungsprogramm für @uref{http://www.cpan.org/, CPAN-Pakete}, | ||
| 9561 | @item pypi | ||
| 9562 | Aktualisierungsprogramm für @uref{https://pypi.python.org, PyPI-Pakete}, | ||
| 9563 | @item gem | ||
| 9564 | Aktualisierungsprogramm für @uref{https://rubygems.org, RubyGems-Pakete}. | ||
| 9565 | @item github | ||
| 9566 | Aktualisierungsprogramm für @uref{https://github.com, GitHub-Pakete}. | ||
| 9567 | @item hackage | ||
| 9568 | Aktualisierungsprogramm für @uref{https://hackage.haskell.org, | ||
| 9569 | Hackage-Pakete}. | ||
| 9570 | @item stackage | ||
| 9571 | Aktualisierungsprogramm für @uref{https://www.stackage.org, | ||
| 9572 | Stackage-Pakete}. | ||
| 9573 | @item crate | ||
| 9574 | Aktualisierungsprogramm für @uref{https://crates.io, Crates-Pakete}. | ||
| 9575 | @item launchpad | ||
| 9576 | Aktualisierungsprogramm für @uref{https://launchpad.net, Launchpad}. | ||
| 9577 | @end table | ||
| 9578 | |||
| 9579 | Zum Beispiel prüft folgender Befehl nur auf mögliche Aktualisierungen von | ||
| 9580 | auf @code{elpa.gnu.org} angebotenen Emacs-Paketen und von CRAN-Paketen: | ||
| 9581 | |||
| 9582 | @example | ||
| 9583 | $ guix refresh --type=elpa,cran | ||
| 9584 | gnu/packages/statistics.scm:819:13: r-testthat would be upgraded from 0.10.0 to 0.11.0 | ||
| 9585 | gnu/packages/emacs.scm:856:13: emacs-auctex would be upgraded from 11.88.6 to 11.88.9 | ||
| 9586 | @end example | ||
| 9587 | |||
| 9588 | @end table | ||
| 9589 | |||
| 9590 | An @command{guix refresh} können auch ein oder mehrere Paketnamen übergeben | ||
| 9591 | werden wie in diesem Beispiel: | ||
| 9592 | |||
| 9593 | @example | ||
| 9594 | $ ./pre-inst-env guix refresh -u emacs idutils gcc@@4.8 | ||
| 9595 | @end example | ||
| 9596 | |||
| 9597 | @noindent | ||
| 9598 | Der Befehl oben aktualisiert speziell das @code{emacs}- und das | ||
| 9599 | @code{idutils}-Paket. Eine Befehlszeilenoption @code{--select} hätte dann | ||
| 9600 | keine Wirkung. | ||
| 9601 | |||
| 9602 | Wenn Sie sich fragen, ob ein Paket aktualisiert werden sollte oder nicht, | ||
| 9603 | kann es helfen, sich anzuschauen, welche Pakete von der Aktualisierung | ||
| 9604 | betroffen wären und auf Kompatibilität hin geprüft werden sollten. Dazu kann | ||
| 9605 | die folgende Befehlszeilenoption zusammen mit einem oder mehreren Paketnamen | ||
| 9606 | an @command{guix refresh} übergeben werden: | ||
| 9607 | |||
| 9608 | @table @code | ||
| 9609 | |||
| 9610 | @item --list-updaters | ||
| 9611 | @itemx -L | ||
| 9612 | Eine Liste verfügbarer Aktualisierungsprogramme anzeigen und terminieren | ||
| 9613 | (siehe @option{--type} oben). | ||
| 9614 | |||
| 9615 | Für jedes Aktualisierungsprogramm den Anteil der davon betroffenen Pakete | ||
| 9616 | anzeigen; zum Schluss wird der Gesamtanteil von irgendeinem | ||
| 9617 | Aktualisierungsprogramm betroffener Pakete angezeigt. | ||
| 9618 | |||
| 9619 | @item --list-dependent | ||
| 9620 | @itemx -l | ||
| 9621 | Auflisten, welche abhängigen Pakete auf oberster Ebene neu erstellt werden | ||
| 9622 | müssten, wenn eines oder mehrere Pakete aktualisiert würden. | ||
| 9623 | |||
| 9624 | Siehe @ref{Aufruf von guix graph, den @code{reverse-package}-Typ von | ||
| 9625 | @command{guix graph}} für Informationen dazu, wie Sie die Liste der | ||
| 9626 | Abhängigen eines Pakets visualisieren können. | ||
| 9627 | |||
| 9628 | @end table | ||
| 9629 | |||
| 9630 | Bedenken Sie, dass die Befehlszeilenoption @code{--list-dependent} das | ||
| 9631 | Ausmaß der nach einer Aktualisierungen benötigten Neuerstellungen nur | ||
| 9632 | @emph{annähert}. Es könnten auch unter Umständen mehr Neuerstellungen | ||
| 9633 | anfallen. | ||
| 9634 | |||
| 9635 | @example | ||
| 9636 | $ guix refresh --list-dependent flex | ||
| 9637 | Building the following 120 packages would ensure 213 dependent packages are rebuilt: | ||
| 9638 | hop@@2.4.0 geiser@@0.4 notmuch@@0.18 mu@@0.9.9.5 cflow@@1.4 idutils@@4.6 @dots{} | ||
| 9639 | @end example | ||
| 9640 | |||
| 9641 | Der oben stehende Befehl gibt einen Satz von Paketen aus, die Sie erstellen | ||
| 9642 | wollen könnten, um die Kompatibilität einer Aktualisierung des | ||
| 9643 | @code{flex}-Pakets beurteilen zu können. | ||
| 9644 | |||
| 9645 | @table @code | ||
| 9646 | |||
| 9647 | @item --list-transitive | ||
| 9648 | Die Pakete auflisten, von denen eines oder mehrere Pakete abhängen. | ||
| 9649 | |||
| 9650 | @example | ||
| 9651 | $ guix refresh --list-transitive flex | ||
| 9652 | flex@@2.6.4 depends on the following 25 packages: perl@@5.28.0 help2man@@1.47.6 | ||
| 9653 | bison@@3.0.5 indent@@2.2.10 tar@@1.30 gzip@@1.9 bzip2@@1.0.6 xz@@5.2.4 file@@5.33 @dots{} | ||
| 9654 | @end example | ||
| 9655 | |||
| 9656 | @end table | ||
| 9657 | |||
| 9658 | Der oben stehende Befehl gibt einen Satz von Paketen aus, die, wenn sie | ||
| 9659 | geändert würden, eine Neuerstellung des @code{flex}-Pakets auslösen würden. | ||
| 9660 | |||
| 9661 | Mit den folgenden Befehlszeilenoptionen können Sie das Verhalten von GnuPG | ||
| 9662 | anpassen: | ||
| 9663 | |||
| 9664 | @table @code | ||
| 9665 | |||
| 9666 | @item --gpg=@var{Befehl} | ||
| 9667 | Den @var{Befehl} als GnuPG-2.x-Befehl einsetzen. Der @var{Befehl} wird im | ||
| 9668 | @code{$PATH} gesucht. | ||
| 9669 | |||
| 9670 | @item --keyring=@var{Datei} | ||
| 9671 | Die @var{Datei} als Schlüsselbund mit Anbieterschlüsseln verwenden. Die | ||
| 9672 | @var{Datei} muss im @dfn{Keybox-Format} vorliegen. Keybox-Dateien haben | ||
| 9673 | normalerweise einen Namen, der auf @file{.kbx} endet. Sie können mit Hilfe | ||
| 9674 | von GNU@tie{}Privacy Guard (GPG) bearbeitet werden (siehe @ref{kbxutil, | ||
| 9675 | @command{kbxutil},, gnupg, Using the GNU Privacy Guard} für Informationen | ||
| 9676 | über ein Werkzeug zum Bearbeiten von Keybox-Dateien). | ||
| 9677 | |||
| 9678 | Wenn diese Befehlszeilenoption nicht angegeben wird, benutzt @command{guix | ||
| 9679 | refresh} die Keybox-Datei @file{~/.config/guix/upstream/trustedkeys.kbx} als | ||
| 9680 | Schlüsselbund für Signierschlüssel von Anbietern. OpenPGP-Signaturen werden | ||
| 9681 | mit Schlüsseln aus diesem Schlüsselbund überprüft; fehlende Schlüssel werden | ||
| 9682 | auch in diesen Schlüsselbund heruntergeladen (siehe @option{--key-download} | ||
| 9683 | unten). | ||
| 9684 | |||
| 9685 | Sie können Schlüssel aus Ihrem normalerweise benutzten GPG-Schlüsselbund in | ||
| 9686 | eine Keybox-Datei exportieren, indem Sie Befehle wie diesen benutzen: | ||
| 9687 | |||
| 9688 | @example | ||
| 9689 | gpg --export rms@@gnu.org | kbxutil --import-openpgp >> mykeyring.kbx | ||
| 9690 | @end example | ||
| 9691 | |||
| 9692 | Ebenso können Sie wie folgt Schlüssel in eine bestimmte Keybox-Datei | ||
| 9693 | herunterladen: | ||
| 9694 | |||
| 9695 | @example | ||
| 9696 | gpg --no-default-keyring --keyring mykeyring.kbx \ | ||
| 9697 | --recv-keys @value{OPENPGP-SIGNING-KEY-ID} | ||
| 9698 | @end example | ||
| 9699 | |||
| 9700 | Siehe @ref{GPG Configuration Options, @option{--keyring},, gnupg, Using the | ||
| 9701 | GNU Privacy Guard} für mehr Informationen zur Befehlszeilenoption | ||
| 9702 | @option{--keyring} von GPG. | ||
| 9703 | |||
| 9704 | @item --key-download=@var{Richtlinie} | ||
| 9705 | Fehlende OpenPGP-Schlüssel gemäß dieser @var{Richtlinie} behandeln, für die | ||
| 9706 | eine der Folgenden angegeben werden kann: | ||
| 9707 | |||
| 9708 | @table @code | ||
| 9709 | @item always | ||
| 9710 | Immer fehlende OpenPGP-Schlüssel herunterladen und zum GnuPG-Schlüsselbund | ||
| 9711 | des Nutzers hinzufügen. | ||
| 9712 | |||
| 9713 | @item never | ||
| 9714 | Niemals fehlende OpenPGP-Schlüssel herunterladen, sondern einfach abbrechen. | ||
| 9715 | |||
| 9716 | @item interactive | ||
| 9717 | Ist ein Paket mit einem unbekannten OpenPGP-Schlüssel signiert, wird der | ||
| 9718 | Nutzer gefragt, ob der Schlüssel heruntergeladen werden soll oder | ||
| 9719 | nicht. Dies entspricht dem vorgegebenen Verhalten. | ||
| 9720 | @end table | ||
| 9721 | |||
| 9722 | @item --key-server=@var{Host} | ||
| 9723 | Den mit @var{Host} bezeichneten Rechner als Schlüsselserver für OpenPGP | ||
| 9724 | benutzen, wenn ein öffentlicher Schlüssel importiert wird. | ||
| 9725 | |||
| 9726 | @end table | ||
| 9727 | |||
| 9728 | Das @code{github}-Aktualisierungsprogramm benutzt die | ||
| 9729 | @uref{https://developer.github.com/v3/, GitHub-Programmierschnittstelle} | ||
| 9730 | (die »Github-API«), um Informationen über neue Veröffentlichungen | ||
| 9731 | einzuholen. Geschieht dies oft, z.B.@: beim Auffrischen aller Pakete, so | ||
| 9732 | wird GitHub irgendwann aufhören, weitere API-Anfragen zu | ||
| 9733 | beantworten. Normalerweise sind 60 API-Anfragen pro Stunde erlaubt, für eine | ||
| 9734 | vollständige Auffrischung aller GitHub-Pakete in Guix werden aber mehr | ||
| 9735 | benötigt. Wenn Sie sich bei GitHub mit Ihrem eigenen API-Token | ||
| 9736 | authentisieren, gelten weniger einschränkende Grenzwerte. Um einen API-Token | ||
| 9737 | zu benutzen, setzen Sie die Umgebungsvariable @code{GUIX_GITHUB_TOKEN} auf | ||
| 9738 | einen von @uref{https://github.com/settings/tokens} oder anderweitig | ||
| 9739 | bezogenen API-Token. | ||
| 9740 | |||
| 9741 | |||
| 9742 | @node Aufruf von guix lint | ||
| 9743 | @section @command{guix lint} aufrufen | ||
| 9744 | |||
| 9745 | @cindex @command{guix lint} | ||
| 9746 | @cindex Pakete, auf Fehler prüfen | ||
| 9747 | Den Befehl @command{guix lint} gibt es, um Paketentwicklern beim Vermeiden | ||
| 9748 | häufiger Fehler und bei der Einhaltung eines konsistenten Code-Stils zu | ||
| 9749 | helfen. Er führt eine Reihe von Prüfungen auf einer angegebenen Menge von | ||
| 9750 | Paketen durch, um in deren Definition häufige Fehler aufzuspüren. Zu den | ||
| 9751 | verfügbaren @dfn{Prüfern} gehören (siehe @code{--list-checkers} für eine | ||
| 9752 | vollständige Liste): | ||
| 9753 | |||
| 9754 | @table @code | ||
| 9755 | @item synopsis | ||
| 9756 | @itemx description | ||
| 9757 | Überprüfen, ob bestimmte typografische und stilistische Regeln in | ||
| 9758 | Paketbeschreibungen und -zusammenfassungen eingehalten wurden. | ||
| 9759 | |||
| 9760 | @item inputs-should-be-native | ||
| 9761 | Eingaben identifizieren, die wahrscheinlich native Eingaben sein sollten. | ||
| 9762 | |||
| 9763 | @item source | ||
| 9764 | @itemx home-page | ||
| 9765 | @itemx mirror-url | ||
| 9766 | @itemx github-url | ||
| 9767 | @itemx source-file-name | ||
| 9768 | Die URLs für die Felder @code{home-page} und @code{source} anrufen und nicht | ||
| 9769 | erreichbare URLs melden. Wenn passend, wird eine @code{mirror://}-URL | ||
| 9770 | vorgeschlagen. Wenn die Quell-URL auf eine GitHub-URL weiterleitet, wird | ||
| 9771 | eine Empfehlung ausgegeben, direkt letztere zu verwenden. Es wird geprüft, | ||
| 9772 | dass der Quell-Dateiname aussagekräftig ist, dass er also z.B.@: nicht nur | ||
| 9773 | aus einer Versionsnummer besteht oder als »git-checkout« angegeben wurde, | ||
| 9774 | ohne dass ein @code{Dateiname} deklariert wurde (siehe @ref{»origin«-Referenz}). | ||
| 9775 | |||
| 9776 | @item source-unstable-tarball | ||
| 9777 | Parse the @code{source} URL to determine if a tarball from GitHub is | ||
| 9778 | autogenerated or if it is a release tarball. Unfortunately GitHub's | ||
| 9779 | autogenerated tarballs are sometimes regenerated. | ||
| 9780 | |||
| 9781 | @item cve | ||
| 9782 | @cindex Sicherheitslücken | ||
| 9783 | @cindex CVE, Common Vulnerabilities and Exposures | ||
| 9784 | Bekannte Sicherheitslücken melden, die in den Datenbanken der »Common | ||
| 9785 | Vulnerabilities and Exposures« (CVE) aus diesem und dem letzten Jahr | ||
| 9786 | vorkommen, @uref{https://nvd.nist.gov/download.cfm#CVE_FEED, wie sie von der | ||
| 9787 | US-amerikanischen NIST veröffentlicht werden}. | ||
| 9788 | |||
| 9789 | Um Informationen über eine bestimmte Sicherheitslücke angezeigt zu bekommen, | ||
| 9790 | besuchen Sie Webseiten wie: | ||
| 9791 | |||
| 9792 | @itemize | ||
| 9793 | @item | ||
| 9794 | @indicateurl{https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-YYYY-ABCD} | ||
| 9795 | @item | ||
| 9796 | @indicateurl{https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-YYYY-ABCD} | ||
| 9797 | @end itemize | ||
| 9798 | |||
| 9799 | @noindent | ||
| 9800 | wobei Sie statt @code{CVE-YYYY-ABCD} die CVE-Kennnummer angeben — z.B.@: | ||
| 9801 | @code{CVE-2015-7554}. | ||
| 9802 | |||
| 9803 | Paketentwickler können in ihren Paketrezepten den Namen und die Version des | ||
| 9804 | Pakets in der @uref{https://nvd.nist.gov/cpe.cfm,Common Platform Enumeration | ||
| 9805 | (CPE)} angeben, falls sich diese von dem in Guix benutzten Namen und der | ||
| 9806 | Version unterscheiden, zum Beispiel so: | ||
| 9807 | |||
| 9808 | @example | ||
| 9809 | (package | ||
| 9810 | (name "grub") | ||
| 9811 | ;; @dots{} | ||
| 9812 | ;; CPE bezeichnet das Paket als "grub2". | ||
| 9813 | (properties '((cpe-name . "grub2") | ||
| 9814 | (cpe-version . "2.3"))) | ||
| 9815 | @end example | ||
| 9816 | |||
| 9817 | @c See <http://www.openwall.com/lists/oss-security/2017/03/15/3>. | ||
| 9818 | Manche Einträge in der CVE-Datenbank geben die Version des Pakets nicht an, | ||
| 9819 | auf das sie sich beziehen, und würden daher bis in alle Ewigkeit Warnungen | ||
| 9820 | auslösen. Paketentwickler, die CVE-Warnmeldungen gefunden und geprüft haben, | ||
| 9821 | dass diese ignoriert werden können, können sie wie in diesem Beispiel | ||
| 9822 | deklarieren: | ||
| 9823 | |||
| 9824 | @example | ||
| 9825 | (package | ||
| 9826 | (name "t1lib") | ||
| 9827 | ;; @dots{} | ||
| 9828 | ;; Diese CVEs treffen nicht mehr zu und können bedenkenlos ignoriert | ||
| 9829 | ;; werden. | ||
| 9830 | (properties `((lint-hidden-cve . ("CVE-2011-0433" | ||
| 9831 | "CVE-2011-1553" | ||
| 9832 | "CVE-2011-1554" | ||
| 9833 | "CVE-2011-5244"))))) | ||
| 9834 | @end example | ||
| 9835 | |||
| 9836 | @item Formatierung | ||
| 9837 | Offensichtliche Fehler bei der Formatierung von Quellcode melden, z.B.@: | ||
| 9838 | Leerraum-Zeichen am Zeilenende oder Nutzung von Tabulatorzeichen. | ||
| 9839 | @end table | ||
| 9840 | |||
| 9841 | Die allgemeine Syntax lautet: | ||
| 9842 | |||
| 9843 | @example | ||
| 9844 | guix lint @var{Optionen} @var{Pakete}@dots{} | ||
| 9845 | @end example | ||
| 9846 | |||
| 9847 | Wird kein Paket auf der Befehlszeile angegeben, dann werden alle Pakete | ||
| 9848 | geprüft, die es gibt. Als @var{Optionen} können null oder mehr der folgenden | ||
| 9849 | Befehlszeilenoptionen übergeben werden: | ||
| 9850 | |||
| 9851 | @table @code | ||
| 9852 | @item --list-checkers | ||
| 9853 | @itemx -l | ||
| 9854 | Alle verfügbaren Prüfer für die Pakete auflisten und beschreiben. | ||
| 9855 | |||
| 9856 | @item --checkers | ||
| 9857 | @itemx -c | ||
| 9858 | Nur die Prüfer aktivieren, die hiernach in einer kommagetrennten Liste aus | ||
| 9859 | von @code{--list-checkers} aufgeführten Prüfern vorkommen. | ||
| 9860 | |||
| 9861 | @end table | ||
| 9862 | |||
| 9863 | @node Aufruf von guix size | ||
| 9864 | @section @command{guix size} aufrufen | ||
| 9865 | |||
| 9866 | @cindex Größe | ||
| 9867 | @cindex Paketgröße | ||
| 9868 | @cindex Abschluss | ||
| 9869 | @cindex @command{guix size} | ||
| 9870 | Der Befehl @command{guix size} hilft Paketentwicklern dabei, den | ||
| 9871 | Plattenplatzverbrauch von Paketen zu profilieren. Es ist leicht, die | ||
| 9872 | Auswirkungen zu unterschätzen, die das Hinzufügen zusätzlicher | ||
| 9873 | Abhängigkeiten zu einem Paket hat oder die das Verwenden einer einzelnen | ||
| 9874 | Ausgabe für ein leicht aufteilbares Paket ausmacht (siehe @ref{Pakete mit mehreren Ausgaben.}). Das sind typische Probleme, auf die @command{guix size} | ||
| 9875 | aufmerksam machen kann. | ||
| 9876 | |||
| 9877 | Dem Befehl können eine oder mehrere Paketspezifikationen wie @code{gcc@@4.8} | ||
| 9878 | oder @code{guile:debug} übergeben werden, oder ein Dateiname im | ||
| 9879 | Store. Betrachten Sie dieses Beispiel: | ||
| 9880 | |||
| 9881 | @example | ||
| 9882 | $ guix size coreutils | ||
| 9883 | Store-Objekt Gesamt Selbst | ||
| 9884 | /gnu/store/@dots{}-gcc-5.5.0-lib 60.4 30.1 38.1% | ||
| 9885 | /gnu/store/@dots{}-glibc-2.27 30.3 28.8 36.6% | ||
| 9886 | /gnu/store/@dots{}-coreutils-8.28 78.9 15.0 19.0% | ||
| 9887 | /gnu/store/@dots{}-gmp-6.1.2 63.1 2.7 3.4% | ||
| 9888 | /gnu/store/@dots{}-bash-static-4.4.12 1.5 1.5 1.9% | ||
| 9889 | /gnu/store/@dots{}-acl-2.2.52 61.1 0.4 0.5% | ||
| 9890 | /gnu/store/@dots{}-attr-2.4.47 60.6 0.2 0.3% | ||
| 9891 | /gnu/store/@dots{}-libcap-2.25 60.5 0.2 0.2% | ||
| 9892 | Gesamt: 78.9 MiB | ||
| 9893 | @end example | ||
| 9894 | |||
| 9895 | @cindex Abschluss | ||
| 9896 | Die hier aufgelisteten Store-Objekte bilden den @dfn{transitiven Abschluss} | ||
| 9897 | der Coreutils — d.h.@: die Coreutils und all ihre Abhängigkeiten und deren | ||
| 9898 | Abhängigkeiten, rekursiv —, wie sie hiervon angezeigt würden:<f | ||
| 9899 | |||
| 9900 | @example | ||
| 9901 | $ guix gc -R /gnu/store/@dots{}-coreutils-8.23 | ||
| 9902 | @end example | ||
| 9903 | |||
| 9904 | Hier zeigt die Ausgabe neben den Store-Objekten noch drei Spalten. Die erste | ||
| 9905 | Spalte namens »Gesamt« gibt wieder, wieviele Mebibytes (MiB) der Abschluss | ||
| 9906 | des Store-Objekts groß ist — das heißt, dessen eigene Größe plus die Größe | ||
| 9907 | all seiner Abhängigkeiten. Die nächste Spalte, bezeichnet mit »Selbst«, | ||
| 9908 | zeigt die Größe nur dieses Objekts an. Die letzte Spalte zeigt das | ||
| 9909 | Verhältnis der Größe des Objekts zur Gesamtgröße aller hier aufgelisteten | ||
| 9910 | Objekte an. | ||
| 9911 | |||
| 9912 | In diesem Beispiel sehen wir, dass der Abschluss der Coreutils 79@tie{}MiB | ||
| 9913 | schwer ist, wovon das meiste durch libc und die Bibliotheken zur | ||
| 9914 | Laufzeitunterstützung von GCC ausgemacht wird. (Dass libc und die | ||
| 9915 | Bibliotheken vom GCC einen großen Anteil am Abschluss ausmachen, ist aber an | ||
| 9916 | sich noch kein Problem, weil es Bibliotheken sind, die auf dem System | ||
| 9917 | sowieso immer verfügbar sein müssen.) | ||
| 9918 | |||
| 9919 | Wenn das oder die Paket(e), die an @command{guix size} übergeben wurden, im | ||
| 9920 | Store verfügbar sind@footnote{Genauer gesagt braucht @command{guix size} die | ||
| 9921 | @emph{nicht veredelte} Variante des angegebenen Pakets bzw. der Pakete, wie | ||
| 9922 | @code{guix build @var{Paket} --no-grafts} sie liefert. Siehe @ref{Sicherheitsaktualisierungen} für Informationen über Veredelungen.}, beauftragen Sie mit | ||
| 9923 | @command{guix size} den Daemon, die Abhängigkeiten davon zu bestimmen und | ||
| 9924 | deren Größe im Store zu messen, ähnlich wie es mit @command{du -ms | ||
| 9925 | --apparent-size} geschehen würde (siehe @ref{du invocation,,, coreutils, GNU | ||
| 9926 | Coreutils}). | ||
| 9927 | |||
| 9928 | Wenn die übergebenen Pakete @emph{nicht} im Store liegen, erstattet | ||
| 9929 | @command{guix size} Bericht mit Informationen, die aus verfügbaren | ||
| 9930 | Substituten herausgelesen werden (siehe @ref{Substitute}). Dadurch kann die | ||
| 9931 | Plattenausnutzung von Store-Objekten profiliert werden, die gar nicht auf | ||
| 9932 | der Platte liegen und nur auf entfernten Rechnern vorhanden sind. | ||
| 9933 | |||
| 9934 | Sie können auch mehrere Paketnamen angeben: | ||
| 9935 | |||
| 9936 | @example | ||
| 9937 | $ guix size coreutils grep sed bash | ||
| 9938 | Store-Objekt Gesamt Selbst | ||
| 9939 | /gnu/store/@dots{}-coreutils-8.24 77.8 13.8 13.4% | ||
| 9940 | /gnu/store/@dots{}-grep-2.22 73.1 0.8 0.8% | ||
| 9941 | /gnu/store/@dots{}-bash-4.3.42 72.3 4.7 4.6% | ||
| 9942 | /gnu/store/@dots{}-readline-6.3 67.6 1.2 1.2% | ||
| 9943 | @dots{} | ||
| 9944 | Gesamt: 102.3 MiB | ||
| 9945 | @end example | ||
| 9946 | |||
| 9947 | @noindent | ||
| 9948 | In diesem Beispiel sehen wir, dass die Kombination der vier Pakete insgesamt | ||
| 9949 | 102,3@tie{}MiB Platz verbraucht, was wesentlich weniger als die Summe der | ||
| 9950 | einzelnen Abschlüsse ist, weil diese viele Abhängigkeiten gemeinsam | ||
| 9951 | verwenden. | ||
| 9952 | |||
| 9953 | Die verfügbaren Befehlszeilenoptionen sind: | ||
| 9954 | |||
| 9955 | @table @option | ||
| 9956 | |||
| 9957 | @item --substitute-urls=@var{URLs} | ||
| 9958 | Substitutinformationen von den @var{URLs} benutzen. Siehe | ||
| 9959 | @ref{client-substitute-urls, dieselbe Option bei @code{guix build}}. | ||
| 9960 | |||
| 9961 | @item --sort=@var{Schlüssel} | ||
| 9962 | Zeilen anhand des @var{Schlüssel}s sortieren, der eine der folgenden | ||
| 9963 | Alternativen sein muss: | ||
| 9964 | |||
| 9965 | @table @code | ||
| 9966 | @item self | ||
| 9967 | die Größe jedes Objekts (die Vorgabe), | ||
| 9968 | @item Abschluss | ||
| 9969 | die Gesamtgröße des Abschlusses des Objekts. | ||
| 9970 | @end table | ||
| 9971 | |||
| 9972 | @item --map-file=@var{Datei} | ||
| 9973 | Eine grafische Darstellung des Plattenplatzverbrauchs als eine | ||
| 9974 | PNG-formatierte Karte in die @var{Datei} schreiben. | ||
| 9975 | |||
| 9976 | Für das Beispiel oben sieht die Karte so aus: | ||
| 9977 | |||
| 9978 | @image{images/coreutils-size-map,5in,, Karte der Plattenausnutzung der | ||
| 9979 | Coreutils, erzeugt mit @command{guix size}} | ||
| 9980 | |||
| 9981 | Diese Befehlszeilenoption setzt voraus, dass | ||
| 9982 | @uref{http://wingolog.org/software/guile-charting/, Guile-Charting} | ||
| 9983 | installiert und im Suchpfad für Guile-Module sichtbar ist. Falls nicht, | ||
| 9984 | schlägt @command{guix size} beim Versuch fehl, dieses Modul zu laden. | ||
| 9985 | |||
| 9986 | @item --system=@var{System} | ||
| 9987 | @itemx -s @var{System} | ||
| 9988 | Pakete für dieses @var{System} betrachten — z.B.@: für @code{x86_64-linux}. | ||
| 9989 | |||
| 9990 | @end table | ||
| 9991 | |||
| 9992 | @node Aufruf von guix graph | ||
| 9993 | @section @command{guix graph} aufrufen | ||
| 9994 | |||
| 9995 | @cindex DAG | ||
| 9996 | @cindex @command{guix graph} | ||
| 9997 | @cindex Paketabhängigkeiten | ||
| 9998 | Pakete und ihre Abhängigkeiten bilden einen @dfn{Graphen}, genauer gesagt | ||
| 9999 | einen gerichteten azyklischen Graphen (englisch »Directed Acyclic Graph«, | ||
| 10000 | kurz DAG). Es kann schnell schwierig werden, ein Modell eines Paket-DAGs vor | ||
| 10001 | dem geistigen Auge zu behalten, weshalb der Befehl @command{guix graph} eine | ||
| 10002 | visuelle Darstellung des DAGs bietet. Das vorgegebene Verhalten von | ||
| 10003 | @command{guix graph} ist, eine DAG-Darstellung im Eingabeformat von | ||
| 10004 | @uref{http://www.graphviz.org/, Graphviz} auszugeben, damit die Ausgabe | ||
| 10005 | direkt an den Befehl @command{dot} aus Graphviz weitergeleitet werden | ||
| 10006 | kann. Es kann aber auch eine HTML-Seite mit eingebettetem JavaScript-Code | ||
| 10007 | ausgegeben werden, um ein »Sehnendiagramm« (englisch »Chord Diagram«) in | ||
| 10008 | einem Web-Browser anzuzeigen, mit Hilfe der Bibliothek | ||
| 10009 | @uref{https://d3js.org/, d3.js}, oder es können Cypher-Anfragen ausgegeben | ||
| 10010 | werden, mit denen eine die Anfragesprache @uref{http://www.opencypher.org/, | ||
| 10011 | openCypher} unterstützende Graph-Datenbank einen Graphen konstruieren | ||
| 10012 | kann. Die allgemeine Syntax ist: | ||
| 10013 | |||
| 10014 | @example | ||
| 10015 | guix graph @var{Optionen} @var{Pakete}@dots{} | ||
| 10016 | @end example | ||
| 10017 | |||
| 10018 | Zum Beispiel erzeugt der folgende Befehl eine PDF-Datei, die den Paket-DAG | ||
| 10019 | für die GNU@tie{}Core Utilities darstellt, welcher ihre Abhängigkeiten zur | ||
| 10020 | Erstellungszeit anzeigt: | ||
| 10021 | |||
| 10022 | @example | ||
| 10023 | guix graph coreutils | dot -Tpdf > dag.pdf | ||
| 10024 | @end example | ||
| 10025 | |||
| 10026 | Die Ausgabe sieht so aus: | ||
| 10027 | |||
| 10028 | @image{images/coreutils-graph,2in,,Abhängigkeitsgraph der GNU Coreutils} | ||
| 10029 | |||
| 10030 | Ein netter, kleiner Graph, oder? | ||
| 10031 | |||
| 10032 | Aber es gibt mehr als eine Art von Graph! Der Graph oben ist kurz und knapp: | ||
| 10033 | Es ist der Graph der Paketobjekte, ohne implizite Eingaben wie GCC, libc, | ||
| 10034 | grep und so weiter. Oft möchte man einen knappen Graphen sehen, aber | ||
| 10035 | manchmal will man auch mehr Details sehen. @command{guix graph} unterstützt | ||
| 10036 | mehrere Typen von Graphen; Sie können den Detailgrad auswählen. | ||
| 10037 | |||
| 10038 | @table @code | ||
| 10039 | @item package | ||
| 10040 | Der vorgegebene Typ aus dem Beispiel oben. Er zeigt den DAG der Paketobjekte | ||
| 10041 | ohne implizite Abhängigkeiten. Er ist knapp, filtert aber viele Details | ||
| 10042 | heraus. | ||
| 10043 | |||
| 10044 | @item reverse-package | ||
| 10045 | Dies zeigt den @emph{umgekehrten} DAG der Pakete. Zum Beispiel: | ||
| 10046 | |||
| 10047 | @example | ||
| 10048 | guix graph --type=reverse-package ocaml | ||
| 10049 | @end example | ||
| 10050 | |||
| 10051 | ...@: yields the graph of packages that @emph{explicitly} depend on OCaml | ||
| 10052 | (if you are also interested in cases where OCaml is an implicit dependency, | ||
| 10053 | see @code{reverse-bag} below.) | ||
| 10054 | |||
| 10055 | Beachten Sie, dass für Kernpakete damit gigantische Graphen entstehen | ||
| 10056 | können. Wenn Sie nur die Anzahl der Pakete wissen wollen, die von einem | ||
| 10057 | gegebenen Paket abhängen, benutzen Sie @command{guix refresh | ||
| 10058 | --list-dependent} (siehe @ref{Aufruf von guix refresh, | ||
| 10059 | @option{--list-dependent}}). | ||
| 10060 | |||
| 10061 | @item bag-emerged | ||
| 10062 | Dies ist der Paket-DAG @emph{einschließlich} impliziter Eingaben. | ||
| 10063 | |||
| 10064 | Zum Beispiel liefert der folgende Befehl: | ||
| 10065 | |||
| 10066 | @example | ||
| 10067 | guix graph --type=bag-emerged coreutils | dot -Tpdf > dag.pdf | ||
| 10068 | @end example | ||
| 10069 | |||
| 10070 | …@: diesen größeren Graphen: | ||
| 10071 | |||
| 10072 | @image{images/coreutils-bag-graph,,5in,Detaillierter Abhängigkeitsgraph der | ||
| 10073 | GNU Coreutils} | ||
| 10074 | |||
| 10075 | Am unteren Rand des Graphen sehen wir alle impliziten Eingaben des | ||
| 10076 | @var{gnu-build-system} (siehe @ref{Erstellungssysteme, @code{gnu-build-system}}). | ||
| 10077 | |||
| 10078 | Beachten Sie dabei aber, dass auch hier die Abhängigkeiten dieser impliziten | ||
| 10079 | Eingaben — d.h.@: die @dfn{Bootstrap-Abhängigkeiten} (siehe | ||
| 10080 | @ref{Bootstrapping}) — nicht gezeigt werden, damit der Graph knapper bleibt. | ||
| 10081 | |||
| 10082 | @item bag | ||
| 10083 | Ähnlich wie @code{bag-emerged}, aber diesmal mit allen | ||
| 10084 | Bootstrap-Abhängigkeiten. | ||
| 10085 | |||
| 10086 | @item bag-with-origins | ||
| 10087 | Ähnlich wie @code{bag}, aber auch mit den Ursprüngen und deren | ||
| 10088 | Abhängigkeiten. | ||
| 10089 | |||
| 10090 | @item reverse-bag | ||
| 10091 | This shows the @emph{reverse} DAG of packages. Unlike | ||
| 10092 | @code{reverse-package}, it also takes implicit dependencies into account. | ||
| 10093 | For example: | ||
| 10094 | |||
| 10095 | @example | ||
| 10096 | guix graph -t reverse-bag dune | ||
| 10097 | @end example | ||
| 10098 | |||
| 10099 | @noindent | ||
| 10100 | ...@: yields the graph of all packages that depend on Dune, directly or | ||
| 10101 | indirectly. Since Dune is an @emph{implicit} dependency of many packages | ||
| 10102 | @i{via} @code{dune-build-system}, this shows a large number of packages, | ||
| 10103 | whereas @code{reverse-package} would show very few if any. | ||
| 10104 | |||
| 10105 | @item Ableitung | ||
| 10106 | Diese Darstellung ist am detailliertesten: Sie zeigt den DAG der Ableitungen | ||
| 10107 | (siehe @ref{Ableitungen}) und der einfachen Store-Objekte. Verglichen mit | ||
| 10108 | obiger Darstellung sieht man viele zusätzliche Knoten einschließlich | ||
| 10109 | Erstellungs-Skripts, Patches, Guile-Module usw. | ||
| 10110 | |||
| 10111 | Für diesen Typ Graph kann auch der Name einer @file{.drv}-Datei anstelle | ||
| 10112 | eines Paketnamens angegeben werden, etwa so: | ||
| 10113 | |||
| 10114 | @example | ||
| 10115 | guix graph -t derivation `guix system build -d my-config.scm` | ||
| 10116 | @end example | ||
| 10117 | |||
| 10118 | @item module | ||
| 10119 | Dies ist der Graph der @dfn{Paketmodule} (siehe @ref{Paketmodule}). Zum | ||
| 10120 | Beispiel zeigt der folgende Befehl den Graph für das Paketmodul an, das das | ||
| 10121 | @code{guile}-Paket definiert: | ||
| 10122 | |||
| 10123 | @example | ||
| 10124 | guix graph -t module guile | dot -Tpdf > modul-graph.pdf | ||
| 10125 | @end example | ||
| 10126 | @end table | ||
| 10127 | |||
| 10128 | Alle oben genannten Typen entsprechen @emph{Abhängigkeiten zur | ||
| 10129 | Erstellungszeit}. Der folgende Graphtyp repräsentiert die | ||
| 10130 | @emph{Abhängigkeiten zur Laufzeit}: | ||
| 10131 | |||
| 10132 | @table @code | ||
| 10133 | @item references | ||
| 10134 | Dies ist der Graph der @dfn{Referenzen} einer Paketausgabe, wie | ||
| 10135 | @command{guix gc --references} sie liefert (siehe @ref{Aufruf von guix gc}). | ||
| 10136 | |||
| 10137 | Wenn die angegebene Paketausgabe im Store nicht verfügbar ist, versucht | ||
| 10138 | @command{guix graph}, die Abhängigkeitsinformationen aus Substituten zu | ||
| 10139 | holen. | ||
| 10140 | |||
| 10141 | Hierbei können Sie auch einen Store-Dateinamen statt eines Paketnamens | ||
| 10142 | angeben. Zum Beispiel generiert der Befehl unten den Referenzgraphen Ihres | ||
| 10143 | Profils (der sehr groß werden kann!): | ||
| 10144 | |||
| 10145 | @example | ||
| 10146 | guix graph -t references `readlink -f ~/.guix-profile` | ||
| 10147 | @end example | ||
| 10148 | |||
| 10149 | @item referrers | ||
| 10150 | Dies ist der Graph der ein Store-Objekt @dfn{referenzierenden} Objekte, wie | ||
| 10151 | @command{guix gc --referrers} sie liefern würde (siehe @ref{Aufruf von guix gc}). | ||
| 10152 | |||
| 10153 | Er basiert ausschließlich auf lokalen Informationen aus Ihrem Store. Nehmen | ||
| 10154 | wir zum Beispiel an, dass das aktuelle Inkscape in 10 Profilen verfügbar | ||
| 10155 | ist, dann wird @command{guix graph -t referrers inkscape} einen Graph | ||
| 10156 | zeigen, der bei Inkscape gewurzelt ist und Kanten zu diesen 10 Profilen hat. | ||
| 10157 | |||
| 10158 | Ein solcher Graph kann dabei helfen, herauszufinden, weshalb ein | ||
| 10159 | Store-Objekt nicht vom Müllsammler abgeholt werden kann. | ||
| 10160 | |||
| 10161 | @end table | ||
| 10162 | |||
| 10163 | Folgendes sind die verfügbaren Befehlszeilenoptionen: | ||
| 10164 | |||
| 10165 | @table @option | ||
| 10166 | @item --type=@var{Typ} | ||
| 10167 | @itemx -t @var{Typ} | ||
| 10168 | Eine Graph-Ausgabe dieses @var{Typ}s generieren. Dieser @var{Typ} muss einer | ||
| 10169 | der oben genannten Werte sein. | ||
| 10170 | |||
| 10171 | @item --list-types | ||
| 10172 | Die unterstützten Graph-Typen auflisten. | ||
| 10173 | |||
| 10174 | @item --backend=@var{Backend} | ||
| 10175 | @itemx -b @var{Backend} | ||
| 10176 | Einen Graph mit Hilfe des ausgewählten @var{Backend}s generieren. | ||
| 10177 | |||
| 10178 | @item --list-backends | ||
| 10179 | Die unterstützten Graph-Backends auflisten. | ||
| 10180 | |||
| 10181 | Derzeit sind die verfügbaren Backends Graphviz und d3.js. | ||
| 10182 | |||
| 10183 | @item --expression=@var{Ausdruck} | ||
| 10184 | @itemx -e @var{Ausdruck} | ||
| 10185 | Als Paket benutzen, wozu der @var{Ausdruck} ausgewertet wird. | ||
| 10186 | |||
| 10187 | Dies ist nützlich, um genau ein bestimmtes Paket zu referenzieren, wie in | ||
| 10188 | diesem Beispiel: | ||
| 10189 | |||
| 10190 | @example | ||
| 10191 | guix graph -e '(@@@@ (gnu packages commencement) gnu-make-final)' | ||
| 10192 | @end example | ||
| 10193 | |||
| 10194 | @item --system=@var{System} | ||
| 10195 | @itemx -s @var{System} | ||
| 10196 | Den Graphen für das @var{System} anzeigen — z.B.@: @code{i686-linux}. | ||
| 10197 | |||
| 10198 | Der Abhängigkeitsgraph ist größtenteils von der Systemarchitektur | ||
| 10199 | unabhängig, aber ein paar architekturabhängige Teile können Ihnen mit dieser | ||
| 10200 | Befehlszeilenoption visualisiert werden. | ||
| 10201 | @end table | ||
| 10202 | |||
| 10203 | |||
| 10204 | |||
| 10205 | @node Aufruf von guix publish | ||
| 10206 | @section @command{guix publish} aufrufen | ||
| 10207 | |||
| 10208 | @cindex @command{guix publish} | ||
| 10209 | Der Zweck von @command{guix publish} ist, es Nutzern zu ermöglichen, ihren | ||
| 10210 | Store auf einfache Weise mit anderen zu teilen, die ihn dann als | ||
| 10211 | Substitutserver einsetzen können (siehe @ref{Substitute}). | ||
| 10212 | |||
| 10213 | Wenn @command{guix publish} ausgeführt wird, wird dadurch ein HTTP-Server | ||
| 10214 | gestartet, so dass jeder mit Netzwerkzugang davon Substitute beziehen | ||
| 10215 | kann. Das bedeutet, dass jede Maschine, auf der Guix läuft, auch als | ||
| 10216 | Build-Farm fungieren kann, weil die HTTP-Schnittstelle mit Hydra, der | ||
| 10217 | Software, mit der die offizielle Build-Farm @code{@value{SUBSTITUTE-SERVER}} | ||
| 10218 | betrieben wird, kompatibel ist. | ||
| 10219 | |||
| 10220 | Um Sicherheit zu gewährleisten, wird jedes Substitut signiert, so dass | ||
| 10221 | Empfänger dessen Authentizität und Integrität nachprüfen können (siehe | ||
| 10222 | @ref{Substitute}). Weil @command{guix publish} den Signierschlüssel des | ||
| 10223 | Systems benutzt, der nur vom Systemadministrator gelesen werden kann, muss | ||
| 10224 | es als der Administratornutzer »root« gestartet werden. Mit der | ||
| 10225 | Befehlszeilenoption @code{--user} werden Administratorrechte bald nach dem | ||
| 10226 | Start wieder abgelegt. | ||
| 10227 | |||
| 10228 | Das Schlüsselpaar zum Signieren muss erzeugt werden, bevor @command{guix | ||
| 10229 | publish} gestartet wird. Dazu können Sie @command{guix archive | ||
| 10230 | --generate-key} ausführen (siehe @ref{Aufruf von guix archive}). | ||
| 10231 | |||
| 10232 | Die allgemeine Syntax lautet: | ||
| 10233 | |||
| 10234 | @example | ||
| 10235 | guix publish @var{Optionen}@dots{} | ||
| 10236 | @end example | ||
| 10237 | |||
| 10238 | Wird @command{guix publish} ohne weitere Argumente ausgeführt, wird damit | ||
| 10239 | ein HTTP-Server gestartet, der auf Port 8080 lauscht: | ||
| 10240 | |||
| 10241 | @example | ||
| 10242 | guix publish | ||
| 10243 | @end example | ||
| 10244 | |||
| 10245 | Sobald ein Server zum Veröffentlichen autorisiert wurde (siehe @ref{Aufruf von guix archive}), kann der Daemon davon Substitute herunterladen: | ||
| 10246 | |||
| 10247 | @example | ||
| 10248 | guix-daemon --substitute-urls=http://example.org:8080 | ||
| 10249 | @end example | ||
| 10250 | |||
| 10251 | Nach den Voreinstellungen komprimiert @command{guix publish} Archive erst | ||
| 10252 | dann, wenn sie angefragt werden. Dieser »dynamische« Modus bietet sich an, | ||
| 10253 | weil so nichts weiter eingerichtet werden muss und er direkt verfügbar | ||
| 10254 | ist. Wenn Sie allerdings viele Clients bedienen wollen, empfehlen wir, dass | ||
| 10255 | Sie die Befehlszeilenoption @option{--cache} benutzen, die das | ||
| 10256 | Zwischenspeichern der komprimierten Archive aktiviert, bevor diese an die | ||
| 10257 | Clients geschickt werden — siehe unten für Details. Mit dem Befehl | ||
| 10258 | @command{guix weather} haben Sie eine praktische Methode zur Hand, zu | ||
| 10259 | überprüfen, was so ein Server anbietet (siehe @ref{Aufruf von guix weather}). | ||
| 10260 | |||
| 10261 | Als Bonus dient @command{guix publish} auch als inhaltsadressierbarer | ||
| 10262 | Spiegelserver für Quelldateien, die in @code{origin}-Verbundsobjekten | ||
| 10263 | eingetragen sind (siehe @ref{»origin«-Referenz}). Wenn wir zum Beispiel | ||
| 10264 | annehmen, dass @command{guix publish} auf @code{example.org} läuft, liefert | ||
| 10265 | folgende URL die rohe @file{hello-2.10.tar.gz}-Datei mit dem angegebenen | ||
| 10266 | SHA256-Hash als ihre Prüfsumme (dargestellt im @code{nix-base32}-Format, | ||
| 10267 | siehe @ref{Aufruf von guix hash}): | ||
| 10268 | |||
| 10269 | @example | ||
| 10270 | http://example.org/file/hello-2.10.tar.gz/sha256/0ssi1@dots{}ndq1i | ||
| 10271 | @end example | ||
| 10272 | |||
| 10273 | Offensichtlich funktionieren diese URLs nur mit solchen Dateien, die auch im | ||
| 10274 | Store vorliegen; in anderen Fällen werden sie 404 (»Nicht gefunden«) | ||
| 10275 | zurückliefern. | ||
| 10276 | |||
| 10277 | @cindex Erstellungsprotokolle, Veröffentlichen | ||
| 10278 | Erstellungsprotokolle sind unter @code{/log}-URLs abrufbar: | ||
| 10279 | |||
| 10280 | @example | ||
| 10281 | http://example.org/log/gwspk@dots{}-guile-2.2.3 | ||
| 10282 | @end example | ||
| 10283 | |||
| 10284 | @noindent | ||
| 10285 | Ist der @command{guix-daemon} so eingestellt, dass er Erstellungsprotokolle | ||
| 10286 | komprimiert abspeichert, wie es voreingestellt ist (siehe @ref{Aufruf des guix-daemon}), liefern @code{/log}-URLs das unveränderte komprimierte | ||
| 10287 | Protokoll, mit einer entsprechenden @code{Content-Type}- und/oder | ||
| 10288 | @code{Content-Encoding}-Kopfzeile. Wir empfehlen dabei, dass Sie den | ||
| 10289 | @command{guix-daemon} mit @code{--log-compression=gzip} ausführen, weil | ||
| 10290 | Web-Browser dieses Format automatisch dekomprimieren können, was bei | ||
| 10291 | bzip2-Kompression nicht der Fall ist. | ||
| 10292 | |||
| 10293 | Folgende Befehlszeilenoptionen stehen zur Verfügung: | ||
| 10294 | |||
| 10295 | @table @code | ||
| 10296 | @item --port=@var{Port} | ||
| 10297 | @itemx -p @var{Port} | ||
| 10298 | Auf HTTP-Anfragen auf diesem @var{Port} lauschen. | ||
| 10299 | |||
| 10300 | @item --listen=@var{Host} | ||
| 10301 | Auf der Netzwerkschnittstelle für den angegebenen @var{Host}, also der | ||
| 10302 | angegebenen Rechneradresse, lauschen. Vorgegeben ist, Verbindungen mit jeder | ||
| 10303 | Schnittstelle zu akzeptieren. | ||
| 10304 | |||
| 10305 | @item --user=@var{Benutzer} | ||
| 10306 | @itemx -u @var{Benutzer} | ||
| 10307 | So früh wie möglich alle über die Berechtigungen des @var{Benutzer}s | ||
| 10308 | hinausgehenden Berechtigungen ablegen — d.h.@: sobald der Server-Socket | ||
| 10309 | geöffnet und der Signierschlüssel gelesen wurde. | ||
| 10310 | |||
| 10311 | @item --compression[=@var{Stufe}] | ||
| 10312 | @itemx -C [@var{Stufe}] | ||
| 10313 | Daten auf der angegebenen Kompressions-@var{Stufe} komprimieren. Wird als | ||
| 10314 | @var{Stufe} null angegeben, wird Kompression deaktiviert. Der Bereich von 1 | ||
| 10315 | bis 9 entspricht unterschiedlichen gzip-Kompressionsstufen: 1 ist am | ||
| 10316 | schnellsten, während 9 am besten komprimiert (aber den Prozessor mehr | ||
| 10317 | auslastet). Der Vorgabewert ist 3. | ||
| 10318 | |||
| 10319 | Wenn @option{--cache} nicht übergeben wird, werden Daten dynamisch immer | ||
| 10320 | erst dann komprimiert, wenn sie abgeschickt werden; komprimierte Datenströme | ||
| 10321 | landen in keinem Zwischenspeicher. Um also die Auslastung der Maschine, auf | ||
| 10322 | der @command{guix publish} läuft, zu reduzieren, kann es eine gute Idee | ||
| 10323 | sein, eine niedrige Kompressionsstufe zu wählen, @command{guix publish} | ||
| 10324 | einen Proxy mit Zwischenspeicher (einen »Caching Proxy«) voranzuschalten, | ||
| 10325 | oder @option{--cache} zu benutzen. @option{--cache} zu benutzen, hat den | ||
| 10326 | Vorteil, dass @command{guix publish} damit eine | ||
| 10327 | @code{Content-Length}-HTTP-Kopfzeile seinen Antworten beifügen kann. | ||
| 10328 | |||
| 10329 | @item --cache=@var{Verzeichnis} | ||
| 10330 | @itemx -c @var{Verzeichnis} | ||
| 10331 | Archive und Metadaten (@code{.narinfo}-URLs) in das @var{Verzeichnis} | ||
| 10332 | zwischenspeichern und nur solche Archive versenden, die im Zwischenspeicher | ||
| 10333 | vorliegen. | ||
| 10334 | |||
| 10335 | Wird diese Befehlszeilenoption weggelassen, dann werden Archive und | ||
| 10336 | Metadaten »dynamisch« erst auf eine Anfrage hin erzeugt. Dadurch kann die | ||
| 10337 | verfügbare Bandbreite reduziert werden, besonders wenn Kompression aktiviert | ||
| 10338 | ist, weil die Operation dann durch die Prozessorleistung beschränkt sein | ||
| 10339 | kann. Noch ein Nachteil des voreingestellten Modus ist, dass die Länge der | ||
| 10340 | Archive nicht im Voraus bekannt ist, @command{guix publish} also keine | ||
| 10341 | @code{Content-Length}-HTTP-Kopfzeile an seine Antworten anfügt, wodurch | ||
| 10342 | Clients nicht wissen können, welche Datenmenge noch heruntergeladen werden | ||
| 10343 | muss. | ||
| 10344 | |||
| 10345 | Im Gegensatz dazu liefert, wenn @option{--cache} benutzt wird, die erste | ||
| 10346 | Anfrage nach einem Store-Objekt (über dessen @code{.narinfo}-URL) den | ||
| 10347 | Fehlercode 404, und im Hintergrund wird ein Prozess gestartet, der das | ||
| 10348 | Archiv in den Zwischenspeicher einlagert (auf Englisch sagen wir »@dfn{bake} | ||
| 10349 | the archive«), d.h.@: seine @code{.narinfo} wird berechnet und das Archiv, | ||
| 10350 | falls nötig, komprimiert. Sobald das Archiv im @var{Verzeichnis} | ||
| 10351 | zwischengespeichert wurde, werden nachfolgende Anfragen erfolgreich sein und | ||
| 10352 | direkt aus dem Zwischenspeicher bedient, der garantiert, dass Clients | ||
| 10353 | optimale Bandbreite genießen. | ||
| 10354 | |||
| 10355 | Der Prozess zum Einlagern wird durch Worker-Threads umgesetzt. Der Vorgabe | ||
| 10356 | entsprechend wird dazu pro Prozessorkern ein Thread erzeugt, aber dieses | ||
| 10357 | Verhalten kann angepasst werden. Siehe @option{--workers} weiter unten. | ||
| 10358 | |||
| 10359 | Wird @option{--ttl} verwendet, werden zwischengespeicherte Einträge | ||
| 10360 | automatisch gelöscht, sobald die dabei angegebene Zeit abgelaufen ist. | ||
| 10361 | |||
| 10362 | @item --workers=@var{N} | ||
| 10363 | Wird @option{--cache} benutzt, wird die Reservierung von @var{N} | ||
| 10364 | Worker-Threads angefragt, um Archive einzulagern. | ||
| 10365 | |||
| 10366 | @item --ttl=@var{ttl} | ||
| 10367 | @code{Cache-Control}-HTTP-Kopfzeilen erzeugen, die eine Time-to-live (TTL) | ||
| 10368 | von @var{ttl} signalisieren. Für @var{ttl} muss eine Dauer (mit dem | ||
| 10369 | Anfangsbuchstaben der Maßeinheit der Dauer im Englischen) angegeben werden: | ||
| 10370 | @code{5d} bedeutet 5 Tage, @code{1m} bedeutet 1 Monat und so weiter. | ||
| 10371 | |||
| 10372 | Das ermöglicht es Guix, Substitutinformationen @var{ttl} lang | ||
| 10373 | zwischenzuspeichern. Beachten Sie allerdings, dass @code{guix publish} | ||
| 10374 | selbst @emph{nicht} garantiert, dass die davon angebotenen Store-Objekte so | ||
| 10375 | lange verfügbar bleiben, wie es die @var{ttl} vorsieht. | ||
| 10376 | |||
| 10377 | Des Weiteren können bei Nutzung von @option{--cache} die | ||
| 10378 | zwischengespeicherten Einträge gelöscht werden, wenn auf sie @var{ttl} lang | ||
| 10379 | nicht zugegriffen wurde und kein ihnen entsprechendes Objekt mehr im Store | ||
| 10380 | existiert. | ||
| 10381 | |||
| 10382 | @item --nar-path=@var{Pfad} | ||
| 10383 | Den @var{Pfad} als Präfix für die URLs von »nar«-Dateien benutzen (siehe | ||
| 10384 | @ref{Aufruf von guix archive, normalized archives}). | ||
| 10385 | |||
| 10386 | Vorgegeben ist, dass Nars unter einer URL mit | ||
| 10387 | @code{/nar/gzip/@dots{}-coreutils-8.25} angeboten werden. Mit dieser | ||
| 10388 | Befehlszeilenoption können Sie den @code{/nar}-Teil durch den angegebenen | ||
| 10389 | @var{Pfad} ersetzen. | ||
| 10390 | |||
| 10391 | @item --public-key=@var{Datei} | ||
| 10392 | @itemx --private-key=@var{Datei} | ||
| 10393 | Die angegebenen @var{Datei}en als das Paar aus öffentlichem und privatem | ||
| 10394 | Schlüssel zum Signieren veröffentlichter Store-Objekte benutzen. | ||
| 10395 | |||
| 10396 | Die Dateien müssen demselben Schlüsselpaar entsprechen (der private | ||
| 10397 | Schlüssel wird zum Signieren benutzt, der öffentliche Schlüssel wird | ||
| 10398 | lediglich in den Metadaten der Signatur aufgeführt). Die Dateien müssen | ||
| 10399 | Schlüssel im kanonischen (»canonical«) S-Ausdruck-Format enthalten, wie es | ||
| 10400 | von @command{guix archive --generate-key} erzeugt wird (siehe @ref{Aufruf von guix archive}). Vorgegeben ist, dass @file{/etc/guix/signing-key.pub} und | ||
| 10401 | @file{/etc/guix/signing-key.sec} benutzt werden. | ||
| 10402 | |||
| 10403 | @item --repl[=@var{Port}] | ||
| 10404 | @itemx -r [@var{Port}] | ||
| 10405 | Einen Guile-REPL-Server (siehe @ref{REPL Servers,,, guile, GNU Guile | ||
| 10406 | Reference Manual}) auf diesem @var{Port} starten (37146 ist | ||
| 10407 | voreingestellt). Dies kann zur Fehlersuche auf einem laufenden | ||
| 10408 | »@command{guix publish}«-Server benutzt werden. | ||
| 10409 | @end table | ||
| 10410 | |||
| 10411 | @command{guix publish} auf einem »Guix System«-System zu aktivieren ist ein | ||
| 10412 | Einzeiler: Instanziieren Sie einfach einen | ||
| 10413 | @code{guix-publish-service-type}-Dienst im @code{services}-Feld Ihres | ||
| 10414 | @code{operating-system}-Objekts zur Betriebssystemdeklaration (siehe | ||
| 10415 | @ref{guix-publish-service-type, @code{guix-publish-service-type}}). | ||
| 10416 | |||
| 10417 | Falls Sie Guix aber auf einer »Fremddistribution« laufen lassen, folgen Sie | ||
| 10418 | folgenden Anweisungen: | ||
| 10419 | |||
| 10420 | @itemize | ||
| 10421 | @item | ||
| 10422 | Wenn Ihre Wirtsdistribution systemd als »init«-System benutzt: | ||
| 10423 | |||
| 10424 | @example | ||
| 10425 | # ln -s ~root/.guix-profile/lib/systemd/system/guix-publish.service \ | ||
| 10426 | /etc/systemd/system/ | ||
| 10427 | # systemctl start guix-publish && systemctl enable guix-publish | ||
| 10428 | @end example | ||
| 10429 | |||
| 10430 | @item | ||
| 10431 | Wenn Ihre Wirts-Distribution als »init«-System Upstart verwendet: | ||
| 10432 | |||
| 10433 | @example | ||
| 10434 | # ln -s ~root/.guix-profile/lib/upstart/system/guix-publish.conf /etc/init/ | ||
| 10435 | # start guix-publish | ||
| 10436 | @end example | ||
| 10437 | |||
| 10438 | @item | ||
| 10439 | Verfahren Sie andernfalls auf die gleiche Art für das »init«-System, das | ||
| 10440 | Ihre Distribution verwendet. | ||
| 10441 | @end itemize | ||
| 10442 | |||
| 10443 | @node Aufruf von guix challenge | ||
| 10444 | @section @command{guix challenge} aufrufen | ||
| 10445 | |||
| 10446 | @cindex Reproduzierbare Erstellungen | ||
| 10447 | @cindex verifizierbare Erstellungen | ||
| 10448 | @cindex @command{guix challenge} | ||
| 10449 | @cindex Anfechten | ||
| 10450 | Entsprechen die von diesem Server gelieferten Binärdateien tatsächlich dem | ||
| 10451 | Quellcode, aus dem sie angeblich erzeugt wurden? Ist ein | ||
| 10452 | Paketerstellungsprozess deterministisch? Diese Fragen versucht @command{guix | ||
| 10453 | challenge} zu beantworten. | ||
| 10454 | |||
| 10455 | Die erste Frage ist offensichtlich wichtig: Bevor man einen Substitutserver | ||
| 10456 | benutzt (siehe @ref{Substitute}), @emph{verifiziert} man besser, dass er | ||
| 10457 | die richtigen Binärdateien liefert, d.h.@: man @emph{fechtet sie an}. Die | ||
| 10458 | letzte Frage macht die erste möglich: Wenn Paketerstellungen deterministisch | ||
| 10459 | sind, müssten voneinander unabhängige Erstellungen genau dasselbe Ergebnis | ||
| 10460 | liefern, Bit für Bit; wenn ein Server mit einer anderen Binärdatei als der | ||
| 10461 | lokal erstellten Binärdatei antwortet, ist diese entweder beschädigt oder | ||
| 10462 | bösartig. | ||
| 10463 | |||
| 10464 | Wir wissen, dass die in @file{/gnu/store}-Dateinamen auftauchende | ||
| 10465 | Hash-Prüfsumme der Hash aller Eingaben des Prozesses ist, mit dem die Datei | ||
| 10466 | oder das Verzeichnis erstellt wurde — Compiler, Bibliotheken, | ||
| 10467 | Erstellungsskripts und so weiter (siehe @ref{Einführung}). Wenn wir von | ||
| 10468 | deterministischen Erstellungen ausgehen, sollte ein Store-Dateiname also auf | ||
| 10469 | genau eine Erstellungsausgabe abgebildet werden. Mit @command{guix | ||
| 10470 | challenge} prüft man, ob es tatsächlich eine eindeutige Abbildung gibt, | ||
| 10471 | indem die Erstellungsausgaben mehrerer unabhängiger Erstellungen jedes | ||
| 10472 | angegebenen Store-Objekts verglichen werden. | ||
| 10473 | |||
| 10474 | Die Ausgabe des Befehls sieht so aus: | ||
| 10475 | |||
| 10476 | @smallexample | ||
| 10477 | $ guix challenge --substitute-urls="https://@value{SUBSTITUTE-SERVER} https://guix.example.org" | ||
| 10478 | Liste der Substitute von »https://@value{SUBSTITUTE-SERVER}« wird aktualisiert … 100.0% | ||
| 10479 | Liste der Substitute von »https://guix.example.org« wird aktualisiert … 100.0% | ||
| 10480 | Inhalt von /gnu/store/@dots{}-openssl-1.0.2d verschieden: | ||
| 10481 | lokale Prüfsumme: 0725l22r5jnzazaacncwsvp9kgf42266ayyp814v7djxs7nk963q | ||
| 10482 | https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-openssl-1.0.2d: 0725l22r5jnzazaacncwsvp9kgf42266ayyp814v7djxs7nk963q | ||
| 10483 | https://guix.example.org/nar/@dots{}-openssl-1.0.2d: 1zy4fmaaqcnjrzzajkdn3f5gmjk754b43qkq47llbyak9z0qjyim | ||
| 10484 | Inhalt von /gnu/store/@dots{}-git-2.5.0 verschieden: | ||
| 10485 | lokale Prüfsumme: 00p3bmryhjxrhpn2gxs2fy0a15lnip05l97205pgbk5ra395hyha | ||
| 10486 | https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-git-2.5.0: 069nb85bv4d4a6slrwjdy8v1cn4cwspm3kdbmyb81d6zckj3nq9f | ||
| 10487 | https://guix.example.org/nar/@dots{}-git-2.5.0: 0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73 | ||
| 10488 | Inhalt von /gnu/store/@dots{}-pius-2.1.1 verschieden: | ||
| 10489 | lokale Prüfsumme: 0k4v3m9z1zp8xzzizb7d8kjj72f9172xv078sq4wl73vnq9ig3ax | ||
| 10490 | https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-pius-2.1.1: 0k4v3m9z1zp8xzzizb7d8kjj72f9172xv078sq4wl73vnq9ig3ax | ||
| 10491 | https://guix.example.org/nar/@dots{}-pius-2.1.1: 1cy25x1a4fzq5rk0pmvc8xhwyffnqz95h2bpvqsz2mpvlbccy0gs | ||
| 10492 | |||
| 10493 | @dots{} | ||
| 10494 | |||
| 10495 | 6,406 Store-Objekte wurden analysiert: | ||
| 10496 | — 4,749 (74.1%) waren identisch | ||
| 10497 | — 525 (8.2%) unterscheiden sich | ||
| 10498 | — 1,132 (17.7%) blieben ergebnislos | ||
| 10499 | @end smallexample | ||
| 10500 | |||
| 10501 | @noindent | ||
| 10502 | In diesem Beispiel wird mit @command{guix challenge} zuerst die Menge lokal | ||
| 10503 | erstellter Ableitungen im Store ermittelt — im Gegensatz zu von einem | ||
| 10504 | Substitserver heruntergeladenen Store-Objekten — und dann werden alle | ||
| 10505 | Substitutserver angefragt. Diejenigen Store-Objekte, bei denen der Server | ||
| 10506 | ein anderes Ergebnis berechnet hat als die lokale Erstellung, werden | ||
| 10507 | gemeldet. | ||
| 10508 | |||
| 10509 | @cindex Nichtdeterminismus, in Paketerstellungen | ||
| 10510 | Nehmen wir zum Beispiel an, @code{guix.example.org} gibt uns immer eine | ||
| 10511 | verschiedene Antwort, aber @code{@value{SUBSTITUTE-SERVER}} stimmt mit | ||
| 10512 | lokalen Erstellungen überein, @emph{außer} im Fall von Git. Das könnte ein | ||
| 10513 | Hinweis sein, dass der Erstellungsprozess von Git nichtdeterministisch ist; | ||
| 10514 | das bedeutet, seine Ausgabe variiert abhängig von verschiedenen Umständen, | ||
| 10515 | die Guix nicht vollends kontrollieren kann, obwohl es Pakete in isolierten | ||
| 10516 | Umgebungen erstellt (siehe @ref{Funktionalitäten}). Zu den häufigsten Quellen von | ||
| 10517 | Nichtdeterminismus gehören das Einsetzen von Zeitstempeln innerhalb der | ||
| 10518 | Erstellungsgebnisse, das Einsetzen von Zufallszahlen und von Auflistungen | ||
| 10519 | eines Verzeichnisinhalts sortiert nach der Inode-Nummer. Siehe | ||
| 10520 | @uref{https://reproducible-builds.org/docs/} für mehr Informationen. | ||
| 10521 | |||
| 10522 | Um herauszufinden, was mit dieser Git-Binärdatei nicht stimmt, können wir so | ||
| 10523 | etwas machen (siehe @ref{Aufruf von guix archive}): | ||
| 10524 | |||
| 10525 | @example | ||
| 10526 | $ wget -q -O - https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-git-2.5.0 \ | ||
| 10527 | | guix archive -x /tmp/git | ||
| 10528 | $ diff -ur --no-dereference /gnu/store/@dots{}-git.2.5.0 /tmp/git | ||
| 10529 | @end example | ||
| 10530 | |||
| 10531 | Dieser Befehl zeigt die Unterschiede zwischen den Dateien, die sich aus der | ||
| 10532 | lokalen Erstellung ergeben, und den Dateien, die sich aus der Erstellung auf | ||
| 10533 | @code{@value{SUBSTITUTE-SERVER}} ergeben (siehe @ref{Overview, Comparing and | ||
| 10534 | Merging Files,, diffutils, Comparing and Merging Files}). Der Befehl | ||
| 10535 | @command{diff} funktioniert großartig für Textdateien. Wenn sich | ||
| 10536 | Binärdateien unterscheiden, ist @uref{https://diffoscope.org/, Diffoscope} | ||
| 10537 | die bessere Wahl: Es ist ein hilfreiches Werkzeug, das Unterschiede in allen | ||
| 10538 | Arten von Dateien visualisiert. | ||
| 10539 | |||
| 10540 | Sobald Sie mit dieser Arbeit fertig sind, können Sie erkennen, ob die | ||
| 10541 | Unterschiede aufgrund eines nichtdeterministischen Erstellungsprozesses oder | ||
| 10542 | wegen einem bösartigen Server zustande kommen. Wir geben uns Mühe, Quellen | ||
| 10543 | von Nichtdeterminismus in Paketen zu entfernen, damit Substitute leichter | ||
| 10544 | verifiziert werden können, aber natürlich ist an diesem Prozess nicht nur | ||
| 10545 | Guix, sondern ein großer Teil der Freie-Software-Gemeinschaft beteiligt. In | ||
| 10546 | der Zwischenzeit ist @command{guix challenge} eines der Werkzeuge, die das | ||
| 10547 | Problem anzugehen helfen. | ||
| 10548 | |||
| 10549 | Wenn Sie ein Paket für Guix schreiben, ermutigen wir Sie, zu überprüfen, ob | ||
| 10550 | @code{@value{SUBSTITUTE-SERVER}} und andere Substitutserver dasselbe | ||
| 10551 | Erstellungsergebnis bekommen, das Sie bekommen haben. Das geht so: | ||
| 10552 | |||
| 10553 | @example | ||
| 10554 | $ guix challenge @var{Paket} | ||
| 10555 | @end example | ||
| 10556 | |||
| 10557 | @noindent | ||
| 10558 | Dabei wird mit @var{Paket} eine Paketspezifikation wie @code{guile@@2.0} | ||
| 10559 | oder @code{glibc:debug} bezeichnet. | ||
| 10560 | |||
| 10561 | Die allgemeine Syntax lautet: | ||
| 10562 | |||
| 10563 | @example | ||
| 10564 | guix challenge @var{Optionen} [@var{Pakete}@dots{}] | ||
| 10565 | @end example | ||
| 10566 | |||
| 10567 | Wird ein Unterschied zwischen der Hash-Prüfsumme des lokal erstellten | ||
| 10568 | Objekts und dem vom Server gelieferten Substitut festgestellt, oder zwischen | ||
| 10569 | den Substituten von unterschiedlichen Servern, dann wird der Befehl dies wie | ||
| 10570 | im obigen Beispiel anzeigen und mit dem Exit-Code 2 terminieren (andere | ||
| 10571 | Exit-Codes außer null stehen für andere Arten von Fehlern). | ||
| 10572 | |||
| 10573 | Die eine, wichtige Befehlszeilenoption ist: | ||
| 10574 | |||
| 10575 | @table @code | ||
| 10576 | |||
| 10577 | @item --substitute-urls=@var{URLs} | ||
| 10578 | Die @var{URLs} als durch Leerraumzeichen getrennte Liste von | ||
| 10579 | Substitut-Quell-URLs benutzen. mit denen verglichen wird. | ||
| 10580 | |||
| 10581 | @item --verbose | ||
| 10582 | @itemx -v | ||
| 10583 | Details auch zu Übereinstimmungen (deren Inhalt identisch ist) ausgeben, | ||
| 10584 | zusätzlich zu Informationen über Unterschiede. | ||
| 10585 | |||
| 10586 | @end table | ||
| 10587 | |||
| 10588 | @node Aufruf von guix copy | ||
| 10589 | @section @command{guix copy} aufrufen | ||
| 10590 | |||
| 10591 | @cindex Kopieren, von Store-Objekten, über SSH | ||
| 10592 | @cindex SSH, Kopieren von Store-Objekten | ||
| 10593 | @cindex Store-Objekte zwischen Maschinen teilen | ||
| 10594 | @cindex Übertragen von Store-Objekten zwischen Maschinen | ||
| 10595 | Der Befehl @command{guix copy} kopiert Objekte aus dem Store einer Maschine | ||
| 10596 | in den Store einer anderen Maschine mittels einer Secure-Shell-Verbindung | ||
| 10597 | (kurz SSH-Verbindung)@footnote{Dieser Befehl steht nur dann zur Verfügung, | ||
| 10598 | wenn Guile-SSH gefunden werden kann. Siehe @ref{Voraussetzungen} für | ||
| 10599 | Details.}. Zum Beispiel kopiert der folgende Befehl das Paket | ||
| 10600 | @code{coreutils}, das Profil des Benutzers und all deren Abhängigkeiten auf | ||
| 10601 | den anderen @var{Rechner}, dazu meldet sich Guix als @var{Benutzer} an: | ||
| 10602 | |||
| 10603 | @example | ||
| 10604 | guix copy --to=@var{Benutzer}@@@var{Rechner} \ | ||
| 10605 | coreutils `readlink -f ~/.guix-profile` | ||
| 10606 | @end example | ||
| 10607 | |||
| 10608 | Wenn manche der zu kopierenden Objekte schon auf dem anderen @var{Rechner} | ||
| 10609 | vorliegen, werden sie tatsächlich @emph{nicht} übertragen. | ||
| 10610 | |||
| 10611 | Der folgende Befehl bezieht @code{libreoffice} und @code{gimp} von dem | ||
| 10612 | @var{Rechner}, vorausgesetzt sie sind dort verfügbar: | ||
| 10613 | |||
| 10614 | @example | ||
| 10615 | guix copy --from=@var{host} libreoffice gimp | ||
| 10616 | @end example | ||
| 10617 | |||
| 10618 | Die SSH-Verbindung wird mit dem Guile-SSH-Client hergestellt, der mit | ||
| 10619 | OpenSSH kompatibel ist: Er berücksichtigt @file{~/.ssh/known_hosts} und | ||
| 10620 | @file{~/.ssh/config} und verwendet den SSH-Agenten zur Authentifizierung. | ||
| 10621 | |||
| 10622 | Der Schlüssel, mit dem gesendete Objekte signiert sind, muss von der | ||
| 10623 | entfernten Maschine akzeptiert werden. Ebenso muss der Schlüssel, mit dem | ||
| 10624 | die Objekte signiert sind, die Sie von der entfernten Maschine empfangen, in | ||
| 10625 | Ihrer Datei @file{/etc/guix/acl} eingetragen sein, damit Ihr Daemon sie | ||
| 10626 | akzeptiert. Siehe @ref{Aufruf von guix archive} für mehr Informationen über | ||
| 10627 | die Authentifizierung von Store-Objekten. | ||
| 10628 | |||
| 10629 | Die allgemeine Syntax lautet: | ||
| 10630 | |||
| 10631 | @example | ||
| 10632 | guix copy [--to=@var{Spezifikation}|--from=@var{Spezifikation}] @var{Objekte}@dots{} | ||
| 10633 | @end example | ||
| 10634 | |||
| 10635 | Sie müssen immer eine der folgenden Befehlszeilenoptionen angeben: | ||
| 10636 | |||
| 10637 | @table @code | ||
| 10638 | @item --to=@var{Spezifikation} | ||
| 10639 | @itemx --from=@var{Spezifikation} | ||
| 10640 | Gibt den Rechner (den »Host«) an, an den oder von dem gesendet | ||
| 10641 | bzw. empfangen wird. Die @var{Spezifikation} muss eine SSH-Spezifikation | ||
| 10642 | sein wie @code{example.org}, @code{charlie@@example.org} oder | ||
| 10643 | @code{charlie@@example.org:2222}. | ||
| 10644 | @end table | ||
| 10645 | |||
| 10646 | Die @var{Objekte} können entweder Paketnamen wie @code{gimp} oder | ||
| 10647 | Store-Objekte wie @file{/gnu/store/@dots{}-idutils-4.6} sein. | ||
| 10648 | |||
| 10649 | Wenn ein zu sendendes Paket mit Namen angegeben wird, wird es erst erstellt, | ||
| 10650 | falls es nicht im Store vorliegt, außer @option{--dry-run} wurde angegeben | ||
| 10651 | wurde. Alle gemeinsamen Erstellungsoptionen werden unterstützt (siehe | ||
| 10652 | @ref{Gemeinsame Erstellungsoptionen}). | ||
| 10653 | |||
| 10654 | |||
| 10655 | @node Aufruf von guix container | ||
| 10656 | @section @command{guix container} aufrufen | ||
| 10657 | @cindex container | ||
| 10658 | @cindex @command{guix container} | ||
| 10659 | @quotation Anmerkung | ||
| 10660 | Dieses Werkzeug ist noch experimentell, Stand Version @value{VERSION}. Die | ||
| 10661 | Schnittstelle wird sich in Zukunft grundlegend verändern. | ||
| 10662 | @end quotation | ||
| 10663 | |||
| 10664 | Der Zweck von @command{guix container} ist, in einer isolierten Umgebung | ||
| 10665 | (gemeinhin als »Container« bezeichnet) laufende Prozesse zu manipulieren, | ||
| 10666 | die typischerweise durch die Befehle @command{guix environment} (siehe | ||
| 10667 | @ref{Aufruf von guix environment}) und @command{guix system container} (siehe | ||
| 10668 | @ref{Aufruf von guix system}) erzeugt werden. | ||
| 10669 | |||
| 10670 | Die allgemeine Syntax lautet: | ||
| 10671 | |||
| 10672 | @example | ||
| 10673 | guix container @var{Aktion} @var{Optionen}@dots{} | ||
| 10674 | @end example | ||
| 10675 | |||
| 10676 | Mit @var{Aktion} wird die Operation angegeben, die in der isolierten | ||
| 10677 | Umgebung durchgeführt werden soll, und mit @var{Optionen} werden die | ||
| 10678 | kontextabhängigen Argumente an die Aktion angegeben. | ||
| 10679 | |||
| 10680 | Folgende Aktionen sind verfügbar: | ||
| 10681 | |||
| 10682 | @table @code | ||
| 10683 | @item exec | ||
| 10684 | Führt einen Befehl im Kontext der laufenden isolierten Umgebung aus. | ||
| 10685 | |||
| 10686 | Die Syntax ist: | ||
| 10687 | |||
| 10688 | @example | ||
| 10689 | guix container exec @var{PID} @var{Programm} @var{Argumente}@dots{} | ||
| 10690 | @end example | ||
| 10691 | |||
| 10692 | @var{PID} gibt die Prozess-ID der laufenden isolierten Umgebung an. Als | ||
| 10693 | @var{Programm} muss eine ausführbare Datei im Wurzeldateisystem der | ||
| 10694 | isolierten Umgebung angegeben werden. Die @var{Argumente} sind die | ||
| 10695 | zusätzlichen Befehlszeilenoptionen, die an das @var{Programm} übergeben | ||
| 10696 | werden. | ||
| 10697 | |||
| 10698 | Der folgende Befehl startet eine interaktive Anmelde-Shell innerhalb einer | ||
| 10699 | isolierten Guix-Systemumgebung, gestartet durch @command{guix system | ||
| 10700 | container}, dessen Prozess-ID 9001 ist: | ||
| 10701 | |||
| 10702 | @example | ||
| 10703 | guix container exec 9001 /run/current-system/profile/bin/bash --login | ||
| 10704 | @end example | ||
| 10705 | |||
| 10706 | Beachten Sie, dass die @var{PID} nicht der Elternprozess der isolierten | ||
| 10707 | Umgebung sein darf, sondern PID 1 in der isolierten Umgebung oder einer | ||
| 10708 | seiner Kindprozesse sein muss. | ||
| 10709 | |||
| 10710 | @end table | ||
| 10711 | |||
| 10712 | @node Aufruf von guix weather | ||
| 10713 | @section @command{guix weather} aufrufen | ||
| 10714 | |||
| 10715 | Manchmal werden Sie schlecht gelaunt sein, weil es zu wenige Substitute gibt | ||
| 10716 | und die Pakete bei Ihnen selbst erstellt werden müssen (siehe | ||
| 10717 | @ref{Substitute}). Der Befehl @command{guix weather} zeigt einen Bericht | ||
| 10718 | über die Verfügbarkeit von Substituten auf den angegebenen Servern an, damit | ||
| 10719 | Sie sich eine Vorstellung davon machen können, wie es heute um Ihre Laune | ||
| 10720 | bestellt sein wird. Manchmal bekommt man als Nutzer so hilfreiche | ||
| 10721 | Informationen, aber in erster Linie nützt der Befehl den Leuten, die | ||
| 10722 | @command{guix publish} benutzen (siehe @ref{Aufruf von guix publish}). | ||
| 10723 | |||
| 10724 | @cindex Statistik, für Substitute | ||
| 10725 | @cindex Verfügbarkeit von Substituten | ||
| 10726 | @cindex Substitutverfügbarkeit | ||
| 10727 | @cindex Wetter, Substitutverfügbarkeit | ||
| 10728 | Hier ist ein Beispiel für einen Aufruf davon: | ||
| 10729 | |||
| 10730 | @example | ||
| 10731 | $ guix weather --substitute-urls=https://guix.example.org | ||
| 10732 | 5.872 Paketableitungen für x86_64-linux berechnen … | ||
| 10733 | Nach 6.128 Store-Objekten von https://guix.example.org suchen … | ||
| 10734 | updating list of substitutes from 'https://guix.example.org'... 100.0% | ||
| 10735 | https://guix.example.org | ||
| 10736 | 43,4% Substitute verfügbar (2.658 von 6.128) | ||
| 10737 | 7.032,5 MiB an Nars (komprimiert) | ||
| 10738 | 19.824,2 MiB auf der Platte (unkomprimiert) | ||
| 10739 | 0,030 Sekunden pro Anfrage (182,9 Sekunden insgesamt) | ||
| 10740 | 33,5 Anfragen pro Sekunde | ||
| 10741 | |||
| 10742 | 9,8% (342 von 3.470) der fehlenden Objekte sind in der Warteschlange | ||
| 10743 | Mindestens 867 Erstellungen in der Warteschlange | ||
| 10744 | x86_64-linux: 518 (59,7%) | ||
| 10745 | i686-linux: 221 (25,5%) | ||
| 10746 | aarch64-linux: 128 (14,8%) | ||
| 10747 | Erstellungsgeschwindigkeit: 23,41 Erstellungen pro Stunde | ||
| 10748 | x86_64-linux: 11,16 Erstellungen pro Stunde | ||
| 10749 | i686-linux: 6,03 Erstellungen pro Stunde | ||
| 10750 | aarch64-linux: 6,41 Erstellungen pro Stunde | ||
| 10751 | @end example | ||
| 10752 | |||
| 10753 | @cindex Kontinuierliche Integration, Statistik | ||
| 10754 | Wie Sie sehen können, wird der Anteil unter allen Paketen angezeigt, für die | ||
| 10755 | auf dem Server Substitute verfügbar sind — unabhängig davon, ob Substitute | ||
| 10756 | aktiviert sind, und unabhängig davon, ob der signierende Schlüssel des | ||
| 10757 | Servers autorisiert ist. Es wird auch über die Größe der komprimierten | ||
| 10758 | Archive (die »Nars«) berichtet, die vom Server angeboten werden, sowie über | ||
| 10759 | die Größe, die die zugehörigen Store-Objekte im Store belegen würden (unter | ||
| 10760 | der Annahme, dass Deduplizierung abgeschaltet ist) und über den Durchsatz | ||
| 10761 | des Servers. Der zweite Teil sind Statistiken zur Kontinuierlichen | ||
| 10762 | Integration (englisch »Continuous Integration«, kurz CI), wenn der Server | ||
| 10763 | dies unterstützt. Des Weiteren kann @command{guix weather}, wenn es mit der | ||
| 10764 | Befehlszeilenoption @option{--coverage} aufgerufen wird, »wichtige« | ||
| 10765 | Paketsubstitute, die auf dem Server fehlen, auflisten (siehe unten). | ||
| 10766 | |||
| 10767 | Dazu werden mit @command{guix weather} Anfragen über HTTP(S) zu Metadaten | ||
| 10768 | (@dfn{Narinfos}) für alle relevanten Store-Objekte gestellt. Wie | ||
| 10769 | @command{guix challenge} werden die Signaturen auf den Substituten | ||
| 10770 | ignoriert, was harmlos ist, weil der Befehl nur Statistiken sammelt und | ||
| 10771 | keine Substitute installieren kann. | ||
| 10772 | |||
| 10773 | Neben anderen Dingen ist es möglich, bestimmte Systemtypen und bestimmte | ||
| 10774 | Paketmengen anzufragen. Die verfügbaren Befehlszeilenoptionen sind folgende: | ||
| 10775 | |||
| 10776 | @table @code | ||
| 10777 | @item --substitute-urls=@var{URLs} | ||
| 10778 | @var{URLs} ist eine leerzeichengetrennte Liste anzufragender | ||
| 10779 | Substitutserver-URLs. Wird diese Befehlszeilenoption weggelassen, wird die | ||
| 10780 | vorgegebene Menge an Substitutservern angefragt. | ||
| 10781 | |||
| 10782 | @item --system=@var{System} | ||
| 10783 | @itemx -s @var{System} | ||
| 10784 | Substitute für das @var{System} anfragen — z.B.@: für | ||
| 10785 | @code{aarch64-linux}. Diese Befehlszeilenoption kann mehrmals angegeben | ||
| 10786 | werden, wodurch @command{guix weather} die Substitute für mehrere | ||
| 10787 | Systemtypen anfragt. | ||
| 10788 | |||
| 10789 | @item --manifest=@var{Datei} | ||
| 10790 | Anstatt die Substitute für alle Pakete anzufragen, werden nur die in der | ||
| 10791 | @var{Datei} angegebenen Pakete erfragt. Die @var{Datei} muss ein | ||
| 10792 | @dfn{Manifest} enthalten, wie bei der Befehlszeilenoption @code{-m} von | ||
| 10793 | @command{guix package} (siehe @ref{Aufruf von guix package}). | ||
| 10794 | |||
| 10795 | @item --coverage[=@var{Anzahl}] | ||
| 10796 | @itemx -c [@var{Anzahl}] | ||
| 10797 | Einen Bericht über die Substitutabdeckung für Pakete ausgeben, d.h.@: Pakete | ||
| 10798 | mit mindestens @var{Anzahl}-vielen Abhängigen (voreingestellt mindestens | ||
| 10799 | null) anzeigen, für die keine Substitute verfügbar sind. Die abhängigen | ||
| 10800 | Pakete werden selbst nicht aufgeführt: Wenn @var{b} von @var{a} abhängt und | ||
| 10801 | Substitute für @var{a} fehlen, wird nur @var{a} aufgeführt, obwohl dann in | ||
| 10802 | der Regel auch die Substitute für @var{b} fehlen. Das Ergebnis sieht so aus: | ||
| 10803 | |||
| 10804 | @example | ||
| 10805 | $ guix weather --substitute-urls=https://ci.guix.de.info -c 10 | ||
| 10806 | 8.983 Paketableitungen für x86_64-linux berechnen … | ||
| 10807 | Nach 9.343 Store-Objekten von https://ci.guix.de.info suchen … | ||
| 10808 | Liste der Substitute von »https://ci.guix.de.info« wird aktualisiert … 100.0% | ||
| 10809 | https://ci.guix.de.info | ||
| 10810 | 64.7% Substitute verfügbar (6.047 von 9.343) | ||
| 10811 | @dots{} | ||
| 10812 | 2502 Pakete fehlen auf »https://ci.guix.de.info« für »x86_64-linux«, darunter sind: | ||
| 10813 | 58 kcoreaddons@@5.49.0 /gnu/store/@dots{}-kcoreaddons-5.49.0 | ||
| 10814 | 46 qgpgme@@1.11.1 /gnu/store/@dots{}-qgpgme-1.11.1 | ||
| 10815 | 37 perl-http-cookiejar@@0.008 /gnu/store/@dots{}-perl-http-cookiejar-0.008 | ||
| 10816 | @dots{} | ||
| 10817 | @end example | ||
| 10818 | |||
| 10819 | What this example shows is that @code{kcoreaddons} and presumably the 58 | ||
| 10820 | packages that depend on it have no substitutes at @code{ci.guix.de.info}; | ||
| 10821 | likewise for @code{qgpgme} and the 46 packages that depend on it. | ||
| 10822 | |||
| 10823 | If you are a Guix developer, or if you are taking care of this build farm, | ||
| 10824 | you'll probably want to have a closer look at these packages: they may | ||
| 10825 | simply fail to build. | ||
| 10826 | @end table | ||
| 10827 | |||
| 10828 | @node Aufruf von guix processes | ||
| 10829 | @section @command{guix processes} aufrufen | ||
| 10830 | |||
| 10831 | Der Befehl @command{guix processes} kann sich für Entwickler und | ||
| 10832 | Systemadministratoren als nützlich erweisen, besonders auf Maschinen mit | ||
| 10833 | mehreren Nutzern und auf Build-Farms. Damit werden die aktuellen Sitzungen | ||
| 10834 | (also Verbindungen zum Daemon) sowie Informationen über die beteiligten | ||
| 10835 | Prozesse aufgelistet@footnote{Entfernte Sitzungen, wenn | ||
| 10836 | @command{guix-daemon} mit @option{--listen} unter Angabe eines TCP-Endpunkts | ||
| 10837 | gestartet wurde, werden @emph{nicht} aufgelistet.}. Hier ist ein Beispiel | ||
| 10838 | für die davon gelieferten Informationen: | ||
| 10839 | |||
| 10840 | @example | ||
| 10841 | $ sudo guix processes | ||
| 10842 | SessionPID: 19002 | ||
| 10843 | ClientPID: 19090 | ||
| 10844 | ClientCommand: guix environment --ad-hoc python | ||
| 10845 | |||
| 10846 | SessionPID: 19402 | ||
| 10847 | ClientPID: 19367 | ||
| 10848 | ClientCommand: guix publish -u guix-publish -p 3000 -C 9 @dots{} | ||
| 10849 | |||
| 10850 | SessionPID: 19444 | ||
| 10851 | ClientPID: 19419 | ||
| 10852 | ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} | ||
| 10853 | LockHeld: /gnu/store/@dots{}-perl-ipc-cmd-0.96.lock | ||
| 10854 | LockHeld: /gnu/store/@dots{}-python-six-bootstrap-1.11.0.lock | ||
| 10855 | LockHeld: /gnu/store/@dots{}-libjpeg-turbo-2.0.0.lock | ||
| 10856 | ChildProcess: 20495: guix offload x86_64-linux 7200 1 28800 | ||
| 10857 | ChildProcess: 27733: guix offload x86_64-linux 7200 1 28800 | ||
| 10858 | ChildProcess: 27793: guix offload x86_64-linux 7200 1 28800 | ||
| 10859 | @end example | ||
| 10860 | |||
| 10861 | In diesem Beispiel sehen wir, dass @command{guix-daemon} drei Clients hat: | ||
| 10862 | @command{guix environment}, @command{guix publish} und das Werkzeug Cuirass | ||
| 10863 | zur Kontinuierlichen Integration. Deren Prozesskennung (PID) ist jeweils im | ||
| 10864 | @code{ClientPID}-Feld zu sehen. Das Feld @code{SessionPID} zeigt die PID des | ||
| 10865 | @command{guix-daemon}-Unterprozesses dieser bestimmten Sitzung. | ||
| 10866 | |||
| 10867 | Das Feld @code{LockHeld} zeigt an, welche Store-Objekte derzeit durch die | ||
| 10868 | Sitzung gesperrt sind, d.h.@: welche Store-Objekte zur Zeit erstellt oder | ||
| 10869 | substituiert werden (das @code{LockHeld}-Feld wird nicht angezeigt, wenn | ||
| 10870 | @command{guix processes} nicht als Administratornutzer root ausgeführt | ||
| 10871 | wird). Letztlich sehen wir am @code{ChildProcess}-Feld oben, dass diese drei | ||
| 10872 | Erstellungen hier ausgelagert (englisch »offloaded«) werden (siehe | ||
| 10873 | @ref{Auslagern des Daemons einrichten}). | ||
| 10874 | |||
| 10875 | Die Ausgabe ist im Recutils-Format, damit wir den praktischen | ||
| 10876 | @command{recsel}-Befehl benutzen können, um uns interessierende Sitzungen | ||
| 10877 | auszuwählen (siehe @ref{Selection Expressions,,, recutils, GNU recutils | ||
| 10878 | manual}). Zum Beispiel zeigt dieser Befehl die Befehlszeile und PID des | ||
| 10879 | Clients an, der die Erstellung des Perl-Pakets ausgelöst hat: | ||
| 10880 | |||
| 10881 | @example | ||
| 10882 | $ sudo guix processes | \ | ||
| 10883 | recsel -p ClientPID,ClientCommand -e 'LockHeld ~ "perl"' | ||
| 10884 | ClientPID: 19419 | ||
| 10885 | ClientCommand: cuirass --cache-directory /var/cache/cuirass @dots{} | ||
| 10886 | @end example | ||
| 10887 | |||
| 10888 | |||
| 10889 | @node Systemkonfiguration | ||
| 10890 | @chapter Systemkonfiguration | ||
| 10891 | |||
| 10892 | @cindex Systemkonfiguration | ||
| 10893 | Die »Guix System«-Distribution unterstützt einen Mechanismus zur | ||
| 10894 | konsistenten Konfiguration des gesamten Systems. Damit meinen wir, dass alle | ||
| 10895 | Aspekte der globalen Systemkonfiguration an einem Ort stehen, d.h.@: die zur | ||
| 10896 | Verfügung gestellten Systemdienste, die Zeitzone und Einstellungen zur | ||
| 10897 | Locale (also die Anpassung an regionale Gepflogenheiten und Sprachen) sowie | ||
| 10898 | Benutzerkonten. Sie alle werden an derselben Stelle deklariert. So eine | ||
| 10899 | @dfn{Systemkonfiguration} kann @dfn{instanziiert}, also umgesetzt, werden. | ||
| 10900 | |||
| 10901 | @c Yes, we're talking of Puppet, Chef, & co. here. ↑ | ||
| 10902 | Einer der Vorteile, die ganze Systemkonfiguration unter die Kontrolle von | ||
| 10903 | Guix zu stellen, ist, dass so transaktionelle Systemaktualisierungen möglich | ||
| 10904 | werden und dass diese rückgängig gemacht werden können, wenn das | ||
| 10905 | aktualisierte System nicht richtig funktioniert (siehe @ref{Funktionalitäten}). Ein | ||
| 10906 | anderer Vorteil ist, dass dieselbe Systemkonfiguration leicht auf einer | ||
| 10907 | anderen Maschine oder zu einem späteren Zeitpunkt benutzt werden kann, ohne | ||
| 10908 | dazu eine weitere Schicht administrativer Werkzeuge über den systemeigenen | ||
| 10909 | Werkzeugen einsetzen zu müssen. | ||
| 10910 | |||
| 10911 | In diesem Abschnitt wird dieser Mechanismus beschrieben. Zunächst betrachten | ||
| 10912 | wir ihn aus der Perspektive eines Administrators. Dabei wird erklärt, wie | ||
| 10913 | das System konfiguriert und instanziiert werden kann. Dann folgt eine | ||
| 10914 | Demonstration, wie der Mechanismus erweitert werden kann, etwa um neue | ||
| 10915 | Systemdienste zu unterstützen. | ||
| 10916 | |||
| 10917 | @menu | ||
| 10918 | * Das Konfigurationssystem nutzen:: Ihr GNU-System anpassen. | ||
| 10919 | * »operating-system«-Referenz:: Details der Betriebssystem-Deklarationen. | ||
| 10920 | * Dateisysteme:: Die Dateisystemeinbindungen konfigurieren. | ||
| 10921 | * Zugeordnete Geräte:: Näheres zu blockorientierten Speichermedien. | ||
| 10922 | * Benutzerkonten:: Benutzerkonten festlegen. | ||
| 10923 | * Tastaturbelegung:: Wie das System Tastendrücke interpretiert. | ||
| 10924 | * Locales:: Sprache und kulturelle Konventionen. | ||
| 10925 | * Dienste:: Systemdienste festlegen. | ||
| 10926 | * Setuid-Programme:: Mit Administratorrechten startende Programme. | ||
| 10927 | * X.509-Zertifikate:: HTTPS-Server authentifizieren. | ||
| 10928 | * Name Service Switch:: Den Name Service Switch von libc konfigurieren. | ||
| 10929 | * Initiale RAM-Disk:: Linux-libre hochfahren. | ||
| 10930 | * Bootloader-Konfiguration:: Den Bootloader konfigurieren. | ||
| 10931 | * Aufruf von guix system:: Instanziierung einer Systemkonfiguration. | ||
| 10932 | * Guix in einer VM starten:: Wie man »Guix System« in einer virtuellen | ||
| 10933 | Maschine startet. | ||
| 10934 | * Dienste definieren:: Neue Dienstdefinitionen hinzufügen. | ||
| 10935 | @end menu | ||
| 10936 | |||
| 10937 | @node Das Konfigurationssystem nutzen | ||
| 10938 | @section Das Konfigurationssystem nutzen | ||
| 10939 | |||
| 10940 | Das Betriebssystem können Sie konfigurieren, indem Sie eine | ||
| 10941 | @code{operating-system}-Deklaration in einer Datei speichern, die Sie dann | ||
| 10942 | dem Befehl @command{guix system} übergeben (siehe @ref{Aufruf von guix system}). Eine einfache Konfiguration mit den vorgegebenen Systemdiensten | ||
| 10943 | und dem vorgegebenen Linux-Libre als Kernel und mit einer initialen RAM-Disk | ||
| 10944 | und einem Bootloader, sieht so aus: | ||
| 10945 | |||
| 10946 | @findex operating-system | ||
| 10947 | @lisp | ||
| 10948 | @include os-config-bare-bones.texi | ||
| 10949 | @end lisp | ||
| 10950 | |||
| 10951 | Dieses Beispiel sollte selbsterklärend sein. Manche der Felder oben, wie | ||
| 10952 | etwa @code{host-name} und @code{bootloader}, müssen angegeben werden. Andere | ||
| 10953 | sind optional, wie etwa @code{packages} und @code{services}, sind optional; | ||
| 10954 | werden sie nicht angegeben, nehmen sie einen Vorgabewert an. | ||
| 10955 | |||
| 10956 | Im Folgenden werden die Effekte von einigen der wichtigsten Feldern | ||
| 10957 | erläutert (siehe @ref{»operating-system«-Referenz} für Details zu allen | ||
| 10958 | verfügbaren Feldern), dann wird beschrieben, wie man das Betriebssystem mit | ||
| 10959 | @command{guix system} @dfn{instanziieren} kann. | ||
| 10960 | |||
| 10961 | @unnumberedsubsec Bootloader | ||
| 10962 | |||
| 10963 | @cindex Legacy-Boot, auf Intel-Maschinen | ||
| 10964 | @cindex BIOS-Boot, auf Intel-Maschinen | ||
| 10965 | @cindex UEFI-Boot | ||
| 10966 | @cindex EFI-Boot | ||
| 10967 | Das @code{bootloader}-Feld beschreibt, mit welcher Methode Ihr System | ||
| 10968 | »gebootet« werden soll. Maschinen, die auf Intel-Prozessoren basieren, | ||
| 10969 | können im alten »Legacy«-BIOS-Modus gebootet werden, wie es im obigen | ||
| 10970 | Beispiel der Fall wäre. Neuere Maschinen benutzen stattdessen das | ||
| 10971 | @dfn{Unified Extensible Firmware Interface} (UEFI) zum Booten. In diesem | ||
| 10972 | Fall sollte das @code{bootloader}-Feld in etwa so aussehen: | ||
| 10973 | |||
| 10974 | @example | ||
| 10975 | (bootloader-configuration | ||
| 10976 | (bootloader grub-efi-bootloader) | ||
| 10977 | (target "/boot/efi")) | ||
| 10978 | @end example | ||
| 10979 | |||
| 10980 | Siehe den Abschnitt @ref{Bootloader-Konfiguration} für weitere Informationen | ||
| 10981 | zu den verfügbaren Konfigurationsoptionen. | ||
| 10982 | |||
| 10983 | @unnumberedsubsec global sichtbare Pakete | ||
| 10984 | |||
| 10985 | @vindex %base-packages | ||
| 10986 | Im Feld @code{packages} werden Pakete aufgeführt, die auf dem System für | ||
| 10987 | alle Benutzerkonten global sichtbar sein sollen, d.h.@: in der | ||
| 10988 | @code{PATH}-Umgebungsvariablen jedes Nutzers, zusätzlich zu den | ||
| 10989 | nutzereigenen Profilen (siehe @ref{Aufruf von guix package}). Die Variable | ||
| 10990 | @var{%base-packages} bietet alle Werkzeuge, die man für grundlegende Nutzer- | ||
| 10991 | und Administratortätigkeiten erwarten würde, einschließlich der GNU Core | ||
| 10992 | Utilities, der GNU Networking Utilities, des leichtgewichtigen Texteditors | ||
| 10993 | GNU Zile, @command{find}, @command{grep} und so weiter. Obiges Beispiel fügt | ||
| 10994 | zu diesen noch das Programm GNU@tie{}Screen hinzu, welches aus dem Modul | ||
| 10995 | @code{(gnu packages screen)} genommen wird (siehe @ref{Paketmodule}). Die Syntax @code{(list package output)} kann benutzt werden, um | ||
| 10996 | eine bestimmte Ausgabe eines Pakets auszuwählen: | ||
| 10997 | |||
| 10998 | @lisp | ||
| 10999 | (use-modules (gnu packages)) | ||
| 11000 | (use-modules (gnu packages dns)) | ||
| 11001 | |||
| 11002 | (operating-system | ||
| 11003 | ;; ... | ||
| 11004 | (packages (cons (list bind "utils") | ||
| 11005 | %base-packages))) | ||
| 11006 | @end lisp | ||
| 11007 | |||
| 11008 | @findex specification->package | ||
| 11009 | Sich auf Pakete anhand ihres Variablennamens zu beziehen, wie oben bei | ||
| 11010 | @code{bind}, hat den Vorteil, dass der Name eindeutig ist; Tippfehler werden | ||
| 11011 | direkt als »unbound variables« gemeldet. Der Nachteil ist, dass man wissen | ||
| 11012 | muss, in welchem Modul ein Paket definiert wird, um die Zeile mit | ||
| 11013 | @code{use-package-modules} entsprechend zu ergänzen. Um dies zu vermeiden, | ||
| 11014 | kann man auch die Prozedur @code{specification->package} aus dem Modul | ||
| 11015 | @code{(gnu packages)} aufrufen, welche das einem angegebenen Namen oder | ||
| 11016 | Name-Versions-Paar zu Grunde liegende Paket liefert: | ||
| 11017 | |||
| 11018 | @lisp | ||
| 11019 | (use-modules (gnu packages)) | ||
| 11020 | |||
| 11021 | (operating-system | ||
| 11022 | ;; ... | ||
| 11023 | (packages (append (map specification->package | ||
| 11024 | '("tcpdump" "htop" "gnupg@@2.0")) | ||
| 11025 | %base-packages))) | ||
| 11026 | @end lisp | ||
| 11027 | |||
| 11028 | @unnumberedsubsec Systemdienste | ||
| 11029 | |||
| 11030 | @cindex services | ||
| 11031 | @vindex %base-services | ||
| 11032 | Das Feld @code{services} listet @dfn{Systemdienste} auf, die zur Verfügung | ||
| 11033 | stehen sollen, wenn das System startet (siehe @ref{Dienste}). Die | ||
| 11034 | @code{operating-system}-Deklaration oben legt fest, dass wir neben den | ||
| 11035 | grundlegenden Basis-Diensten auch wollen, dass der | ||
| 11036 | OpenSSH-Secure-Shell-Daemon auf Port 2222 lauscht (siehe @ref{Netzwerkdienste, @code{openssh-service-type}}). Intern sorgt der | ||
| 11037 | @code{openssh-service-type} dafür, dass @code{sshd} mit den richtigen | ||
| 11038 | Befehlszeilenoptionen aufgerufen wird, je nach Systemkonfiguration werden | ||
| 11039 | auch für dessen Betrieb nötige Konfigurationsdateien erstellt (siehe | ||
| 11040 | @ref{Dienste definieren}). | ||
| 11041 | |||
| 11042 | @cindex Anpassung, von Diensten | ||
| 11043 | @findex modify-services | ||
| 11044 | Gelegentlich werden Sie die Basis-Dienste nicht einfach so, wie sie sind, | ||
| 11045 | benutzen, sondern anpassen wollen. Benutzen Sie @code{modify-services} | ||
| 11046 | (siehe @ref{Service-Referenz, @code{modify-services}}), um die Liste der | ||
| 11047 | Basis-Dienste zu modifizieren. | ||
| 11048 | |||
| 11049 | Wenn Sie zum Beispiel @code{guix-daemon} und Mingetty (das Programm, womit | ||
| 11050 | Sie sich auf der Konsole anmelden) in der @var{%base-services}-Liste | ||
| 11051 | modifizieren möchten (siehe @ref{Basisdienste, @code{%base-services}}), | ||
| 11052 | schreiben Sie das Folgende in Ihre Betriebssystemdeklaration: | ||
| 11053 | |||
| 11054 | @lisp | ||
| 11055 | (define %my-services | ||
| 11056 | ;; Meine ganz eigene Liste von Diensten. | ||
| 11057 | (modify-services %base-services | ||
| 11058 | (guix-service-type config => | ||
| 11059 | (guix-configuration | ||
| 11060 | (inherit config) | ||
| 11061 | (use-substitutes? #f) | ||
| 11062 | (extra-options '("--gc-keep-derivations")))) | ||
| 11063 | (mingetty-service-type config => | ||
| 11064 | (mingetty-configuration | ||
| 11065 | (inherit config))))) | ||
| 11066 | |||
| 11067 | (operating-system | ||
| 11068 | ;; @dots{} | ||
| 11069 | (services %my-services)) | ||
| 11070 | @end lisp | ||
| 11071 | |||
| 11072 | Dadurch ändert sich die Konfiguration — d.h.@: die Dienst-Parameter — der | ||
| 11073 | @code{guix-service-type}-Instanz und die aller | ||
| 11074 | @code{mingetty-service-type}-Instanzen in der | ||
| 11075 | @var{%base-services}-Liste. Das funktioniert so: Zunächst arrangieren wir, | ||
| 11076 | dass die ursprüngliche Konfiguration an den Bezeichner @code{config} im | ||
| 11077 | @var{Rumpf} gebunden wird, dann schreiben wir den @var{Rumpf}, damit er zur | ||
| 11078 | gewünschten Konfiguration ausgewertet wird. Beachten Sie insbesondere, wie | ||
| 11079 | wir mit @code{inherit} eine neue Konfiguration erzeugen, die dieselben Werte | ||
| 11080 | wie die alte Konfiguration hat, aber mit ein paar Modifikationen. | ||
| 11081 | |||
| 11082 | @cindex verschlüsselte Partition | ||
| 11083 | Die Konfiguration für typische »Schreibtisch«-Nutzung zum Arbeiten, mit | ||
| 11084 | einer verschlüsselten Partition für das Wurzeldateisystem, einem | ||
| 11085 | X11-Display-Server, GNOME und Xfce (Benutzer können im Anmeldebildschirm | ||
| 11086 | auswählen, welche dieser Arbeitsumgebungen sie möchten, indem sie die Taste | ||
| 11087 | @kbd{F1} drücken), Netzwerkverwaltung, Verwaltungswerkzeugen für den | ||
| 11088 | Energieverbrauch, und Weiteres, würde so aussehen: | ||
| 11089 | |||
| 11090 | @lisp | ||
| 11091 | @include os-config-desktop.texi | ||
| 11092 | @end lisp | ||
| 11093 | |||
| 11094 | Ein grafisches System mit einer Auswahl an leichtgewichtigen | ||
| 11095 | Fenster-Managern statt voll ausgestatteten Arbeitsumgebungen würde so | ||
| 11096 | aussehen: | ||
| 11097 | |||
| 11098 | @lisp | ||
| 11099 | @include os-config-lightweight-desktop.texi | ||
| 11100 | @end lisp | ||
| 11101 | |||
| 11102 | Dieses Beispiel bezieht sich auf das Dateisystem hinter @file{/boot/efi} | ||
| 11103 | über dessen UUID, @code{1234-ABCD}. Schreiben Sie statt dieser UUID die | ||
| 11104 | richtige UUID für Ihr System, wie sie der Befehl @command{blkid} liefert. | ||
| 11105 | |||
| 11106 | Im Abschnitt @ref{Desktop-Dienste} finden Sie eine genaue Liste der unter | ||
| 11107 | @var{%desktop-services} angebotenen Dienste. Der Abschnitt @ref{X.509-Zertifikate} hat Hintergrundinformationen über das @code{nss-certs}-Paket, | ||
| 11108 | das hier benutzt wird. | ||
| 11109 | |||
| 11110 | Beachten Sie, dass @var{%desktop-services} nur eine Liste von die Dienste | ||
| 11111 | repräsentierenden service-Objekten ist. Wenn Sie Dienste daraus entfernen | ||
| 11112 | möchten, können Sie dazu die Prozeduren zum Filtern von Listen benutzen | ||
| 11113 | (siehe @ref{SRFI-1 Filtering and Partitioning,,, guile, GNU Guile Reference | ||
| 11114 | Manual}). Beispielsweise liefert der folgende Ausdruck eine Liste mit allen | ||
| 11115 | Diensten von @var{%desktop-services} außer dem Avahi-Dienst. | ||
| 11116 | |||
| 11117 | @example | ||
| 11118 | (remove (lambda (service) | ||
| 11119 | (eq? (service-kind service) avahi-service-type)) | ||
| 11120 | %desktop-services) | ||
| 11121 | @end example | ||
| 11122 | |||
| 11123 | @unnumberedsubsec Das System instanziieren | ||
| 11124 | |||
| 11125 | Angenommen, Sie haben die @code{operating-system}-Deklaration in einer Datei | ||
| 11126 | @file{my-system-config.scm} gespeichert, dann instanziiert der Befehl | ||
| 11127 | @command{guix system reconfigure my-system-config.scm} diese Konfiguration | ||
| 11128 | und macht sie zum voreingestellten GRUB-Boot-Eintrag (siehe @ref{Aufruf von guix system}). | ||
| 11129 | |||
| 11130 | Der normale Weg, die Systemkonfiguration nachträglich zu ändern, ist, die | ||
| 11131 | Datei zu aktualisieren und @command{guix system reconfigure} erneut | ||
| 11132 | auszuführen. Man sollte nie die Dateien in @file{/etc} bearbeiten oder den | ||
| 11133 | Systemzustand mit Befehlen wie @command{useradd} oder @command{grub-install} | ||
| 11134 | verändern. Tatsächlich müssen Sie das ausdrücklich vermeiden, sonst verfällt | ||
| 11135 | nicht nur Ihre Garantie, sondern Sie können Ihr System auch nicht mehr auf | ||
| 11136 | eine alte Version des Systems zurücksetzen, falls das jemals notwendig wird. | ||
| 11137 | |||
| 11138 | @cindex Zurücksetzen, des Betriebssystems | ||
| 11139 | Zurücksetzen bezieht sich hierbei darauf, dass jedes Mal, wenn Sie | ||
| 11140 | @command{guix system reconfigure} ausführen, eine neue @dfn{Generation} des | ||
| 11141 | Systems erzeugt wird — ohne vorherige Generationen zu verändern. Alte | ||
| 11142 | Systemgenerationen bekommen einen Eintrag im Boot-Menü des Bootloaders, | ||
| 11143 | womit Sie alte Generationen beim Starten des Rechners auswählen können, wenn | ||
| 11144 | mit der neuesten Generation etwas nicht stimmt. Eine beruhigende | ||
| 11145 | Vorstellung, oder? Der Befehl @command{guix system list-generations} führt | ||
| 11146 | die auf der Platte verfügbaren Systemgenerationen auf. Es ist auch möglich, | ||
| 11147 | das System mit den Befehlen @command{guix system roll-back} und | ||
| 11148 | @command{guix system switch-generation} zurückzusetzen. | ||
| 11149 | |||
| 11150 | Obwohl der Befehl @command{guix system reconfigure} vorherige Generationen | ||
| 11151 | nicht verändern wird, müssen Sie Acht geben, dass wenn die momentan aktuelle | ||
| 11152 | Generation nicht die neueste ist (z.B.@: nach einem Aufruf von @command{guix | ||
| 11153 | system roll-back}), weil @command{guix system reconfigure} alle neueren | ||
| 11154 | Generationen überschreibt (siehe @ref{Aufruf von guix system}). | ||
| 11155 | |||
| 11156 | @unnumberedsubsec Die Programmierschnittstelle | ||
| 11157 | |||
| 11158 | Auf der Ebene von Scheme wird der Großteil der | ||
| 11159 | @code{operating-system}-Deklaration mit der folgenden monadischen Prozedur | ||
| 11160 | instanziiert (siehe @ref{Die Store-Monade}): | ||
| 11161 | |||
| 11162 | @deffn {Monadische Prozedur} operating-system-derivation os | ||
| 11163 | Liefert eine Ableitung, mit der ein @code{operating-system}-Objekt @var{os} | ||
| 11164 | erstellt wird (siehe @ref{Ableitungen}). | ||
| 11165 | |||
| 11166 | Die Ausgabe der Ableitung ist ein einzelnes Verzeichnis mit Verweisen auf | ||
| 11167 | alle Pakete, Konfigurationsdateien und andere unterstützenden Dateien, die | ||
| 11168 | nötig sind, um @var{os} zu instanziieren. | ||
| 11169 | @end deffn | ||
| 11170 | |||
| 11171 | Diese Prozedur wird vom Modul @code{(gnu system)} angeboten. Zusammen mit | ||
| 11172 | @code{(gnu services)} (siehe @ref{Dienste}) deckt dieses Modul den Kern von | ||
| 11173 | »Guix System« ab. Schauen Sie es sich mal an! | ||
| 11174 | |||
| 11175 | |||
| 11176 | @node »operating-system«-Referenz | ||
| 11177 | @section @code{operating-system}-Referenz | ||
| 11178 | |||
| 11179 | Dieser Abschnitt fasst alle Optionen zusammen, die für | ||
| 11180 | @code{operating-system}-Deklarationen zur Verfügung stehen (siehe @ref{Das Konfigurationssystem nutzen}). | ||
| 11181 | |||
| 11182 | @deftp {Datentyp} operating-system | ||
| 11183 | Der die Betriebssystemkonfiguration repräsentierende Datentyp. Damit meinen | ||
| 11184 | wir die globale Konfiguration des Systems und nicht die, die sich nur auf | ||
| 11185 | einzelne Nutzer bezieht (siehe @ref{Das Konfigurationssystem nutzen}). | ||
| 11186 | |||
| 11187 | @table @asis | ||
| 11188 | @item @code{kernel} (Vorgabe: @var{linux-libre}) | ||
| 11189 | Das Paket für den zu nutzenden Betriebssystem-Kernel als | ||
| 11190 | »package«-Objekt@footnote{Derzeit wird nur der Kernel Linux-libre | ||
| 11191 | unterstützt. In der Zukunft wird man auch GNU@tie{}Hurd benutzen können.}. | ||
| 11192 | |||
| 11193 | @item @code{kernel-arguments} (Vorgabe: @code{'()}) | ||
| 11194 | Eine Liste aus Zeichenketten oder G-Ausdrücken, die für zusätzliche | ||
| 11195 | Argumente an den Kernel stehen, die ihm auf seiner Befehlszeile übergeben | ||
| 11196 | werden — wie z.B.@: @code{("console=ttyS0")}. | ||
| 11197 | |||
| 11198 | @item @code{bootloader} | ||
| 11199 | Das Konfigurationsobjekt für den Bootloader, mit dem das System gestartet | ||
| 11200 | wird. Siehe @ref{Bootloader-Konfiguration}. | ||
| 11201 | |||
| 11202 | @item @code{label} | ||
| 11203 | This is the label (a string) as it appears in the bootloader's menu entry. | ||
| 11204 | The default label includes the kernel name and version. | ||
| 11205 | |||
| 11206 | @item @code{keyboard-layout} (Vorgabe: @code{#f}) | ||
| 11207 | Dieses Feld gibt an, welche Tastaturbelegung auf der Konsole benutzt werden | ||
| 11208 | soll. Es kann entweder auf @code{#f} gesetzt sein, damit die voreingestellte | ||
| 11209 | Tastaturbelegung benutzt wird (in der Regel ist diese »US English«), oder | ||
| 11210 | ein @code{<keyboard-layout>}-Verbundsobjekt sein. | ||
| 11211 | |||
| 11212 | Diese Tastaturbelegung wird benutzt, sobald der Kernel gebootet wurde. Diese | ||
| 11213 | Tastaturbelegung wird zum Beispiel auch verwendet, wenn Sie eine Passphrase | ||
| 11214 | eintippen, falls sich Ihr Wurzeldateisystem auf einem mit | ||
| 11215 | @code{luks-device-mapping} zugeordneten Gerät befindet (siehe @ref{Zugeordnete Geräte}). | ||
| 11216 | |||
| 11217 | @quotation Anmerkung | ||
| 11218 | Damit wird @emph{nicht} angegeben, welche Tastaturbelegung der Bootloader | ||
| 11219 | benutzt, und auch nicht, welche der grafische Display-Server | ||
| 11220 | verwendet. Siehe @ref{Bootloader-Konfiguration} für Informationen darüber, | ||
| 11221 | wie Sie die Tastaturbelegung des Bootloaders angeben können. Siehe @ref{X Window} für Informationen darüber, wie Sie die Tastaturbelegung angeben | ||
| 11222 | können, die das X-Fenstersystem verwendet. | ||
| 11223 | @end quotation | ||
| 11224 | |||
| 11225 | @item @code{initrd-modules} (Vorgabe: @code{%base-initrd-modules}) | ||
| 11226 | @cindex initrd | ||
| 11227 | @cindex initiale RAM-Disk | ||
| 11228 | Die Liste der Linux-Kernel-Module, die in der initialen RAM-Disk zur | ||
| 11229 | Verfügung stehen sollen. Siehe @ref{Initiale RAM-Disk}. | ||
| 11230 | |||
| 11231 | @item @code{initrd} (Vorgabe: @code{base-initrd}) | ||
| 11232 | Eine Prozedur, die eine initiale RAM-Disk für den Linux-Kernel | ||
| 11233 | liefert. Dieses Feld gibt es, damit auch sehr systemnahe Anpassungen | ||
| 11234 | vorgenommen werden können, aber für die normale Nutzung sollte man es kaum | ||
| 11235 | brauchen. Siehe @ref{Initiale RAM-Disk}. | ||
| 11236 | |||
| 11237 | @item @code{firmware} (Vorgabe: @var{%base-firmware}) | ||
| 11238 | @cindex Firmware | ||
| 11239 | Eine Liste der Firmware-Pakete, die vom Betriebssystem-Kernel geladen werden | ||
| 11240 | können. | ||
| 11241 | |||
| 11242 | Vorgegeben ist, dass für Atheros- und Broadcom-basierte WLAN-Geräte nötige | ||
| 11243 | Firmware geladen werden kann (genauer jeweils die Linux-libre-Module | ||
| 11244 | @code{ath9k} und @code{b43-open}). Siehe den Abschnitt @ref{Hardware-Überlegungen} für mehr Informationen zu unterstützter Hardware. | ||
| 11245 | |||
| 11246 | @item @code{host-name} | ||
| 11247 | Der Hostname | ||
| 11248 | |||
| 11249 | @item @code{hosts-file} | ||
| 11250 | @cindex hosts-Datei | ||
| 11251 | Ein dateiartiges Objekt (siehe @ref{G-Ausdrücke, file-like objects}), das | ||
| 11252 | für @file{/etc/hosts} benutzt werden soll (siehe @ref{Host Names,,, libc, | ||
| 11253 | The GNU C Library Reference Manual}). Der Vorgabewert ist eine Datei mit | ||
| 11254 | Einträgen für @code{localhost} und @var{host-name}. | ||
| 11255 | |||
| 11256 | @item @code{mapped-devices} (Vorgabe: @code{'()}) | ||
| 11257 | Eine Liste zugeordneter Geräte (»mapped devices«). Siehe @ref{Zugeordnete Geräte}. | ||
| 11258 | |||
| 11259 | @item @code{file-systems} | ||
| 11260 | Eine Liste von Dateisystemen. Siehe @ref{Dateisysteme}. | ||
| 11261 | |||
| 11262 | @item @code{swap-devices} (Vorgabe: @code{'()}) | ||
| 11263 | @cindex Swap-Geräte | ||
| 11264 | Eine Liste von Zeichenketten, die Geräte identifizieren oder als | ||
| 11265 | »Swap-Speicher« genutzte Dateien identifizieren (siehe @ref{Memory | ||
| 11266 | Concepts,,, libc, The GNU C Library Reference Manual}). Beispiele wären etwa | ||
| 11267 | @code{'("/dev/sda3")} oder @code{'("/swapdatei")}. Es ist möglich, eine | ||
| 11268 | Swap-Datei auf dem Dateisystem eines zugeordneten Geräts anzugeben, sofern | ||
| 11269 | auch die Gerätezuordnung und das Dateisystem mit angegeben werden. Siehe | ||
| 11270 | @ref{Zugeordnete Geräte} und @ref{Dateisysteme}. | ||
| 11271 | |||
| 11272 | @item @code{users} (Vorgabe: @code{%base-user-accounts}) | ||
| 11273 | @itemx @code{groups} (Vorgabe: @var{%base-groups}) | ||
| 11274 | Liste der Benutzerkonten und Benutzergruppen. Siehe @ref{Benutzerkonten}. | ||
| 11275 | |||
| 11276 | Wenn in der @code{users}-Liste kein Benutzerkonto mit der UID-Kennung@tie{}0 | ||
| 11277 | aufgeführt wird, wird automatisch für den Administrator ein | ||
| 11278 | »root«-Benutzerkonto mit UID-Kennung@tie{}0 hinzugefügt. | ||
| 11279 | |||
| 11280 | @item @code{skeletons} (Vorgabe: @code{(default-skeletons)}) | ||
| 11281 | Eine Liste von Tupeln aus je einem Ziel-Dateinamen und einem dateiähnlichen | ||
| 11282 | Objekt (siehe @ref{G-Ausdrücke, file-like objects}). Diese Objekte werden | ||
| 11283 | als Skeleton-Dateien im Persönlichen Verzeichnis (»Home«-Verzeichnis) jedes | ||
| 11284 | neuen Benutzerkontos angelegt. | ||
| 11285 | |||
| 11286 | Ein gültiger Wert könnte zum Beispiel so aussehen: | ||
| 11287 | |||
| 11288 | @example | ||
| 11289 | `((".bashrc" ,(plain-file "bashrc" "echo Hallo\n")) | ||
| 11290 | (".guile" ,(plain-file "guile" | ||
| 11291 | "(use-modules (ice-9 readline)) | ||
| 11292 | (activate-readline)"))) | ||
| 11293 | @end example | ||
| 11294 | |||
| 11295 | @item @code{issue} (Vorgabe: @var{%default-issue}) | ||
| 11296 | Eine Zeichenkette, die als Inhalt der Datei @file{/etc/issue} verwendet | ||
| 11297 | werden soll, der jedes Mal angezeigt wird, wenn sich ein Nutzer auf einer | ||
| 11298 | Textkonsole anmeldet. | ||
| 11299 | |||
| 11300 | @item @code{packages} (Vorgabe: @var{%base-packages}) | ||
| 11301 | Die Menge der Pakete, die ins globale Profil installiert werden sollen, | ||
| 11302 | welches unter @file{/run/current-system/profile} zu finden ist. | ||
| 11303 | |||
| 11304 | Die vorgegebene Paketmenge umfasst zum Kern des Systems gehörende Werkzeuge | ||
| 11305 | (»core utilities«). Es ist empfehlenswert, nicht zum Kern gehörende | ||
| 11306 | Werkzeuge (»non-core«) stattdessen in Nutzerprofile zu installieren (siehe | ||
| 11307 | @ref{Aufruf von guix package}). | ||
| 11308 | |||
| 11309 | @item @code{timezone} | ||
| 11310 | Eine Zeichenkette, die die Zeitzone bezeichnet, wie z.B.@: | ||
| 11311 | @code{"Europe/Berlin"}. | ||
| 11312 | |||
| 11313 | Mit dem Befehl @command{tzselect} können Sie herausfinden, welche | ||
| 11314 | Zeichenkette der Zeitzone Ihrer Region entspricht. Wenn Sie eine ungültige | ||
| 11315 | Zeichenkette angeben, schlägt @command{guix system} fehl. | ||
| 11316 | |||
| 11317 | @item @code{locale} (Vorgabe: @code{"en_US.utf8"}) | ||
| 11318 | Der Name der als Voreinstellung zu verwendenden Locale (siehe @ref{Locale | ||
| 11319 | Names,,, libc, The GNU C Library Reference Manual}). Siehe @ref{Locales} für | ||
| 11320 | weitere Informationen. | ||
| 11321 | |||
| 11322 | @item @code{locale-definitions} (Vorgabe: @var{%default-locale-definitions}) | ||
| 11323 | Die Liste der Locale-Definitionen, die kompiliert werden sollen und dann im | ||
| 11324 | laufenden System benutzt werden können. Siehe @ref{Locales}. | ||
| 11325 | |||
| 11326 | @item @code{locale-libcs} (Vorgabe: @code{(list @var{glibc})}) | ||
| 11327 | Die Liste der GNU-libc-Pakete, deren Locale-Daten und -Werkzeuge zum | ||
| 11328 | Erzeugen der Locale-Definitionen verwendet werden sollen. Siehe | ||
| 11329 | @ref{Locales} für eine Erläuterung der Kompatibilitätsauswirkungen, | ||
| 11330 | deretwegen man diese Option benutzen wollen könnte. | ||
| 11331 | |||
| 11332 | @item @code{name-service-switch} (Vorgabe: @var{%default-nss}) | ||
| 11333 | Die Konfiguration des Name Service Switch (NSS) der libc — ein | ||
| 11334 | @code{<name-service-switch>}-Objekt. Siehe @ref{Name Service Switch} für | ||
| 11335 | Details. | ||
| 11336 | |||
| 11337 | @item @code{services} (Vorgabe: @var{%base-services}) | ||
| 11338 | Eine Liste von »service«-Objekten, die die Systemdienste | ||
| 11339 | repräsentieren. Siehe @ref{Dienste}. | ||
| 11340 | |||
| 11341 | @cindex essenzielle Dienste | ||
| 11342 | @item @code{essential-services} (Vorgabe: …) | ||
| 11343 | The list of ``essential services''---i.e., things like instances of | ||
| 11344 | @code{system-service-type} and @code{host-name-service-type} (@pxref{Service-Referenz}), which are derived from the operating system definition itself. | ||
| 11345 | As a user you should @emph{never} need to touch this field. | ||
| 11346 | |||
| 11347 | @item @code{pam-services} (Vorgabe: @code{(base-pam-services)}) | ||
| 11348 | @cindex PAM | ||
| 11349 | @cindex Pluggable Authentication Modules | ||
| 11350 | @c FIXME: Add xref to PAM services section. | ||
| 11351 | Dienste für @dfn{Pluggable Authentication Modules} (PAM) von Linux. | ||
| 11352 | |||
| 11353 | @item @code{setuid-programs} (Vorgabe: @var{%setuid-programs}) | ||
| 11354 | Eine Liste von Zeichenketten liefernden G-Ausdrücken, die setuid-Programme | ||
| 11355 | bezeichnen. Siehe @ref{Setuid-Programme}. | ||
| 11356 | |||
| 11357 | @item @code{sudoers-file} (Vorgabe: @var{%sudoers-specification}) | ||
| 11358 | @cindex sudoers-Datei | ||
| 11359 | Der Inhalt der Datei @file{/etc/sudoers} als ein dateiähnliches Objekt | ||
| 11360 | (siehe @ref{G-Ausdrücke, @code{local-file} und @code{plain-file}}). | ||
| 11361 | |||
| 11362 | Diese Datei gibt an, welche Nutzer den Befehl @command{sudo} benutzen | ||
| 11363 | dürfen, was sie damit tun und welche Berechtigungen sie so erhalten | ||
| 11364 | können. Die Vorgabe ist, dass nur der Administratornutzer @code{root} und | ||
| 11365 | Mitglieder der Benutzergruppe @code{wheel} den @code{sudo}-Befehl verwenden | ||
| 11366 | dürfen. | ||
| 11367 | |||
| 11368 | @end table | ||
| 11369 | |||
| 11370 | @deffn {Scheme Syntax} this-operating-system | ||
| 11371 | When used in the @emph{lexical scope} of an operating system field | ||
| 11372 | definition, this identifier resolves to the operating system being defined. | ||
| 11373 | |||
| 11374 | The example below shows how to refer to the operating system being defined | ||
| 11375 | in the definition of the @code{label} field: | ||
| 11376 | |||
| 11377 | @example | ||
| 11378 | (use-modules (gnu) (guix)) | ||
| 11379 | |||
| 11380 | (operating-system | ||
| 11381 | ;; ... | ||
| 11382 | (label (package-full-name | ||
| 11383 | (operating-system-kernel this-operating-system)))) | ||
| 11384 | @end example | ||
| 11385 | |||
| 11386 | It is an error to refer to @code{this-operating-system} outside an operating | ||
| 11387 | system definition. | ||
| 11388 | @end deffn | ||
| 11389 | |||
| 11390 | @end deftp | ||
| 11391 | |||
| 11392 | @node Dateisysteme | ||
| 11393 | @section Dateisysteme | ||
| 11394 | |||
| 11395 | Die Liste der Dateisysteme, die eingebunden werden sollen, steht im | ||
| 11396 | @code{file-systems}-Feld der Betriebssystemdeklaration (siehe @ref{Das Konfigurationssystem nutzen}). Jedes Dateisystem wird mit der | ||
| 11397 | @code{file-system}-Form deklariert, etwa so: | ||
| 11398 | |||
| 11399 | @example | ||
| 11400 | (file-system | ||
| 11401 | (mount-point "/home") | ||
| 11402 | (device "/dev/sda3") | ||
| 11403 | (type "ext4")) | ||
| 11404 | @end example | ||
| 11405 | |||
| 11406 | Wie immer müssen manche Felder angegeben werden — die, die im Beispiel oben | ||
| 11407 | stehen —, während andere optional sind. Die Felder werden nun beschrieben. | ||
| 11408 | |||
| 11409 | @deftp {Datentyp} file-system | ||
| 11410 | Objekte dieses Typs repräsentieren einzubindende Dateisysteme. Sie weisen | ||
| 11411 | folgende Komponenten auf: | ||
| 11412 | |||
| 11413 | @table @asis | ||
| 11414 | @item @code{type} | ||
| 11415 | Eine Zeichenkette, die den Typ des Dateisystems spezifiziert, z.B.@: | ||
| 11416 | @code{"ext4"}. | ||
| 11417 | |||
| 11418 | @item @code{mount-point} | ||
| 11419 | Der Einhängepunkt, d.h.@: der Pfad, an dem das Dateisystem eingebunden | ||
| 11420 | werden soll. | ||
| 11421 | |||
| 11422 | @item @code{device} | ||
| 11423 | Hiermit wird die »Quelle« des Dateisystems bezeichnet. Sie kann eines von | ||
| 11424 | drei Dingen sein: die Bezeichnung (»Labels«) eines Dateisystems, die | ||
| 11425 | UUID-Kennung des Dateisystems oder der Name eines @file{/dev}-Knotens. Mit | ||
| 11426 | Bezeichnungen und UUIDs kann man Dateisysteme benennen, ohne den Gerätenamen | ||
| 11427 | festzuschreiben@footnote{Beachten Sie: Obwohl es verführerisch ist, mit | ||
| 11428 | @file{/dev/disk/by-uuid} und ähnlichen Gerätenamen dasselbe Resultat | ||
| 11429 | bekommen zu wollen, raten wir davon ab: Diese speziellen Gerätenamen werden | ||
| 11430 | erst vom udev-Daemon erzeugt und sind, wenn die Geräte eingebunden werden, | ||
| 11431 | vielleicht noch nicht verfügbar.}. | ||
| 11432 | |||
| 11433 | @findex file-system-label | ||
| 11434 | Dateisystem-Bezeichnungen (»Labels«) werden mit der Prozedur | ||
| 11435 | @code{file-system-label} erzeugt und UUID-Kennungen werden mit @code{uuid} | ||
| 11436 | erzeugt, während Knoten in @file{/dev} mit ihrem Pfad als einfache | ||
| 11437 | Zeichenketten aufgeführt werden. Hier ist ein Beispiel, wie wir ein | ||
| 11438 | Dateisystem anhand seiner Bezeichnung aufführen, wie sie vom Befehl | ||
| 11439 | @command{e2label} angezeigt wird: | ||
| 11440 | |||
| 11441 | @example | ||
| 11442 | (file-system | ||
| 11443 | (mount-point "/home") | ||
| 11444 | (type "ext4") | ||
| 11445 | (device (file-system-label "my-home"))) | ||
| 11446 | @end example | ||
| 11447 | |||
| 11448 | @findex uuid | ||
| 11449 | UUID-Kennungen werden mit der @code{uuid}-Form von ihrer Darstellung als | ||
| 11450 | Zeichenkette (wie sie vom Befehl @command{tune2fs -l} angezeigt wird) | ||
| 11451 | konvertiert@footnote{Die @code{uuid}-Form nimmt 16-Byte-UUIDs entgegen, wie | ||
| 11452 | sie in @uref{https://tools.ietf.org/html/rfc4122, RFC@tie{}4122} definiert | ||
| 11453 | sind. Diese Form der UUID wird unter anderem von der ext2-Familie von | ||
| 11454 | Dateisystemen verwendet, sie unterscheidet sich jedoch zum Beispiel von den | ||
| 11455 | »UUID« genannten Kennungen, wie man sie bei FAT-Dateisystemen findet.} wie | ||
| 11456 | hier: | ||
| 11457 | |||
| 11458 | @example | ||
| 11459 | (file-system | ||
| 11460 | (mount-point "/home") | ||
| 11461 | (type "ext4") | ||
| 11462 | (device (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb"))) | ||
| 11463 | @end example | ||
| 11464 | |||
| 11465 | Wenn die Quelle eines Dateisystems ein zugeordnetes Gerät (siehe @ref{Zugeordnete Geräte}) ist, @emph{muss} sich das @code{device}-Feld auf den zugeordneten | ||
| 11466 | Gerätenamen beziehen — z.B.@: @file{"/dev/mapper/root-partition"}. Das ist | ||
| 11467 | nötig, damit das System weiß, dass das Einbinden des Dateisystems davon | ||
| 11468 | abhängt, die entsprechende Gerätezuordnung hergestellt zu haben. | ||
| 11469 | |||
| 11470 | @item @code{flags} (Vorgabe: @code{'()}) | ||
| 11471 | Eine Liste von Symbolen, die Einbinde-Flags (»mount flags«) | ||
| 11472 | bezeichnen. Erkannt werden unter anderem @code{read-only}, | ||
| 11473 | @code{bind-mount}, @code{no-dev} (Zugang zu besonderen Dateien verweigern), | ||
| 11474 | @code{no-suid} (setuid- und setgid-Bits ignorieren) und @code{no-exec} | ||
| 11475 | (Programmausführungen verweigern). | ||
| 11476 | |||
| 11477 | @item @code{options} (Vorgabe: @code{#f}) | ||
| 11478 | Entweder @code{#f} oder eine Zeichenkette mit Einbinde-Optionen (»mount | ||
| 11479 | options«). | ||
| 11480 | |||
| 11481 | @item @code{mount?} (Vorgabe: @code{#t}) | ||
| 11482 | Dieser Wert zeigt an, ob das Dateisystem automatisch eingebunden werden | ||
| 11483 | soll, wenn das System gestartet wird. Ist der Wert @code{#f}, dann erhält | ||
| 11484 | das Dateisystem nur einen Eintrag in der Datei @file{/etc/fstab} (welche vom | ||
| 11485 | @command{mount}-Befehl zum Einbinden gelesen wird), es wird aber nicht | ||
| 11486 | automatisch eingebunden. | ||
| 11487 | |||
| 11488 | @item @code{needed-for-boot?} (Vorgabe: @code{#f}) | ||
| 11489 | Dieser boolesche Wert gibt an, ob das Dateisystem zum Hochfahren des Systems | ||
| 11490 | notwendig ist. In diesem Fall wird das Dateisystem eingebunden, wenn die | ||
| 11491 | initiale RAM-Disk (initrd) geladen wird. Für zum Beispiel das | ||
| 11492 | Wurzeldateisystem ist dies ohnehin immer der Fall. | ||
| 11493 | |||
| 11494 | @item @code{check?} (Vorgabe: @code{#t}) | ||
| 11495 | Dieser boolesche Wert sagt aus, ob das Dateisystem vor dem Einbinden auf | ||
| 11496 | Fehler hin geprüft werden soll. | ||
| 11497 | |||
| 11498 | @item @code{create-mount-point?} (Vorgabe: @code{#f}) | ||
| 11499 | Steht dies auf wahr, wird der Einhängepunkt vor dem Einbinden erstellt, wenn | ||
| 11500 | er noch nicht existiert. | ||
| 11501 | |||
| 11502 | @item @code{dependencies} (Vorgabe: @code{'()}) | ||
| 11503 | Dies ist eine Liste von @code{<file-system>}- oder | ||
| 11504 | @code{<mapped-device>}-Objekten, die Dateisysteme repräsentieren, die vor | ||
| 11505 | diesem Dateisystem eingebunden oder zugeordnet werden müssen (und nach | ||
| 11506 | diesem ausgehängt oder geschlossen werden müssen). | ||
| 11507 | |||
| 11508 | Betrachten Sie zum Beispiel eine Hierarchie von Einbindungen: | ||
| 11509 | @file{/sys/fs/cgroup} ist eine Abhängigkeit von @file{/sys/fs/cgroup/cpu} | ||
| 11510 | und @file{/sys/fs/cgroup/memory}. | ||
| 11511 | |||
| 11512 | Ein weiteres Beispiel ist ein Dateisystem, was von einem zugeordneten Gerät | ||
| 11513 | abhängt, zum Beispiel zur Verschlüsselung einer Partition (siehe @ref{Zugeordnete Geräte}). | ||
| 11514 | @end table | ||
| 11515 | @end deftp | ||
| 11516 | |||
| 11517 | Das Modul @code{(gnu system file-systems)} exportiert die folgenden | ||
| 11518 | nützlichen Variablen. | ||
| 11519 | |||
| 11520 | @defvr {Scheme-Variable} %base-file-systems | ||
| 11521 | Hiermit werden essenzielle Dateisysteme bezeichnet, die für normale Systeme | ||
| 11522 | unverzichtbar sind, wie zum Beispiel @var{%pseudo-terminal-file-system} und | ||
| 11523 | @var{%immutable-store} (siehe unten). Betriebssystemdeklaration sollten auf | ||
| 11524 | jeden Fall mindestens diese enthalten. | ||
| 11525 | @end defvr | ||
| 11526 | |||
| 11527 | @defvr {Scheme-Variable} %pseudo-terminal-file-system | ||
| 11528 | Das als @file{/dev/pts} einzubindende Dateisystem. Es unterstützt über | ||
| 11529 | @code{openpty} und ähnliche Funktionen erstellte @dfn{Pseudo-Terminals} | ||
| 11530 | (siehe @ref{Pseudo-Terminals,,, libc, The GNU C Library Reference | ||
| 11531 | Manual}). Pseudo-Terminals werden von Terminal-Emulatoren wie | ||
| 11532 | @command{xterm} benutzt. | ||
| 11533 | @end defvr | ||
| 11534 | |||
| 11535 | @defvr {Scheme-Variable} %shared-memory-file-system | ||
| 11536 | Dieses Dateisystem wird als @file{/dev/shm} eingebunden, um Speicher | ||
| 11537 | zwischen Prozessen teilen zu können (siehe @ref{Memory-mapped I/O, | ||
| 11538 | @code{shm_open},, libc, The GNU C Library Reference Manual}). | ||
| 11539 | @end defvr | ||
| 11540 | |||
| 11541 | @defvr {Scheme-Variable} %immutable-store | ||
| 11542 | Dieses Dateisystem vollzieht einen »bind mount« des @file{/gnu/store}, um | ||
| 11543 | ihn für alle Nutzer einschließlich des Administratornutzers @code{root} nur | ||
| 11544 | lesbar zu machen, d.h.@: Schreibrechte zu entziehen. Dadurch kann als | ||
| 11545 | @code{root} ausgeführte Software, oder der Systemadministrator, nicht aus | ||
| 11546 | Versehen den Store modifizieren. | ||
| 11547 | |||
| 11548 | Der Daemon kann weiterhin in den Store schreiben, indem er ihn selbst mit | ||
| 11549 | Schreibrechten in seinem eigenen »Namensraum« einbindet. | ||
| 11550 | @end defvr | ||
| 11551 | |||
| 11552 | @defvr {Scheme-Variable} %binary-format-file-system | ||
| 11553 | Das @code{binfmt_misc}-Dateisystem, durch das beliebige Dateitypen als | ||
| 11554 | ausführbare Dateien auf der Anwendungsebene (dem User Space) zugänglich | ||
| 11555 | gemacht werden können. Es setzt voraus, dass das Kernel-Modul | ||
| 11556 | @code{binfmt.ko} geladen wurde. | ||
| 11557 | @end defvr | ||
| 11558 | |||
| 11559 | @defvr {Scheme-Variable} %fuse-control-file-system | ||
| 11560 | Das @code{fusectl}-Dateisystem, womit »unprivilegierte« Nutzer ohne | ||
| 11561 | besondere Berechtigungen im User Space FUSE-Dateisysteme einbinden und | ||
| 11562 | aushängen können. Dazu muss das Kernel-Modul @code{fuse.ko} geladen sein. | ||
| 11563 | @end defvr | ||
| 11564 | |||
| 11565 | @node Zugeordnete Geräte | ||
| 11566 | @section Zugeordnete Geräte | ||
| 11567 | |||
| 11568 | @cindex Gerätezuordnung | ||
| 11569 | @cindex zugeordnete Geräte | ||
| 11570 | Der Linux-Kernel unterstützt das Konzept der @dfn{Gerätezuordnung}: Ein | ||
| 11571 | blockorientiertes Gerät wie eine Festplattenpartition kann einem neuen Gerät | ||
| 11572 | @dfn{zugeordnet} werden, gewöhnlich unter @code{/dev/mapper/}, wobei das | ||
| 11573 | neue Gerät durchlaufende Daten zusätzlicher Verarbeitung unterzogen | ||
| 11574 | werden@footnote{Beachten Sie, dass mit GNU@tie{}Hurd kein Unterschied | ||
| 11575 | zwischen dem Konzept eines »zugeordneten Geräts« und dem eines Dateisystems | ||
| 11576 | besteht: Dort werden bei beiden Ein- und Ausgabeoperationen auf eine Datei | ||
| 11577 | in Operationen auf dessen Hintergrundspeicher @emph{übersetzt}. Hurd | ||
| 11578 | implementiert zugeordnete Geräte genau wie Dateisysteme mit dem generischen | ||
| 11579 | @dfn{Übersetzer}-Mechanismus (siehe @ref{Translators,,, hurd, The GNU Hurd | ||
| 11580 | Reference Manual}).}. Ein typisches Beispiel ist eine Gerätezuordnung zur | ||
| 11581 | Verschlüsselung: Jeder Schreibzugriff auf das zugeordnete Gerät wird | ||
| 11582 | transparent verschlüsselt und jeder Lesezugriff ebenso entschlüsselt. Guix | ||
| 11583 | erweitert dieses Konzept, indem es darunter jedes Gerät und jede Menge von | ||
| 11584 | Geräten versteht, die auf irgendeine Weise @dfn{umgewandelt} wird, um ein | ||
| 11585 | neues Gerät zu bilden; zum Beispiel entstehen auch RAID-Geräte aus einem | ||
| 11586 | @dfn{Verbund} mehrerer anderer Geräte, wie etwa Festplatten oder Partition | ||
| 11587 | zu einem einzelnen Gerät, das sich wie eine Partition verhält. Ein weiteres | ||
| 11588 | Beispiel, das noch nicht in Guix implementiert wurde, sind »LVM logical | ||
| 11589 | volumes«. | ||
| 11590 | |||
| 11591 | Zugeordnete Geräte werden mittels einer @code{mapped-device}-Form | ||
| 11592 | deklariert, die wie folgt definiert ist; Beispiele folgen weiter unten. | ||
| 11593 | |||
| 11594 | @deftp {Datentyp} mapped-device | ||
| 11595 | Objekte dieses Typs repräsentieren Gerätezuordnungen, die gemacht werden, | ||
| 11596 | wenn das System hochfährt. | ||
| 11597 | |||
| 11598 | @table @code | ||
| 11599 | @item source | ||
| 11600 | Es handelt sich entweder um eine Zeichenkette, die den Namen eines | ||
| 11601 | zuzuordnenden blockorientierten Geräts angibt, wie @code{"/dev/sda3"}, oder | ||
| 11602 | um eine Liste solcher Zeichenketten, sofern mehrere Geräts zu einem neuen | ||
| 11603 | Gerät verbunden werden. | ||
| 11604 | |||
| 11605 | @item target | ||
| 11606 | Diese Zeichenkette gibt den Namen des neuen zugeordneten Geräts an. Bei | ||
| 11607 | Kernel-Zuordnern, wie verschlüsselten Geräten vom Typ | ||
| 11608 | @code{luks-device-mapping}, wird durch Angabe von @code{"my-partition"} ein | ||
| 11609 | Gerät @code{"/dev/mapper/my-partition"} erzeugt. Bei RAID-Geräten vom Typ | ||
| 11610 | @code{raid-device-mapping} muss der Gerätename als voller Pfad wie zum | ||
| 11611 | Beispiel @code{"/dev/md0"} angegeben werden. | ||
| 11612 | |||
| 11613 | @item type | ||
| 11614 | Dies muss ein @code{mapped-device-kind}-Objekt sein, das angibt, wie die | ||
| 11615 | Quelle @var{source} dem Ziel @var{target} zugeordnet wird. | ||
| 11616 | @end table | ||
| 11617 | @end deftp | ||
| 11618 | |||
| 11619 | @defvr {Scheme-Variable} luks-device-mapping | ||
| 11620 | Hiermit wird ein blockorientiertes Gerät mit LUKS verschlüsselt, mit Hilfe | ||
| 11621 | des Befehls @command{cryptsetup} aus dem gleichnamigen Paket. Dazu wird das | ||
| 11622 | Linux-Kernel-Modul @code{dm-crypt} vorausgesetzt. | ||
| 11623 | @end defvr | ||
| 11624 | |||
| 11625 | @defvr {Scheme-Variable} raid-device-mapping | ||
| 11626 | Dies definiert ein RAID-Gerät, das mit dem Befehl @code{mdadm} aus dem | ||
| 11627 | gleichnamigen Paket als Verbund zusammengestellt wird. Es setzt voraus, dass | ||
| 11628 | das Linux-Kernel-Modul für das entsprechende RAID-Level geladen ist, z.B.@: | ||
| 11629 | @code{raid456} für RAID-4, RAID-5 oder RAID-6, oder @code{raid10} für | ||
| 11630 | RAID-10. | ||
| 11631 | @end defvr | ||
| 11632 | |||
| 11633 | @cindex Laufwerksverschlüsselung | ||
| 11634 | @cindex LUKS | ||
| 11635 | Das folgende Beispiel gibt eine Zuordnung von @file{/dev/sda3} auf | ||
| 11636 | @file{/dev/mapper/home} mit LUKS an — dem | ||
| 11637 | @url{https://gitlab.com/cryptsetup/cryptsetup,Linux Unified Key Setup}, | ||
| 11638 | einem Standardmechanismus zur Plattenverschlüsselung. Das Gerät | ||
| 11639 | @file{/dev/mapper/home} kann dann als @code{device} einer | ||
| 11640 | @code{file-system}-Deklaration benutzt werden (siehe @ref{Dateisysteme}). | ||
| 11641 | |||
| 11642 | @example | ||
| 11643 | (mapped-device | ||
| 11644 | (source "/dev/sda3") | ||
| 11645 | (target "home") | ||
| 11646 | (type luks-device-mapping)) | ||
| 11647 | @end example | ||
| 11648 | |||
| 11649 | Um nicht davon abhängig zu sein, wie Ihre Geräte nummeriert werden, können | ||
| 11650 | Sie auch die LUKS-UUID (@dfn{unique identifier}, d.h.@: den eindeutigen | ||
| 11651 | Bezeichner) des Quellgeräts auf der Befehlszeile ermitteln: | ||
| 11652 | |||
| 11653 | @example | ||
| 11654 | cryptsetup luksUUID /dev/sda3 | ||
| 11655 | @end example | ||
| 11656 | |||
| 11657 | und wie folgt benutzen: | ||
| 11658 | |||
| 11659 | @example | ||
| 11660 | (mapped-device | ||
| 11661 | (source (uuid "cb67fc72-0d54-4c88-9d4b-b225f30b0f44")) | ||
| 11662 | (target "home") | ||
| 11663 | (type luks-device-mapping)) | ||
| 11664 | @end example | ||
| 11665 | |||
| 11666 | @cindex Swap-Verschlüsselung | ||
| 11667 | Es ist auch wünschenswert, Swap-Speicher zu verschlüsseln, da in den | ||
| 11668 | Swap-Speicher sensible Daten ausgelagert werden können. Eine Möglichkeit | ||
| 11669 | ist, eine Swap-Datei auf einem mit LUKS-Verschlüsselung zugeordneten | ||
| 11670 | Dateisystem zu verwenden. Dann wird die Swap-Datei verschlüsselt, weil das | ||
| 11671 | ganze Gerät verschlüsselt wird. Ein Beispiel finden Sie im Abschnitt | ||
| 11672 | @ref{Vor der Installation,,Disk Partitioning}. | ||
| 11673 | |||
| 11674 | Ein RAID-Gerät als Verbund der Partitionen @file{/dev/sda1} und | ||
| 11675 | @file{/dev/sdb1} kann wie folgt deklariert werden: | ||
| 11676 | |||
| 11677 | @example | ||
| 11678 | (mapped-device | ||
| 11679 | (source (list "/dev/sda1" "/dev/sdb1")) | ||
| 11680 | (target "/dev/md0") | ||
| 11681 | (type raid-device-mapping)) | ||
| 11682 | @end example | ||
| 11683 | |||
| 11684 | Das Gerät @file{/dev/md0} kann als @code{device} in einer | ||
| 11685 | @code{file-system}-Deklaration dienen (siehe @ref{Dateisysteme}). Beachten | ||
| 11686 | Sie, dass das RAID-Level dabei nicht angegeben werden muss; es wird während | ||
| 11687 | der initialen Erstellung und Formatierung des RAID-Geräts festgelegt und | ||
| 11688 | später automatisch bestimmt. | ||
| 11689 | |||
| 11690 | |||
| 11691 | @node Benutzerkonten | ||
| 11692 | @section Benutzerkonten | ||
| 11693 | |||
| 11694 | @cindex Benutzer | ||
| 11695 | @cindex Konten | ||
| 11696 | @cindex Benutzerkonten | ||
| 11697 | Benutzerkonten und Gruppen werden allein durch die | ||
| 11698 | @code{operating-system}-Deklaration des Betriebssystems verwaltet. Sie | ||
| 11699 | werden mit den @code{user-account}- und @code{user-group}-Formen angegeben: | ||
| 11700 | |||
| 11701 | @example | ||
| 11702 | (user-account | ||
| 11703 | (name "alice") | ||
| 11704 | (group "users") | ||
| 11705 | (supplementary-groups '("wheel" ;zur sudo-Nutzung usw. berechtigen | ||
| 11706 | "audio" ;Soundkarte | ||
| 11707 | "video" ;Videogeräte wie Webcams | ||
| 11708 | "cdrom")) ;die gute alte CD-ROM | ||
| 11709 | (comment "Bobs Schwester") | ||
| 11710 | (home-directory "/home/alice")) | ||
| 11711 | @end example | ||
| 11712 | |||
| 11713 | Beim Hochfahren oder nach Abschluss von @command{guix system reconfigure} | ||
| 11714 | stellt das System sicher, dass nur die in der | ||
| 11715 | @code{operating-system}-Deklaration angegebenen Benutzerkonten und Gruppen | ||
| 11716 | existieren, mit genau den angegebenen Eigenschaften. Daher gehen durch | ||
| 11717 | direkten Aufruf von Befehlen wie @command{useradd} erwirkte Erstellungen | ||
| 11718 | oder Modifikationen von Konten oder Gruppen verloren, sobald rekonfiguriert | ||
| 11719 | oder neugestartet wird. So wird sichergestellt, dass das System genau so | ||
| 11720 | funktioniert, wie es deklariert wurde. | ||
| 11721 | |||
| 11722 | @deftp {Datentyp} user-account | ||
| 11723 | Objekte dieses Typs repräsentieren Benutzerkonten. Darin können folgende | ||
| 11724 | Komponenten aufgeführt werden: | ||
| 11725 | |||
| 11726 | @table @asis | ||
| 11727 | @item @code{name} | ||
| 11728 | Der Name des Benutzerkontos. | ||
| 11729 | |||
| 11730 | @item @code{group} | ||
| 11731 | @cindex Gruppen | ||
| 11732 | Dies ist der Name (als Zeichenkette) oder die Bezeichnung (als Zahl) der | ||
| 11733 | Benutzergruppe, zu der dieses Konto gehört. | ||
| 11734 | |||
| 11735 | @item @code{supplementary-groups} (Vorgabe: @code{'()}) | ||
| 11736 | Dies kann optional als Liste von Gruppennamen angegeben werden, zu denen | ||
| 11737 | dieses Konto auch gehört. | ||
| 11738 | |||
| 11739 | @item @code{uid} (Vorgabe: @code{#f}) | ||
| 11740 | Dies ist entweder der Benutzeridentifikator dieses Kontos (seine »User ID«) | ||
| 11741 | als Zahl oder @code{#f}. Bei Letzterem wird vom System automatisch eine Zahl | ||
| 11742 | gewählt, wenn das Benutzerkonto erstellt wird. | ||
| 11743 | |||
| 11744 | @item @code{comment} (Vorgabe: @code{""}) | ||
| 11745 | Ein Kommentar zu dem Konto, wie etwa der vollständige Name des | ||
| 11746 | Kontoinhabers. | ||
| 11747 | |||
| 11748 | @item @code{home-directory} | ||
| 11749 | Der Name des Persönlichen Verzeichnisses (»Home«-Verzeichnis) für dieses | ||
| 11750 | Konto. | ||
| 11751 | |||
| 11752 | @item @code{create-home-directory?} (Vorgabe: @code{#t}) | ||
| 11753 | Zeigt an, ob das Persönliche Verzeichnis für das Konto automatisch erstellt | ||
| 11754 | werden soll, falls es noch nicht existiert. | ||
| 11755 | |||
| 11756 | @item @code{shell} (Vorgabe: Bash) | ||
| 11757 | Ein G-Ausdruck, der den Dateinamen des Programms angibt, das dem Benutzer | ||
| 11758 | als Shell dienen soll (siehe @ref{G-Ausdrücke}). | ||
| 11759 | |||
| 11760 | @item @code{system?} (Vorgabe: @code{#f}) | ||
| 11761 | Dieser boolesche Wert zeigt an, ob das Konto ein »System«-Benutzerkonto | ||
| 11762 | ist. Systemkonten werden manchmal anders behandelt, zum Beispiel werden sie | ||
| 11763 | auf grafischen Anmeldebildschirmen nicht aufgeführt. | ||
| 11764 | |||
| 11765 | @anchor{user-account-password} | ||
| 11766 | @cindex Passwort, für Benutzerkonten | ||
| 11767 | @item @code{password} (Vorgabe: @code{#f}) | ||
| 11768 | Normalerweise lassen Sie dieses Feld auf @code{#f} und initialisieren | ||
| 11769 | Benutzerpasswörter als @code{root} mit dem @command{passwd}-Befehl. Die | ||
| 11770 | Benutzer lässt man ihr eigenes Passwort dann mit @command{passwd} | ||
| 11771 | ändern. Mit @command{passwd} festgelegte Passwörter bleiben natürlich beim | ||
| 11772 | Neustarten und beim Rekonfigurieren erhalten. | ||
| 11773 | |||
| 11774 | Wenn Sie aber @emph{doch} ein anfängliches Passwort für ein Konto | ||
| 11775 | voreinstellen möchten, muss dieses Feld hier das verschlüsselte Passwort als | ||
| 11776 | Zeichenkette enthalten. Sie können dazu die Prozedur @code{crypt} benutzen. | ||
| 11777 | |||
| 11778 | @example | ||
| 11779 | (user-account | ||
| 11780 | (name "charlie") | ||
| 11781 | (group "users") | ||
| 11782 | |||
| 11783 | ;; Specify a SHA-512-hashed initial password. | ||
| 11784 | (password (crypt "InitialPassword!" "$6$abc"))) | ||
| 11785 | @end example | ||
| 11786 | |||
| 11787 | @quotation Anmerkung | ||
| 11788 | The hash of this initial password will be available in a file in | ||
| 11789 | @file{/gnu/store}, readable by all the users, so this method must be used | ||
| 11790 | with care. | ||
| 11791 | @end quotation | ||
| 11792 | |||
| 11793 | Siehe @ref{Passphrase Storage,,, libc, The GNU C Library Reference Manual} | ||
| 11794 | für weitere Informationen über Passwortverschlüsselung und | ||
| 11795 | @ref{Encryption,,, guile, GNU Guile Reference Manual} für Informationen über | ||
| 11796 | die Prozedur @code{crypt} in Guile. | ||
| 11797 | |||
| 11798 | @end table | ||
| 11799 | @end deftp | ||
| 11800 | |||
| 11801 | @cindex Gruppen | ||
| 11802 | Benutzergruppen-Deklarationen sind noch einfacher aufgebaut: | ||
| 11803 | |||
| 11804 | @example | ||
| 11805 | (user-group (name "students")) | ||
| 11806 | @end example | ||
| 11807 | |||
| 11808 | @deftp {Datentyp} user-group | ||
| 11809 | Dieser Typ gibt, nun ja, eine Benutzergruppe an. Es gibt darin nur ein paar | ||
| 11810 | Felder: | ||
| 11811 | |||
| 11812 | @table @asis | ||
| 11813 | @item @code{name} | ||
| 11814 | Der Name der Gruppe. | ||
| 11815 | |||
| 11816 | @item @code{id} (Vorgabe: @code{#f}) | ||
| 11817 | Der Gruppenbezeichner (eine Zahl). Wird er als @code{#f} angegeben, wird | ||
| 11818 | automatisch eine neue Zahl reserviert, wenn die Gruppe erstellt wird. | ||
| 11819 | |||
| 11820 | @item @code{system?} (Vorgabe: @code{#f}) | ||
| 11821 | Dieser boolesche Wert gibt an, ob es sich um eine »System«-Gruppe | ||
| 11822 | handelt. Systemgruppen sind solche mit einer kleinen Zahl als Bezeichner. | ||
| 11823 | |||
| 11824 | @item @code{password} (Vorgabe: @code{#f}) | ||
| 11825 | Wie, Benutzergruppen können ein Passwort haben? Nun ja, anscheinend | ||
| 11826 | schon. Wenn es nicht auf @code{#f} steht, gibt dieses Feld das Passwort der | ||
| 11827 | Gruppe an. | ||
| 11828 | |||
| 11829 | @end table | ||
| 11830 | @end deftp | ||
| 11831 | |||
| 11832 | Um Ihnen das Leben zu erleichtern, gibt es eine Variable, worin alle | ||
| 11833 | grundlegenden Benutzergruppen aufgeführt sind, die man erwarten könnte: | ||
| 11834 | |||
| 11835 | @defvr {Scheme-Variable} %base-groups | ||
| 11836 | Die Liste von Basis-Benutzergruppen, von denen Benutzer und/oder Pakete | ||
| 11837 | erwarten könnten, dass sie auf dem System existieren. Dazu gehören Gruppen | ||
| 11838 | wie »root«, »wheel« und »users«, sowie Gruppen, um den Zugriff auf bestimmte | ||
| 11839 | Geräte einzuschränken, wie »audio«, »disk« und »cdrom«. | ||
| 11840 | @end defvr | ||
| 11841 | |||
| 11842 | @defvr {Scheme-Variable} %base-user-accounts | ||
| 11843 | Diese Liste enthält Basis-Systembenutzerkonten, von denen Programme erwarten | ||
| 11844 | können, dass sie auf einem GNU/Linux-System existieren, wie das Konto | ||
| 11845 | »nobody«. | ||
| 11846 | |||
| 11847 | Beachten Sie, dass das Konto »root« für den Administratornutzer nicht | ||
| 11848 | dazugehört. Es ist ein Sonderfall und wird automatisch erzeugt, egal ob es | ||
| 11849 | spezifiziert wurde oder nicht. | ||
| 11850 | @end defvr | ||
| 11851 | |||
| 11852 | @node Tastaturbelegung | ||
| 11853 | @section Tastaturbelegung | ||
| 11854 | |||
| 11855 | @cindex Tastaturbelegung | ||
| 11856 | @cindex Keymap | ||
| 11857 | To specify what each key of your keyboard does, you need to tell the | ||
| 11858 | operating system what @dfn{keyboard layout} you want to use. The default, | ||
| 11859 | when nothing is specified, is the US English QWERTY layout for 105-key PC | ||
| 11860 | keyboards. However, German speakers will usually prefer the German QWERTZ | ||
| 11861 | layout, French speakers will want the AZERTY layout, and so on; hackers | ||
| 11862 | might prefer Dvorak or bépo, and they might even want to further customize | ||
| 11863 | the effect of some of the keys. This section explains how to get that done. | ||
| 11864 | |||
| 11865 | @cindex Tastaturbelegung, Definition | ||
| 11866 | There are three components that will want to know about your keyboard | ||
| 11867 | layout: | ||
| 11868 | |||
| 11869 | @itemize | ||
| 11870 | @item | ||
| 11871 | The @emph{bootloader} may want to know what keyboard layout you want to use | ||
| 11872 | (@pxref{Bootloader-Konfiguration, @code{keyboard-layout}}). This is useful | ||
| 11873 | if you want, for instance, to make sure that you can type the passphrase of | ||
| 11874 | your encrypted root partition using the right layout. | ||
| 11875 | |||
| 11876 | @item | ||
| 11877 | The @emph{operating system kernel}, Linux, will need that so that the | ||
| 11878 | console is properly configured (@pxref{»operating-system«-Referenz, | ||
| 11879 | @code{keyboard-layout}}). | ||
| 11880 | |||
| 11881 | @item | ||
| 11882 | The @emph{graphical display server}, usually Xorg, also has its own idea of | ||
| 11883 | the keyboard layout (@pxref{X Window, @code{keyboard-layout}}). | ||
| 11884 | @end itemize | ||
| 11885 | |||
| 11886 | Guix allows you to configure all three separately but, fortunately, it | ||
| 11887 | allows you to share the same keyboard layout for all three components. | ||
| 11888 | |||
| 11889 | @cindex XKB, Tastaturbelegungen | ||
| 11890 | Keyboard layouts are represented by records created by the | ||
| 11891 | @code{keyboard-layout} procedure of @code{(gnu system keyboard)}. Following | ||
| 11892 | the X Keyboard extension (XKB), each layout has four attributes: a name | ||
| 11893 | (often a language code such as ``fi'' for Finnish or ``jp'' for Japanese), | ||
| 11894 | an optional variant name, an optional keyboard model name, and a possibly | ||
| 11895 | empty list of additional options. In most cases the layout name is all you | ||
| 11896 | care about. Here are a few example: | ||
| 11897 | |||
| 11898 | @example | ||
| 11899 | ;; The German QWERTZ layout. Here we assume a standard | ||
| 11900 | ;; "pc105" keyboard model. | ||
| 11901 | (keyboard-layout "de") | ||
| 11902 | |||
| 11903 | ;; The bépo variant of the French layout. | ||
| 11904 | (keyboard-layout "fr" "bepo") | ||
| 11905 | |||
| 11906 | ;; The Catalan layout. | ||
| 11907 | (keyboard-layout "es" "cat") | ||
| 11908 | |||
| 11909 | ;; The Latin American Spanish layout. In addition, the | ||
| 11910 | ;; "Caps Lock" key is used as an additional "Ctrl" key, | ||
| 11911 | ;; and the "Menu" key is used as a "Compose" key to enter | ||
| 11912 | ;; accented letters. | ||
| 11913 | (keyboard-layout "latam" | ||
| 11914 | #:options '("ctrl:nocaps" "compose:menu")) | ||
| 11915 | |||
| 11916 | ;; The Russian layout for a ThinkPad keyboard. | ||
| 11917 | (keyboard-layout "ru" #:model "thinkpad") | ||
| 11918 | |||
| 11919 | ;; The "US international" layout, which is the US layout plus | ||
| 11920 | ;; dead keys to enter accented characters. This is for an | ||
| 11921 | ;; Apple MacBook keyboard. | ||
| 11922 | (keyboard-layout "us" "intl" #:model "macbook78") | ||
| 11923 | @end example | ||
| 11924 | |||
| 11925 | See the @file{share/X11/xkb} directory of the @code{xkeyboard-config} | ||
| 11926 | package for a complete list of supported layouts, variants, and models. | ||
| 11927 | |||
| 11928 | @cindex Tastaturbelegung, Konfiguration | ||
| 11929 | Let's say you want your system to use the Turkish keyboard layout throughout | ||
| 11930 | your system---bootloader, console, and Xorg. Here's what your system | ||
| 11931 | configuration would look like: | ||
| 11932 | |||
| 11933 | @findex set-xorg-configuration | ||
| 11934 | @lisp | ||
| 11935 | ;; Using the Turkish layout for the bootloader, the console, | ||
| 11936 | ;; and for Xorg. | ||
| 11937 | |||
| 11938 | (operating-system | ||
| 11939 | ;; ... | ||
| 11940 | (keyboard-layout (keyboard-layout "tr")) ;for the console | ||
| 11941 | (bootloader (bootloader-configuration | ||
| 11942 | (bootloader grub-efi-bootloader) | ||
| 11943 | (target "/boot/efi") | ||
| 11944 | (keyboard-layout keyboard-layout))) ;for GRUB | ||
| 11945 | (services (cons (set-xorg-configuration | ||
| 11946 | (xorg-configuration ;for Xorg | ||
| 11947 | (keyboard-layout keyboard-layout))) | ||
| 11948 | %desktop-services))) | ||
| 11949 | @end lisp | ||
| 11950 | |||
| 11951 | In the example above, for GRUB and for Xorg, we just refer to the | ||
| 11952 | @code{keyboard-layout} field defined above, but we could just as well refer | ||
| 11953 | to a different layout. The @code{set-xorg-configuration} procedure | ||
| 11954 | communicates the desired Xorg configuration to the graphical log-in manager, | ||
| 11955 | by default GDM. | ||
| 11956 | |||
| 11957 | We've discussed how to specify the @emph{default} keyboard layout of your | ||
| 11958 | system when it starts, but you can also adjust it at run time: | ||
| 11959 | |||
| 11960 | @itemize | ||
| 11961 | @item | ||
| 11962 | If you're using GNOME, its settings panel has a ``Region & Language'' entry | ||
| 11963 | where you can select one or more keyboard layouts. | ||
| 11964 | |||
| 11965 | @item | ||
| 11966 | Under Xorg, the @command{setxkbmap} command (from the same-named package) | ||
| 11967 | allows you to change the current layout. For example, this is how you would | ||
| 11968 | change the layout to US Dvorak: | ||
| 11969 | |||
| 11970 | @example | ||
| 11971 | setxkbmap us dvorak | ||
| 11972 | @end example | ||
| 11973 | |||
| 11974 | @item | ||
| 11975 | The @code{loadkeys} command changes the keyboard layout in effect in the | ||
| 11976 | Linux console. However, note that @code{loadkeys} does @emph{not} use the | ||
| 11977 | XKB keyboard layout categorization described above. The command below loads | ||
| 11978 | the French bépo layout: | ||
| 11979 | |||
| 11980 | @example | ||
| 11981 | loadkeys fr-bepo | ||
| 11982 | @end example | ||
| 11983 | @end itemize | ||
| 11984 | |||
| 11985 | @node Locales | ||
| 11986 | @section Locales | ||
| 11987 | |||
| 11988 | @cindex Locale | ||
| 11989 | Eine @dfn{Locale} legt die kulturellen Konventionen einer bestimmten Sprache | ||
| 11990 | und Region auf der Welt fest (siehe @ref{Locales,,, libc, The GNU C Library | ||
| 11991 | Reference Manual}). Jede Locale hat einen Namen, der typischerweise von der | ||
| 11992 | Form @code{@var{Sprache}_@var{Gebiet}.@var{Kodierung}} — z.B.@: benennt | ||
| 11993 | @code{fr_LU.utf8} die Locale für französische Sprache mit den kulturellen | ||
| 11994 | Konventionen aus Luxemburg unter Verwendung der UTF-8-Kodierung. | ||
| 11995 | |||
| 11996 | @cindex Locale-Definition | ||
| 11997 | Normalerweise werden Sie eine standardmäßig zu verwendende Locale für die | ||
| 11998 | Maschine vorgeben wollen, indem Sie das @code{locale}-Feld der | ||
| 11999 | @code{operating-system}-Deklaration verwenden (siehe @ref{»operating-system«-Referenz, @code{locale}}). | ||
| 12000 | |||
| 12001 | Die ausgewählte Locale wird automatisch zu den dem System bekannten | ||
| 12002 | @dfn{Locale-Definitionen} hinzugefügt, falls nötig, und ihre Kodierung wird | ||
| 12003 | aus dem Namen hergeleitet — z.B.@: wird angenommen, dass @code{bo_CN.utf8} | ||
| 12004 | als Kodierung @code{UTF-8} verwendet. Zusätzliche Locale-Definitionen können | ||
| 12005 | im Feld @code{locale-definitions} vom @code{operating-system} festgelegt | ||
| 12006 | werden — das ist zum Beispiel dann nützlich, wenn die Kodierung nicht aus | ||
| 12007 | dem Locale-Namen hergeleitet werden konnte. Die vorgegebene Menge an | ||
| 12008 | Locale-Definitionen enthält manche weit verbreiteten Locales, aber um Platz | ||
| 12009 | zu sparen, nicht alle verfügbaren Locales. | ||
| 12010 | |||
| 12011 | Um zum Beispiel die nordfriesische Locale für Deutschland hinzuzufügen, | ||
| 12012 | könnte der Wert des Feldes wie folgt aussehen: | ||
| 12013 | |||
| 12014 | @example | ||
| 12015 | (cons (locale-definition | ||
| 12016 | (name "fy_DE.utf8") (source "fy_DE")) | ||
| 12017 | %default-locale-definitions) | ||
| 12018 | @end example | ||
| 12019 | |||
| 12020 | Um Platz zu sparen, könnte man auch wollen, dass @code{locale-definitions} | ||
| 12021 | nur die tatsächlich benutzen Locales aufführt, wie etwa: | ||
| 12022 | |||
| 12023 | @example | ||
| 12024 | (list (locale-definition | ||
| 12025 | (name "ja_JP.eucjp") (source "ja_JP") | ||
| 12026 | (charset "EUC-JP"))) | ||
| 12027 | @end example | ||
| 12028 | |||
| 12029 | @vindex LOCPATH | ||
| 12030 | Die kompilierten Locale-Definitionen sind unter | ||
| 12031 | @file{/run/current-system/locale/X.Y} verfügbar, wobei @code{X.Y} die | ||
| 12032 | Version von libc bezeichnet. Dies entspricht dem Pfad, an dem eine von Guix | ||
| 12033 | ausgelieferte GNU@tie{}libc standardmäßig nach Locale-Daten sucht. Er kann | ||
| 12034 | überschrieben werden durch die Umgebungsvariable @code{LOCPATH} (siehe | ||
| 12035 | @ref{locales-and-locpath, @code{LOCPATH} und Locale-Pakete}). | ||
| 12036 | |||
| 12037 | Die @code{locale-definition}-Form wird vom Modul @code{(gnu system locale)} | ||
| 12038 | zur Verfügung gestellt. Details folgen unten. | ||
| 12039 | |||
| 12040 | @deftp {Datentyp} locale-definition | ||
| 12041 | Dies ist der Datentyp einer Locale-Definition. | ||
| 12042 | |||
| 12043 | @table @asis | ||
| 12044 | |||
| 12045 | @item @code{name} | ||
| 12046 | Der Name der Locale. Siehe @ref{Locale Names,,, libc, The GNU C Library | ||
| 12047 | Reference Manual} für mehr Informationen zu Locale-Namen. | ||
| 12048 | |||
| 12049 | @item @code{source} | ||
| 12050 | Der Name der Quelle der Locale. Typischerweise ist das der Teil | ||
| 12051 | @code{@var{Sprache}_@var{Gebiet}} des Locale-Namens. | ||
| 12052 | |||
| 12053 | @item @code{charset} (Vorgabe: @code{"UTF-8"}) | ||
| 12054 | Der »Zeichensatz« oder das »Code set«, d.h.@: die Kodierung dieser Locale, | ||
| 12055 | @uref{http://www.iana.org/assignments/character-sets, wie die IANA sie | ||
| 12056 | definiert}. | ||
| 12057 | |||
| 12058 | @end table | ||
| 12059 | @end deftp | ||
| 12060 | |||
| 12061 | @defvr {Scheme-Variable} %default-locale-definitions | ||
| 12062 | Eine Liste häufig benutzter UTF-8-Locales, die als Vorgabewert des | ||
| 12063 | @code{locale-definitions}-Feldes in @code{operating-system}-Deklarationen | ||
| 12064 | benutzt wird. | ||
| 12065 | |||
| 12066 | @cindex Locale-Name | ||
| 12067 | @cindex Normalisiertes Codeset in Locale-Namen | ||
| 12068 | Diese Locale-Definitionen benutzen das @dfn{normalisierte Codeset} für den | ||
| 12069 | Teil des Namens, der nach dem Punkt steht (siehe @ref{Using gettextized | ||
| 12070 | software, normalized codeset,, libc, The GNU C Library Reference | ||
| 12071 | Manual}). Zum Beispiel ist @code{uk_UA.utf8} enthalten, dagegen ist etwa | ||
| 12072 | @code{uk_UA.UTF-8} darin @emph{nicht} enthalten. | ||
| 12073 | @end defvr | ||
| 12074 | |||
| 12075 | @subsection Kompatibilität der Locale-Daten | ||
| 12076 | |||
| 12077 | @cindex Inkompatibilität, von Locale-Daten | ||
| 12078 | @code{operating-system}-Deklarationen verfügen über ein | ||
| 12079 | @code{locale-libcs}-Feld, um die GNU@tie{}libc-Pakete anzugeben, die zum | ||
| 12080 | Kompilieren von Locale-Deklarationen verwendet werden sollen (siehe | ||
| 12081 | @ref{»operating-system«-Referenz}). »Was interessiert mich das?«, könnten Sie | ||
| 12082 | fragen. Naja, leider ist das binäre Format der Locale-Daten von einer | ||
| 12083 | libc-Version auf die nächste manchmal nicht miteinander kompatibel. | ||
| 12084 | |||
| 12085 | @c See <https://sourceware.org/ml/libc-alpha/2015-09/msg00575.html> | ||
| 12086 | @c and <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00737.html>. | ||
| 12087 | Zum Beispiel kann ein mit der libc-Version 2.21 gebundenes Programm keine | ||
| 12088 | mit libc 2.22 erzeugten Locale-Daten lesen; schlimmer noch, das Programm | ||
| 12089 | @emph{terminiert} statt einfach die inkompatiblen Locale-Daten zu | ||
| 12090 | ignorieren@footnote{Versionen 2.23 von GNU@tie{}libc und neuere werden | ||
| 12091 | inkompatible Locale-Daten nur mehr überspringen, was schon einmal eine | ||
| 12092 | Verbesserung ist.}. Ähnlich kann ein gegen libc 2.22 gebundenes Programm die | ||
| 12093 | meisten, aber nicht alle, Locale-Daten von libc 2.21 lesen (Daten zu | ||
| 12094 | @code{LC_COLLATE} sind aber zum Beispiel inkompatibel); somit schlagen | ||
| 12095 | Aufrufe von @code{setlocale} vielleicht fehl, aber das Programm läuft | ||
| 12096 | weiter. | ||
| 12097 | |||
| 12098 | Das »Problem« mit Guix ist, dass Nutzer viel Freiheit genießen: Sie können | ||
| 12099 | wählen, ob und wann sie die Software in ihren Profilen aktualisieren und | ||
| 12100 | benutzen vielleicht eine andere libc-Version als sie der Systemadministrator | ||
| 12101 | benutzt hat, um die systemweiten Locale-Daten zu erstellen. | ||
| 12102 | |||
| 12103 | Glücklicherweise können »unprivilegierte« Nutzer ohne zusätzliche | ||
| 12104 | Berechtigungen dann zumindest ihre eigenen Locale-Daten installieren und | ||
| 12105 | @var{GUIX_LOCPATH} entsprechend definieren (siehe @ref{locales-and-locpath, | ||
| 12106 | @code{GUIX_LOCPATH} und Locale-Pakete}). | ||
| 12107 | |||
| 12108 | Trotzdem ist es am besten, wenn die systemweiten Locale-Daten unter | ||
| 12109 | @file{/run/current-system/locale} für alle libc-Versionen erstellt werden, | ||
| 12110 | die auf dem System noch benutzt werden, damit alle Programme auf sie | ||
| 12111 | zugreifen können — was auf einem Mehrbenutzersystem ganz besonders wichtig | ||
| 12112 | ist. Dazu kann der Administrator des Systems mehrere libc-Pakete im | ||
| 12113 | @code{locale-libcs}-Feld vom @code{operating-system} angeben: | ||
| 12114 | |||
| 12115 | @example | ||
| 12116 | (use-package-modules base) | ||
| 12117 | |||
| 12118 | (operating-system | ||
| 12119 | ;; @dots{} | ||
| 12120 | (locale-libcs (list glibc-2.21 (canonical-package glibc)))) | ||
| 12121 | @end example | ||
| 12122 | |||
| 12123 | Mit diesem Beispiel ergäbe sich ein System, was Locale-Definitionen sowohl | ||
| 12124 | für libc 2.21 als auch die aktuelle Version von libc in | ||
| 12125 | @file{/run/current-system/locale} hat. | ||
| 12126 | |||
| 12127 | |||
| 12128 | @node Dienste | ||
| 12129 | @section Dienste | ||
| 12130 | |||
| 12131 | @cindex Systemdienste | ||
| 12132 | Ein wichtiger Bestandteil des Schreibens einer | ||
| 12133 | @code{operating-system}-Deklaration ist das Auflisten der | ||
| 12134 | @dfn{Systemdienste} und ihrer Konfiguration (siehe @ref{Das Konfigurationssystem nutzen}). Systemdienste sind typischerweise im Hintergrund | ||
| 12135 | laufende Daemon-Programme, die beim Hochfahren des Systems gestartet werden, | ||
| 12136 | oder andere Aktionen, die zu dieser Zeit durchgeführt werden müssen — wie | ||
| 12137 | das Konfigurieren des Netzwerkzugangs. | ||
| 12138 | |||
| 12139 | Guix hat eine weit gefasste Definition, was ein »Dienst« ist (siehe | ||
| 12140 | @ref{Dienstkompositionen}), aber viele Dienste sind solche, die von | ||
| 12141 | GNU@tie{}Shepherd verwaltet werden (siehe @ref{Shepherd-Dienste}). Auf | ||
| 12142 | einem laufenden System kann der @command{herd}-Befehl benutzt werden, um | ||
| 12143 | verfügbare Dienste aufzulisten, ihren Status anzuzeigen, sie zu starten und | ||
| 12144 | zu stoppen oder andere angebotene Operationen durchzuführen (siehe @ref{Jump | ||
| 12145 | Start,,, shepherd, The GNU Shepherd Manual}). Zum Beispiel: | ||
| 12146 | |||
| 12147 | @example | ||
| 12148 | # herd status | ||
| 12149 | @end example | ||
| 12150 | |||
| 12151 | Dieser Befehl, durchgeführt als @code{root}, listet die momentan definierten | ||
| 12152 | Dienste auf. Der Befehl @command{herd doc} fasst kurz zusammen, was ein | ||
| 12153 | gegebener Dienst ist und welche Aktionen mit ihm assoziiert sind: | ||
| 12154 | |||
| 12155 | @example | ||
| 12156 | # herd doc nscd | ||
| 12157 | Run libc's name service cache daemon (nscd). | ||
| 12158 | |||
| 12159 | # herd doc nscd action invalidate | ||
| 12160 | invalidate: Invalidate the given cache--e.g., 'hosts' for host name lookups. | ||
| 12161 | @end example | ||
| 12162 | |||
| 12163 | Die Unterbefehle @command{start}, @command{stop} und @command{restart} haben | ||
| 12164 | die Wirkung, die man erwarten würde. Zum Beispiel kann mit folgenden | ||
| 12165 | Befehlen der nscd-Dienst angehalten und der Xorg-Display-Server neu | ||
| 12166 | gestartet werden: | ||
| 12167 | |||
| 12168 | @example | ||
| 12169 | # herd stop nscd | ||
| 12170 | Service nscd has been stopped. | ||
| 12171 | # herd restart xorg-server | ||
| 12172 | Service xorg-server has been stopped. | ||
| 12173 | Service xorg-server has been started. | ||
| 12174 | @end example | ||
| 12175 | |||
| 12176 | Die folgenden Abschnitte dokumentieren die verfügbaren Dienste, die in einer | ||
| 12177 | @code{operating-system}-Deklaration benutzt werden können, angefangen mit | ||
| 12178 | den Diensten im Kern des Systems (»core services«) | ||
| 12179 | |||
| 12180 | @menu | ||
| 12181 | * Basisdienste:: Essenzielle Systemdienste. | ||
| 12182 | * Geplante Auftragsausführung:: Der mcron-Dienst. | ||
| 12183 | * Log-Rotation:: Der rottlog-Dienst. | ||
| 12184 | * Netzwerkdienste:: Netzwerkeinrichtung, SSH-Daemon etc. | ||
| 12185 | * X Window:: Grafische Anzeige. | ||
| 12186 | * Druckdienste:: Unterstützung für lokale und entfernte | ||
| 12187 | Drucker. | ||
| 12188 | * Desktop-Dienste:: D-Bus- und Desktop-Dienste. | ||
| 12189 | * Tondienste:: Dienste für ALSA und Pulseaudio. | ||
| 12190 | * Datenbankdienste:: SQL-Datenbanken, Schlüssel-Wert-Speicher etc. | ||
| 12191 | * Mail-Dienste:: IMAP, POP3, SMTP und so weiter. | ||
| 12192 | * Kurznachrichtendienste:: Dienste für Kurznachrichten. | ||
| 12193 | * Telefondienste:: Telefoniedienste. | ||
| 12194 | * Überwachungsdienste:: Dienste zur Systemüberwachung. | ||
| 12195 | * Kerberos-Dienste:: Kerberos-Dienste. | ||
| 12196 | * LDAP-Dienste:: LDAP-Dienste. | ||
| 12197 | * Web-Dienste:: Web-Server. | ||
| 12198 | * Zertifikatsdienste:: TLS-Zertifikate via Let’s Encrypt. | ||
| 12199 | * DNS-Dienste:: DNS-Daemons. | ||
| 12200 | * VPN-Dienste:: VPN-Daemons. | ||
| 12201 | * Network File System:: Dienste mit Bezug zum Netzwerkdateisystem. | ||
| 12202 | * Kontinuierliche Integration:: Der Cuirass-Dienst. | ||
| 12203 | * Dienste zur Stromverbrauchsverwaltung:: Den Akku schonen. | ||
| 12204 | * Audio-Dienste:: Der MPD. | ||
| 12205 | * Virtualisierungsdienste:: Dienste für virtuelle Maschinen. | ||
| 12206 | * Versionskontrolldienste:: Entfernten Zugang zu Git-Repositorys bieten. | ||
| 12207 | * Spieldienste:: Spielserver. | ||
| 12208 | * Verschiedene Dienste:: Andere Dienste. | ||
| 12209 | @end menu | ||
| 12210 | |||
| 12211 | @node Basisdienste | ||
| 12212 | @subsection Basisdienste | ||
| 12213 | |||
| 12214 | Das Modul @code{(gnu services base)} stellt Definitionen für Basis-Dienste | ||
| 12215 | zur Verfügung, von denen man erwartet, dass das System sie anbietet. Im | ||
| 12216 | Folgenden sind die von diesem Modul exportierten Dienste aufgeführt. | ||
| 12217 | |||
| 12218 | @defvr {Scheme-Variable} %base-services | ||
| 12219 | Diese Variable enthält eine Liste von Basis-Diensten, die man auf einem | ||
| 12220 | System vorzufinden erwartet (siehe @ref{Diensttypen und Dienste} für | ||
| 12221 | weitere Informationen zu Dienstobjekten): ein Anmeldungsdienst (mingetty) | ||
| 12222 | auf jeder Konsole (jedem »tty«), syslogd, den Name Service Cache Daemon | ||
| 12223 | (nscd) von libc, die udev-Geräteverwaltung und weitere. | ||
| 12224 | |||
| 12225 | Dies ist der Vorgabewert für das @code{services}-Feld für die Dienste von | ||
| 12226 | @code{operating-system}-Deklarationen. Normalerweise werden Sie, wenn Sie | ||
| 12227 | ein Betriebssystem anpassen, Dienste an die @var{%base-services}-Liste | ||
| 12228 | anhängen, wie hier gezeigt: | ||
| 12229 | |||
| 12230 | @example | ||
| 12231 | (append (list (service avahi-service-type) | ||
| 12232 | (service openssh-service-type)) | ||
| 12233 | %base-services) | ||
| 12234 | @end example | ||
| 12235 | @end defvr | ||
| 12236 | |||
| 12237 | @defvr {Scheme-Variable} special-files-service-type | ||
| 12238 | Dieser Dienst richtet »besondere Dateien« wie @file{/bin/sh} ein; eine | ||
| 12239 | Instanz des Dienstes ist Teil der @code{%base-services}. | ||
| 12240 | |||
| 12241 | Der mit @code{special-files-service-type}-Diensten assoziierte Wert muss | ||
| 12242 | eine Liste von Tupeln sein, deren erstes Element eine »besondere Datei« und | ||
| 12243 | deren zweites Element deren Zielpfad ist. Der Vorgabewert ist: | ||
| 12244 | |||
| 12245 | @cindex @file{/bin/sh} | ||
| 12246 | @cindex @file{sh}, in @file{/bin} | ||
| 12247 | @example | ||
| 12248 | `(("/bin/sh" ,(file-append @var{bash} "/bin/sh"))) | ||
| 12249 | @end example | ||
| 12250 | |||
| 12251 | @cindex @file{/usr/bin/env} | ||
| 12252 | @cindex @file{env}, in @file{/usr/bin} | ||
| 12253 | Wenn Sie zum Beispiel auch @code{/usr/bin/env} zu Ihrem System hinzufügen | ||
| 12254 | möchten, können Sie den Wert ändern auf: | ||
| 12255 | |||
| 12256 | @example | ||
| 12257 | `(("/bin/sh" ,(file-append @var{bash} "/bin/sh")) | ||
| 12258 | ("/usr/bin/env" ,(file-append @var{coreutils} "/bin/env"))) | ||
| 12259 | @end example | ||
| 12260 | |||
| 12261 | Da dieser Dienst Teil der @code{%base-services} ist, können Sie | ||
| 12262 | @code{modify-services} benutzen, um die Liste besonderer Dateien abzuändern | ||
| 12263 | (siehe @ref{Service-Referenz, @code{modify-services}}). Die leichte | ||
| 12264 | Alternative, um eine besondere Datei hinzuzufügen, ist über die Prozedur | ||
| 12265 | @code{extra-special-file} (siehe unten). | ||
| 12266 | @end defvr | ||
| 12267 | |||
| 12268 | @deffn {Scheme-Prozedur} extra-special-file @var{Datei} @var{Ziel} | ||
| 12269 | Das @var{Ziel} als »besondere Datei« @var{Datei} verwenden. | ||
| 12270 | |||
| 12271 | Beispielsweise können Sie die folgenden Zeilen in das @code{services}-Feld | ||
| 12272 | Ihrer Betriebssystemdeklaration einfügen für eine symbolische Verknüpfung | ||
| 12273 | @file{/usr/bin/env}: | ||
| 12274 | |||
| 12275 | @example | ||
| 12276 | (extra-special-file "/usr/bin/env" | ||
| 12277 | (file-append coreutils "/bin/env")) | ||
| 12278 | @end example | ||
| 12279 | @end deffn | ||
| 12280 | |||
| 12281 | @deffn {Scheme-Prozedur} host-name-service @var{Name} | ||
| 12282 | Liefert einen Dienst, der den Rechnernamen (den »Host«-Namen des Rechners) | ||
| 12283 | als @var{Name} festlegt. | ||
| 12284 | @end deffn | ||
| 12285 | |||
| 12286 | @deffn {Scheme-Prozedur} login-service @var{Konfiguration} | ||
| 12287 | Liefert einen Dienst, der die Benutzeranmeldung möglich macht. Dazu | ||
| 12288 | verwendet er die angegebene @var{Konfiguration}, ein | ||
| 12289 | @code{<login-configuration>}-Objekt, das unter anderem die beim Anmelden | ||
| 12290 | angezeigte Mitteilung des Tages (englisch »Message of the Day«) festlegt. | ||
| 12291 | @end deffn | ||
| 12292 | |||
| 12293 | @deftp {Datentyp} login-configuration | ||
| 12294 | Dies ist der Datentyp, der die Anmeldekonfiguration repräsentiert. | ||
| 12295 | |||
| 12296 | @table @asis | ||
| 12297 | |||
| 12298 | @item @code{motd} | ||
| 12299 | @cindex Message of the Day | ||
| 12300 | Ein dateiartiges Objekt, das die »Message of the Day« enthält. | ||
| 12301 | |||
| 12302 | @item @code{allow-empty-passwords?} (Vorgabe: @code{#t}) | ||
| 12303 | Leere Passwörter standardmäßig zulassen, damit sich neue Anwender anmelden | ||
| 12304 | können, direkt nachdem das Benutzerkonto »root« für den Administrator | ||
| 12305 | angelegt wurde. | ||
| 12306 | |||
| 12307 | @end table | ||
| 12308 | @end deftp | ||
| 12309 | |||
| 12310 | @deffn {Scheme-Prozedur} mingetty-service @var{Konfiguration} | ||
| 12311 | Liefert einen Dienst, der mingetty nach den Vorgaben der @var{Konfiguration} | ||
| 12312 | ausführt, einem @code{<mingetty-configuration>}-Objekt, das unter anderem | ||
| 12313 | die Konsole (das »tty«) festlegt, auf der mingetty laufen soll. | ||
| 12314 | @end deffn | ||
| 12315 | |||
| 12316 | @deftp {Datentyp} mingetty-configuration | ||
| 12317 | Dieser Datentyp repräsentiert die Konfiguration von Mingetty, der | ||
| 12318 | vorgegebenen Implementierung zur Anmeldung auf einer virtuellen Konsole. | ||
| 12319 | |||
| 12320 | @table @asis | ||
| 12321 | |||
| 12322 | @item @code{tty} | ||
| 12323 | Der Name der Konsole, auf der diese Mingetty-Instanz läuft — z.B.@: | ||
| 12324 | @code{"tty1"}. | ||
| 12325 | |||
| 12326 | @item @code{auto-login} (Vorgabe: @code{#f}) | ||
| 12327 | Steht dieses Feld auf wahr, muss es eine Zeichenkette sein, die den | ||
| 12328 | Benutzernamen angibt, als der man vom System automatisch angemeldet | ||
| 12329 | wird. Ist es @code{#f}, so muss zur Anmeldung ein Benutzername und ein | ||
| 12330 | Passwort eingegeben werden. | ||
| 12331 | |||
| 12332 | @item @code{login-program} (Vorgabe: @code{#f}) | ||
| 12333 | Dies muss entweder @code{#f} sein, dann wird das voreingestellte | ||
| 12334 | Anmeldeprogramm benutzt (@command{login} aus dem Shadow-Werkzeugsatz) oder | ||
| 12335 | der Name des Anmeldeprogramms als G-Ausdruck. | ||
| 12336 | |||
| 12337 | @item @code{login-pause?} (Vorgabe: @code{#f}) | ||
| 12338 | Ist es auf @code{#t} gesetzt, sorgt es in Verbindung mit @var{auto-login} | ||
| 12339 | dafür, dass der Benutzer eine Taste drücken muss, ehe eine Anmelde-Shell | ||
| 12340 | gestartet wird. | ||
| 12341 | |||
| 12342 | @item @code{mingetty} (Vorgabe: @var{mingetty}) | ||
| 12343 | Welches Mingetty-Paket benutzt werden soll. | ||
| 12344 | |||
| 12345 | @end table | ||
| 12346 | @end deftp | ||
| 12347 | |||
| 12348 | @deffn {Scheme-Prozedur} agetty-service @var{Konfiguration} | ||
| 12349 | Liefert einen Dienst, um agetty entsprechend der @var{Konfiguration} | ||
| 12350 | auszuführen, welche ein @code{<agetty-configuration>}-Objekt sein muss, das | ||
| 12351 | unter anderem festlegt, auf welchem tty es laufen soll. | ||
| 12352 | @end deffn | ||
| 12353 | |||
| 12354 | @deftp {Datentyp} agetty-configuration | ||
| 12355 | Dies ist der Datentyp, der die Konfiguration von agetty repräsentiert, was | ||
| 12356 | Anmeldungen auf einer virtuellen oder seriellen Konsole implementiert. Siehe | ||
| 12357 | die Handbuchseite @code{agetty(8)} für mehr Informationen. | ||
| 12358 | |||
| 12359 | @table @asis | ||
| 12360 | |||
| 12361 | @item @code{tty} | ||
| 12362 | Der Name der Konsole, auf der diese Instanz von agetty läuft, als | ||
| 12363 | Zeichenkette — z.B.@: @code{"ttyS0"}. Dieses Argument ist optional, sein | ||
| 12364 | Vorgabewert ist eine vernünftige Wahl unter den seriellen Schnittstellen, | ||
| 12365 | auf deren Benutzung der Linux-Kernel eingestellt ist. | ||
| 12366 | |||
| 12367 | Hierzu wird, wenn in der Kernel-Befehlszeile ein Wert für eine Option namens | ||
| 12368 | @code{agetty.tty} festgelegt wurde, der Gerätename daraus für agetty | ||
| 12369 | extrahiert und benutzt. | ||
| 12370 | |||
| 12371 | Andernfalls wird agetty, falls auf der Kernel-Befehlszeile eine Option | ||
| 12372 | @code{console} mit einem tty vorkommt, den daraus extrahierten Gerätenamen | ||
| 12373 | der seriellen Schnittstelle benutzen. | ||
| 12374 | |||
| 12375 | In beiden Fällen wird agetty nichts an den anderen Einstellungen für | ||
| 12376 | serielle Geräte verändern (Baud-Rate etc.), in der Hoffnung, dass Linux sie | ||
| 12377 | auf die korrekten Werte festgelegt hat. | ||
| 12378 | |||
| 12379 | @item @code{baud-rate} (Vorgabe: @code{#f}) | ||
| 12380 | Eine Zeichenkette, die aus einer kommagetrennten Liste von einer oder | ||
| 12381 | mehreren Baud-Raten besteht, absteigend sortiert. | ||
| 12382 | |||
| 12383 | @item @code{term} (Vorgabe: @code{#f}) | ||
| 12384 | Eine Zeichenkette, die den Wert enthält, der für die Umgebungsvariable | ||
| 12385 | @code{TERM} benutzt werden soll. | ||
| 12386 | |||
| 12387 | @item @code{eight-bits?} (Vorgabe: @code{#f}) | ||
| 12388 | Steht dies auf @code{#t}, wird angenommen, dass das tty 8-Bit-korrekt ist, | ||
| 12389 | so dass die Paritätserkennung abgeschaltet wird. | ||
| 12390 | |||
| 12391 | @item @code{auto-login} (Vorgabe: @code{#f}) | ||
| 12392 | Wird hier ein Anmeldename als eine Zeichenkette übergeben, wird der | ||
| 12393 | angegebene Nutzer automatisch angemeldet, ohne nach einem Anmeldenamen oder | ||
| 12394 | Passwort zu fragen. | ||
| 12395 | |||
| 12396 | @item @code{no-reset?} (Vorgabe: @code{#f}) | ||
| 12397 | Steht dies auf @code{#t}, werden die Cflags des Terminals (d.h.@: dessen | ||
| 12398 | Steuermodi) nicht zurückgesetzt. | ||
| 12399 | |||
| 12400 | @item @code{host} (Vorgabe: @code{#f}) | ||
| 12401 | Dies akzeptiert eine Zeichenkette mit dem einzutragenden | ||
| 12402 | Anmeldungs-Rechnernamen "login_host", der in die Datei @file{/var/run/utmpx} | ||
| 12403 | geschrieben wird. | ||
| 12404 | |||
| 12405 | @item @code{remote?} (Vorgabe: @code{#f}) | ||
| 12406 | Ist dies auf @code{#t} gesetzt, wird in Verbindung mit @var{host} eine | ||
| 12407 | Befehlszeilenoption @code{-r} für einen falschen Rechnernamen (»Fakehost«) | ||
| 12408 | in der Befehlszeile des mit @var{login-program} angegebenen Anmeldeprogramms | ||
| 12409 | übergeben. | ||
| 12410 | |||
| 12411 | @item @code{flow-control?} (Vorgabe: @code{#f}) | ||
| 12412 | Ist dies auf @code{#t} gesetzt, wird Hardware-Flusssteuerung (RTS/CTS) | ||
| 12413 | aktiviert. | ||
| 12414 | |||
| 12415 | @item @code{no-issue?} (Vorgabe: @code{#f}) | ||
| 12416 | Ist dies auf @code{#t} gesetzt, wird der Inhalt der Datei @file{/etc/issue} | ||
| 12417 | @emph{nicht} angezeigt, bevor die Anmeldeaufforderung zu sehen ist. | ||
| 12418 | |||
| 12419 | @item @code{init-string} (Vorgabe: @code{#f}) | ||
| 12420 | Dies akzeptiert eine Zeichenkette, die zum tty oder zum Modem zuerst vor | ||
| 12421 | allem anderen gesendet wird. Es kann benutzt werden, um ein Modem zu | ||
| 12422 | initialisieren. | ||
| 12423 | |||
| 12424 | @item @code{no-clear?} (Vorgabe: @code{#f}) | ||
| 12425 | Ist dies auf @code{#t} gesetzt, wird agetty den Bildschirm @emph{nicht} | ||
| 12426 | löschen, bevor es die Anmeldeaufforderung anzeigt. | ||
| 12427 | |||
| 12428 | @item @code{login-program} (Vorgabe: (file-append shadow "/bin/login")) | ||
| 12429 | Hier muss entweder ein G-Ausdruck mit dem Namen eines Anmeldeprogramms | ||
| 12430 | übergeben werden, oder dieses Feld wird nicht gesetzt, so dass als | ||
| 12431 | Vorgabewert das Programm @command{login} aus dem Shadow-Werkzeugsatz | ||
| 12432 | verwendet wird. | ||
| 12433 | |||
| 12434 | @item @code{local-line} (Vorgabe: @code{#f}) | ||
| 12435 | Steuert den Leitungsschalter CLOCAL. Hierfür wird eines von drei Symbolen | ||
| 12436 | als Argument akzeptiert, @code{'auto}, @code{'always} oder | ||
| 12437 | @code{'never}. Für @code{#f} wählt agetty als Vorgabewert @code{'auto}. | ||
| 12438 | |||
| 12439 | @item @code{extract-baud?} (Vorgabe: @code{#f}) | ||
| 12440 | Ist dies auf @code{#t} gesetzt, so wird agetty angewiesen, die Baud-Rate aus | ||
| 12441 | den Statusmeldungen mancher Arten von Modem abzulesen. | ||
| 12442 | |||
| 12443 | @item @code{skip-login?} (Vorgabe: @code{#f}) | ||
| 12444 | Ist dies auf @code{#t} gesetzt, wird der Benutzer nicht aufgefordert, einen | ||
| 12445 | Anmeldenamen einzugeben. Dies kann zusammen mit dem @var{login-program}-Feld | ||
| 12446 | benutzt werden, um nicht standardkonforme Anmeldesysteme zu benutzen. | ||
| 12447 | |||
| 12448 | @item @code{no-newline?} (Vorgabe: @code{#f}) | ||
| 12449 | Ist dies auf @code{#t} gesetzt, wird @emph{kein} Zeilenumbruch ausgegeben, | ||
| 12450 | bevor die Datei @file{/etc/issue} ausgegeben wird. | ||
| 12451 | |||
| 12452 | @c Is this dangerous only when used with login-program, or always? | ||
| 12453 | @item @code{login-options} (Vorgabe: @code{#f}) | ||
| 12454 | Dieses Feld akzeptiert eine Zeichenkette mit den Befehlszeilenoptionen für | ||
| 12455 | das Anmeldeprogramm. Beachten Sie, dass bei einem selbst gewählten | ||
| 12456 | @var{login-program} ein böswilliger Nutzer versuchen könnte, als | ||
| 12457 | Anmeldenamen etwas mit eingebetteten Befehlszeilenoptionen anzugeben, die | ||
| 12458 | vom Anmeldeprogramm interpretiert werden könnten. | ||
| 12459 | |||
| 12460 | @item @code{login-pause} (Vorgabe: @code{#f}) | ||
| 12461 | Ist dies auf @code{#t} gesetzt, wird auf das Drücken einer beliebigen Taste | ||
| 12462 | gewartet, bevor die Anmeldeaufforderung angezeigt wird. Hiermit kann in | ||
| 12463 | Verbindung mit @var{auto-login} weniger Speicher verbraucht werden, indem | ||
| 12464 | man Shells erst erzeugt, wenn sie benötigt werden. | ||
| 12465 | |||
| 12466 | @item @code{chroot} (Vorgabe: @code{#f}) | ||
| 12467 | Wechselt die Wurzel des Dateisystems auf das angegebene Verzeichnis. Dieses | ||
| 12468 | Feld akzeptiert einen Verzeichnispfad als Zeichenkette. | ||
| 12469 | |||
| 12470 | @item @code{hangup?} (Vorgabe: @code{#f}) | ||
| 12471 | Mit dem Linux-Systemaufruf @code{vhangup} auf dem angegebenen Terminal | ||
| 12472 | virtuell auflegen. | ||
| 12473 | |||
| 12474 | @item @code{keep-baud?} (Vorgabe: @code{#f}) | ||
| 12475 | Ist dies auf @code{#t} gesetzt, wird versucht, die bestehende Baud-Rate | ||
| 12476 | beizubehalten. Die Baud-Raten aus dem Feld @var{baud-rate} werden benutzt, | ||
| 12477 | wenn agetty ein @key{BREAK}-Zeichen empfängt. | ||
| 12478 | |||
| 12479 | @item @code{timeout} (Vorgabe: @code{#f}) | ||
| 12480 | Ist dies auf einen ganzzahligen Wert gesetzt, wird terminiert, falls kein | ||
| 12481 | Benutzername innerhalb von @var{timeout} Sekunden eingelesen werden konnte. | ||
| 12482 | |||
| 12483 | @item @code{detect-case?} (Vorgabe: @code{#f}) | ||
| 12484 | Ist dies auf @code{#t} gesetzt, wird Unterstützung für die Erkennung von | ||
| 12485 | Terminals aktiviert, die nur Großschreibung beherrschen. Mit dieser | ||
| 12486 | Einstellung wird, wenn ein Anmeldename nur aus Großbuchstaben besteht, | ||
| 12487 | dieser als Anzeichen dafür aufgefasst, dass das Terminal nur Großbuchstaben | ||
| 12488 | beherrscht, und einige Umwandlungen von Groß- in Kleinbuchstaben | ||
| 12489 | aktiviert. Beachten Sie, dass dabei @emph{keine} Unicode-Zeichen unterstützt | ||
| 12490 | werden. | ||
| 12491 | |||
| 12492 | @item @code{wait-cr?} (Vorgabe: @code{#f}) | ||
| 12493 | Wenn dies auf @code{#t} gesetzt ist, wird gewartet, bis der Benutzer oder | ||
| 12494 | das Modem einen Wagenrücklauf (»Carriage Return«) oder einen Zeilenvorschub | ||
| 12495 | (»Linefeed«) absendet, ehe @file{/etc/issue} oder eine Anmeldeaufforderung | ||
| 12496 | angezeigt wird. Dies wird typischerweise zusammen mit dem Feld | ||
| 12497 | @var{init-string} benutzt. | ||
| 12498 | |||
| 12499 | @item @code{no-hints?} (Vorgabe: @code{#f}) | ||
| 12500 | Ist es auf @code{#t} gesetzt, werden @emph{keine} Hinweise zu den | ||
| 12501 | Feststelltasten Num-Taste, Umschaltsperre (»Caps Lock«) und Rollen-Taste | ||
| 12502 | (»Scroll Lock«) angezeigt. | ||
| 12503 | |||
| 12504 | @item @code{no-hostname?} (Vorgabe: @code{#f}) | ||
| 12505 | Das vorgegebene Verhalten ist, den Rechnernamen auszugeben. Ist dieses Feld | ||
| 12506 | auf @code{#t} gesetzt, wird überhaupt kein Rechnername angezeigt. | ||
| 12507 | |||
| 12508 | @item @code{long-hostname?} (Vorgabe: @code{#f}) | ||
| 12509 | Das vorgegebene Verhalten ist, den Rechnernamen nur bis zu seinem ersten | ||
| 12510 | Punkt anzuzeigen. Ist dieses Feld auf @code{#t} gesetzt, wird der | ||
| 12511 | vollständige Rechnername (der »Fully Qualified Hostname«), wie ihn | ||
| 12512 | @code{gethostname} oder @code{getaddrinfo} liefern, angezeigt. | ||
| 12513 | |||
| 12514 | @item @code{erase-characters} (Vorgabe: @code{#f}) | ||
| 12515 | Dieses Feld akzeptiert eine Zeichenkette aus Zeichen, die auch als Rücktaste | ||
| 12516 | (zum Löschen) interpretiert werden sollen, wenn der Benutzer seinen | ||
| 12517 | Anmeldenamen eintippt. | ||
| 12518 | |||
| 12519 | @item @code{kill-characters} (Vorgabe: @code{#f}) | ||
| 12520 | Dieses Feld akzeptiert eine Zeichenkette aus Zeichen, deren Eingabe als | ||
| 12521 | »ignoriere alle vorherigen Zeichen« interpretiert werden soll (auch | ||
| 12522 | »kill«-Zeichen genannt), wenn der Benutzer seinen Anmeldenamen eintippt. | ||
| 12523 | |||
| 12524 | @item @code{chdir} (Vorgabe: @code{#f}) | ||
| 12525 | Dieses Feld akzeptiert eine Zeichenkette, die einen Verzeichnispfad angibt, | ||
| 12526 | zu dem vor der Anmeldung gewechselt wird. | ||
| 12527 | |||
| 12528 | @item @code{delay} (Vorgabe: @code{#f}) | ||
| 12529 | Dieses Feld akzeptiert eine ganze Zahl mit der Anzahl Sekunden, die gewartet | ||
| 12530 | werden soll, bis ein tty geöffnet und die Anmeldeaufforderung angezeigt | ||
| 12531 | wird. | ||
| 12532 | |||
| 12533 | @item @code{nice} (Vorgabe: @code{#f}) | ||
| 12534 | Dieses Feld akzeptiert eine ganze Zahl mit dem »nice«-Wert, mit dem das | ||
| 12535 | Anmeldeprogramm ausgeführt werden soll. | ||
| 12536 | |||
| 12537 | @item @code{extra-options} (Vorgabe: @code{'()}) | ||
| 12538 | Dieses Feld ist ein »Notausstieg«, mit dem Nutzer beliebige | ||
| 12539 | Befehlszeilenoptionen direkt an @command{agetty} übergeben können. Diese | ||
| 12540 | müssen hier als eine Liste von Zeichenketten angegeben werden. | ||
| 12541 | |||
| 12542 | @end table | ||
| 12543 | @end deftp | ||
| 12544 | |||
| 12545 | @deffn {Scheme-Prozedur} kmscon-service-type @var{Konfiguration} | ||
| 12546 | Liefert einen Dienst, um | ||
| 12547 | @uref{https://www.freedesktop.org/wiki/Software/kmscon,kmscon} entsprechend | ||
| 12548 | der @var{Konfiguration} auszuführen. Diese ist ein | ||
| 12549 | @code{<kmscon-configuration>}-Objekt, das unter anderem angibt, auf welchem | ||
| 12550 | tty es ausgeführt werden soll. | ||
| 12551 | @end deffn | ||
| 12552 | |||
| 12553 | @deftp {Datentyp} kmscon-configuration | ||
| 12554 | Dieser Datentyp repräsentiert die Konfiguration von Kmscon, die das Anmelden | ||
| 12555 | auf virtuellen Konsolen ermöglicht. | ||
| 12556 | |||
| 12557 | @table @asis | ||
| 12558 | |||
| 12559 | @item @code{virtual-terminal} | ||
| 12560 | Der Name der Konsole, auf der diese Kmscon läuft — z.B.@: @code{"tty1"}. | ||
| 12561 | |||
| 12562 | @item @code{login-program} (Vorgabe: @code{#~(string-append #$shadow "/bin/login")}) | ||
| 12563 | Ein G-Ausdruck, der den Namen des Anmeldeprogramms angibt. Als Vorgabe wird | ||
| 12564 | das Anmeldeprogramm @command{login} aus dem Shadow-Werkzeugsatz verwendet. | ||
| 12565 | |||
| 12566 | @item @code{login-arguments} (Vorgabe: @code{'("-p")}) | ||
| 12567 | Eine Liste der Argumente, die an @command{login} übergeben werden sollen. | ||
| 12568 | |||
| 12569 | @item @code{auto-login} (Vorgabe: @code{#f}) | ||
| 12570 | Wird hier ein Anmeldename als eine Zeichenkette übergeben, wird der | ||
| 12571 | angegebene Nutzer automatisch angemeldet, ohne nach einem Anmeldenamen oder | ||
| 12572 | Passwort zu fragen. | ||
| 12573 | |||
| 12574 | @item @code{hardware-acceleration?} (Vorgabe: #f) | ||
| 12575 | Ob Hardware-Beschleunigung verwendet werden soll. | ||
| 12576 | |||
| 12577 | @item @code{kmscon} (Vorgabe: @var{kmscon}) | ||
| 12578 | Das Kmscon-Paket, das benutzt werden soll. | ||
| 12579 | |||
| 12580 | @end table | ||
| 12581 | @end deftp | ||
| 12582 | |||
| 12583 | @cindex Name Service Cache Daemon | ||
| 12584 | @cindex nscd | ||
| 12585 | @deffn {Scheme-Prozedur} nscd-service [@var{Konfiguration}] [#:glibc glibc] @ | ||
| 12586 | [#:name-services '()] Liefert einen Dienst, der den Name Service Cache | ||
| 12587 | Daemon (nscd) von libc mit der angegebenen @var{Konfiguration} ausführt — | ||
| 12588 | diese muss ein @code{<nscd-configuration>}-Objekt sein. Siehe @ref{Name Service Switch} für ein Beispiel. | ||
| 12589 | |||
| 12590 | Der Einfachheit halber bietet der Shepherd-Dienst für nscd die folgenden | ||
| 12591 | Aktionen an: | ||
| 12592 | |||
| 12593 | @table @code | ||
| 12594 | @item invalidate | ||
| 12595 | @cindex Zwischenspeicher ungültig machen, nscd | ||
| 12596 | @cindex nscd, Ungültigmachen des Zwischenspeichers | ||
| 12597 | Dies macht den angegebenen Zwischenspeicher ungültig. Wenn Sie zum Beispiel: | ||
| 12598 | |||
| 12599 | @example | ||
| 12600 | herd invalidate nscd hosts | ||
| 12601 | @end example | ||
| 12602 | |||
| 12603 | @noindent | ||
| 12604 | ausführen, wird der Zwischenspeicher für die Auflösung von Rechnernamen (von | ||
| 12605 | »Host«-Namen) des nscd ungültig. | ||
| 12606 | |||
| 12607 | @item statistics | ||
| 12608 | Wenn Sie @command{herd statistics nscd} ausführen, werden Ihnen | ||
| 12609 | Informationen angezeigt, welche Ihnen Informationen über den nscd-Zustand | ||
| 12610 | und die Zwischenspeicher angezeigt. | ||
| 12611 | @end table | ||
| 12612 | |||
| 12613 | @end deffn | ||
| 12614 | |||
| 12615 | @defvr {Scheme-Variable} %nscd-default-configuration | ||
| 12616 | Dies ist der vorgegebene Wert für die @code{<nscd-configuration>} (siehe | ||
| 12617 | unten), die @code{nscd-service} benutzt. Die Konfiguration benutzt die | ||
| 12618 | Zwischenspeicher, die in @var{%nscd-default-caches} definiert sind; siehe | ||
| 12619 | unten. | ||
| 12620 | @end defvr | ||
| 12621 | |||
| 12622 | @deftp {Datentyp} nscd-configuration | ||
| 12623 | Dieser Datentyp repräsentiert die Konfiguration des Name Service Caching | ||
| 12624 | Daemon (kurz »nscd«). | ||
| 12625 | |||
| 12626 | @table @asis | ||
| 12627 | |||
| 12628 | @item @code{name-services} (Vorgabe: @code{'()}) | ||
| 12629 | Liste von Paketen, die @dfn{Namensdienste} bezeichnen, die für den nscd | ||
| 12630 | sichtbar sein müssen, z.B.@: @code{(list @var{nss-mdns})}. | ||
| 12631 | |||
| 12632 | @item @code{glibc} (Vorgabe: @var{glibc}) | ||
| 12633 | Ein Paket-Objekt, das die GNU-C-Bibliothek angibt, woraus der | ||
| 12634 | @command{nscd}-Befehl genommen werden soll. | ||
| 12635 | |||
| 12636 | @item @code{log-file} (Vorgabe: @code{"/var/log/nscd.log"}) | ||
| 12637 | Name der nscd-Protokolldatei. Hierhin werden Ausgaben zur Fehlersuche | ||
| 12638 | geschrieben, falls @code{debug-level} echt positiv ist. | ||
| 12639 | |||
| 12640 | @item @code{debug-level} (Vorgabe: @code{0}) | ||
| 12641 | Eine ganze Zahl, die den Detailgrad der Ausgabe zur Fehlersuche | ||
| 12642 | angibt. Größere Zahlen bewirken eine ausführlichere Ausgabe. | ||
| 12643 | |||
| 12644 | @item @code{caches} (Vorgabe: @var{%nscd-default-caches}) | ||
| 12645 | Liste der @code{<nscd-cache>}-Objekte, die repräsentieren, was alles | ||
| 12646 | zwischengespeichert werden soll; siehe unten. | ||
| 12647 | |||
| 12648 | @end table | ||
| 12649 | @end deftp | ||
| 12650 | |||
| 12651 | @deftp {Datentyp} nscd-cache | ||
| 12652 | Ein Datentyp, der eine Zwischenspeicher-Datenbank von nscd mitsamt ihren | ||
| 12653 | Parametern definiert. | ||
| 12654 | |||
| 12655 | @table @asis | ||
| 12656 | |||
| 12657 | @item @code{Datenbank} | ||
| 12658 | Dies ist ein Symbol, was den Namen der Datenbank repräsentiert, die | ||
| 12659 | zwischengespeichert werden soll. Gültige Werte sind @code{passwd}, | ||
| 12660 | @code{group}, @code{hosts} und @code{services}, womit jeweils die | ||
| 12661 | entsprechende NSS-Datenbank bezeichnet wird (siehe @ref{NSS Basics,,, libc, | ||
| 12662 | The GNU C Library Reference Manual}). | ||
| 12663 | |||
| 12664 | @item @code{positive-time-to-live} | ||
| 12665 | @itemx @code{negative-time-to-live} (Vorgabe: @code{20}) | ||
| 12666 | Eine Zahl, die für die Anzahl an Sekunden steht, die ein erfolgreiches | ||
| 12667 | (positives) oder erfolgloses (negatives) Nachschlageresultat im | ||
| 12668 | Zwischenspeicher verbleibt. | ||
| 12669 | |||
| 12670 | @item @code{check-files?} (Vorgabe: @code{#t}) | ||
| 12671 | Ob auf Änderungen an den der @var{database} entsprechenden Dateien reagiert | ||
| 12672 | werden soll. | ||
| 12673 | |||
| 12674 | Wenn @var{database} zum Beispiel @code{hosts} ist, wird, wenn dieses Feld | ||
| 12675 | gesetzt ist, nscd Änderungen an @file{/etc/hosts} beobachten und | ||
| 12676 | berücksichtigen. | ||
| 12677 | |||
| 12678 | @item @code{persistent?} (Vorgabe: @code{#t}) | ||
| 12679 | Ob der Zwischenspeicher dauerhaft auf der Platte gespeichert werden soll. | ||
| 12680 | |||
| 12681 | @item @code{shared?} (Vorgabe: @code{#t}) | ||
| 12682 | Ob der Zwischenspeicher zwischen den Nutzern geteilt werden soll. | ||
| 12683 | |||
| 12684 | @item @code{max-database-size} (Vorgabe: 32@tie{}MiB) | ||
| 12685 | Die Maximalgröße des Datenbank-Zwischenspeichers in Bytes. | ||
| 12686 | |||
| 12687 | @c XXX: 'suggested-size' and 'auto-propagate?' seem to be expert | ||
| 12688 | @c settings, so leave them out. | ||
| 12689 | |||
| 12690 | @end table | ||
| 12691 | @end deftp | ||
| 12692 | |||
| 12693 | @defvr {Scheme-Variable} %nscd-default-caches | ||
| 12694 | Liste von @code{<nscd-cache>}-Objekten, die von der vorgegebenen | ||
| 12695 | @code{nscd-configuration} benutzt werden (siehe oben). | ||
| 12696 | |||
| 12697 | Damit wird dauerhaftes und aggressives Zwischenspeichern beim Nachschlagen | ||
| 12698 | von Dienst- und Rechnernamen (»Host«-Namen) aktiviert. Letzteres verbessert | ||
| 12699 | die Leistungsfähigkeit beim Nachschlagen von Rechnernamen, sorgt für mehr | ||
| 12700 | Widerstandsfähigkeit gegenüber unverlässlichen Namens-Servern und bietet | ||
| 12701 | außerdem einen besseren Schutz der Privatsphäre — oftmals befindet sich das | ||
| 12702 | Ergebnis einer Anfrage nach einem Rechnernamen bereits im lokalen | ||
| 12703 | Zwischenspeicher und externe Namens-Server müssen nicht miteinbezogen | ||
| 12704 | werden. | ||
| 12705 | @end defvr | ||
| 12706 | |||
| 12707 | @anchor{syslog-configuration-type} | ||
| 12708 | @cindex syslog | ||
| 12709 | @cindex Protokollierung | ||
| 12710 | @deftp {Datentyp} syslog-configuration | ||
| 12711 | Dieser Datentyp repräsentiert die Konfiguration des syslog-Daemons. | ||
| 12712 | |||
| 12713 | @table @asis | ||
| 12714 | @item @code{syslogd} (Vorgabe: @code{#~(string-append #$inetutils "/libexec/syslogd")}) | ||
| 12715 | Welcher Syslog-Daemon benutzt werden soll. | ||
| 12716 | |||
| 12717 | @item @code{config-file} (Vorgabe: @code{%default-syslog.conf}) | ||
| 12718 | Die zu benutzende syslog-Konfigurationsdatei. | ||
| 12719 | |||
| 12720 | @end table | ||
| 12721 | @end deftp | ||
| 12722 | |||
| 12723 | @anchor{syslog-service} | ||
| 12724 | @cindex syslog | ||
| 12725 | @deffn {Scheme-Prozedur} syslog-service @var{Konfiguration} | ||
| 12726 | Liefert einen Dienst, der einen syslog-Daemon entsprechend der | ||
| 12727 | @var{Konfiguration} ausführt. | ||
| 12728 | |||
| 12729 | Siehe @ref{syslogd invocation,,, inetutils, GNU Inetutils} für weitere | ||
| 12730 | Informationen über die Syntax der Konfiguration. | ||
| 12731 | @end deffn | ||
| 12732 | |||
| 12733 | @defvr {Scheme-Variable} guix-service-type | ||
| 12734 | Dies ist der Typ für den Dienst, der den Erstellungs-Daemon | ||
| 12735 | @command{guix-daemon} ausführt (siehe @ref{Aufruf des guix-daemon}). Als Wert | ||
| 12736 | muss ein @code{guix-configuration}-Verbundsobjekt verwendet werden, wie | ||
| 12737 | unten beschrieben. | ||
| 12738 | @end defvr | ||
| 12739 | |||
| 12740 | @anchor{guix-configuration-type} | ||
| 12741 | @deftp {Datentyp} guix-configuration | ||
| 12742 | Dieser Datentyp repräsentiert die Konfiguration des Erstellungs-Daemons von | ||
| 12743 | Guix. Siehe @ref{Aufruf des guix-daemon} für weitere Informationen. | ||
| 12744 | |||
| 12745 | @table @asis | ||
| 12746 | @item @code{guix} (Vorgabe: @var{guix}) | ||
| 12747 | Das zu verwendende Guix-Paket. | ||
| 12748 | |||
| 12749 | @item @code{build-group} (Vorgabe: @code{"guixbuild"}) | ||
| 12750 | Der Name der Gruppe, zu der die Erstellungs-Benutzerkonten gehören. | ||
| 12751 | |||
| 12752 | @item @code{build-accounts} (Vorgabe: @code{10}) | ||
| 12753 | Die Anzahl zu erzeugender Erstellungs-Benutzerkonten. | ||
| 12754 | |||
| 12755 | @item @code{authorize-key?} (Vorgabe: @code{#t}) | ||
| 12756 | @cindex Substitute, deren Autorisierung | ||
| 12757 | Ob die unter @code{authorized-keys} aufgelisteten Substitutschlüssel | ||
| 12758 | autorisiert werden sollen — vorgegeben ist, den von | ||
| 12759 | @code{@value{SUBSTITUTE-SERVER}} zu autorisieren (siehe @ref{Substitute}). | ||
| 12760 | |||
| 12761 | @vindex %default-authorized-guix-keys | ||
| 12762 | @item @code{authorized-keys} (Vorgabe: @var{%default-authorized-guix-keys}) | ||
| 12763 | Die Liste der Dateien mit autorisierten Schlüsseln, d.h.@: eine Liste von | ||
| 12764 | Zeichenketten als G-Ausdrücke (siehe @ref{Aufruf von guix archive}). Der | ||
| 12765 | vorgegebene Inhalt ist der Schlüssel von @code{@value{SUBSTITUTE-SERVER}} | ||
| 12766 | (siehe @ref{Substitute}). | ||
| 12767 | |||
| 12768 | @item @code{use-substitutes?} (Vorgabe: @code{#t}) | ||
| 12769 | Ob Substitute benutzt werden sollen. | ||
| 12770 | |||
| 12771 | @item @code{substitute-urls} (Vorgabe: @var{%default-substitute-urls}) | ||
| 12772 | Die Liste der URLs, auf denen nach Substituten gesucht wird, wenn nicht | ||
| 12773 | anders angegeben. | ||
| 12774 | |||
| 12775 | @item @code{max-silent-time} (Vorgabe: @code{0}) | ||
| 12776 | @itemx @code{timeout} (Vorgabe: @code{0}) | ||
| 12777 | Die Anzahl an Sekunden, die jeweils nichts in die Ausgabe geschrieben werden | ||
| 12778 | darf bzw. die es insgesamt dauern darf, bis ein Erstellungsprozess | ||
| 12779 | abgebrochen wird. Beim Wert null wird nie abgebrochen. | ||
| 12780 | |||
| 12781 | @item @code{log-compression} (Vorgabe: @code{'bzip2}) | ||
| 12782 | Die für Erstellungsprotokolle zu benutzende Kompressionsmethode — entweder | ||
| 12783 | @code{gzip}, @code{bzip2} oder @code{none}. | ||
| 12784 | |||
| 12785 | @item @code{extra-options} (Vorgabe: @code{'()}) | ||
| 12786 | Eine Liste zusätzlicher Befehlszeilenoptionen zu @command{guix-daemon}. | ||
| 12787 | |||
| 12788 | @item @code{log-file} (Vorgabe: @code{"/var/log/guix-daemon.log"}) | ||
| 12789 | Die Datei, in die die Standardausgabe und die Standardfehlerausgabe von | ||
| 12790 | @command{guix-daemon} geschrieben werden. | ||
| 12791 | |||
| 12792 | @item @code{http-proxy} (Vorgabe: @code{#f}) | ||
| 12793 | Der für das Herunterladen von Ableitungen mit fester Ausgabe und von | ||
| 12794 | Substituten zu verwendende HTTP-Proxy. | ||
| 12795 | |||
| 12796 | @item @code{tmpdir} (Vorgabe: @code{#f}) | ||
| 12797 | Ein Verzeichnispfad, der angibt, wo @command{guix-daemon} seine Erstellungen | ||
| 12798 | durchführt. | ||
| 12799 | |||
| 12800 | @end table | ||
| 12801 | @end deftp | ||
| 12802 | |||
| 12803 | @deffn {Scheme-Prozedur} udev-service [#:udev @var{eudev} #:rules @code{'()}] | ||
| 12804 | Führt @var{udev} aus, was zur Laufzeit Gerätedateien ins Verzeichnis | ||
| 12805 | @file{/dev} einfügt. udev-Regeln können über die @var{rules}-Variable als | ||
| 12806 | eine Liste von Dateien übergeben werden. Die Prozeduren @var{udev-rule} und | ||
| 12807 | @var{file->udev-rule} aus @code{(gnu services base)} vereinfachen die | ||
| 12808 | Erstellung einer solchen Regeldatei. | ||
| 12809 | @end deffn | ||
| 12810 | |||
| 12811 | @deffn {Scheme-Prozedur} udev-rule [@var{Dateiname} @var{Inhalt}] | ||
| 12812 | Liefert eine udev-Regeldatei mit dem angegebenen @var{Dateiname}n, in der | ||
| 12813 | die vom Literal @var{Inhalt} definierten Regeln stehen. | ||
| 12814 | |||
| 12815 | Im folgenden Beispiel wird eine Regel für ein USB-Gerät definiert und in der | ||
| 12816 | Datei @file{90-usb-ding.rules} gespeichert. Mit der Regel wird ein Skript | ||
| 12817 | ausgeführt, sobald ein USB-Gerät mit der angegebenen Produktkennung erkannt | ||
| 12818 | wird. | ||
| 12819 | |||
| 12820 | @example | ||
| 12821 | (define %beispiel-udev-rule | ||
| 12822 | (udev-rule | ||
| 12823 | "90-usb-ding.rules" | ||
| 12824 | (string-append "ACTION==\"add\", SUBSYSTEM==\"usb\", " | ||
| 12825 | "ATTR@{product@}==\"Beispiel\", " | ||
| 12826 | "RUN+=\"/pfad/zum/skript\""))) | ||
| 12827 | @end example | ||
| 12828 | |||
| 12829 | The @command{herd rules udev} command, as root, returns the name of the | ||
| 12830 | directory containing all the active udev rules. | ||
| 12831 | @end deffn | ||
| 12832 | |||
| 12833 | Hier zeigen wir, wie man den vorgegebenen @var{udev-service} um sie | ||
| 12834 | erweitern kann. | ||
| 12835 | |||
| 12836 | @example | ||
| 12837 | (operating-system | ||
| 12838 | ;; @dots{} | ||
| 12839 | (services | ||
| 12840 | (modify-services %desktop-services | ||
| 12841 | (udev-service-type config => | ||
| 12842 | (udev-configuration (inherit config) | ||
| 12843 | (rules (append (udev-configuration-rules config) | ||
| 12844 | (list %beispiel-udev-rule)))))))) | ||
| 12845 | @end example | ||
| 12846 | |||
| 12847 | @deffn {Scheme-Prozedur} file->udev-rule [@var{Dateiname} @var{Datei}] | ||
| 12848 | Liefert eine udev-Datei mit dem angegebenen @var{Dateiname}n, in der alle in | ||
| 12849 | der @var{Datei}, einem dateiartigen Objekt, definierten Regeln stehen. | ||
| 12850 | |||
| 12851 | Folgendes Beispiel stellt dar, wie wir eine bestehende Regeldatei verwenden | ||
| 12852 | können. | ||
| 12853 | |||
| 12854 | @example | ||
| 12855 | (use-modules (guix download) ;für url-fetch | ||
| 12856 | (guix packages) ;für origin | ||
| 12857 | ;; @dots{}) | ||
| 12858 | |||
| 12859 | (define %android-udev-rules | ||
| 12860 | (file->udev-rule | ||
| 12861 | "51-android-udev.rules" | ||
| 12862 | (let ((version "20170910")) | ||
| 12863 | (origin | ||
| 12864 | (method url-fetch) | ||
| 12865 | (uri (string-append "https://raw.githubusercontent.com/M0Rf30/" | ||
| 12866 | "android-udev-rules/" version "/51-android.rules")) | ||
| 12867 | (sha256 | ||
| 12868 | (base32 "0lmmagpyb6xsq6zcr2w1cyx9qmjqmajkvrdbhjx32gqf1d9is003")))))) | ||
| 12869 | @end example | ||
| 12870 | @end deffn | ||
| 12871 | |||
| 12872 | Zusätzlich können Guix-Paketdefinitionen unter den @var{rules} aufgeführt | ||
| 12873 | werden, um die udev-Regeln um diejenigen Definitionen zu ergänzen, die im | ||
| 12874 | Unterverzeichnis @file{lib/udev/rules.d} des jeweiligen Pakets aufgeführt | ||
| 12875 | sind. Statt des bisherigen Beispiels zu @var{file->udev-rule} hätten wir | ||
| 12876 | also auch das Paket @var{android-udev-rules} benutzen können, das in Guix im | ||
| 12877 | Modul @code{(gnu packages android)} vorhanden ist. | ||
| 12878 | |||
| 12879 | Das folgende Beispiel zeit, wie dieses Paket @var{android-udev-rules} | ||
| 12880 | benutzt werden kann, damit das »Android-Tool« @command{adb} Geräte erkennen | ||
| 12881 | kann, ohne dafür Administratorrechte vorauszusetzen. Man sieht hier auch, | ||
| 12882 | wie die Benutzergruppe @code{adbusers} erstellt werden kann, die existieren | ||
| 12883 | muss, damit die im Paket @var{android-udev-rules} definierten Regeln richtig | ||
| 12884 | funktionieren. Um so eine Benutzergruppe zu erzeugen, müssen wir sie sowohl | ||
| 12885 | unter den @var{supplementary-groups} unserer @var{user-account}-Deklaration | ||
| 12886 | aufführen, als auch sie im @var{groups}-Feld des | ||
| 12887 | @var{operating-system}-Verbundsobjekts aufführen. | ||
| 12888 | |||
| 12889 | @example | ||
| 12890 | (use-modules (gnu packages android) ;für android-udev-rules | ||
| 12891 | (gnu system shadow) ;für user-group | ||
| 12892 | ;; @dots{}) | ||
| 12893 | |||
| 12894 | (operating-system | ||
| 12895 | ;; @dots{} | ||
| 12896 | (users (cons (user-acount | ||
| 12897 | ;; @dots{} | ||
| 12898 | (supplementary-groups | ||
| 12899 | '("adbusers" ;für adb | ||
| 12900 | "wheel" "netdev" "audio" "video")) | ||
| 12901 | ;; @dots{}))) | ||
| 12902 | |||
| 12903 | (groups (cons (user-group (system? #t) (name "adbusers")) | ||
| 12904 | %base-groups)) | ||
| 12905 | |||
| 12906 | ;; @dots{} | ||
| 12907 | |||
| 12908 | (services | ||
| 12909 | (modify-services %desktop-services | ||
| 12910 | (udev-service-type | ||
| 12911 | config => | ||
| 12912 | (udev-configuration (inherit config) | ||
| 12913 | (rules (cons android-udev-rules | ||
| 12914 | (udev-configuration-rules config)))))))) | ||
| 12915 | @end example | ||
| 12916 | |||
| 12917 | @defvr {Scheme-Variable} urandom-seed-service-type | ||
| 12918 | Etwas Entropie in der Datei @var{%random-seed-file} aufsparen, die als | ||
| 12919 | Startwert (als sogenannter »Seed«) für @file{/dev/urandom} dienen kann, | ||
| 12920 | nachdem das System neu gestartet wurde. Es wird auch versucht, | ||
| 12921 | @file{/dev/urandom} beim Hochfahren mit Werten aus @file{/dev/hwrng} zu | ||
| 12922 | starten, falls @file{/dev/hwrng} existiert und lesbar ist. | ||
| 12923 | @end defvr | ||
| 12924 | |||
| 12925 | @defvr {Scheme-Variable} %random-seed-file | ||
| 12926 | Der Name der Datei, in der einige zufällige Bytes vom | ||
| 12927 | @var{urandom-seed-service} abgespeichert werden, um sie nach einem Neustart | ||
| 12928 | von dort als Startwert für @file{/dev/urandom} auslesen zu können. Als | ||
| 12929 | Vorgabe wird @file{/var/lib/random-seed} verwendet. | ||
| 12930 | @end defvr | ||
| 12931 | |||
| 12932 | @cindex Maus | ||
| 12933 | @cindex gpm | ||
| 12934 | @defvr {Scheme-Variable} gpm-service-type | ||
| 12935 | Dieser Typ wird für den Dienst verwendet, der GPM ausführt, den | ||
| 12936 | @dfn{General-Purpose Mouse Daemon}, welcher zur Linux-Konsole | ||
| 12937 | Mausunterstützung hinzufügt. GPM ermöglicht es seinen Benutzern, auch in der | ||
| 12938 | Konsole die Maus zu benutzen und damit etwa Text auszuwählen, zu kopieren | ||
| 12939 | und einzufügen. | ||
| 12940 | |||
| 12941 | Der Wert für Dienste dieses Typs muss eine @code{gpm-configuration} sein | ||
| 12942 | (siehe unten). Dieser Dienst gehört @emph{nicht} zu den | ||
| 12943 | @var{%base-services}. | ||
| 12944 | @end defvr | ||
| 12945 | |||
| 12946 | @deftp {Datentyp} gpm-configuration | ||
| 12947 | Repräsentiert die Konfiguration von GPM. | ||
| 12948 | |||
| 12949 | @table @asis | ||
| 12950 | @item @code{options} (Vorgabe: @code{%default-gpm-options}) | ||
| 12951 | Befehlszeilenoptionen, die an @command{gpm} übergeben werden. Die | ||
| 12952 | vorgegebenen Optionen weisen @command{gpm} an, auf Maus-Ereignisse auf der | ||
| 12953 | Datei @file{/dev/input/mice} zu lauschen. Siehe @ref{Command Line,,, gpm, | ||
| 12954 | gpm manual} für weitere Informationen. | ||
| 12955 | |||
| 12956 | @item @code{gpm} (Vorgabe: @code{gpm}) | ||
| 12957 | Das GPM-Paket, was benutzt werden soll. | ||
| 12958 | |||
| 12959 | @end table | ||
| 12960 | @end deftp | ||
| 12961 | |||
| 12962 | @anchor{guix-publish-service-type} | ||
| 12963 | @deffn {Scheme-Variable} guix-publish-service-type | ||
| 12964 | Dies ist der Diensttyp für @command{guix publish} (siehe @ref{Aufruf von guix publish}). Sein Wert muss ein @code{guix-publish-configuration}-Objekt sein, | ||
| 12965 | wie im Folgenden beschrieben. | ||
| 12966 | |||
| 12967 | Hierbei wird angenommen, dass @file{/etc/guix} bereits ein mit @command{guix | ||
| 12968 | archive --generate-key} erzeugtes Schlüsselpaar zum Signieren enthält (siehe | ||
| 12969 | @ref{Aufruf von guix archive}). Falls nicht, wird der Dienst beim Starten | ||
| 12970 | fehlschlagen. | ||
| 12971 | @end deffn | ||
| 12972 | |||
| 12973 | @deftp {Datentyp} guix-publish-configuration | ||
| 12974 | Der Datentyp, der die Konfiguration des »@code{guix publish}«-Dienstes | ||
| 12975 | repräsentiert. | ||
| 12976 | |||
| 12977 | @table @asis | ||
| 12978 | @item @code{guix} (Vorgabe: @code{guix}) | ||
| 12979 | Das zu verwendende Guix-Paket. | ||
| 12980 | |||
| 12981 | @item @code{port} (Vorgabe: @code{80}) | ||
| 12982 | Der TCP-Port, auf dem auf Verbindungen gelauscht werden soll. | ||
| 12983 | |||
| 12984 | @item @code{host} (Vorgabe: @code{"localhost"}) | ||
| 12985 | Unter welcher Rechneradresse (welchem »Host«, also welcher | ||
| 12986 | Netzwerkschnittstelle) auf Verbindungen gelauscht wird. Benutzen Sie | ||
| 12987 | @code{"0.0.0.0"}, wenn auf allen verfügbaren Netzwerkschnittstellen | ||
| 12988 | gelauscht werden soll. | ||
| 12989 | |||
| 12990 | @item @code{compression-level} (Vorgabe: @code{3}) | ||
| 12991 | Die gzip-Kompressionsstufe, mit der Substitute komprimiert werden | ||
| 12992 | sollen. Benutzen Sie @code{0}, um Kompression völlig abzuschalten, und | ||
| 12993 | @code{9} für das höchste Kompressionsverhältnis, zu Lasten von zusätzlicher | ||
| 12994 | Prozessorauslastung. | ||
| 12995 | |||
| 12996 | @item @code{nar-path} (Vorgabe: @code{"nar"}) | ||
| 12997 | Der URL-Pfad, unter dem »Nars« zum Herunterladen angeboten werden. Siehe | ||
| 12998 | @ref{Aufruf von guix publish, @code{--nar-path}} für Details. | ||
| 12999 | |||
| 13000 | @item @code{cache} (Vorgabe: @code{#f}) | ||
| 13001 | Wenn dies @code{#f} ist, werden Archive nicht zwischengespeichert, sondern | ||
| 13002 | erst bei einer Anfrage erzeugt. Andernfalls sollte dies der Name eines | ||
| 13003 | Verzeichnisses sein — z.B.@: @code{"/var/cache/guix/publish"} —, in das | ||
| 13004 | @command{guix publish} fertige Archive und Metadaten zwischenspeichern | ||
| 13005 | soll. Siehe @ref{Aufruf von guix publish, @option{--cache}} für weitere | ||
| 13006 | Informationen über die jeweiligen Vor- und Nachteile. | ||
| 13007 | |||
| 13008 | @item @code{workers} (Vorgabe: @code{#f}) | ||
| 13009 | Ist dies eine ganze Zahl, gibt es die Anzahl der Worker-Threads an, die zum | ||
| 13010 | Zwischenspeichern benutzt werden; ist es @code{#f}, werden so viele benutzt, | ||
| 13011 | wie es Prozessoren gibt. Siehe @ref{Aufruf von guix publish, | ||
| 13012 | @option{--workers}} für mehr Informationen. | ||
| 13013 | |||
| 13014 | @item @code{ttl} (Vorgabe: @code{#f}) | ||
| 13015 | Wenn dies eine ganze Zahl ist, bezeichnet sie die @dfn{Time-to-live} als die | ||
| 13016 | Anzahl der Sekunden, die heruntergeladene veröffentlichte Archive | ||
| 13017 | zwischengespeichert werden dürfen. Siehe @ref{Aufruf von guix publish, | ||
| 13018 | @option{--ttl}} für mehr Informationen. | ||
| 13019 | @end table | ||
| 13020 | @end deftp | ||
| 13021 | |||
| 13022 | @anchor{rngd-service} | ||
| 13023 | @deffn {Scheme-Prozedur} rngd-service [#:rng-tools @var{rng-tools}] @ | ||
| 13024 | [#:device "/dev/hwrng"] Liefert einen Dienst, der das | ||
| 13025 | @command{rngd}-Programm aus den @var{rng-tools} benutzt, um das mit | ||
| 13026 | @var{device} bezeichnete Gerät zum Entropie-Pool des Kernels | ||
| 13027 | hinzuzufügen. Dieser Dienst wird fehlschlagen, falls das mit @var{device} | ||
| 13028 | bezeichnete Gerät nicht existiert. | ||
| 13029 | @end deffn | ||
| 13030 | |||
| 13031 | @anchor{pam-limits-service} | ||
| 13032 | @cindex Sitzungs-Limits | ||
| 13033 | @cindex ulimit | ||
| 13034 | @cindex Priorität | ||
| 13035 | @cindex Echtzeit | ||
| 13036 | @cindex jackd | ||
| 13037 | @deffn {Scheme-Prozedur} pam-limits-service [#:limits @code{'()}] | ||
| 13038 | |||
| 13039 | Liefert einen Dienst, der eine Konfigurationsdatei für das | ||
| 13040 | @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html, | ||
| 13041 | @code{pam_limits}-Modul} installiert. Diese Prozedur nimmt optional eine | ||
| 13042 | Liste von @code{pam-limits-entry}-Werten entgegen, die benutzt werden | ||
| 13043 | können, um @code{ulimit}-Limits und nice-Prioritäten für Benutzersitzungen | ||
| 13044 | festzulegen. | ||
| 13045 | |||
| 13046 | Die folgenden Limit-Definitionen setzen zwei harte und weiche Limits für | ||
| 13047 | alle Anmeldesitzungen für Benutzer in der @code{realtime}-Gruppe. | ||
| 13048 | |||
| 13049 | @example | ||
| 13050 | (pam-limits-service | ||
| 13051 | (list | ||
| 13052 | (pam-limits-entry "@@realtime" 'both 'rtprio 99) | ||
| 13053 | (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) | ||
| 13054 | @end example | ||
| 13055 | |||
| 13056 | Der erste Eintrag erhöht die maximale Echtzeit-Priorität für unprivilegierte | ||
| 13057 | Prozesse ohne zusätzliche Berechtigungen; der zweite Eintrag hebt jegliche | ||
| 13058 | Einschränkungen des maximalen Adressbereichs auf, der im Speicher reserviert | ||
| 13059 | werden darf. Diese Einstellungen werden in dieser Form oft für | ||
| 13060 | Echtzeit-Audio-Systeme verwendet. | ||
| 13061 | @end deffn | ||
| 13062 | |||
| 13063 | @node Geplante Auftragsausführung | ||
| 13064 | @subsection Geplante Auftragsausführung | ||
| 13065 | |||
| 13066 | @cindex cron | ||
| 13067 | @cindex mcron | ||
| 13068 | @cindex Planen von Aufträgen | ||
| 13069 | Das Modul @code{(gnu services mcron)} enthält eine Schnittstelle zu | ||
| 13070 | GNU@tie{}mcron, einem Daemon, der gemäß einem vorher festgelegten Zeitplan | ||
| 13071 | Aufträge (sogenannte »Jobs«) ausführt (siehe @ref{Top,,, mcron, | ||
| 13072 | GNU@tie{}mcron}). GNU@tie{}mcron ist ähnlich zum traditionellen | ||
| 13073 | @command{cron}-Daemon aus Unix; der größte Unterschied ist, dass mcron in | ||
| 13074 | Guile Scheme implementiert ist, wodurch einem viel Flexibilität bei der | ||
| 13075 | Spezifikation von Aufträgen und ihren Aktionen offen steht. | ||
| 13076 | |||
| 13077 | Das folgende Beispiel definiert ein Betriebssystem, das täglich die Befehle | ||
| 13078 | @command{updatedb} (siehe @ref{Invoking updatedb,,, find, Finding Files}) | ||
| 13079 | und @command{guix gc} (siehe @ref{Aufruf von guix gc}) ausführt sowie den | ||
| 13080 | Befehl @command{mkid} im Namen eines »unprivilegierten« Nutzers ohne | ||
| 13081 | besondere Berechtigungen laufen lässt (siehe @ref{mkid invocation,,, | ||
| 13082 | idutils, ID Database Utilities}). Zum Anlegen von Auftragsdefinitionen | ||
| 13083 | benutzt es G-Ausdrücke, die dann an mcron übergeben werden (siehe | ||
| 13084 | @ref{G-Ausdrücke}). | ||
| 13085 | |||
| 13086 | @lisp | ||
| 13087 | (use-modules (guix) (gnu) (gnu services mcron)) | ||
| 13088 | (use-package-modules base idutils) | ||
| 13089 | |||
| 13090 | (define updatedb-job | ||
| 13091 | ;; 'updatedb' jeden Tag um 3 Uhr morgens ausführen. Hier schreiben wir | ||
| 13092 | ;; die vom Auftrag durchzuführende Aktion als eine Scheme-Prozedur. | ||
| 13093 | #~(job '(next-hour '(3)) | ||
| 13094 | (lambda () | ||
| 13095 | (execl (string-append #$findutils "/bin/updatedb") | ||
| 13096 | "updatedb" | ||
| 13097 | "--prunepaths=/tmp /var/tmp /gnu/store")))) | ||
| 13098 | |||
| 13099 | (define garbage-collector-job | ||
| 13100 | ;; Jeden Tag 5 Minuten nach Mitternacht Müll sammeln gehen. | ||
| 13101 | ;; Die Aktions des Auftrags ist ein Shell-Befehl. | ||
| 13102 | #~(job "5 0 * * *" ;Vixie-cron-Syntax | ||
| 13103 | "guix gc -F 1G")) | ||
| 13104 | |||
| 13105 | (define idutils-job | ||
| 13106 | ;; Die Index-Datenbank des Benutzers "charlie" um 12:15 Uhr und | ||
| 13107 | ;; 19:15 Uhr aktualisieren. Dies wird aus seinem Persönlichen | ||
| 13108 | ;; Ordner heraus ausgeführt. | ||
| 13109 | #~(job '(next-minute-from (next-hour '(12 19)) '(15)) | ||
| 13110 | (string-append #$idutils "/bin/mkid src") | ||
| 13111 | #:user "charlie")) | ||
| 13112 | |||
| 13113 | (operating-system | ||
| 13114 | ;; @dots{} | ||
| 13115 | (services (cons (service mcron-service-type | ||
| 13116 | (mcron-configuration | ||
| 13117 | (jobs (list garbage-collector-job | ||
| 13118 | updatedb-job | ||
| 13119 | idutils-job)))) | ||
| 13120 | %base-services))) | ||
| 13121 | @end lisp | ||
| 13122 | |||
| 13123 | Siehe @ref{Guile Syntax, mcron job specifications,, mcron, GNU@tie{}mcron} | ||
| 13124 | für weitere Informationen zu mcron-Auftragsspezifikationen. Nun folgt die | ||
| 13125 | Referenz des mcron-Dienstes. | ||
| 13126 | |||
| 13127 | On a running system, you can use the @code{schedule} action of the service | ||
| 13128 | to visualize the mcron jobs that will be executed next: | ||
| 13129 | |||
| 13130 | @example | ||
| 13131 | # herd schedule mcron | ||
| 13132 | @end example | ||
| 13133 | |||
| 13134 | @noindent | ||
| 13135 | The example above lists the next five tasks that will be executed, but you | ||
| 13136 | can also specify the number of tasks to display: | ||
| 13137 | |||
| 13138 | @example | ||
| 13139 | # herd schedule mcron 10 | ||
| 13140 | @end example | ||
| 13141 | |||
| 13142 | @defvr {Scheme Variable} mcron-service-type | ||
| 13143 | This is the type of the @code{mcron} service, whose value is an | ||
| 13144 | @code{mcron-configuration} object. | ||
| 13145 | |||
| 13146 | This service type can be the target of a service extension that provides it | ||
| 13147 | additional job specifications (@pxref{Dienstkompositionen}). In other | ||
| 13148 | words, it is possible to define services that provide additional mcron jobs | ||
| 13149 | to run. | ||
| 13150 | @end defvr | ||
| 13151 | |||
| 13152 | @deftp {Data Type} mcron-configuration | ||
| 13153 | Data type representing the configuration of mcron. | ||
| 13154 | |||
| 13155 | @table @asis | ||
| 13156 | @item @code{mcron} (default: @var{mcron}) | ||
| 13157 | The mcron package to use. | ||
| 13158 | |||
| 13159 | @item @code{jobs} | ||
| 13160 | This is a list of gexps (@pxref{G-Ausdrücke}), where each gexp corresponds | ||
| 13161 | to an mcron job specification (@pxref{Syntax, mcron job specifications,, | ||
| 13162 | mcron, GNU@tie{}mcron}). | ||
| 13163 | @end table | ||
| 13164 | @end deftp | ||
| 13165 | |||
| 13166 | |||
| 13167 | @node Log-Rotation | ||
| 13168 | @subsection Log-Rotation | ||
| 13169 | |||
| 13170 | @cindex rottlog | ||
| 13171 | @cindex log rotation | ||
| 13172 | @cindex Protokollierung | ||
| 13173 | Log files such as those found in @file{/var/log} tend to grow endlessly, so | ||
| 13174 | it's a good idea to @dfn{rotate} them once in a while---i.e., archive their | ||
| 13175 | contents in separate files, possibly compressed. The @code{(gnu services | ||
| 13176 | admin)} module provides an interface to GNU@tie{}Rot[t]log, a log rotation | ||
| 13177 | tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}). | ||
| 13178 | |||
| 13179 | The example below defines an operating system that provides log rotation | ||
| 13180 | with the default settings, for commonly encountered log files. | ||
| 13181 | |||
| 13182 | @lisp | ||
| 13183 | (use-modules (guix) (gnu)) | ||
| 13184 | (use-service-modules admin mcron) | ||
| 13185 | (use-package-modules base idutils) | ||
| 13186 | |||
| 13187 | (operating-system | ||
| 13188 | ;; @dots{} | ||
| 13189 | (services (cons (service rottlog-service-type) | ||
| 13190 | %base-services))) | ||
| 13191 | @end lisp | ||
| 13192 | |||
| 13193 | @defvr {Scheme Variable} rottlog-service-type | ||
| 13194 | This is the type of the Rottlog service, whose value is a | ||
| 13195 | @code{rottlog-configuration} object. | ||
| 13196 | |||
| 13197 | Other services can extend this one with new @code{log-rotation} objects (see | ||
| 13198 | below), thereby augmenting the set of files to be rotated. | ||
| 13199 | |||
| 13200 | This service type can define mcron jobs (@pxref{Geplante Auftragsausführung}) to | ||
| 13201 | run the rottlog service. | ||
| 13202 | @end defvr | ||
| 13203 | |||
| 13204 | @deftp {Data Type} rottlog-configuration | ||
| 13205 | Data type representing the configuration of rottlog. | ||
| 13206 | |||
| 13207 | @table @asis | ||
| 13208 | @item @code{rottlog} (default: @code{rottlog}) | ||
| 13209 | The Rottlog package to use. | ||
| 13210 | |||
| 13211 | @item @code{rc-file} (default: @code{(file-append rottlog "/etc/rc")}) | ||
| 13212 | The Rottlog configuration file to use (@pxref{Mandatory RC Variables,,, | ||
| 13213 | rottlog, GNU Rot[t]log Manual}). | ||
| 13214 | |||
| 13215 | @item @code{rotations} (default: @code{%default-rotations}) | ||
| 13216 | A list of @code{log-rotation} objects as defined below. | ||
| 13217 | |||
| 13218 | @item @code{jobs} | ||
| 13219 | This is a list of gexps where each gexp corresponds to an mcron job | ||
| 13220 | specification (@pxref{Geplante Auftragsausführung}). | ||
| 13221 | @end table | ||
| 13222 | @end deftp | ||
| 13223 | |||
| 13224 | @deftp {Data Type} log-rotation | ||
| 13225 | Data type representing the rotation of a group of log files. | ||
| 13226 | |||
| 13227 | Taking an example from the Rottlog manual (@pxref{Period Related File | ||
| 13228 | Examples,,, rottlog, GNU Rot[t]log Manual}), a log rotation might be defined | ||
| 13229 | like this: | ||
| 13230 | |||
| 13231 | @example | ||
| 13232 | (log-rotation | ||
| 13233 | (frequency 'daily) | ||
| 13234 | (files '("/var/log/apache/*")) | ||
| 13235 | (options '("storedir apache-archives" | ||
| 13236 | "rotate 6" | ||
| 13237 | "notifempty" | ||
| 13238 | "nocompress"))) | ||
| 13239 | @end example | ||
| 13240 | |||
| 13241 | The list of fields is as follows: | ||
| 13242 | |||
| 13243 | @table @asis | ||
| 13244 | @item @code{frequency} (default: @code{'weekly}) | ||
| 13245 | The log rotation frequency, a symbol. | ||
| 13246 | |||
| 13247 | @item @code{files} | ||
| 13248 | The list of files or file glob patterns to rotate. | ||
| 13249 | |||
| 13250 | @item @code{options} (default: @code{'()}) | ||
| 13251 | The list of rottlog options for this rotation (@pxref{Configuration | ||
| 13252 | parameters,,, rottlog, GNU Rot[t]lg Manual}). | ||
| 13253 | |||
| 13254 | @item @code{post-rotate} (default: @code{#f}) | ||
| 13255 | Either @code{#f} or a gexp to execute once the rotation has completed. | ||
| 13256 | @end table | ||
| 13257 | @end deftp | ||
| 13258 | |||
| 13259 | @defvr {Scheme Variable} %default-rotations | ||
| 13260 | Specifies weekly rotation of @var{%rotated-files} and a couple of other | ||
| 13261 | files. | ||
| 13262 | @end defvr | ||
| 13263 | |||
| 13264 | @defvr {Scheme Variable} %rotated-files | ||
| 13265 | The list of syslog-controlled files to be rotated. By default it is: | ||
| 13266 | @code{'("/var/log/messages" "/var/log/secure")}. | ||
| 13267 | @end defvr | ||
| 13268 | |||
| 13269 | @node Netzwerkdienste | ||
| 13270 | @subsection Netzwerkdienste | ||
| 13271 | |||
| 13272 | The @code{(gnu services networking)} module provides services to configure | ||
| 13273 | the network interface. | ||
| 13274 | |||
| 13275 | @cindex DHCP, networking service | ||
| 13276 | @defvr {Scheme Variable} dhcp-client-service-type | ||
| 13277 | This is the type of services that run @var{dhcp}, a Dynamic Host | ||
| 13278 | Configuration Protocol (DHCP) client, on all the non-loopback network | ||
| 13279 | interfaces. Its value is the DHCP client package to use, @code{isc-dhcp} by | ||
| 13280 | default. | ||
| 13281 | @end defvr | ||
| 13282 | |||
| 13283 | @deffn {Scheme Procedure} dhcpd-service-type | ||
| 13284 | This type defines a service that runs a DHCP daemon. To create a service of | ||
| 13285 | this type, you must supply a @code{<dhcpd-configuration>}. For example: | ||
| 13286 | |||
| 13287 | @example | ||
| 13288 | (service dhcpd-service-type | ||
| 13289 | (dhcpd-configuration | ||
| 13290 | (config-file (local-file "my-dhcpd.conf")) | ||
| 13291 | (interfaces '("enp0s25")))) | ||
| 13292 | @end example | ||
| 13293 | @end deffn | ||
| 13294 | |||
| 13295 | @deftp {Data Type} dhcpd-configuration | ||
| 13296 | @table @asis | ||
| 13297 | @item @code{package} (default: @code{isc-dhcp}) | ||
| 13298 | The package that provides the DHCP daemon. This package is expected to | ||
| 13299 | provide the daemon at @file{sbin/dhcpd} relative to its output directory. | ||
| 13300 | The default package is the @uref{http://www.isc.org/products/DHCP, ISC's | ||
| 13301 | DHCP server}. | ||
| 13302 | @item @code{config-file} (default: @code{#f}) | ||
| 13303 | The configuration file to use. This is required. It will be passed to | ||
| 13304 | @code{dhcpd} via its @code{-cf} option. This may be any ``file-like'' | ||
| 13305 | object (@pxref{G-Ausdrücke, file-like objects}). See @code{man | ||
| 13306 | dhcpd.conf} for details on the configuration file syntax. | ||
| 13307 | @item @code{version} (default: @code{"4"}) | ||
| 13308 | The DHCP version to use. The ISC DHCP server supports the values ``4'', | ||
| 13309 | ``6'', and ``4o6''. These correspond to the @code{dhcpd} program options | ||
| 13310 | @code{-4}, @code{-6}, and @code{-4o6}. See @code{man dhcpd} for details. | ||
| 13311 | @item @code{run-directory} (default: @code{"/run/dhcpd"}) | ||
| 13312 | The run directory to use. At service activation time, this directory will | ||
| 13313 | be created if it does not exist. | ||
| 13314 | @item @code{pid-file} (default: @code{"/run/dhcpd/dhcpd.pid"}) | ||
| 13315 | The PID file to use. This corresponds to the @code{-pf} option of | ||
| 13316 | @code{dhcpd}. See @code{man dhcpd} for details. | ||
| 13317 | @item @code{interfaces} (default: @code{'()}) | ||
| 13318 | The names of the network interfaces on which dhcpd should listen for | ||
| 13319 | broadcasts. If this list is not empty, then its elements (which must be | ||
| 13320 | strings) will be appended to the @code{dhcpd} invocation when starting the | ||
| 13321 | daemon. It may not be necessary to explicitly specify any interfaces here; | ||
| 13322 | see @code{man dhcpd} for details. | ||
| 13323 | @end table | ||
| 13324 | @end deftp | ||
| 13325 | |||
| 13326 | @defvr {Scheme Variable} static-networking-service-type | ||
| 13327 | @c TODO Document <static-networking> data structures. | ||
| 13328 | This is the type for statically-configured network interfaces. | ||
| 13329 | @end defvr | ||
| 13330 | |||
| 13331 | @deffn {Scheme Procedure} static-networking-service @var{interface} @var{ip} @ | ||
| 13332 | [#:netmask #f] [#:gateway #f] [#:name-servers @code{'()}] @ [#:requirement | ||
| 13333 | @code{'(udev)}] Return a service that starts @var{interface} with address | ||
| 13334 | @var{ip}. If @var{netmask} is true, use it as the network mask. If | ||
| 13335 | @var{gateway} is true, it must be a string specifying the default network | ||
| 13336 | gateway. @var{requirement} can be used to declare a dependency on another | ||
| 13337 | service before configuring the interface. | ||
| 13338 | |||
| 13339 | This procedure can be called several times, one for each network interface | ||
| 13340 | of interest. Behind the scenes what it does is extend | ||
| 13341 | @code{static-networking-service-type} with additional network interfaces to | ||
| 13342 | handle. | ||
| 13343 | |||
| 13344 | Zum Beispiel: | ||
| 13345 | |||
| 13346 | @example | ||
| 13347 | (static-networking-service "eno1" "192.168.1.82" | ||
| 13348 | #:gateway "192.168.1.2" | ||
| 13349 | #:name-servers '("192.168.1.2")) | ||
| 13350 | @end example | ||
| 13351 | @end deffn | ||
| 13352 | |||
| 13353 | @cindex wicd | ||
| 13354 | @cindex WLAN | ||
| 13355 | @cindex WiFi | ||
| 13356 | @cindex network management | ||
| 13357 | @deffn {Scheme Procedure} wicd-service [#:wicd @var{wicd}] | ||
| 13358 | Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a network | ||
| 13359 | management daemon that aims to simplify wired and wireless networking. | ||
| 13360 | |||
| 13361 | This service adds the @var{wicd} package to the global profile, providing | ||
| 13362 | several commands to interact with the daemon and configure networking: | ||
| 13363 | @command{wicd-client}, a graphical user interface, and the | ||
| 13364 | @command{wicd-cli} and @command{wicd-curses} user interfaces. | ||
| 13365 | @end deffn | ||
| 13366 | |||
| 13367 | @cindex ModemManager | ||
| 13368 | |||
| 13369 | @defvr {Scheme Variable} modem-manager-service-type | ||
| 13370 | This is the service type for the | ||
| 13371 | @uref{https://wiki.gnome.org/Projects/ModemManager, ModemManager} | ||
| 13372 | service. The value for this service type is a | ||
| 13373 | @code{modem-manager-configuration} record. | ||
| 13374 | |||
| 13375 | This service is part of @code{%desktop-services} (@pxref{Desktop-Dienste}). | ||
| 13376 | @end defvr | ||
| 13377 | |||
| 13378 | @deftp {Data Type} modem-manager-configuration | ||
| 13379 | Repräsentiert die Konfiguration vom ModemManager. | ||
| 13380 | |||
| 13381 | @table @asis | ||
| 13382 | @item @code{modem-manager} (Vorgabe: @code{modem-manager}) | ||
| 13383 | Das ModemManager-Paket, was benutzt werden soll. | ||
| 13384 | |||
| 13385 | @end table | ||
| 13386 | @end deftp | ||
| 13387 | |||
| 13388 | @cindex NetworkManager | ||
| 13389 | |||
| 13390 | @defvr {Scheme Variable} network-manager-service-type | ||
| 13391 | This is the service type for the | ||
| 13392 | @uref{https://wiki.gnome.org/Projects/NetworkManager, NetworkManager} | ||
| 13393 | service. The value for this service type is a | ||
| 13394 | @code{network-manager-configuration} record. | ||
| 13395 | |||
| 13396 | This service is part of @code{%desktop-services} (@pxref{Desktop-Dienste}). | ||
| 13397 | @end defvr | ||
| 13398 | |||
| 13399 | @deftp {Data Type} network-manager-configuration | ||
| 13400 | Data type representing the configuration of NetworkManager. | ||
| 13401 | |||
| 13402 | @table @asis | ||
| 13403 | @item @code{network-manager} (default: @code{network-manager}) | ||
| 13404 | The NetworkManager package to use. | ||
| 13405 | |||
| 13406 | @item @code{dns} (default: @code{"default"}) | ||
| 13407 | Processing mode for DNS, which affects how NetworkManager uses the | ||
| 13408 | @code{resolv.conf} configuration file. | ||
| 13409 | |||
| 13410 | @table @samp | ||
| 13411 | @item default | ||
| 13412 | NetworkManager will update @code{resolv.conf} to reflect the nameservers | ||
| 13413 | provided by currently active connections. | ||
| 13414 | |||
| 13415 | @item dnsmasq | ||
| 13416 | NetworkManager will run @code{dnsmasq} as a local caching nameserver, using | ||
| 13417 | a "split DNS" configuration if you are connected to a VPN, and then update | ||
| 13418 | @code{resolv.conf} to point to the local nameserver. | ||
| 13419 | |||
| 13420 | @item none | ||
| 13421 | NetworkManager will not modify @code{resolv.conf}. | ||
| 13422 | @end table | ||
| 13423 | |||
| 13424 | @item @code{vpn-plugins} (default: @code{'()}) | ||
| 13425 | This is the list of available plugins for virtual private networks (VPNs). | ||
| 13426 | An example of this is the @code{network-manager-openvpn} package, which | ||
| 13427 | allows NetworkManager to manage VPNs @i{via} OpenVPN. | ||
| 13428 | |||
| 13429 | @end table | ||
| 13430 | @end deftp | ||
| 13431 | |||
| 13432 | @cindex Connman | ||
| 13433 | @deffn {Scheme Variable} connman-service-type | ||
| 13434 | This is the service type to run @url{https://01.org/connman,Connman}, a | ||
| 13435 | network connection manager. | ||
| 13436 | |||
| 13437 | Its value must be an @code{connman-configuration} record as in this example: | ||
| 13438 | |||
| 13439 | @example | ||
| 13440 | (service connman-service-type | ||
| 13441 | (connman-configuration | ||
| 13442 | (disable-vpn? #t))) | ||
| 13443 | @end example | ||
| 13444 | |||
| 13445 | See below for details about @code{connman-configuration}. | ||
| 13446 | @end deffn | ||
| 13447 | |||
| 13448 | @deftp {Data Type} connman-configuration | ||
| 13449 | Data Type representing the configuration of connman. | ||
| 13450 | |||
| 13451 | @table @asis | ||
| 13452 | @item @code{connman} (default: @var{connman}) | ||
| 13453 | The connman package to use. | ||
| 13454 | |||
| 13455 | @item @code{disable-vpn?} (default: @code{#f}) | ||
| 13456 | When true, disable connman's vpn plugin. | ||
| 13457 | @end table | ||
| 13458 | @end deftp | ||
| 13459 | |||
| 13460 | @cindex WPA Supplicant | ||
| 13461 | @defvr {Scheme Variable} wpa-supplicant-service-type | ||
| 13462 | This is the service type to run @url{https://w1.fi/wpa_supplicant/,WPA | ||
| 13463 | supplicant}, an authentication daemon required to authenticate against | ||
| 13464 | encrypted WiFi or ethernet networks. | ||
| 13465 | @end defvr | ||
| 13466 | |||
| 13467 | @deftp {Data Type} wpa-supplicant-configuration | ||
| 13468 | Repräsentiert die Konfiguration des WPA-Supplikanten. | ||
| 13469 | |||
| 13470 | Sie hat folgende Parameter: | ||
| 13471 | |||
| 13472 | @table @asis | ||
| 13473 | @item @code{wpa-supplicant} (Vorgabe: @code{wpa-supplicant}) | ||
| 13474 | Das WPA-Supplicant-Paket, was benutzt werden soll. | ||
| 13475 | |||
| 13476 | @item @code{dbus?} (Vorgabe: @code{#t}) | ||
| 13477 | Whether to listen for requests on D-Bus. | ||
| 13478 | |||
| 13479 | @item @code{pid-file} (Vorgabe: @code{"/var/run/wpa_supplicant.pid"}) | ||
| 13480 | Wo die PID-Datei abgelegt wird. | ||
| 13481 | |||
| 13482 | @item @code{interface} (Vorgabe: @code{#f}) | ||
| 13483 | If this is set, it must specify the name of a network interface that WPA | ||
| 13484 | supplicant will control. | ||
| 13485 | |||
| 13486 | @item @code{config-file} (default: @code{#f}) | ||
| 13487 | Optionale Konfigurationsdatei. | ||
| 13488 | |||
| 13489 | @item @code{extra-options} (Vorgabe: @code{'()}) | ||
| 13490 | List of additional command-line arguments to pass to the daemon. | ||
| 13491 | @end table | ||
| 13492 | @end deftp | ||
| 13493 | |||
| 13494 | @cindex iptables | ||
| 13495 | @defvr {Scheme Variable} iptables-service-type | ||
| 13496 | This is the service type to set up an iptables configuration. iptables is a | ||
| 13497 | packet filtering framework supported by the Linux kernel. This service | ||
| 13498 | supports configuring iptables for both IPv4 and IPv6. A simple example | ||
| 13499 | configuration rejecting all incoming connections except those to the ssh | ||
| 13500 | port 22 is shown below. | ||
| 13501 | |||
| 13502 | @lisp | ||
| 13503 | (service iptables-service-type | ||
| 13504 | (iptables-configuration | ||
| 13505 | (ipv4-rules (plain-file "iptables.rules" "*filter | ||
| 13506 | :INPUT ACCEPT | ||
| 13507 | :FORWARD ACCEPT | ||
| 13508 | :OUTPUT ACCEPT | ||
| 13509 | -A INPUT -p tcp --dport 22 -j ACCEPT | ||
| 13510 | -A INPUT -j REJECT --reject-with icmp-port-unreachable | ||
| 13511 | COMMIT | ||
| 13512 | ")) | ||
| 13513 | (ipv6-rules (plain-file "ip6tables.rules" "*filter | ||
| 13514 | :INPUT ACCEPT | ||
| 13515 | :FORWARD ACCEPT | ||
| 13516 | :OUTPUT ACCEPT | ||
| 13517 | -A INPUT -p tcp --dport 22 -j ACCEPT | ||
| 13518 | -A INPUT -j REJECT --reject-with icmp6-port-unreachable | ||
| 13519 | COMMIT | ||
| 13520 | ")))) | ||
| 13521 | @end lisp | ||
| 13522 | @end defvr | ||
| 13523 | |||
| 13524 | @deftp {Datentyp} iptables-configuration | ||
| 13525 | Repräsentiert die iptables-Konfiguration. | ||
| 13526 | |||
| 13527 | @table @asis | ||
| 13528 | @item @code{iptables} (Vorgabe: @code{iptables}) | ||
| 13529 | The iptables package that provides @code{iptables-restore} and | ||
| 13530 | @code{ip6tables-restore}. | ||
| 13531 | @item @code{ipv4-rules} (Vorgabe: @code{%iptables-accept-all-rules}) | ||
| 13532 | The iptables rules to use. It will be passed to @code{iptables-restore}. | ||
| 13533 | This may be any ``file-like'' object (@pxref{G-Ausdrücke, file-like | ||
| 13534 | objects}). | ||
| 13535 | @item @code{ipv6-rules} (Vorgabe: @code{%iptables-accept-all-rules}) | ||
| 13536 | The ip6tables rules to use. It will be passed to @code{ip6tables-restore}. | ||
| 13537 | This may be any ``file-like'' object (@pxref{G-Ausdrücke, file-like | ||
| 13538 | objects}). | ||
| 13539 | @end table | ||
| 13540 | @end deftp | ||
| 13541 | |||
| 13542 | @cindex NTP (Network Time Protocol), Dienst | ||
| 13543 | @cindex real time clock | ||
| 13544 | @defvr {Scheme Variable} ntp-service-type | ||
| 13545 | This is the type of the service running the @uref{http://www.ntp.org, | ||
| 13546 | Network Time Protocol (NTP)} daemon, @command{ntpd}. The daemon will keep | ||
| 13547 | the system clock synchronized with that of the specified NTP servers. | ||
| 13548 | |||
| 13549 | The value of this service is an @code{ntpd-configuration} object, as | ||
| 13550 | described below. | ||
| 13551 | @end defvr | ||
| 13552 | |||
| 13553 | @deftp {Datentyp} ntp-configuration | ||
| 13554 | Der Datentyp für die Dienstkonfiguration des NTP-Dienstes. | ||
| 13555 | |||
| 13556 | @table @asis | ||
| 13557 | @item @code{servers} (Vorgabe: @code{%ntp-servers}) | ||
| 13558 | This is the list of servers (host names) with which @command{ntpd} will be | ||
| 13559 | synchronized. | ||
| 13560 | |||
| 13561 | @item @code{allow-large-adjustment?} (default: @code{#f}) | ||
| 13562 | This determines whether @command{ntpd} is allowed to make an initial | ||
| 13563 | adjustment of more than 1,000 seconds. | ||
| 13564 | |||
| 13565 | @item @code{ntp} (Vorgabe: @code{ntp}) | ||
| 13566 | Das NTP-Paket, was benutzt werden soll. | ||
| 13567 | @end table | ||
| 13568 | @end deftp | ||
| 13569 | |||
| 13570 | @defvr {Scheme Variable} %ntp-servers | ||
| 13571 | List of host names used as the default NTP servers. These are servers of | ||
| 13572 | the @uref{https://www.ntppool.org/en/, NTP Pool Project}. | ||
| 13573 | @end defvr | ||
| 13574 | |||
| 13575 | @cindex OpenNTPD | ||
| 13576 | @deffn {Scheme Procedure} openntpd-service-type | ||
| 13577 | Run the @command{ntpd}, the Network Time Protocol (NTP) daemon, as | ||
| 13578 | implemented by @uref{http://www.openntpd.org, OpenNTPD}. The daemon will | ||
| 13579 | keep the system clock synchronized with that of the given servers. | ||
| 13580 | |||
| 13581 | @example | ||
| 13582 | (service | ||
| 13583 | openntpd-service-type | ||
| 13584 | (openntpd-configuration | ||
| 13585 | (listen-on '("127.0.0.1" "::1")) | ||
| 13586 | (sensor '("udcf0 correction 70000")) | ||
| 13587 | (constraint-from '("www.gnu.org")) | ||
| 13588 | (constraints-from '("https://www.google.com/")) | ||
| 13589 | (allow-large-adjustment? #t))) | ||
| 13590 | |||
| 13591 | @end example | ||
| 13592 | @end deffn | ||
| 13593 | |||
| 13594 | @deftp {Data Type} openntpd-configuration | ||
| 13595 | @table @asis | ||
| 13596 | @item @code{openntpd} (default: @code{(file-append openntpd "/sbin/ntpd")}) | ||
| 13597 | The openntpd executable to use. | ||
| 13598 | @item @code{listen-on} (default: @code{'("127.0.0.1" "::1")}) | ||
| 13599 | A list of local IP addresses or hostnames the ntpd daemon should listen on. | ||
| 13600 | @item @code{query-from} (default: @code{'()}) | ||
| 13601 | A list of local IP address the ntpd daemon should use for outgoing queries. | ||
| 13602 | @item @code{sensor} (default: @code{'()}) | ||
| 13603 | Specify a list of timedelta sensor devices ntpd should use. @code{ntpd} | ||
| 13604 | will listen to each sensor that acutally exists and ignore non-existant | ||
| 13605 | ones. See @uref{https://man.openbsd.org/ntpd.conf, upstream documentation} | ||
| 13606 | for more information. | ||
| 13607 | @item @code{server} (default: @var{%ntp-servers}) | ||
| 13608 | Specify a list of IP addresses or hostnames of NTP servers to synchronize | ||
| 13609 | to. | ||
| 13610 | @item @code{servers} (default: @code{'()}) | ||
| 13611 | Specify a list of IP addresses or hostnames of NTP pools to synchronize to. | ||
| 13612 | @item @code{constraint-from} (default: @code{'()}) | ||
| 13613 | @code{ntpd} can be configured to query the ‘Date’ from trusted HTTPS servers | ||
| 13614 | via TLS. This time information is not used for precision but acts as an | ||
| 13615 | authenticated constraint, thereby reducing the impact of unauthenticated NTP | ||
| 13616 | man-in-the-middle attacks. Specify a list of URLs, IP addresses or | ||
| 13617 | hostnames of HTTPS servers to provide a constraint. | ||
| 13618 | @item @code{constraints-from} (default: @code{'()}) | ||
| 13619 | As with constraint from, specify a list of URLs, IP addresses or hostnames | ||
| 13620 | of HTTPS servers to provide a constraint. Should the hostname resolve to | ||
| 13621 | multiple IP addresses, @code{ntpd} will calculate a median constraint from | ||
| 13622 | all of them. | ||
| 13623 | @item @code{allow-large-adjustment?} (default: @code{#f}) | ||
| 13624 | Determines if @code{ntpd} is allowed to make an initial adjustment of more | ||
| 13625 | than 180 seconds. | ||
| 13626 | @end table | ||
| 13627 | @end deftp | ||
| 13628 | |||
| 13629 | @cindex inetd | ||
| 13630 | @deffn {Scheme variable} inetd-service-type | ||
| 13631 | This service runs the @command{inetd} (@pxref{inetd invocation,,, inetutils, | ||
| 13632 | GNU Inetutils}) daemon. @command{inetd} listens for connections on internet | ||
| 13633 | sockets, and lazily starts the specified server program when a connection is | ||
| 13634 | made on one of these sockets. | ||
| 13635 | |||
| 13636 | The value of this service is an @code{inetd-configuration} object. The | ||
| 13637 | following example configures the @command{inetd} daemon to provide the | ||
| 13638 | built-in @command{echo} service, as well as an smtp service which forwards | ||
| 13639 | smtp traffic over ssh to a server @code{smtp-server} behind a gateway | ||
| 13640 | @code{hostname}: | ||
| 13641 | |||
| 13642 | @example | ||
| 13643 | (service | ||
| 13644 | inetd-service-type | ||
| 13645 | (inetd-configuration | ||
| 13646 | (entries (list | ||
| 13647 | (inetd-entry | ||
| 13648 | (name "echo") | ||
| 13649 | (socket-type 'stream) | ||
| 13650 | (protocol "tcp") | ||
| 13651 | (wait? #f) | ||
| 13652 | (user "root")) | ||
| 13653 | (inetd-entry | ||
| 13654 | (node "127.0.0.1") | ||
| 13655 | (name "smtp") | ||
| 13656 | (socket-type 'stream) | ||
| 13657 | (protocol "tcp") | ||
| 13658 | (wait? #f) | ||
| 13659 | (user "root") | ||
| 13660 | (program (file-append openssh "/bin/ssh")) | ||
| 13661 | (arguments | ||
| 13662 | '("ssh" "-qT" "-i" "/path/to/ssh_key" | ||
| 13663 | "-W" "smtp-server:25" "user@@hostname"))))) | ||
| 13664 | @end example | ||
| 13665 | |||
| 13666 | See below for more details about @code{inetd-configuration}. | ||
| 13667 | @end deffn | ||
| 13668 | |||
| 13669 | @deftp {Data Type} inetd-configuration | ||
| 13670 | Data type representing the configuration of @command{inetd}. | ||
| 13671 | |||
| 13672 | @table @asis | ||
| 13673 | @item @code{program} (default: @code{(file-append inetutils "/libexec/inetd")}) | ||
| 13674 | The @command{inetd} executable to use. | ||
| 13675 | |||
| 13676 | @item @code{entries} (default: @code{'()}) | ||
| 13677 | A list of @command{inetd} service entries. Each entry should be created by | ||
| 13678 | the @code{inetd-entry} constructor. | ||
| 13679 | @end table | ||
| 13680 | @end deftp | ||
| 13681 | |||
| 13682 | @deftp {Data Type} inetd-entry | ||
| 13683 | Data type representing an entry in the @command{inetd} configuration. Each | ||
| 13684 | entry corresponds to a socket where @command{inetd} will listen for | ||
| 13685 | requests. | ||
| 13686 | |||
| 13687 | @table @asis | ||
| 13688 | @item @code{node} (Vorgabe: @code{#f}) | ||
| 13689 | Optional string, a comma-separated list of local addresses @command{inetd} | ||
| 13690 | should use when listening for this service. @xref{Configuration file,,, | ||
| 13691 | inetutils, GNU Inetutils} for a complete description of all options. | ||
| 13692 | @item @code{name} | ||
| 13693 | A string, the name must correspond to an entry in @code{/etc/services}. | ||
| 13694 | @item @code{socket-type} | ||
| 13695 | One of @code{'stream}, @code{'dgram}, @code{'raw}, @code{'rdm} or | ||
| 13696 | @code{'seqpacket}. | ||
| 13697 | @item @code{protocol} | ||
| 13698 | A string, must correspond to an entry in @code{/etc/protocols}. | ||
| 13699 | @item @code{wait?} (Vorgabe: @code{#t}) | ||
| 13700 | Whether @command{inetd} should wait for the server to exit before listening | ||
| 13701 | to new service requests. | ||
| 13702 | @item @code{user} | ||
| 13703 | A string containing the user (and, optionally, group) name of the user as | ||
| 13704 | whom the server should run. The group name can be specified in a suffix, | ||
| 13705 | separated by a colon or period, i.e.@: @code{"user"}, @code{"user:group"} or | ||
| 13706 | @code{"user.group"}. | ||
| 13707 | @item @code{program} (default: @code{"internal"}) | ||
| 13708 | The server program which will serve the requests, or @code{"internal"} if | ||
| 13709 | @command{inetd} should use a built-in service. | ||
| 13710 | @item @code{arguments} (Vorgabe: @code{'()}) | ||
| 13711 | A list strings or file-like objects, which are the server program's | ||
| 13712 | arguments, starting with the zeroth argument, i.e.@: the name of the program | ||
| 13713 | itself. For @command{inetd}'s internal services, this entry must be | ||
| 13714 | @code{'()} or @code{'("internal")}. | ||
| 13715 | @end table | ||
| 13716 | |||
| 13717 | @xref{Configuration file,,, inetutils, GNU Inetutils} for a more detailed | ||
| 13718 | discussion of each configuration field. | ||
| 13719 | @end deftp | ||
| 13720 | |||
| 13721 | @cindex Tor | ||
| 13722 | @defvr {Scheme Variable} tor-service-type | ||
| 13723 | This is the type for a service that runs the @uref{https://torproject.org, | ||
| 13724 | Tor} anonymous networking daemon. The service is configured using a | ||
| 13725 | @code{<tor-configuration>} record. By default, the Tor daemon runs as the | ||
| 13726 | @code{tor} unprivileged user, which is a member of the @code{tor} group. | ||
| 13727 | |||
| 13728 | @end defvr | ||
| 13729 | |||
| 13730 | @deftp {Datentyp} tor-configuration | ||
| 13731 | @table @asis | ||
| 13732 | @item @code{tor} (Vorgabe: @code{tor}) | ||
| 13733 | The package that provides the Tor daemon. This package is expected to | ||
| 13734 | provide the daemon at @file{bin/tor} relative to its output directory. The | ||
| 13735 | default package is the @uref{https://www.torproject.org, Tor Project's} | ||
| 13736 | implementation. | ||
| 13737 | |||
| 13738 | @item @code{config-file} (Vorgabe: @code{(plain-file "empty" "")}) | ||
| 13739 | The configuration file to use. It will be appended to a default | ||
| 13740 | configuration file, and the final configuration file will be passed to | ||
| 13741 | @code{tor} via its @code{-f} option. This may be any ``file-like'' object | ||
| 13742 | (@pxref{G-Ausdrücke, file-like objects}). See @code{man tor} for details | ||
| 13743 | on the configuration file syntax. | ||
| 13744 | |||
| 13745 | @item @code{hidden-services} (Vorgabe: @code{'()}) | ||
| 13746 | The list of @code{<hidden-service>} records to use. For any hidden service | ||
| 13747 | you include in this list, appropriate configuration to enable the hidden | ||
| 13748 | service will be automatically added to the default configuration file. You | ||
| 13749 | may conveniently create @code{<hidden-service>} records using the | ||
| 13750 | @code{tor-hidden-service} procedure described below. | ||
| 13751 | |||
| 13752 | @item @code{socks-socket-type} (Vorgabe: @code{'tcp}) | ||
| 13753 | The default socket type that Tor should use for its SOCKS socket. This must | ||
| 13754 | be either @code{'tcp} or @code{'unix}. If it is @code{'tcp}, then by | ||
| 13755 | default Tor will listen on TCP port 9050 on the loopback interface (i.e., | ||
| 13756 | localhost). If it is @code{'unix}, then Tor will listen on the UNIX domain | ||
| 13757 | socket @file{/var/run/tor/socks-sock}, which will be made writable by | ||
| 13758 | members of the @code{tor} group. | ||
| 13759 | |||
| 13760 | If you want to customize the SOCKS socket in more detail, leave | ||
| 13761 | @code{socks-socket-type} at its default value of @code{'tcp} and use | ||
| 13762 | @code{config-file} to override the default by providing your own | ||
| 13763 | @code{SocksPort} option. | ||
| 13764 | @end table | ||
| 13765 | @end deftp | ||
| 13766 | |||
| 13767 | @cindex hidden service | ||
| 13768 | @deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} | ||
| 13769 | Define a new Tor @dfn{hidden service} called @var{name} and implementing | ||
| 13770 | @var{mapping}. @var{mapping} is a list of port/host tuples, such as: | ||
| 13771 | |||
| 13772 | @example | ||
| 13773 | '((22 "127.0.0.1:22") | ||
| 13774 | (80 "127.0.0.1:8080")) | ||
| 13775 | @end example | ||
| 13776 | |||
| 13777 | In this example, port 22 of the hidden service is mapped to local port 22, | ||
| 13778 | and port 80 is mapped to local port 8080. | ||
| 13779 | |||
| 13780 | This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, | ||
| 13781 | where the @file{hostname} file contains the @code{.onion} host name for the | ||
| 13782 | hidden service. | ||
| 13783 | |||
| 13784 | See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the | ||
| 13785 | Tor project's documentation} for more information. | ||
| 13786 | @end deffn | ||
| 13787 | |||
| 13788 | The @code{(gnu services rsync)} module provides the following services: | ||
| 13789 | |||
| 13790 | You might want an rsync daemon if you have files that you want available so | ||
| 13791 | anyone (or just yourself) can download existing files or upload new files. | ||
| 13792 | |||
| 13793 | @deffn {Scheme Variable} rsync-service-type | ||
| 13794 | This is the type for the @uref{https://rsync.samba.org, rsync} rsync daemon, | ||
| 13795 | @command{rsync-configuration} record as in this example: | ||
| 13796 | |||
| 13797 | @example | ||
| 13798 | (service rsync-service-type) | ||
| 13799 | @end example | ||
| 13800 | |||
| 13801 | See below for details about @code{rsync-configuration}. | ||
| 13802 | @end deffn | ||
| 13803 | |||
| 13804 | @deftp {Data Type} rsync-configuration | ||
| 13805 | Data type representing the configuration for @code{rsync-service}. | ||
| 13806 | |||
| 13807 | @table @asis | ||
| 13808 | @item @code{package} (default: @var{rsync}) | ||
| 13809 | @code{rsync} package to use. | ||
| 13810 | |||
| 13811 | @item @code{port-number} (default: @code{873}) | ||
| 13812 | TCP port on which @command{rsync} listens for incoming connections. If port | ||
| 13813 | is less than @code{1024} @command{rsync} needs to be started as the | ||
| 13814 | @code{root} user and group. | ||
| 13815 | |||
| 13816 | @item @code{pid-file} (default: @code{"/var/run/rsyncd/rsyncd.pid"}) | ||
| 13817 | Name of the file where @command{rsync} writes its PID. | ||
| 13818 | |||
| 13819 | @item @code{lock-file} (default: @code{"/var/run/rsyncd/rsyncd.lock"}) | ||
| 13820 | Name of the file where @command{rsync} writes its lock file. | ||
| 13821 | |||
| 13822 | @item @code{log-file} (default: @code{"/var/log/rsyncd.log"}) | ||
| 13823 | Name of the file where @command{rsync} writes its log file. | ||
| 13824 | |||
| 13825 | @item @code{use-chroot?} (default: @var{#t}) | ||
| 13826 | Whether to use chroot for @command{rsync} shared directory. | ||
| 13827 | |||
| 13828 | @item @code{share-path} (default: @file{/srv/rsync}) | ||
| 13829 | Location of the @command{rsync} shared directory. | ||
| 13830 | |||
| 13831 | @item @code{share-comment} (default: @code{"Rsync share"}) | ||
| 13832 | Comment of the @command{rsync} shared directory. | ||
| 13833 | |||
| 13834 | @item @code{read-only?} (default: @var{#f}) | ||
| 13835 | Read-write permissions to shared directory. | ||
| 13836 | |||
| 13837 | @item @code{timeout} (default: @code{300}) | ||
| 13838 | I/O timeout in seconds. | ||
| 13839 | |||
| 13840 | @item @code{user} (default: @var{"root"}) | ||
| 13841 | Owner of the @code{rsync} process. | ||
| 13842 | |||
| 13843 | @item @code{group} (default: @var{"root"}) | ||
| 13844 | Group of the @code{rsync} process. | ||
| 13845 | |||
| 13846 | @item @code{uid} (default: @var{"rsyncd"}) | ||
| 13847 | User name or user ID that file transfers to and from that module should take | ||
| 13848 | place as when the daemon was run as @code{root}. | ||
| 13849 | |||
| 13850 | @item @code{gid} (default: @var{"rsyncd"}) | ||
| 13851 | Group name or group ID that will be used when accessing the module. | ||
| 13852 | |||
| 13853 | @end table | ||
| 13854 | @end deftp | ||
| 13855 | |||
| 13856 | Furthermore, @code{(gnu services ssh)} provides the following services. | ||
| 13857 | @cindex SSH | ||
| 13858 | @cindex SSH server | ||
| 13859 | |||
| 13860 | @deffn {Scheme Procedure} lsh-service [#:host-key "/etc/lsh/host-key"] @ | ||
| 13861 | [#:daemonic? #t] [#:interfaces '()] [#:port-number 22] @ | ||
| 13862 | [#:allow-empty-passwords? #f] [#:root-login? #f] @ [#:syslog-output? #t] | ||
| 13863 | [#:x11-forwarding? #t] @ [#:tcp/ip-forwarding? #t] | ||
| 13864 | [#:password-authentication? #t] @ [#:public-key-authentication? #t] | ||
| 13865 | [#:initialize? #t] Run the @command{lshd} program from @var{lsh} to listen | ||
| 13866 | on port @var{port-number}. @var{host-key} must designate a file containing | ||
| 13867 | the host key, and readable only by root. | ||
| 13868 | |||
| 13869 | When @var{daemonic?} is true, @command{lshd} will detach from the | ||
| 13870 | controlling terminal and log its output to syslogd, unless one sets | ||
| 13871 | @var{syslog-output?} to false. Obviously, it also makes lsh-service depend | ||
| 13872 | on existence of syslogd service. When @var{pid-file?} is true, | ||
| 13873 | @command{lshd} writes its PID to the file called @var{pid-file}. | ||
| 13874 | |||
| 13875 | When @var{initialize?} is true, automatically create the seed and host key | ||
| 13876 | upon service activation if they do not exist yet. This may take long and | ||
| 13877 | require interaction. | ||
| 13878 | |||
| 13879 | When @var{initialize?} is false, it is up to the user to initialize the | ||
| 13880 | randomness generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to | ||
| 13881 | create a key pair with the private key stored in file @var{host-key} | ||
| 13882 | (@pxref{lshd basics,,, lsh, LSH Manual}). | ||
| 13883 | |||
| 13884 | When @var{interfaces} is empty, lshd listens for connections on all the | ||
| 13885 | network interfaces; otherwise, @var{interfaces} must be a list of host names | ||
| 13886 | or addresses. | ||
| 13887 | |||
| 13888 | @var{allow-empty-passwords?} specifies whether to accept log-ins with empty | ||
| 13889 | passwords, and @var{root-login?} specifies whether to accept log-ins as | ||
| 13890 | root. | ||
| 13891 | |||
| 13892 | The other options should be self-descriptive. | ||
| 13893 | @end deffn | ||
| 13894 | |||
| 13895 | @cindex SSH | ||
| 13896 | @cindex SSH server | ||
| 13897 | @deffn {Scheme Variable} openssh-service-type | ||
| 13898 | This is the type for the @uref{http://www.openssh.org, OpenSSH} secure shell | ||
| 13899 | daemon, @command{sshd}. Its value must be an @code{openssh-configuration} | ||
| 13900 | record as in this example: | ||
| 13901 | |||
| 13902 | @example | ||
| 13903 | (service openssh-service-type | ||
| 13904 | (openssh-configuration | ||
| 13905 | (x11-forwarding? #t) | ||
| 13906 | (permit-root-login 'without-password) | ||
| 13907 | (authorized-keys | ||
| 13908 | `(("alice" ,(local-file "alice.pub")) | ||
| 13909 | ("bob" ,(local-file "bob.pub")))))) | ||
| 13910 | @end example | ||
| 13911 | |||
| 13912 | See below for details about @code{openssh-configuration}. | ||
| 13913 | |||
| 13914 | This service can be extended with extra authorized keys, as in this example: | ||
| 13915 | |||
| 13916 | @example | ||
| 13917 | (service-extension openssh-service-type | ||
| 13918 | (const `(("charlie" | ||
| 13919 | ,(local-file "charlie.pub"))))) | ||
| 13920 | @end example | ||
| 13921 | @end deffn | ||
| 13922 | |||
| 13923 | @deftp {Data Type} openssh-configuration | ||
| 13924 | This is the configuration record for OpenSSH's @command{sshd}. | ||
| 13925 | |||
| 13926 | @table @asis | ||
| 13927 | @item @code{pid-file} (default: @code{"/var/run/sshd.pid"}) | ||
| 13928 | Name of the file where @command{sshd} writes its PID. | ||
| 13929 | |||
| 13930 | @item @code{port-number} (default: @code{22}) | ||
| 13931 | TCP port on which @command{sshd} listens for incoming connections. | ||
| 13932 | |||
| 13933 | @item @code{permit-root-login} (default: @code{#f}) | ||
| 13934 | This field determines whether and when to allow logins as root. If | ||
| 13935 | @code{#f}, root logins are disallowed; if @code{#t}, they are allowed. If | ||
| 13936 | it's the symbol @code{'without-password}, then root logins are permitted but | ||
| 13937 | not with password-based authentication. | ||
| 13938 | |||
| 13939 | @item @code{allow-empty-passwords?} (default: @code{#f}) | ||
| 13940 | When true, users with empty passwords may log in. When false, they may not. | ||
| 13941 | |||
| 13942 | @item @code{password-authentication?} (default: @code{#t}) | ||
| 13943 | When true, users may log in with their password. When false, they have | ||
| 13944 | other authentication methods. | ||
| 13945 | |||
| 13946 | @item @code{public-key-authentication?} (default: @code{#t}) | ||
| 13947 | When true, users may log in using public key authentication. When false, | ||
| 13948 | users have to use other authentication method. | ||
| 13949 | |||
| 13950 | Authorized public keys are stored in @file{~/.ssh/authorized_keys}. This is | ||
| 13951 | used only by protocol version 2. | ||
| 13952 | |||
| 13953 | @item @code{x11-forwarding?} (default: @code{#f}) | ||
| 13954 | When true, forwarding of X11 graphical client connections is enabled---in | ||
| 13955 | other words, @command{ssh} options @option{-X} and @option{-Y} will work. | ||
| 13956 | |||
| 13957 | @item @code{allow-agent-forwarding?} (Vorgabe: @code{#t}) | ||
| 13958 | Whether to allow agent forwarding. | ||
| 13959 | |||
| 13960 | @item @code{allow-tcp-forwarding?} (Vorgabe: @code{#t}) | ||
| 13961 | Whether to allow TCP forwarding. | ||
| 13962 | |||
| 13963 | @item @code{gateway-ports?} (Vorgabe: @code{#f}) | ||
| 13964 | Whether to allow gateway ports. | ||
| 13965 | |||
| 13966 | @item @code{challenge-response-authentication?} (default: @code{#f}) | ||
| 13967 | Specifies whether challenge response authentication is allowed (e.g.@: via | ||
| 13968 | PAM). | ||
| 13969 | |||
| 13970 | @item @code{use-pam?} (default: @code{#t}) | ||
| 13971 | Enables the Pluggable Authentication Module interface. If set to @code{#t}, | ||
| 13972 | this will enable PAM authentication using | ||
| 13973 | @code{challenge-response-authentication?} and | ||
| 13974 | @code{password-authentication?}, in addition to PAM account and session | ||
| 13975 | module processing for all authentication types. | ||
| 13976 | |||
| 13977 | Because PAM challenge response authentication usually serves an equivalent | ||
| 13978 | role to password authentication, you should disable either | ||
| 13979 | @code{challenge-response-authentication?} or | ||
| 13980 | @code{password-authentication?}. | ||
| 13981 | |||
| 13982 | @item @code{print-last-log?} (default: @code{#t}) | ||
| 13983 | Specifies whether @command{sshd} should print the date and time of the last | ||
| 13984 | user login when a user logs in interactively. | ||
| 13985 | |||
| 13986 | @item @code{subsystems} (default: @code{'(("sftp" "internal-sftp"))}) | ||
| 13987 | Configures external subsystems (e.g.@: file transfer daemon). | ||
| 13988 | |||
| 13989 | This is a list of two-element lists, each of which containing the subsystem | ||
| 13990 | name and a command (with optional arguments) to execute upon subsystem | ||
| 13991 | request. | ||
| 13992 | |||
| 13993 | The command @command{internal-sftp} implements an in-process SFTP server. | ||
| 13994 | Alternately, one can specify the @command{sftp-server} command: | ||
| 13995 | @example | ||
| 13996 | (service openssh-service-type | ||
| 13997 | (openssh-configuration | ||
| 13998 | (subsystems | ||
| 13999 | `(("sftp" ,(file-append openssh "/libexec/sftp-server")))))) | ||
| 14000 | @end example | ||
| 14001 | |||
| 14002 | @item @code{accepted-environment} (default: @code{'()}) | ||
| 14003 | List of strings describing which environment variables may be exported. | ||
| 14004 | |||
| 14005 | Each string gets on its own line. See the @code{AcceptEnv} option in | ||
| 14006 | @code{man sshd_config}. | ||
| 14007 | |||
| 14008 | This example allows ssh-clients to export the @code{COLORTERM} variable. It | ||
| 14009 | is set by terminal emulators, which support colors. You can use it in your | ||
| 14010 | shell's ressource file to enable colors for the prompt and commands if this | ||
| 14011 | variable is set. | ||
| 14012 | |||
| 14013 | @example | ||
| 14014 | (service openssh-service-type | ||
| 14015 | (openssh-configuration | ||
| 14016 | (accepted-environment '("COLORTERM")))) | ||
| 14017 | @end example | ||
| 14018 | |||
| 14019 | @item @code{authorized-keys} (default: @code{'()}) | ||
| 14020 | @cindex authorized keys, SSH | ||
| 14021 | @cindex SSH authorized keys | ||
| 14022 | This is the list of authorized keys. Each element of the list is a user | ||
| 14023 | name followed by one or more file-like objects that represent SSH public | ||
| 14024 | keys. For example: | ||
| 14025 | |||
| 14026 | @example | ||
| 14027 | (openssh-configuration | ||
| 14028 | (authorized-keys | ||
| 14029 | `(("rekado" ,(local-file "rekado.pub")) | ||
| 14030 | ("chris" ,(local-file "chris.pub")) | ||
| 14031 | ("root" ,(local-file "rekado.pub") ,(local-file "chris.pub"))))) | ||
| 14032 | @end example | ||
| 14033 | |||
| 14034 | @noindent | ||
| 14035 | registers the specified public keys for user accounts @code{rekado}, | ||
| 14036 | @code{chris}, and @code{root}. | ||
| 14037 | |||
| 14038 | Additional authorized keys can be specified @i{via} | ||
| 14039 | @code{service-extension}. | ||
| 14040 | |||
| 14041 | Note that this does @emph{not} interfere with the use of | ||
| 14042 | @file{~/.ssh/authorized_keys}. | ||
| 14043 | |||
| 14044 | @item @code{log-level} (Vorgabe: @code{'info}) | ||
| 14045 | This is a symbol specifying the logging level: @code{quiet}, @code{fatal}, | ||
| 14046 | @code{error}, @code{info}, @code{verbose}, @code{debug}, etc. See the man | ||
| 14047 | page for @file{sshd_config} for the full list of level names. | ||
| 14048 | |||
| 14049 | @item @code{extra-content} (Vorgabe: @code{""}) | ||
| 14050 | This field can be used to append arbitrary text to the configuration file. | ||
| 14051 | It is especially useful for elaborate configurations that cannot be | ||
| 14052 | expressed otherwise. This configuration, for example, would generally | ||
| 14053 | disable root logins, but permit them from one specific IP address: | ||
| 14054 | |||
| 14055 | @example | ||
| 14056 | (openssh-configuration | ||
| 14057 | (extra-content "\ | ||
| 14058 | Match Address 192.168.0.1 | ||
| 14059 | PermitRootLogin yes")) | ||
| 14060 | @end example | ||
| 14061 | |||
| 14062 | @end table | ||
| 14063 | @end deftp | ||
| 14064 | |||
| 14065 | @deffn {Scheme Procedure} dropbear-service [@var{config}] | ||
| 14066 | Run the @uref{https://matt.ucc.asn.au/dropbear/dropbear.html,Dropbear SSH | ||
| 14067 | daemon} with the given @var{config}, a @code{<dropbear-configuration>} | ||
| 14068 | object. | ||
| 14069 | |||
| 14070 | For example, to specify a Dropbear service listening on port 1234, add this | ||
| 14071 | call to the operating system's @code{services} field: | ||
| 14072 | |||
| 14073 | @example | ||
| 14074 | (dropbear-service (dropbear-configuration | ||
| 14075 | (port-number 1234))) | ||
| 14076 | @end example | ||
| 14077 | @end deffn | ||
| 14078 | |||
| 14079 | @deftp {Data Type} dropbear-configuration | ||
| 14080 | This data type represents the configuration of a Dropbear SSH daemon. | ||
| 14081 | |||
| 14082 | @table @asis | ||
| 14083 | @item @code{dropbear} (default: @var{dropbear}) | ||
| 14084 | The Dropbear package to use. | ||
| 14085 | |||
| 14086 | @item @code{port-number} (default: 22) | ||
| 14087 | The TCP port where the daemon waits for incoming connections. | ||
| 14088 | |||
| 14089 | @item @code{syslog-output?} (default: @code{#t}) | ||
| 14090 | Whether to enable syslog output. | ||
| 14091 | |||
| 14092 | @item @code{pid-file} (default: @code{"/var/run/dropbear.pid"}) | ||
| 14093 | File name of the daemon's PID file. | ||
| 14094 | |||
| 14095 | @item @code{root-login?} (default: @code{#f}) | ||
| 14096 | Whether to allow @code{root} logins. | ||
| 14097 | |||
| 14098 | @item @code{allow-empty-passwords?} (default: @code{#f}) | ||
| 14099 | Whether to allow empty passwords. | ||
| 14100 | |||
| 14101 | @item @code{password-authentication?} (default: @code{#t}) | ||
| 14102 | Whether to enable password-based authentication. | ||
| 14103 | @end table | ||
| 14104 | @end deftp | ||
| 14105 | |||
| 14106 | @defvr {Scheme Variable} %facebook-host-aliases | ||
| 14107 | This variable contains a string for use in @file{/etc/hosts} (@pxref{Host | ||
| 14108 | Names,,, libc, The GNU C Library Reference Manual}). Each line contains a | ||
| 14109 | entry that maps a known server name of the Facebook on-line service---e.g., | ||
| 14110 | @code{www.facebook.com}---to the local host---@code{127.0.0.1} or its IPv6 | ||
| 14111 | equivalent, @code{::1}. | ||
| 14112 | |||
| 14113 | This variable is typically used in the @code{hosts-file} field of an | ||
| 14114 | @code{operating-system} declaration (@pxref{»operating-system«-Referenz, | ||
| 14115 | @file{/etc/hosts}}): | ||
| 14116 | |||
| 14117 | @example | ||
| 14118 | (use-modules (gnu) (guix)) | ||
| 14119 | |||
| 14120 | (operating-system | ||
| 14121 | (host-name "mymachine") | ||
| 14122 | ;; ... | ||
| 14123 | (hosts-file | ||
| 14124 | ;; Create a /etc/hosts file with aliases for "localhost" | ||
| 14125 | ;; and "mymachine", as well as for Facebook servers. | ||
| 14126 | (plain-file "hosts" | ||
| 14127 | (string-append (local-host-aliases host-name) | ||
| 14128 | %facebook-host-aliases)))) | ||
| 14129 | @end example | ||
| 14130 | |||
| 14131 | This mechanism can prevent programs running locally, such as Web browsers, | ||
| 14132 | from accessing Facebook. | ||
| 14133 | @end defvr | ||
| 14134 | |||
| 14135 | The @code{(gnu services avahi)} provides the following definition. | ||
| 14136 | |||
| 14137 | @defvr {Scheme-Variable} avahi-service-type | ||
| 14138 | This is the service that runs @command{avahi-daemon}, a system-wide | ||
| 14139 | mDNS/DNS-SD responder that allows for service discovery and | ||
| 14140 | ``zero-configuration'' host name lookups (see @uref{http://avahi.org/}). | ||
| 14141 | Its value must be a @code{zero-configuration} record---see below. | ||
| 14142 | |||
| 14143 | This service extends the name service cache daemon (nscd) so that it can | ||
| 14144 | resolve @code{.local} host names using | ||
| 14145 | @uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. @xref{Name Service Switch}, for information on host name resolution. | ||
| 14146 | |||
| 14147 | Additionally, add the @var{avahi} package to the system profile so that | ||
| 14148 | commands such as @command{avahi-browse} are directly usable. | ||
| 14149 | @end defvr | ||
| 14150 | |||
| 14151 | @deftp {Datentyp} avahi-configuration | ||
| 14152 | Dieser Datentyp repräsentiert die Konfiguration von Avahi. | ||
| 14153 | |||
| 14154 | @table @asis | ||
| 14155 | |||
| 14156 | @item @code{host-name} (Vorgabe: @code{#f}) | ||
| 14157 | If different from @code{#f}, use that as the host name to publish for this | ||
| 14158 | machine; otherwise, use the machine's actual host name. | ||
| 14159 | |||
| 14160 | @item @code{publish?} (Vorgabe: @code{#t}) | ||
| 14161 | When true, allow host names and services to be published (broadcast) over | ||
| 14162 | the network. | ||
| 14163 | |||
| 14164 | @item @code{publish-workstation?} (Vorgabe: @code{#t}) | ||
| 14165 | When true, @command{avahi-daemon} publishes the machine's host name and IP | ||
| 14166 | address via mDNS on the local network. To view the host names published on | ||
| 14167 | your local network, you can run: | ||
| 14168 | |||
| 14169 | @example | ||
| 14170 | avahi-browse _workstation._tcp | ||
| 14171 | @end example | ||
| 14172 | |||
| 14173 | @item @code{wide-area?} (Vorgabe: @code{#f}) | ||
| 14174 | When true, DNS-SD over unicast DNS is enabled. | ||
| 14175 | |||
| 14176 | @item @code{ipv4?} (Vorgabe: @code{#t}) | ||
| 14177 | @itemx @code{ipv6?} (Vorgabe: @code{#t}) | ||
| 14178 | These fields determine whether to use IPv4/IPv6 sockets. | ||
| 14179 | |||
| 14180 | @item @code{domains-to-browse} (Vorgabe: @code{'()}) | ||
| 14181 | This is a list of domains to browse. | ||
| 14182 | @end table | ||
| 14183 | @end deftp | ||
| 14184 | |||
| 14185 | @deffn {Scheme Variable} openvswitch-service-type | ||
| 14186 | This is the type of the @uref{http://www.openvswitch.org, Open vSwitch} | ||
| 14187 | service, whose value should be an @code{openvswitch-configuration} object. | ||
| 14188 | @end deffn | ||
| 14189 | |||
| 14190 | @deftp {Data Type} openvswitch-configuration | ||
| 14191 | Data type representing the configuration of Open vSwitch, a multilayer | ||
| 14192 | virtual switch which is designed to enable massive network automation | ||
| 14193 | through programmatic extension. | ||
| 14194 | |||
| 14195 | @table @asis | ||
| 14196 | @item @code{package} (default: @var{openvswitch}) | ||
| 14197 | Package object of the Open vSwitch. | ||
| 14198 | |||
| 14199 | @end table | ||
| 14200 | @end deftp | ||
| 14201 | |||
| 14202 | @node X Window | ||
| 14203 | @subsection X Window | ||
| 14204 | |||
| 14205 | @cindex X11 | ||
| 14206 | @cindex X Window System | ||
| 14207 | @cindex login manager | ||
| 14208 | Support for the X Window graphical display system---specifically Xorg---is | ||
| 14209 | provided by the @code{(gnu services xorg)} module. Note that there is no | ||
| 14210 | @code{xorg-service} procedure. Instead, the X server is started by the | ||
| 14211 | @dfn{login manager}, by default the GNOME Display Manager (GDM). | ||
| 14212 | |||
| 14213 | @cindex GDM | ||
| 14214 | @cindex GNOME, login manager | ||
| 14215 | GDM of course allows users to log in into window managers and desktop | ||
| 14216 | environments other than GNOME; for those using GNOME, GDM is required for | ||
| 14217 | features such as automatic screen locking. | ||
| 14218 | |||
| 14219 | @cindex window manager | ||
| 14220 | To use X11, you must install at least one @dfn{window manager}---for example | ||
| 14221 | the @code{windowmaker} or @code{openbox} packages---preferably by adding it | ||
| 14222 | to the @code{packages} field of your operating system definition | ||
| 14223 | (@pxref{»operating-system«-Referenz, system-wide packages}). | ||
| 14224 | |||
| 14225 | @defvr {Scheme-Variable} gdm-service-type | ||
| 14226 | This is the type for the @uref{https://wiki.gnome.org/Projects/GDM/, GNOME | ||
| 14227 | Desktop Manager} (GDM), a program that manages graphical display servers and | ||
| 14228 | handles graphical user logins. Its value must be a @code{gdm-configuration} | ||
| 14229 | (see below.) | ||
| 14230 | |||
| 14231 | @cindex session types (X11) | ||
| 14232 | @cindex X11 session types | ||
| 14233 | GDM looks for @dfn{session types} described by the @file{.desktop} files in | ||
| 14234 | @file{/run/current-system/profile/share/xsessions} and allows users to | ||
| 14235 | choose a session from the log-in screen. Packages such as @code{gnome}, | ||
| 14236 | @code{xfce}, and @code{i3} provide @file{.desktop} files; adding them to the | ||
| 14237 | system-wide set of packages automatically makes them available at the log-in | ||
| 14238 | screen. | ||
| 14239 | |||
| 14240 | In addition, @file{~/.xsession} files are honored. When available, | ||
| 14241 | @file{~/.xsession} must be an executable that starts a window manager and/or | ||
| 14242 | other X clients. | ||
| 14243 | @end defvr | ||
| 14244 | |||
| 14245 | @deftp {Datentyp} gdm-configuration | ||
| 14246 | @table @asis | ||
| 14247 | @item @code{auto-login?} (default: @code{#f}) | ||
| 14248 | @itemx @code{default-user} (Vorgabe: @code{#f}) | ||
| 14249 | When @code{auto-login?} is false, GDM presents a log-in screen. | ||
| 14250 | |||
| 14251 | When @code{auto-login?} is true, GDM logs in directly as | ||
| 14252 | @code{default-user}. | ||
| 14253 | |||
| 14254 | @item @code{gnome-shell-assets} (Vorgabe: …) | ||
| 14255 | List of GNOME Shell assets needed by GDM: icon theme, fonts, etc. | ||
| 14256 | |||
| 14257 | @item @code{xorg-configuration} (Vorgabe: @code{(xorg-configuration)}) | ||
| 14258 | Xorg-Server für grafische Oberflächen konfigurieren. | ||
| 14259 | |||
| 14260 | @item @code{xsession} (Vorgabe: @code{(xinitrc)}) | ||
| 14261 | Script to run before starting a X session. | ||
| 14262 | |||
| 14263 | @item @code{dbus-daemon} (Vorgabe: @code{dbus-daemon-wrapper}) | ||
| 14264 | File name of the @code{dbus-daemon} executable. | ||
| 14265 | |||
| 14266 | @item @code{gdm} (Vorgabe: @code{gdm}) | ||
| 14267 | Das GDM-Paket, was benutzt werden soll. | ||
| 14268 | @end table | ||
| 14269 | @end deftp | ||
| 14270 | |||
| 14271 | @defvr {Scheme Variable} slim-service-type | ||
| 14272 | This is the type for the SLiM graphical login manager for X11. | ||
| 14273 | |||
| 14274 | Like GDM, SLiM looks for session types described by @file{.desktop} files | ||
| 14275 | and allows users to choose a session from the log-in screen using @kbd{F1}. | ||
| 14276 | It also honors @file{~/.xsession} files. | ||
| 14277 | @end defvr | ||
| 14278 | |||
| 14279 | @deftp {Data Type} slim-configuration | ||
| 14280 | Data type representing the configuration of @code{slim-service-type}. | ||
| 14281 | |||
| 14282 | @table @asis | ||
| 14283 | @item @code{allow-empty-passwords?} (Vorgabe: @code{#t}) | ||
| 14284 | Whether to allow logins with empty passwords. | ||
| 14285 | |||
| 14286 | @item @code{auto-login?} (default: @code{#f}) | ||
| 14287 | @itemx @code{default-user} (default: @code{""}) | ||
| 14288 | When @code{auto-login?} is false, SLiM presents a log-in screen. | ||
| 14289 | |||
| 14290 | When @code{auto-login?} is true, SLiM logs in directly as | ||
| 14291 | @code{default-user}. | ||
| 14292 | |||
| 14293 | @item @code{theme} (default: @code{%default-slim-theme}) | ||
| 14294 | @itemx @code{theme-name} (default: @code{%default-slim-theme-name}) | ||
| 14295 | The graphical theme to use and its name. | ||
| 14296 | |||
| 14297 | @item @code{auto-login-session} (default: @code{#f}) | ||
| 14298 | If true, this must be the name of the executable to start as the default | ||
| 14299 | session---e.g., @code{(file-append windowmaker "/bin/windowmaker")}. | ||
| 14300 | |||
| 14301 | If false, a session described by one of the available @file{.desktop} files | ||
| 14302 | in @code{/run/current-system/profile} and @code{~/.guix-profile} will be | ||
| 14303 | used. | ||
| 14304 | |||
| 14305 | @quotation Anmerkung | ||
| 14306 | You must install at least one window manager in the system profile or in | ||
| 14307 | your user profile. Failing to do that, if @code{auto-login-session} is | ||
| 14308 | false, you will be unable to log in. | ||
| 14309 | @end quotation | ||
| 14310 | |||
| 14311 | @item @code{xorg-configuration} (Vorgabe: @code{(xorg-configuration)}) | ||
| 14312 | Xorg-Server für grafische Oberflächen konfigurieren. | ||
| 14313 | |||
| 14314 | @item @code{xauth} (default: @code{xauth}) | ||
| 14315 | The XAuth package to use. | ||
| 14316 | |||
| 14317 | @item @code{shepherd} (default: @code{shepherd}) | ||
| 14318 | The Shepherd package used when invoking @command{halt} and @command{reboot}. | ||
| 14319 | |||
| 14320 | @item @code{sessreg} (default: @code{sessreg}) | ||
| 14321 | The sessreg package used in order to register the session. | ||
| 14322 | |||
| 14323 | @item @code{slim} (default: @code{slim}) | ||
| 14324 | The SLiM package to use. | ||
| 14325 | @end table | ||
| 14326 | @end deftp | ||
| 14327 | |||
| 14328 | @defvr {Scheme Variable} %default-theme | ||
| 14329 | @defvrx {Scheme Variable} %default-theme-name | ||
| 14330 | The default SLiM theme and its name. | ||
| 14331 | @end defvr | ||
| 14332 | |||
| 14333 | |||
| 14334 | @deftp {Data Type} sddm-configuration | ||
| 14335 | This is the data type representing the sddm service configuration. | ||
| 14336 | |||
| 14337 | @table @asis | ||
| 14338 | @item @code{display-server} (default: "x11") | ||
| 14339 | Select display server to use for the greeter. Valid values are "x11" or | ||
| 14340 | "wayland". | ||
| 14341 | |||
| 14342 | @item @code{numlock} (default: "on") | ||
| 14343 | Valid values are "on", "off" or "none". | ||
| 14344 | |||
| 14345 | @item @code{halt-command} (default @code{#~(string-apppend #$shepherd "/sbin/halt")}) | ||
| 14346 | Command to run when halting. | ||
| 14347 | |||
| 14348 | @item @code{reboot-command} (default @code{#~(string-append #$shepherd "/sbin/reboot")}) | ||
| 14349 | Command to run when rebooting. | ||
| 14350 | |||
| 14351 | @item @code{theme} (default "maldives") | ||
| 14352 | Theme to use. Default themes provided by SDDM are "elarun" or "maldives". | ||
| 14353 | |||
| 14354 | @item @code{themes-directory} (default "/run/current-system/profile/share/sddm/themes") | ||
| 14355 | Directory to look for themes. | ||
| 14356 | |||
| 14357 | @item @code{faces-directory} (default "/run/current-system/profile/share/sddm/faces") | ||
| 14358 | Directory to look for faces. | ||
| 14359 | |||
| 14360 | @item @code{default-path} (default "/run/current-system/profile/bin") | ||
| 14361 | Default PATH to use. | ||
| 14362 | |||
| 14363 | @item @code{minimum-uid} (default 1000) | ||
| 14364 | Minimum UID to display in SDDM. | ||
| 14365 | |||
| 14366 | @item @code{maximum-uid} (default 2000) | ||
| 14367 | Maximum UID to display in SDDM | ||
| 14368 | |||
| 14369 | @item @code{remember-last-user?} (default #t) | ||
| 14370 | Remember last user. | ||
| 14371 | |||
| 14372 | @item @code{remember-last-session?} (default #t) | ||
| 14373 | Remember last session. | ||
| 14374 | |||
| 14375 | @item @code{hide-users} (default "") | ||
| 14376 | Usernames to hide from SDDM greeter. | ||
| 14377 | |||
| 14378 | @item @code{hide-shells} (default @code{#~(string-append #$shadow "/sbin/nologin")}) | ||
| 14379 | Users with shells listed will be hidden from the SDDM greeter. | ||
| 14380 | |||
| 14381 | @item @code{session-command} (default @code{#~(string-append #$sddm "/share/sddm/scripts/wayland-session")}) | ||
| 14382 | Script to run before starting a wayland session. | ||
| 14383 | |||
| 14384 | @item @code{sessions-directory} (default "/run/current-system/profile/share/wayland-sessions") | ||
| 14385 | Directory to look for desktop files starting wayland sessions. | ||
| 14386 | |||
| 14387 | @item @code{xorg-configuration} (Vorgabe: @code{(xorg-configuration)}) | ||
| 14388 | Xorg-Server für grafische Oberflächen konfigurieren. | ||
| 14389 | |||
| 14390 | @item @code{xauth-path} (default @code{#~(string-append #$xauth "/bin/xauth")}) | ||
| 14391 | Path to xauth. | ||
| 14392 | |||
| 14393 | @item @code{xephyr-path} (default @code{#~(string-append #$xorg-server "/bin/Xephyr")}) | ||
| 14394 | Path to Xephyr. | ||
| 14395 | |||
| 14396 | @item @code{xdisplay-start} (default @code{#~(string-append #$sddm "/share/sddm/scripts/Xsetup")}) | ||
| 14397 | Script to run after starting xorg-server. | ||
| 14398 | |||
| 14399 | @item @code{xdisplay-stop} (default @code{#~(string-append #$sddm "/share/sddm/scripts/Xstop")}) | ||
| 14400 | Script to run before stopping xorg-server. | ||
| 14401 | |||
| 14402 | @item @code{xsession-command} (Vorgabe: @code{xinitrc}) | ||
| 14403 | Script to run before starting a X session. | ||
| 14404 | |||
| 14405 | @item @code{xsessions-directory} (default: "/run/current-system/profile/share/xsessions") | ||
| 14406 | Directory to look for desktop files starting X sessions. | ||
| 14407 | |||
| 14408 | @item @code{minimum-vt} (default: 7) | ||
| 14409 | Minimum VT to use. | ||
| 14410 | |||
| 14411 | @item @code{auto-login-user} (default "") | ||
| 14412 | User to use for auto-login. | ||
| 14413 | |||
| 14414 | @item @code{auto-login-session} (default "") | ||
| 14415 | Desktop file to use for auto-login. | ||
| 14416 | |||
| 14417 | @item @code{relogin?} (default #f) | ||
| 14418 | Relogin after logout. | ||
| 14419 | |||
| 14420 | @end table | ||
| 14421 | @end deftp | ||
| 14422 | |||
| 14423 | @cindex login manager | ||
| 14424 | @cindex X11 login | ||
| 14425 | @deffn {Scheme Procedure} sddm-service config | ||
| 14426 | Return a service that spawns the SDDM graphical login manager for config of | ||
| 14427 | type @code{<sddm-configuration>}. | ||
| 14428 | |||
| 14429 | @example | ||
| 14430 | (sddm-service (sddm-configuration | ||
| 14431 | (auto-login-user "Alice") | ||
| 14432 | (auto-login-session "xfce.desktop"))) | ||
| 14433 | @end example | ||
| 14434 | @end deffn | ||
| 14435 | |||
| 14436 | @cindex Xorg, Konfiguration | ||
| 14437 | @deftp {Datentyp} xorg-configuration | ||
| 14438 | This data type represents the configuration of the Xorg graphical display | ||
| 14439 | server. Note that there is not Xorg service; instead, the X server is | ||
| 14440 | started by a ``display manager'' such as GDM, SDDM, and SLiM. Thus, the | ||
| 14441 | configuration of these display managers aggregates an | ||
| 14442 | @code{xorg-configuration} record. | ||
| 14443 | |||
| 14444 | @table @asis | ||
| 14445 | @item @code{modules} (Vorgabe: @code{%default-xorg-modules}) | ||
| 14446 | This is a list of @dfn{module packages} loaded by the Xorg server---e.g., | ||
| 14447 | @code{xf86-video-vesa}, @code{xf86-input-keyboard}, and so on. | ||
| 14448 | |||
| 14449 | @item @code{fonts} (Vorgabe: @code{%default-xorg-fonts}) | ||
| 14450 | This is a list of font directories to add to the server's @dfn{font path}. | ||
| 14451 | |||
| 14452 | @item @code{drivers} (Vorgabe: @code{'()}) | ||
| 14453 | This must be either the empty list, in which case Xorg chooses a graphics | ||
| 14454 | driver automatically, or a list of driver names that will be tried in this | ||
| 14455 | order---e.g., @code{("modesetting" "vesa")}. | ||
| 14456 | |||
| 14457 | @item @code{resolutions} (Vorgabe: @code{'()}) | ||
| 14458 | When @code{resolutions} is the empty list, Xorg chooses an appropriate | ||
| 14459 | screen resolution. Otherwise, it must be a list of resolutions---e.g., | ||
| 14460 | @code{((1024 768) (640 480))}. | ||
| 14461 | |||
| 14462 | @cindex Tastaturbelegung, für Xorg | ||
| 14463 | @cindex keymap, for Xorg | ||
| 14464 | @item @code{keyboard-layout} (Vorgabe: @code{#f}) | ||
| 14465 | If this is @code{#f}, Xorg uses the default keyboard layout---usually US | ||
| 14466 | English (``qwerty'') for a 105-key PC keyboard. | ||
| 14467 | |||
| 14468 | Otherwise this must be a @code{keyboard-layout} object specifying the | ||
| 14469 | keyboard layout in use when Xorg is running. @xref{Tastaturbelegung}, for | ||
| 14470 | more information on how to specify the keyboard layout. | ||
| 14471 | |||
| 14472 | @item @code{extra-config} (Vorgabe: @code{'()}) | ||
| 14473 | This is a list of strings or objects appended to the configuration file. It | ||
| 14474 | is used to pass extra text to be added verbatim to the configuration file. | ||
| 14475 | |||
| 14476 | @item @code{server} (Vorgabe: @code{xorg-server}) | ||
| 14477 | This is the package providing the Xorg server. | ||
| 14478 | |||
| 14479 | @item @code{server-arguments} (Vorgabe: @code{%default-xorg-server-arguments}) | ||
| 14480 | This is the list of command-line arguments to pass to the X server. The | ||
| 14481 | default is @code{-nolisten tcp}. | ||
| 14482 | @end table | ||
| 14483 | @end deftp | ||
| 14484 | |||
| 14485 | @deffn {Scheme-Prozedur} set-xorg-configuration @var{Konfiguration} @ | ||
| 14486 | [@var{login-manager-service-type}] Tell the log-in manager (of type | ||
| 14487 | @var{login-manager-service-type}) to use @var{config}, an | ||
| 14488 | <xorg-configuration> record. | ||
| 14489 | |||
| 14490 | Since the Xorg configuration is embedded in the log-in manager's | ||
| 14491 | configuration---e.g., @code{gdm-configuration}---this procedure provides a | ||
| 14492 | shorthand to set the Xorg configuration. | ||
| 14493 | @end deffn | ||
| 14494 | |||
| 14495 | @deffn {Scheme-Prozedur} xorg-start-command [@var{Konfiguration}] | ||
| 14496 | Return a @code{startx} script in which the modules, fonts, etc. specified in | ||
| 14497 | @var{config}, are available. The result should be used in place of | ||
| 14498 | @code{startx}. | ||
| 14499 | |||
| 14500 | Usually the X server is started by a login manager. | ||
| 14501 | @end deffn | ||
| 14502 | |||
| 14503 | |||
| 14504 | @deffn {Scheme Procedure} screen-locker-service @var{package} [@var{program}] | ||
| 14505 | Add @var{package}, a package for a screen locker or screen saver whose | ||
| 14506 | command is @var{program}, to the set of setuid programs and add a PAM entry | ||
| 14507 | for it. For example: | ||
| 14508 | |||
| 14509 | @lisp | ||
| 14510 | (screen-locker-service xlockmore "xlock") | ||
| 14511 | @end lisp | ||
| 14512 | |||
| 14513 | makes the good ol' XlockMore usable. | ||
| 14514 | @end deffn | ||
| 14515 | |||
| 14516 | |||
| 14517 | @node Druckdienste | ||
| 14518 | @subsection Druckdienste | ||
| 14519 | |||
| 14520 | @cindex printer support with CUPS | ||
| 14521 | Das Modul @code{(gnu services cups)} stellt eine Guix-Dienstdefinition für | ||
| 14522 | den CUPS-Druckdienst zur Verfügung. Wenn Sie Druckerunterstützung zu einem | ||
| 14523 | Guix-System hinzufügen möchten, dann fügen Sie einen | ||
| 14524 | @code{cups-service}-Dienst in die Betriebssystemdefinition ein. | ||
| 14525 | |||
| 14526 | @deffn {Scheme Variable} cups-service-type | ||
| 14527 | The service type for the CUPS print server. Its value should be a valid | ||
| 14528 | CUPS configuration (see below). To use the default settings, simply write: | ||
| 14529 | @example | ||
| 14530 | (service cups-service-type) | ||
| 14531 | @end example | ||
| 14532 | @end deffn | ||
| 14533 | |||
| 14534 | The CUPS configuration controls the basic things about your CUPS | ||
| 14535 | installation: what interfaces it listens on, what to do if a print job | ||
| 14536 | fails, how much logging to do, and so on. To actually add a printer, you | ||
| 14537 | have to visit the @url{http://localhost:631} URL, or use a tool such as | ||
| 14538 | GNOME's printer configuration services. By default, configuring a CUPS | ||
| 14539 | service will generate a self-signed certificate if needed, for secure | ||
| 14540 | connections to the print server. | ||
| 14541 | |||
| 14542 | Suppose you want to enable the Web interface of CUPS and also add support | ||
| 14543 | for Epson printers @i{via} the @code{escpr} package and for HP printers | ||
| 14544 | @i{via} the @code{hplip-minimal} package. You can do that directly, like | ||
| 14545 | this (you need to use the @code{(gnu packages cups)} module): | ||
| 14546 | |||
| 14547 | @example | ||
| 14548 | (service cups-service-type | ||
| 14549 | (cups-configuration | ||
| 14550 | (web-interface? #t) | ||
| 14551 | (extensions | ||
| 14552 | (list cups-filters escpr hplip-minimal)))) | ||
| 14553 | @end example | ||
| 14554 | |||
| 14555 | Note: If you wish to use the Qt5 based GUI which comes with the hplip | ||
| 14556 | package then it is suggested that you install the @code{hplip} package, | ||
| 14557 | either in your OS configuration file or as your user. | ||
| 14558 | |||
| 14559 | The available configuration parameters follow. Each parameter definition is | ||
| 14560 | preceded by its type; for example, @samp{string-list foo} indicates that the | ||
| 14561 | @code{foo} parameter should be specified as a list of strings. There is | ||
| 14562 | also a way to specify the configuration as a string, if you have an old | ||
| 14563 | @code{cupsd.conf} file that you want to port over from some other system; | ||
| 14564 | see the end for more details. | ||
| 14565 | |||
| 14566 | @c The following documentation was initially generated by | ||
| 14567 | @c (generate-documentation) in (gnu services cups). Manually maintained | ||
| 14568 | @c documentation is better, so we shouldn't hesitate to edit below as | ||
| 14569 | @c needed. However if the change you want to make to this documentation | ||
| 14570 | @c can be done in an automated way, it's probably easier to change | ||
| 14571 | @c (generate-documentation) than to make it below and have to deal with | ||
| 14572 | @c the churn as CUPS updates. | ||
| 14573 | |||
| 14574 | |||
| 14575 | Available @code{cups-configuration} fields are: | ||
| 14576 | |||
| 14577 | @deftypevr {@code{cups-configuration} parameter} package cups | ||
| 14578 | The CUPS package. | ||
| 14579 | @end deftypevr | ||
| 14580 | |||
| 14581 | @deftypevr {@code{cups-configuration} parameter} package-list extensions | ||
| 14582 | Drivers and other extensions to the CUPS package. | ||
| 14583 | @end deftypevr | ||
| 14584 | |||
| 14585 | @deftypevr {@code{cups-configuration} parameter} files-configuration files-configuration | ||
| 14586 | Configuration of where to write logs, what directories to use for print | ||
| 14587 | spools, and related privileged configuration parameters. | ||
| 14588 | |||
| 14589 | Available @code{files-configuration} fields are: | ||
| 14590 | |||
| 14591 | @deftypevr {@code{files-configuration} parameter} log-location access-log | ||
| 14592 | Defines the access log filename. Specifying a blank filename disables | ||
| 14593 | access log generation. The value @code{stderr} causes log entries to be | ||
| 14594 | sent to the standard error file when the scheduler is running in the | ||
| 14595 | foreground, or to the system log daemon when run in the background. The | ||
| 14596 | value @code{syslog} causes log entries to be sent to the system log daemon. | ||
| 14597 | The server name may be included in filenames using the string @code{%s}, as | ||
| 14598 | in @code{/var/log/cups/%s-access_log}. | ||
| 14599 | |||
| 14600 | Defaults to @samp{"/var/log/cups/access_log"}. | ||
| 14601 | @end deftypevr | ||
| 14602 | |||
| 14603 | @deftypevr {@code{files-configuration} parameter} file-name cache-dir | ||
| 14604 | Where CUPS should cache data. | ||
| 14605 | |||
| 14606 | Defaults to @samp{"/var/cache/cups"}. | ||
| 14607 | @end deftypevr | ||
| 14608 | |||
| 14609 | @deftypevr {@code{files-configuration} parameter} string config-file-perm | ||
| 14610 | Specifies the permissions for all configuration files that the scheduler | ||
| 14611 | writes. | ||
| 14612 | |||
| 14613 | Note that the permissions for the printers.conf file are currently masked to | ||
| 14614 | only allow access from the scheduler user (typically root). This is done | ||
| 14615 | because printer device URIs sometimes contain sensitive authentication | ||
| 14616 | information that should not be generally known on the system. There is no | ||
| 14617 | way to disable this security feature. | ||
| 14618 | |||
| 14619 | Defaults to @samp{"0640"}. | ||
| 14620 | @end deftypevr | ||
| 14621 | |||
| 14622 | @deftypevr {@code{files-configuration} parameter} log-location error-log | ||
| 14623 | Defines the error log filename. Specifying a blank filename disables access | ||
| 14624 | log generation. The value @code{stderr} causes log entries to be sent to | ||
| 14625 | the standard error file when the scheduler is running in the foreground, or | ||
| 14626 | to the system log daemon when run in the background. The value | ||
| 14627 | @code{syslog} causes log entries to be sent to the system log daemon. The | ||
| 14628 | server name may be included in filenames using the string @code{%s}, as in | ||
| 14629 | @code{/var/log/cups/%s-error_log}. | ||
| 14630 | |||
| 14631 | Defaults to @samp{"/var/log/cups/error_log"}. | ||
| 14632 | @end deftypevr | ||
| 14633 | |||
| 14634 | @deftypevr {@code{files-configuration} parameter} string fatal-errors | ||
| 14635 | Specifies which errors are fatal, causing the scheduler to exit. The kind | ||
| 14636 | strings are: | ||
| 14637 | |||
| 14638 | @table @code | ||
| 14639 | @item none | ||
| 14640 | No errors are fatal. | ||
| 14641 | |||
| 14642 | @item all | ||
| 14643 | All of the errors below are fatal. | ||
| 14644 | |||
| 14645 | @item browse | ||
| 14646 | Browsing initialization errors are fatal, for example failed connections to | ||
| 14647 | the DNS-SD daemon. | ||
| 14648 | |||
| 14649 | @item config | ||
| 14650 | Configuration file syntax errors are fatal. | ||
| 14651 | |||
| 14652 | @item listen | ||
| 14653 | Listen or Port errors are fatal, except for IPv6 failures on the loopback or | ||
| 14654 | @code{any} addresses. | ||
| 14655 | |||
| 14656 | @item log | ||
| 14657 | Log file creation or write errors are fatal. | ||
| 14658 | |||
| 14659 | @item permissions | ||
| 14660 | Bad startup file permissions are fatal, for example shared TLS certificate | ||
| 14661 | and key files with world-read permissions. | ||
| 14662 | @end table | ||
| 14663 | |||
| 14664 | Defaults to @samp{"all -browse"}. | ||
| 14665 | @end deftypevr | ||
| 14666 | |||
| 14667 | @deftypevr {@code{files-configuration} parameter} boolean file-device? | ||
| 14668 | Specifies whether the file pseudo-device can be used for new printer | ||
| 14669 | queues. The URI @uref{file:///dev/null} is always allowed. | ||
| 14670 | |||
| 14671 | Defaults to @samp{#f}. | ||
| 14672 | @end deftypevr | ||
| 14673 | |||
| 14674 | @deftypevr {@code{files-configuration} parameter} string group | ||
| 14675 | Specifies the group name or ID that will be used when executing external | ||
| 14676 | programs. | ||
| 14677 | |||
| 14678 | Defaults to @samp{"lp"}. | ||
| 14679 | @end deftypevr | ||
| 14680 | |||
| 14681 | @deftypevr {@code{files-configuration} parameter} string log-file-perm | ||
| 14682 | Specifies the permissions for all log files that the scheduler writes. | ||
| 14683 | |||
| 14684 | Defaults to @samp{"0644"}. | ||
| 14685 | @end deftypevr | ||
| 14686 | |||
| 14687 | @deftypevr {@code{files-configuration} parameter} log-location page-log | ||
| 14688 | Defines the page log filename. Specifying a blank filename disables access | ||
| 14689 | log generation. The value @code{stderr} causes log entries to be sent to | ||
| 14690 | the standard error file when the scheduler is running in the foreground, or | ||
| 14691 | to the system log daemon when run in the background. The value | ||
| 14692 | @code{syslog} causes log entries to be sent to the system log daemon. The | ||
| 14693 | server name may be included in filenames using the string @code{%s}, as in | ||
| 14694 | @code{/var/log/cups/%s-page_log}. | ||
| 14695 | |||
| 14696 | Defaults to @samp{"/var/log/cups/page_log"}. | ||
| 14697 | @end deftypevr | ||
| 14698 | |||
| 14699 | @deftypevr {@code{files-configuration} parameter} string remote-root | ||
| 14700 | Specifies the username that is associated with unauthenticated accesses by | ||
| 14701 | clients claiming to be the root user. The default is @code{remroot}. | ||
| 14702 | |||
| 14703 | Defaults to @samp{"remroot"}. | ||
| 14704 | @end deftypevr | ||
| 14705 | |||
| 14706 | @deftypevr {@code{files-configuration} parameter} file-name request-root | ||
| 14707 | Specifies the directory that contains print jobs and other HTTP request | ||
| 14708 | data. | ||
| 14709 | |||
| 14710 | Defaults to @samp{"/var/spool/cups"}. | ||
| 14711 | @end deftypevr | ||
| 14712 | |||
| 14713 | @deftypevr {@code{files-configuration} parameter} sandboxing sandboxing | ||
| 14714 | Specifies the level of security sandboxing that is applied to print filters, | ||
| 14715 | backends, and other child processes of the scheduler; either @code{relaxed} | ||
| 14716 | or @code{strict}. This directive is currently only used/supported on macOS. | ||
| 14717 | |||
| 14718 | Defaults to @samp{strict}. | ||
| 14719 | @end deftypevr | ||
| 14720 | |||
| 14721 | @deftypevr {@code{files-configuration} parameter} file-name server-keychain | ||
| 14722 | Specifies the location of TLS certificates and private keys. CUPS will look | ||
| 14723 | for public and private keys in this directory: a @code{.crt} files for | ||
| 14724 | PEM-encoded certificates and corresponding @code{.key} files for PEM-encoded | ||
| 14725 | private keys. | ||
| 14726 | |||
| 14727 | Defaults to @samp{"/etc/cups/ssl"}. | ||
| 14728 | @end deftypevr | ||
| 14729 | |||
| 14730 | @deftypevr {@code{files-configuration} parameter} file-name server-root | ||
| 14731 | Specifies the directory containing the server configuration files. | ||
| 14732 | |||
| 14733 | Defaults to @samp{"/etc/cups"}. | ||
| 14734 | @end deftypevr | ||
| 14735 | |||
| 14736 | @deftypevr {@code{files-configuration} parameter} boolean sync-on-close? | ||
| 14737 | Specifies whether the scheduler calls fsync(2) after writing configuration | ||
| 14738 | or state files. | ||
| 14739 | |||
| 14740 | Defaults to @samp{#f}. | ||
| 14741 | @end deftypevr | ||
| 14742 | |||
| 14743 | @deftypevr {@code{files-configuration} parameter} space-separated-string-list system-group | ||
| 14744 | Specifies the group(s) to use for @code{@@SYSTEM} group authentication. | ||
| 14745 | @end deftypevr | ||
| 14746 | |||
| 14747 | @deftypevr {@code{files-configuration} parameter} file-name temp-dir | ||
| 14748 | Specifies the directory where temporary files are stored. | ||
| 14749 | |||
| 14750 | Defaults to @samp{"/var/spool/cups/tmp"}. | ||
| 14751 | @end deftypevr | ||
| 14752 | |||
| 14753 | @deftypevr {@code{files-configuration} parameter} string user | ||
| 14754 | Specifies the user name or ID that is used when running external programs. | ||
| 14755 | |||
| 14756 | Defaults to @samp{"lp"}. | ||
| 14757 | @end deftypevr | ||
| 14758 | @end deftypevr | ||
| 14759 | |||
| 14760 | @deftypevr {@code{cups-configuration} parameter} access-log-level access-log-level | ||
| 14761 | Specifies the logging level for the AccessLog file. The @code{config} level | ||
| 14762 | logs when printers and classes are added, deleted, or modified and when | ||
| 14763 | configuration files are accessed or updated. The @code{actions} level logs | ||
| 14764 | when print jobs are submitted, held, released, modified, or canceled, and | ||
| 14765 | any of the conditions for @code{config}. The @code{all} level logs all | ||
| 14766 | requests. | ||
| 14767 | |||
| 14768 | Defaults to @samp{actions}. | ||
| 14769 | @end deftypevr | ||
| 14770 | |||
| 14771 | @deftypevr {@code{cups-configuration} parameter} boolean auto-purge-jobs? | ||
| 14772 | Specifies whether to purge job history data automatically when it is no | ||
| 14773 | longer required for quotas. | ||
| 14774 | |||
| 14775 | Defaults to @samp{#f}. | ||
| 14776 | @end deftypevr | ||
| 14777 | |||
| 14778 | @deftypevr {@code{cups-configuration} parameter} browse-local-protocols browse-local-protocols | ||
| 14779 | Specifies which protocols to use for local printer sharing. | ||
| 14780 | |||
| 14781 | Defaults to @samp{dnssd}. | ||
| 14782 | @end deftypevr | ||
| 14783 | |||
| 14784 | @deftypevr {@code{cups-configuration} parameter} boolean browse-web-if? | ||
| 14785 | Specifies whether the CUPS web interface is advertised. | ||
| 14786 | |||
| 14787 | Defaults to @samp{#f}. | ||
| 14788 | @end deftypevr | ||
| 14789 | |||
| 14790 | @deftypevr {@code{cups-configuration} parameter} boolean browsing? | ||
| 14791 | Specifies whether shared printers are advertised. | ||
| 14792 | |||
| 14793 | Defaults to @samp{#f}. | ||
| 14794 | @end deftypevr | ||
| 14795 | |||
| 14796 | @deftypevr {@code{cups-configuration} parameter} string classification | ||
| 14797 | Specifies the security classification of the server. Any valid banner name | ||
| 14798 | can be used, including "classified", "confidential", "secret", "topsecret", | ||
| 14799 | and "unclassified", or the banner can be omitted to disable secure printing | ||
| 14800 | functions. | ||
| 14801 | |||
| 14802 | Defaults to @samp{""}. | ||
| 14803 | @end deftypevr | ||
| 14804 | |||
| 14805 | @deftypevr {@code{cups-configuration} parameter} boolean classify-override? | ||
| 14806 | Specifies whether users may override the classification (cover page) of | ||
| 14807 | individual print jobs using the @code{job-sheets} option. | ||
| 14808 | |||
| 14809 | Defaults to @samp{#f}. | ||
| 14810 | @end deftypevr | ||
| 14811 | |||
| 14812 | @deftypevr {@code{cups-configuration} parameter} default-auth-type default-auth-type | ||
| 14813 | Specifies the default type of authentication to use. | ||
| 14814 | |||
| 14815 | Defaults to @samp{Basic}. | ||
| 14816 | @end deftypevr | ||
| 14817 | |||
| 14818 | @deftypevr {@code{cups-configuration} parameter} default-encryption default-encryption | ||
| 14819 | Specifies whether encryption will be used for authenticated requests. | ||
| 14820 | |||
| 14821 | Defaults to @samp{Required}. | ||
| 14822 | @end deftypevr | ||
| 14823 | |||
| 14824 | @deftypevr {@code{cups-configuration} parameter} string default-language | ||
| 14825 | Specifies the default language to use for text and web content. | ||
| 14826 | |||
| 14827 | Defaults to @samp{"en"}. | ||
| 14828 | @end deftypevr | ||
| 14829 | |||
| 14830 | @deftypevr {@code{cups-configuration} parameter} string default-paper-size | ||
| 14831 | Specifies the default paper size for new print queues. @samp{"Auto"} uses a | ||
| 14832 | locale-specific default, while @samp{"None"} specifies there is no default | ||
| 14833 | paper size. Specific size names are typically @samp{"Letter"} or | ||
| 14834 | @samp{"A4"}. | ||
| 14835 | |||
| 14836 | Defaults to @samp{"Auto"}. | ||
| 14837 | @end deftypevr | ||
| 14838 | |||
| 14839 | @deftypevr {@code{cups-configuration} parameter} string default-policy | ||
| 14840 | Specifies the default access policy to use. | ||
| 14841 | |||
| 14842 | Defaults to @samp{"default"}. | ||
| 14843 | @end deftypevr | ||
| 14844 | |||
| 14845 | @deftypevr {@code{cups-configuration} parameter} boolean default-shared? | ||
| 14846 | Specifies whether local printers are shared by default. | ||
| 14847 | |||
| 14848 | Defaults to @samp{#t}. | ||
| 14849 | @end deftypevr | ||
| 14850 | |||
| 14851 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer dirty-clean-interval | ||
| 14852 | Specifies the delay for updating of configuration and state files, in | ||
| 14853 | seconds. A value of 0 causes the update to happen as soon as possible, | ||
| 14854 | typically within a few milliseconds. | ||
| 14855 | |||
| 14856 | Defaults to @samp{30}. | ||
| 14857 | @end deftypevr | ||
| 14858 | |||
| 14859 | @deftypevr {@code{cups-configuration} parameter} error-policy error-policy | ||
| 14860 | Specifies what to do when an error occurs. Possible values are | ||
| 14861 | @code{abort-job}, which will discard the failed print job; @code{retry-job}, | ||
| 14862 | which will retry the job at a later time; @code{retry-this-job}, which | ||
| 14863 | retries the failed job immediately; and @code{stop-printer}, which stops the | ||
| 14864 | printer. | ||
| 14865 | |||
| 14866 | Defaults to @samp{stop-printer}. | ||
| 14867 | @end deftypevr | ||
| 14868 | |||
| 14869 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer filter-limit | ||
| 14870 | Specifies the maximum cost of filters that are run concurrently, which can | ||
| 14871 | be used to minimize disk, memory, and CPU resource problems. A limit of 0 | ||
| 14872 | disables filter limiting. An average print to a non-PostScript printer | ||
| 14873 | needs a filter limit of about 200. A PostScript printer needs about half | ||
| 14874 | that (100). Setting the limit below these thresholds will effectively limit | ||
| 14875 | the scheduler to printing a single job at any time. | ||
| 14876 | |||
| 14877 | Defaults to @samp{0}. | ||
| 14878 | @end deftypevr | ||
| 14879 | |||
| 14880 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer filter-nice | ||
| 14881 | Specifies the scheduling priority of filters that are run to print a job. | ||
| 14882 | The nice value ranges from 0, the highest priority, to 19, the lowest | ||
| 14883 | priority. | ||
| 14884 | |||
| 14885 | Defaults to @samp{0}. | ||
| 14886 | @end deftypevr | ||
| 14887 | |||
| 14888 | @deftypevr {@code{cups-configuration} parameter} host-name-lookups host-name-lookups | ||
| 14889 | Specifies whether to do reverse lookups on connecting clients. The | ||
| 14890 | @code{double} setting causes @code{cupsd} to verify that the hostname | ||
| 14891 | resolved from the address matches one of the addresses returned for that | ||
| 14892 | hostname. Double lookups also prevent clients with unregistered addresses | ||
| 14893 | from connecting to your server. Only set this option to @code{#t} or | ||
| 14894 | @code{double} if absolutely required. | ||
| 14895 | |||
| 14896 | Defaults to @samp{#f}. | ||
| 14897 | @end deftypevr | ||
| 14898 | |||
| 14899 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer job-kill-delay | ||
| 14900 | Specifies the number of seconds to wait before killing the filters and | ||
| 14901 | backend associated with a canceled or held job. | ||
| 14902 | |||
| 14903 | Defaults to @samp{30}. | ||
| 14904 | @end deftypevr | ||
| 14905 | |||
| 14906 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer job-retry-interval | ||
| 14907 | Specifies the interval between retries of jobs in seconds. This is | ||
| 14908 | typically used for fax queues but can also be used with normal print queues | ||
| 14909 | whose error policy is @code{retry-job} or @code{retry-current-job}. | ||
| 14910 | |||
| 14911 | Defaults to @samp{30}. | ||
| 14912 | @end deftypevr | ||
| 14913 | |||
| 14914 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer job-retry-limit | ||
| 14915 | Specifies the number of retries that are done for jobs. This is typically | ||
| 14916 | used for fax queues but can also be used with normal print queues whose | ||
| 14917 | error policy is @code{retry-job} or @code{retry-current-job}. | ||
| 14918 | |||
| 14919 | Defaults to @samp{5}. | ||
| 14920 | @end deftypevr | ||
| 14921 | |||
| 14922 | @deftypevr {@code{cups-configuration} parameter} boolean keep-alive? | ||
| 14923 | Specifies whether to support HTTP keep-alive connections. | ||
| 14924 | |||
| 14925 | Defaults to @samp{#t}. | ||
| 14926 | @end deftypevr | ||
| 14927 | |||
| 14928 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer keep-alive-timeout | ||
| 14929 | Specifies how long an idle client connection remains open, in seconds. | ||
| 14930 | |||
| 14931 | Defaults to @samp{30}. | ||
| 14932 | @end deftypevr | ||
| 14933 | |||
| 14934 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer limit-request-body | ||
| 14935 | Specifies the maximum size of print files, IPP requests, and HTML form | ||
| 14936 | data. A limit of 0 disables the limit check. | ||
| 14937 | |||
| 14938 | Defaults to @samp{0}. | ||
| 14939 | @end deftypevr | ||
| 14940 | |||
| 14941 | @deftypevr {@code{cups-configuration} parameter} multiline-string-list listen | ||
| 14942 | Listens on the specified interfaces for connections. Valid values are of | ||
| 14943 | the form @var{address}:@var{port}, where @var{address} is either an IPv6 | ||
| 14944 | address enclosed in brackets, an IPv4 address, or @code{*} to indicate all | ||
| 14945 | addresses. Values can also be file names of local UNIX domain sockets. The | ||
| 14946 | Listen directive is similar to the Port directive but allows you to restrict | ||
| 14947 | access to specific interfaces or networks. | ||
| 14948 | @end deftypevr | ||
| 14949 | |||
| 14950 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer listen-back-log | ||
| 14951 | Specifies the number of pending connections that will be allowed. This | ||
| 14952 | normally only affects very busy servers that have reached the MaxClients | ||
| 14953 | limit, but can also be triggered by large numbers of simultaneous | ||
| 14954 | connections. When the limit is reached, the operating system will refuse | ||
| 14955 | additional connections until the scheduler can accept the pending ones. | ||
| 14956 | |||
| 14957 | Defaults to @samp{128}. | ||
| 14958 | @end deftypevr | ||
| 14959 | |||
| 14960 | @deftypevr {@code{cups-configuration} parameter} location-access-control-list location-access-controls | ||
| 14961 | Specifies a set of additional access controls. | ||
| 14962 | |||
| 14963 | Available @code{location-access-controls} fields are: | ||
| 14964 | |||
| 14965 | @deftypevr {@code{location-access-controls} parameter} file-name path | ||
| 14966 | Specifies the URI path to which the access control applies. | ||
| 14967 | @end deftypevr | ||
| 14968 | |||
| 14969 | @deftypevr {@code{location-access-controls} parameter} access-control-list access-controls | ||
| 14970 | Access controls for all access to this path, in the same format as the | ||
| 14971 | @code{access-controls} of @code{operation-access-control}. | ||
| 14972 | |||
| 14973 | Defaults to @samp{()}. | ||
| 14974 | @end deftypevr | ||
| 14975 | |||
| 14976 | @deftypevr {@code{location-access-controls} parameter} method-access-control-list method-access-controls | ||
| 14977 | Access controls for method-specific access to this path. | ||
| 14978 | |||
| 14979 | Defaults to @samp{()}. | ||
| 14980 | |||
| 14981 | Available @code{method-access-controls} fields are: | ||
| 14982 | |||
| 14983 | @deftypevr {@code{method-access-controls} parameter} boolean reverse? | ||
| 14984 | If @code{#t}, apply access controls to all methods except the listed | ||
| 14985 | methods. Otherwise apply to only the listed methods. | ||
| 14986 | |||
| 14987 | Defaults to @samp{#f}. | ||
| 14988 | @end deftypevr | ||
| 14989 | |||
| 14990 | @deftypevr {@code{method-access-controls} parameter} method-list methods | ||
| 14991 | Methods to which this access control applies. | ||
| 14992 | |||
| 14993 | Defaults to @samp{()}. | ||
| 14994 | @end deftypevr | ||
| 14995 | |||
| 14996 | @deftypevr {@code{method-access-controls} parameter} access-control-list access-controls | ||
| 14997 | Access control directives, as a list of strings. Each string should be one | ||
| 14998 | directive, such as "Order allow,deny". | ||
| 14999 | |||
| 15000 | Defaults to @samp{()}. | ||
| 15001 | @end deftypevr | ||
| 15002 | @end deftypevr | ||
| 15003 | @end deftypevr | ||
| 15004 | |||
| 15005 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer log-debug-history | ||
| 15006 | Specifies the number of debugging messages that are retained for logging if | ||
| 15007 | an error occurs in a print job. Debug messages are logged regardless of the | ||
| 15008 | LogLevel setting. | ||
| 15009 | |||
| 15010 | Defaults to @samp{100}. | ||
| 15011 | @end deftypevr | ||
| 15012 | |||
| 15013 | @deftypevr {@code{cups-configuration} parameter} log-level log-level | ||
| 15014 | Specifies the level of logging for the ErrorLog file. The value @code{none} | ||
| 15015 | stops all logging while @code{debug2} logs everything. | ||
| 15016 | |||
| 15017 | Defaults to @samp{info}. | ||
| 15018 | @end deftypevr | ||
| 15019 | |||
| 15020 | @deftypevr {@code{cups-configuration} parameter} log-time-format log-time-format | ||
| 15021 | Specifies the format of the date and time in the log files. The value | ||
| 15022 | @code{standard} logs whole seconds while @code{usecs} logs microseconds. | ||
| 15023 | |||
| 15024 | Defaults to @samp{standard}. | ||
| 15025 | @end deftypevr | ||
| 15026 | |||
| 15027 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-clients | ||
| 15028 | Specifies the maximum number of simultaneous clients that are allowed by the | ||
| 15029 | scheduler. | ||
| 15030 | |||
| 15031 | Defaults to @samp{100}. | ||
| 15032 | @end deftypevr | ||
| 15033 | |||
| 15034 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-clients-per-host | ||
| 15035 | Specifies the maximum number of simultaneous clients that are allowed from a | ||
| 15036 | single address. | ||
| 15037 | |||
| 15038 | Defaults to @samp{100}. | ||
| 15039 | @end deftypevr | ||
| 15040 | |||
| 15041 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-copies | ||
| 15042 | Specifies the maximum number of copies that a user can print of each job. | ||
| 15043 | |||
| 15044 | Defaults to @samp{9999}. | ||
| 15045 | @end deftypevr | ||
| 15046 | |||
| 15047 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-hold-time | ||
| 15048 | Specifies the maximum time a job may remain in the @code{indefinite} hold | ||
| 15049 | state before it is canceled. A value of 0 disables cancellation of held | ||
| 15050 | jobs. | ||
| 15051 | |||
| 15052 | Defaults to @samp{0}. | ||
| 15053 | @end deftypevr | ||
| 15054 | |||
| 15055 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-jobs | ||
| 15056 | Specifies the maximum number of simultaneous jobs that are allowed. Set to | ||
| 15057 | 0 to allow an unlimited number of jobs. | ||
| 15058 | |||
| 15059 | Defaults to @samp{500}. | ||
| 15060 | @end deftypevr | ||
| 15061 | |||
| 15062 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-jobs-per-printer | ||
| 15063 | Specifies the maximum number of simultaneous jobs that are allowed per | ||
| 15064 | printer. A value of 0 allows up to MaxJobs jobs per printer. | ||
| 15065 | |||
| 15066 | Defaults to @samp{0}. | ||
| 15067 | @end deftypevr | ||
| 15068 | |||
| 15069 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-jobs-per-user | ||
| 15070 | Specifies the maximum number of simultaneous jobs that are allowed per | ||
| 15071 | user. A value of 0 allows up to MaxJobs jobs per user. | ||
| 15072 | |||
| 15073 | Defaults to @samp{0}. | ||
| 15074 | @end deftypevr | ||
| 15075 | |||
| 15076 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-job-time | ||
| 15077 | Specifies the maximum time a job may take to print before it is canceled, in | ||
| 15078 | seconds. Set to 0 to disable cancellation of "stuck" jobs. | ||
| 15079 | |||
| 15080 | Defaults to @samp{10800}. | ||
| 15081 | @end deftypevr | ||
| 15082 | |||
| 15083 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer max-log-size | ||
| 15084 | Specifies the maximum size of the log files before they are rotated, in | ||
| 15085 | bytes. The value 0 disables log rotation. | ||
| 15086 | |||
| 15087 | Defaults to @samp{1048576}. | ||
| 15088 | @end deftypevr | ||
| 15089 | |||
| 15090 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer multiple-operation-timeout | ||
| 15091 | Specifies the maximum amount of time to allow between files in a multiple | ||
| 15092 | file print job, in seconds. | ||
| 15093 | |||
| 15094 | Defaults to @samp{300}. | ||
| 15095 | @end deftypevr | ||
| 15096 | |||
| 15097 | @deftypevr {@code{cups-configuration} parameter} string page-log-format | ||
| 15098 | Specifies the format of PageLog lines. Sequences beginning with percent | ||
| 15099 | (@samp{%}) characters are replaced with the corresponding information, while | ||
| 15100 | all other characters are copied literally. The following percent sequences | ||
| 15101 | are recognized: | ||
| 15102 | |||
| 15103 | @table @samp | ||
| 15104 | @item %% | ||
| 15105 | insert a single percent character | ||
| 15106 | |||
| 15107 | @item %@{name@} | ||
| 15108 | insert the value of the specified IPP attribute | ||
| 15109 | |||
| 15110 | @item %C | ||
| 15111 | insert the number of copies for the current page | ||
| 15112 | |||
| 15113 | @item %P | ||
| 15114 | insert the current page number | ||
| 15115 | |||
| 15116 | @item %T | ||
| 15117 | insert the current date and time in common log format | ||
| 15118 | |||
| 15119 | @item %j | ||
| 15120 | insert the job ID | ||
| 15121 | |||
| 15122 | @item %p | ||
| 15123 | insert the printer name | ||
| 15124 | |||
| 15125 | @item %u | ||
| 15126 | insert the username | ||
| 15127 | @end table | ||
| 15128 | |||
| 15129 | A value of the empty string disables page logging. The string @code{%p %u | ||
| 15130 | %j %T %P %C %@{job-billing@} %@{job-originating-host-name@} %@{job-name@} | ||
| 15131 | %@{media@} %@{sides@}} creates a page log with the standard items. | ||
| 15132 | |||
| 15133 | Defaults to @samp{""}. | ||
| 15134 | @end deftypevr | ||
| 15135 | |||
| 15136 | @deftypevr {@code{cups-configuration} parameter} environment-variables environment-variables | ||
| 15137 | Passes the specified environment variable(s) to child processes; a list of | ||
| 15138 | strings. | ||
| 15139 | |||
| 15140 | Defaults to @samp{()}. | ||
| 15141 | @end deftypevr | ||
| 15142 | |||
| 15143 | @deftypevr {@code{cups-configuration} parameter} policy-configuration-list policies | ||
| 15144 | Specifies named access control policies. | ||
| 15145 | |||
| 15146 | Available @code{policy-configuration} fields are: | ||
| 15147 | |||
| 15148 | @deftypevr {@code{policy-configuration} parameter} string name | ||
| 15149 | Name of the policy. | ||
| 15150 | @end deftypevr | ||
| 15151 | |||
| 15152 | @deftypevr {@code{policy-configuration} parameter} string job-private-access | ||
| 15153 | Specifies an access list for a job's private values. @code{@@ACL} maps to | ||
| 15154 | the printer's requesting-user-name-allowed or requesting-user-name-denied | ||
| 15155 | values. @code{@@OWNER} maps to the job's owner. @code{@@SYSTEM} maps to | ||
| 15156 | the groups listed for the @code{system-group} field of the | ||
| 15157 | @code{files-config} configuration, which is reified into the | ||
| 15158 | @code{cups-files.conf(5)} file. Other possible elements of the access list | ||
| 15159 | include specific user names, and @code{@@@var{group}} to indicate members of | ||
| 15160 | a specific group. The access list may also be simply @code{all} or | ||
| 15161 | @code{default}. | ||
| 15162 | |||
| 15163 | Defaults to @samp{"@@OWNER @@SYSTEM"}. | ||
| 15164 | @end deftypevr | ||
| 15165 | |||
| 15166 | @deftypevr {@code{policy-configuration} parameter} string job-private-values | ||
| 15167 | Specifies the list of job values to make private, or @code{all}, | ||
| 15168 | @code{default}, or @code{none}. | ||
| 15169 | |||
| 15170 | Defaults to @samp{"job-name job-originating-host-name | ||
| 15171 | job-originating-user-name phone"}. | ||
| 15172 | @end deftypevr | ||
| 15173 | |||
| 15174 | @deftypevr {@code{policy-configuration} parameter} string subscription-private-access | ||
| 15175 | Specifies an access list for a subscription's private values. @code{@@ACL} | ||
| 15176 | maps to the printer's requesting-user-name-allowed or | ||
| 15177 | requesting-user-name-denied values. @code{@@OWNER} maps to the job's | ||
| 15178 | owner. @code{@@SYSTEM} maps to the groups listed for the | ||
| 15179 | @code{system-group} field of the @code{files-config} configuration, which is | ||
| 15180 | reified into the @code{cups-files.conf(5)} file. Other possible elements of | ||
| 15181 | the access list include specific user names, and @code{@@@var{group}} to | ||
| 15182 | indicate members of a specific group. The access list may also be simply | ||
| 15183 | @code{all} or @code{default}. | ||
| 15184 | |||
| 15185 | Defaults to @samp{"@@OWNER @@SYSTEM"}. | ||
| 15186 | @end deftypevr | ||
| 15187 | |||
| 15188 | @deftypevr {@code{policy-configuration} parameter} string subscription-private-values | ||
| 15189 | Specifies the list of job values to make private, or @code{all}, | ||
| 15190 | @code{default}, or @code{none}. | ||
| 15191 | |||
| 15192 | Defaults to @samp{"notify-events notify-pull-method notify-recipient-uri | ||
| 15193 | notify-subscriber-user-name notify-user-data"}. | ||
| 15194 | @end deftypevr | ||
| 15195 | |||
| 15196 | @deftypevr {@code{policy-configuration} parameter} operation-access-control-list access-controls | ||
| 15197 | Access control by IPP operation. | ||
| 15198 | |||
| 15199 | Defaults to @samp{()}. | ||
| 15200 | @end deftypevr | ||
| 15201 | @end deftypevr | ||
| 15202 | |||
| 15203 | @deftypevr {@code{cups-configuration} parameter} boolean-or-non-negative-integer preserve-job-files | ||
| 15204 | Specifies whether job files (documents) are preserved after a job is | ||
| 15205 | printed. If a numeric value is specified, job files are preserved for the | ||
| 15206 | indicated number of seconds after printing. Otherwise a boolean value | ||
| 15207 | applies indefinitely. | ||
| 15208 | |||
| 15209 | Defaults to @samp{86400}. | ||
| 15210 | @end deftypevr | ||
| 15211 | |||
| 15212 | @deftypevr {@code{cups-configuration} parameter} boolean-or-non-negative-integer preserve-job-history | ||
| 15213 | Specifies whether the job history is preserved after a job is printed. If a | ||
| 15214 | numeric value is specified, the job history is preserved for the indicated | ||
| 15215 | number of seconds after printing. If @code{#t}, the job history is | ||
| 15216 | preserved until the MaxJobs limit is reached. | ||
| 15217 | |||
| 15218 | Defaults to @samp{#t}. | ||
| 15219 | @end deftypevr | ||
| 15220 | |||
| 15221 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer reload-timeout | ||
| 15222 | Specifies the amount of time to wait for job completion before restarting | ||
| 15223 | the scheduler. | ||
| 15224 | |||
| 15225 | Defaults to @samp{30}. | ||
| 15226 | @end deftypevr | ||
| 15227 | |||
| 15228 | @deftypevr {@code{cups-configuration} parameter} string rip-cache | ||
| 15229 | Specifies the maximum amount of memory to use when converting documents into | ||
| 15230 | bitmaps for a printer. | ||
| 15231 | |||
| 15232 | Defaults to @samp{"128m"}. | ||
| 15233 | @end deftypevr | ||
| 15234 | |||
| 15235 | @deftypevr {@code{cups-configuration} parameter} string server-admin | ||
| 15236 | Specifies the email address of the server administrator. | ||
| 15237 | |||
| 15238 | Defaults to @samp{"root@@localhost.localdomain"}. | ||
| 15239 | @end deftypevr | ||
| 15240 | |||
| 15241 | @deftypevr {@code{cups-configuration} parameter} host-name-list-or-* server-alias | ||
| 15242 | The ServerAlias directive is used for HTTP Host header validation when | ||
| 15243 | clients connect to the scheduler from external interfaces. Using the | ||
| 15244 | special name @code{*} can expose your system to known browser-based DNS | ||
| 15245 | rebinding attacks, even when accessing sites through a firewall. If the | ||
| 15246 | auto-discovery of alternate names does not work, we recommend listing each | ||
| 15247 | alternate name with a ServerAlias directive instead of using @code{*}. | ||
| 15248 | |||
| 15249 | Defaults to @samp{*}. | ||
| 15250 | @end deftypevr | ||
| 15251 | |||
| 15252 | @deftypevr {@code{cups-configuration} parameter} string server-name | ||
| 15253 | Specifies the fully-qualified host name of the server. | ||
| 15254 | |||
| 15255 | Defaults to @samp{"localhost"}. | ||
| 15256 | @end deftypevr | ||
| 15257 | |||
| 15258 | @deftypevr {@code{cups-configuration} parameter} server-tokens server-tokens | ||
| 15259 | Specifies what information is included in the Server header of HTTP | ||
| 15260 | responses. @code{None} disables the Server header. @code{ProductOnly} | ||
| 15261 | reports @code{CUPS}. @code{Major} reports @code{CUPS 2}. @code{Minor} | ||
| 15262 | reports @code{CUPS 2.0}. @code{Minimal} reports @code{CUPS 2.0.0}. | ||
| 15263 | @code{OS} reports @code{CUPS 2.0.0 (@var{uname})} where @var{uname} is the | ||
| 15264 | output of the @code{uname} command. @code{Full} reports @code{CUPS 2.0.0 | ||
| 15265 | (@var{uname}) IPP/2.0}. | ||
| 15266 | |||
| 15267 | Defaults to @samp{Minimal}. | ||
| 15268 | @end deftypevr | ||
| 15269 | |||
| 15270 | @deftypevr {@code{cups-configuration} parameter} string set-env | ||
| 15271 | Set the specified environment variable to be passed to child processes. | ||
| 15272 | |||
| 15273 | Defaults to @samp{"variable value"}. | ||
| 15274 | @end deftypevr | ||
| 15275 | |||
| 15276 | @deftypevr {@code{cups-configuration} parameter} multiline-string-list ssl-listen | ||
| 15277 | Listens on the specified interfaces for encrypted connections. Valid values | ||
| 15278 | are of the form @var{address}:@var{port}, where @var{address} is either an | ||
| 15279 | IPv6 address enclosed in brackets, an IPv4 address, or @code{*} to indicate | ||
| 15280 | all addresses. | ||
| 15281 | |||
| 15282 | Defaults to @samp{()}. | ||
| 15283 | @end deftypevr | ||
| 15284 | |||
| 15285 | @deftypevr {@code{cups-configuration} parameter} ssl-options ssl-options | ||
| 15286 | Sets encryption options. By default, CUPS only supports encryption using | ||
| 15287 | TLS v1.0 or higher using known secure cipher suites. The @code{AllowRC4} | ||
| 15288 | option enables the 128-bit RC4 cipher suites, which are required for some | ||
| 15289 | older clients that do not implement newer ones. The @code{AllowSSL3} option | ||
| 15290 | enables SSL v3.0, which is required for some older clients that do not | ||
| 15291 | support TLS v1.0. | ||
| 15292 | |||
| 15293 | Defaults to @samp{()}. | ||
| 15294 | @end deftypevr | ||
| 15295 | |||
| 15296 | @deftypevr {@code{cups-configuration} parameter} boolean strict-conformance? | ||
| 15297 | Specifies whether the scheduler requires clients to strictly adhere to the | ||
| 15298 | IPP specifications. | ||
| 15299 | |||
| 15300 | Defaults to @samp{#f}. | ||
| 15301 | @end deftypevr | ||
| 15302 | |||
| 15303 | @deftypevr {@code{cups-configuration} parameter} non-negative-integer timeout | ||
| 15304 | Specifies the HTTP request timeout, in seconds. | ||
| 15305 | |||
| 15306 | Defaults to @samp{300}. | ||
| 15307 | |||
| 15308 | @end deftypevr | ||
| 15309 | |||
| 15310 | @deftypevr {@code{cups-configuration} parameter} boolean web-interface? | ||
| 15311 | Specifies whether the web interface is enabled. | ||
| 15312 | |||
| 15313 | Defaults to @samp{#f}. | ||
| 15314 | @end deftypevr | ||
| 15315 | |||
| 15316 | At this point you're probably thinking ``oh dear, Guix manual, I like you | ||
| 15317 | but you can stop already with the configuration options''. Indeed. | ||
| 15318 | However, one more point: it could be that you have an existing | ||
| 15319 | @code{cupsd.conf} that you want to use. In that case, you can pass an | ||
| 15320 | @code{opaque-cups-configuration} as the configuration of a | ||
| 15321 | @code{cups-service-type}. | ||
| 15322 | |||
| 15323 | Available @code{opaque-cups-configuration} fields are: | ||
| 15324 | |||
| 15325 | @deftypevr {@code{opaque-cups-configuration} parameter} package cups | ||
| 15326 | The CUPS package. | ||
| 15327 | @end deftypevr | ||
| 15328 | |||
| 15329 | @deftypevr {@code{opaque-cups-configuration} parameter} string cupsd.conf | ||
| 15330 | The contents of the @code{cupsd.conf}, as a string. | ||
| 15331 | @end deftypevr | ||
| 15332 | |||
| 15333 | @deftypevr {@code{opaque-cups-configuration} parameter} string cups-files.conf | ||
| 15334 | The contents of the @code{cups-files.conf} file, as a string. | ||
| 15335 | @end deftypevr | ||
| 15336 | |||
| 15337 | For example, if your @code{cupsd.conf} and @code{cups-files.conf} are in | ||
| 15338 | strings of the same name, you could instantiate a CUPS service like this: | ||
| 15339 | |||
| 15340 | @example | ||
| 15341 | (service cups-service-type | ||
| 15342 | (opaque-cups-configuration | ||
| 15343 | (cupsd.conf cupsd.conf) | ||
| 15344 | (cups-files.conf cups-files.conf))) | ||
| 15345 | @end example | ||
| 15346 | |||
| 15347 | |||
| 15348 | @node Desktop-Dienste | ||
| 15349 | @subsection Desktop-Dienste | ||
| 15350 | |||
| 15351 | The @code{(gnu services desktop)} module provides services that are usually | ||
| 15352 | useful in the context of a ``desktop'' setup---that is, on a machine running | ||
| 15353 | a graphical display server, possibly with graphical user interfaces, etc. | ||
| 15354 | It also defines services that provide specific desktop environments like | ||
| 15355 | GNOME, Xfce or MATE. | ||
| 15356 | |||
| 15357 | To simplify things, the module defines a variable containing the set of | ||
| 15358 | services that users typically expect on a machine with a graphical | ||
| 15359 | environment and networking: | ||
| 15360 | |||
| 15361 | @defvr {Scheme Variable} %desktop-services | ||
| 15362 | This is a list of services that builds upon @var{%base-services} and adds or | ||
| 15363 | adjusts services for a typical ``desktop'' setup. | ||
| 15364 | |||
| 15365 | In particular, it adds a graphical login manager (@pxref{X Window, | ||
| 15366 | @code{gdm-service-type}}), screen lockers, a network management tool | ||
| 15367 | (@pxref{Netzwerkdienste, @code{network-manager-service-type}}), energy | ||
| 15368 | and color management services, the @code{elogind} login and seat manager, | ||
| 15369 | the Polkit privilege service, the GeoClue location service, the | ||
| 15370 | AccountsService daemon that allows authorized users change system passwords, | ||
| 15371 | an NTP client (@pxref{Netzwerkdienste}), the Avahi daemon, and has the | ||
| 15372 | name service switch service configured to be able to use @code{nss-mdns} | ||
| 15373 | (@pxref{Name Service Switch, mDNS}). | ||
| 15374 | @end defvr | ||
| 15375 | |||
| 15376 | The @var{%desktop-services} variable can be used as the @code{services} | ||
| 15377 | field of an @code{operating-system} declaration (@pxref{»operating-system«-Referenz, @code{services}}). | ||
| 15378 | |||
| 15379 | Additionally, the @code{gnome-desktop-service-type}, | ||
| 15380 | @code{xfce-desktop-service}, @code{mate-desktop-service-type} and | ||
| 15381 | @code{enlightenment-desktop-service-type} procedures can add GNOME, Xfce, | ||
| 15382 | MATE and/or Enlightenment to a system. To ``add GNOME'' means that | ||
| 15383 | system-level services like the backlight adjustment helpers and the power | ||
| 15384 | management utilities are added to the system, extending @code{polkit} and | ||
| 15385 | @code{dbus} appropriately, allowing GNOME to operate with elevated | ||
| 15386 | privileges on a limited number of special-purpose system interfaces. | ||
| 15387 | Additionally, adding a service made by @code{gnome-desktop-service-type} | ||
| 15388 | adds the GNOME metapackage to the system profile. Likewise, adding the Xfce | ||
| 15389 | service not only adds the @code{xfce} metapackage to the system profile, but | ||
| 15390 | it also gives the Thunar file manager the ability to open a ``root-mode'' | ||
| 15391 | file management window, if the user authenticates using the administrator's | ||
| 15392 | password via the standard polkit graphical interface. To ``add MATE'' means | ||
| 15393 | that @code{polkit} and @code{dbus} are extended appropriately, allowing MATE | ||
| 15394 | to operate with elevated privileges on a limited number of special-purpose | ||
| 15395 | system interfaces. Additionally, adding a service of type | ||
| 15396 | @code{mate-desktop-service-type} adds the MATE metapackage to the system | ||
| 15397 | profile. ``Adding Enlightenment'' means that @code{dbus} is extended | ||
| 15398 | appropriately, and several of Enlightenment's binaries are set as setuid, | ||
| 15399 | allowing Enlightenment's screen locker and other functionality to work as | ||
| 15400 | expetected. | ||
| 15401 | |||
| 15402 | The desktop environments in Guix use the Xorg display server by default. If | ||
| 15403 | you'd like to use the newer display server protocol called Wayland, you need | ||
| 15404 | to use the @code{sddm-service} instead of GDM as the graphical login | ||
| 15405 | manager. You should then select the ``GNOME (Wayland)'' session in SDDM. | ||
| 15406 | Alternatively you can also try starting GNOME on Wayland manually from a TTY | ||
| 15407 | with the command ``XDG_SESSION_TYPE=wayland exec dbus-run-session | ||
| 15408 | gnome-session``. Currently only GNOME has support for Wayland. | ||
| 15409 | |||
| 15410 | @defvr {Scheme-Variable} gnome-desktop-service-type | ||
| 15411 | Dies ist der Typ des Dienstes, der die @uref{https://www.gnome.org, | ||
| 15412 | GNOME}-Arbeitsumgebung bereitstellt. Sein Wert ist ein | ||
| 15413 | @code{gnome-desktop-configuration}-Objekt (siehe unten). | ||
| 15414 | |||
| 15415 | This service adds the @code{gnome} package to the system profile, and | ||
| 15416 | extends polkit with the actions from @code{gnome-settings-daemon}. | ||
| 15417 | @end defvr | ||
| 15418 | |||
| 15419 | @deftp {Datentyp} gnome-desktop-configuration | ||
| 15420 | Configuration record for the GNOME desktop environment. | ||
| 15421 | |||
| 15422 | @table @asis | ||
| 15423 | @item @code{gnome} (Vorgabe: @code{gnome}) | ||
| 15424 | Welches GNOME-Paket benutzt werden soll. | ||
| 15425 | @end table | ||
| 15426 | @end deftp | ||
| 15427 | |||
| 15428 | @defvr {Scheme-Variable} xfce-desktop-service-type | ||
| 15429 | Der Typ des Dienstes, um die @uref{Xfce, https://xfce.org/}-Arbeitsumgebung | ||
| 15430 | auszuführen. Sein Wert ist ein @code{xfce-desktop-configuration}-Objekt | ||
| 15431 | (siehe unten). | ||
| 15432 | |||
| 15433 | This service that adds the @code{xfce} package to the system profile, and | ||
| 15434 | extends polkit with the ability for @code{thunar} to manipulate the file | ||
| 15435 | system as root from within a user session, after the user has authenticated | ||
| 15436 | with the administrator's password. | ||
| 15437 | @end defvr | ||
| 15438 | |||
| 15439 | @deftp {Datentyp} xfce-desktop-configuration | ||
| 15440 | Verbundstyp für Einstellungen zur Xfce-Arbeitsumgebung. | ||
| 15441 | |||
| 15442 | @table @asis | ||
| 15443 | @item @code{xfce} (Vorgabe: @code{xfce}) | ||
| 15444 | Das Xfce-Paket, was benutzt werden soll. | ||
| 15445 | @end table | ||
| 15446 | @end deftp | ||
| 15447 | |||
| 15448 | @deffn {Scheme-Variable} mate-desktop-service-type | ||
| 15449 | Dies ist der Typ des Dienstes, um die @uref{https://mate-desktop.org/, | ||
| 15450 | MATE-Arbeitsumgebung} auszuführen. Sein Wert ist ein | ||
| 15451 | @code{mate-desktop-configuration}-Objekt (siehe unten). | ||
| 15452 | |||
| 15453 | This service adds the @code{mate} package to the system profile, and extends | ||
| 15454 | polkit with the actions from @code{mate-settings-daemon}. | ||
| 15455 | @end deffn | ||
| 15456 | |||
| 15457 | @deftp {Datentyp} mate-desktop-configuration | ||
| 15458 | Verbundstyp für die Einstellungen der MATE-Arbeitsumgebung. | ||
| 15459 | |||
| 15460 | @table @asis | ||
| 15461 | @item @code{mate} (Vorgabe: @code{mate}) | ||
| 15462 | Das MATE-Paket, was benutzt werden soll. | ||
| 15463 | @end table | ||
| 15464 | @end deftp | ||
| 15465 | |||
| 15466 | @deffn {Scheme-Variable} enlightenment-desktop-service-type | ||
| 15467 | Return a service that adds the @code{enlightenment} package to the system | ||
| 15468 | profile, and extends dbus with actions from @code{efl}. | ||
| 15469 | @end deffn | ||
| 15470 | |||
| 15471 | @deftp {Data Type} enlightenment-desktop-service-configuration | ||
| 15472 | @table @asis | ||
| 15473 | @item @code{enlightenment} (Vorgabe: @code{enlightenment}) | ||
| 15474 | Das Enlightenment-Paket, was benutzt werden soll. | ||
| 15475 | @end table | ||
| 15476 | @end deftp | ||
| 15477 | |||
| 15478 | Because the GNOME, Xfce and MATE desktop services pull in so many packages, | ||
| 15479 | the default @code{%desktop-services} variable doesn't include any of them by | ||
| 15480 | default. To add GNOME, Xfce or MATE, just @code{cons} them onto | ||
| 15481 | @code{%desktop-services} in the @code{services} field of your | ||
| 15482 | @code{operating-system}: | ||
| 15483 | |||
| 15484 | @example | ||
| 15485 | (use-modules (gnu)) | ||
| 15486 | (use-service-modules desktop) | ||
| 15487 | (operating-system | ||
| 15488 | ... | ||
| 15489 | ;; cons* adds items to the list given as its last argument. | ||
| 15490 | (services (cons* (service gnome-desktop-service-type) | ||
| 15491 | (service xfce-desktop-service) | ||
| 15492 | %desktop-services)) | ||
| 15493 | ...) | ||
| 15494 | @end example | ||
| 15495 | |||
| 15496 | These desktop environments will then be available as options in the | ||
| 15497 | graphical login window. | ||
| 15498 | |||
| 15499 | The actual service definitions included in @code{%desktop-services} and | ||
| 15500 | provided by @code{(gnu services dbus)} and @code{(gnu services desktop)} are | ||
| 15501 | described below. | ||
| 15502 | |||
| 15503 | @deffn {Scheme Procedure} dbus-service [#:dbus @var{dbus}] [#:services '()] | ||
| 15504 | Return a service that runs the ``system bus'', using @var{dbus}, with | ||
| 15505 | support for @var{services}. | ||
| 15506 | |||
| 15507 | @uref{http://dbus.freedesktop.org/, D-Bus} is an inter-process communication | ||
| 15508 | facility. Its system bus is used to allow system services to communicate | ||
| 15509 | and to be notified of system-wide events. | ||
| 15510 | |||
| 15511 | @var{services} must be a list of packages that provide an | ||
| 15512 | @file{etc/dbus-1/system.d} directory containing additional D-Bus | ||
| 15513 | configuration and policy files. For example, to allow avahi-daemon to use | ||
| 15514 | the system bus, @var{services} must be equal to @code{(list avahi)}. | ||
| 15515 | @end deffn | ||
| 15516 | |||
| 15517 | @deffn {Scheme Procedure} elogind-service [#:config @var{config}] | ||
| 15518 | Return a service that runs the @code{elogind} login and seat management | ||
| 15519 | daemon. @uref{https://github.com/elogind/elogind, Elogind} exposes a D-Bus | ||
| 15520 | interface that can be used to know which users are logged in, know what kind | ||
| 15521 | of sessions they have open, suspend the system, inhibit system suspend, | ||
| 15522 | reboot the system, and other tasks. | ||
| 15523 | |||
| 15524 | Elogind handles most system-level power events for a computer, for example | ||
| 15525 | suspending the system when a lid is closed, or shutting it down when the | ||
| 15526 | power button is pressed. | ||
| 15527 | |||
| 15528 | The @var{config} keyword argument specifies the configuration for elogind, | ||
| 15529 | and should be the result of an @code{(elogind-configuration (@var{parameter} | ||
| 15530 | @var{value})...)} invocation. Available parameters and their default values | ||
| 15531 | are: | ||
| 15532 | |||
| 15533 | @table @code | ||
| 15534 | @item kill-user-processes? | ||
| 15535 | @code{#f} | ||
| 15536 | @item kill-only-users | ||
| 15537 | @code{()} | ||
| 15538 | @item kill-exclude-users | ||
| 15539 | @code{("root")} | ||
| 15540 | @item inhibit-delay-max-seconds | ||
| 15541 | @code{5} | ||
| 15542 | @item handle-power-key | ||
| 15543 | @code{poweroff} | ||
| 15544 | @item handle-suspend-key | ||
| 15545 | @code{suspend} | ||
| 15546 | @item handle-hibernate-key | ||
| 15547 | @code{hibernate} | ||
| 15548 | @item handle-lid-switch | ||
| 15549 | @code{suspend} | ||
| 15550 | @item handle-lid-switch-docked | ||
| 15551 | @code{ignore} | ||
| 15552 | @item power-key-ignore-inhibited? | ||
| 15553 | @code{#f} | ||
| 15554 | @item suspend-key-ignore-inhibited? | ||
| 15555 | @code{#f} | ||
| 15556 | @item hibernate-key-ignore-inhibited? | ||
| 15557 | @code{#f} | ||
| 15558 | @item lid-switch-ignore-inhibited? | ||
| 15559 | @code{#t} | ||
| 15560 | @item holdoff-timeout-seconds | ||
| 15561 | @code{30} | ||
| 15562 | @item idle-action | ||
| 15563 | @code{ignore} | ||
| 15564 | @item idle-action-seconds | ||
| 15565 | @code{(* 30 60)} | ||
| 15566 | @item runtime-directory-size-percent | ||
| 15567 | @code{10} | ||
| 15568 | @item runtime-directory-size | ||
| 15569 | @code{#f} | ||
| 15570 | @item remove-ipc? | ||
| 15571 | @code{#t} | ||
| 15572 | @item suspend-state | ||
| 15573 | @code{("mem" "standby" "freeze")} | ||
| 15574 | @item suspend-mode | ||
| 15575 | @code{()} | ||
| 15576 | @item hibernate-state | ||
| 15577 | @code{("disk")} | ||
| 15578 | @item hibernate-mode | ||
| 15579 | @code{("platform" "shutdown")} | ||
| 15580 | @item hybrid-sleep-state | ||
| 15581 | @code{("disk")} | ||
| 15582 | @item hybrid-sleep-mode | ||
| 15583 | @code{("suspend" "platform" "shutdown")} | ||
| 15584 | @end table | ||
| 15585 | @end deffn | ||
| 15586 | |||
| 15587 | @deffn {Scheme Procedure} accountsservice-service @ | ||
| 15588 | [#:accountsservice @var{accountsservice}] Return a service that runs | ||
| 15589 | AccountsService, a system service that can list available accounts, change | ||
| 15590 | their passwords, and so on. AccountsService integrates with PolicyKit to | ||
| 15591 | enable unprivileged users to acquire the capability to modify their system | ||
| 15592 | configuration. | ||
| 15593 | @uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the | ||
| 15594 | accountsservice web site} for more information. | ||
| 15595 | |||
| 15596 | The @var{accountsservice} keyword argument is the @code{accountsservice} | ||
| 15597 | package to expose as a service. | ||
| 15598 | @end deffn | ||
| 15599 | |||
| 15600 | @deffn {Scheme Procedure} polkit-service @ | ||
| 15601 | [#:polkit @var{polkit}] Return a service that runs the | ||
| 15602 | @uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege | ||
| 15603 | management service}, which allows system administrators to grant access to | ||
| 15604 | privileged operations in a structured way. By querying the Polkit service, | ||
| 15605 | a privileged system component can know when it should grant additional | ||
| 15606 | capabilities to ordinary users. For example, an ordinary user can be | ||
| 15607 | granted the capability to suspend the system if the user is logged in | ||
| 15608 | locally. | ||
| 15609 | @end deffn | ||
| 15610 | |||
| 15611 | @defvr {Scheme-Variable} upower-service-type | ||
| 15612 | Service that runs @uref{http://upower.freedesktop.org/, @command{upowerd}}, | ||
| 15613 | a system-wide monitor for power consumption and battery levels, with the | ||
| 15614 | given configuration settings. | ||
| 15615 | |||
| 15616 | It implements the @code{org.freedesktop.UPower} D-Bus interface, and is | ||
| 15617 | notably used by GNOME. | ||
| 15618 | @end defvr | ||
| 15619 | |||
| 15620 | @deftp {Datentyp} upower-configuration | ||
| 15621 | Repräsentiert die Konfiguration von UPower. | ||
| 15622 | |||
| 15623 | @table @asis | ||
| 15624 | |||
| 15625 | @item @code{upower} (Vorgabe: @var{upower}) | ||
| 15626 | Package to use for @code{upower}. | ||
| 15627 | |||
| 15628 | @item @code{watts-up-pro?} (Vorgabe: @code{#f}) | ||
| 15629 | Enable the Watts Up Pro device. | ||
| 15630 | |||
| 15631 | @item @code{poll-batteries?} (Vorgabe: @code{#t}) | ||
| 15632 | Enable polling the kernel for battery level changes. | ||
| 15633 | |||
| 15634 | @item @code{ignore-lid?} (Vorgabe: @code{#f}) | ||
| 15635 | Ignore the lid state, this can be useful if it's incorrect on a device. | ||
| 15636 | |||
| 15637 | @item @code{use-percentage-for-policy?} (Vorgabe: @code{#f}) | ||
| 15638 | Whether battery percentage based policy should be used. The default is to | ||
| 15639 | use the time left, change to @code{#t} to use the percentage. | ||
| 15640 | |||
| 15641 | @item @code{percentage-low} (Vorgabe: @code{10}) | ||
| 15642 | When @code{use-percentage-for-policy?} is @code{#t}, this sets the | ||
| 15643 | percentage at which the battery is considered low. | ||
| 15644 | |||
| 15645 | @item @code{percentage-critical} (Vorgabe: @code{3}) | ||
| 15646 | When @code{use-percentage-for-policy?} is @code{#t}, this sets the | ||
| 15647 | percentage at which the battery is considered critical. | ||
| 15648 | |||
| 15649 | @item @code{percentage-action} (Vorgabe: @code{2}) | ||
| 15650 | When @code{use-percentage-for-policy?} is @code{#t}, this sets the | ||
| 15651 | percentage at which action will be taken. | ||
| 15652 | |||
| 15653 | @item @code{time-low} (Vorgabe: @code{1200}) | ||
| 15654 | When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining | ||
| 15655 | in seconds at which the battery is considered low. | ||
| 15656 | |||
| 15657 | @item @code{time-critical} (Vorgabe: @code{300}) | ||
| 15658 | When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining | ||
| 15659 | in seconds at which the battery is considered critical. | ||
| 15660 | |||
| 15661 | @item @code{time-action} (Vorgabe: @code{120}) | ||
| 15662 | When @code{use-time-for-policy?} is @code{#f}, this sets the time remaining | ||
| 15663 | in seconds at which action will be taken. | ||
| 15664 | |||
| 15665 | @item @code{critical-power-action} (Vorgabe: @code{'hybrid-sleep}) | ||
| 15666 | The action taken when @code{percentage-action} or @code{time-action} is | ||
| 15667 | reached (depending on the configuration of | ||
| 15668 | @code{use-percentage-for-policy?}). | ||
| 15669 | |||
| 15670 | Possible values are: | ||
| 15671 | |||
| 15672 | @itemize @bullet | ||
| 15673 | @item | ||
| 15674 | @code{'power-off} | ||
| 15675 | |||
| 15676 | @item | ||
| 15677 | @code{'hibernate} | ||
| 15678 | |||
| 15679 | @item | ||
| 15680 | @code{'hybrid-sleep}. | ||
| 15681 | @end itemize | ||
| 15682 | |||
| 15683 | @end table | ||
| 15684 | @end deftp | ||
| 15685 | |||
| 15686 | @deffn {Scheme Procedure} udisks-service [#:udisks @var{udisks}] | ||
| 15687 | Return a service for @uref{http://udisks.freedesktop.org/docs/latest/, | ||
| 15688 | UDisks}, a @dfn{disk management} daemon that provides user interfaces with | ||
| 15689 | notifications and ways to mount/unmount disks. Programs that talk to UDisks | ||
| 15690 | include the @command{udisksctl} command, part of UDisks, and GNOME Disks. | ||
| 15691 | @end deffn | ||
| 15692 | |||
| 15693 | @deffn {Scheme Procedure} colord-service [#:colord @var{colord}] | ||
| 15694 | Return a service that runs @command{colord}, a system service with a D-Bus | ||
| 15695 | interface to manage the color profiles of input and output devices such as | ||
| 15696 | screens and scanners. It is notably used by the GNOME Color Manager | ||
| 15697 | graphical tool. See @uref{http://www.freedesktop.org/software/colord/, the | ||
| 15698 | colord web site} for more information. | ||
| 15699 | @end deffn | ||
| 15700 | |||
| 15701 | @deffn {Scheme Procedure} geoclue-application name [#:allowed? #t] [#:system? #f] [#:users '()] | ||
| 15702 | Return a configuration allowing an application to access GeoClue location | ||
| 15703 | data. @var{name} is the Desktop ID of the application, without the | ||
| 15704 | @code{.desktop} part. If @var{allowed?} is true, the application will have | ||
| 15705 | access to location information by default. The boolean @var{system?} value | ||
| 15706 | indicates whether an application is a system component or not. Finally | ||
| 15707 | @var{users} is a list of UIDs of all users for which this application is | ||
| 15708 | allowed location info access. An empty users list means that all users are | ||
| 15709 | allowed. | ||
| 15710 | @end deffn | ||
| 15711 | |||
| 15712 | @defvr {Scheme Variable} %standard-geoclue-applications | ||
| 15713 | The standard list of well-known GeoClue application configurations, granting | ||
| 15714 | authority to the GNOME date-and-time utility to ask for the current location | ||
| 15715 | in order to set the time zone, and allowing the IceCat and Epiphany web | ||
| 15716 | browsers to request location information. IceCat and Epiphany both query | ||
| 15717 | the user before allowing a web page to know the user's location. | ||
| 15718 | @end defvr | ||
| 15719 | |||
| 15720 | @deffn {Scheme Procedure} geoclue-service [#:colord @var{colord}] @ | ||
| 15721 | [#:whitelist '()] @ [#:wifi-geolocation-url | ||
| 15722 | "https://location.services.mozilla.com/v1/geolocate?key=geoclue"] @ | ||
| 15723 | [#:submit-data? #f] [#:wifi-submission-url | ||
| 15724 | "https://location.services.mozilla.com/v1/submit?key=geoclue"] @ | ||
| 15725 | [#:submission-nick "geoclue"] @ [#:applications | ||
| 15726 | %standard-geoclue-applications] Return a service that runs the GeoClue | ||
| 15727 | location service. This service provides a D-Bus interface to allow | ||
| 15728 | applications to request access to a user's physical location, and optionally | ||
| 15729 | to add information to online location databases. See | ||
| 15730 | @uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the GeoClue web | ||
| 15731 | site} for more information. | ||
| 15732 | @end deffn | ||
| 15733 | |||
| 15734 | @deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @ | ||
| 15735 | [@w{#:auto-enable? #f}] Return a service that runs the @command{bluetoothd} | ||
| 15736 | daemon, which manages all the Bluetooth devices and provides a number of | ||
| 15737 | D-Bus interfaces. When AUTO-ENABLE? is true, the bluetooth controller is | ||
| 15738 | powered automatically at boot, which can be useful when using a bluetooth | ||
| 15739 | keyboard or mouse. | ||
| 15740 | |||
| 15741 | Users need to be in the @code{lp} group to access the D-Bus service. | ||
| 15742 | @end deffn | ||
| 15743 | |||
| 15744 | @node Tondienste | ||
| 15745 | @subsection Tondienste | ||
| 15746 | |||
| 15747 | @cindex sound support | ||
| 15748 | @cindex ALSA | ||
| 15749 | @cindex PulseAudio, sound support | ||
| 15750 | |||
| 15751 | The @code{(gnu services sound)} module provides a service to configure the | ||
| 15752 | Advanced Linux Sound Architecture (ALSA) system, which makes PulseAudio the | ||
| 15753 | preferred ALSA output driver. | ||
| 15754 | |||
| 15755 | @deffn {Scheme Variable} alsa-service-type | ||
| 15756 | This is the type for the @uref{https://alsa-project.org/, Advanced Linux | ||
| 15757 | Sound Architecture} (ALSA) system, which generates the | ||
| 15758 | @file{/etc/asound.conf} configuration file. The value for this type is a | ||
| 15759 | @command{alsa-configuration} record as in this example: | ||
| 15760 | |||
| 15761 | @example | ||
| 15762 | (service alsa-service-type) | ||
| 15763 | @end example | ||
| 15764 | |||
| 15765 | See below for details about @code{alsa-configuration}. | ||
| 15766 | @end deffn | ||
| 15767 | |||
| 15768 | @deftp {Datentyp} alsa-configuration | ||
| 15769 | Repräsentiert die Konfiguration für den Dienst @code{alsa-service}. | ||
| 15770 | |||
| 15771 | @table @asis | ||
| 15772 | @item @code{alsa-plugins} (Vorgabe: @var{alsa-plugins}) | ||
| 15773 | @code{alsa-plugins}-Paket, was benutzt werden soll. | ||
| 15774 | |||
| 15775 | @item @code{pulseaudio?} (Vorgabe: @var{#t}) | ||
| 15776 | Whether ALSA applications should transparently be made to use the | ||
| 15777 | @uref{http://www.pulseaudio.org/, PulseAudio} sound server. | ||
| 15778 | |||
| 15779 | Using PulseAudio allows you to run several sound-producing applications at | ||
| 15780 | the same time and to individual control them @i{via} @command{pavucontrol}, | ||
| 15781 | among other things. | ||
| 15782 | |||
| 15783 | @item @code{extra-options} (Vorgabe: @var{""}) | ||
| 15784 | String to append to the @file{/etc/asound.conf} file. | ||
| 15785 | |||
| 15786 | @end table | ||
| 15787 | @end deftp | ||
| 15788 | |||
| 15789 | Individual users who want to override the system configuration of ALSA can | ||
| 15790 | do it with the @file{~/.asoundrc} file: | ||
| 15791 | |||
| 15792 | @example | ||
| 15793 | # In guix, we have to specify the absolute path for plugins. | ||
| 15794 | pcm_type.jack @{ | ||
| 15795 | lib "/home/alice/.guix-profile/lib/alsa-lib/libasound_module_pcm_jack.so" | ||
| 15796 | @} | ||
| 15797 | |||
| 15798 | # Routing ALSA to jack: | ||
| 15799 | # <http://jackaudio.org/faq/routing_alsa.html>. | ||
| 15800 | pcm.rawjack @{ | ||
| 15801 | type jack | ||
| 15802 | playback_ports @{ | ||
| 15803 | 0 system:playback_1 | ||
| 15804 | 1 system:playback_2 | ||
| 15805 | @} | ||
| 15806 | |||
| 15807 | capture_ports @{ | ||
| 15808 | 0 system:capture_1 | ||
| 15809 | 1 system:capture_2 | ||
| 15810 | @} | ||
| 15811 | @} | ||
| 15812 | |||
| 15813 | pcm.!default @{ | ||
| 15814 | type plug | ||
| 15815 | slave @{ | ||
| 15816 | pcm "rawjack" | ||
| 15817 | @} | ||
| 15818 | @} | ||
| 15819 | @end example | ||
| 15820 | |||
| 15821 | See @uref{https://www.alsa-project.org/main/index.php/Asoundrc} for the | ||
| 15822 | details. | ||
| 15823 | |||
| 15824 | |||
| 15825 | @node Datenbankdienste | ||
| 15826 | @subsection Datenbankdienste | ||
| 15827 | |||
| 15828 | @cindex Datenbank | ||
| 15829 | @cindex SQL | ||
| 15830 | The @code{(gnu services databases)} module provides the following services. | ||
| 15831 | |||
| 15832 | @deffn {Scheme Procedure} postgresql-service [#:postgresql postgresql] @ | ||
| 15833 | [#:config-file] [#:data-directory ``/var/lib/postgresql/data''] @ [#:port | ||
| 15834 | 5432] [#:locale ``en_US.utf8''] [#:extension-packages '()] Return a service | ||
| 15835 | that runs @var{postgresql}, the PostgreSQL database server. | ||
| 15836 | |||
| 15837 | The PostgreSQL daemon loads its runtime configuration from | ||
| 15838 | @var{config-file}, creates a database cluster with @var{locale} as the | ||
| 15839 | default locale, stored in @var{data-directory}. It then listens on | ||
| 15840 | @var{port}. | ||
| 15841 | |||
| 15842 | @cindex postgresql extension-packages | ||
| 15843 | Additional extensions are loaded from packages listed in | ||
| 15844 | @var{extension-packages}. Extensions are available at runtime. For | ||
| 15845 | instance, to create a geographic database using the @code{postgis} | ||
| 15846 | extension, a user can configure the postgresql-service as in this example: | ||
| 15847 | |||
| 15848 | @cindex postgis | ||
| 15849 | @example | ||
| 15850 | (use-package-modules databases geo) | ||
| 15851 | |||
| 15852 | (operating-system | ||
| 15853 | … | ||
| 15854 | ;; postgresql wird benötigt, um »psql« auszuführen, aber postgis ist | ||
| 15855 | ;; für den Betrieb nicht unbedingt notwendig. | ||
| 15856 | (packages (cons* postgresql %base-packages)) | ||
| 15857 | (services | ||
| 15858 | (cons* | ||
| 15859 | (postgresql-service #:extension-packages (list postgis)) | ||
| 15860 | %base-services))) | ||
| 15861 | @end example | ||
| 15862 | |||
| 15863 | Then the extension becomes visible and you can initialise an empty | ||
| 15864 | geographic database in this way: | ||
| 15865 | |||
| 15866 | @example | ||
| 15867 | psql -U postgres | ||
| 15868 | > create database postgistest; | ||
| 15869 | > \connect postgistest; | ||
| 15870 | > create extension postgis; | ||
| 15871 | > create extension postgis_topology; | ||
| 15872 | @end example | ||
| 15873 | |||
| 15874 | There is no need to add this field for contrib extensions such as hstore or | ||
| 15875 | dblink as they are already loadable by postgresql. This field is only | ||
| 15876 | required to add extensions provided by other packages. | ||
| 15877 | @end deffn | ||
| 15878 | |||
| 15879 | @deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)] | ||
| 15880 | Return a service that runs @command{mysqld}, the MySQL or MariaDB database | ||
| 15881 | server. | ||
| 15882 | |||
| 15883 | The optional @var{config} argument specifies the configuration for | ||
| 15884 | @command{mysqld}, which should be a @code{<mysql-configuration>} object. | ||
| 15885 | @end deffn | ||
| 15886 | |||
| 15887 | @deftp {Data Type} mysql-configuration | ||
| 15888 | Data type representing the configuration of @var{mysql-service}. | ||
| 15889 | |||
| 15890 | @table @asis | ||
| 15891 | @item @code{mysql} (default: @var{mariadb}) | ||
| 15892 | Package object of the MySQL database server, can be either @var{mariadb} or | ||
| 15893 | @var{mysql}. | ||
| 15894 | |||
| 15895 | For MySQL, a temporary root password will be displayed at activation time. | ||
| 15896 | For MariaDB, the root password is empty. | ||
| 15897 | |||
| 15898 | @item @code{port} (default: @code{3306}) | ||
| 15899 | TCP port on which the database server listens for incoming connections. | ||
| 15900 | @end table | ||
| 15901 | @end deftp | ||
| 15902 | |||
| 15903 | @defvr {Scheme Variable} memcached-service-type | ||
| 15904 | This is the service type for the @uref{https://memcached.org/, Memcached} | ||
| 15905 | service, which provides a distributed in memory cache. The value for the | ||
| 15906 | service type is a @code{memcached-configuration} object. | ||
| 15907 | @end defvr | ||
| 15908 | |||
| 15909 | @example | ||
| 15910 | (service memcached-service-type) | ||
| 15911 | @end example | ||
| 15912 | |||
| 15913 | @deftp {Data Type} memcached-configuration | ||
| 15914 | Data type representing the configuration of memcached. | ||
| 15915 | |||
| 15916 | @table @asis | ||
| 15917 | @item @code{memcached} (default: @code{memcached}) | ||
| 15918 | The Memcached package to use. | ||
| 15919 | |||
| 15920 | @item @code{interfaces} (default: @code{'("0.0.0.0")}) | ||
| 15921 | Network interfaces on which to listen. | ||
| 15922 | |||
| 15923 | @item @code{tcp-port} (default: @code{11211}) | ||
| 15924 | Port on which to accept connections on, | ||
| 15925 | |||
| 15926 | @item @code{udp-port} (default: @code{11211}) | ||
| 15927 | Port on which to accept UDP connections on, a value of 0 will disable | ||
| 15928 | listening on a UDP socket. | ||
| 15929 | |||
| 15930 | @item @code{additional-options} (default: @code{'()}) | ||
| 15931 | Additional command line options to pass to @code{memcached}. | ||
| 15932 | @end table | ||
| 15933 | @end deftp | ||
| 15934 | |||
| 15935 | @defvr {Scheme Variable} mongodb-service-type | ||
| 15936 | This is the service type for @uref{https://www.mongodb.com/, MongoDB}. The | ||
| 15937 | value for the service type is a @code{mongodb-configuration} object. | ||
| 15938 | @end defvr | ||
| 15939 | |||
| 15940 | @example | ||
| 15941 | (service mongodb-service-type) | ||
| 15942 | @end example | ||
| 15943 | |||
| 15944 | @deftp {Data Type} mongodb-configuration | ||
| 15945 | Data type representing the configuration of mongodb. | ||
| 15946 | |||
| 15947 | @table @asis | ||
| 15948 | @item @code{mongodb} (default: @code{mongodb}) | ||
| 15949 | The MongoDB package to use. | ||
| 15950 | |||
| 15951 | @item @code{config-file} (default: @code{%default-mongodb-configuration-file}) | ||
| 15952 | The configuration file for MongoDB. | ||
| 15953 | |||
| 15954 | @item @code{data-directory} (default: @code{"/var/lib/mongodb"}) | ||
| 15955 | This value is used to create the directory, so that it exists and is owned | ||
| 15956 | by the mongodb user. It should match the data-directory which MongoDB is | ||
| 15957 | configured to use through the configuration file. | ||
| 15958 | @end table | ||
| 15959 | @end deftp | ||
| 15960 | |||
| 15961 | @defvr {Scheme Variable} redis-service-type | ||
| 15962 | This is the service type for the @uref{https://redis.io/, Redis} key/value | ||
| 15963 | store, whose value is a @code{redis-configuration} object. | ||
| 15964 | @end defvr | ||
| 15965 | |||
| 15966 | @deftp {Data Type} redis-configuration | ||
| 15967 | Data type representing the configuration of redis. | ||
| 15968 | |||
| 15969 | @table @asis | ||
| 15970 | @item @code{redis} (default: @code{redis}) | ||
| 15971 | The Redis package to use. | ||
| 15972 | |||
| 15973 | @item @code{bind} (default: @code{"127.0.0.1"}) | ||
| 15974 | Network interface on which to listen. | ||
| 15975 | |||
| 15976 | @item @code{port} (default: @code{6379}) | ||
| 15977 | Port on which to accept connections on, a value of 0 will disable listening | ||
| 15978 | on a TCP socket. | ||
| 15979 | |||
| 15980 | @item @code{working-directory} (default: @code{"/var/lib/redis"}) | ||
| 15981 | Directory in which to store the database and related files. | ||
| 15982 | @end table | ||
| 15983 | @end deftp | ||
| 15984 | |||
| 15985 | @node Mail-Dienste | ||
| 15986 | @subsection Mail-Dienste | ||
| 15987 | |||
| 15988 | @cindex mail | ||
| 15989 | @cindex email | ||
| 15990 | The @code{(gnu services mail)} module provides Guix service definitions for | ||
| 15991 | email services: IMAP, POP3, and LMTP servers, as well as mail transport | ||
| 15992 | agents (MTAs). Lots of acronyms! These services are detailed in the | ||
| 15993 | subsections below. | ||
| 15994 | |||
| 15995 | @subsubheading Dovecot Service | ||
| 15996 | |||
| 15997 | @deffn {Scheme Procedure} dovecot-service [#:config (dovecot-configuration)] | ||
| 15998 | Return a service that runs the Dovecot IMAP/POP3/LMTP mail server. | ||
| 15999 | @end deffn | ||
| 16000 | |||
| 16001 | By default, Dovecot does not need much configuration; the default | ||
| 16002 | configuration object created by @code{(dovecot-configuration)} will suffice | ||
| 16003 | if your mail is delivered to @code{~/Maildir}. A self-signed certificate | ||
| 16004 | will be generated for TLS-protected connections, though Dovecot will also | ||
| 16005 | listen on cleartext ports by default. There are a number of options, | ||
| 16006 | though, which mail administrators might need to change, and as is the case | ||
| 16007 | with other services, Guix allows the system administrator to specify these | ||
| 16008 | parameters via a uniform Scheme interface. | ||
| 16009 | |||
| 16010 | For example, to specify that mail is located at @code{maildir~/.mail}, one | ||
| 16011 | would instantiate the Dovecot service like this: | ||
| 16012 | |||
| 16013 | @example | ||
| 16014 | (dovecot-service #:config | ||
| 16015 | (dovecot-configuration | ||
| 16016 | (mail-location "maildir:~/.mail"))) | ||
| 16017 | @end example | ||
| 16018 | |||
| 16019 | The available configuration parameters follow. Each parameter definition is | ||
| 16020 | preceded by its type; for example, @samp{string-list foo} indicates that the | ||
| 16021 | @code{foo} parameter should be specified as a list of strings. There is | ||
| 16022 | also a way to specify the configuration as a string, if you have an old | ||
| 16023 | @code{dovecot.conf} file that you want to port over from some other system; | ||
| 16024 | see the end for more details. | ||
| 16025 | |||
| 16026 | @c The following documentation was initially generated by | ||
| 16027 | @c (generate-documentation) in (gnu services mail). Manually maintained | ||
| 16028 | @c documentation is better, so we shouldn't hesitate to edit below as | ||
| 16029 | @c needed. However if the change you want to make to this documentation | ||
| 16030 | @c can be done in an automated way, it's probably easier to change | ||
| 16031 | @c (generate-documentation) than to make it below and have to deal with | ||
| 16032 | @c the churn as dovecot updates. | ||
| 16033 | |||
| 16034 | Available @code{dovecot-configuration} fields are: | ||
| 16035 | |||
| 16036 | @deftypevr {@code{dovecot-configuration} parameter} package dovecot | ||
| 16037 | The dovecot package. | ||
| 16038 | @end deftypevr | ||
| 16039 | |||
| 16040 | @deftypevr {@code{dovecot-configuration} parameter} comma-separated-string-list listen | ||
| 16041 | A list of IPs or hosts where to listen for connections. @samp{*} listens on | ||
| 16042 | all IPv4 interfaces, @samp{::} listens on all IPv6 interfaces. If you want | ||
| 16043 | to specify non-default ports or anything more complex, customize the address | ||
| 16044 | and port fields of the @samp{inet-listener} of the specific services you are | ||
| 16045 | interested in. | ||
| 16046 | @end deftypevr | ||
| 16047 | |||
| 16048 | @deftypevr {@code{dovecot-configuration} parameter} protocol-configuration-list protocols | ||
| 16049 | List of protocols we want to serve. Available protocols include | ||
| 16050 | @samp{imap}, @samp{pop3}, and @samp{lmtp}. | ||
| 16051 | |||
| 16052 | Available @code{protocol-configuration} fields are: | ||
| 16053 | |||
| 16054 | @deftypevr {@code{protocol-configuration} parameter} string name | ||
| 16055 | The name of the protocol. | ||
| 16056 | @end deftypevr | ||
| 16057 | |||
| 16058 | @deftypevr {@code{protocol-configuration} parameter} string auth-socket-path | ||
| 16059 | UNIX socket path to the master authentication server to find users. This is | ||
| 16060 | used by imap (for shared users) and lda. It defaults to | ||
| 16061 | @samp{"/var/run/dovecot/auth-userdb"}. | ||
| 16062 | @end deftypevr | ||
| 16063 | |||
| 16064 | @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins | ||
| 16065 | Space separated list of plugins to load. | ||
| 16066 | @end deftypevr | ||
| 16067 | |||
| 16068 | @deftypevr {@code{protocol-configuration} parameter} non-negative-integer mail-max-userip-connections | ||
| 16069 | Maximum number of IMAP connections allowed for a user from each IP address. | ||
| 16070 | NOTE: The username is compared case-sensitively. Defaults to @samp{10}. | ||
| 16071 | @end deftypevr | ||
| 16072 | |||
| 16073 | @end deftypevr | ||
| 16074 | |||
| 16075 | @deftypevr {@code{dovecot-configuration} parameter} service-configuration-list services | ||
| 16076 | List of services to enable. Available services include @samp{imap}, | ||
| 16077 | @samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and | ||
| 16078 | @samp{lmtp}. | ||
| 16079 | |||
| 16080 | Available @code{service-configuration} fields are: | ||
| 16081 | |||
| 16082 | @deftypevr {@code{service-configuration} parameter} string kind | ||
| 16083 | The service kind. Valid values include @code{director}, @code{imap-login}, | ||
| 16084 | @code{pop3-login}, @code{lmtp}, @code{imap}, @code{pop3}, @code{auth}, | ||
| 16085 | @code{auth-worker}, @code{dict}, @code{tcpwrap}, @code{quota-warning}, or | ||
| 16086 | anything else. | ||
| 16087 | @end deftypevr | ||
| 16088 | |||
| 16089 | @deftypevr {@code{service-configuration} parameter} listener-configuration-list listeners | ||
| 16090 | Listeners for the service. A listener is either a | ||
| 16091 | @code{unix-listener-configuration}, a @code{fifo-listener-configuration}, or | ||
| 16092 | an @code{inet-listener-configuration}. Defaults to @samp{()}. | ||
| 16093 | |||
| 16094 | Available @code{unix-listener-configuration} fields are: | ||
| 16095 | |||
| 16096 | @deftypevr {@code{unix-listener-configuration} parameter} string path | ||
| 16097 | Path to the file, relative to @code{base-dir} field. This is also used as | ||
| 16098 | the section name. | ||
| 16099 | @end deftypevr | ||
| 16100 | |||
| 16101 | @deftypevr {@code{unix-listener-configuration} parameter} string mode | ||
| 16102 | The access mode for the socket. Defaults to @samp{"0600"}. | ||
| 16103 | @end deftypevr | ||
| 16104 | |||
| 16105 | @deftypevr {@code{unix-listener-configuration} parameter} string user | ||
| 16106 | The user to own the socket. Defaults to @samp{""}. | ||
| 16107 | @end deftypevr | ||
| 16108 | |||
| 16109 | @deftypevr {@code{unix-listener-configuration} parameter} string group | ||
| 16110 | The group to own the socket. Defaults to @samp{""}. | ||
| 16111 | @end deftypevr | ||
| 16112 | |||
| 16113 | |||
| 16114 | Available @code{fifo-listener-configuration} fields are: | ||
| 16115 | |||
| 16116 | @deftypevr {@code{fifo-listener-configuration} parameter} string path | ||
| 16117 | Path to the file, relative to @code{base-dir} field. This is also used as | ||
| 16118 | the section name. | ||
| 16119 | @end deftypevr | ||
| 16120 | |||
| 16121 | @deftypevr {@code{fifo-listener-configuration} parameter} string mode | ||
| 16122 | The access mode for the socket. Defaults to @samp{"0600"}. | ||
| 16123 | @end deftypevr | ||
| 16124 | |||
| 16125 | @deftypevr {@code{fifo-listener-configuration} parameter} string user | ||
| 16126 | The user to own the socket. Defaults to @samp{""}. | ||
| 16127 | @end deftypevr | ||
| 16128 | |||
| 16129 | @deftypevr {@code{fifo-listener-configuration} parameter} string group | ||
| 16130 | The group to own the socket. Defaults to @samp{""}. | ||
| 16131 | @end deftypevr | ||
| 16132 | |||
| 16133 | |||
| 16134 | Available @code{inet-listener-configuration} fields are: | ||
| 16135 | |||
| 16136 | @deftypevr {@code{inet-listener-configuration} parameter} string protocol | ||
| 16137 | The protocol to listen for. | ||
| 16138 | @end deftypevr | ||
| 16139 | |||
| 16140 | @deftypevr {@code{inet-listener-configuration} parameter} string address | ||
| 16141 | The address on which to listen, or empty for all addresses. Defaults to | ||
| 16142 | @samp{""}. | ||
| 16143 | @end deftypevr | ||
| 16144 | |||
| 16145 | @deftypevr {@code{inet-listener-configuration} parameter} non-negative-integer port | ||
| 16146 | The port on which to listen. | ||
| 16147 | @end deftypevr | ||
| 16148 | |||
| 16149 | @deftypevr {@code{inet-listener-configuration} parameter} boolean ssl? | ||
| 16150 | Whether to use SSL for this service; @samp{yes}, @samp{no}, or | ||
| 16151 | @samp{required}. Defaults to @samp{#t}. | ||
| 16152 | @end deftypevr | ||
| 16153 | |||
| 16154 | @end deftypevr | ||
| 16155 | |||
| 16156 | @deftypevr {@code{service-configuration} parameter} non-negative-integer client-limit | ||
| 16157 | Maximum number of simultaneous client connections per process. Once this | ||
| 16158 | number of connections is received, the next incoming connection will prompt | ||
| 16159 | Dovecot to spawn another process. If set to 0, @code{default-client-limit} | ||
| 16160 | is used instead. | ||
| 16161 | |||
| 16162 | Defaults to @samp{0}. | ||
| 16163 | |||
| 16164 | @end deftypevr | ||
| 16165 | |||
| 16166 | @deftypevr {@code{service-configuration} parameter} non-negative-integer service-count | ||
| 16167 | Number of connections to handle before starting a new process. Typically | ||
| 16168 | the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0 is | ||
| 16169 | faster. <doc/wiki/LoginProcess.txt>. Defaults to @samp{1}. | ||
| 16170 | |||
| 16171 | @end deftypevr | ||
| 16172 | |||
| 16173 | @deftypevr {@code{service-configuration} parameter} non-negative-integer process-limit | ||
| 16174 | Maximum number of processes that can exist for this service. If set to 0, | ||
| 16175 | @code{default-process-limit} is used instead. | ||
| 16176 | |||
| 16177 | Defaults to @samp{0}. | ||
| 16178 | |||
| 16179 | @end deftypevr | ||
| 16180 | |||
| 16181 | @deftypevr {@code{service-configuration} parameter} non-negative-integer process-min-avail | ||
| 16182 | Number of processes to always keep waiting for more connections. Defaults | ||
| 16183 | to @samp{0}. | ||
| 16184 | @end deftypevr | ||
| 16185 | |||
| 16186 | @deftypevr {@code{service-configuration} parameter} non-negative-integer vsz-limit | ||
| 16187 | If you set @samp{service-count 0}, you probably need to grow this. Defaults | ||
| 16188 | to @samp{256000000}. | ||
| 16189 | @end deftypevr | ||
| 16190 | |||
| 16191 | @end deftypevr | ||
| 16192 | |||
| 16193 | @deftypevr {@code{dovecot-configuration} parameter} dict-configuration dict | ||
| 16194 | Dict configuration, as created by the @code{dict-configuration} constructor. | ||
| 16195 | |||
| 16196 | Available @code{dict-configuration} fields are: | ||
| 16197 | |||
| 16198 | @deftypevr {@code{dict-configuration} parameter} free-form-fields entries | ||
| 16199 | A list of key-value pairs that this dict should hold. Defaults to | ||
| 16200 | @samp{()}. | ||
| 16201 | @end deftypevr | ||
| 16202 | |||
| 16203 | @end deftypevr | ||
| 16204 | |||
| 16205 | @deftypevr {@code{dovecot-configuration} parameter} passdb-configuration-list passdbs | ||
| 16206 | A list of passdb configurations, each one created by the | ||
| 16207 | @code{passdb-configuration} constructor. | ||
| 16208 | |||
| 16209 | Available @code{passdb-configuration} fields are: | ||
| 16210 | |||
| 16211 | @deftypevr {@code{passdb-configuration} parameter} string driver | ||
| 16212 | The driver that the passdb should use. Valid values include @samp{pam}, | ||
| 16213 | @samp{passwd}, @samp{shadow}, @samp{bsdauth}, and @samp{static}. Defaults | ||
| 16214 | to @samp{"pam"}. | ||
| 16215 | @end deftypevr | ||
| 16216 | |||
| 16217 | @deftypevr {@code{passdb-configuration} parameter} space-separated-string-list args | ||
| 16218 | Space separated list of arguments to the passdb driver. Defaults to | ||
| 16219 | @samp{""}. | ||
| 16220 | @end deftypevr | ||
| 16221 | |||
| 16222 | @end deftypevr | ||
| 16223 | |||
| 16224 | @deftypevr {@code{dovecot-configuration} parameter} userdb-configuration-list userdbs | ||
| 16225 | List of userdb configurations, each one created by the | ||
| 16226 | @code{userdb-configuration} constructor. | ||
| 16227 | |||
| 16228 | Available @code{userdb-configuration} fields are: | ||
| 16229 | |||
| 16230 | @deftypevr {@code{userdb-configuration} parameter} string driver | ||
| 16231 | The driver that the userdb should use. Valid values include @samp{passwd} | ||
| 16232 | and @samp{static}. Defaults to @samp{"passwd"}. | ||
| 16233 | @end deftypevr | ||
| 16234 | |||
| 16235 | @deftypevr {@code{userdb-configuration} parameter} space-separated-string-list args | ||
| 16236 | Space separated list of arguments to the userdb driver. Defaults to | ||
| 16237 | @samp{""}. | ||
| 16238 | @end deftypevr | ||
| 16239 | |||
| 16240 | @deftypevr {@code{userdb-configuration} parameter} free-form-args override-fields | ||
| 16241 | Override fields from passwd. Defaults to @samp{()}. | ||
| 16242 | @end deftypevr | ||
| 16243 | |||
| 16244 | @end deftypevr | ||
| 16245 | |||
| 16246 | @deftypevr {@code{dovecot-configuration} parameter} plugin-configuration plugin-configuration | ||
| 16247 | Plug-in configuration, created by the @code{plugin-configuration} | ||
| 16248 | constructor. | ||
| 16249 | @end deftypevr | ||
| 16250 | |||
| 16251 | @deftypevr {@code{dovecot-configuration} parameter} list-of-namespace-configuration namespaces | ||
| 16252 | List of namespaces. Each item in the list is created by the | ||
| 16253 | @code{namespace-configuration} constructor. | ||
| 16254 | |||
| 16255 | Available @code{namespace-configuration} fields are: | ||
| 16256 | |||
| 16257 | @deftypevr {@code{namespace-configuration} parameter} string name | ||
| 16258 | Name for this namespace. | ||
| 16259 | @end deftypevr | ||
| 16260 | |||
| 16261 | @deftypevr {@code{namespace-configuration} parameter} string type | ||
| 16262 | Namespace type: @samp{private}, @samp{shared} or @samp{public}. Defaults to | ||
| 16263 | @samp{"private"}. | ||
| 16264 | @end deftypevr | ||
| 16265 | |||
| 16266 | @deftypevr {@code{namespace-configuration} parameter} string separator | ||
| 16267 | Hierarchy separator to use. You should use the same separator for all | ||
| 16268 | namespaces or some clients get confused. @samp{/} is usually a good one. | ||
| 16269 | The default however depends on the underlying mail storage format. Defaults | ||
| 16270 | to @samp{""}. | ||
| 16271 | @end deftypevr | ||
| 16272 | |||
| 16273 | @deftypevr {@code{namespace-configuration} parameter} string prefix | ||
| 16274 | Prefix required to access this namespace. This needs to be different for | ||
| 16275 | all namespaces. For example @samp{Public/}. Defaults to @samp{""}. | ||
| 16276 | @end deftypevr | ||
| 16277 | |||
| 16278 | @deftypevr {@code{namespace-configuration} parameter} string location | ||
| 16279 | Physical location of the mailbox. This is in the same format as | ||
| 16280 | mail_location, which is also the default for it. Defaults to @samp{""}. | ||
| 16281 | @end deftypevr | ||
| 16282 | |||
| 16283 | @deftypevr {@code{namespace-configuration} parameter} boolean inbox? | ||
| 16284 | There can be only one INBOX, and this setting defines which namespace has | ||
| 16285 | it. Defaults to @samp{#f}. | ||
| 16286 | @end deftypevr | ||
| 16287 | |||
| 16288 | @deftypevr {@code{namespace-configuration} parameter} boolean hidden? | ||
| 16289 | If namespace is hidden, it's not advertised to clients via NAMESPACE | ||
| 16290 | extension. You'll most likely also want to set @samp{list? #f}. This is | ||
| 16291 | mostly useful when converting from another server with different namespaces | ||
| 16292 | which you want to deprecate but still keep working. For example you can | ||
| 16293 | create hidden namespaces with prefixes @samp{~/mail/}, @samp{~%u/mail/} and | ||
| 16294 | @samp{mail/}. Defaults to @samp{#f}. | ||
| 16295 | @end deftypevr | ||
| 16296 | |||
| 16297 | @deftypevr {@code{namespace-configuration} parameter} boolean list? | ||
| 16298 | Show the mailboxes under this namespace with the LIST command. This makes | ||
| 16299 | the namespace visible for clients that do not support the NAMESPACE | ||
| 16300 | extension. The special @code{children} value lists child mailboxes, but | ||
| 16301 | hides the namespace prefix. Defaults to @samp{#t}. | ||
| 16302 | @end deftypevr | ||
| 16303 | |||
| 16304 | @deftypevr {@code{namespace-configuration} parameter} boolean subscriptions? | ||
| 16305 | Namespace handles its own subscriptions. If set to @code{#f}, the parent | ||
| 16306 | namespace handles them. The empty prefix should always have this as | ||
| 16307 | @code{#t}). Defaults to @samp{#t}. | ||
| 16308 | @end deftypevr | ||
| 16309 | |||
| 16310 | @deftypevr {@code{namespace-configuration} parameter} mailbox-configuration-list mailboxes | ||
| 16311 | List of predefined mailboxes in this namespace. Defaults to @samp{()}. | ||
| 16312 | |||
| 16313 | Available @code{mailbox-configuration} fields are: | ||
| 16314 | |||
| 16315 | @deftypevr {@code{mailbox-configuration} parameter} string name | ||
| 16316 | Name for this mailbox. | ||
| 16317 | @end deftypevr | ||
| 16318 | |||
| 16319 | @deftypevr {@code{mailbox-configuration} parameter} string auto | ||
| 16320 | @samp{create} will automatically create this mailbox. @samp{subscribe} will | ||
| 16321 | both create and subscribe to the mailbox. Defaults to @samp{"no"}. | ||
| 16322 | @end deftypevr | ||
| 16323 | |||
| 16324 | @deftypevr {@code{mailbox-configuration} parameter} space-separated-string-list special-use | ||
| 16325 | List of IMAP @code{SPECIAL-USE} attributes as specified by RFC 6154. Valid | ||
| 16326 | values are @code{\All}, @code{\Archive}, @code{\Drafts}, @code{\Flagged}, | ||
| 16327 | @code{\Junk}, @code{\Sent}, and @code{\Trash}. Defaults to @samp{()}. | ||
| 16328 | @end deftypevr | ||
| 16329 | |||
| 16330 | @end deftypevr | ||
| 16331 | |||
| 16332 | @end deftypevr | ||
| 16333 | |||
| 16334 | @deftypevr {@code{dovecot-configuration} parameter} file-name base-dir | ||
| 16335 | Base directory where to store runtime data. Defaults to | ||
| 16336 | @samp{"/var/run/dovecot/"}. | ||
| 16337 | @end deftypevr | ||
| 16338 | |||
| 16339 | @deftypevr {@code{dovecot-configuration} parameter} string login-greeting | ||
| 16340 | Greeting message for clients. Defaults to @samp{"Dovecot ready."}. | ||
| 16341 | @end deftypevr | ||
| 16342 | |||
| 16343 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list login-trusted-networks | ||
| 16344 | List of trusted network ranges. Connections from these IPs are allowed to | ||
| 16345 | override their IP addresses and ports (for logging and for authentication | ||
| 16346 | checks). @samp{disable-plaintext-auth} is also ignored for these networks. | ||
| 16347 | Typically you would specify your IMAP proxy servers here. Defaults to | ||
| 16348 | @samp{()}. | ||
| 16349 | @end deftypevr | ||
| 16350 | |||
| 16351 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list login-access-sockets | ||
| 16352 | List of login access check sockets (e.g.@: tcpwrap). Defaults to @samp{()}. | ||
| 16353 | @end deftypevr | ||
| 16354 | |||
| 16355 | @deftypevr {@code{dovecot-configuration} parameter} boolean verbose-proctitle? | ||
| 16356 | Show more verbose process titles (in ps). Currently shows user name and IP | ||
| 16357 | address. Useful for seeing who is actually using the IMAP processes (e.g.@: | ||
| 16358 | shared mailboxes or if the same uid is used for multiple accounts). | ||
| 16359 | Defaults to @samp{#f}. | ||
| 16360 | @end deftypevr | ||
| 16361 | |||
| 16362 | @deftypevr {@code{dovecot-configuration} parameter} boolean shutdown-clients? | ||
| 16363 | Should all processes be killed when Dovecot master process shuts down. | ||
| 16364 | Setting this to @code{#f} means that Dovecot can be upgraded without forcing | ||
| 16365 | existing client connections to close (although that could also be a problem | ||
| 16366 | if the upgrade is e.g.@: due to a security fix). Defaults to @samp{#t}. | ||
| 16367 | @end deftypevr | ||
| 16368 | |||
| 16369 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer doveadm-worker-count | ||
| 16370 | If non-zero, run mail commands via this many connections to doveadm server, | ||
| 16371 | instead of running them directly in the same process. Defaults to @samp{0}. | ||
| 16372 | @end deftypevr | ||
| 16373 | |||
| 16374 | @deftypevr {@code{dovecot-configuration} parameter} string doveadm-socket-path | ||
| 16375 | UNIX socket or host:port used for connecting to doveadm server. Defaults to | ||
| 16376 | @samp{"doveadm-server"}. | ||
| 16377 | @end deftypevr | ||
| 16378 | |||
| 16379 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list import-environment | ||
| 16380 | List of environment variables that are preserved on Dovecot startup and | ||
| 16381 | passed down to all of its child processes. You can also give key=value | ||
| 16382 | pairs to always set specific settings. | ||
| 16383 | @end deftypevr | ||
| 16384 | |||
| 16385 | @deftypevr {@code{dovecot-configuration} parameter} boolean disable-plaintext-auth? | ||
| 16386 | Disable LOGIN command and all other plaintext authentications unless SSL/TLS | ||
| 16387 | is used (LOGINDISABLED capability). Note that if the remote IP matches the | ||
| 16388 | local IP (i.e.@: you're connecting from the same computer), the connection | ||
| 16389 | is considered secure and plaintext authentication is allowed. See also | ||
| 16390 | ssl=required setting. Defaults to @samp{#t}. | ||
| 16391 | @end deftypevr | ||
| 16392 | |||
| 16393 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer auth-cache-size | ||
| 16394 | Authentication cache size (e.g.@: @samp{#e10e6}). 0 means it's disabled. | ||
| 16395 | Note that bsdauth, PAM and vpopmail require @samp{cache-key} to be set for | ||
| 16396 | caching to be used. Defaults to @samp{0}. | ||
| 16397 | @end deftypevr | ||
| 16398 | |||
| 16399 | @deftypevr {@code{dovecot-configuration} parameter} string auth-cache-ttl | ||
| 16400 | Time to live for cached data. After TTL expires the cached record is no | ||
| 16401 | longer used, *except* if the main database lookup returns internal failure. | ||
| 16402 | We also try to handle password changes automatically: If user's previous | ||
| 16403 | authentication was successful, but this one wasn't, the cache isn't used. | ||
| 16404 | For now this works only with plaintext authentication. Defaults to @samp{"1 | ||
| 16405 | hour"}. | ||
| 16406 | @end deftypevr | ||
| 16407 | |||
| 16408 | @deftypevr {@code{dovecot-configuration} parameter} string auth-cache-negative-ttl | ||
| 16409 | TTL for negative hits (user not found, password mismatch). 0 disables | ||
| 16410 | caching them completely. Defaults to @samp{"1 hour"}. | ||
| 16411 | @end deftypevr | ||
| 16412 | |||
| 16413 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list auth-realms | ||
| 16414 | List of realms for SASL authentication mechanisms that need them. You can | ||
| 16415 | leave it empty if you don't want to support multiple realms. Many clients | ||
| 16416 | simply use the first one listed here, so keep the default realm first. | ||
| 16417 | Defaults to @samp{()}. | ||
| 16418 | @end deftypevr | ||
| 16419 | |||
| 16420 | @deftypevr {@code{dovecot-configuration} parameter} string auth-default-realm | ||
| 16421 | Default realm/domain to use if none was specified. This is used for both | ||
| 16422 | SASL realms and appending @@domain to username in plaintext logins. | ||
| 16423 | Defaults to @samp{""}. | ||
| 16424 | @end deftypevr | ||
| 16425 | |||
| 16426 | @deftypevr {@code{dovecot-configuration} parameter} string auth-username-chars | ||
| 16427 | List of allowed characters in username. If the user-given username contains | ||
| 16428 | a character not listed in here, the login automatically fails. This is just | ||
| 16429 | an extra check to make sure user can't exploit any potential quote escaping | ||
| 16430 | vulnerabilities with SQL/LDAP databases. If you want to allow all | ||
| 16431 | characters, set this value to empty. Defaults to | ||
| 16432 | @samp{"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@@"}. | ||
| 16433 | @end deftypevr | ||
| 16434 | |||
| 16435 | @deftypevr {@code{dovecot-configuration} parameter} string auth-username-translation | ||
| 16436 | Username character translations before it's looked up from databases. The | ||
| 16437 | value contains series of from -> to characters. For example @samp{#@@/@@} | ||
| 16438 | means that @samp{#} and @samp{/} characters are translated to @samp{@@}. | ||
| 16439 | Defaults to @samp{""}. | ||
| 16440 | @end deftypevr | ||
| 16441 | |||
| 16442 | @deftypevr {@code{dovecot-configuration} parameter} string auth-username-format | ||
| 16443 | Username formatting before it's looked up from databases. You can use the | ||
| 16444 | standard variables here, e.g.@: %Lu would lowercase the username, %n would | ||
| 16445 | drop away the domain if it was given, or @samp{%n-AT-%d} would change the | ||
| 16446 | @samp{@@} into @samp{-AT-}. This translation is done after | ||
| 16447 | @samp{auth-username-translation} changes. Defaults to @samp{"%Lu"}. | ||
| 16448 | @end deftypevr | ||
| 16449 | |||
| 16450 | @deftypevr {@code{dovecot-configuration} parameter} string auth-master-user-separator | ||
| 16451 | If you want to allow master users to log in by specifying the master | ||
| 16452 | username within the normal username string (i.e.@: not using SASL | ||
| 16453 | mechanism's support for it), you can specify the separator character here. | ||
| 16454 | The format is then <username><separator><master username>. UW-IMAP uses | ||
| 16455 | @samp{*} as the separator, so that could be a good choice. Defaults to | ||
| 16456 | @samp{""}. | ||
| 16457 | @end deftypevr | ||
| 16458 | |||
| 16459 | @deftypevr {@code{dovecot-configuration} parameter} string auth-anonymous-username | ||
| 16460 | Username to use for users logging in with ANONYMOUS SASL mechanism. | ||
| 16461 | Defaults to @samp{"anonymous"}. | ||
| 16462 | @end deftypevr | ||
| 16463 | |||
| 16464 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer auth-worker-max-count | ||
| 16465 | Maximum number of dovecot-auth worker processes. They're used to execute | ||
| 16466 | blocking passdb and userdb queries (e.g.@: MySQL and PAM). They're | ||
| 16467 | automatically created and destroyed as needed. Defaults to @samp{30}. | ||
| 16468 | @end deftypevr | ||
| 16469 | |||
| 16470 | @deftypevr {@code{dovecot-configuration} parameter} string auth-gssapi-hostname | ||
| 16471 | Host name to use in GSSAPI principal names. The default is to use the name | ||
| 16472 | returned by gethostname(). Use @samp{$ALL} (with quotes) to allow all | ||
| 16473 | keytab entries. Defaults to @samp{""}. | ||
| 16474 | @end deftypevr | ||
| 16475 | |||
| 16476 | @deftypevr {@code{dovecot-configuration} parameter} string auth-krb5-keytab | ||
| 16477 | Kerberos keytab to use for the GSSAPI mechanism. Will use the system | ||
| 16478 | default (usually @file{/etc/krb5.keytab}) if not specified. You may need to | ||
| 16479 | change the auth service to run as root to be able to read this file. | ||
| 16480 | Defaults to @samp{""}. | ||
| 16481 | @end deftypevr | ||
| 16482 | |||
| 16483 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-use-winbind? | ||
| 16484 | Do NTLM and GSS-SPNEGO authentication using Samba's winbind daemon and | ||
| 16485 | @samp{ntlm-auth} helper. <doc/wiki/Authentication/Mechanisms/Winbind.txt>. | ||
| 16486 | Defaults to @samp{#f}. | ||
| 16487 | @end deftypevr | ||
| 16488 | |||
| 16489 | @deftypevr {@code{dovecot-configuration} parameter} file-name auth-winbind-helper-path | ||
| 16490 | Path for Samba's @samp{ntlm-auth} helper binary. Defaults to | ||
| 16491 | @samp{"/usr/bin/ntlm_auth"}. | ||
| 16492 | @end deftypevr | ||
| 16493 | |||
| 16494 | @deftypevr {@code{dovecot-configuration} parameter} string auth-failure-delay | ||
| 16495 | Time to delay before replying to failed authentications. Defaults to | ||
| 16496 | @samp{"2 secs"}. | ||
| 16497 | @end deftypevr | ||
| 16498 | |||
| 16499 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-ssl-require-client-cert? | ||
| 16500 | Require a valid SSL client certificate or the authentication fails. | ||
| 16501 | Defaults to @samp{#f}. | ||
| 16502 | @end deftypevr | ||
| 16503 | |||
| 16504 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-ssl-username-from-cert? | ||
| 16505 | Take the username from client's SSL certificate, using | ||
| 16506 | @code{X509_NAME_get_text_by_NID()} which returns the subject's DN's | ||
| 16507 | CommonName. Defaults to @samp{#f}. | ||
| 16508 | @end deftypevr | ||
| 16509 | |||
| 16510 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list auth-mechanisms | ||
| 16511 | List of wanted authentication mechanisms. Supported mechanisms are: | ||
| 16512 | @samp{plain}, @samp{login}, @samp{digest-md5}, @samp{cram-md5}, @samp{ntlm}, | ||
| 16513 | @samp{rpa}, @samp{apop}, @samp{anonymous}, @samp{gssapi}, @samp{otp}, | ||
| 16514 | @samp{skey}, and @samp{gss-spnego}. NOTE: See also | ||
| 16515 | @samp{disable-plaintext-auth} setting. | ||
| 16516 | @end deftypevr | ||
| 16517 | |||
| 16518 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list director-servers | ||
| 16519 | List of IPs or hostnames to all director servers, including ourself. Ports | ||
| 16520 | can be specified as ip:port. The default port is the same as what director | ||
| 16521 | service's @samp{inet-listener} is using. Defaults to @samp{()}. | ||
| 16522 | @end deftypevr | ||
| 16523 | |||
| 16524 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list director-mail-servers | ||
| 16525 | List of IPs or hostnames to all backend mail servers. Ranges are allowed | ||
| 16526 | too, like 10.0.0.10-10.0.0.30. Defaults to @samp{()}. | ||
| 16527 | @end deftypevr | ||
| 16528 | |||
| 16529 | @deftypevr {@code{dovecot-configuration} parameter} string director-user-expire | ||
| 16530 | How long to redirect users to a specific server after it no longer has any | ||
| 16531 | connections. Defaults to @samp{"15 min"}. | ||
| 16532 | @end deftypevr | ||
| 16533 | |||
| 16534 | @deftypevr {@code{dovecot-configuration} parameter} string director-username-hash | ||
| 16535 | How the username is translated before being hashed. Useful values include | ||
| 16536 | %Ln if user can log in with or without @@domain, %Ld if mailboxes are shared | ||
| 16537 | within domain. Defaults to @samp{"%Lu"}. | ||
| 16538 | @end deftypevr | ||
| 16539 | |||
| 16540 | @deftypevr {@code{dovecot-configuration} parameter} string log-path | ||
| 16541 | Log file to use for error messages. @samp{syslog} logs to syslog, | ||
| 16542 | @samp{/dev/stderr} logs to stderr. Defaults to @samp{"syslog"}. | ||
| 16543 | @end deftypevr | ||
| 16544 | |||
| 16545 | @deftypevr {@code{dovecot-configuration} parameter} string info-log-path | ||
| 16546 | Log file to use for informational messages. Defaults to @samp{log-path}. | ||
| 16547 | Defaults to @samp{""}. | ||
| 16548 | @end deftypevr | ||
| 16549 | |||
| 16550 | @deftypevr {@code{dovecot-configuration} parameter} string debug-log-path | ||
| 16551 | Log file to use for debug messages. Defaults to @samp{info-log-path}. | ||
| 16552 | Defaults to @samp{""}. | ||
| 16553 | @end deftypevr | ||
| 16554 | |||
| 16555 | @deftypevr {@code{dovecot-configuration} parameter} string syslog-facility | ||
| 16556 | Syslog facility to use if you're logging to syslog. Usually if you don't | ||
| 16557 | want to use @samp{mail}, you'll use local0..local7. Also other standard | ||
| 16558 | facilities are supported. Defaults to @samp{"mail"}. | ||
| 16559 | @end deftypevr | ||
| 16560 | |||
| 16561 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-verbose? | ||
| 16562 | Log unsuccessful authentication attempts and the reasons why they failed. | ||
| 16563 | Defaults to @samp{#f}. | ||
| 16564 | @end deftypevr | ||
| 16565 | |||
| 16566 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-verbose-passwords? | ||
| 16567 | In case of password mismatches, log the attempted password. Valid values | ||
| 16568 | are no, plain and sha1. sha1 can be useful for detecting brute force | ||
| 16569 | password attempts vs. user simply trying the same password over and over | ||
| 16570 | again. You can also truncate the value to n chars by appending ":n" (e.g.@: | ||
| 16571 | sha1:6). Defaults to @samp{#f}. | ||
| 16572 | @end deftypevr | ||
| 16573 | |||
| 16574 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-debug? | ||
| 16575 | Even more verbose logging for debugging purposes. Shows for example SQL | ||
| 16576 | queries. Defaults to @samp{#f}. | ||
| 16577 | @end deftypevr | ||
| 16578 | |||
| 16579 | @deftypevr {@code{dovecot-configuration} parameter} boolean auth-debug-passwords? | ||
| 16580 | In case of password mismatches, log the passwords and used scheme so the | ||
| 16581 | problem can be debugged. Enabling this also enables @samp{auth-debug}. | ||
| 16582 | Defaults to @samp{#f}. | ||
| 16583 | @end deftypevr | ||
| 16584 | |||
| 16585 | @deftypevr {@code{dovecot-configuration} parameter} boolean mail-debug? | ||
| 16586 | Enable mail process debugging. This can help you figure out why Dovecot | ||
| 16587 | isn't finding your mails. Defaults to @samp{#f}. | ||
| 16588 | @end deftypevr | ||
| 16589 | |||
| 16590 | @deftypevr {@code{dovecot-configuration} parameter} boolean verbose-ssl? | ||
| 16591 | Show protocol level SSL errors. Defaults to @samp{#f}. | ||
| 16592 | @end deftypevr | ||
| 16593 | |||
| 16594 | @deftypevr {@code{dovecot-configuration} parameter} string log-timestamp | ||
| 16595 | Prefix for each line written to log file. % codes are in strftime(3) | ||
| 16596 | format. Defaults to @samp{"\"%b %d %H:%M:%S \""}. | ||
| 16597 | @end deftypevr | ||
| 16598 | |||
| 16599 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list login-log-format-elements | ||
| 16600 | List of elements we want to log. The elements which have a non-empty | ||
| 16601 | variable value are joined together to form a comma-separated string. | ||
| 16602 | @end deftypevr | ||
| 16603 | |||
| 16604 | @deftypevr {@code{dovecot-configuration} parameter} string login-log-format | ||
| 16605 | Login log format. %s contains @samp{login-log-format-elements} string, %$ | ||
| 16606 | contains the data we want to log. Defaults to @samp{"%$: %s"}. | ||
| 16607 | @end deftypevr | ||
| 16608 | |||
| 16609 | @deftypevr {@code{dovecot-configuration} parameter} string mail-log-prefix | ||
| 16610 | Log prefix for mail processes. See doc/wiki/Variables.txt for list of | ||
| 16611 | possible variables you can use. Defaults to | ||
| 16612 | @samp{"\"%s(%u)<%@{pid@}><%@{session@}>: \""}. | ||
| 16613 | @end deftypevr | ||
| 16614 | |||
| 16615 | @deftypevr {@code{dovecot-configuration} parameter} string deliver-log-format | ||
| 16616 | Format to use for logging mail deliveries. You can use variables: | ||
| 16617 | @table @code | ||
| 16618 | @item %$ | ||
| 16619 | Delivery status message (e.g.@: @samp{saved to INBOX}) | ||
| 16620 | @item %m | ||
| 16621 | Message-ID | ||
| 16622 | @item %s | ||
| 16623 | Subject | ||
| 16624 | @item %f | ||
| 16625 | From address | ||
| 16626 | @item %p | ||
| 16627 | Physical size | ||
| 16628 | @item %w | ||
| 16629 | Virtual size. | ||
| 16630 | @end table | ||
| 16631 | Defaults to @samp{"msgid=%m: %$"}. | ||
| 16632 | @end deftypevr | ||
| 16633 | |||
| 16634 | @deftypevr {@code{dovecot-configuration} parameter} string mail-location | ||
| 16635 | Location for users' mailboxes. The default is empty, which means that | ||
| 16636 | Dovecot tries to find the mailboxes automatically. This won't work if the | ||
| 16637 | user doesn't yet have any mail, so you should explicitly tell Dovecot the | ||
| 16638 | full location. | ||
| 16639 | |||
| 16640 | If you're using mbox, giving a path to the INBOX file (e.g.@: /var/mail/%u) | ||
| 16641 | isn't enough. You'll also need to tell Dovecot where the other mailboxes | ||
| 16642 | are kept. This is called the "root mail directory", and it must be the | ||
| 16643 | first path given in the @samp{mail-location} setting. | ||
| 16644 | |||
| 16645 | There are a few special variables you can use, eg.: | ||
| 16646 | |||
| 16647 | @table @samp | ||
| 16648 | @item %u | ||
| 16649 | username | ||
| 16650 | @item %n | ||
| 16651 | user part in user@@domain, same as %u if there's no domain | ||
| 16652 | @item %d | ||
| 16653 | domain part in user@@domain, empty if there's no domain | ||
| 16654 | @item %h | ||
| 16655 | home director | ||
| 16656 | @end table | ||
| 16657 | |||
| 16658 | See doc/wiki/Variables.txt for full list. Some examples: | ||
| 16659 | @table @samp | ||
| 16660 | @item maildir:~/Maildir | ||
| 16661 | @item mbox:~/mail:INBOX=/var/mail/%u | ||
| 16662 | @item mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/% | ||
| 16663 | @end table | ||
| 16664 | Defaults to @samp{""}. | ||
| 16665 | @end deftypevr | ||
| 16666 | |||
| 16667 | @deftypevr {@code{dovecot-configuration} parameter} string mail-uid | ||
| 16668 | System user and group used to access mails. If you use multiple, userdb can | ||
| 16669 | override these by returning uid or gid fields. You can use either numbers | ||
| 16670 | or names. <doc/wiki/UserIds.txt>. Defaults to @samp{""}. | ||
| 16671 | @end deftypevr | ||
| 16672 | |||
| 16673 | @deftypevr {@code{dovecot-configuration} parameter} string mail-gid | ||
| 16674 | |||
| 16675 | Defaults to @samp{""}. | ||
| 16676 | @end deftypevr | ||
| 16677 | |||
| 16678 | @deftypevr {@code{dovecot-configuration} parameter} string mail-privileged-group | ||
| 16679 | Group to enable temporarily for privileged operations. Currently this is | ||
| 16680 | used only with INBOX when either its initial creation or dotlocking fails. | ||
| 16681 | Typically this is set to "mail" to give access to /var/mail. Defaults to | ||
| 16682 | @samp{""}. | ||
| 16683 | @end deftypevr | ||
| 16684 | |||
| 16685 | @deftypevr {@code{dovecot-configuration} parameter} string mail-access-groups | ||
| 16686 | Grant access to these supplementary groups for mail processes. Typically | ||
| 16687 | these are used to set up access to shared mailboxes. Note that it may be | ||
| 16688 | dangerous to set these if users can create symlinks (e.g.@: if "mail" group | ||
| 16689 | is set here, ln -s /var/mail ~/mail/var could allow a user to delete others' | ||
| 16690 | mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading | ||
| 16691 | it). Defaults to @samp{""}. | ||
| 16692 | @end deftypevr | ||
| 16693 | |||
| 16694 | @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access? | ||
| 16695 | Allow full file system access to clients. There's no access checks other | ||
| 16696 | than what the operating system does for the active UID/GID. It works with | ||
| 16697 | both maildir and mboxes, allowing you to prefix mailboxes names with e.g.@: | ||
| 16698 | /path/ or ~user/. Defaults to @samp{#f}. | ||
| 16699 | @end deftypevr | ||
| 16700 | |||
| 16701 | @deftypevr {@code{dovecot-configuration} parameter} boolean mmap-disable? | ||
| 16702 | Don't use mmap() at all. This is required if you store indexes to shared | ||
| 16703 | file systems (NFS or clustered file system). Defaults to @samp{#f}. | ||
| 16704 | @end deftypevr | ||
| 16705 | |||
| 16706 | @deftypevr {@code{dovecot-configuration} parameter} boolean dotlock-use-excl? | ||
| 16707 | Rely on @samp{O_EXCL} to work when creating dotlock files. NFS supports | ||
| 16708 | @samp{O_EXCL} since version 3, so this should be safe to use nowadays by | ||
| 16709 | default. Defaults to @samp{#t}. | ||
| 16710 | @end deftypevr | ||
| 16711 | |||
| 16712 | @deftypevr {@code{dovecot-configuration} parameter} string mail-fsync | ||
| 16713 | When to use fsync() or fdatasync() calls: | ||
| 16714 | @table @code | ||
| 16715 | @item optimized | ||
| 16716 | Whenever necessary to avoid losing important data | ||
| 16717 | @item always | ||
| 16718 | Useful with e.g.@: NFS when write()s are delayed | ||
| 16719 | @item never | ||
| 16720 | Never use it (best performance, but crashes can lose data). | ||
| 16721 | @end table | ||
| 16722 | Defaults to @samp{"optimized"}. | ||
| 16723 | @end deftypevr | ||
| 16724 | |||
| 16725 | @deftypevr {@code{dovecot-configuration} parameter} boolean mail-nfs-storage? | ||
| 16726 | Mail storage exists in NFS. Set this to yes to make Dovecot flush NFS | ||
| 16727 | caches whenever needed. If you're using only a single mail server this | ||
| 16728 | isn't needed. Defaults to @samp{#f}. | ||
| 16729 | @end deftypevr | ||
| 16730 | |||
| 16731 | @deftypevr {@code{dovecot-configuration} parameter} boolean mail-nfs-index? | ||
| 16732 | Mail index files also exist in NFS. Setting this to yes requires | ||
| 16733 | @samp{mmap-disable? #t} and @samp{fsync-disable? #f}. Defaults to | ||
| 16734 | @samp{#f}. | ||
| 16735 | @end deftypevr | ||
| 16736 | |||
| 16737 | @deftypevr {@code{dovecot-configuration} parameter} string lock-method | ||
| 16738 | Locking method for index files. Alternatives are fcntl, flock and dotlock. | ||
| 16739 | Dotlocking uses some tricks which may create more disk I/O than other | ||
| 16740 | locking methods. NFS users: flock doesn't work, remember to change | ||
| 16741 | @samp{mmap-disable}. Defaults to @samp{"fcntl"}. | ||
| 16742 | @end deftypevr | ||
| 16743 | |||
| 16744 | @deftypevr {@code{dovecot-configuration} parameter} file-name mail-temp-dir | ||
| 16745 | Directory in which LDA/LMTP temporarily stores incoming mails >128 kB. | ||
| 16746 | Defaults to @samp{"/tmp"}. | ||
| 16747 | @end deftypevr | ||
| 16748 | |||
| 16749 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer first-valid-uid | ||
| 16750 | Valid UID range for users. This is mostly to make sure that users can't log | ||
| 16751 | in as daemons or other system users. Note that denying root logins is | ||
| 16752 | hardcoded to dovecot binary and can't be done even if @samp{first-valid-uid} | ||
| 16753 | is set to 0. Defaults to @samp{500}. | ||
| 16754 | @end deftypevr | ||
| 16755 | |||
| 16756 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer last-valid-uid | ||
| 16757 | |||
| 16758 | Defaults to @samp{0}. | ||
| 16759 | @end deftypevr | ||
| 16760 | |||
| 16761 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer first-valid-gid | ||
| 16762 | Valid GID range for users. Users having non-valid GID as primary group ID | ||
| 16763 | aren't allowed to log in. If user belongs to supplementary groups with | ||
| 16764 | non-valid GIDs, those groups are not set. Defaults to @samp{1}. | ||
| 16765 | @end deftypevr | ||
| 16766 | |||
| 16767 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer last-valid-gid | ||
| 16768 | |||
| 16769 | Defaults to @samp{0}. | ||
| 16770 | @end deftypevr | ||
| 16771 | |||
| 16772 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-max-keyword-length | ||
| 16773 | Maximum allowed length for mail keyword name. It's only forced when trying | ||
| 16774 | to create new keywords. Defaults to @samp{50}. | ||
| 16775 | @end deftypevr | ||
| 16776 | |||
| 16777 | @deftypevr {@code{dovecot-configuration} parameter} colon-separated-file-name-list valid-chroot-dirs | ||
| 16778 | List of directories under which chrooting is allowed for mail processes | ||
| 16779 | (i.e.@: /var/mail will allow chrooting to /var/mail/foo/bar too). This | ||
| 16780 | setting doesn't affect @samp{login-chroot} @samp{mail-chroot} or auth chroot | ||
| 16781 | settings. If this setting is empty, "/./" in home dirs are ignored. | ||
| 16782 | WARNING: Never add directories here which local users can modify, that may | ||
| 16783 | lead to root exploit. Usually this should be done only if you don't allow | ||
| 16784 | shell access for users. <doc/wiki/Chrooting.txt>. Defaults to @samp{()}. | ||
| 16785 | @end deftypevr | ||
| 16786 | |||
| 16787 | @deftypevr {@code{dovecot-configuration} parameter} string mail-chroot | ||
| 16788 | Default chroot directory for mail processes. This can be overridden for | ||
| 16789 | specific users in user database by giving /./ in user's home directory | ||
| 16790 | (e.g.@: /home/./user chroots into /home). Note that usually there is no | ||
| 16791 | real need to do chrooting, Dovecot doesn't allow users to access files | ||
| 16792 | outside their mail directory anyway. If your home directories are prefixed | ||
| 16793 | with the chroot directory, append "/."@: to @samp{mail-chroot}. | ||
| 16794 | <doc/wiki/Chrooting.txt>. Defaults to @samp{""}. | ||
| 16795 | @end deftypevr | ||
| 16796 | |||
| 16797 | @deftypevr {@code{dovecot-configuration} parameter} file-name auth-socket-path | ||
| 16798 | UNIX socket path to master authentication server to find users. This is | ||
| 16799 | used by imap (for shared users) and lda. Defaults to | ||
| 16800 | @samp{"/var/run/dovecot/auth-userdb"}. | ||
| 16801 | @end deftypevr | ||
| 16802 | |||
| 16803 | @deftypevr {@code{dovecot-configuration} parameter} file-name mail-plugin-dir | ||
| 16804 | Directory where to look up mail plugins. Defaults to | ||
| 16805 | @samp{"/usr/lib/dovecot"}. | ||
| 16806 | @end deftypevr | ||
| 16807 | |||
| 16808 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mail-plugins | ||
| 16809 | List of plugins to load for all services. Plugins specific to IMAP, LDA, | ||
| 16810 | etc.@: are added to this list in their own .conf files. Defaults to | ||
| 16811 | @samp{()}. | ||
| 16812 | @end deftypevr | ||
| 16813 | |||
| 16814 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-cache-min-mail-count | ||
| 16815 | The minimum number of mails in a mailbox before updates are done to cache | ||
| 16816 | file. This allows optimizing Dovecot's behavior to do less disk writes at | ||
| 16817 | the cost of more disk reads. Defaults to @samp{0}. | ||
| 16818 | @end deftypevr | ||
| 16819 | |||
| 16820 | @deftypevr {@code{dovecot-configuration} parameter} string mailbox-idle-check-interval | ||
| 16821 | When IDLE command is running, mailbox is checked once in a while to see if | ||
| 16822 | there are any new mails or other changes. This setting defines the minimum | ||
| 16823 | time to wait between those checks. Dovecot can also use dnotify, inotify | ||
| 16824 | and kqueue to find out immediately when changes occur. Defaults to | ||
| 16825 | @samp{"30 secs"}. | ||
| 16826 | @end deftypevr | ||
| 16827 | |||
| 16828 | @deftypevr {@code{dovecot-configuration} parameter} boolean mail-save-crlf? | ||
| 16829 | Save mails with CR+LF instead of plain LF. This makes sending those mails | ||
| 16830 | take less CPU, especially with sendfile() syscall with Linux and FreeBSD. | ||
| 16831 | But it also creates a bit more disk I/O which may just make it slower. Also | ||
| 16832 | note that if other software reads the mboxes/maildirs, they may handle the | ||
| 16833 | extra CRs wrong and cause problems. Defaults to @samp{#f}. | ||
| 16834 | @end deftypevr | ||
| 16835 | |||
| 16836 | @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-stat-dirs? | ||
| 16837 | By default LIST command returns all entries in maildir beginning with a | ||
| 16838 | dot. Enabling this option makes Dovecot return only entries which are | ||
| 16839 | directories. This is done by stat()ing each entry, so it causes more disk | ||
| 16840 | I/O. (For systems setting struct @samp{dirent->d_type} this check is free | ||
| 16841 | and it's done always regardless of this setting). Defaults to @samp{#f}. | ||
| 16842 | @end deftypevr | ||
| 16843 | |||
| 16844 | @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-copy-with-hardlinks? | ||
| 16845 | When copying a message, do it with hard links whenever possible. This makes | ||
| 16846 | the performance much better, and it's unlikely to have any side effects. | ||
| 16847 | Defaults to @samp{#t}. | ||
| 16848 | @end deftypevr | ||
| 16849 | |||
| 16850 | @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-very-dirty-syncs? | ||
| 16851 | Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only | ||
| 16852 | when its mtime changes unexpectedly or when we can't find the mail | ||
| 16853 | otherwise. Defaults to @samp{#f}. | ||
| 16854 | @end deftypevr | ||
| 16855 | |||
| 16856 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mbox-read-locks | ||
| 16857 | Which locking methods to use for locking mbox. There are four available: | ||
| 16858 | |||
| 16859 | @table @code | ||
| 16860 | @item dotlock | ||
| 16861 | Create <mailbox>.lock file. This is the oldest and most NFS-safe solution. | ||
| 16862 | If you want to use /var/mail/ like directory, the users will need write | ||
| 16863 | access to that directory. | ||
| 16864 | @item dotlock-try | ||
| 16865 | Same as dotlock, but if it fails because of permissions or because there | ||
| 16866 | isn't enough disk space, just skip it. | ||
| 16867 | @item fcntl | ||
| 16868 | Use this if possible. Works with NFS too if lockd is used. | ||
| 16869 | @item flock | ||
| 16870 | May not exist in all systems. Doesn't work with NFS. | ||
| 16871 | @item lockf | ||
| 16872 | May not exist in all systems. Doesn't work with NFS. | ||
| 16873 | @end table | ||
| 16874 | |||
| 16875 | You can use multiple locking methods; if you do the order they're declared | ||
| 16876 | in is important to avoid deadlocks if other MTAs/MUAs are using multiple | ||
| 16877 | locking methods as well. Some operating systems don't allow using some of | ||
| 16878 | them simultaneously. | ||
| 16879 | @end deftypevr | ||
| 16880 | |||
| 16881 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mbox-write-locks | ||
| 16882 | |||
| 16883 | @end deftypevr | ||
| 16884 | |||
| 16885 | @deftypevr {@code{dovecot-configuration} parameter} string mbox-lock-timeout | ||
| 16886 | Maximum time to wait for lock (all of them) before aborting. Defaults to | ||
| 16887 | @samp{"5 mins"}. | ||
| 16888 | @end deftypevr | ||
| 16889 | |||
| 16890 | @deftypevr {@code{dovecot-configuration} parameter} string mbox-dotlock-change-timeout | ||
| 16891 | If dotlock exists but the mailbox isn't modified in any way, override the | ||
| 16892 | lock file after this much time. Defaults to @samp{"2 mins"}. | ||
| 16893 | @end deftypevr | ||
| 16894 | |||
| 16895 | @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-dirty-syncs? | ||
| 16896 | When mbox changes unexpectedly we have to fully read it to find out what | ||
| 16897 | changed. If the mbox is large this can take a long time. Since the change | ||
| 16898 | is usually just a newly appended mail, it'd be faster to simply read the new | ||
| 16899 | mails. If this setting is enabled, Dovecot does this but still safely | ||
| 16900 | fallbacks to re-reading the whole mbox file whenever something in mbox isn't | ||
| 16901 | how it's expected to be. The only real downside to this setting is that if | ||
| 16902 | some other MUA changes message flags, Dovecot doesn't notice it | ||
| 16903 | immediately. Note that a full sync is done with SELECT, EXAMINE, EXPUNGE | ||
| 16904 | and CHECK commands. Defaults to @samp{#t}. | ||
| 16905 | @end deftypevr | ||
| 16906 | |||
| 16907 | @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-very-dirty-syncs? | ||
| 16908 | Like @samp{mbox-dirty-syncs}, but don't do full syncs even with SELECT, | ||
| 16909 | EXAMINE, EXPUNGE or CHECK commands. If this is set, @samp{mbox-dirty-syncs} | ||
| 16910 | is ignored. Defaults to @samp{#f}. | ||
| 16911 | @end deftypevr | ||
| 16912 | |||
| 16913 | @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-lazy-writes? | ||
| 16914 | Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK | ||
| 16915 | commands and when closing the mailbox). This is especially useful for POP3 | ||
| 16916 | where clients often delete all mails. The downside is that our changes | ||
| 16917 | aren't immediately visible to other MUAs. Defaults to @samp{#t}. | ||
| 16918 | @end deftypevr | ||
| 16919 | |||
| 16920 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mbox-min-index-size | ||
| 16921 | If mbox size is smaller than this (e.g.@: 100k), don't write index files. | ||
| 16922 | If an index file already exists it's still read, just not updated. Defaults | ||
| 16923 | to @samp{0}. | ||
| 16924 | @end deftypevr | ||
| 16925 | |||
| 16926 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mdbox-rotate-size | ||
| 16927 | Maximum dbox file size until it's rotated. Defaults to @samp{10000000}. | ||
| 16928 | @end deftypevr | ||
| 16929 | |||
| 16930 | @deftypevr {@code{dovecot-configuration} parameter} string mdbox-rotate-interval | ||
| 16931 | Maximum dbox file age until it's rotated. Typically in days. Day begins | ||
| 16932 | from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled. | ||
| 16933 | Defaults to @samp{"1d"}. | ||
| 16934 | @end deftypevr | ||
| 16935 | |||
| 16936 | @deftypevr {@code{dovecot-configuration} parameter} boolean mdbox-preallocate-space? | ||
| 16937 | When creating new mdbox files, immediately preallocate their size to | ||
| 16938 | @samp{mdbox-rotate-size}. This setting currently works only in Linux with | ||
| 16939 | some file systems (ext4, xfs). Defaults to @samp{#f}. | ||
| 16940 | @end deftypevr | ||
| 16941 | |||
| 16942 | @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-dir | ||
| 16943 | sdbox and mdbox support saving mail attachments to external files, which | ||
| 16944 | also allows single instance storage for them. Other backends don't support | ||
| 16945 | this for now. | ||
| 16946 | |||
| 16947 | WARNING: This feature hasn't been tested much yet. Use at your own risk. | ||
| 16948 | |||
| 16949 | Directory root where to store mail attachments. Disabled, if empty. | ||
| 16950 | Defaults to @samp{""}. | ||
| 16951 | @end deftypevr | ||
| 16952 | |||
| 16953 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-attachment-min-size | ||
| 16954 | Attachments smaller than this aren't saved externally. It's also possible | ||
| 16955 | to write a plugin to disable saving specific attachments externally. | ||
| 16956 | Defaults to @samp{128000}. | ||
| 16957 | @end deftypevr | ||
| 16958 | |||
| 16959 | @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-fs | ||
| 16960 | File system backend to use for saving attachments: | ||
| 16961 | @table @code | ||
| 16962 | @item posix | ||
| 16963 | No SiS done by Dovecot (but this might help FS's own deduplication) | ||
| 16964 | @item sis posix | ||
| 16965 | SiS with immediate byte-by-byte comparison during saving | ||
| 16966 | @item sis-queue posix | ||
| 16967 | SiS with delayed comparison and deduplication. | ||
| 16968 | @end table | ||
| 16969 | Defaults to @samp{"sis posix"}. | ||
| 16970 | @end deftypevr | ||
| 16971 | |||
| 16972 | @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-hash | ||
| 16973 | Hash format to use in attachment filenames. You can add any text and | ||
| 16974 | variables: @code{%@{md4@}}, @code{%@{md5@}}, @code{%@{sha1@}}, | ||
| 16975 | @code{%@{sha256@}}, @code{%@{sha512@}}, @code{%@{size@}}. Variables can be | ||
| 16976 | truncated, e.g.@: @code{%@{sha256:80@}} returns only first 80 bits. | ||
| 16977 | Defaults to @samp{"%@{sha1@}"}. | ||
| 16978 | @end deftypevr | ||
| 16979 | |||
| 16980 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-process-limit | ||
| 16981 | |||
| 16982 | Defaults to @samp{100}. | ||
| 16983 | @end deftypevr | ||
| 16984 | |||
| 16985 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-client-limit | ||
| 16986 | |||
| 16987 | Defaults to @samp{1000}. | ||
| 16988 | @end deftypevr | ||
| 16989 | |||
| 16990 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-vsz-limit | ||
| 16991 | Default VSZ (virtual memory size) limit for service processes. This is | ||
| 16992 | mainly intended to catch and kill processes that leak memory before they eat | ||
| 16993 | up everything. Defaults to @samp{256000000}. | ||
| 16994 | @end deftypevr | ||
| 16995 | |||
| 16996 | @deftypevr {@code{dovecot-configuration} parameter} string default-login-user | ||
| 16997 | Login user is internally used by login processes. This is the most | ||
| 16998 | untrusted user in Dovecot system. It shouldn't have access to anything at | ||
| 16999 | all. Defaults to @samp{"dovenull"}. | ||
| 17000 | @end deftypevr | ||
| 17001 | |||
| 17002 | @deftypevr {@code{dovecot-configuration} parameter} string default-internal-user | ||
| 17003 | Internal user is used by unprivileged processes. It should be separate from | ||
| 17004 | login user, so that login processes can't disturb other processes. Defaults | ||
| 17005 | to @samp{"dovecot"}. | ||
| 17006 | @end deftypevr | ||
| 17007 | |||
| 17008 | @deftypevr {@code{dovecot-configuration} parameter} string ssl? | ||
| 17009 | SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>. Defaults to | ||
| 17010 | @samp{"required"}. | ||
| 17011 | @end deftypevr | ||
| 17012 | |||
| 17013 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-cert | ||
| 17014 | PEM encoded X.509 SSL/TLS certificate (public key). Defaults to | ||
| 17015 | @samp{"</etc/dovecot/default.pem"}. | ||
| 17016 | @end deftypevr | ||
| 17017 | |||
| 17018 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-key | ||
| 17019 | PEM encoded SSL/TLS private key. The key is opened before dropping root | ||
| 17020 | privileges, so keep the key file unreadable by anyone but root. Defaults to | ||
| 17021 | @samp{"</etc/dovecot/private/default.pem"}. | ||
| 17022 | @end deftypevr | ||
| 17023 | |||
| 17024 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-key-password | ||
| 17025 | If key file is password protected, give the password here. Alternatively | ||
| 17026 | give it when starting dovecot with -p parameter. Since this file is often | ||
| 17027 | world-readable, you may want to place this setting instead to a different. | ||
| 17028 | Defaults to @samp{""}. | ||
| 17029 | @end deftypevr | ||
| 17030 | |||
| 17031 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-ca | ||
| 17032 | PEM encoded trusted certificate authority. Set this only if you intend to | ||
| 17033 | use @samp{ssl-verify-client-cert? #t}. The file should contain the CA | ||
| 17034 | certificate(s) followed by the matching CRL(s). (e.g.@: @samp{ssl-ca | ||
| 17035 | </etc/ssl/certs/ca.pem}). Defaults to @samp{""}. | ||
| 17036 | @end deftypevr | ||
| 17037 | |||
| 17038 | @deftypevr {@code{dovecot-configuration} parameter} boolean ssl-require-crl? | ||
| 17039 | Require that CRL check succeeds for client certificates. Defaults to | ||
| 17040 | @samp{#t}. | ||
| 17041 | @end deftypevr | ||
| 17042 | |||
| 17043 | @deftypevr {@code{dovecot-configuration} parameter} boolean ssl-verify-client-cert? | ||
| 17044 | Request client to send a certificate. If you also want to require it, set | ||
| 17045 | @samp{auth-ssl-require-client-cert? #t} in auth section. Defaults to | ||
| 17046 | @samp{#f}. | ||
| 17047 | @end deftypevr | ||
| 17048 | |||
| 17049 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-cert-username-field | ||
| 17050 | Which field from certificate to use for username. commonName and | ||
| 17051 | x500UniqueIdentifier are the usual choices. You'll also need to set | ||
| 17052 | @samp{auth-ssl-username-from-cert? #t}. Defaults to @samp{"commonName"}. | ||
| 17053 | @end deftypevr | ||
| 17054 | |||
| 17055 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-min-protocol | ||
| 17056 | Minimum SSL protocol version to accept. Defaults to @samp{"TLSv1"}. | ||
| 17057 | @end deftypevr | ||
| 17058 | |||
| 17059 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-cipher-list | ||
| 17060 | SSL ciphers to use. Defaults to | ||
| 17061 | @samp{"ALL:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@@STRENGTH"}. | ||
| 17062 | @end deftypevr | ||
| 17063 | |||
| 17064 | @deftypevr {@code{dovecot-configuration} parameter} string ssl-crypto-device | ||
| 17065 | SSL crypto device to use, for valid values run "openssl engine". Defaults | ||
| 17066 | to @samp{""}. | ||
| 17067 | @end deftypevr | ||
| 17068 | |||
| 17069 | @deftypevr {@code{dovecot-configuration} parameter} string postmaster-address | ||
| 17070 | Address to use when sending rejection mails. %d expands to recipient | ||
| 17071 | domain. Defaults to @samp{"postmaster@@%d"}. | ||
| 17072 | @end deftypevr | ||
| 17073 | |||
| 17074 | @deftypevr {@code{dovecot-configuration} parameter} string hostname | ||
| 17075 | Hostname to use in various parts of sent mails (e.g.@: in Message-Id) and | ||
| 17076 | in LMTP replies. Default is the system's real hostname@@domain. Defaults | ||
| 17077 | to @samp{""}. | ||
| 17078 | @end deftypevr | ||
| 17079 | |||
| 17080 | @deftypevr {@code{dovecot-configuration} parameter} boolean quota-full-tempfail? | ||
| 17081 | If user is over quota, return with temporary failure instead of bouncing the | ||
| 17082 | mail. Defaults to @samp{#f}. | ||
| 17083 | @end deftypevr | ||
| 17084 | |||
| 17085 | @deftypevr {@code{dovecot-configuration} parameter} file-name sendmail-path | ||
| 17086 | Binary to use for sending mails. Defaults to @samp{"/usr/sbin/sendmail"}. | ||
| 17087 | @end deftypevr | ||
| 17088 | |||
| 17089 | @deftypevr {@code{dovecot-configuration} parameter} string submission-host | ||
| 17090 | If non-empty, send mails via this SMTP host[:port] instead of sendmail. | ||
| 17091 | Defaults to @samp{""}. | ||
| 17092 | @end deftypevr | ||
| 17093 | |||
| 17094 | @deftypevr {@code{dovecot-configuration} parameter} string rejection-subject | ||
| 17095 | Subject: header to use for rejection mails. You can use the same variables | ||
| 17096 | as for @samp{rejection-reason} below. Defaults to @samp{"Rejected: %s"}. | ||
| 17097 | @end deftypevr | ||
| 17098 | |||
| 17099 | @deftypevr {@code{dovecot-configuration} parameter} string rejection-reason | ||
| 17100 | Human readable error message for rejection mails. You can use variables: | ||
| 17101 | |||
| 17102 | @table @code | ||
| 17103 | @item %n | ||
| 17104 | CRLF | ||
| 17105 | @item %r | ||
| 17106 | reason | ||
| 17107 | @item %s | ||
| 17108 | original subject | ||
| 17109 | @item %t | ||
| 17110 | recipient | ||
| 17111 | @end table | ||
| 17112 | Defaults to @samp{"Your message to <%t> was automatically rejected:%n%r"}. | ||
| 17113 | @end deftypevr | ||
| 17114 | |||
| 17115 | @deftypevr {@code{dovecot-configuration} parameter} string recipient-delimiter | ||
| 17116 | Delimiter character between local-part and detail in email address. | ||
| 17117 | Defaults to @samp{"+"}. | ||
| 17118 | @end deftypevr | ||
| 17119 | |||
| 17120 | @deftypevr {@code{dovecot-configuration} parameter} string lda-original-recipient-header | ||
| 17121 | Header where the original recipient address (SMTP's RCPT TO: address) is | ||
| 17122 | taken from if not available elsewhere. With dovecot-lda -a parameter | ||
| 17123 | overrides this. A commonly used header for this is X-Original-To. Defaults | ||
| 17124 | to @samp{""}. | ||
| 17125 | @end deftypevr | ||
| 17126 | |||
| 17127 | @deftypevr {@code{dovecot-configuration} parameter} boolean lda-mailbox-autocreate? | ||
| 17128 | Should saving a mail to a nonexistent mailbox automatically create it?. | ||
| 17129 | Defaults to @samp{#f}. | ||
| 17130 | @end deftypevr | ||
| 17131 | |||
| 17132 | @deftypevr {@code{dovecot-configuration} parameter} boolean lda-mailbox-autosubscribe? | ||
| 17133 | Should automatically created mailboxes be also automatically subscribed?. | ||
| 17134 | Defaults to @samp{#f}. | ||
| 17135 | @end deftypevr | ||
| 17136 | |||
| 17137 | @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer imap-max-line-length | ||
| 17138 | Maximum IMAP command line length. Some clients generate very long command | ||
| 17139 | lines with huge mailboxes, so you may need to raise this if you get "Too | ||
| 17140 | long argument" or "IMAP command line too large" errors often. Defaults to | ||
| 17141 | @samp{64000}. | ||
| 17142 | @end deftypevr | ||
| 17143 | |||
| 17144 | @deftypevr {@code{dovecot-configuration} parameter} string imap-logout-format | ||
| 17145 | IMAP logout format string: | ||
| 17146 | @table @code | ||
| 17147 | @item %i | ||
| 17148 | total number of bytes read from client | ||
| 17149 | @item %o | ||
| 17150 | total number of bytes sent to client. | ||
| 17151 | @end table | ||
| 17152 | See @file{doc/wiki/Variables.txt} for a list of all the variables you can | ||
| 17153 | use. Defaults to @samp{"in=%i out=%o deleted=%@{deleted@} | ||
| 17154 | expunged=%@{expunged@} trashed=%@{trashed@} hdr_count=%@{fetch_hdr_count@} | ||
| 17155 | hdr_bytes=%@{fetch_hdr_bytes@} body_count=%@{fetch_body_count@} | ||
| 17156 | body_bytes=%@{fetch_body_bytes@}"}. | ||
| 17157 | @end deftypevr | ||
| 17158 | |||
| 17159 | @deftypevr {@code{dovecot-configuration} parameter} string imap-capability | ||
| 17160 | Override the IMAP CAPABILITY response. If the value begins with '+', add | ||
| 17161 | the given capabilities on top of the defaults (e.g.@: +XFOO XBAR). Defaults | ||
| 17162 | to @samp{""}. | ||
| 17163 | @end deftypevr | ||
| 17164 | |||
| 17165 | @deftypevr {@code{dovecot-configuration} parameter} string imap-idle-notify-interval | ||
| 17166 | How long to wait between "OK Still here" notifications when client is | ||
| 17167 | IDLEing. Defaults to @samp{"2 mins"}. | ||
| 17168 | @end deftypevr | ||
| 17169 | |||
| 17170 | @deftypevr {@code{dovecot-configuration} parameter} string imap-id-send | ||
| 17171 | ID field names and values to send to clients. Using * as the value makes | ||
| 17172 | Dovecot use the default value. The following fields have default values | ||
| 17173 | currently: name, version, os, os-version, support-url, support-email. | ||
| 17174 | Defaults to @samp{""}. | ||
| 17175 | @end deftypevr | ||
| 17176 | |||
| 17177 | @deftypevr {@code{dovecot-configuration} parameter} string imap-id-log | ||
| 17178 | ID fields sent by client to log. * means everything. Defaults to | ||
| 17179 | @samp{""}. | ||
| 17180 | @end deftypevr | ||
| 17181 | |||
| 17182 | @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list imap-client-workarounds | ||
| 17183 | Workarounds for various client bugs: | ||
| 17184 | |||
| 17185 | @table @code | ||
| 17186 | @item delay-newmail | ||
| 17187 | Send EXISTS/RECENT new mail notifications only when replying to NOOP and | ||
| 17188 | CHECK commands. Some clients ignore them otherwise, for example OSX Mail | ||
| 17189 | (<v2.1). Outlook Express breaks more badly though, without this it may show | ||
| 17190 | user "Message no longer in server" errors. Note that OE6 still breaks even | ||
| 17191 | with this workaround if synchronization is set to "Headers Only". | ||
| 17192 | |||
| 17193 | @item tb-extra-mailbox-sep | ||
| 17194 | Thunderbird gets somehow confused with LAYOUT=fs (mbox and dbox) and adds | ||
| 17195 | extra @samp{/} suffixes to mailbox names. This option causes Dovecot to | ||
| 17196 | ignore the extra @samp{/} instead of treating it as invalid mailbox name. | ||
| 17197 | |||
| 17198 | @item tb-lsub-flags | ||
| 17199 | Show \Noselect flags for LSUB replies with LAYOUT=fs (e.g.@: mbox). This | ||
| 17200 | makes Thunderbird realize they aren't selectable and show them greyed out, | ||
| 17201 | instead of only later giving "not selectable" popup error. | ||
| 17202 | @end table | ||
| 17203 | Defaults to @samp{()}. | ||
| 17204 | @end deftypevr | ||
| 17205 | |||
| 17206 | @deftypevr {@code{dovecot-configuration} parameter} string imap-urlauth-host | ||
| 17207 | Host allowed in URLAUTH URLs sent by client. "*" allows all. Defaults to | ||
| 17208 | @samp{""}. | ||
| 17209 | @end deftypevr | ||
| 17210 | |||
| 17211 | |||
| 17212 | Whew! Lots of configuration options. The nice thing about it though is that | ||
| 17213 | Guix has a complete interface to Dovecot's configuration language. This | ||
| 17214 | allows not only a nice way to declare configurations, but also offers | ||
| 17215 | reflective capabilities as well: users can write code to inspect and | ||
| 17216 | transform configurations from within Scheme. | ||
| 17217 | |||
| 17218 | However, it could be that you just want to get a @code{dovecot.conf} up and | ||
| 17219 | running. In that case, you can pass an @code{opaque-dovecot-configuration} | ||
| 17220 | as the @code{#:config} parameter to @code{dovecot-service}. As its name | ||
| 17221 | indicates, an opaque configuration does not have easy reflective | ||
| 17222 | capabilities. | ||
| 17223 | |||
| 17224 | Available @code{opaque-dovecot-configuration} fields are: | ||
| 17225 | |||
| 17226 | @deftypevr {@code{opaque-dovecot-configuration} parameter} package dovecot | ||
| 17227 | The dovecot package. | ||
| 17228 | @end deftypevr | ||
| 17229 | |||
| 17230 | @deftypevr {@code{opaque-dovecot-configuration} parameter} string string | ||
| 17231 | The contents of the @code{dovecot.conf}, as a string. | ||
| 17232 | @end deftypevr | ||
| 17233 | |||
| 17234 | For example, if your @code{dovecot.conf} is just the empty string, you could | ||
| 17235 | instantiate a dovecot service like this: | ||
| 17236 | |||
| 17237 | @example | ||
| 17238 | (dovecot-service #:config | ||
| 17239 | (opaque-dovecot-configuration | ||
| 17240 | (string ""))) | ||
| 17241 | @end example | ||
| 17242 | |||
| 17243 | @subsubheading OpenSMTPD Service | ||
| 17244 | |||
| 17245 | @deffn {Scheme Variable} opensmtpd-service-type | ||
| 17246 | This is the type of the @uref{https://www.opensmtpd.org, OpenSMTPD} service, | ||
| 17247 | whose value should be an @code{opensmtpd-configuration} object as in this | ||
| 17248 | example: | ||
| 17249 | |||
| 17250 | @example | ||
| 17251 | (service opensmtpd-service-type | ||
| 17252 | (opensmtpd-configuration | ||
| 17253 | (config-file (local-file "./my-smtpd.conf")))) | ||
| 17254 | @end example | ||
| 17255 | @end deffn | ||
| 17256 | |||
| 17257 | @deftp {Data Type} opensmtpd-configuration | ||
| 17258 | Data type representing the configuration of opensmtpd. | ||
| 17259 | |||
| 17260 | @table @asis | ||
| 17261 | @item @code{package} (default: @var{opensmtpd}) | ||
| 17262 | Package object of the OpenSMTPD SMTP server. | ||
| 17263 | |||
| 17264 | @item @code{config-file} (default: @var{%default-opensmtpd-file}) | ||
| 17265 | File-like object of the OpenSMTPD configuration file to use. By default it | ||
| 17266 | listens on the loopback network interface, and allows for mail from users | ||
| 17267 | and daemons on the local machine, as well as permitting email to remote | ||
| 17268 | servers. Run @command{man smtpd.conf} for more information. | ||
| 17269 | |||
| 17270 | @end table | ||
| 17271 | @end deftp | ||
| 17272 | |||
| 17273 | @subsubheading Exim Service | ||
| 17274 | |||
| 17275 | @cindex mail transfer agent (MTA) | ||
| 17276 | @cindex MTA (mail transfer agent) | ||
| 17277 | @cindex SMTP | ||
| 17278 | |||
| 17279 | @deffn {Scheme Variable} exim-service-type | ||
| 17280 | This is the type of the @uref{https://exim.org, Exim} mail transfer agent | ||
| 17281 | (MTA), whose value should be an @code{exim-configuration} object as in this | ||
| 17282 | example: | ||
| 17283 | |||
| 17284 | @example | ||
| 17285 | (service exim-service-type | ||
| 17286 | (exim-configuration | ||
| 17287 | (config-file (local-file "./my-exim.conf")))) | ||
| 17288 | @end example | ||
| 17289 | @end deffn | ||
| 17290 | |||
| 17291 | In order to use an @code{exim-service-type} service you must also have a | ||
| 17292 | @code{mail-aliases-service-type} service present in your | ||
| 17293 | @code{operating-system} (even if it has no aliases). | ||
| 17294 | |||
| 17295 | @deftp {Data Type} exim-configuration | ||
| 17296 | Data type representing the configuration of exim. | ||
| 17297 | |||
| 17298 | @table @asis | ||
| 17299 | @item @code{package} (default: @var{exim}) | ||
| 17300 | Package object of the Exim server. | ||
| 17301 | |||
| 17302 | @item @code{config-file} (default: @code{#f}) | ||
| 17303 | File-like object of the Exim configuration file to use. If its value is | ||
| 17304 | @code{#f} then use the default configuration file from the package provided | ||
| 17305 | in @code{package}. The resulting configuration file is loaded after setting | ||
| 17306 | the @code{exim_user} and @code{exim_group} configuration variables. | ||
| 17307 | |||
| 17308 | @end table | ||
| 17309 | @end deftp | ||
| 17310 | |||
| 17311 | @subsubheading Mail Aliases Service | ||
| 17312 | |||
| 17313 | @cindex email aliases | ||
| 17314 | @cindex aliases, for email addresses | ||
| 17315 | |||
| 17316 | @deffn {Scheme Variable} mail-aliases-service-type | ||
| 17317 | This is the type of the service which provides @code{/etc/aliases}, | ||
| 17318 | specifying how to deliver mail to users on this system. | ||
| 17319 | |||
| 17320 | @example | ||
| 17321 | (service mail-aliases-service-type | ||
| 17322 | '(("postmaster" "bob") | ||
| 17323 | ("bob" "bob@@example.com" "bob@@example2.com"))) | ||
| 17324 | @end example | ||
| 17325 | @end deffn | ||
| 17326 | |||
| 17327 | The configuration for a @code{mail-aliases-service-type} service is an | ||
| 17328 | association list denoting how to deliver mail that comes to this | ||
| 17329 | system. Each entry is of the form @code{(alias addresses ...)}, with | ||
| 17330 | @code{alias} specifying the local alias and @code{addresses} specifying | ||
| 17331 | where to deliver this user's mail. | ||
| 17332 | |||
| 17333 | The aliases aren't required to exist as users on the local system. In the | ||
| 17334 | above example, there doesn't need to be a @code{postmaster} entry in the | ||
| 17335 | @code{operating-system}'s @code{user-accounts} in order to deliver the | ||
| 17336 | @code{postmaster} mail to @code{bob} (which subsequently would deliver mail | ||
| 17337 | to @code{bob@@example.com} and @code{bob@@example2.com}). | ||
| 17338 | |||
| 17339 | @subsubheading GNU Mailutils IMAP4 Daemon | ||
| 17340 | @cindex GNU Mailutils IMAP4 Daemon | ||
| 17341 | |||
| 17342 | @deffn {Scheme-Variable} imap4d-service-type | ||
| 17343 | This is the type of the GNU Mailutils IMAP4 Daemon (@pxref{imap4d,,, | ||
| 17344 | mailutils, GNU Mailutils Manual}), whose value should be an | ||
| 17345 | @code{imap4d-configuration} object as in this example: | ||
| 17346 | |||
| 17347 | @example | ||
| 17348 | (service imap4d-service-type | ||
| 17349 | (imap4d-configuration | ||
| 17350 | (config-file (local-file "imap4d.conf")))) | ||
| 17351 | @end example | ||
| 17352 | @end deffn | ||
| 17353 | |||
| 17354 | @deftp {Datentyp} imap4d-configuration | ||
| 17355 | Datentyp, der die Konfiguration von @command{imap4d} repräsentiert. | ||
| 17356 | |||
| 17357 | @table @asis | ||
| 17358 | @item @code{package} (Vorgabe: @code{mailutils}) | ||
| 17359 | The package that provides @command{imap4d}. | ||
| 17360 | |||
| 17361 | @item @code{config-file} (Vorgabe: @code{%default-imap4d-config-file}) | ||
| 17362 | File-like object of the configuration file to use, by default it will listen | ||
| 17363 | on TCP port 143 of @code{localhost}. @xref{Conf-imap4d,,, mailutils, GNU | ||
| 17364 | Mailutils Manual}, for details. | ||
| 17365 | |||
| 17366 | @end table | ||
| 17367 | @end deftp | ||
| 17368 | |||
| 17369 | @node Kurznachrichtendienste | ||
| 17370 | @subsection Kurznachrichtendienste | ||
| 17371 | |||
| 17372 | @cindex messaging | ||
| 17373 | @cindex jabber | ||
| 17374 | @cindex XMPP | ||
| 17375 | The @code{(gnu services messaging)} module provides Guix service definitions | ||
| 17376 | for messaging services: currently only Prosody is supported. | ||
| 17377 | |||
| 17378 | @subsubheading Prosody Service | ||
| 17379 | |||
| 17380 | @deffn {Scheme Variable} prosody-service-type | ||
| 17381 | This is the type for the @uref{https://prosody.im, Prosody XMPP | ||
| 17382 | communication server}. Its value must be a @code{prosody-configuration} | ||
| 17383 | record as in this example: | ||
| 17384 | |||
| 17385 | @example | ||
| 17386 | (service prosody-service-type | ||
| 17387 | (prosody-configuration | ||
| 17388 | (modules-enabled (cons "groups" "mam" %default-modules-enabled)) | ||
| 17389 | (int-components | ||
| 17390 | (list | ||
| 17391 | (int-component-configuration | ||
| 17392 | (hostname "conference.example.net") | ||
| 17393 | (plugin "muc") | ||
| 17394 | (mod-muc (mod-muc-configuration))))) | ||
| 17395 | (virtualhosts | ||
| 17396 | (list | ||
| 17397 | (virtualhost-configuration | ||
| 17398 | (domain "example.net")))))) | ||
| 17399 | @end example | ||
| 17400 | |||
| 17401 | See below for details about @code{prosody-configuration}. | ||
| 17402 | |||
| 17403 | @end deffn | ||
| 17404 | |||
| 17405 | By default, Prosody does not need much configuration. Only one | ||
| 17406 | @code{virtualhosts} field is needed: it specifies the domain you wish | ||
| 17407 | Prosody to serve. | ||
| 17408 | |||
| 17409 | You can perform various sanity checks on the generated configuration with | ||
| 17410 | the @code{prosodyctl check} command. | ||
| 17411 | |||
| 17412 | Prosodyctl will also help you to import certificates from the | ||
| 17413 | @code{letsencrypt} directory so that the @code{prosody} user can access | ||
| 17414 | them. See @url{https://prosody.im/doc/letsencrypt}. | ||
| 17415 | |||
| 17416 | @example | ||
| 17417 | prosodyctl --root cert import /etc/letsencrypt/live | ||
| 17418 | @end example | ||
| 17419 | |||
| 17420 | The available configuration parameters follow. Each parameter definition is | ||
| 17421 | preceded by its type; for example, @samp{string-list foo} indicates that the | ||
| 17422 | @code{foo} parameter should be specified as a list of strings. Types | ||
| 17423 | starting with @code{maybe-} denote parameters that won't show up in | ||
| 17424 | @code{prosody.cfg.lua} when their value is @code{'disabled}. | ||
| 17425 | |||
| 17426 | There is also a way to specify the configuration as a string, if you have an | ||
| 17427 | old @code{prosody.cfg.lua} file that you want to port over from some other | ||
| 17428 | system; see the end for more details. | ||
| 17429 | |||
| 17430 | The @code{file-object} type designates either a file-like object | ||
| 17431 | (@pxref{G-Ausdrücke, file-like objects}) or a file name. | ||
| 17432 | |||
| 17433 | @c The following documentation was initially generated by | ||
| 17434 | @c (generate-documentation) in (gnu services messaging). Manually maintained | ||
| 17435 | @c documentation is better, so we shouldn't hesitate to edit below as | ||
| 17436 | @c needed. However if the change you want to make to this documentation | ||
| 17437 | @c can be done in an automated way, it's probably easier to change | ||
| 17438 | @c (generate-documentation) than to make it below and have to deal with | ||
| 17439 | @c the churn as Prosody updates. | ||
| 17440 | |||
| 17441 | Available @code{prosody-configuration} fields are: | ||
| 17442 | |||
| 17443 | @deftypevr {@code{prosody-configuration} parameter} package prosody | ||
| 17444 | The Prosody package. | ||
| 17445 | @end deftypevr | ||
| 17446 | |||
| 17447 | @deftypevr {@code{prosody-configuration} parameter} file-name data-path | ||
| 17448 | Location of the Prosody data storage directory. See | ||
| 17449 | @url{https://prosody.im/doc/configure}. Defaults to | ||
| 17450 | @samp{"/var/lib/prosody"}. | ||
| 17451 | @end deftypevr | ||
| 17452 | |||
| 17453 | @deftypevr {@code{prosody-configuration} parameter} file-object-list plugin-paths | ||
| 17454 | Additional plugin directories. They are searched in all the specified paths | ||
| 17455 | in order. See @url{https://prosody.im/doc/plugins_directory}. Defaults to | ||
| 17456 | @samp{()}. | ||
| 17457 | @end deftypevr | ||
| 17458 | |||
| 17459 | @deftypevr {@code{prosody-configuration} parameter} file-name certificates | ||
| 17460 | Every virtual host and component needs a certificate so that clients and | ||
| 17461 | servers can securely verify its identity. Prosody will automatically load | ||
| 17462 | certificates/keys from the directory specified here. Defaults to | ||
| 17463 | @samp{"/etc/prosody/certs"}. | ||
| 17464 | @end deftypevr | ||
| 17465 | |||
| 17466 | @deftypevr {@code{prosody-configuration} parameter} string-list admins | ||
| 17467 | This is a list of accounts that are admins for the server. Note that you | ||
| 17468 | must create the accounts separately. See | ||
| 17469 | @url{https://prosody.im/doc/admins} and | ||
| 17470 | @url{https://prosody.im/doc/creating_accounts}. Example: @code{(admins | ||
| 17471 | '("user1@@example.com" "user2@@example.net"))} Defaults to @samp{()}. | ||
| 17472 | @end deftypevr | ||
| 17473 | |||
| 17474 | @deftypevr {@code{prosody-configuration} parameter} boolean use-libevent? | ||
| 17475 | Enable use of libevent for better performance under high load. See | ||
| 17476 | @url{https://prosody.im/doc/libevent}. Defaults to @samp{#f}. | ||
| 17477 | @end deftypevr | ||
| 17478 | |||
| 17479 | @deftypevr {@code{prosody-configuration} parameter} module-list modules-enabled | ||
| 17480 | This is the list of modules Prosody will load on startup. It looks for | ||
| 17481 | @code{mod_modulename.lua} in the plugins folder, so make sure that exists | ||
| 17482 | too. Documentation on modules can be found at: | ||
| 17483 | @url{https://prosody.im/doc/modules}. Defaults to @samp{("roster" | ||
| 17484 | "saslauth" "tls" "dialback" "disco" "carbons" "private" "blocklist" "vcard" | ||
| 17485 | "version" "uptime" "time" "ping" "pep" "register" "admin_adhoc")}. | ||
| 17486 | @end deftypevr | ||
| 17487 | |||
| 17488 | @deftypevr {@code{prosody-configuration} parameter} string-list modules-disabled | ||
| 17489 | @samp{"offline"}, @samp{"c2s"} and @samp{"s2s"} are auto-loaded, but should | ||
| 17490 | you want to disable them then add them to this list. Defaults to @samp{()}. | ||
| 17491 | @end deftypevr | ||
| 17492 | |||
| 17493 | @deftypevr {@code{prosody-configuration} parameter} file-object groups-file | ||
| 17494 | Path to a text file where the shared groups are defined. If this path is | ||
| 17495 | empty then @samp{mod_groups} does nothing. See | ||
| 17496 | @url{https://prosody.im/doc/modules/mod_groups}. Defaults to | ||
| 17497 | @samp{"/var/lib/prosody/sharedgroups.txt"}. | ||
| 17498 | @end deftypevr | ||
| 17499 | |||
| 17500 | @deftypevr {@code{prosody-configuration} parameter} boolean allow-registration? | ||
| 17501 | Disable account creation by default, for security. See | ||
| 17502 | @url{https://prosody.im/doc/creating_accounts}. Defaults to @samp{#f}. | ||
| 17503 | @end deftypevr | ||
| 17504 | |||
| 17505 | @deftypevr {@code{prosody-configuration} parameter} maybe-ssl-configuration ssl | ||
| 17506 | These are the SSL/TLS-related settings. Most of them are disabled so to use | ||
| 17507 | Prosody's defaults. If you do not completely understand these options, do | ||
| 17508 | not add them to your config, it is easy to lower the security of your server | ||
| 17509 | using them. See @url{https://prosody.im/doc/advanced_ssl_config}. | ||
| 17510 | |||
| 17511 | Available @code{ssl-configuration} fields are: | ||
| 17512 | |||
| 17513 | @deftypevr {@code{ssl-configuration} parameter} maybe-string protocol | ||
| 17514 | This determines what handshake to use. | ||
| 17515 | @end deftypevr | ||
| 17516 | |||
| 17517 | @deftypevr {@code{ssl-configuration} parameter} maybe-file-name key | ||
| 17518 | Path to your private key file. | ||
| 17519 | @end deftypevr | ||
| 17520 | |||
| 17521 | @deftypevr {@code{ssl-configuration} parameter} maybe-file-name certificate | ||
| 17522 | Path to your certificate file. | ||
| 17523 | @end deftypevr | ||
| 17524 | |||
| 17525 | @deftypevr {@code{ssl-configuration} parameter} file-object capath | ||
| 17526 | Path to directory containing root certificates that you wish Prosody to | ||
| 17527 | trust when verifying the certificates of remote servers. Defaults to | ||
| 17528 | @samp{"/etc/ssl/certs"}. | ||
| 17529 | @end deftypevr | ||
| 17530 | |||
| 17531 | @deftypevr {@code{ssl-configuration} parameter} maybe-file-object cafile | ||
| 17532 | Path to a file containing root certificates that you wish Prosody to trust. | ||
| 17533 | Similar to @code{capath} but with all certificates concatenated together. | ||
| 17534 | @end deftypevr | ||
| 17535 | |||
| 17536 | @deftypevr {@code{ssl-configuration} parameter} maybe-string-list verify | ||
| 17537 | A list of verification options (these mostly map to OpenSSL's | ||
| 17538 | @code{set_verify()} flags). | ||
| 17539 | @end deftypevr | ||
| 17540 | |||
| 17541 | @deftypevr {@code{ssl-configuration} parameter} maybe-string-list options | ||
| 17542 | A list of general options relating to SSL/TLS. These map to OpenSSL's | ||
| 17543 | @code{set_options()}. For a full list of options available in LuaSec, see | ||
| 17544 | the LuaSec source. | ||
| 17545 | @end deftypevr | ||
| 17546 | |||
| 17547 | @deftypevr {@code{ssl-configuration} parameter} maybe-non-negative-integer depth | ||
| 17548 | How long a chain of certificate authorities to check when looking for a | ||
| 17549 | trusted root certificate. | ||
| 17550 | @end deftypevr | ||
| 17551 | |||
| 17552 | @deftypevr {@code{ssl-configuration} parameter} maybe-string ciphers | ||
| 17553 | An OpenSSL cipher string. This selects what ciphers Prosody will offer to | ||
| 17554 | clients, and in what order. | ||
| 17555 | @end deftypevr | ||
| 17556 | |||
| 17557 | @deftypevr {@code{ssl-configuration} parameter} maybe-file-name dhparam | ||
| 17558 | A path to a file containing parameters for Diffie-Hellman key exchange. You | ||
| 17559 | can create such a file with: @code{openssl dhparam -out | ||
| 17560 | /etc/prosody/certs/dh-2048.pem 2048} | ||
| 17561 | @end deftypevr | ||
| 17562 | |||
| 17563 | @deftypevr {@code{ssl-configuration} parameter} maybe-string curve | ||
| 17564 | Curve for Elliptic curve Diffie-Hellman. Prosody's default is | ||
| 17565 | @samp{"secp384r1"}. | ||
| 17566 | @end deftypevr | ||
| 17567 | |||
| 17568 | @deftypevr {@code{ssl-configuration} parameter} maybe-string-list verifyext | ||
| 17569 | A list of "extra" verification options. | ||
| 17570 | @end deftypevr | ||
| 17571 | |||
| 17572 | @deftypevr {@code{ssl-configuration} parameter} maybe-string password | ||
| 17573 | Password for encrypted private keys. | ||
| 17574 | @end deftypevr | ||
| 17575 | |||
| 17576 | @end deftypevr | ||
| 17577 | |||
| 17578 | @deftypevr {@code{prosody-configuration} parameter} boolean c2s-require-encryption? | ||
| 17579 | Whether to force all client-to-server connections to be encrypted or not. | ||
| 17580 | See @url{https://prosody.im/doc/modules/mod_tls}. Defaults to @samp{#f}. | ||
| 17581 | @end deftypevr | ||
| 17582 | |||
| 17583 | @deftypevr {@code{prosody-configuration} parameter} string-list disable-sasl-mechanisms | ||
| 17584 | Set of mechanisms that will never be offered. See | ||
| 17585 | @url{https://prosody.im/doc/modules/mod_saslauth}. Defaults to | ||
| 17586 | @samp{("DIGEST-MD5")}. | ||
| 17587 | @end deftypevr | ||
| 17588 | |||
| 17589 | @deftypevr {@code{prosody-configuration} parameter} boolean s2s-require-encryption? | ||
| 17590 | Whether to force all server-to-server connections to be encrypted or not. | ||
| 17591 | See @url{https://prosody.im/doc/modules/mod_tls}. Defaults to @samp{#f}. | ||
| 17592 | @end deftypevr | ||
| 17593 | |||
| 17594 | @deftypevr {@code{prosody-configuration} parameter} boolean s2s-secure-auth? | ||
| 17595 | Whether to require encryption and certificate authentication. This provides | ||
| 17596 | ideal security, but requires servers you communicate with to support | ||
| 17597 | encryption AND present valid, trusted certificates. See | ||
| 17598 | @url{https://prosody.im/doc/s2s#security}. Defaults to @samp{#f}. | ||
| 17599 | @end deftypevr | ||
| 17600 | |||
| 17601 | @deftypevr {@code{prosody-configuration} parameter} string-list s2s-insecure-domains | ||
| 17602 | Many servers don't support encryption or have invalid or self-signed | ||
| 17603 | certificates. You can list domains here that will not be required to | ||
| 17604 | authenticate using certificates. They will be authenticated using DNS. See | ||
| 17605 | @url{https://prosody.im/doc/s2s#security}. Defaults to @samp{()}. | ||
| 17606 | @end deftypevr | ||
| 17607 | |||
| 17608 | @deftypevr {@code{prosody-configuration} parameter} string-list s2s-secure-domains | ||
| 17609 | Even if you leave @code{s2s-secure-auth?} disabled, you can still require | ||
| 17610 | valid certificates for some domains by specifying a list here. See | ||
| 17611 | @url{https://prosody.im/doc/s2s#security}. Defaults to @samp{()}. | ||
| 17612 | @end deftypevr | ||
| 17613 | |||
| 17614 | @deftypevr {@code{prosody-configuration} parameter} string authentication | ||
| 17615 | Select the authentication backend to use. The default provider stores | ||
| 17616 | passwords in plaintext and uses Prosody's configured data storage to store | ||
| 17617 | the authentication data. If you do not trust your server please see | ||
| 17618 | @url{https://prosody.im/doc/modules/mod_auth_internal_hashed} for | ||
| 17619 | information about using the hashed backend. See also | ||
| 17620 | @url{https://prosody.im/doc/authentication} Defaults to | ||
| 17621 | @samp{"internal_plain"}. | ||
| 17622 | @end deftypevr | ||
| 17623 | |||
| 17624 | @deftypevr {@code{prosody-configuration} parameter} maybe-string log | ||
| 17625 | Set logging options. Advanced logging configuration is not yet supported by | ||
| 17626 | the Prosody service. See @url{https://prosody.im/doc/logging}. Defaults to | ||
| 17627 | @samp{"*syslog"}. | ||
| 17628 | @end deftypevr | ||
| 17629 | |||
| 17630 | @deftypevr {@code{prosody-configuration} parameter} file-name pidfile | ||
| 17631 | File to write pid in. See @url{https://prosody.im/doc/modules/mod_posix}. | ||
| 17632 | Defaults to @samp{"/var/run/prosody/prosody.pid"}. | ||
| 17633 | @end deftypevr | ||
| 17634 | |||
| 17635 | @deftypevr {@code{prosody-configuration} parameter} maybe-non-negative-integer http-max-content-size | ||
| 17636 | Maximum allowed size of the HTTP body (in bytes). | ||
| 17637 | @end deftypevr | ||
| 17638 | |||
| 17639 | @deftypevr {@code{prosody-configuration} parameter} maybe-string http-external-url | ||
| 17640 | Some modules expose their own URL in various ways. This URL is built from | ||
| 17641 | the protocol, host and port used. If Prosody sits behind a proxy, the | ||
| 17642 | public URL will be @code{http-external-url} instead. See | ||
| 17643 | @url{https://prosody.im/doc/http#external_url}. | ||
| 17644 | @end deftypevr | ||
| 17645 | |||
| 17646 | @deftypevr {@code{prosody-configuration} parameter} virtualhost-configuration-list virtualhosts | ||
| 17647 | A host in Prosody is a domain on which user accounts can be created. For | ||
| 17648 | example if you want your users to have addresses like | ||
| 17649 | @samp{"john.smith@@example.com"} then you need to add a host | ||
| 17650 | @samp{"example.com"}. All options in this list will apply only to this | ||
| 17651 | host. | ||
| 17652 | |||
| 17653 | Note: the name "virtual" host is used in configuration to avoid confusion | ||
| 17654 | with the actual physical host that Prosody is installed on. A single | ||
| 17655 | Prosody instance can serve many domains, each one defined as a VirtualHost | ||
| 17656 | entry in Prosody's configuration. Conversely a server that hosts a single | ||
| 17657 | domain would have just one VirtualHost entry. | ||
| 17658 | |||
| 17659 | See @url{https://prosody.im/doc/configure#virtual_host_settings}. | ||
| 17660 | |||
| 17661 | Available @code{virtualhost-configuration} fields are: | ||
| 17662 | |||
| 17663 | all these @code{prosody-configuration} fields: @code{admins}, | ||
| 17664 | @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, | ||
| 17665 | @code{groups-file}, @code{allow-registration?}, @code{ssl}, | ||
| 17666 | @code{c2s-require-encryption?}, @code{disable-sasl-mechanisms}, | ||
| 17667 | @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, | ||
| 17668 | @code{s2s-insecure-domains}, @code{s2s-secure-domains}, | ||
| 17669 | @code{authentication}, @code{log}, @code{http-max-content-size}, | ||
| 17670 | @code{http-external-url}, @code{raw-content}, plus: | ||
| 17671 | @deftypevr {@code{virtualhost-configuration} parameter} string domain | ||
| 17672 | Domain you wish Prosody to serve. | ||
| 17673 | @end deftypevr | ||
| 17674 | |||
| 17675 | @end deftypevr | ||
| 17676 | |||
| 17677 | @deftypevr {@code{prosody-configuration} parameter} int-component-configuration-list int-components | ||
| 17678 | Components are extra services on a server which are available to clients, | ||
| 17679 | usually on a subdomain of the main server (such as | ||
| 17680 | @samp{"mycomponent.example.com"}). Example components might be chatroom | ||
| 17681 | servers, user directories, or gateways to other protocols. | ||
| 17682 | |||
| 17683 | Internal components are implemented with Prosody-specific plugins. To add | ||
| 17684 | an internal component, you simply fill the hostname field, and the plugin | ||
| 17685 | you wish to use for the component. | ||
| 17686 | |||
| 17687 | See @url{https://prosody.im/doc/components}. Defaults to @samp{()}. | ||
| 17688 | |||
| 17689 | Available @code{int-component-configuration} fields are: | ||
| 17690 | |||
| 17691 | all these @code{prosody-configuration} fields: @code{admins}, | ||
| 17692 | @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, | ||
| 17693 | @code{groups-file}, @code{allow-registration?}, @code{ssl}, | ||
| 17694 | @code{c2s-require-encryption?}, @code{disable-sasl-mechanisms}, | ||
| 17695 | @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, | ||
| 17696 | @code{s2s-insecure-domains}, @code{s2s-secure-domains}, | ||
| 17697 | @code{authentication}, @code{log}, @code{http-max-content-size}, | ||
| 17698 | @code{http-external-url}, @code{raw-content}, plus: | ||
| 17699 | @deftypevr {@code{int-component-configuration} parameter} string hostname | ||
| 17700 | Hostname of the component. | ||
| 17701 | @end deftypevr | ||
| 17702 | |||
| 17703 | @deftypevr {@code{int-component-configuration} parameter} string plugin | ||
| 17704 | Plugin you wish to use for the component. | ||
| 17705 | @end deftypevr | ||
| 17706 | |||
| 17707 | @deftypevr {@code{int-component-configuration} parameter} maybe-mod-muc-configuration mod-muc | ||
| 17708 | Multi-user chat (MUC) is Prosody's module for allowing you to create hosted | ||
| 17709 | chatrooms/conferences for XMPP users. | ||
| 17710 | |||
| 17711 | General information on setting up and using multi-user chatrooms can be | ||
| 17712 | found in the "Chatrooms" documentation | ||
| 17713 | (@url{https://prosody.im/doc/chatrooms}), which you should read if you are | ||
| 17714 | new to XMPP chatrooms. | ||
| 17715 | |||
| 17716 | See also @url{https://prosody.im/doc/modules/mod_muc}. | ||
| 17717 | |||
| 17718 | Available @code{mod-muc-configuration} fields are: | ||
| 17719 | |||
| 17720 | @deftypevr {@code{mod-muc-configuration} parameter} string name | ||
| 17721 | The name to return in service discovery responses. Defaults to | ||
| 17722 | @samp{"Prosody Chatrooms"}. | ||
| 17723 | @end deftypevr | ||
| 17724 | |||
| 17725 | @deftypevr {@code{mod-muc-configuration} parameter} string-or-boolean restrict-room-creation | ||
| 17726 | If @samp{#t}, this will only allow admins to create new chatrooms. | ||
| 17727 | Otherwise anyone can create a room. The value @samp{"local"} restricts room | ||
| 17728 | creation to users on the service's parent domain. E.g.@: | ||
| 17729 | @samp{user@@example.com} can create rooms on @samp{rooms.example.com}. The | ||
| 17730 | value @samp{"admin"} restricts to service administrators only. Defaults to | ||
| 17731 | @samp{#f}. | ||
| 17732 | @end deftypevr | ||
| 17733 | |||
| 17734 | @deftypevr {@code{mod-muc-configuration} parameter} non-negative-integer max-history-messages | ||
| 17735 | Maximum number of history messages that will be sent to the member that has | ||
| 17736 | just joined the room. Defaults to @samp{20}. | ||
| 17737 | @end deftypevr | ||
| 17738 | |||
| 17739 | @end deftypevr | ||
| 17740 | |||
| 17741 | @end deftypevr | ||
| 17742 | |||
| 17743 | @deftypevr {@code{prosody-configuration} parameter} ext-component-configuration-list ext-components | ||
| 17744 | External components use XEP-0114, which most standalone components support. | ||
| 17745 | To add an external component, you simply fill the hostname field. See | ||
| 17746 | @url{https://prosody.im/doc/components}. Defaults to @samp{()}. | ||
| 17747 | |||
| 17748 | Available @code{ext-component-configuration} fields are: | ||
| 17749 | |||
| 17750 | all these @code{prosody-configuration} fields: @code{admins}, | ||
| 17751 | @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, | ||
| 17752 | @code{groups-file}, @code{allow-registration?}, @code{ssl}, | ||
| 17753 | @code{c2s-require-encryption?}, @code{disable-sasl-mechanisms}, | ||
| 17754 | @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, | ||
| 17755 | @code{s2s-insecure-domains}, @code{s2s-secure-domains}, | ||
| 17756 | @code{authentication}, @code{log}, @code{http-max-content-size}, | ||
| 17757 | @code{http-external-url}, @code{raw-content}, plus: | ||
| 17758 | @deftypevr {@code{ext-component-configuration} parameter} string component-secret | ||
| 17759 | Password which the component will use to log in. | ||
| 17760 | @end deftypevr | ||
| 17761 | |||
| 17762 | @deftypevr {@code{ext-component-configuration} parameter} string hostname | ||
| 17763 | Hostname of the component. | ||
| 17764 | @end deftypevr | ||
| 17765 | |||
| 17766 | @end deftypevr | ||
| 17767 | |||
| 17768 | @deftypevr {@code{prosody-configuration} parameter} non-negative-integer-list component-ports | ||
| 17769 | Port(s) Prosody listens on for component connections. Defaults to | ||
| 17770 | @samp{(5347)}. | ||
| 17771 | @end deftypevr | ||
| 17772 | |||
| 17773 | @deftypevr {@code{prosody-configuration} parameter} string component-interface | ||
| 17774 | Interface Prosody listens on for component connections. Defaults to | ||
| 17775 | @samp{"127.0.0.1"}. | ||
| 17776 | @end deftypevr | ||
| 17777 | |||
| 17778 | @deftypevr {@code{prosody-configuration} parameter} maybe-raw-content raw-content | ||
| 17779 | Raw content that will be added to the configuration file. | ||
| 17780 | @end deftypevr | ||
| 17781 | |||
| 17782 | It could be that you just want to get a @code{prosody.cfg.lua} up and | ||
| 17783 | running. In that case, you can pass an @code{opaque-prosody-configuration} | ||
| 17784 | record as the value of @code{prosody-service-type}. As its name indicates, | ||
| 17785 | an opaque configuration does not have easy reflective capabilities. | ||
| 17786 | Available @code{opaque-prosody-configuration} fields are: | ||
| 17787 | |||
| 17788 | @deftypevr {@code{opaque-prosody-configuration} parameter} package prosody | ||
| 17789 | The prosody package. | ||
| 17790 | @end deftypevr | ||
| 17791 | |||
| 17792 | @deftypevr {@code{opaque-prosody-configuration} parameter} string prosody.cfg.lua | ||
| 17793 | The contents of the @code{prosody.cfg.lua} to use. | ||
| 17794 | @end deftypevr | ||
| 17795 | |||
| 17796 | For example, if your @code{prosody.cfg.lua} is just the empty string, you | ||
| 17797 | could instantiate a prosody service like this: | ||
| 17798 | |||
| 17799 | @example | ||
| 17800 | (service prosody-service-type | ||
| 17801 | (opaque-prosody-configuration | ||
| 17802 | (prosody.cfg.lua ""))) | ||
| 17803 | @end example | ||
| 17804 | |||
| 17805 | @c end of Prosody auto-generated documentation | ||
| 17806 | |||
| 17807 | @subsubheading BitlBee Service | ||
| 17808 | |||
| 17809 | @cindex IRC (Internet Relay Chat) | ||
| 17810 | @cindex IRC gateway | ||
| 17811 | @url{http://bitlbee.org,BitlBee} is a gateway that provides an IRC interface | ||
| 17812 | to a variety of messaging protocols such as XMPP. | ||
| 17813 | |||
| 17814 | @defvr {Scheme Variable} bitlbee-service-type | ||
| 17815 | This is the service type for the @url{http://bitlbee.org,BitlBee} IRC | ||
| 17816 | gateway daemon. Its value is a @code{bitlbee-configuration} (see below). | ||
| 17817 | |||
| 17818 | To have BitlBee listen on port 6667 on localhost, add this line to your | ||
| 17819 | services: | ||
| 17820 | |||
| 17821 | @example | ||
| 17822 | (service bitlbee-service-type) | ||
| 17823 | @end example | ||
| 17824 | @end defvr | ||
| 17825 | |||
| 17826 | @deftp {Data Type} bitlbee-configuration | ||
| 17827 | This is the configuration for BitlBee, with the following fields: | ||
| 17828 | |||
| 17829 | @table @asis | ||
| 17830 | @item @code{interface} (default: @code{"127.0.0.1"}) | ||
| 17831 | @itemx @code{port} (default: @code{6667}) | ||
| 17832 | Listen on the network interface corresponding to the IP address specified in | ||
| 17833 | @var{interface}, on @var{port}. | ||
| 17834 | |||
| 17835 | When @var{interface} is @code{127.0.0.1}, only local clients can connect; | ||
| 17836 | when it is @code{0.0.0.0}, connections can come from any networking | ||
| 17837 | interface. | ||
| 17838 | |||
| 17839 | @item @code{package} (default: @code{bitlbee}) | ||
| 17840 | The BitlBee package to use. | ||
| 17841 | |||
| 17842 | @item @code{plugins} (Vorgabe: @code{'()}) | ||
| 17843 | List of plugin packages to use---e.g., @code{bitlbee-discord}. | ||
| 17844 | |||
| 17845 | @item @code{extra-settings} (default: @code{""}) | ||
| 17846 | Configuration snippet added as-is to the BitlBee configuration file. | ||
| 17847 | @end table | ||
| 17848 | @end deftp | ||
| 17849 | |||
| 17850 | @subsubheading Quassel-Dienst | ||
| 17851 | |||
| 17852 | @cindex IRC (Internet Relay Chat) | ||
| 17853 | @url{https://quassel-irc.org/,Quassel} is a distributed IRC client, meaning | ||
| 17854 | that one or more clients can attach to and detach from the central core. | ||
| 17855 | |||
| 17856 | @defvr {Scheme-Variable} quassel-service-type | ||
| 17857 | This is the service type for the @url{https://quassel-irc.org/,Quassel} IRC | ||
| 17858 | backend daemon. Its value is a @code{quassel-configuration} (see below). | ||
| 17859 | @end defvr | ||
| 17860 | |||
| 17861 | @deftp {Datentyp} quassel-configuration | ||
| 17862 | This is the configuration for Quassel, with the following fields: | ||
| 17863 | |||
| 17864 | @table @asis | ||
| 17865 | @item @code{quassel} (Vorgabe: @code{quassel}) | ||
| 17866 | Das zu verwendende Quassel-Paket. | ||
| 17867 | |||
| 17868 | @item @code{interface} (Vorgabe: @code{"::,0.0.0.0"}) | ||
| 17869 | @item @code{port} (Vorgabe: @code{4242}) | ||
| 17870 | Listen on the network interface(s) corresponding to the IPv4 or IPv6 | ||
| 17871 | interfaces specified in the comma delimited @var{interface}, on @var{port}. | ||
| 17872 | |||
| 17873 | @item @code{loglevel} (Vorgabe: @code{"Info"}) | ||
| 17874 | The level of logging desired. Accepted values are Debug, Info, Warning and | ||
| 17875 | Error. | ||
| 17876 | @end table | ||
| 17877 | @end deftp | ||
| 17878 | |||
| 17879 | @node Telefondienste | ||
| 17880 | @subsection Telefondienste | ||
| 17881 | |||
| 17882 | @cindex Murmur (VoIP server) | ||
| 17883 | @cindex VoIP server | ||
| 17884 | This section describes how to set up and run a Murmur server. Murmur is the | ||
| 17885 | server of the @uref{https://mumble.info, Mumble} voice-over-IP (VoIP) suite. | ||
| 17886 | |||
| 17887 | @deftp {Data Type} murmur-configuration | ||
| 17888 | The service type for the Murmur server. An example configuration can look | ||
| 17889 | like this: | ||
| 17890 | |||
| 17891 | @example | ||
| 17892 | (service murmur-service-type | ||
| 17893 | (murmur-configuration | ||
| 17894 | (welcome-text | ||
| 17895 | "Welcome to this Mumble server running on Guix!") | ||
| 17896 | (cert-required? #t) ;disallow text password logins | ||
| 17897 | (ssl-cert "/etc/letsencrypt/live/mumble.example.com/fullchain.pem") | ||
| 17898 | (ssl-key "/etc/letsencrypt/live/mumble.example.com/privkey.pem"))) | ||
| 17899 | @end example | ||
| 17900 | |||
| 17901 | After reconfiguring your system, you can manually set the murmur | ||
| 17902 | @code{SuperUser} password with the command that is printed during the | ||
| 17903 | activation phase. | ||
| 17904 | |||
| 17905 | It is recommended to register a normal Mumble user account and grant it | ||
| 17906 | admin or moderator rights. You can use the @code{mumble} client to login as | ||
| 17907 | new normal user, register yourself, and log out. For the next step login | ||
| 17908 | with the name @code{SuperUser} use the @code{SuperUser} password that you | ||
| 17909 | set previously, and grant your newly registered mumble user administrator or | ||
| 17910 | moderator rights and create some channels. | ||
| 17911 | |||
| 17912 | Available @code{murmur-configuration} fields are: | ||
| 17913 | |||
| 17914 | @table @asis | ||
| 17915 | @item @code{package} (default: @code{mumble}) | ||
| 17916 | Package that contains @code{bin/murmurd}. | ||
| 17917 | |||
| 17918 | @item @code{user} (default: @code{"murmur"}) | ||
| 17919 | User who will run the Murmur server. | ||
| 17920 | |||
| 17921 | @item @code{group} (default: @code{"murmur"}) | ||
| 17922 | Group of the user who will run the murmur server. | ||
| 17923 | |||
| 17924 | @item @code{port} (default: @code{64738}) | ||
| 17925 | Port on which the server will listen. | ||
| 17926 | |||
| 17927 | @item @code{welcome-text} (default: @code{""}) | ||
| 17928 | Welcome text sent to clients when they connect. | ||
| 17929 | |||
| 17930 | @item @code{server-password} (default: @code{""}) | ||
| 17931 | Password the clients have to enter in order to connect. | ||
| 17932 | |||
| 17933 | @item @code{max-users} (default: @code{100}) | ||
| 17934 | Maximum of users that can be connected to the server at once. | ||
| 17935 | |||
| 17936 | @item @code{max-user-bandwidth} (default: @code{#f}) | ||
| 17937 | Maximum voice traffic a user can send per second. | ||
| 17938 | |||
| 17939 | @item @code{database-file} (default: @code{"/var/lib/murmur/db.sqlite"}) | ||
| 17940 | File name of the sqlite database. The service's user will become the owner | ||
| 17941 | of the directory. | ||
| 17942 | |||
| 17943 | @item @code{log-file} (default: @code{"/var/log/murmur/murmur.log"}) | ||
| 17944 | File name of the log file. The service's user will become the owner of the | ||
| 17945 | directory. | ||
| 17946 | |||
| 17947 | @item @code{autoban-attempts} (default: @code{10}) | ||
| 17948 | Maximum number of logins a user can make in @code{autoban-timeframe} without | ||
| 17949 | getting auto banned for @code{autoban-time}. | ||
| 17950 | |||
| 17951 | @item @code{autoban-timeframe} (default: @code{120}) | ||
| 17952 | Timeframe for autoban in seconds. | ||
| 17953 | |||
| 17954 | @item @code{autoban-time} (default: @code{300}) | ||
| 17955 | Amount of time in seconds for which a client gets banned when violating the | ||
| 17956 | autoban limits. | ||
| 17957 | |||
| 17958 | @item @code{opus-threshold} (default: @code{100}) | ||
| 17959 | Percentage of clients that need to support opus before switching over to | ||
| 17960 | opus audio codec. | ||
| 17961 | |||
| 17962 | @item @code{channel-nesting-limit} (default: @code{10}) | ||
| 17963 | How deep channels can be nested at maximum. | ||
| 17964 | |||
| 17965 | @item @code{channelname-regex} (default: @code{#f}) | ||
| 17966 | A string in form of a Qt regular expression that channel names must conform | ||
| 17967 | to. | ||
| 17968 | |||
| 17969 | @item @code{username-regex} (default: @code{#f}) | ||
| 17970 | A string in form of a Qt regular expression that user names must conform to. | ||
| 17971 | |||
| 17972 | @item @code{text-message-length} (default: @code{5000}) | ||
| 17973 | Maximum size in bytes that a user can send in one text chat message. | ||
| 17974 | |||
| 17975 | @item @code{image-message-length} (default: @code{(* 128 1024)}) | ||
| 17976 | Maximum size in bytes that a user can send in one image message. | ||
| 17977 | |||
| 17978 | @item @code{cert-required?} (default: @code{#f}) | ||
| 17979 | If it is set to @code{#t} clients that use weak password authentification | ||
| 17980 | will not be accepted. Users must have completed the certificate wizard to | ||
| 17981 | join. | ||
| 17982 | |||
| 17983 | @item @code{remember-channel?} (Vorgabe: @code{#f}) | ||
| 17984 | Should murmur remember the last channel each user was in when they | ||
| 17985 | disconnected and put them into the remembered channel when they rejoin. | ||
| 17986 | |||
| 17987 | @item @code{allow-html?} (default: @code{#f}) | ||
| 17988 | Should html be allowed in text messages, user comments, and channel | ||
| 17989 | descriptions. | ||
| 17990 | |||
| 17991 | @item @code{allow-ping?} (default: @code{#f}) | ||
| 17992 | Setting to true exposes the current user count, the maximum user count, and | ||
| 17993 | the server's maximum bandwidth per client to unauthenticated users. In the | ||
| 17994 | Mumble client, this information is shown in the Connect dialog. | ||
| 17995 | |||
| 17996 | Disabling this setting will prevent public listing of the server. | ||
| 17997 | |||
| 17998 | @item @code{bonjour?} (default: @code{#f}) | ||
| 17999 | Should the server advertise itself in the local network through the bonjour | ||
| 18000 | protocol. | ||
| 18001 | |||
| 18002 | @item @code{send-version?} (default: @code{#f}) | ||
| 18003 | Should the murmur server version be exposed in ping requests. | ||
| 18004 | |||
| 18005 | @item @code{log-days} (default: @code{31}) | ||
| 18006 | Murmur also stores logs in the database, which are accessible via RPC. The | ||
| 18007 | default is 31 days of months, but you can set this setting to 0 to keep logs | ||
| 18008 | forever, or -1 to disable logging to the database. | ||
| 18009 | |||
| 18010 | @item @code{obfuscate-ips?} (Vorgabe: @code{#t}) | ||
| 18011 | Should logged ips be obfuscated to protect the privacy of users. | ||
| 18012 | |||
| 18013 | @item @code{ssl-cert} (default: @code{#f}) | ||
| 18014 | File name of the SSL/TLS certificate used for encrypted connections. | ||
| 18015 | |||
| 18016 | @example | ||
| 18017 | (ssl-cert "/etc/letsencrypt/live/example.com/fullchain.pem") | ||
| 18018 | @end example | ||
| 18019 | @item @code{ssl-key} (default: @code{#f}) | ||
| 18020 | Filepath to the ssl private key used for encrypted connections. | ||
| 18021 | @example | ||
| 18022 | (ssl-key "/etc/letsencrypt/live/example.com/privkey.pem") | ||
| 18023 | @end example | ||
| 18024 | |||
| 18025 | @item @code{ssl-dh-params} (default: @code{#f}) | ||
| 18026 | File name of a PEM-encoded file with Diffie-Hellman parameters for the | ||
| 18027 | SSL/TLS encryption. Alternatively you set it to @code{"@@ffdhe2048"}, | ||
| 18028 | @code{"@@ffdhe3072"}, @code{"@@ffdhe4096"}, @code{"@@ffdhe6144"} or | ||
| 18029 | @code{"@@ffdhe8192"} to use bundled parameters from RFC 7919. | ||
| 18030 | |||
| 18031 | @item @code{ssl-ciphers} (default: @code{#f}) | ||
| 18032 | The @code{ssl-ciphers} option chooses the cipher suites to make available | ||
| 18033 | for use in SSL/TLS. | ||
| 18034 | |||
| 18035 | This option is specified using | ||
| 18036 | @uref{https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT, | ||
| 18037 | OpenSSL cipher list notation}. | ||
| 18038 | |||
| 18039 | It is recommended that you try your cipher string using 'openssl ciphers | ||
| 18040 | <string>' before setting it here, to get a feel for which cipher suites you | ||
| 18041 | will get. After setting this option, it is recommend that you inspect your | ||
| 18042 | Murmur log to ensure that Murmur is using the cipher suites that you | ||
| 18043 | expected it to. | ||
| 18044 | |||
| 18045 | Note: Changing this option may impact the backwards compatibility of your | ||
| 18046 | Murmur server, and can remove the ability for older Mumble clients to be | ||
| 18047 | able to connect to it. | ||
| 18048 | |||
| 18049 | @item @code{public-registration} (default: @code{#f}) | ||
| 18050 | Must be a @code{<murmur-public-registration-configuration>} record or | ||
| 18051 | @code{#f}. | ||
| 18052 | |||
| 18053 | You can optionally register your server in the public server list that the | ||
| 18054 | @code{mumble} client shows on startup. You cannot register your server if | ||
| 18055 | you have set a @code{server-password}, or set @code{allow-ping} to | ||
| 18056 | @code{#f}. | ||
| 18057 | |||
| 18058 | It might take a few hours until it shows up in the public list. | ||
| 18059 | |||
| 18060 | @item @code{file} (default: @code{#f}) | ||
| 18061 | Optional alternative override for this configuration. | ||
| 18062 | @end table | ||
| 18063 | @end deftp | ||
| 18064 | |||
| 18065 | @deftp {Data Type} murmur-public-registration-configuration | ||
| 18066 | Configuration for public registration of a murmur service. | ||
| 18067 | |||
| 18068 | @table @asis | ||
| 18069 | @item @code{name} | ||
| 18070 | This is a display name for your server. Not to be confused with the | ||
| 18071 | hostname. | ||
| 18072 | |||
| 18073 | @item @code{password} | ||
| 18074 | A password to identify your registration. Subsequent updates will need the | ||
| 18075 | same password. Don't lose your password. | ||
| 18076 | |||
| 18077 | @item @code{url} | ||
| 18078 | This should be a @code{http://} or @code{https://} link to your web site. | ||
| 18079 | |||
| 18080 | @item @code{hostname} (default: @code{#f}) | ||
| 18081 | By default your server will be listed by its IP address. If it is set your | ||
| 18082 | server will be linked by this host name instead. | ||
| 18083 | @end table | ||
| 18084 | @end deftp | ||
| 18085 | |||
| 18086 | |||
| 18087 | |||
| 18088 | @node Überwachungsdienste | ||
| 18089 | @subsection Überwachungsdienste | ||
| 18090 | |||
| 18091 | @subsubheading Tailon Service | ||
| 18092 | |||
| 18093 | @uref{https://tailon.readthedocs.io/, Tailon} is a web application for | ||
| 18094 | viewing and searching log files. | ||
| 18095 | |||
| 18096 | The following example will configure the service with default values. By | ||
| 18097 | default, Tailon can be accessed on port 8080 (@code{http://localhost:8080}). | ||
| 18098 | |||
| 18099 | @example | ||
| 18100 | (service tailon-service-type) | ||
| 18101 | @end example | ||
| 18102 | |||
| 18103 | The following example customises more of the Tailon configuration, adding | ||
| 18104 | @command{sed} to the list of allowed commands. | ||
| 18105 | |||
| 18106 | @example | ||
| 18107 | (service tailon-service-type | ||
| 18108 | (tailon-configuration | ||
| 18109 | (config-file | ||
| 18110 | (tailon-configuration-file | ||
| 18111 | (allowed-commands '("tail" "grep" "awk" "sed")))))) | ||
| 18112 | @end example | ||
| 18113 | |||
| 18114 | |||
| 18115 | @deftp {Data Type} tailon-configuration | ||
| 18116 | Data type representing the configuration of Tailon. This type has the | ||
| 18117 | following parameters: | ||
| 18118 | |||
| 18119 | @table @asis | ||
| 18120 | @item @code{config-file} (default: @code{(tailon-configuration-file)}) | ||
| 18121 | The configuration file to use for Tailon. This can be set to a | ||
| 18122 | @dfn{tailon-configuration-file} record value, or any gexp | ||
| 18123 | (@pxref{G-Ausdrücke}). | ||
| 18124 | |||
| 18125 | For example, to instead use a local file, the @code{local-file} function can | ||
| 18126 | be used: | ||
| 18127 | |||
| 18128 | @example | ||
| 18129 | (service tailon-service-type | ||
| 18130 | (tailon-configuration | ||
| 18131 | (config-file (local-file "./my-tailon.conf")))) | ||
| 18132 | @end example | ||
| 18133 | |||
| 18134 | @item @code{package} (default: @code{tailon}) | ||
| 18135 | The tailon package to use. | ||
| 18136 | |||
| 18137 | @end table | ||
| 18138 | @end deftp | ||
| 18139 | |||
| 18140 | @deftp {Data Type} tailon-configuration-file | ||
| 18141 | Data type representing the configuration options for Tailon. This type has | ||
| 18142 | the following parameters: | ||
| 18143 | |||
| 18144 | @table @asis | ||
| 18145 | @item @code{files} (default: @code{(list "/var/log")}) | ||
| 18146 | List of files to display. The list can include strings for a single file or | ||
| 18147 | directory, or a list, where the first item is the name of a subsection, and | ||
| 18148 | the remaining items are the files or directories in that subsection. | ||
| 18149 | |||
| 18150 | @item @code{bind} (default: @code{"localhost:8080"}) | ||
| 18151 | Address and port to which Tailon should bind on. | ||
| 18152 | |||
| 18153 | @item @code{relative-root} (default: @code{#f}) | ||
| 18154 | URL path to use for Tailon, set to @code{#f} to not use a path. | ||
| 18155 | |||
| 18156 | @item @code{allow-transfers?} (default: @code{#t}) | ||
| 18157 | Allow downloading the log files in the web interface. | ||
| 18158 | |||
| 18159 | @item @code{follow-names?} (default: @code{#t}) | ||
| 18160 | Allow tailing of not-yet existent files. | ||
| 18161 | |||
| 18162 | @item @code{tail-lines} (default: @code{200}) | ||
| 18163 | Number of lines to read initially from each file. | ||
| 18164 | |||
| 18165 | @item @code{allowed-commands} (default: @code{(list "tail" "grep" "awk")}) | ||
| 18166 | Commands to allow running. By default, @code{sed} is disabled. | ||
| 18167 | |||
| 18168 | @item @code{debug?} (default: @code{#f}) | ||
| 18169 | Set @code{debug?} to @code{#t} to show debug messages. | ||
| 18170 | |||
| 18171 | @item @code{wrap-lines} (default: @code{#t}) | ||
| 18172 | Initial line wrapping state in the web interface. Set to @code{#t} to | ||
| 18173 | initially wrap lines (the default), or to @code{#f} to initially not wrap | ||
| 18174 | lines. | ||
| 18175 | |||
| 18176 | @item @code{http-auth} (default: @code{#f}) | ||
| 18177 | HTTP authentication type to use. Set to @code{#f} to disable authentication | ||
| 18178 | (the default). Supported values are @code{"digest"} or @code{"basic"}. | ||
| 18179 | |||
| 18180 | @item @code{users} (default: @code{#f}) | ||
| 18181 | If HTTP authentication is enabled (see @code{http-auth}), access will be | ||
| 18182 | restricted to the credentials provided here. To configure users, use a list | ||
| 18183 | of pairs, where the first element of the pair is the username, and the 2nd | ||
| 18184 | element of the pair is the password. | ||
| 18185 | |||
| 18186 | @example | ||
| 18187 | (tailon-configuration-file | ||
| 18188 | (http-auth "basic") | ||
| 18189 | (users '(("user1" . "password1") | ||
| 18190 | ("user2" . "password2")))) | ||
| 18191 | @end example | ||
| 18192 | |||
| 18193 | @end table | ||
| 18194 | @end deftp | ||
| 18195 | |||
| 18196 | |||
| 18197 | @subsubheading Darkstat Service | ||
| 18198 | @cindex darkstat | ||
| 18199 | Darkstat is a packet sniffer that captures network traffic, calculates | ||
| 18200 | statistics about usage, and serves reports over HTTP. | ||
| 18201 | |||
| 18202 | @defvar {Scheme Variable} darkstat-service-type | ||
| 18203 | This is the service type for the @uref{https://unix4lyfe.org/darkstat/, | ||
| 18204 | darkstat} service, its value must be a @code{darkstat-configuration} record | ||
| 18205 | as in this example: | ||
| 18206 | |||
| 18207 | @example | ||
| 18208 | (service darkstat-service-type | ||
| 18209 | (darkstat-configuration | ||
| 18210 | (interface "eno1"))) | ||
| 18211 | @end example | ||
| 18212 | @end defvar | ||
| 18213 | |||
| 18214 | @deftp {Data Type} darkstat-configuration | ||
| 18215 | Data type representing the configuration of @command{darkstat}. | ||
| 18216 | |||
| 18217 | @table @asis | ||
| 18218 | @item @code{package} (default: @code{darkstat}) | ||
| 18219 | The darkstat package to use. | ||
| 18220 | |||
| 18221 | @item @code{interface} | ||
| 18222 | Capture traffic on the specified network interface. | ||
| 18223 | |||
| 18224 | @item @code{port} (default: @code{"667"}) | ||
| 18225 | Bind the web interface to the specified port. | ||
| 18226 | |||
| 18227 | @item @code{bind-address} (default: @code{"127.0.0.1"}) | ||
| 18228 | Bind the web interface to the specified address. | ||
| 18229 | |||
| 18230 | @item @code{base} (default: @code{"/"}) | ||
| 18231 | Specify the path of the base URL. This can be useful if @command{darkstat} | ||
| 18232 | is accessed via a reverse proxy. | ||
| 18233 | |||
| 18234 | @end table | ||
| 18235 | @end deftp | ||
| 18236 | |||
| 18237 | @subsubheading Prometheus Node Exporter Service | ||
| 18238 | |||
| 18239 | @cindex prometheus-node-exporter | ||
| 18240 | The Prometheus ``node exporter'' makes hardware and operating system | ||
| 18241 | statistics provided by the Linux kernel available for the Prometheus | ||
| 18242 | monitoring system. This service should be deployed on all physical nodes | ||
| 18243 | and virtual machines, where monitoring these statistics is desirable. | ||
| 18244 | |||
| 18245 | @defvar {Scheme variable} prometheus-node-exporter-service-type | ||
| 18246 | This is the service type for the | ||
| 18247 | @uref{https://github.com/prometheus/node_exporter/, | ||
| 18248 | prometheus-node-exporter} service, its value must be a | ||
| 18249 | @code{prometheus-node-exporter-configuration} record as in this example: | ||
| 18250 | |||
| 18251 | @example | ||
| 18252 | (service prometheus-node-exporter-service-type | ||
| 18253 | (prometheus-node-exporter-configuration | ||
| 18254 | (web-listen-address ":9100"))) | ||
| 18255 | @end example | ||
| 18256 | @end defvar | ||
| 18257 | |||
| 18258 | @deftp {Data Type} prometheus-node-exporter-configuration | ||
| 18259 | Repräsentiert die Konfiguration von @command{node_exporter}. | ||
| 18260 | |||
| 18261 | @table @asis | ||
| 18262 | @item @code{package} (Vorgabe: @code{go-github-com-prometheus-node-exporter}) | ||
| 18263 | Das Paket für den prometheus-node-exporter, was benutzt werden soll. | ||
| 18264 | |||
| 18265 | @item @code{web-listen-address} (Vorgabe: @code{":9100"}) | ||
| 18266 | Bind the web interface to the specified address. | ||
| 18267 | |||
| 18268 | @end table | ||
| 18269 | @end deftp | ||
| 18270 | |||
| 18271 | @subsubheading Zabbix-Server | ||
| 18272 | @cindex zabbix zabbix-server | ||
| 18273 | Zabbix provides monitoring metrics, among others network utilization, CPU | ||
| 18274 | load and disk space consumption: | ||
| 18275 | |||
| 18276 | @itemize | ||
| 18277 | @item High performance, high capacity (able to monitor hundreds of thousands of devices). | ||
| 18278 | @item Auto-discovery of servers and network devices and interfaces. | ||
| 18279 | @item Low-level discovery, allows to automatically start monitoring new items, file systems or network interfaces among others. | ||
| 18280 | @item Distributed monitoring with centralized web administration. | ||
| 18281 | @item Native high performance agents. | ||
| 18282 | @item SLA, and ITIL KPI metrics on reporting. | ||
| 18283 | @item High-level (business) view of monitored resources through user-defined visual console screens and dashboards. | ||
| 18284 | @item Remote command execution through Zabbix proxies. | ||
| 18285 | @end itemize | ||
| 18286 | |||
| 18287 | @c %start of fragment | ||
| 18288 | |||
| 18289 | Available @code{zabbix-server-configuration} fields are: | ||
| 18290 | |||
| 18291 | @deftypevr {@code{zabbix-server-configuration} parameter} package zabbix-server | ||
| 18292 | Das zabbix-server-Paket. | ||
| 18293 | |||
| 18294 | @end deftypevr | ||
| 18295 | |||
| 18296 | @deftypevr {@code{zabbix-server-configuration} parameter} string user | ||
| 18297 | User who will run the Zabbix server. | ||
| 18298 | |||
| 18299 | Defaults to @samp{"zabbix"}. | ||
| 18300 | |||
| 18301 | @end deftypevr | ||
| 18302 | |||
| 18303 | @deftypevr {@code{zabbix-server-configuration} parameter} group group | ||
| 18304 | Group who will run the Zabbix server. | ||
| 18305 | |||
| 18306 | Defaults to @samp{"zabbix"}. | ||
| 18307 | |||
| 18308 | @end deftypevr | ||
| 18309 | |||
| 18310 | @deftypevr {@code{zabbix-server-configuration} parameter} string db-host | ||
| 18311 | Rechnername der Datenbank. | ||
| 18312 | |||
| 18313 | Defaults to @samp{"127.0.0.1"}. | ||
| 18314 | |||
| 18315 | @end deftypevr | ||
| 18316 | |||
| 18317 | @deftypevr {@code{zabbix-server-configuration} parameter} string db-name | ||
| 18318 | Datenbankname. | ||
| 18319 | |||
| 18320 | Defaults to @samp{"zabbix"}. | ||
| 18321 | |||
| 18322 | @end deftypevr | ||
| 18323 | |||
| 18324 | @deftypevr {@code{zabbix-server-configuration} parameter} string db-user | ||
| 18325 | Benutzerkonto der Datenbank. | ||
| 18326 | |||
| 18327 | Defaults to @samp{"zabbix"}. | ||
| 18328 | |||
| 18329 | @end deftypevr | ||
| 18330 | |||
| 18331 | @deftypevr {@code{zabbix-server-configuration} parameter} string db-password | ||
| 18332 | Database password. Please, use @code{include-files} with | ||
| 18333 | @code{DBPassword=SECRET} inside a specified file instead. | ||
| 18334 | |||
| 18335 | Defaults to @samp{""}. | ||
| 18336 | |||
| 18337 | @end deftypevr | ||
| 18338 | |||
| 18339 | @deftypevr {@code{zabbix-server-configuration} parameter} number db-port | ||
| 18340 | Datenbank-Portnummer. | ||
| 18341 | |||
| 18342 | Defaults to @samp{5432}. | ||
| 18343 | |||
| 18344 | @end deftypevr | ||
| 18345 | |||
| 18346 | @deftypevr {@code{zabbix-server-configuration} parameter} string log-type | ||
| 18347 | Specifies where log messages are written to: | ||
| 18348 | |||
| 18349 | @itemize @bullet | ||
| 18350 | @item | ||
| 18351 | @code{system} - syslog. | ||
| 18352 | |||
| 18353 | @item | ||
| 18354 | @code{file} - file specified with @code{log-file} parameter. | ||
| 18355 | |||
| 18356 | @item | ||
| 18357 | @code{console} - standard output. | ||
| 18358 | |||
| 18359 | @end itemize | ||
| 18360 | |||
| 18361 | Defaults to @samp{""}. | ||
| 18362 | |||
| 18363 | @end deftypevr | ||
| 18364 | |||
| 18365 | @deftypevr {@code{zabbix-server-configuration} parameter} string log-file | ||
| 18366 | Log file name for @code{log-type} @code{file} parameter. | ||
| 18367 | |||
| 18368 | Defaults to @samp{"/var/log/zabbix/server.log"}. | ||
| 18369 | |||
| 18370 | @end deftypevr | ||
| 18371 | |||
| 18372 | @deftypevr {@code{zabbix-server-configuration} parameter} string pid-file | ||
| 18373 | Name der PID-Datei. | ||
| 18374 | |||
| 18375 | Defaults to @samp{"/var/run/zabbix/zabbix_server.pid"}. | ||
| 18376 | |||
| 18377 | @end deftypevr | ||
| 18378 | |||
| 18379 | @deftypevr {@code{zabbix-server-configuration} parameter} string ssl-ca-location | ||
| 18380 | The location of certificate authority (CA) files for SSL server certificate | ||
| 18381 | verification. | ||
| 18382 | |||
| 18383 | Defaults to @samp{"/etc/ssl/certs/ca-certificates.crt"}. | ||
| 18384 | |||
| 18385 | @end deftypevr | ||
| 18386 | |||
| 18387 | @deftypevr {@code{zabbix-server-configuration} parameter} string ssl-cert-location | ||
| 18388 | Location of SSL client certificates. | ||
| 18389 | |||
| 18390 | Defaults to @samp{"/etc/ssl/certs"}. | ||
| 18391 | |||
| 18392 | @end deftypevr | ||
| 18393 | |||
| 18394 | @deftypevr {@code{zabbix-server-configuration} parameter} string extra-options | ||
| 18395 | Extra options will be appended to Zabbix server configuration file. | ||
| 18396 | |||
| 18397 | Defaults to @samp{""}. | ||
| 18398 | |||
| 18399 | @end deftypevr | ||
| 18400 | |||
| 18401 | @deftypevr {@code{zabbix-server-configuration} parameter} include-files include-files | ||
| 18402 | You may include individual files or all files in a directory in the | ||
| 18403 | configuration file. | ||
| 18404 | |||
| 18405 | Defaults to @samp{()}. | ||
| 18406 | |||
| 18407 | @end deftypevr | ||
| 18408 | |||
| 18409 | @c %end of fragment | ||
| 18410 | |||
| 18411 | @subsubheading Zabbix agent | ||
| 18412 | @cindex zabbix zabbix-agent | ||
| 18413 | |||
| 18414 | Zabbix agent gathers information for Zabbix server. | ||
| 18415 | |||
| 18416 | @c %start of fragment | ||
| 18417 | |||
| 18418 | Available @code{zabbix-agent-configuration} fields are: | ||
| 18419 | |||
| 18420 | @deftypevr {@code{zabbix-agent-configuration} parameter} package zabbix-agent | ||
| 18421 | Das zabbix-agent-Paket. | ||
| 18422 | |||
| 18423 | @end deftypevr | ||
| 18424 | |||
| 18425 | @deftypevr {@code{zabbix-agent-configuration} parameter} string user | ||
| 18426 | User who will run the Zabbix agent. | ||
| 18427 | |||
| 18428 | Defaults to @samp{"zabbix"}. | ||
| 18429 | |||
| 18430 | @end deftypevr | ||
| 18431 | |||
| 18432 | @deftypevr {@code{zabbix-agent-configuration} parameter} group group | ||
| 18433 | Group who will run the Zabbix agent. | ||
| 18434 | |||
| 18435 | Defaults to @samp{"zabbix"}. | ||
| 18436 | |||
| 18437 | @end deftypevr | ||
| 18438 | |||
| 18439 | @deftypevr {@code{zabbix-agent-configuration} parameter} string hostname | ||
| 18440 | Unique, case sensitive hostname which is required for active checks and must | ||
| 18441 | match hostname as configured on the server. | ||
| 18442 | |||
| 18443 | Defaults to @samp{"Zabbix server"}. | ||
| 18444 | |||
| 18445 | @end deftypevr | ||
| 18446 | |||
| 18447 | @deftypevr {@code{zabbix-agent-configuration} parameter} string log-type | ||
| 18448 | Specifies where log messages are written to: | ||
| 18449 | |||
| 18450 | @itemize @bullet | ||
| 18451 | @item | ||
| 18452 | @code{system} - syslog. | ||
| 18453 | |||
| 18454 | @item | ||
| 18455 | @code{file} - file specified with @code{log-file} parameter. | ||
| 18456 | |||
| 18457 | @item | ||
| 18458 | @code{console} - standard output. | ||
| 18459 | |||
| 18460 | @end itemize | ||
| 18461 | |||
| 18462 | Defaults to @samp{""}. | ||
| 18463 | |||
| 18464 | @end deftypevr | ||
| 18465 | |||
| 18466 | @deftypevr {@code{zabbix-agent-configuration} parameter} string log-file | ||
| 18467 | Log file name for @code{log-type} @code{file} parameter. | ||
| 18468 | |||
| 18469 | Defaults to @samp{"/var/log/zabbix/agent.log"}. | ||
| 18470 | |||
| 18471 | @end deftypevr | ||
| 18472 | |||
| 18473 | @deftypevr {@code{zabbix-agent-configuration} parameter} string pid-file | ||
| 18474 | Name der PID-Datei. | ||
| 18475 | |||
| 18476 | Defaults to @samp{"/var/run/zabbix/zabbix_agent.pid"}. | ||
| 18477 | |||
| 18478 | @end deftypevr | ||
| 18479 | |||
| 18480 | @deftypevr {@code{zabbix-agent-configuration} parameter} list server | ||
| 18481 | List of IP addresses, optionally in CIDR notation, or hostnames of Zabbix | ||
| 18482 | servers and Zabbix proxies. Incoming connections will be accepted only from | ||
| 18483 | the hosts listed here. | ||
| 18484 | |||
| 18485 | Defaults to @samp{("127.0.0.1")}. | ||
| 18486 | |||
| 18487 | @end deftypevr | ||
| 18488 | |||
| 18489 | @deftypevr {@code{zabbix-agent-configuration} parameter} list server-active | ||
| 18490 | List of IP:port (or hostname:port) pairs of Zabbix servers and Zabbix | ||
| 18491 | proxies for active checks. If port is not specified, default port is used. | ||
| 18492 | If this parameter is not specified, active checks are disabled. | ||
| 18493 | |||
| 18494 | Defaults to @samp{("127.0.0.1")}. | ||
| 18495 | |||
| 18496 | @end deftypevr | ||
| 18497 | |||
| 18498 | @deftypevr {@code{zabbix-agent-configuration} parameter} string extra-options | ||
| 18499 | Extra options will be appended to Zabbix server configuration file. | ||
| 18500 | |||
| 18501 | Defaults to @samp{""}. | ||
| 18502 | |||
| 18503 | @end deftypevr | ||
| 18504 | |||
| 18505 | @deftypevr {@code{zabbix-agent-configuration} parameter} include-files include-files | ||
| 18506 | You may include individual files or all files in a directory in the | ||
| 18507 | configuration file. | ||
| 18508 | |||
| 18509 | Defaults to @samp{()}. | ||
| 18510 | |||
| 18511 | @end deftypevr | ||
| 18512 | |||
| 18513 | @c %end of fragment | ||
| 18514 | |||
| 18515 | @subsubheading Zabbix front-end | ||
| 18516 | @cindex zabbix zabbix-front-end | ||
| 18517 | |||
| 18518 | This service provides a WEB interface to Zabbix server. | ||
| 18519 | |||
| 18520 | @c %start of fragment | ||
| 18521 | |||
| 18522 | Available @code{zabbix-front-end-configuration} fields are: | ||
| 18523 | |||
| 18524 | @deftypevr {@code{zabbix-front-end-configuration} parameter} nginx-server-configuration-list nginx | ||
| 18525 | NGINX configuration. | ||
| 18526 | |||
| 18527 | @end deftypevr | ||
| 18528 | |||
| 18529 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string db-host | ||
| 18530 | Rechnername der Datenbank. | ||
| 18531 | |||
| 18532 | Defaults to @samp{"localhost"}. | ||
| 18533 | |||
| 18534 | @end deftypevr | ||
| 18535 | |||
| 18536 | @deftypevr {@code{zabbix-front-end-configuration} parameter} number db-port | ||
| 18537 | Datenbank-Portnummer. | ||
| 18538 | |||
| 18539 | Defaults to @samp{5432}. | ||
| 18540 | |||
| 18541 | @end deftypevr | ||
| 18542 | |||
| 18543 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string db-name | ||
| 18544 | Datenbankname. | ||
| 18545 | |||
| 18546 | Defaults to @samp{"zabbix"}. | ||
| 18547 | |||
| 18548 | @end deftypevr | ||
| 18549 | |||
| 18550 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string db-user | ||
| 18551 | Benutzerkonto der Datenbank. | ||
| 18552 | |||
| 18553 | Defaults to @samp{"zabbix"}. | ||
| 18554 | |||
| 18555 | @end deftypevr | ||
| 18556 | |||
| 18557 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string db-password | ||
| 18558 | Database password. Please, use @code{db-secret-file} instead. | ||
| 18559 | |||
| 18560 | Defaults to @samp{""}. | ||
| 18561 | |||
| 18562 | @end deftypevr | ||
| 18563 | |||
| 18564 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string db-secret-file | ||
| 18565 | Secret file which will be appended to @file{zabbix.conf.php} file. This | ||
| 18566 | file contains credentials for use by Zabbix front-end. You are expected to | ||
| 18567 | create it manually. | ||
| 18568 | |||
| 18569 | Defaults to @samp{""}. | ||
| 18570 | |||
| 18571 | @end deftypevr | ||
| 18572 | |||
| 18573 | @deftypevr {@code{zabbix-front-end-configuration} parameter} string zabbix-host | ||
| 18574 | Zabbix server hostname. | ||
| 18575 | |||
| 18576 | Defaults to @samp{"localhost"}. | ||
| 18577 | |||
| 18578 | @end deftypevr | ||
| 18579 | |||
| 18580 | @deftypevr {@code{zabbix-front-end-configuration} parameter} number zabbix-port | ||
| 18581 | Zabbix server port. | ||
| 18582 | |||
| 18583 | Defaults to @samp{10051}. | ||
| 18584 | |||
| 18585 | @end deftypevr | ||
| 18586 | |||
| 18587 | |||
| 18588 | @c %end of fragment | ||
| 18589 | |||
| 18590 | @node Kerberos-Dienste | ||
| 18591 | @subsection Kerberos-Dienste | ||
| 18592 | @cindex Kerberos | ||
| 18593 | |||
| 18594 | The @code{(gnu services kerberos)} module provides services relating to the | ||
| 18595 | authentication protocol @dfn{Kerberos}. | ||
| 18596 | |||
| 18597 | @subsubheading Krb5 Service | ||
| 18598 | |||
| 18599 | Programs using a Kerberos client library normally expect a configuration | ||
| 18600 | file in @file{/etc/krb5.conf}. This service generates such a file from a | ||
| 18601 | definition provided in the operating system declaration. It does not cause | ||
| 18602 | any daemon to be started. | ||
| 18603 | |||
| 18604 | No ``keytab'' files are provided by this service---you must explicitly | ||
| 18605 | create them. This service is known to work with the MIT client library, | ||
| 18606 | @code{mit-krb5}. Other implementations have not been tested. | ||
| 18607 | |||
| 18608 | @defvr {Scheme Variable} krb5-service-type | ||
| 18609 | A service type for Kerberos 5 clients. | ||
| 18610 | @end defvr | ||
| 18611 | |||
| 18612 | @noindent | ||
| 18613 | Here is an example of its use: | ||
| 18614 | @lisp | ||
| 18615 | (service krb5-service-type | ||
| 18616 | (krb5-configuration | ||
| 18617 | (default-realm "EXAMPLE.COM") | ||
| 18618 | (allow-weak-crypto? #t) | ||
| 18619 | (realms (list | ||
| 18620 | (krb5-realm | ||
| 18621 | (name "EXAMPLE.COM") | ||
| 18622 | (admin-server "groucho.example.com") | ||
| 18623 | (kdc "karl.example.com")) | ||
| 18624 | (krb5-realm | ||
| 18625 | (name "ARGRX.EDU") | ||
| 18626 | (admin-server "kerb-admin.argrx.edu") | ||
| 18627 | (kdc "keys.argrx.edu")))))) | ||
| 18628 | @end lisp | ||
| 18629 | |||
| 18630 | @noindent | ||
| 18631 | This example provides a Kerberos@tie{}5 client configuration which: | ||
| 18632 | @itemize | ||
| 18633 | @item Recognizes two realms, @i{viz:} ``EXAMPLE.COM'' and ``ARGRX.EDU'', both | ||
| 18634 | of which have distinct administration servers and key distribution centers; | ||
| 18635 | @item Will default to the realm ``EXAMPLE.COM'' if the realm is not explicitly | ||
| 18636 | specified by clients; | ||
| 18637 | @item Accepts services which only support encryption types known to be weak. | ||
| 18638 | @end itemize | ||
| 18639 | |||
| 18640 | The @code{krb5-realm} and @code{krb5-configuration} types have many fields. | ||
| 18641 | Only the most commonly used ones are described here. For a full list, and | ||
| 18642 | more detailed explanation of each, see the MIT | ||
| 18643 | @uref{http://web.mit.edu/kerberos/krb5-devel/doc/admin/conf_files/krb5_conf.html,,krb5.conf} | ||
| 18644 | documentation. | ||
| 18645 | |||
| 18646 | |||
| 18647 | @deftp {Data Type} krb5-realm | ||
| 18648 | @cindex realm, kerberos | ||
| 18649 | @table @asis | ||
| 18650 | @item @code{name} | ||
| 18651 | This field is a string identifying the name of the realm. A common | ||
| 18652 | convention is to use the fully qualified DNS name of your organization, | ||
| 18653 | converted to upper case. | ||
| 18654 | |||
| 18655 | @item @code{admin-server} | ||
| 18656 | This field is a string identifying the host where the administration server | ||
| 18657 | is running. | ||
| 18658 | |||
| 18659 | @item @code{kdc} | ||
| 18660 | This field is a string identifying the key distribution center for the | ||
| 18661 | realm. | ||
| 18662 | @end table | ||
| 18663 | @end deftp | ||
| 18664 | |||
| 18665 | @deftp {Data Type} krb5-configuration | ||
| 18666 | |||
| 18667 | @table @asis | ||
| 18668 | @item @code{allow-weak-crypto?} (default: @code{#f}) | ||
| 18669 | If this flag is @code{#t} then services which only offer encryption | ||
| 18670 | algorithms known to be weak will be accepted. | ||
| 18671 | |||
| 18672 | @item @code{default-realm} (default: @code{#f}) | ||
| 18673 | This field should be a string identifying the default Kerberos realm for the | ||
| 18674 | client. You should set this field to the name of your Kerberos realm. If | ||
| 18675 | this value is @code{#f} then a realm must be specified with every Kerberos | ||
| 18676 | principal when invoking programs such as @command{kinit}. | ||
| 18677 | |||
| 18678 | @item @code{realms} | ||
| 18679 | This should be a non-empty list of @code{krb5-realm} objects, which clients | ||
| 18680 | may access. Normally, one of them will have a @code{name} field matching | ||
| 18681 | the @code{default-realm} field. | ||
| 18682 | @end table | ||
| 18683 | @end deftp | ||
| 18684 | |||
| 18685 | |||
| 18686 | @subsubheading PAM krb5 Service | ||
| 18687 | @cindex pam-krb5 | ||
| 18688 | |||
| 18689 | The @code{pam-krb5} service allows for login authentication and password | ||
| 18690 | management via Kerberos. You will need this service if you want PAM enabled | ||
| 18691 | applications to authenticate users using Kerberos. | ||
| 18692 | |||
| 18693 | @defvr {Scheme Variable} pam-krb5-service-type | ||
| 18694 | A service type for the Kerberos 5 PAM module. | ||
| 18695 | @end defvr | ||
| 18696 | |||
| 18697 | @deftp {Data Type} pam-krb5-configuration | ||
| 18698 | Data type representing the configuration of the Kerberos 5 PAM module This | ||
| 18699 | type has the following parameters: | ||
| 18700 | @table @asis | ||
| 18701 | @item @code{pam-krb5} (default: @code{pam-krb5}) | ||
| 18702 | The pam-krb5 package to use. | ||
| 18703 | |||
| 18704 | @item @code{minimum-uid} (default: @code{1000}) | ||
| 18705 | The smallest user ID for which Kerberos authentications should be | ||
| 18706 | attempted. Local accounts with lower values will silently fail to | ||
| 18707 | authenticate. | ||
| 18708 | @end table | ||
| 18709 | @end deftp | ||
| 18710 | |||
| 18711 | |||
| 18712 | @node LDAP-Dienste | ||
| 18713 | @subsection LDAP-Dienste | ||
| 18714 | @cindex LDAP | ||
| 18715 | @cindex nslcd, LDAP service | ||
| 18716 | |||
| 18717 | The @code{(gnu services authentication)} module provides the | ||
| 18718 | @code{nslcd-service-type}, which can be used to authenticate against an LDAP | ||
| 18719 | server. In addition to configuring the service itself, you may want to add | ||
| 18720 | @code{ldap} as a name service to the Name Service Switch. @xref{Name Service Switch} for detailed information. | ||
| 18721 | |||
| 18722 | Here is a simple operating system declaration with a default configuration | ||
| 18723 | of the @code{nslcd-service-type} and a Name Service Switch configuration | ||
| 18724 | that consults the @code{ldap} name service last: | ||
| 18725 | |||
| 18726 | @example | ||
| 18727 | (use-service-modules authentication) | ||
| 18728 | (use-modules (gnu system nss)) | ||
| 18729 | ... | ||
| 18730 | (operating-system | ||
| 18731 | ... | ||
| 18732 | (services | ||
| 18733 | (cons* | ||
| 18734 | (service nslcd-service-type) | ||
| 18735 | (service dhcp-client-service-type) | ||
| 18736 | %base-services)) | ||
| 18737 | (name-service-switch | ||
| 18738 | (let ((services (list (name-service (name "db")) | ||
| 18739 | (name-service (name "files")) | ||
| 18740 | (name-service (name "ldap"))))) | ||
| 18741 | (name-service-switch | ||
| 18742 | (inherit %mdns-host-lookup-nss) | ||
| 18743 | (password services) | ||
| 18744 | (shadow services) | ||
| 18745 | (group services) | ||
| 18746 | (netgroup services) | ||
| 18747 | (gshadow services))))) | ||
| 18748 | @end example | ||
| 18749 | |||
| 18750 | @c %start of generated documentation for nslcd-configuration | ||
| 18751 | |||
| 18752 | Available @code{nslcd-configuration} fields are: | ||
| 18753 | |||
| 18754 | @deftypevr {@code{nslcd-configuration} parameter} package nss-pam-ldapd | ||
| 18755 | Das @code{nss-pam-ldapd}-Paket, was benutzt werden soll. | ||
| 18756 | |||
| 18757 | @end deftypevr | ||
| 18758 | |||
| 18759 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number threads | ||
| 18760 | The number of threads to start that can handle requests and perform LDAP | ||
| 18761 | queries. Each thread opens a separate connection to the LDAP server. The | ||
| 18762 | default is to start 5 threads. | ||
| 18763 | |||
| 18764 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18765 | |||
| 18766 | @end deftypevr | ||
| 18767 | |||
| 18768 | @deftypevr {@code{nslcd-configuration} parameter} string uid | ||
| 18769 | This specifies the user id with which the daemon should be run. | ||
| 18770 | |||
| 18771 | Defaults to @samp{"nslcd"}. | ||
| 18772 | |||
| 18773 | @end deftypevr | ||
| 18774 | |||
| 18775 | @deftypevr {@code{nslcd-configuration} parameter} string gid | ||
| 18776 | This specifies the group id with which the daemon should be run. | ||
| 18777 | |||
| 18778 | Defaults to @samp{"nslcd"}. | ||
| 18779 | |||
| 18780 | @end deftypevr | ||
| 18781 | |||
| 18782 | @deftypevr {@code{nslcd-configuration} parameter} log-option log | ||
| 18783 | This option controls the way logging is done via a list containing SCHEME | ||
| 18784 | and LEVEL. The SCHEME argument may either be the symbols "none" or | ||
| 18785 | "syslog", or an absolute file name. The LEVEL argument is optional and | ||
| 18786 | specifies the log level. The log level may be one of the following symbols: | ||
| 18787 | "crit", "error", "warning", "notice", "info" or "debug". All messages with | ||
| 18788 | the specified log level or higher are logged. | ||
| 18789 | |||
| 18790 | Defaults to @samp{("/var/log/nslcd" info)}. | ||
| 18791 | |||
| 18792 | @end deftypevr | ||
| 18793 | |||
| 18794 | @deftypevr {@code{nslcd-configuration} parameter} list uri | ||
| 18795 | The list of LDAP server URIs. Normally, only the first server will be used | ||
| 18796 | with the following servers as fall-back. | ||
| 18797 | |||
| 18798 | Defaults to @samp{("ldap://localhost:389/")}. | ||
| 18799 | |||
| 18800 | @end deftypevr | ||
| 18801 | |||
| 18802 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string ldap-version | ||
| 18803 | The version of the LDAP protocol to use. The default is to use the maximum | ||
| 18804 | version supported by the LDAP library. | ||
| 18805 | |||
| 18806 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18807 | |||
| 18808 | @end deftypevr | ||
| 18809 | |||
| 18810 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string binddn | ||
| 18811 | Specifies the distinguished name with which to bind to the directory server | ||
| 18812 | for lookups. The default is to bind anonymously. | ||
| 18813 | |||
| 18814 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18815 | |||
| 18816 | @end deftypevr | ||
| 18817 | |||
| 18818 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string bindpw | ||
| 18819 | Specifies the credentials with which to bind. This option is only | ||
| 18820 | applicable when used with binddn. | ||
| 18821 | |||
| 18822 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18823 | |||
| 18824 | @end deftypevr | ||
| 18825 | |||
| 18826 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string rootpwmoddn | ||
| 18827 | Specifies the distinguished name to use when the root user tries to modify a | ||
| 18828 | user's password using the PAM module. | ||
| 18829 | |||
| 18830 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18831 | |||
| 18832 | @end deftypevr | ||
| 18833 | |||
| 18834 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string rootpwmodpw | ||
| 18835 | Specifies the credentials with which to bind if the root user tries to | ||
| 18836 | change a user's password. This option is only applicable when used with | ||
| 18837 | rootpwmoddn | ||
| 18838 | |||
| 18839 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18840 | |||
| 18841 | @end deftypevr | ||
| 18842 | |||
| 18843 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string sasl-mech | ||
| 18844 | Specifies the SASL mechanism to be used when performing SASL authentication. | ||
| 18845 | |||
| 18846 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18847 | |||
| 18848 | @end deftypevr | ||
| 18849 | |||
| 18850 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string sasl-realm | ||
| 18851 | Specifies the SASL realm to be used when performing SASL authentication. | ||
| 18852 | |||
| 18853 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18854 | |||
| 18855 | @end deftypevr | ||
| 18856 | |||
| 18857 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string sasl-authcid | ||
| 18858 | Specifies the authentication identity to be used when performing SASL | ||
| 18859 | authentication. | ||
| 18860 | |||
| 18861 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18862 | |||
| 18863 | @end deftypevr | ||
| 18864 | |||
| 18865 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string sasl-authzid | ||
| 18866 | Specifies the authorization identity to be used when performing SASL | ||
| 18867 | authentication. | ||
| 18868 | |||
| 18869 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18870 | |||
| 18871 | @end deftypevr | ||
| 18872 | |||
| 18873 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean sasl-canonicalize? | ||
| 18874 | Determines whether the LDAP server host name should be canonicalised. If | ||
| 18875 | this is enabled the LDAP library will do a reverse host name lookup. By | ||
| 18876 | default, it is left up to the LDAP library whether this check is performed | ||
| 18877 | or not. | ||
| 18878 | |||
| 18879 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18880 | |||
| 18881 | @end deftypevr | ||
| 18882 | |||
| 18883 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string krb5-ccname | ||
| 18884 | Set the name for the GSS-API Kerberos credentials cache. | ||
| 18885 | |||
| 18886 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18887 | |||
| 18888 | @end deftypevr | ||
| 18889 | |||
| 18890 | @deftypevr {@code{nslcd-configuration} parameter} string base | ||
| 18891 | Basis für die Verzeichnissuche. | ||
| 18892 | |||
| 18893 | Vorgegeben ist @samp{"dc=example,dc=com"}. | ||
| 18894 | |||
| 18895 | @end deftypevr | ||
| 18896 | |||
| 18897 | @deftypevr {@code{nslcd-configuration} parameter} scope-option scope | ||
| 18898 | Specifies the search scope (subtree, onelevel, base or children). The | ||
| 18899 | default scope is subtree; base scope is almost never useful for name service | ||
| 18900 | lookups; children scope is not supported on all servers. | ||
| 18901 | |||
| 18902 | Defaults to @samp{(subtree)}. | ||
| 18903 | |||
| 18904 | @end deftypevr | ||
| 18905 | |||
| 18906 | @deftypevr {@code{nslcd-configuration} parameter} maybe-deref-option deref | ||
| 18907 | Specifies the policy for dereferencing aliases. The default policy is to | ||
| 18908 | never dereference aliases. | ||
| 18909 | |||
| 18910 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18911 | |||
| 18912 | @end deftypevr | ||
| 18913 | |||
| 18914 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean referrals | ||
| 18915 | Specifies whether automatic referral chasing should be enabled. The default | ||
| 18916 | behaviour is to chase referrals. | ||
| 18917 | |||
| 18918 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18919 | |||
| 18920 | @end deftypevr | ||
| 18921 | |||
| 18922 | @deftypevr {@code{nslcd-configuration} parameter} list-of-map-entries maps | ||
| 18923 | This option allows for custom attributes to be looked up instead of the | ||
| 18924 | default RFC 2307 attributes. It is a list of maps, each consisting of the | ||
| 18925 | name of a map, the RFC 2307 attribute to match and the query expression for | ||
| 18926 | the attribute as it is available in the directory. | ||
| 18927 | |||
| 18928 | Defaults to @samp{()}. | ||
| 18929 | |||
| 18930 | @end deftypevr | ||
| 18931 | |||
| 18932 | @deftypevr {@code{nslcd-configuration} parameter} list-of-filter-entries filters | ||
| 18933 | A list of filters consisting of the name of a map to which the filter | ||
| 18934 | applies and an LDAP search filter expression. | ||
| 18935 | |||
| 18936 | Defaults to @samp{()}. | ||
| 18937 | |||
| 18938 | @end deftypevr | ||
| 18939 | |||
| 18940 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number bind-timelimit | ||
| 18941 | Specifies the time limit in seconds to use when connecting to the directory | ||
| 18942 | server. The default value is 10 seconds. | ||
| 18943 | |||
| 18944 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18945 | |||
| 18946 | @end deftypevr | ||
| 18947 | |||
| 18948 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number timelimit | ||
| 18949 | Specifies the time limit (in seconds) to wait for a response from the LDAP | ||
| 18950 | server. A value of zero, which is the default, is to wait indefinitely for | ||
| 18951 | searches to be completed. | ||
| 18952 | |||
| 18953 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18954 | |||
| 18955 | @end deftypevr | ||
| 18956 | |||
| 18957 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number idle-timelimit | ||
| 18958 | Specifies the period if inactivity (in seconds) after which the con‐ nection | ||
| 18959 | to the LDAP server will be closed. The default is not to time out | ||
| 18960 | connections. | ||
| 18961 | |||
| 18962 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18963 | |||
| 18964 | @end deftypevr | ||
| 18965 | |||
| 18966 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number reconnect-sleeptime | ||
| 18967 | Specifies the number of seconds to sleep when connecting to all LDAP servers | ||
| 18968 | fails. By default one second is waited between the first failure and the | ||
| 18969 | first retry. | ||
| 18970 | |||
| 18971 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18972 | |||
| 18973 | @end deftypevr | ||
| 18974 | |||
| 18975 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number reconnect-retrytime | ||
| 18976 | Specifies the time after which the LDAP server is considered to be | ||
| 18977 | permanently unavailable. Once this time is reached retries will be done | ||
| 18978 | only once per this time period. The default value is 10 seconds. | ||
| 18979 | |||
| 18980 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18981 | |||
| 18982 | @end deftypevr | ||
| 18983 | |||
| 18984 | @deftypevr {@code{nslcd-configuration} parameter} maybe-ssl-option ssl | ||
| 18985 | Specifies whether to use SSL/TLS or not (the default is not to). If | ||
| 18986 | 'start-tls is specified then StartTLS is used rather than raw LDAP over SSL. | ||
| 18987 | |||
| 18988 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18989 | |||
| 18990 | @end deftypevr | ||
| 18991 | |||
| 18992 | @deftypevr {@code{nslcd-configuration} parameter} maybe-tls-reqcert-option tls-reqcert | ||
| 18993 | Specifies what checks to perform on a server-supplied certificate. The | ||
| 18994 | meaning of the values is described in the ldap.conf(5) manual page. | ||
| 18995 | |||
| 18996 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 18997 | |||
| 18998 | @end deftypevr | ||
| 18999 | |||
| 19000 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-cacertdir | ||
| 19001 | Specifies the directory containing X.509 certificates for peer authen‐ | ||
| 19002 | tication. This parameter is ignored when using GnuTLS. | ||
| 19003 | |||
| 19004 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19005 | |||
| 19006 | @end deftypevr | ||
| 19007 | |||
| 19008 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-cacertfile | ||
| 19009 | Specifies the path to the X.509 certificate for peer authentication. | ||
| 19010 | |||
| 19011 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19012 | |||
| 19013 | @end deftypevr | ||
| 19014 | |||
| 19015 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-randfile | ||
| 19016 | Specifies the path to an entropy source. This parameter is ignored when | ||
| 19017 | using GnuTLS. | ||
| 19018 | |||
| 19019 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19020 | |||
| 19021 | @end deftypevr | ||
| 19022 | |||
| 19023 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-ciphers | ||
| 19024 | Specifies the ciphers to use for TLS as a string. | ||
| 19025 | |||
| 19026 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19027 | |||
| 19028 | @end deftypevr | ||
| 19029 | |||
| 19030 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-cert | ||
| 19031 | Specifies the path to the file containing the local certificate for client | ||
| 19032 | TLS authentication. | ||
| 19033 | |||
| 19034 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19035 | |||
| 19036 | @end deftypevr | ||
| 19037 | |||
| 19038 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string tls-key | ||
| 19039 | Specifies the path to the file containing the private key for client TLS | ||
| 19040 | authentication. | ||
| 19041 | |||
| 19042 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19043 | |||
| 19044 | @end deftypevr | ||
| 19045 | |||
| 19046 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number pagesize | ||
| 19047 | Set this to a number greater than 0 to request paged results from the LDAP | ||
| 19048 | server in accordance with RFC2696. The default (0) is to not request paged | ||
| 19049 | results. | ||
| 19050 | |||
| 19051 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19052 | |||
| 19053 | @end deftypevr | ||
| 19054 | |||
| 19055 | @deftypevr {@code{nslcd-configuration} parameter} maybe-ignore-users-option nss-initgroups-ignoreusers | ||
| 19056 | This option prevents group membership lookups through LDAP for the specified | ||
| 19057 | users. Alternatively, the value 'all-local may be used. With that value | ||
| 19058 | nslcd builds a full list of non-LDAP users on startup. | ||
| 19059 | |||
| 19060 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19061 | |||
| 19062 | @end deftypevr | ||
| 19063 | |||
| 19064 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number nss-min-uid | ||
| 19065 | This option ensures that LDAP users with a numeric user id lower than the | ||
| 19066 | specified value are ignored. | ||
| 19067 | |||
| 19068 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19069 | |||
| 19070 | @end deftypevr | ||
| 19071 | |||
| 19072 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number nss-uid-offset | ||
| 19073 | This option specifies an offset that is added to all LDAP numeric user ids. | ||
| 19074 | This can be used to avoid user id collisions with local users. | ||
| 19075 | |||
| 19076 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19077 | |||
| 19078 | @end deftypevr | ||
| 19079 | |||
| 19080 | @deftypevr {@code{nslcd-configuration} parameter} maybe-number nss-gid-offset | ||
| 19081 | This option specifies an offset that is added to all LDAP numeric group | ||
| 19082 | ids. This can be used to avoid user id collisions with local groups. | ||
| 19083 | |||
| 19084 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19085 | |||
| 19086 | @end deftypevr | ||
| 19087 | |||
| 19088 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean nss-nested-groups | ||
| 19089 | If this option is set, the member attribute of a group may point to another | ||
| 19090 | group. Members of nested groups are also returned in the higher level group | ||
| 19091 | and parent groups are returned when finding groups for a specific user. The | ||
| 19092 | default is not to perform extra searches for nested groups. | ||
| 19093 | |||
| 19094 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19095 | |||
| 19096 | @end deftypevr | ||
| 19097 | |||
| 19098 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean nss-getgrent-skipmembers | ||
| 19099 | If this option is set, the group member list is not retrieved when looking | ||
| 19100 | up groups. Lookups for finding which groups a user belongs to will remain | ||
| 19101 | functional so the user will likely still get the correct groups assigned on | ||
| 19102 | login. | ||
| 19103 | |||
| 19104 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19105 | |||
| 19106 | @end deftypevr | ||
| 19107 | |||
| 19108 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean nss-disable-enumeration | ||
| 19109 | If this option is set, functions which cause all user/group entries to be | ||
| 19110 | loaded from the directory will not succeed in doing so. This can | ||
| 19111 | dramatically reduce LDAP server load in situations where there are a great | ||
| 19112 | number of users and/or groups. This option is not recommended for most | ||
| 19113 | configurations. | ||
| 19114 | |||
| 19115 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19116 | |||
| 19117 | @end deftypevr | ||
| 19118 | |||
| 19119 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string validnames | ||
| 19120 | This option can be used to specify how user and group names are verified | ||
| 19121 | within the system. This pattern is used to check all user and group names | ||
| 19122 | that are requested and returned from LDAP. | ||
| 19123 | |||
| 19124 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19125 | |||
| 19126 | @end deftypevr | ||
| 19127 | |||
| 19128 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean ignorecase | ||
| 19129 | This specifies whether or not to perform searches using case-insensitive | ||
| 19130 | matching. Enabling this could open up the system to authorization bypass | ||
| 19131 | vulnerabilities and introduce nscd cache poisoning vulnerabilities which | ||
| 19132 | allow denial of service. | ||
| 19133 | |||
| 19134 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19135 | |||
| 19136 | @end deftypevr | ||
| 19137 | |||
| 19138 | @deftypevr {@code{nslcd-configuration} parameter} maybe-boolean pam-authc-ppolicy | ||
| 19139 | This option specifies whether password policy controls are requested and | ||
| 19140 | handled from the LDAP server when performing user authentication. | ||
| 19141 | |||
| 19142 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19143 | |||
| 19144 | @end deftypevr | ||
| 19145 | |||
| 19146 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string pam-authc-search | ||
| 19147 | By default nslcd performs an LDAP search with the user's credentials after | ||
| 19148 | BIND (authentication) to ensure that the BIND operation was successful. The | ||
| 19149 | default search is a simple check to see if the user's DN exists. A search | ||
| 19150 | filter can be specified that will be used instead. It should return at | ||
| 19151 | least one entry. | ||
| 19152 | |||
| 19153 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19154 | |||
| 19155 | @end deftypevr | ||
| 19156 | |||
| 19157 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string pam-authz-search | ||
| 19158 | This option allows flexible fine tuning of the authorisation check that | ||
| 19159 | should be performed. The search filter specified is executed and if any | ||
| 19160 | entries match, access is granted, otherwise access is denied. | ||
| 19161 | |||
| 19162 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19163 | |||
| 19164 | @end deftypevr | ||
| 19165 | |||
| 19166 | @deftypevr {@code{nslcd-configuration} parameter} maybe-string pam-password-prohibit-message | ||
| 19167 | If this option is set password modification using pam_ldap will be denied | ||
| 19168 | and the specified message will be presented to the user instead. The | ||
| 19169 | message can be used to direct the user to an alternative means of changing | ||
| 19170 | their password. | ||
| 19171 | |||
| 19172 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 19173 | |||
| 19174 | @end deftypevr | ||
| 19175 | |||
| 19176 | @deftypevr {@code{nslcd-configuration} parameter} list pam-services | ||
| 19177 | List of pam service names for which LDAP authentication should suffice. | ||
| 19178 | |||
| 19179 | Defaults to @samp{()}. | ||
| 19180 | |||
| 19181 | @end deftypevr | ||
| 19182 | |||
| 19183 | @c %end of generated documentation for nslcd-configuration | ||
| 19184 | |||
| 19185 | |||
| 19186 | @node Web-Dienste | ||
| 19187 | @subsection Web-Dienste | ||
| 19188 | |||
| 19189 | @cindex Web | ||
| 19190 | @cindex WWW | ||
| 19191 | @cindex HTTP | ||
| 19192 | Das Modul @code{(gnu services web)} stellt den Apache-HTTP-Server, den | ||
| 19193 | nginx-Webserver und auch einen fastcgi-Wrapperdienst bereit. | ||
| 19194 | |||
| 19195 | @subsubheading Apache-HTTP-Server | ||
| 19196 | |||
| 19197 | @deffn {Scheme-Variable} httpd-service-type | ||
| 19198 | Diensttyp für den @uref{https://httpd.apache.org/,Apache-HTTP-Server} | ||
| 19199 | (@dfn{httpd}). Der Wert dieses Diensttyps ist ein | ||
| 19200 | @code{httpd-configuration}-Verbund. | ||
| 19201 | |||
| 19202 | Es folgt ein einfaches Beispiel der Konfiguration. | ||
| 19203 | |||
| 19204 | @example | ||
| 19205 | (service httpd-service-type | ||
| 19206 | (httpd-configuration | ||
| 19207 | (config | ||
| 19208 | (httpd-config-file | ||
| 19209 | (server-name "www.example.com") | ||
| 19210 | (document-root "/srv/http/www.example.com"))))) | ||
| 19211 | @end example | ||
| 19212 | |||
| 19213 | Andere Dienste können den @code{httpd-service-type} auch erweitern, um etwas | ||
| 19214 | zur Konfiguration hinzuzufügen. | ||
| 19215 | |||
| 19216 | @example | ||
| 19217 | (simple-service 'my-extra-server httpd-service-type | ||
| 19218 | (list | ||
| 19219 | (httpd-virtualhost | ||
| 19220 | "*:80" | ||
| 19221 | (list (string-append | ||
| 19222 | "ServerName "www.example.com | ||
| 19223 | DocumentRoot \"/srv/http/www.example.com\""))))) | ||
| 19224 | @end example | ||
| 19225 | @end deffn | ||
| 19226 | |||
| 19227 | Nun folgt eine Beschreibung der Verbundstypen @code{httpd-configuration}, | ||
| 19228 | @code{httpd-module}, @code{httpd-config-file} und @code{httpd-virtualhost}. | ||
| 19229 | |||
| 19230 | @deffn {Datentyp} httpd-configuration | ||
| 19231 | Dieser Datentyp repräsentiert die Konfiguration des httpd-Dienstes. | ||
| 19232 | |||
| 19233 | @table @asis | ||
| 19234 | @item @code{package} (Vorgabe: @code{httpd}) | ||
| 19235 | Das zu benutzende httpd-Paket. | ||
| 19236 | |||
| 19237 | @item @code{pid-file} (Vorgabe: @code{"/var/run/httpd"}) | ||
| 19238 | Die vom Shepherd-Dienst benutzte PID-Datei. | ||
| 19239 | |||
| 19240 | @item @code{config} (Vorgabe: @code{(httpd-config-file)}) | ||
| 19241 | Die vom httpd-Dienst zu benutzende Konfigurationsdatei. Vorgegeben ist ein | ||
| 19242 | @code{httpd-config-file}-Verbundsobjekt, aber als Wert kann auch ein anderer | ||
| 19243 | G-Ausdruck benutzt werden, der eine Datei erzeugt, zum Beispiel ein | ||
| 19244 | @code{plain-file}. Es kann auch eine Datei außerhalb des Stores mit einer | ||
| 19245 | Zeichenkette angegeben werden. | ||
| 19246 | |||
| 19247 | @end table | ||
| 19248 | @end deffn | ||
| 19249 | |||
| 19250 | @deffn {Datentyp} httpd-module | ||
| 19251 | Dieser Datentyp steht für ein Modul des httpd-Dienstes. | ||
| 19252 | |||
| 19253 | @table @asis | ||
| 19254 | @item @code{name} | ||
| 19255 | Der Name des Moduls. | ||
| 19256 | |||
| 19257 | @item @code{file} | ||
| 19258 | Die Datei, in der das Modul steht. Sie kann relativ zum benutzten | ||
| 19259 | httpd-Paket oder als absoluter Pfad einer Datei oder als ein G-Ausdruck für | ||
| 19260 | eine Datei im Store angegeben werden, zum Beispiel @code{(file-append | ||
| 19261 | mod-wsgi "/modules/mod_wsgi.so")}. | ||
| 19262 | |||
| 19263 | @end table | ||
| 19264 | @end deffn | ||
| 19265 | |||
| 19266 | @defvr {Scheme-Variable} %default-httpd-modules | ||
| 19267 | Eine vorgegebene Liste von @code{httpd-module}-Objekten. | ||
| 19268 | @end defvr | ||
| 19269 | |||
| 19270 | @deffn {Datentyp} httpd-config-file | ||
| 19271 | Dieser Datentyp repräsentiert eine Konfigurationsdatei für den httpd-Dienst. | ||
| 19272 | |||
| 19273 | @table @asis | ||
| 19274 | @item @code{modules} (Vorgabe: @code{%default-httpd-modules}) | ||
| 19275 | Welche Module geladen werden sollen. Zusätzliche Module können hier | ||
| 19276 | eingetragen werden oder durch eine zusätzliche Konfigurationsangabe geladen | ||
| 19277 | werden. | ||
| 19278 | |||
| 19279 | Um zum Beispiel Anfragen nach PHP-Dateien zu behandeln, können Sie das Modul | ||
| 19280 | @code{mod_proxy_fcgi} von Apache zusammen mit @code{php-fpm-service-type} | ||
| 19281 | benutzen: | ||
| 19282 | |||
| 19283 | @example | ||
| 19284 | (service httpd-service-type | ||
| 19285 | (httpd-configuration | ||
| 19286 | (config | ||
| 19287 | (httpd-config-file | ||
| 19288 | (modules (cons* | ||
| 19289 | (httpd-module | ||
| 19290 | (name "proxy_module") | ||
| 19291 | (file "modules/mod_proxy.so")) | ||
| 19292 | (httpd-module | ||
| 19293 | (name "proxy_fcgi_module") | ||
| 19294 | (file "modules/mod_proxy_fcgi.so")) | ||
| 19295 | %default-httpd-modules)) | ||
| 19296 | (extra-config (list "\ | ||
| 19297 | <FilesMatch \\.php$> | ||
| 19298 | SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\" | ||
| 19299 | </FilesMatch>")))))) | ||
| 19300 | (service php-fpm-service-type | ||
| 19301 | (php-fpm-configuration | ||
| 19302 | (socket "/var/run/php-fpm.sock") | ||
| 19303 | (socket-group "httpd"))) | ||
| 19304 | @end example | ||
| 19305 | |||
| 19306 | @item @code{server-root} (Vorgabe: @code{httpd}) | ||
| 19307 | Die @code{ServerRoot} in der Konfigurationsdatei, vorgegeben ist das | ||
| 19308 | httpd-Paket. Direktiven wie @code{Include} und @code{LoadModule} werden | ||
| 19309 | relativ zur ServerRoot interpretiert. | ||
| 19310 | |||
| 19311 | @item @code{server-name} (Vorgabe: @code{#f}) | ||
| 19312 | Der @code{ServerName} in der Konfigurationsdatei, mit dem das Anfrageschema | ||
| 19313 | (Request Scheme), der Rechnername (Hostname) und Port angegeben wird, mit | ||
| 19314 | denen sich der Server identifiziert. | ||
| 19315 | |||
| 19316 | Es muss nicht als Teil der Server-Konfiguration festgelegt werden, sondern | ||
| 19317 | kann auch in virtuellen Rechnern (Virtual Hosts) festgelegt | ||
| 19318 | werden. Vorgegeben ist @code{#f}, wodurch kein @code{ServerName} festgelegt | ||
| 19319 | wird. | ||
| 19320 | |||
| 19321 | @item @code{document-root} (Vorgabe: @code{"/srv/http"}) | ||
| 19322 | Das @code{DocumentRoot}-Verzeichnis, in dem sich die Dateien befinden, die | ||
| 19323 | man vom Server abrufen kann. | ||
| 19324 | |||
| 19325 | @item @code{listen} (Vorgabe: @code{'("80")}) | ||
| 19326 | Die Liste der Werte für die @code{Listen}-Direktive in der | ||
| 19327 | Konfigurationsdatei. Als Wert sollte eine Liste von Zeichenketten angegeben | ||
| 19328 | werden, die jeweils die Portnummer, auf der gelauscht wird, und optional | ||
| 19329 | auch die zu benutzende IP-Adresse und das Protokoll angeben. | ||
| 19330 | |||
| 19331 | @item @code{pid-file} (Vorgabe: @code{"/var/run/httpd"}) | ||
| 19332 | Hiermit wird die PID-Datei als @code{PidFile}-Direktive angegeben. Der Wert | ||
| 19333 | sollte mit der @code{pid-file}-Datei in der @code{httpd-configuration} | ||
| 19334 | übereinstimmen, damit der Shepherd-Dienst richtig konfiguriert ist. | ||
| 19335 | |||
| 19336 | @item @code{error-log} (Vorgabe: @code{"/var/log/httpd/error_log"}) | ||
| 19337 | Der Ort, an den der Server mit der @code{ErrorLog}-Direktive | ||
| 19338 | Fehlerprotokolle schreibt. | ||
| 19339 | |||
| 19340 | @item @code{user} (Vorgabe: @code{"httpd"}) | ||
| 19341 | Der Benutzer, als der der Server durch die @code{User}-Direktive Anfragen | ||
| 19342 | beantwortet. | ||
| 19343 | |||
| 19344 | @item @code{group} (Vorgabe: @code{"httpd"}) | ||
| 19345 | Die Gruppe, mit der der Server durch die @code{Group}-Direktive Anfragen | ||
| 19346 | beantwortet. | ||
| 19347 | |||
| 19348 | @item @code{extra-config} (Vorgabe: @code{(list "TypesConfig etc/httpd/mime.types")}) | ||
| 19349 | Eine flache Liste von Zeichenketten und G-Ausdrücken, die am Ende der | ||
| 19350 | Konfigurationsdatei hinzugefügt werden. | ||
| 19351 | |||
| 19352 | Alle Werte, mit denen dieser Dienst erweitert wird, werden an die Liste | ||
| 19353 | angehängt. | ||
| 19354 | |||
| 19355 | @end table | ||
| 19356 | @end deffn | ||
| 19357 | |||
| 19358 | @deffn {Datentyp} httpd-virtualhost | ||
| 19359 | Dieser Datentyp repräsentiert einen Konfigurationsblock für einen virtuellen | ||
| 19360 | Rechner (Virtual Host) des httpd-Dienstes. | ||
| 19361 | |||
| 19362 | Sie sollten zur zusätzlichen Konfiguration extra-config des httpd-Dienstes | ||
| 19363 | hinzugefügt werden. | ||
| 19364 | |||
| 19365 | @example | ||
| 19366 | (simple-service 'my-extra-server httpd-service-type | ||
| 19367 | (list | ||
| 19368 | (httpd-virtualhost | ||
| 19369 | "*:80" | ||
| 19370 | (list (string-append | ||
| 19371 | "ServerName "www.example.com | ||
| 19372 | DocumentRoot \"/srv/http/www.example.com\""))))) | ||
| 19373 | @end example | ||
| 19374 | |||
| 19375 | @table @asis | ||
| 19376 | @item @code{addresses-and-ports} | ||
| 19377 | Adressen und Ports für die @code{VirtualHost}-Direktive. | ||
| 19378 | |||
| 19379 | @item @code{contents} | ||
| 19380 | Der Inhalt der @code{VirtualHost}-Direktive. Er sollte als Liste von | ||
| 19381 | Zeichenketten und G-Ausdrücken angegeben werden. | ||
| 19382 | |||
| 19383 | @end table | ||
| 19384 | @end deffn | ||
| 19385 | |||
| 19386 | @subsubheading NGINX | ||
| 19387 | |||
| 19388 | @deffn {Scheme-Variable} nginx-service-type | ||
| 19389 | Diensttyp für den @uref{https://nginx.org/,NGinx}-Webserver. Der Wert des | ||
| 19390 | Dienstes ist ein @code{<nginx-configuration>}-Verbundsobjekt. | ||
| 19391 | |||
| 19392 | Es folgt ein einfaches Beispiel der Konfiguration. | ||
| 19393 | |||
| 19394 | @example | ||
| 19395 | (service nginx-service-type | ||
| 19396 | (nginx-configuration | ||
| 19397 | (server-blocks | ||
| 19398 | (list (nginx-server-configuration | ||
| 19399 | (server-name '("www.example.com")) | ||
| 19400 | (root "/srv/http/www.example.com")))))) | ||
| 19401 | @end example | ||
| 19402 | |||
| 19403 | Außer durch direktes Hinzufügen von Server-Blöcken zur Dienstkonfiguration | ||
| 19404 | kann der Dienst auch durch andere Dienste erweitert werden, um Server-Blöcke | ||
| 19405 | hinzuzufügen, wie man im folgenden Beispiel sieht: | ||
| 19406 | |||
| 19407 | @example | ||
| 19408 | (simple-service 'my-extra-server nginx-service-type | ||
| 19409 | (list (nginx-server-configuration | ||
| 19410 | (root "/srv/http/extra-website") | ||
| 19411 | (try-files (list "$uri" "$uri/index.html"))))) | ||
| 19412 | @end example | ||
| 19413 | @end deffn | ||
| 19414 | |||
| 19415 | Beim Starten hat @command{nginx} seine Konfigurationsdatei noch nicht | ||
| 19416 | gelesen und benutzt eine vorgegebene Datei, um Fehlermeldungen zu | ||
| 19417 | protokollieren. Wenn er seine Konfigurationsdatei nicht laden kann, landen | ||
| 19418 | Fehlermeldungen also dort. Nachdem die Konfigurationsdatei geladen ist, | ||
| 19419 | werden Fehlerprotokolle nach Voreinstellung in die Datei geschrieben, die in | ||
| 19420 | der Konfiguration angegeben ist. In unserem Fall können Sie Fehlermeldungen | ||
| 19421 | beim Starten in @file{/var/run/nginx/logs/error.log} finden und nachdem die | ||
| 19422 | Konfiguration eingelesen wurde, finden Sie sie in | ||
| 19423 | @file{/var/log/nginx/error.log}. Letzterer Ort kann mit der | ||
| 19424 | Konfigurationsoption @var{log-directory} geändert werden. | ||
| 19425 | |||
| 19426 | @deffn {Datentyp} nginx-configuration | ||
| 19427 | Dieser Datentyp repräsentiert die Konfiguration von NGinx. Ein Teil der | ||
| 19428 | Konfiguration kann hierüber und über die anderen zu Ihrer Verfügung | ||
| 19429 | stehenden Verbundstypen geschehen, alternativ können Sie eine | ||
| 19430 | Konfigurationsdatei mitgeben. | ||
| 19431 | |||
| 19432 | @table @asis | ||
| 19433 | @item @code{nginx} (Vorgabe: @code{nginx}) | ||
| 19434 | Das zu benutzende nginx-Paket. | ||
| 19435 | |||
| 19436 | @item @code{log-directory} (Vorgabe: @code{"/var/log/nginx"}) | ||
| 19437 | In welches Verzeichnis NGinx Protokolldateien schreiben wird. | ||
| 19438 | |||
| 19439 | @item @code{run-directory} (Vorgabe: @code{"/var/run/nginx"}) | ||
| 19440 | In welchem Verzeichnis NGinx eine PID-Datei anlegen und temporäre Dateien | ||
| 19441 | ablegen wird. | ||
| 19442 | |||
| 19443 | @item @code{server-blocks} (Vorgabe: @code{'()}) | ||
| 19444 | Eine Liste von @dfn{Server-Blöcken}, die in der erzeugten | ||
| 19445 | Konfigurationsdatei stehen sollen. Die Elemente davon sollten den Typ | ||
| 19446 | @code{<nginx-server-configuration>} haben. | ||
| 19447 | |||
| 19448 | Im folgenden Beispiel wäre NGinx so eingerichtet, dass Anfragen an | ||
| 19449 | @code{www.example.com} mit Dateien aus dem Verzeichnis | ||
| 19450 | @code{/srv/http/www.example.com} beantwortet werden, ohne HTTPS zu benutzen. | ||
| 19451 | @example | ||
| 19452 | (service nginx-service-type | ||
| 19453 | (nginx-configuration | ||
| 19454 | (server-blocks | ||
| 19455 | (list (nginx-server-configuration | ||
| 19456 | (server-name '("www.example.com")) | ||
| 19457 | (root "/srv/http/www.example.com")))))) | ||
| 19458 | @end example | ||
| 19459 | |||
| 19460 | @item @code{upstream-blocks} (Vorgabe: @code{'()}) | ||
| 19461 | Eine Liste von @dfn{Upstream-Blöcken}, die in der erzeugten | ||
| 19462 | Konfigurationsdatei stehen sollen. Ihre Elemente sollten den Typ | ||
| 19463 | @code{<nginx-upstream-configuration>} haben. | ||
| 19464 | |||
| 19465 | Upstreams als @code{upstream-blocks} zu konfigurieren, kann hilfreich sein, | ||
| 19466 | wenn es mit @code{locations} in @code{<nginx-server-configuration>} | ||
| 19467 | verbunden wird. Das folgende Beispiel erzeugt eine Server-Konfiguration mit | ||
| 19468 | einer Location-Konfiguration, bei der Anfragen als Proxy entsprechend einer | ||
| 19469 | Upstream-Konfiguration weitergeleitet werden, wodurch zwei Server diese | ||
| 19470 | beantworten können. | ||
| 19471 | |||
| 19472 | @example | ||
| 19473 | (service | ||
| 19474 | nginx-service-type | ||
| 19475 | (nginx-configuration | ||
| 19476 | (server-blocks | ||
| 19477 | (list (nginx-server-configuration | ||
| 19478 | (server-name '("www.example.com")) | ||
| 19479 | (root "/srv/http/www.example.com") | ||
| 19480 | (locations | ||
| 19481 | (list | ||
| 19482 | (nginx-location-configuration | ||
| 19483 | (uri "/path1") | ||
| 19484 | (body '("proxy_pass http://server-proxy;")))))))) | ||
| 19485 | (upstream-blocks | ||
| 19486 | (list (nginx-upstream-configuration | ||
| 19487 | (name "server-proxy") | ||
| 19488 | (servers (list "server1.example.com" | ||
| 19489 | "server2.example.com"))))))) | ||
| 19490 | @end example | ||
| 19491 | |||
| 19492 | @item @code{file} (default: @code{#f}) | ||
| 19493 | Wenn eine Konfigurationsdatei als @var{file} angegeben wird, dann wird diese | ||
| 19494 | benutzt und @emph{keine} Konfigurationsdatei anhand der angegebenen | ||
| 19495 | @code{log-directory}, @code{run-directory}, @code{server-blocks} und | ||
| 19496 | @code{upstream-blocks} erzeugt. Trotzdem sollten diese Argumente bei einer | ||
| 19497 | richtigen Konfiguration mit denen in der Datei @var{file} übereinstimmen, | ||
| 19498 | damit die Verzeichnisse bei Aktivierung des Dienstes erzeugt werden. | ||
| 19499 | |||
| 19500 | Das kann nützlich sein, wenn Sie schon eine bestehende Konfigurationsdatei | ||
| 19501 | haben oder das, was Sie brauchen, nicht mit anderen Teilen eines | ||
| 19502 | nginx-configuration-Verbundsobjekts umgesetzt werden kann. | ||
| 19503 | |||
| 19504 | @item @code{server-names-hash-bucket-size} (Vorgabe: @code{#f}) | ||
| 19505 | Größe der Behälter (englisch »Buckets«) für die Hashtabelle der Servernamen; | ||
| 19506 | vorgegeben ist @code{#f}, wodurch die Größe der Cache-Lines des Prozessors | ||
| 19507 | verwendet wird. | ||
| 19508 | |||
| 19509 | @item @code{server-names-hash-bucket-max-size} (Vorgabe: @code{#f}) | ||
| 19510 | Maximale Behältergröße für die Hashtabelle der Servernamen. | ||
| 19511 | |||
| 19512 | @item @code{extra-content} (Vorgabe: @code{""}) | ||
| 19513 | Zusätzlicher Inhalt des @code{http}-Blocks. Er sollte eine Zeichenkette oder | ||
| 19514 | ein zeichenkettenwertiger G-Ausdruck. | ||
| 19515 | |||
| 19516 | @end table | ||
| 19517 | @end deffn | ||
| 19518 | |||
| 19519 | @deftp {Datentyp} nginx-server-configuration | ||
| 19520 | Der Datentyp, der die Konfiguration eines nginx-Serverblocks | ||
| 19521 | repräsentiert. Dieser Typ hat die folgenden Parameter: | ||
| 19522 | |||
| 19523 | @table @asis | ||
| 19524 | @item @code{listen} (Vorgabe: @code{'("80" "443 ssl")}) | ||
| 19525 | Jede @code{listen}-Direktive legt Adresse und Port für eine IP fest oder | ||
| 19526 | gibt einen Unix-Socket an, auf dem der Server Anfragen beantwortet. Es | ||
| 19527 | können entweder sowohl Adresse als auch Port oder nur die Adresse oder nur | ||
| 19528 | der Port angegeben werden. Als Adresse kann auch ein Rechnername | ||
| 19529 | (»Hostname«) angegeben werden, zum Beispiel: | ||
| 19530 | |||
| 19531 | @example | ||
| 19532 | '("127.0.0.1:8000" "127.0.0.1" "8000" "*:8000" "localhost:8000") | ||
| 19533 | @end example | ||
| 19534 | |||
| 19535 | @item @code{server-name} (Vorgabe: @code{(list 'default)}) | ||
| 19536 | Eine Liste von Servernamen, die dieser Server repräsentiert. @code{'default} | ||
| 19537 | repräsentiert den voreingestellten Server, der für Verbindungen verwendet | ||
| 19538 | wird, die zu keinem anderen Server passen. | ||
| 19539 | |||
| 19540 | @item @code{root} (Vorgabe: @code{"/srv/http"}) | ||
| 19541 | Wurzelverzeichnis der Webpräsenz, die über nginx abgerufen werden kann. | ||
| 19542 | |||
| 19543 | @item @code{locations} (Vorgabe: @code{'()}) | ||
| 19544 | Eine Liste von @dfn{nginx-location-configuration}- oder | ||
| 19545 | @dfn{nginx-named-location-configuration}-Verbundsobjekten, die innerhalb des | ||
| 19546 | Serverblocks benutzt werden. | ||
| 19547 | |||
| 19548 | @item @code{index} (Vorgabe: @code{(list "index.html")}) | ||
| 19549 | Index-Dateien, mit denen Anfragen nach einem Verzeichnis beantwortet | ||
| 19550 | werden. Wenn @emph{keine} davon gefunden wird, antwortet Nginx mit der Liste | ||
| 19551 | der Dateien im Verzeichnis. | ||
| 19552 | |||
| 19553 | @item @code{try-files} (Vorgabe: @code{'()}) | ||
| 19554 | Eine Liste der Dateien, bei denen in der angegebenen Reihenfolge geprüft | ||
| 19555 | wird, ob sie existieren. @code{nginx} beantwortet die Anfrage mit der ersten | ||
| 19556 | Datei, die es findet. | ||
| 19557 | |||
| 19558 | @item @code{ssl-certificate} (Vorgabe: @code{#f}) | ||
| 19559 | Wo das Zertifikat für sichere Verbindungen gespeichert ist. Sie sollten es | ||
| 19560 | auf @code{#f} setzen, wenn Sie kein Zertifikat haben oder kein HTTPS | ||
| 19561 | benutzen möchten. | ||
| 19562 | |||
| 19563 | @item @code{ssl-certificate-key} (Vorgabe: @code{#f}) | ||
| 19564 | Wo der private Schlüssel für sichere Verbindungen gespeichert ist. Sie | ||
| 19565 | sollten ihn auf @code{#f} setzen, wenn Sie keinen Schlüssel haben oder kein | ||
| 19566 | HTTPS benutzen möchten. | ||
| 19567 | |||
| 19568 | @item @code{server-tokens?} (Vorgabe: @code{#f}) | ||
| 19569 | Ob der Server Informationen über seine Konfiguration bei Antworten beilegen | ||
| 19570 | soll. | ||
| 19571 | |||
| 19572 | @item @code{raw-content} (Vorgabe: @code{'()}) | ||
| 19573 | Eine Liste von Zeilen, die unverändert in den Serverblock eingefügt werden. | ||
| 19574 | |||
| 19575 | @end table | ||
| 19576 | @end deftp | ||
| 19577 | |||
| 19578 | @deftp {Datentyp} nginx-upstream-configuration | ||
| 19579 | Der Datentyp, der die Konfiguration eines nginx-@code{upstream}-Blocks | ||
| 19580 | repräsentiert. Dieser Typ hat folgende Parameter: | ||
| 19581 | |||
| 19582 | @table @asis | ||
| 19583 | @item @code{name} | ||
| 19584 | Der Name dieser Servergruppe. | ||
| 19585 | |||
| 19586 | @item @code{servers} | ||
| 19587 | Gibt die Adressen der Server in der Gruppe an. Die Adresse kann als | ||
| 19588 | IP-Adresse (z.B.@: @samp{127.0.0.1}), Domänenname (z.B.@: | ||
| 19589 | @samp{backend1.example.com}) oder als Pfad eines Unix-Sockets mit dem | ||
| 19590 | vorangestellten Präfix @samp{unix:} angegeben werden. Wenn Adressen eine | ||
| 19591 | IP-Adresse oder einen Domänennamen benutzen, ist der voreingestellte Port | ||
| 19592 | 80, aber ein abweichender Port kann auch explizit angegeben werden. | ||
| 19593 | |||
| 19594 | @end table | ||
| 19595 | @end deftp | ||
| 19596 | |||
| 19597 | @deftp {Datentyp} nginx-location-configuration | ||
| 19598 | Der Datentyp, der die Konfiguration eines nginx-@code{location}-Blocks | ||
| 19599 | angibt. Der Typ hat die folgenden Parameter: | ||
| 19600 | |||
| 19601 | @table @asis | ||
| 19602 | @item @code{uri} | ||
| 19603 | Die URI, die auf diesen Block passt. | ||
| 19604 | |||
| 19605 | @anchor{nginx-location-configuration body} | ||
| 19606 | @item @code{body} | ||
| 19607 | Der Rumpf des location-Blocks, der als eine Liste von Zeichenketten | ||
| 19608 | angegeben werden muss. Er kann viele Konfigurationsdirektiven enthalten, zum | ||
| 19609 | Beispiel können Anfragen an eine Upstream-Servergruppe weitergeleitet | ||
| 19610 | werden, die mit einem @code{nginx-upstream-configuration}-Block angegeben | ||
| 19611 | wurde, indem diese Direktive im Rumpf angegeben wird: @samp{(list | ||
| 19612 | "proxy_pass http://upstream-name;")}. | ||
| 19613 | |||
| 19614 | @end table | ||
| 19615 | @end deftp | ||
| 19616 | |||
| 19617 | @deftp {Datentyp} nginx-named-location-configuration | ||
| 19618 | Der Datentyp repräsentiert die Konfiguration eines mit Namen versehenen | ||
| 19619 | nginx-location-Blocks (»Named Location Block«). Ein mit Namen versehener | ||
| 19620 | location-Block wird zur Umleitung von Anfragen benutzt und nicht für die | ||
| 19621 | normale Anfrageverarbeitung. Dieser Typ hat die folgenden Parameter: | ||
| 19622 | |||
| 19623 | @table @asis | ||
| 19624 | @item @code{name} | ||
| 19625 | Der Name, mit dem dieser location-Block identifiziert wird. | ||
| 19626 | |||
| 19627 | @item @code{body} | ||
| 19628 | Siehe @ref{nginx-location-configuration body}, weil der Rumpf (»Body«) eines | ||
| 19629 | mit Namen versehenen location-Blocks wie ein | ||
| 19630 | @code{nginx-location-configuration body} benutzt werden kann. Eine | ||
| 19631 | Einschränkung ist, dass der Rumpf eines mit Namen versehenen location-Blocks | ||
| 19632 | keine location-Blöcke enthalten kann. | ||
| 19633 | |||
| 19634 | @end table | ||
| 19635 | @end deftp | ||
| 19636 | |||
| 19637 | @subsubheading Varnish Cache | ||
| 19638 | @cindex Varnish | ||
| 19639 | Varnish is a fast cache server that sits in between web applications and end | ||
| 19640 | users. It proxies requests from clients and caches the accessed URLs such | ||
| 19641 | that multiple requests for the same resource only creates one request to the | ||
| 19642 | back-end. | ||
| 19643 | |||
| 19644 | @defvr {Scheme Variable} varnish-service-type | ||
| 19645 | Service type for the Varnish daemon. | ||
| 19646 | @end defvr | ||
| 19647 | |||
| 19648 | @deftp {Data Type} varnish-configuration | ||
| 19649 | Data type representing the @code{varnish} service configuration. This type | ||
| 19650 | has the following parameters: | ||
| 19651 | |||
| 19652 | @table @asis | ||
| 19653 | @item @code{package} (Vorgabe: @code{varnish}) | ||
| 19654 | Das Varnish-Paket, was benutzt werden soll. | ||
| 19655 | |||
| 19656 | @item @code{name} (Vorgabe: @code{"default"}) | ||
| 19657 | A name for this Varnish instance. Varnish will create a directory in | ||
| 19658 | @file{/var/varnish/} with this name and keep temporary files there. If the | ||
| 19659 | name starts with a forward slash, it is interpreted as an absolute directory | ||
| 19660 | name. | ||
| 19661 | |||
| 19662 | Pass the @code{-n} argument to other Varnish programs to connect to the | ||
| 19663 | named instance, e.g.@: @command{varnishncsa -n default}. | ||
| 19664 | |||
| 19665 | @item @code{backend} (Vorgabe: @code{"localhost:8080"}) | ||
| 19666 | The backend to use. This option has no effect if @code{vcl} is set. | ||
| 19667 | |||
| 19668 | @item @code{vcl} (Vorgabe: #f) | ||
| 19669 | The @dfn{VCL} (Varnish Configuration Language) program to run. If this is | ||
| 19670 | @code{#f}, Varnish will proxy @code{backend} using the default | ||
| 19671 | configuration. Otherwise this must be a file-like object with valid VCL | ||
| 19672 | syntax. | ||
| 19673 | |||
| 19674 | @c Varnish does not support HTTPS, so keep this URL to avoid confusion. | ||
| 19675 | For example, to mirror @url{http://www.gnu.org,www.gnu.org} with VCL you can | ||
| 19676 | do something along these lines: | ||
| 19677 | |||
| 19678 | @example | ||
| 19679 | (define %gnu-mirror | ||
| 19680 | (plain-file | ||
| 19681 | "gnu.vcl" | ||
| 19682 | "vcl 4.1; | ||
| 19683 | backend gnu @{ .host = "www.gnu.org"; @}")) | ||
| 19684 | |||
| 19685 | (operating-system | ||
| 19686 | ... | ||
| 19687 | (services (cons (service varnish-service-type | ||
| 19688 | (varnish-configuration | ||
| 19689 | (listen '(":80")) | ||
| 19690 | (vcl %gnu-mirror))) | ||
| 19691 | %base-services))) | ||
| 19692 | @end example | ||
| 19693 | |||
| 19694 | The configuration of an already running Varnish instance can be inspected | ||
| 19695 | and changed using the @command{varnishadm} program. | ||
| 19696 | |||
| 19697 | Consult the @url{https://varnish-cache.org/docs/,Varnish User Guide} and | ||
| 19698 | @url{https://book.varnish-software.com/4.0/,Varnish Book} for comprehensive | ||
| 19699 | documentation on Varnish and its configuration language. | ||
| 19700 | |||
| 19701 | @item @code{listen} (Vorgabe: @code{'("localhost:80")}) | ||
| 19702 | List of addresses Varnish will listen on. | ||
| 19703 | |||
| 19704 | @item @code{storage} (Vorgabe: @code{'("malloc,128m")}) | ||
| 19705 | List of storage backends that will be available in VCL. | ||
| 19706 | |||
| 19707 | @item @code{parameters} (Vorgabe: @code{'()}) | ||
| 19708 | List of run-time parameters in the form @code{'(("parameter" . "value"))}. | ||
| 19709 | |||
| 19710 | @item @code{extra-options} (Vorgabe: @code{'()}) | ||
| 19711 | Additional arguments to pass to the @command{varnishd} process. | ||
| 19712 | |||
| 19713 | @end table | ||
| 19714 | @end deftp | ||
| 19715 | |||
| 19716 | @subsubheading FastCGI | ||
| 19717 | @cindex fastcgi | ||
| 19718 | @cindex fcgiwrap | ||
| 19719 | FastCGI is an interface between the front-end and the back-end of a web | ||
| 19720 | service. It is a somewhat legacy facility; new web services should | ||
| 19721 | generally just talk HTTP between the front-end and the back-end. However | ||
| 19722 | there are a number of back-end services such as PHP or the optimized HTTP | ||
| 19723 | Git repository access that use FastCGI, so we have support for it in Guix. | ||
| 19724 | |||
| 19725 | To use FastCGI, you configure the front-end web server (e.g., nginx) to | ||
| 19726 | dispatch some subset of its requests to the fastcgi backend, which listens | ||
| 19727 | on a local TCP or UNIX socket. There is an intermediary @code{fcgiwrap} | ||
| 19728 | program that sits between the actual backend process and the web server. | ||
| 19729 | The front-end indicates which backend program to run, passing that | ||
| 19730 | information to the @code{fcgiwrap} process. | ||
| 19731 | |||
| 19732 | @defvr {Scheme Variable} fcgiwrap-service-type | ||
| 19733 | A service type for the @code{fcgiwrap} FastCGI proxy. | ||
| 19734 | @end defvr | ||
| 19735 | |||
| 19736 | @deftp {Data Type} fcgiwrap-configuration | ||
| 19737 | Der Datentyp, der die Konfiguration des @code{fcgiwrap}-Dienstes | ||
| 19738 | repräsentiert. Dieser Typ hat die folgenden Parameter: | ||
| 19739 | @table @asis | ||
| 19740 | @item @code{package} (default: @code{fcgiwrap}) | ||
| 19741 | The fcgiwrap package to use. | ||
| 19742 | |||
| 19743 | @item @code{socket} (default: @code{tcp:127.0.0.1:9000}) | ||
| 19744 | The socket on which the @code{fcgiwrap} process should listen, as a string. | ||
| 19745 | Valid @var{socket} values include @code{unix:@var{/path/to/unix/socket}}, | ||
| 19746 | @code{tcp:@var{dot.ted.qu.ad}:@var{port}} and | ||
| 19747 | @code{tcp6:[@var{ipv6_addr}]:port}. | ||
| 19748 | |||
| 19749 | @item @code{user} (default: @code{fcgiwrap}) | ||
| 19750 | @itemx @code{group} (default: @code{fcgiwrap}) | ||
| 19751 | The user and group names, as strings, under which to run the @code{fcgiwrap} | ||
| 19752 | process. The @code{fastcgi} service will ensure that if the user asks for | ||
| 19753 | the specific user or group names @code{fcgiwrap} that the corresponding user | ||
| 19754 | and/or group is present on the system. | ||
| 19755 | |||
| 19756 | It is possible to configure a FastCGI-backed web service to pass HTTP | ||
| 19757 | authentication information from the front-end to the back-end, and to allow | ||
| 19758 | @code{fcgiwrap} to run the back-end process as a corresponding local user. | ||
| 19759 | To enable this capability on the back-end., run @code{fcgiwrap} as the | ||
| 19760 | @code{root} user and group. Note that this capability also has to be | ||
| 19761 | configured on the front-end as well. | ||
| 19762 | @end table | ||
| 19763 | @end deftp | ||
| 19764 | |||
| 19765 | @cindex php-fpm | ||
| 19766 | PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI | ||
| 19767 | implementation with some additional features useful for sites of any size. | ||
| 19768 | |||
| 19769 | These features include: | ||
| 19770 | @itemize @bullet | ||
| 19771 | @item Adaptive process spawning | ||
| 19772 | @item Basic statistics (similar to Apache's mod_status) | ||
| 19773 | @item Advanced process management with graceful stop/start | ||
| 19774 | @item Ability to start workers with different uid/gid/chroot/environment | ||
| 19775 | and different php.ini (replaces safe_mode) | ||
| 19776 | @item Stdout & stderr logging | ||
| 19777 | @item Emergency restart in case of accidental opcode cache destruction | ||
| 19778 | @item Accelerated upload support | ||
| 19779 | @item Support for a "slowlog" | ||
| 19780 | @item Enhancements to FastCGI, such as fastcgi_finish_request() - | ||
| 19781 | a special function to finish request & flush all data while continuing to do | ||
| 19782 | something time-consuming (video converting, stats processing, etc.) | ||
| 19783 | @end itemize | ||
| 19784 | ...@: and much more. | ||
| 19785 | |||
| 19786 | @defvr {Scheme Variable} php-fpm-service-type | ||
| 19787 | A Service type for @code{php-fpm}. | ||
| 19788 | @end defvr | ||
| 19789 | |||
| 19790 | @deftp {Data Type} php-fpm-configuration | ||
| 19791 | Data Type for php-fpm service configuration. | ||
| 19792 | @table @asis | ||
| 19793 | @item @code{php} (default: @code{php}) | ||
| 19794 | The php package to use. | ||
| 19795 | @item @code{socket} (default: @code{(string-append "/var/run/php" (version-major (package-version php)) "-fpm.sock")}) | ||
| 19796 | The address on which to accept FastCGI requests. Valid syntaxes are: | ||
| 19797 | @table @asis | ||
| 19798 | @item @code{"ip.add.re.ss:port"} | ||
| 19799 | Listen on a TCP socket to a specific address on a specific port. | ||
| 19800 | @item @code{"port"} | ||
| 19801 | Listen on a TCP socket to all addresses on a specific port. | ||
| 19802 | @item @code{"/path/to/unix/socket"} | ||
| 19803 | Listen on a unix socket. | ||
| 19804 | @end table | ||
| 19805 | |||
| 19806 | @item @code{user} (default: @code{php-fpm}) | ||
| 19807 | User who will own the php worker processes. | ||
| 19808 | @item @code{group} (default: @code{php-fpm}) | ||
| 19809 | Group of the worker processes. | ||
| 19810 | @item @code{socket-user} (default: @code{php-fpm}) | ||
| 19811 | User who can speak to the php-fpm socket. | ||
| 19812 | @item @code{socket-group} (default: @code{php-fpm}) | ||
| 19813 | Group that can speak to the php-fpm socket. | ||
| 19814 | @item @code{pid-file} (default: @code{(string-append "/var/run/php" (version-major (package-version php)) "-fpm.pid")}) | ||
| 19815 | The process id of the php-fpm process is written to this file once the | ||
| 19816 | service has started. | ||
| 19817 | @item @code{log-file} (default: @code{(string-append "/var/log/php" (version-major (package-version php)) "-fpm.log")}) | ||
| 19818 | Log for the php-fpm master process. | ||
| 19819 | @item @code{process-manager} (default: @code{(php-fpm-dynamic-process-manager-configuration)}) | ||
| 19820 | Detailed settings for the php-fpm process manager. Must be either: | ||
| 19821 | @table @asis | ||
| 19822 | @item @code{<php-fpm-dynamic-process-manager-configuration>} | ||
| 19823 | @item @code{<php-fpm-static-process-manager-configuration>} | ||
| 19824 | @item @code{<php-fpm-on-demand-process-manager-configuration>} | ||
| 19825 | @end table | ||
| 19826 | @item @code{display-errors} (default @code{#f}) | ||
| 19827 | Determines whether php errors and warning should be sent to clients and | ||
| 19828 | displayed in their browsers. This is useful for local php development, but | ||
| 19829 | a security risk for public sites, as error messages can reveal passwords and | ||
| 19830 | personal data. | ||
| 19831 | @item @code{timezone} (Vorgabe: @code{#f}) | ||
| 19832 | Specifies @code{php_admin_value[date.timezone]} parameter. | ||
| 19833 | @item @code{workers-logfile} (default @code{(string-append "/var/log/php" (version-major (package-version php)) "-fpm.www.log")}) | ||
| 19834 | This file will log the @code{stderr} outputs of php worker processes. Can | ||
| 19835 | be set to @code{#f} to disable logging. | ||
| 19836 | @item @code{file} (default @code{#f}) | ||
| 19837 | An optional override of the whole configuration. You can use the | ||
| 19838 | @code{mixed-text-file} function or an absolute filepath for it. | ||
| 19839 | @end table | ||
| 19840 | @end deftp | ||
| 19841 | |||
| 19842 | @deftp {Data type} php-fpm-dynamic-process-manager-configuration | ||
| 19843 | Data Type for the @code{dynamic} php-fpm process manager. With the | ||
| 19844 | @code{dynamic} process manager, spare worker processes are kept around based | ||
| 19845 | on it's configured limits. | ||
| 19846 | @table @asis | ||
| 19847 | @item @code{max-children} (default: @code{5}) | ||
| 19848 | Maximum of worker processes. | ||
| 19849 | @item @code{start-servers} (default: @code{2}) | ||
| 19850 | How many worker processes should be started on start-up. | ||
| 19851 | @item @code{min-spare-servers} (default: @code{1}) | ||
| 19852 | How many spare worker processes should be kept around at minimum. | ||
| 19853 | @item @code{max-spare-servers} (default: @code{3}) | ||
| 19854 | How many spare worker processes should be kept around at maximum. | ||
| 19855 | @end table | ||
| 19856 | @end deftp | ||
| 19857 | |||
| 19858 | @deftp {Data type} php-fpm-static-process-manager-configuration | ||
| 19859 | Data Type for the @code{static} php-fpm process manager. With the | ||
| 19860 | @code{static} process manager, an unchanging number of worker processes are | ||
| 19861 | created. | ||
| 19862 | @table @asis | ||
| 19863 | @item @code{max-children} (default: @code{5}) | ||
| 19864 | Maximum of worker processes. | ||
| 19865 | @end table | ||
| 19866 | @end deftp | ||
| 19867 | |||
| 19868 | @deftp {Data type} php-fpm-on-demand-process-manager-configuration | ||
| 19869 | Data Type for the @code{on-demand} php-fpm process manager. With the | ||
| 19870 | @code{on-demand} process manager, worker processes are only created as | ||
| 19871 | requests arrive. | ||
| 19872 | @table @asis | ||
| 19873 | @item @code{max-children} (default: @code{5}) | ||
| 19874 | Maximum of worker processes. | ||
| 19875 | @item @code{process-idle-timeout} (default: @code{10}) | ||
| 19876 | The time in seconds after which a process with no requests is killed. | ||
| 19877 | @end table | ||
| 19878 | @end deftp | ||
| 19879 | |||
| 19880 | |||
| 19881 | @deffn {Scheme Procedure} nginx-php-fpm-location @ | ||
| 19882 | [#:nginx-package nginx] @ [socket (string-append "/var/run/php" @ | ||
| 19883 | (version-major (package-version php)) @ "-fpm.sock")] A helper function to | ||
| 19884 | quickly add php to an @code{nginx-server-configuration}. | ||
| 19885 | @end deffn | ||
| 19886 | |||
| 19887 | A simple services setup for nginx with php can look like this: | ||
| 19888 | @example | ||
| 19889 | (services (cons* (service dhcp-client-service-type) | ||
| 19890 | (service php-fpm-service-type) | ||
| 19891 | (service nginx-service-type | ||
| 19892 | (nginx-server-configuration | ||
| 19893 | (server-name '("example.com")) | ||
| 19894 | (root "/srv/http/") | ||
| 19895 | (locations | ||
| 19896 | (list (nginx-php-location))) | ||
| 19897 | (listen '("80")) | ||
| 19898 | (ssl-certificate #f) | ||
| 19899 | (ssl-certificate-key #f))) | ||
| 19900 | %base-services)) | ||
| 19901 | @end example | ||
| 19902 | |||
| 19903 | @cindex cat-avatar-generator | ||
| 19904 | The cat avatar generator is a simple service to demonstrate the use of | ||
| 19905 | php-fpm in @code{Nginx}. It is used to generate cat avatar from a seed, for | ||
| 19906 | instance the hash of a user's email address. | ||
| 19907 | |||
| 19908 | @deffn {Scheme-Prozedur} cat-avatar-generator-service @ | ||
| 19909 | [#:cache-dir "/var/cache/cat-avatar-generator"] @ [#:package | ||
| 19910 | cat-avatar-generator] @ [#:configuration (nginx-server-configuration)] | ||
| 19911 | Returns an nginx-server-configuration that inherits @code{configuration}. | ||
| 19912 | It extends the nginx configuration to add a server block that serves | ||
| 19913 | @code{package}, a version of cat-avatar-generator. During execution, | ||
| 19914 | cat-avatar-generator will be able to use @code{cache-dir} as its cache | ||
| 19915 | directory. | ||
| 19916 | @end deffn | ||
| 19917 | |||
| 19918 | A simple setup for cat-avatar-generator can look like this: | ||
| 19919 | @example | ||
| 19920 | (services (cons* (cat-avatar-generator-service | ||
| 19921 | #:configuration | ||
| 19922 | (nginx-server-configuration | ||
| 19923 | (server-name '("example.com")))) | ||
| 19924 | ... | ||
| 19925 | %base-services)) | ||
| 19926 | @end example | ||
| 19927 | |||
| 19928 | @subsubheading Hpcguix-web | ||
| 19929 | |||
| 19930 | @cindex hpcguix-web | ||
| 19931 | The @uref{hpcguix-web, https://github.com/UMCUGenetics/hpcguix-web/} program | ||
| 19932 | is a customizable web interface to browse Guix packages, initially designed | ||
| 19933 | for users of high-performance computing (HPC) clusters. | ||
| 19934 | |||
| 19935 | @defvr {Scheme Variable} hpcguix-web-service-type | ||
| 19936 | The service type for @code{hpcguix-web}. | ||
| 19937 | @end defvr | ||
| 19938 | |||
| 19939 | @deftp {Data Type} hpcguix-web-configuration | ||
| 19940 | Data type for the hpcguix-web service configuration. | ||
| 19941 | |||
| 19942 | @table @asis | ||
| 19943 | @item @code{specs} | ||
| 19944 | A gexp (@pxref{G-Ausdrücke}) specifying the hpcguix-web service | ||
| 19945 | configuration. The main items available in this spec are: | ||
| 19946 | |||
| 19947 | @table @asis | ||
| 19948 | @item @code{title-prefix} (Vorgabe: @code{"hpcguix | "}) | ||
| 19949 | Das Präfix der Webseitentitel. | ||
| 19950 | |||
| 19951 | @item @code{guix-command} (Vorgabe: @code{"guix"}) | ||
| 19952 | Der @command{guix}-Befehl. | ||
| 19953 | |||
| 19954 | @item @code{package-filter-proc} (Vorgabe: @code{(const #t)}) | ||
| 19955 | Eine Prozedur, die festlegt, wie anzuzeigende Pakete gefiltert werden. | ||
| 19956 | |||
| 19957 | @item @code{package-page-extension-proc} (Vorgabe: @code{(const '())}) | ||
| 19958 | Extension package for @code{hpcguix-web}. | ||
| 19959 | |||
| 19960 | @item @code{menu} (Vorgabe: @code{'()}) | ||
| 19961 | Additional entry in page @code{menu}. | ||
| 19962 | |||
| 19963 | @item @code{channels} (Vorgabe: @code{%default-channels}) | ||
| 19964 | List of channels from which the package list is built (@pxref{Kanäle}). | ||
| 19965 | |||
| 19966 | @item @code{package-list-expiration} (Vorgabe: @code{(* 12 3600)}) | ||
| 19967 | The expiration time, in seconds, after which the package list is rebuilt | ||
| 19968 | from the latest instances of the given channels. | ||
| 19969 | @end table | ||
| 19970 | |||
| 19971 | See the hpcguix-web repository for a | ||
| 19972 | @uref{https://github.com/UMCUGenetics/hpcguix-web/blob/master/hpcweb-configuration.scm, | ||
| 19973 | complete example}. | ||
| 19974 | |||
| 19975 | @item @code{package} (Vorgabe: @code{hpcguix-web}) | ||
| 19976 | Das hpcguix-web-Paket, was benutzt werden soll. | ||
| 19977 | @end table | ||
| 19978 | @end deftp | ||
| 19979 | |||
| 19980 | A typical hpcguix-web service declaration looks like this: | ||
| 19981 | |||
| 19982 | @example | ||
| 19983 | (service hpcguix-web-service-type | ||
| 19984 | (hpcguix-web-configuration | ||
| 19985 | (specs | ||
| 19986 | #~(define site-config | ||
| 19987 | (hpcweb-configuration | ||
| 19988 | (title-prefix "Guix-HPC - ") | ||
| 19989 | (menu '(("/about" "ABOUT")))))))) | ||
| 19990 | @end example | ||
| 19991 | |||
| 19992 | @quotation Anmerkung | ||
| 19993 | The hpcguix-web service periodically updates the package list it publishes | ||
| 19994 | by pulling channels from Git. To that end, it needs to access X.509 | ||
| 19995 | certificates so that it can authenticate Git servers when communicating over | ||
| 19996 | HTTPS, and it assumes that @file{/etc/ssl/certs} contains those | ||
| 19997 | certificates. | ||
| 19998 | |||
| 19999 | Thus, make sure to add @code{nss-certs} or another certificate package to | ||
| 20000 | the @code{packages} field of your configuration. @ref{X.509-Zertifikate}, | ||
| 20001 | for more information on X.509 certificates. | ||
| 20002 | @end quotation | ||
| 20003 | |||
| 20004 | @node Zertifikatsdienste | ||
| 20005 | @subsection Zertifikatsdienste | ||
| 20006 | |||
| 20007 | @cindex Web | ||
| 20008 | @cindex HTTP, HTTPS | ||
| 20009 | @cindex Let's Encrypt | ||
| 20010 | @cindex TLS certificates | ||
| 20011 | The @code{(gnu services certbot)} module provides a service to automatically | ||
| 20012 | obtain a valid TLS certificate from the Let's Encrypt certificate | ||
| 20013 | authority. These certificates can then be used to serve content securely | ||
| 20014 | over HTTPS or other TLS-based protocols, with the knowledge that the client | ||
| 20015 | will be able to verify the server's authenticity. | ||
| 20016 | |||
| 20017 | @url{https://letsencrypt.org/, Let's Encrypt} provides the @code{certbot} | ||
| 20018 | tool to automate the certification process. This tool first securely | ||
| 20019 | generates a key on the server. It then makes a request to the Let's Encrypt | ||
| 20020 | certificate authority (CA) to sign the key. The CA checks that the request | ||
| 20021 | originates from the host in question by using a challenge-response protocol, | ||
| 20022 | requiring the server to provide its response over HTTP. If that protocol | ||
| 20023 | completes successfully, the CA signs the key, resulting in a certificate. | ||
| 20024 | That certificate is valid for a limited period of time, and therefore to | ||
| 20025 | continue to provide TLS services, the server needs to periodically ask the | ||
| 20026 | CA to renew its signature. | ||
| 20027 | |||
| 20028 | The certbot service automates this process: the initial key generation, the | ||
| 20029 | initial certification request to the Let's Encrypt service, the web server | ||
| 20030 | challenge/response integration, writing the certificate to disk, the | ||
| 20031 | automated periodic renewals, and the deployment tasks associated with the | ||
| 20032 | renewal (e.g.@: reloading services, copying keys with different | ||
| 20033 | permissions). | ||
| 20034 | |||
| 20035 | Certbot is run twice a day, at a random minute within the hour. It won't do | ||
| 20036 | anything until your certificates are due for renewal or revoked, but running | ||
| 20037 | it regularly would give your service a chance of staying online in case a | ||
| 20038 | Let's Encrypt-initiated revocation happened for some reason. | ||
| 20039 | |||
| 20040 | By using this service, you agree to the ACME Subscriber Agreement, which can | ||
| 20041 | be found there: @url{https://acme-v01.api.letsencrypt.org/directory}. | ||
| 20042 | |||
| 20043 | @defvr {Scheme Variable} certbot-service-type | ||
| 20044 | A service type for the @code{certbot} Let's Encrypt client. Its value must | ||
| 20045 | be a @code{certbot-configuration} record as in this example: | ||
| 20046 | |||
| 20047 | @example | ||
| 20048 | (define %nginx-deploy-hook | ||
| 20049 | (program-file | ||
| 20050 | "nginx-deploy-hook" | ||
| 20051 | #~(let ((pid (call-with-input-file "/var/run/nginx/pid" read))) | ||
| 20052 | (kill pid SIGHUP)))) | ||
| 20053 | |||
| 20054 | (service certbot-service-type | ||
| 20055 | (certbot-configuration | ||
| 20056 | (email "foo@@example.net") | ||
| 20057 | (certificates | ||
| 20058 | (list | ||
| 20059 | (certificate-configuration | ||
| 20060 | (domains '("example.net" "www.example.net")) | ||
| 20061 | (deploy-hook %nginx-deploy-hook)) | ||
| 20062 | (certificate-configuration | ||
| 20063 | (domains '("bar.example.net"))))))) | ||
| 20064 | @end example | ||
| 20065 | |||
| 20066 | See below for details about @code{certbot-configuration}. | ||
| 20067 | @end defvr | ||
| 20068 | |||
| 20069 | @deftp {Data Type} certbot-configuration | ||
| 20070 | Data type representing the configuration of the @code{certbot} service. | ||
| 20071 | This type has the following parameters: | ||
| 20072 | |||
| 20073 | @table @asis | ||
| 20074 | @item @code{package} (default: @code{certbot}) | ||
| 20075 | The certbot package to use. | ||
| 20076 | |||
| 20077 | @item @code{webroot} (default: @code{/var/www}) | ||
| 20078 | The directory from which to serve the Let's Encrypt challenge/response | ||
| 20079 | files. | ||
| 20080 | |||
| 20081 | @item @code{certificates} (default: @code{()}) | ||
| 20082 | A list of @code{certificates-configuration}s for which to generate | ||
| 20083 | certificates and request signatures. Each certificate has a @code{name} and | ||
| 20084 | several @code{domains}. | ||
| 20085 | |||
| 20086 | @item @code{email} | ||
| 20087 | Mandatory email used for registration, recovery contact, and important | ||
| 20088 | account notifications. | ||
| 20089 | |||
| 20090 | @item @code{rsa-key-size} (default: @code{2048}) | ||
| 20091 | Size of the RSA key. | ||
| 20092 | |||
| 20093 | @item @code{default-location} (default: @i{see below}) | ||
| 20094 | The default @code{nginx-location-configuration}. Because @code{certbot} | ||
| 20095 | needs to be able to serve challenges and responses, it needs to be able to | ||
| 20096 | run a web server. It does so by extending the @code{nginx} web service with | ||
| 20097 | an @code{nginx-server-configuration} listening on the @var{domains} on port | ||
| 20098 | 80, and which has a @code{nginx-location-configuration} for the | ||
| 20099 | @code{/.well-known/} URI path subspace used by Let's Encrypt. @xref{Web-Dienste}, for more on these nginx configuration data types. | ||
| 20100 | |||
| 20101 | Requests to other URL paths will be matched by the @code{default-location}, | ||
| 20102 | which if present is added to all @code{nginx-server-configuration}s. | ||
| 20103 | |||
| 20104 | By default, the @code{default-location} will issue a redirect from | ||
| 20105 | @code{http://@var{domain}/...} to @code{https://@var{domain}/...}, leaving | ||
| 20106 | you to define what to serve on your site via @code{https}. | ||
| 20107 | |||
| 20108 | Pass @code{#f} to not issue a default location. | ||
| 20109 | @end table | ||
| 20110 | @end deftp | ||
| 20111 | |||
| 20112 | @deftp {Data Type} certificate-configuration | ||
| 20113 | Data type representing the configuration of a certificate. This type has | ||
| 20114 | the following parameters: | ||
| 20115 | |||
| 20116 | @table @asis | ||
| 20117 | @item @code{name} (default: @i{see below}) | ||
| 20118 | This name is used by Certbot for housekeeping and in file paths; it doesn't | ||
| 20119 | affect the content of the certificate itself. To see certificate names, run | ||
| 20120 | @code{certbot certificates}. | ||
| 20121 | |||
| 20122 | Its default is the first provided domain. | ||
| 20123 | |||
| 20124 | @item @code{domains} (default: @code{()}) | ||
| 20125 | The first domain provided will be the subject CN of the certificate, and all | ||
| 20126 | domains will be Subject Alternative Names on the certificate. | ||
| 20127 | |||
| 20128 | @item @code{deploy-hook} (default: @code{#f}) | ||
| 20129 | Command to be run in a shell once for each successfully issued certificate. | ||
| 20130 | For this command, the shell variable @code{$RENEWED_LINEAGE} will point to | ||
| 20131 | the config live subdirectory (for example, | ||
| 20132 | @samp{"/etc/letsencrypt/live/example.com"}) containing the new certificates | ||
| 20133 | and keys; the shell variable @code{$RENEWED_DOMAINS} will contain a | ||
| 20134 | space-delimited list of renewed certificate domains (for example, | ||
| 20135 | @samp{"example.com www.example.com"}. | ||
| 20136 | |||
| 20137 | @end table | ||
| 20138 | @end deftp | ||
| 20139 | |||
| 20140 | For each @code{certificate-configuration}, the certificate is saved to | ||
| 20141 | @code{/etc/letsencrypt/live/@var{name}/fullchain.pem} and the key is saved | ||
| 20142 | to @code{/etc/letsencrypt/live/@var{name}/privkey.pem}. | ||
| 20143 | @node DNS-Dienste | ||
| 20144 | @subsection DNS-Dienste | ||
| 20145 | @cindex DNS (domain name system) | ||
| 20146 | @cindex domain name system (DNS) | ||
| 20147 | |||
| 20148 | The @code{(gnu services dns)} module provides services related to the | ||
| 20149 | @dfn{domain name system} (DNS). It provides a server service for hosting an | ||
| 20150 | @emph{authoritative} DNS server for multiple zones, slave or master. This | ||
| 20151 | service uses @uref{https://www.knot-dns.cz/, Knot DNS}. And also a caching | ||
| 20152 | and forwarding DNS server for the LAN, which uses | ||
| 20153 | @uref{http://www.thekelleys.org.uk/dnsmasq/doc.html, dnsmasq}. | ||
| 20154 | |||
| 20155 | @subsubheading Knot-Dienst | ||
| 20156 | |||
| 20157 | An example configuration of an authoritative server for two zones, one | ||
| 20158 | master and one slave, is: | ||
| 20159 | |||
| 20160 | @lisp | ||
| 20161 | (define-zone-entries example.org.zone | ||
| 20162 | ;; Name TTL Class Type Data | ||
| 20163 | ("@@" "" "IN" "A" "127.0.0.1") | ||
| 20164 | ("@@" "" "IN" "NS" "ns") | ||
| 20165 | ("ns" "" "IN" "A" "127.0.0.1")) | ||
| 20166 | |||
| 20167 | (define master-zone | ||
| 20168 | (knot-zone-configuration | ||
| 20169 | (domain "example.org") | ||
| 20170 | (zone (zone-file | ||
| 20171 | (origin "example.org") | ||
| 20172 | (entries example.org.zone))))) | ||
| 20173 | |||
| 20174 | (define slave-zone | ||
| 20175 | (knot-zone-configuration | ||
| 20176 | (domain "plop.org") | ||
| 20177 | (dnssec-policy "default") | ||
| 20178 | (master (list "plop-master")))) | ||
| 20179 | |||
| 20180 | (define plop-master | ||
| 20181 | (knot-remote-configuration | ||
| 20182 | (id "plop-master") | ||
| 20183 | (address (list "208.76.58.171")))) | ||
| 20184 | |||
| 20185 | (operating-system | ||
| 20186 | ;; ... | ||
| 20187 | (services (cons* (service knot-service-type | ||
| 20188 | (knot-configuration | ||
| 20189 | (remotes (list plop-master)) | ||
| 20190 | (zones (list master-zone slave-zone)))) | ||
| 20191 | ;; ... | ||
| 20192 | %base-services))) | ||
| 20193 | @end lisp | ||
| 20194 | |||
| 20195 | @deffn {Scheme Variable} knot-service-type | ||
| 20196 | This is the type for the Knot DNS server. | ||
| 20197 | |||
| 20198 | Knot DNS is an authoritative DNS server, meaning that it can serve multiple | ||
| 20199 | zones, that is to say domain names you would buy from a registrar. This | ||
| 20200 | server is not a resolver, meaning that it can only resolve names for which | ||
| 20201 | it is authoritative. This server can be configured to serve zones as a | ||
| 20202 | master server or a slave server as a per-zone basis. Slave zones will get | ||
| 20203 | their data from masters, and will serve it as an authoritative server. From | ||
| 20204 | the point of view of a resolver, there is no difference between master and | ||
| 20205 | slave. | ||
| 20206 | |||
| 20207 | The following data types are used to configure the Knot DNS server: | ||
| 20208 | @end deffn | ||
| 20209 | |||
| 20210 | @deftp {Data Type} knot-key-configuration | ||
| 20211 | Data type representing a key. This type has the following parameters: | ||
| 20212 | |||
| 20213 | @table @asis | ||
| 20214 | @item @code{id} (default: @code{""}) | ||
| 20215 | An identifier for other configuration fields to refer to this key. IDs must | ||
| 20216 | be unique and must not be empty. | ||
| 20217 | |||
| 20218 | @item @code{algorithm} (default: @code{#f}) | ||
| 20219 | The algorithm to use. Choose between @code{#f}, @code{'hmac-md5}, | ||
| 20220 | @code{'hmac-sha1}, @code{'hmac-sha224}, @code{'hmac-sha256}, | ||
| 20221 | @code{'hmac-sha384} and @code{'hmac-sha512}. | ||
| 20222 | |||
| 20223 | @item @code{secret} (default: @code{""}) | ||
| 20224 | The secret key itself. | ||
| 20225 | |||
| 20226 | @end table | ||
| 20227 | @end deftp | ||
| 20228 | |||
| 20229 | @deftp {Data Type} knot-acl-configuration | ||
| 20230 | Data type representing an Access Control List (ACL) configuration. This | ||
| 20231 | type has the following parameters: | ||
| 20232 | |||
| 20233 | @table @asis | ||
| 20234 | @item @code{id} (default: @code{""}) | ||
| 20235 | An identifier for ether configuration fields to refer to this key. IDs must | ||
| 20236 | be unique and must not be empty. | ||
| 20237 | |||
| 20238 | @item @code{address} (default: @code{'()}) | ||
| 20239 | An ordered list of IP addresses, network subnets, or network ranges | ||
| 20240 | represented with strings. The query must match one of them. Empty value | ||
| 20241 | means that address match is not required. | ||
| 20242 | |||
| 20243 | @item @code{key} (default: @code{'()}) | ||
| 20244 | An ordered list of references to keys represented with strings. The string | ||
| 20245 | must match a key ID defined in a @code{knot-key-configuration}. No key | ||
| 20246 | means that a key is not require to match that ACL. | ||
| 20247 | |||
| 20248 | @item @code{action} (default: @code{'()}) | ||
| 20249 | An ordered list of actions that are permitted or forbidden by this ACL. | ||
| 20250 | Possible values are lists of zero or more elements from @code{'transfer}, | ||
| 20251 | @code{'notify} and @code{'update}. | ||
| 20252 | |||
| 20253 | @item @code{deny?} (default: @code{#f}) | ||
| 20254 | When true, the ACL defines restrictions. Listed actions are forbidden. | ||
| 20255 | When false, listed actions are allowed. | ||
| 20256 | |||
| 20257 | @end table | ||
| 20258 | @end deftp | ||
| 20259 | |||
| 20260 | @deftp {Data Type} zone-entry | ||
| 20261 | Data type represnting a record entry in a zone file. This type has the | ||
| 20262 | following parameters: | ||
| 20263 | |||
| 20264 | @table @asis | ||
| 20265 | @item @code{name} (default: @code{"@@"}) | ||
| 20266 | The name of the record. @code{"@@"} refers to the origin of the zone. | ||
| 20267 | Names are relative to the origin of the zone. For example, in the | ||
| 20268 | @code{example.org} zone, @code{"ns.example.org"} actually refers to | ||
| 20269 | @code{ns.example.org.example.org}. Names ending with a dot are absolute, | ||
| 20270 | which means that @code{"ns.example.org."} refers to @code{ns.example.org}. | ||
| 20271 | |||
| 20272 | @item @code{ttl} (default: @code{""}) | ||
| 20273 | The Time-To-Live (TTL) of this record. If not set, the default TTL is used. | ||
| 20274 | |||
| 20275 | @item @code{class} (default: @code{"IN"}) | ||
| 20276 | The class of the record. Knot currently supports only @code{"IN"} and | ||
| 20277 | partially @code{"CH"}. | ||
| 20278 | |||
| 20279 | @item @code{type} (default: @code{"A"}) | ||
| 20280 | The type of the record. Common types include A (IPv4 address), AAAA (IPv6 | ||
| 20281 | address), NS (Name Server) and MX (Mail eXchange). Many other types are | ||
| 20282 | defined. | ||
| 20283 | |||
| 20284 | @item @code{data} (default: @code{""}) | ||
| 20285 | The data contained in the record. For instance an IP address associated | ||
| 20286 | with an A record, or a domain name associated with an NS record. Remember | ||
| 20287 | that domain names are relative to the origin unless they end with a dot. | ||
| 20288 | |||
| 20289 | @end table | ||
| 20290 | @end deftp | ||
| 20291 | |||
| 20292 | @deftp {Data Type} zone-file | ||
| 20293 | Data type representing the content of a zone file. This type has the | ||
| 20294 | following parameters: | ||
| 20295 | |||
| 20296 | @table @asis | ||
| 20297 | @item @code{entries} (default: @code{'()}) | ||
| 20298 | The list of entries. The SOA record is taken care of, so you don't need to | ||
| 20299 | put it in the list of entries. This list should probably contain an entry | ||
| 20300 | for your primary authoritative DNS server. Other than using a list of | ||
| 20301 | entries directly, you can use @code{define-zone-entries} to define a object | ||
| 20302 | containing the list of entries more easily, that you can later pass to the | ||
| 20303 | @code{entries} field of the @code{zone-file}. | ||
| 20304 | |||
| 20305 | @item @code{origin} (default: @code{""}) | ||
| 20306 | The name of your zone. This parameter cannot be empty. | ||
| 20307 | |||
| 20308 | @item @code{ns} (default: @code{"ns"}) | ||
| 20309 | The domain of your primary authoritative DNS server. The name is relative | ||
| 20310 | to the origin, unless it ends with a dot. It is mandatory that this primary | ||
| 20311 | DNS server corresponds to an NS record in the zone and that it is associated | ||
| 20312 | to an IP address in the list of entries. | ||
| 20313 | |||
| 20314 | @item @code{mail} (default: @code{"hostmaster"}) | ||
| 20315 | An email address people can contact you at, as the owner of the zone. This | ||
| 20316 | is translated as @code{<mail>@@<origin>}. | ||
| 20317 | |||
| 20318 | @item @code{serial} (default: @code{1}) | ||
| 20319 | The serial number of the zone. As this is used to keep track of changes by | ||
| 20320 | both slaves and resolvers, it is mandatory that it @emph{never} decreases. | ||
| 20321 | Always increment it when you make a change in your zone. | ||
| 20322 | |||
| 20323 | @item @code{refresh} (default: @code{(* 2 24 3600)}) | ||
| 20324 | The frequency at which slaves will do a zone transfer. This value is a | ||
| 20325 | number of seconds. It can be computed by multiplications or with | ||
| 20326 | @code{(string->duration)}. | ||
| 20327 | |||
| 20328 | @item @code{retry} (default: @code{(* 15 60)}) | ||
| 20329 | The period after which a slave will retry to contact its master when it | ||
| 20330 | fails to do so a first time. | ||
| 20331 | |||
| 20332 | @item @code{expiry} (default: @code{(* 14 24 3600)}) | ||
| 20333 | Default TTL of records. Existing records are considered correct for at most | ||
| 20334 | this amount of time. After this period, resolvers will invalidate their | ||
| 20335 | cache and check again that it still exists. | ||
| 20336 | |||
| 20337 | @item @code{nx} (default: @code{3600}) | ||
| 20338 | Default TTL of inexistant records. This delay is usually short because you | ||
| 20339 | want your new domains to reach everyone quickly. | ||
| 20340 | |||
| 20341 | @end table | ||
| 20342 | @end deftp | ||
| 20343 | |||
| 20344 | @deftp {Data Type} knot-remote-configuration | ||
| 20345 | Data type representing a remote configuration. This type has the following | ||
| 20346 | parameters: | ||
| 20347 | |||
| 20348 | @table @asis | ||
| 20349 | @item @code{id} (default: @code{""}) | ||
| 20350 | An identifier for other configuration fields to refer to this remote. IDs | ||
| 20351 | must be unique and must not be empty. | ||
| 20352 | |||
| 20353 | @item @code{address} (default: @code{'()}) | ||
| 20354 | An ordered list of destination IP addresses. Addresses are tried in | ||
| 20355 | sequence. An optional port can be given with the @@ separator. For | ||
| 20356 | instance: @code{(list "1.2.3.4" "2.3.4.5@@53")}. Default port is 53. | ||
| 20357 | |||
| 20358 | @item @code{via} (default: @code{'()}) | ||
| 20359 | An ordered list of source IP addresses. An empty list will have Knot choose | ||
| 20360 | an appropriate source IP. An optional port can be given with the @@ | ||
| 20361 | separator. The default is to choose at random. | ||
| 20362 | |||
| 20363 | @item @code{key} (default: @code{#f}) | ||
| 20364 | A reference to a key, that is a string containing the identifier of a key | ||
| 20365 | defined in a @code{knot-key-configuration} field. | ||
| 20366 | |||
| 20367 | @end table | ||
| 20368 | @end deftp | ||
| 20369 | |||
| 20370 | @deftp {Data Type} knot-keystore-configuration | ||
| 20371 | Data type representing a keystore to hold dnssec keys. This type has the | ||
| 20372 | following parameters: | ||
| 20373 | |||
| 20374 | @table @asis | ||
| 20375 | @item @code{id} (default: @code{""}) | ||
| 20376 | The id of the keystore. It must not be empty. | ||
| 20377 | |||
| 20378 | @item @code{backend} (default: @code{'pem}) | ||
| 20379 | The backend to store the keys in. Can be @code{'pem} or @code{'pkcs11}. | ||
| 20380 | |||
| 20381 | @item @code{config} (default: @code{"/var/lib/knot/keys/keys"}) | ||
| 20382 | The configuration string of the backend. An example for the PKCS#11 is: | ||
| 20383 | @code{"pkcs11:token=knot;pin-value=1234 | ||
| 20384 | /gnu/store/.../lib/pkcs11/libsofthsm2.so"}. For the pem backend, the string | ||
| 20385 | reprensents a path in the file system. | ||
| 20386 | |||
| 20387 | @end table | ||
| 20388 | @end deftp | ||
| 20389 | |||
| 20390 | @deftp {Data Type} knot-policy-configuration | ||
| 20391 | Data type representing a dnssec policy. Knot DNS is able to automatically | ||
| 20392 | sign your zones. It can either generate and manage your keys automatically | ||
| 20393 | or use keys that you generate. | ||
| 20394 | |||
| 20395 | Dnssec is usually implemented using two keys: a Key Signing Key (KSK) that | ||
| 20396 | is used to sign the second, and a Zone Signing Key (ZSK) that is used to | ||
| 20397 | sign the zone. In order to be trusted, the KSK needs to be present in the | ||
| 20398 | parent zone (usually a top-level domain). If your registrar supports | ||
| 20399 | dnssec, you will have to send them your KSK's hash so they can add a DS | ||
| 20400 | record in their zone. This is not automated and need to be done each time | ||
| 20401 | you change your KSK. | ||
| 20402 | |||
| 20403 | The policy also defines the lifetime of keys. Usually, ZSK can be changed | ||
| 20404 | easily and use weaker cryptographic functions (they use lower parameters) in | ||
| 20405 | order to sign records quickly, so they are changed often. The KSK however | ||
| 20406 | requires manual interaction with the registrar, so they are changed less | ||
| 20407 | often and use stronger parameters because they sign only one record. | ||
| 20408 | |||
| 20409 | This type has the following parameters: | ||
| 20410 | |||
| 20411 | @table @asis | ||
| 20412 | @item @code{id} (default: @code{""}) | ||
| 20413 | The id of the policy. It must not be empty. | ||
| 20414 | |||
| 20415 | @item @code{keystore} (default: @code{"default"}) | ||
| 20416 | A reference to a keystore, that is a string containing the identifier of a | ||
| 20417 | keystore defined in a @code{knot-keystore-configuration} field. The | ||
| 20418 | @code{"default"} identifier means the default keystore (a kasp database that | ||
| 20419 | was setup by this service). | ||
| 20420 | |||
| 20421 | @item @code{manual?} (default: @code{#f}) | ||
| 20422 | Whether the key management is manual or automatic. | ||
| 20423 | |||
| 20424 | @item @code{single-type-signing?} (default: @code{#f}) | ||
| 20425 | When @code{#t}, use the Single-Type Signing Scheme. | ||
| 20426 | |||
| 20427 | @item @code{algorithm} (default: @code{"ecdsap256sha256"}) | ||
| 20428 | An algorithm of signing keys and issued signatures. | ||
| 20429 | |||
| 20430 | @item @code{ksk-size} (default: @code{256}) | ||
| 20431 | The length of the KSK. Note that this value is correct for the default | ||
| 20432 | algorithm, but would be unsecure for other algorithms. | ||
| 20433 | |||
| 20434 | @item @code{zsk-size} (default: @code{256}) | ||
| 20435 | The length of the ZSK. Note that this value is correct for the default | ||
| 20436 | algorithm, but would be unsecure for other algorithms. | ||
| 20437 | |||
| 20438 | @item @code{dnskey-ttl} (default: @code{'default}) | ||
| 20439 | The TTL value for DNSKEY records added into zone apex. The special | ||
| 20440 | @code{'default} value means same as the zone SOA TTL. | ||
| 20441 | |||
| 20442 | @item @code{zsk-lifetime} (default: @code{(* 30 24 3600)}) | ||
| 20443 | The period between ZSK publication and the next rollover initiation. | ||
| 20444 | |||
| 20445 | @item @code{propagation-delay} (default: @code{(* 24 3600)}) | ||
| 20446 | An extra delay added for each key rollover step. This value should be high | ||
| 20447 | enough to cover propagation of data from the master server to all slaves. | ||
| 20448 | |||
| 20449 | @item @code{rrsig-lifetime} (default: @code{(* 14 24 3600)}) | ||
| 20450 | A validity period of newly issued signatures. | ||
| 20451 | |||
| 20452 | @item @code{rrsig-refresh} (default: @code{(* 7 24 3600)}) | ||
| 20453 | A period how long before a signature expiration the signature will be | ||
| 20454 | refreshed. | ||
| 20455 | |||
| 20456 | @item @code{nsec3?} (default: @code{#f}) | ||
| 20457 | When @code{#t}, NSEC3 will be used instead of NSEC. | ||
| 20458 | |||
| 20459 | @item @code{nsec3-iterations} (default: @code{5}) | ||
| 20460 | The number of additional times the hashing is performed. | ||
| 20461 | |||
| 20462 | @item @code{nsec3-salt-length} (default: @code{8}) | ||
| 20463 | The length of a salt field in octets, which is appended to the original | ||
| 20464 | owner name before hashing. | ||
| 20465 | |||
| 20466 | @item @code{nsec3-salt-lifetime} (default: @code{(* 30 24 3600)}) | ||
| 20467 | The validity period of newly issued salt field. | ||
| 20468 | |||
| 20469 | @end table | ||
| 20470 | @end deftp | ||
| 20471 | |||
| 20472 | @deftp {Data Type} knot-zone-configuration | ||
| 20473 | Data type representing a zone served by Knot. This type has the following | ||
| 20474 | parameters: | ||
| 20475 | |||
| 20476 | @table @asis | ||
| 20477 | @item @code{domain} (default: @code{""}) | ||
| 20478 | The domain served by this configuration. It must not be empty. | ||
| 20479 | |||
| 20480 | @item @code{file} (default: @code{""}) | ||
| 20481 | The file where this zone is saved. This parameter is ignored by master | ||
| 20482 | zones. Empty means default location that depends on the domain name. | ||
| 20483 | |||
| 20484 | @item @code{zone} (default: @code{(zone-file)}) | ||
| 20485 | The content of the zone file. This parameter is ignored by slave zones. It | ||
| 20486 | must contain a zone-file record. | ||
| 20487 | |||
| 20488 | @item @code{master} (default: @code{'()}) | ||
| 20489 | A list of master remotes. When empty, this zone is a master. When set, | ||
| 20490 | this zone is a slave. This is a list of remotes identifiers. | ||
| 20491 | |||
| 20492 | @item @code{ddns-master} (default: @code{#f}) | ||
| 20493 | The main master. When empty, it defaults to the first master in the list of | ||
| 20494 | masters. | ||
| 20495 | |||
| 20496 | @item @code{notify} (default: @code{'()}) | ||
| 20497 | A list of slave remote identifiers. | ||
| 20498 | |||
| 20499 | @item @code{acl} (default: @code{'()}) | ||
| 20500 | A list of acl identifiers. | ||
| 20501 | |||
| 20502 | @item @code{semantic-checks?} (default: @code{#f}) | ||
| 20503 | When set, this adds more semantic checks to the zone. | ||
| 20504 | |||
| 20505 | @item @code{disable-any?} (default: @code{#f}) | ||
| 20506 | When set, this forbids queries of the ANY type. | ||
| 20507 | |||
| 20508 | @item @code{zonefile-sync} (default: @code{0}) | ||
| 20509 | The delay between a modification in memory and on disk. 0 means immediate | ||
| 20510 | synchronization. | ||
| 20511 | |||
| 20512 | @item @code{serial-policy} (default: @code{'increment}) | ||
| 20513 | A policy between @code{'increment} and @code{'unixtime}. | ||
| 20514 | |||
| 20515 | @end table | ||
| 20516 | @end deftp | ||
| 20517 | |||
| 20518 | @deftp {Data Type} knot-configuration | ||
| 20519 | Data type representing the Knot configuration. This type has the following | ||
| 20520 | parameters: | ||
| 20521 | |||
| 20522 | @table @asis | ||
| 20523 | @item @code{knot} (default: @code{knot}) | ||
| 20524 | The Knot package. | ||
| 20525 | |||
| 20526 | @item @code{run-directory} (default: @code{"/var/run/knot"}) | ||
| 20527 | The run directory. This directory will be used for pid file and sockets. | ||
| 20528 | |||
| 20529 | @item @code{listen-v4} (default: @code{"0.0.0.0"}) | ||
| 20530 | An ip address on which to listen. | ||
| 20531 | |||
| 20532 | @item @code{listen-v6} (default: @code{"::"}) | ||
| 20533 | An ip address on which to listen. | ||
| 20534 | |||
| 20535 | @item @code{listen-port} (default: @code{53}) | ||
| 20536 | A port on which to listen. | ||
| 20537 | |||
| 20538 | @item @code{keys} (default: @code{'()}) | ||
| 20539 | The list of knot-key-configuration used by this configuration. | ||
| 20540 | |||
| 20541 | @item @code{acls} (default: @code{'()}) | ||
| 20542 | The list of knot-acl-configuration used by this configuration. | ||
| 20543 | |||
| 20544 | @item @code{remotes} (default: @code{'()}) | ||
| 20545 | The list of knot-remote-configuration used by this configuration. | ||
| 20546 | |||
| 20547 | @item @code{zones} (default: @code{'()}) | ||
| 20548 | The list of knot-zone-configuration used by this configuration. | ||
| 20549 | |||
| 20550 | @end table | ||
| 20551 | @end deftp | ||
| 20552 | |||
| 20553 | @subsubheading Dnsmasq-Dienst | ||
| 20554 | |||
| 20555 | @deffn {Scheme Variable} dnsmasq-service-type | ||
| 20556 | This is the type of the dnsmasq service, whose value should be an | ||
| 20557 | @code{dnsmasq-configuration} object as in this example: | ||
| 20558 | |||
| 20559 | @example | ||
| 20560 | (service dnsmasq-service-type | ||
| 20561 | (dnsmasq-configuration | ||
| 20562 | (no-resolv? #t) | ||
| 20563 | (servers '("192.168.1.1")))) | ||
| 20564 | @end example | ||
| 20565 | @end deffn | ||
| 20566 | |||
| 20567 | @deftp {Datentyp} dnsmasq-configuration | ||
| 20568 | Repräsentiert die dnsmasq-Konfiguration. | ||
| 20569 | |||
| 20570 | @table @asis | ||
| 20571 | @item @code{package} (Vorgabe: @var{dnsmasq}) | ||
| 20572 | Package object of the dnsmasq server. | ||
| 20573 | |||
| 20574 | @item @code{no-hosts?} (Vorgabe: @code{#f}) | ||
| 20575 | When true, don't read the hostnames in /etc/hosts. | ||
| 20576 | |||
| 20577 | @item @code{port} (Vorgabe: @code{53}) | ||
| 20578 | The port to listen on. Setting this to zero completely disables DNS | ||
| 20579 | responses, leaving only DHCP and/or TFTP functions. | ||
| 20580 | |||
| 20581 | @item @code{local-service?} (Vorgabe: @code{#t}) | ||
| 20582 | Accept DNS queries only from hosts whose address is on a local subnet, ie a | ||
| 20583 | subnet for which an interface exists on the server. | ||
| 20584 | |||
| 20585 | @item @code{listen-addresses} (Vorgabe: @code{'()}) | ||
| 20586 | Listen on the given IP addresses. | ||
| 20587 | |||
| 20588 | @item @code{resolv-file} (Vorgabe: @code{"/etc/resolv.conf"}) | ||
| 20589 | The file to read the IP address of the upstream nameservers from. | ||
| 20590 | |||
| 20591 | @item @code{no-resolv?} (Vorgabe: @code{#f}) | ||
| 20592 | When true, don't read @var{resolv-file}. | ||
| 20593 | |||
| 20594 | @item @code{servers} (default: @code{'()}) | ||
| 20595 | Specify IP address of upstream servers directly. | ||
| 20596 | |||
| 20597 | @item @code{cache-size} (Vorgabe: @code{150}) | ||
| 20598 | Set the size of dnsmasq's cache. Setting the cache size to zero disables | ||
| 20599 | caching. | ||
| 20600 | |||
| 20601 | @item @code{negative-cache?} (Vorgabe: @code{#t}) | ||
| 20602 | When false, disable negative caching. | ||
| 20603 | |||
| 20604 | @end table | ||
| 20605 | @end deftp | ||
| 20606 | |||
| 20607 | @subsubheading ddclient-Dienst | ||
| 20608 | |||
| 20609 | @cindex ddclient | ||
| 20610 | The ddclient service described below runs the ddclient daemon, which takes | ||
| 20611 | care of automatically updating DNS entries for service providers such as | ||
| 20612 | @uref{https://dyn.com/dns/, Dyn}. | ||
| 20613 | |||
| 20614 | The following example show instantiates the service with its default | ||
| 20615 | configuration: | ||
| 20616 | |||
| 20617 | @example | ||
| 20618 | (service ddclient-service-type) | ||
| 20619 | @end example | ||
| 20620 | |||
| 20621 | Note that ddclient needs to access credentials that are stored in a | ||
| 20622 | @dfn{secret file}, by default @file{/etc/ddclient/secrets} (see | ||
| 20623 | @code{secret-file} below.) You are expected to create this file manually, | ||
| 20624 | in an ``out-of-band'' fashion (you @emph{could} make this file part of the | ||
| 20625 | service configuration, for instance by using @code{plain-file}, but it will | ||
| 20626 | be world-readable @i{via} @file{/gnu/store}.) See the examples in the | ||
| 20627 | @file{share/ddclient} directory of the @code{ddclient} package. | ||
| 20628 | |||
| 20629 | @c %start of fragment | ||
| 20630 | |||
| 20631 | Available @code{ddclient-configuration} fields are: | ||
| 20632 | |||
| 20633 | @deftypevr {@code{ddclient-configuration} parameter} package ddclient | ||
| 20634 | Das ddclient-Paket. | ||
| 20635 | |||
| 20636 | @end deftypevr | ||
| 20637 | |||
| 20638 | @deftypevr {@code{ddclient-configuration} parameter} integer daemon | ||
| 20639 | The period after which ddclient will retry to check IP and domain name. | ||
| 20640 | |||
| 20641 | Defaults to @samp{300}. | ||
| 20642 | |||
| 20643 | @end deftypevr | ||
| 20644 | |||
| 20645 | @deftypevr {@code{ddclient-configuration} parameter} boolean syslog | ||
| 20646 | Use syslog for the output. | ||
| 20647 | |||
| 20648 | Defaults to @samp{#t}. | ||
| 20649 | |||
| 20650 | @end deftypevr | ||
| 20651 | |||
| 20652 | @deftypevr {@code{ddclient-configuration} parameter} string mail | ||
| 20653 | Mail to user. | ||
| 20654 | |||
| 20655 | Defaults to @samp{"root"}. | ||
| 20656 | |||
| 20657 | @end deftypevr | ||
| 20658 | |||
| 20659 | @deftypevr {@code{ddclient-configuration} parameter} string mail-failure | ||
| 20660 | Den Nutzer per Mail bei fehlgeschlagenen Aktualisierungen benachrichtigen. | ||
| 20661 | |||
| 20662 | Defaults to @samp{"root"}. | ||
| 20663 | |||
| 20664 | @end deftypevr | ||
| 20665 | |||
| 20666 | @deftypevr {@code{ddclient-configuration} parameter} string pid | ||
| 20667 | PID-Datei für den ddclient. | ||
| 20668 | |||
| 20669 | Defaults to @samp{"/var/run/ddclient/ddclient.pid"}. | ||
| 20670 | |||
| 20671 | @end deftypevr | ||
| 20672 | |||
| 20673 | @deftypevr {@code{ddclient-configuration} parameter} boolean ssl | ||
| 20674 | Enable SSL support. | ||
| 20675 | |||
| 20676 | Defaults to @samp{#t}. | ||
| 20677 | |||
| 20678 | @end deftypevr | ||
| 20679 | |||
| 20680 | @deftypevr {@code{ddclient-configuration} parameter} string user | ||
| 20681 | Specifies the user name or ID that is used when running ddclient program. | ||
| 20682 | |||
| 20683 | Defaults to @samp{"ddclient"}. | ||
| 20684 | |||
| 20685 | @end deftypevr | ||
| 20686 | |||
| 20687 | @deftypevr {@code{ddclient-configuration} parameter} string group | ||
| 20688 | Group of the user who will run the ddclient program. | ||
| 20689 | |||
| 20690 | Defaults to @samp{"ddclient"}. | ||
| 20691 | |||
| 20692 | @end deftypevr | ||
| 20693 | |||
| 20694 | @deftypevr {@code{ddclient-configuration} parameter} string secret-file | ||
| 20695 | Secret file which will be appended to @file{ddclient.conf} file. This file | ||
| 20696 | contains credentials for use by ddclient. You are expected to create it | ||
| 20697 | manually. | ||
| 20698 | |||
| 20699 | Defaults to @samp{"/etc/ddclient/secrets.conf"}. | ||
| 20700 | |||
| 20701 | @end deftypevr | ||
| 20702 | |||
| 20703 | @deftypevr {@code{ddclient-configuration} parameter} list extra-options | ||
| 20704 | Extra options will be appended to @file{ddclient.conf} file. | ||
| 20705 | |||
| 20706 | Defaults to @samp{()}. | ||
| 20707 | |||
| 20708 | @end deftypevr | ||
| 20709 | |||
| 20710 | |||
| 20711 | @c %end of fragment | ||
| 20712 | |||
| 20713 | |||
| 20714 | @node VPN-Dienste | ||
| 20715 | @subsection VPN-Dienste | ||
| 20716 | @cindex VPN (virtual private network) | ||
| 20717 | @cindex virtual private network (VPN) | ||
| 20718 | |||
| 20719 | The @code{(gnu services vpn)} module provides services related to | ||
| 20720 | @dfn{virtual private networks} (VPNs). It provides a @emph{client} service | ||
| 20721 | for your machine to connect to a VPN, and a @emph{servire} service for your | ||
| 20722 | machine to host a VPN. Both services use @uref{https://openvpn.net/, | ||
| 20723 | OpenVPN}. | ||
| 20724 | |||
| 20725 | @deffn {Scheme Procedure} openvpn-client-service @ | ||
| 20726 | [#:config (openvpn-client-configuration)] | ||
| 20727 | |||
| 20728 | Return a service that runs @command{openvpn}, a VPN daemon, as a client. | ||
| 20729 | @end deffn | ||
| 20730 | |||
| 20731 | @deffn {Scheme Procedure} openvpn-server-service @ | ||
| 20732 | [#:config (openvpn-server-configuration)] | ||
| 20733 | |||
| 20734 | Return a service that runs @command{openvpn}, a VPN daemon, as a server. | ||
| 20735 | |||
| 20736 | Both can be run simultaneously. | ||
| 20737 | @end deffn | ||
| 20738 | |||
| 20739 | @c %automatically generated documentation | ||
| 20740 | |||
| 20741 | Available @code{openvpn-client-configuration} fields are: | ||
| 20742 | |||
| 20743 | @deftypevr {@code{openvpn-client-configuration} parameter} package openvpn | ||
| 20744 | The OpenVPN package. | ||
| 20745 | |||
| 20746 | @end deftypevr | ||
| 20747 | |||
| 20748 | @deftypevr {@code{openvpn-client-configuration} parameter} string pid-file | ||
| 20749 | The OpenVPN pid file. | ||
| 20750 | |||
| 20751 | Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. | ||
| 20752 | |||
| 20753 | @end deftypevr | ||
| 20754 | |||
| 20755 | @deftypevr {@code{openvpn-client-configuration} parameter} proto proto | ||
| 20756 | The protocol (UDP or TCP) used to open a channel between clients and | ||
| 20757 | servers. | ||
| 20758 | |||
| 20759 | Defaults to @samp{udp}. | ||
| 20760 | |||
| 20761 | @end deftypevr | ||
| 20762 | |||
| 20763 | @deftypevr {@code{openvpn-client-configuration} parameter} dev dev | ||
| 20764 | The device type used to represent the VPN connection. | ||
| 20765 | |||
| 20766 | Defaults to @samp{tun}. | ||
| 20767 | |||
| 20768 | @end deftypevr | ||
| 20769 | |||
| 20770 | @deftypevr {@code{openvpn-client-configuration} parameter} string ca | ||
| 20771 | The certificate authority to check connections against. | ||
| 20772 | |||
| 20773 | Defaults to @samp{"/etc/openvpn/ca.crt"}. | ||
| 20774 | |||
| 20775 | @end deftypevr | ||
| 20776 | |||
| 20777 | @deftypevr {@code{openvpn-client-configuration} parameter} string cert | ||
| 20778 | The certificate of the machine the daemon is running on. It should be | ||
| 20779 | signed by the authority given in @code{ca}. | ||
| 20780 | |||
| 20781 | Defaults to @samp{"/etc/openvpn/client.crt"}. | ||
| 20782 | |||
| 20783 | @end deftypevr | ||
| 20784 | |||
| 20785 | @deftypevr {@code{openvpn-client-configuration} parameter} string key | ||
| 20786 | The key of the machine the daemon is running on. It must be the key whose | ||
| 20787 | certificate is @code{cert}. | ||
| 20788 | |||
| 20789 | Defaults to @samp{"/etc/openvpn/client.key"}. | ||
| 20790 | |||
| 20791 | @end deftypevr | ||
| 20792 | |||
| 20793 | @deftypevr {@code{openvpn-client-configuration} parameter} boolean comp-lzo? | ||
| 20794 | Whether to use the lzo compression algorithm. | ||
| 20795 | |||
| 20796 | Defaults to @samp{#t}. | ||
| 20797 | |||
| 20798 | @end deftypevr | ||
| 20799 | |||
| 20800 | @deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-key? | ||
| 20801 | Don't re-read key files across SIGUSR1 or --ping-restart. | ||
| 20802 | |||
| 20803 | Defaults to @samp{#t}. | ||
| 20804 | |||
| 20805 | @end deftypevr | ||
| 20806 | |||
| 20807 | @deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-tun? | ||
| 20808 | Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 | ||
| 20809 | or --ping-restart restarts. | ||
| 20810 | |||
| 20811 | Defaults to @samp{#t}. | ||
| 20812 | |||
| 20813 | @end deftypevr | ||
| 20814 | |||
| 20815 | @deftypevr {@code{openvpn-client-configuration} parameter} number verbosity | ||
| 20816 | Verbosity level. | ||
| 20817 | |||
| 20818 | Defaults to @samp{3}. | ||
| 20819 | |||
| 20820 | @end deftypevr | ||
| 20821 | |||
| 20822 | @deftypevr {@code{openvpn-client-configuration} parameter} tls-auth-client tls-auth | ||
| 20823 | Add an additional layer of HMAC authentication on top of the TLS control | ||
| 20824 | channel to protect against DoS attacks. | ||
| 20825 | |||
| 20826 | Defaults to @samp{#f}. | ||
| 20827 | |||
| 20828 | @end deftypevr | ||
| 20829 | |||
| 20830 | @deftypevr {@code{openvpn-client-configuration} parameter} key-usage verify-key-usage? | ||
| 20831 | Whether to check the server certificate has server usage extension. | ||
| 20832 | |||
| 20833 | Defaults to @samp{#t}. | ||
| 20834 | |||
| 20835 | @end deftypevr | ||
| 20836 | |||
| 20837 | @deftypevr {@code{openvpn-client-configuration} parameter} bind bind? | ||
| 20838 | Bind to a specific local port number. | ||
| 20839 | |||
| 20840 | Defaults to @samp{#f}. | ||
| 20841 | |||
| 20842 | @end deftypevr | ||
| 20843 | |||
| 20844 | @deftypevr {@code{openvpn-client-configuration} parameter} resolv-retry resolv-retry? | ||
| 20845 | Retry resolving server address. | ||
| 20846 | |||
| 20847 | Defaults to @samp{#t}. | ||
| 20848 | |||
| 20849 | @end deftypevr | ||
| 20850 | |||
| 20851 | @deftypevr {@code{openvpn-client-configuration} parameter} openvpn-remote-list remote | ||
| 20852 | A list of remote servers to connect to. | ||
| 20853 | |||
| 20854 | Defaults to @samp{()}. | ||
| 20855 | |||
| 20856 | Available @code{openvpn-remote-configuration} fields are: | ||
| 20857 | |||
| 20858 | @deftypevr {@code{openvpn-remote-configuration} parameter} string name | ||
| 20859 | Server name. | ||
| 20860 | |||
| 20861 | Defaults to @samp{"my-server"}. | ||
| 20862 | |||
| 20863 | @end deftypevr | ||
| 20864 | |||
| 20865 | @deftypevr {@code{openvpn-remote-configuration} parameter} number port | ||
| 20866 | Port number the server listens to. | ||
| 20867 | |||
| 20868 | Defaults to @samp{1194}. | ||
| 20869 | |||
| 20870 | @end deftypevr | ||
| 20871 | |||
| 20872 | @end deftypevr | ||
| 20873 | @c %end of automatic openvpn-client documentation | ||
| 20874 | |||
| 20875 | @c %automatically generated documentation | ||
| 20876 | |||
| 20877 | Available @code{openvpn-server-configuration} fields are: | ||
| 20878 | |||
| 20879 | @deftypevr {@code{openvpn-server-configuration} parameter} package openvpn | ||
| 20880 | The OpenVPN package. | ||
| 20881 | |||
| 20882 | @end deftypevr | ||
| 20883 | |||
| 20884 | @deftypevr {@code{openvpn-server-configuration} parameter} string pid-file | ||
| 20885 | The OpenVPN pid file. | ||
| 20886 | |||
| 20887 | Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. | ||
| 20888 | |||
| 20889 | @end deftypevr | ||
| 20890 | |||
| 20891 | @deftypevr {@code{openvpn-server-configuration} parameter} proto proto | ||
| 20892 | The protocol (UDP or TCP) used to open a channel between clients and | ||
| 20893 | servers. | ||
| 20894 | |||
| 20895 | Defaults to @samp{udp}. | ||
| 20896 | |||
| 20897 | @end deftypevr | ||
| 20898 | |||
| 20899 | @deftypevr {@code{openvpn-server-configuration} parameter} dev dev | ||
| 20900 | The device type used to represent the VPN connection. | ||
| 20901 | |||
| 20902 | Defaults to @samp{tun}. | ||
| 20903 | |||
| 20904 | @end deftypevr | ||
| 20905 | |||
| 20906 | @deftypevr {@code{openvpn-server-configuration} parameter} string ca | ||
| 20907 | The certificate authority to check connections against. | ||
| 20908 | |||
| 20909 | Defaults to @samp{"/etc/openvpn/ca.crt"}. | ||
| 20910 | |||
| 20911 | @end deftypevr | ||
| 20912 | |||
| 20913 | @deftypevr {@code{openvpn-server-configuration} parameter} string cert | ||
| 20914 | The certificate of the machine the daemon is running on. It should be | ||
| 20915 | signed by the authority given in @code{ca}. | ||
| 20916 | |||
| 20917 | Defaults to @samp{"/etc/openvpn/client.crt"}. | ||
| 20918 | |||
| 20919 | @end deftypevr | ||
| 20920 | |||
| 20921 | @deftypevr {@code{openvpn-server-configuration} parameter} string key | ||
| 20922 | The key of the machine the daemon is running on. It must be the key whose | ||
| 20923 | certificate is @code{cert}. | ||
| 20924 | |||
| 20925 | Defaults to @samp{"/etc/openvpn/client.key"}. | ||
| 20926 | |||
| 20927 | @end deftypevr | ||
| 20928 | |||
| 20929 | @deftypevr {@code{openvpn-server-configuration} parameter} boolean comp-lzo? | ||
| 20930 | Whether to use the lzo compression algorithm. | ||
| 20931 | |||
| 20932 | Defaults to @samp{#t}. | ||
| 20933 | |||
| 20934 | @end deftypevr | ||
| 20935 | |||
| 20936 | @deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-key? | ||
| 20937 | Don't re-read key files across SIGUSR1 or --ping-restart. | ||
| 20938 | |||
| 20939 | Defaults to @samp{#t}. | ||
| 20940 | |||
| 20941 | @end deftypevr | ||
| 20942 | |||
| 20943 | @deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-tun? | ||
| 20944 | Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 | ||
| 20945 | or --ping-restart restarts. | ||
| 20946 | |||
| 20947 | Defaults to @samp{#t}. | ||
| 20948 | |||
| 20949 | @end deftypevr | ||
| 20950 | |||
| 20951 | @deftypevr {@code{openvpn-server-configuration} parameter} number verbosity | ||
| 20952 | Verbosity level. | ||
| 20953 | |||
| 20954 | Defaults to @samp{3}. | ||
| 20955 | |||
| 20956 | @end deftypevr | ||
| 20957 | |||
| 20958 | @deftypevr {@code{openvpn-server-configuration} parameter} tls-auth-server tls-auth | ||
| 20959 | Add an additional layer of HMAC authentication on top of the TLS control | ||
| 20960 | channel to protect against DoS attacks. | ||
| 20961 | |||
| 20962 | Defaults to @samp{#f}. | ||
| 20963 | |||
| 20964 | @end deftypevr | ||
| 20965 | |||
| 20966 | @deftypevr {@code{openvpn-server-configuration} parameter} number port | ||
| 20967 | Specifies the port number on which the server listens. | ||
| 20968 | |||
| 20969 | Defaults to @samp{1194}. | ||
| 20970 | |||
| 20971 | @end deftypevr | ||
| 20972 | |||
| 20973 | @deftypevr {@code{openvpn-server-configuration} parameter} ip-mask server | ||
| 20974 | An ip and mask specifying the subnet inside the virtual network. | ||
| 20975 | |||
| 20976 | Defaults to @samp{"10.8.0.0 255.255.255.0"}. | ||
| 20977 | |||
| 20978 | @end deftypevr | ||
| 20979 | |||
| 20980 | @deftypevr {@code{openvpn-server-configuration} parameter} cidr6 server-ipv6 | ||
| 20981 | A CIDR notation specifying the IPv6 subnet inside the virtual network. | ||
| 20982 | |||
| 20983 | Defaults to @samp{#f}. | ||
| 20984 | |||
| 20985 | @end deftypevr | ||
| 20986 | |||
| 20987 | @deftypevr {@code{openvpn-server-configuration} parameter} string dh | ||
| 20988 | The Diffie-Hellman parameters file. | ||
| 20989 | |||
| 20990 | Defaults to @samp{"/etc/openvpn/dh2048.pem"}. | ||
| 20991 | |||
| 20992 | @end deftypevr | ||
| 20993 | |||
| 20994 | @deftypevr {@code{openvpn-server-configuration} parameter} string ifconfig-pool-persist | ||
| 20995 | The file that records client IPs. | ||
| 20996 | |||
| 20997 | Defaults to @samp{"/etc/openvpn/ipp.txt"}. | ||
| 20998 | |||
| 20999 | @end deftypevr | ||
| 21000 | |||
| 21001 | @deftypevr {@code{openvpn-server-configuration} parameter} gateway redirect-gateway? | ||
| 21002 | When true, the server will act as a gateway for its clients. | ||
| 21003 | |||
| 21004 | Defaults to @samp{#f}. | ||
| 21005 | |||
| 21006 | @end deftypevr | ||
| 21007 | |||
| 21008 | @deftypevr {@code{openvpn-server-configuration} parameter} boolean client-to-client? | ||
| 21009 | When true, clients are allowed to talk to each other inside the VPN. | ||
| 21010 | |||
| 21011 | Defaults to @samp{#f}. | ||
| 21012 | |||
| 21013 | @end deftypevr | ||
| 21014 | |||
| 21015 | @deftypevr {@code{openvpn-server-configuration} parameter} keepalive keepalive | ||
| 21016 | Causes ping-like messages to be sent back and forth over the link so that | ||
| 21017 | each side knows when the other side has gone down. @code{keepalive} | ||
| 21018 | requires a pair. The first element is the period of the ping sending, and | ||
| 21019 | the second element is the timeout before considering the other side down. | ||
| 21020 | |||
| 21021 | @end deftypevr | ||
| 21022 | |||
| 21023 | @deftypevr {@code{openvpn-server-configuration} parameter} number max-clients | ||
| 21024 | The maximum number of clients. | ||
| 21025 | |||
| 21026 | Defaults to @samp{100}. | ||
| 21027 | |||
| 21028 | @end deftypevr | ||
| 21029 | |||
| 21030 | @deftypevr {@code{openvpn-server-configuration} parameter} string status | ||
| 21031 | The status file. This file shows a small report on current connection. It | ||
| 21032 | is truncated and rewritten every minute. | ||
| 21033 | |||
| 21034 | Defaults to @samp{"/var/run/openvpn/status"}. | ||
| 21035 | |||
| 21036 | @end deftypevr | ||
| 21037 | |||
| 21038 | @deftypevr {@code{openvpn-server-configuration} parameter} openvpn-ccd-list client-config-dir | ||
| 21039 | The list of configuration for some clients. | ||
| 21040 | |||
| 21041 | Defaults to @samp{()}. | ||
| 21042 | |||
| 21043 | Available @code{openvpn-ccd-configuration} fields are: | ||
| 21044 | |||
| 21045 | @deftypevr {@code{openvpn-ccd-configuration} parameter} string name | ||
| 21046 | Client name. | ||
| 21047 | |||
| 21048 | Defaults to @samp{"client"}. | ||
| 21049 | |||
| 21050 | @end deftypevr | ||
| 21051 | |||
| 21052 | @deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask iroute | ||
| 21053 | Client own network | ||
| 21054 | |||
| 21055 | Defaults to @samp{#f}. | ||
| 21056 | |||
| 21057 | @end deftypevr | ||
| 21058 | |||
| 21059 | @deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask ifconfig-push | ||
| 21060 | Client VPN IP. | ||
| 21061 | |||
| 21062 | Defaults to @samp{#f}. | ||
| 21063 | |||
| 21064 | @end deftypevr | ||
| 21065 | |||
| 21066 | @end deftypevr | ||
| 21067 | |||
| 21068 | |||
| 21069 | @c %end of automatic openvpn-server documentation | ||
| 21070 | |||
| 21071 | |||
| 21072 | @node Network File System | ||
| 21073 | @subsection Network File System | ||
| 21074 | @cindex NFS | ||
| 21075 | |||
| 21076 | The @code{(gnu services nfs)} module provides the following services, which | ||
| 21077 | are most commonly used in relation to mounting or exporting directory trees | ||
| 21078 | as @dfn{network file systems} (NFS). | ||
| 21079 | |||
| 21080 | @subsubheading RPC Bind Service | ||
| 21081 | @cindex rpcbind | ||
| 21082 | |||
| 21083 | The RPC Bind service provides a facility to map program numbers into | ||
| 21084 | universal addresses. Many NFS related services use this facility. Hence it | ||
| 21085 | is automatically started when a dependent service starts. | ||
| 21086 | |||
| 21087 | @defvr {Scheme Variable} rpcbind-service-type | ||
| 21088 | A service type for the RPC portmapper daemon. | ||
| 21089 | @end defvr | ||
| 21090 | |||
| 21091 | |||
| 21092 | @deftp {Data Type} rpcbind-configuration | ||
| 21093 | Data type representing the configuration of the RPC Bind Service. This type | ||
| 21094 | has the following parameters: | ||
| 21095 | @table @asis | ||
| 21096 | @item @code{rpcbind} (default: @code{rpcbind}) | ||
| 21097 | The rpcbind package to use. | ||
| 21098 | |||
| 21099 | @item @code{warm-start?} (default: @code{#t}) | ||
| 21100 | If this parameter is @code{#t}, then the daemon will read a state file on | ||
| 21101 | startup thus reloading state information saved by a previous instance. | ||
| 21102 | @end table | ||
| 21103 | @end deftp | ||
| 21104 | |||
| 21105 | |||
| 21106 | @subsubheading Pipefs Pseudo File System | ||
| 21107 | @cindex pipefs | ||
| 21108 | @cindex rpc_pipefs | ||
| 21109 | |||
| 21110 | The pipefs file system is used to transfer NFS related data between the | ||
| 21111 | kernel and user space programs. | ||
| 21112 | |||
| 21113 | @defvr {Scheme Variable} pipefs-service-type | ||
| 21114 | A service type for the pipefs pseudo file system. | ||
| 21115 | @end defvr | ||
| 21116 | |||
| 21117 | @deftp {Data Type} pipefs-configuration | ||
| 21118 | Data type representing the configuration of the pipefs pseudo file system | ||
| 21119 | service. This type has the following parameters: | ||
| 21120 | @table @asis | ||
| 21121 | @item @code{mount-point} (default: @code{"/var/lib/nfs/rpc_pipefs"}) | ||
| 21122 | The directory to which the file system is to be attached. | ||
| 21123 | @end table | ||
| 21124 | @end deftp | ||
| 21125 | |||
| 21126 | |||
| 21127 | @subsubheading GSS Daemon Service | ||
| 21128 | @cindex GSSD | ||
| 21129 | @cindex GSS | ||
| 21130 | @cindex global security system | ||
| 21131 | |||
| 21132 | The @dfn{global security system} (GSS) daemon provides strong security for | ||
| 21133 | RPC based protocols. Before exchanging RPC requests an RPC client must | ||
| 21134 | establish a security context. Typically this is done using the Kerberos | ||
| 21135 | command @command{kinit} or automatically at login time using PAM services | ||
| 21136 | (@pxref{Kerberos-Dienste}). | ||
| 21137 | |||
| 21138 | @defvr {Scheme Variable} gss-service-type | ||
| 21139 | A service type for the Global Security System (GSS) daemon. | ||
| 21140 | @end defvr | ||
| 21141 | |||
| 21142 | @deftp {Data Type} gss-configuration | ||
| 21143 | Data type representing the configuration of the GSS daemon service. This | ||
| 21144 | type has the following parameters: | ||
| 21145 | @table @asis | ||
| 21146 | @item @code{nfs-utils} (default: @code{nfs-utils}) | ||
| 21147 | The package in which the @command{rpc.gssd} command is to be found. | ||
| 21148 | |||
| 21149 | @item @code{pipefs-directory} (default: @code{"/var/lib/nfs/rpc_pipefs"}) | ||
| 21150 | The directory where the pipefs file system is mounted. | ||
| 21151 | |||
| 21152 | @end table | ||
| 21153 | @end deftp | ||
| 21154 | |||
| 21155 | |||
| 21156 | @subsubheading IDMAP Daemon Service | ||
| 21157 | @cindex idmapd | ||
| 21158 | @cindex name mapper | ||
| 21159 | |||
| 21160 | The idmap daemon service provides mapping between user IDs and user names. | ||
| 21161 | Typically it is required in order to access file systems mounted via NFSv4. | ||
| 21162 | |||
| 21163 | @defvr {Scheme Variable} idmap-service-type | ||
| 21164 | A service type for the Identity Mapper (IDMAP) daemon. | ||
| 21165 | @end defvr | ||
| 21166 | |||
| 21167 | @deftp {Data Type} idmap-configuration | ||
| 21168 | Data type representing the configuration of the IDMAP daemon service. This | ||
| 21169 | type has the following parameters: | ||
| 21170 | @table @asis | ||
| 21171 | @item @code{nfs-utils} (default: @code{nfs-utils}) | ||
| 21172 | The package in which the @command{rpc.idmapd} command is to be found. | ||
| 21173 | |||
| 21174 | @item @code{pipefs-directory} (default: @code{"/var/lib/nfs/rpc_pipefs"}) | ||
| 21175 | The directory where the pipefs file system is mounted. | ||
| 21176 | |||
| 21177 | @item @code{domain} (default: @code{#f}) | ||
| 21178 | The local NFSv4 domain name. This must be a string or @code{#f}. If it is | ||
| 21179 | @code{#f} then the daemon will use the host's fully qualified domain name. | ||
| 21180 | |||
| 21181 | @end table | ||
| 21182 | @end deftp | ||
| 21183 | |||
| 21184 | @node Kontinuierliche Integration | ||
| 21185 | @subsection Kontinuierliche Integration | ||
| 21186 | |||
| 21187 | @cindex continuous integration | ||
| 21188 | @uref{https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git, Cuirass} is a | ||
| 21189 | continuous integration tool for Guix. It can be used both for development | ||
| 21190 | and for providing substitutes to others (@pxref{Substitute}). | ||
| 21191 | |||
| 21192 | The @code{(gnu services cuirass)} module provides the following service. | ||
| 21193 | |||
| 21194 | @defvr {Scheme Procedure} cuirass-service-type | ||
| 21195 | The type of the Cuirass service. Its value must be a | ||
| 21196 | @code{cuirass-configuration} object, as described below. | ||
| 21197 | @end defvr | ||
| 21198 | |||
| 21199 | To add build jobs, you have to set the @code{specifications} field of the | ||
| 21200 | configuration. Here is an example of a service that polls the Guix | ||
| 21201 | repository and builds the packages from a manifest. Some of the packages | ||
| 21202 | are defined in the @code{"custom-packages"} input, which is the equivalent | ||
| 21203 | of @code{GUIX_PACKAGE_PATH}. | ||
| 21204 | |||
| 21205 | @example | ||
| 21206 | (define %cuirass-specs | ||
| 21207 | #~(list | ||
| 21208 | '((#:name . "my-manifest") | ||
| 21209 | (#:load-path-inputs . ("guix")) | ||
| 21210 | (#:package-path-inputs . ("custom-packages")) | ||
| 21211 | (#:proc-input . "guix") | ||
| 21212 | (#:proc-file . "build-aux/cuirass/gnu-system.scm") | ||
| 21213 | (#:proc . cuirass-jobs) | ||
| 21214 | (#:proc-args . ((subset . "manifests") | ||
| 21215 | (systems . ("x86_64-linux")) | ||
| 21216 | (manifests . (("config" . "guix/manifest.scm"))))) | ||
| 21217 | (#:inputs . (((#:name . "guix") | ||
| 21218 | (#:url . "git://git.savannah.gnu.org/guix.git") | ||
| 21219 | (#:load-path . ".") | ||
| 21220 | (#:branch . "master") | ||
| 21221 | (#:no-compile? . #t)) | ||
| 21222 | ((#:name . "config") | ||
| 21223 | (#:url . "git://git.example.org/config.git") | ||
| 21224 | (#:load-path . ".") | ||
| 21225 | (#:branch . "master") | ||
| 21226 | (#:no-compile? . #t)) | ||
| 21227 | ((#:name . "custom-packages") | ||
| 21228 | (#:url . "git://git.example.org/custom-packages.git") | ||
| 21229 | (#:load-path . ".") | ||
| 21230 | (#:branch . "master") | ||
| 21231 | (#:no-compile? . #t))))))) | ||
| 21232 | |||
| 21233 | (service cuirass-service-type | ||
| 21234 | (cuirass-configuration | ||
| 21235 | (specifications %cuirass-specs))) | ||
| 21236 | @end example | ||
| 21237 | |||
| 21238 | While information related to build jobs is located directly in the | ||
| 21239 | specifications, global settings for the @command{cuirass} process are | ||
| 21240 | accessible in other @code{cuirass-configuration} fields. | ||
| 21241 | |||
| 21242 | @deftp {Data Type} cuirass-configuration | ||
| 21243 | Data type representing the configuration of Cuirass. | ||
| 21244 | |||
| 21245 | @table @asis | ||
| 21246 | @item @code{log-file} (default: @code{"/var/log/cuirass.log"}) | ||
| 21247 | Location of the log file. | ||
| 21248 | |||
| 21249 | @item @code{cache-directory} (default: @code{"/var/cache/cuirass"}) | ||
| 21250 | Location of the repository cache. | ||
| 21251 | |||
| 21252 | @item @code{user} (default: @code{"cuirass"}) | ||
| 21253 | Owner of the @code{cuirass} process. | ||
| 21254 | |||
| 21255 | @item @code{group} (default: @code{"cuirass"}) | ||
| 21256 | Owner's group of the @code{cuirass} process. | ||
| 21257 | |||
| 21258 | @item @code{interval} (default: @code{60}) | ||
| 21259 | Number of seconds between the poll of the repositories followed by the | ||
| 21260 | Cuirass jobs. | ||
| 21261 | |||
| 21262 | @item @code{database} (Vorgabe: @code{"/var/lib/cuirass/cuirass.db"}) | ||
| 21263 | Location of sqlite database which contains the build results and previously | ||
| 21264 | added specifications. | ||
| 21265 | |||
| 21266 | @item @code{ttl} (Vorgabe: @code{(* 30 24 3600)}) | ||
| 21267 | Specifies the time-to-live (TTL) in seconds of garbage collector roots that | ||
| 21268 | are registered for build results. This means that build results are | ||
| 21269 | protected from garbage collection for at least @var{ttl} seconds. | ||
| 21270 | |||
| 21271 | @item @code{port} (default: @code{8081}) | ||
| 21272 | Port number used by the HTTP server. | ||
| 21273 | |||
| 21274 | @item --listen=@var{Host} | ||
| 21275 | Listen on the network interface for @var{host}. The default is to accept | ||
| 21276 | connections from localhost. | ||
| 21277 | |||
| 21278 | @item @code{specifications} (default: @code{#~'()}) | ||
| 21279 | A gexp (@pxref{G-Ausdrücke}) that evaluates to a list of specifications, | ||
| 21280 | where a specification is an association list (@pxref{Associations Lists,,, | ||
| 21281 | guile, GNU Guile Reference Manual}) whose keys are keywords | ||
| 21282 | (@code{#:keyword-example}) as shown in the example above. | ||
| 21283 | |||
| 21284 | @item @code{use-substitutes?} (default: @code{#f}) | ||
| 21285 | This allows using substitutes to avoid building every dependencies of a job | ||
| 21286 | from source. | ||
| 21287 | |||
| 21288 | @item @code{one-shot?} (default: @code{#f}) | ||
| 21289 | Only evaluate specifications and build derivations once. | ||
| 21290 | |||
| 21291 | @item @code{fallback?} (default: @code{#f}) | ||
| 21292 | When substituting a pre-built binary fails, fall back to building packages | ||
| 21293 | locally. | ||
| 21294 | |||
| 21295 | @item @code{cuirass} (default: @code{cuirass}) | ||
| 21296 | The Cuirass package to use. | ||
| 21297 | @end table | ||
| 21298 | @end deftp | ||
| 21299 | |||
| 21300 | @node Dienste zur Stromverbrauchsverwaltung | ||
| 21301 | @subsection Dienste zur Stromverbrauchsverwaltung | ||
| 21302 | |||
| 21303 | @cindex tlp | ||
| 21304 | @cindex power management with TLP | ||
| 21305 | @subsubheading TLP-Daemon | ||
| 21306 | |||
| 21307 | The @code{(gnu services pm)} module provides a Guix service definition for | ||
| 21308 | the Linux power management tool TLP. | ||
| 21309 | |||
| 21310 | TLP enables various powersaving modes in userspace and kernel. Contrary to | ||
| 21311 | @code{upower-service}, it is not a passive, monitoring tool, as it will | ||
| 21312 | apply custom settings each time a new power source is detected. More | ||
| 21313 | information can be found at @uref{http://linrunner.de/en/tlp/tlp.html, TLP | ||
| 21314 | home page}. | ||
| 21315 | |||
| 21316 | @deffn {Scheme Variable} tlp-service-type | ||
| 21317 | The service type for the TLP tool. Its value should be a valid TLP | ||
| 21318 | configuration (see below). To use the default settings, simply write: | ||
| 21319 | @example | ||
| 21320 | (service tlp-service-type) | ||
| 21321 | @end example | ||
| 21322 | @end deffn | ||
| 21323 | |||
| 21324 | By default TLP does not need much configuration but most TLP parameters can | ||
| 21325 | be tweaked using @code{tlp-configuration}. | ||
| 21326 | |||
| 21327 | Each parameter definition is preceded by its type; for example, | ||
| 21328 | @samp{boolean foo} indicates that the @code{foo} parameter should be | ||
| 21329 | specified as a boolean. Types starting with @code{maybe-} denote parameters | ||
| 21330 | that won't show up in TLP config file when their value is @code{'disabled}. | ||
| 21331 | |||
| 21332 | @c The following documentation was initially generated by | ||
| 21333 | @c (generate-tlp-documentation) in (gnu services pm). Manually maintained | ||
| 21334 | @c documentation is better, so we shouldn't hesitate to edit below as | ||
| 21335 | @c needed. However if the change you want to make to this documentation | ||
| 21336 | @c can be done in an automated way, it's probably easier to change | ||
| 21337 | @c (generate-documentation) than to make it below and have to deal with | ||
| 21338 | @c the churn as TLP updates. | ||
| 21339 | |||
| 21340 | Available @code{tlp-configuration} fields are: | ||
| 21341 | |||
| 21342 | @deftypevr {@code{tlp-configuration} parameter} package tlp | ||
| 21343 | The TLP package. | ||
| 21344 | |||
| 21345 | @end deftypevr | ||
| 21346 | |||
| 21347 | @deftypevr {@code{tlp-configuration} parameter} boolean tlp-enable? | ||
| 21348 | Set to true if you wish to enable TLP. | ||
| 21349 | |||
| 21350 | Defaults to @samp{#t}. | ||
| 21351 | |||
| 21352 | @end deftypevr | ||
| 21353 | |||
| 21354 | @deftypevr {@code{tlp-configuration} parameter} string tlp-default-mode | ||
| 21355 | Default mode when no power supply can be detected. Alternatives are AC and | ||
| 21356 | BAT. | ||
| 21357 | |||
| 21358 | Defaults to @samp{"AC"}. | ||
| 21359 | |||
| 21360 | @end deftypevr | ||
| 21361 | |||
| 21362 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-ac | ||
| 21363 | Number of seconds Linux kernel has to wait after the disk goes idle, before | ||
| 21364 | syncing on AC. | ||
| 21365 | |||
| 21366 | Defaults to @samp{0}. | ||
| 21367 | |||
| 21368 | @end deftypevr | ||
| 21369 | |||
| 21370 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-bat | ||
| 21371 | Same as @code{disk-idle-ac} but on BAT mode. | ||
| 21372 | |||
| 21373 | Defaults to @samp{2}. | ||
| 21374 | |||
| 21375 | @end deftypevr | ||
| 21376 | |||
| 21377 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-ac | ||
| 21378 | Dirty pages flushing periodicity, expressed in seconds. | ||
| 21379 | |||
| 21380 | Defaults to @samp{15}. | ||
| 21381 | |||
| 21382 | @end deftypevr | ||
| 21383 | |||
| 21384 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-bat | ||
| 21385 | Same as @code{max-lost-work-secs-on-ac} but on BAT mode. | ||
| 21386 | |||
| 21387 | Defaults to @samp{60}. | ||
| 21388 | |||
| 21389 | @end deftypevr | ||
| 21390 | |||
| 21391 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-ac | ||
| 21392 | CPU frequency scaling governor on AC mode. With intel_pstate driver, | ||
| 21393 | alternatives are powersave and performance. With acpi-cpufreq driver, | ||
| 21394 | alternatives are ondemand, powersave, performance and conservative. | ||
| 21395 | |||
| 21396 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21397 | |||
| 21398 | @end deftypevr | ||
| 21399 | |||
| 21400 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-bat | ||
| 21401 | Same as @code{cpu-scaling-governor-on-ac} but on BAT mode. | ||
| 21402 | |||
| 21403 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21404 | |||
| 21405 | @end deftypevr | ||
| 21406 | |||
| 21407 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-ac | ||
| 21408 | Set the min available frequency for the scaling governor on AC. | ||
| 21409 | |||
| 21410 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21411 | |||
| 21412 | @end deftypevr | ||
| 21413 | |||
| 21414 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-ac | ||
| 21415 | Set the max available frequency for the scaling governor on AC. | ||
| 21416 | |||
| 21417 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21418 | |||
| 21419 | @end deftypevr | ||
| 21420 | |||
| 21421 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-bat | ||
| 21422 | Set the min available frequency for the scaling governor on BAT. | ||
| 21423 | |||
| 21424 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21425 | |||
| 21426 | @end deftypevr | ||
| 21427 | |||
| 21428 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-bat | ||
| 21429 | Set the max available frequency for the scaling governor on BAT. | ||
| 21430 | |||
| 21431 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21432 | |||
| 21433 | @end deftypevr | ||
| 21434 | |||
| 21435 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-ac | ||
| 21436 | Limit the min P-state to control the power dissipation of the CPU, in AC | ||
| 21437 | mode. Values are stated as a percentage of the available performance. | ||
| 21438 | |||
| 21439 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21440 | |||
| 21441 | @end deftypevr | ||
| 21442 | |||
| 21443 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-ac | ||
| 21444 | Limit the max P-state to control the power dissipation of the CPU, in AC | ||
| 21445 | mode. Values are stated as a percentage of the available performance. | ||
| 21446 | |||
| 21447 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21448 | |||
| 21449 | @end deftypevr | ||
| 21450 | |||
| 21451 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-bat | ||
| 21452 | Same as @code{cpu-min-perf-on-ac} on BAT mode. | ||
| 21453 | |||
| 21454 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21455 | |||
| 21456 | @end deftypevr | ||
| 21457 | |||
| 21458 | @deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-bat | ||
| 21459 | Same as @code{cpu-max-perf-on-ac} on BAT mode. | ||
| 21460 | |||
| 21461 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21462 | |||
| 21463 | @end deftypevr | ||
| 21464 | |||
| 21465 | @deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-ac? | ||
| 21466 | Enable CPU turbo boost feature on AC mode. | ||
| 21467 | |||
| 21468 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21469 | |||
| 21470 | @end deftypevr | ||
| 21471 | |||
| 21472 | @deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-bat? | ||
| 21473 | Same as @code{cpu-boost-on-ac?} on BAT mode. | ||
| 21474 | |||
| 21475 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21476 | |||
| 21477 | @end deftypevr | ||
| 21478 | |||
| 21479 | @deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-ac? | ||
| 21480 | Allow Linux kernel to minimize the number of CPU cores/hyper-threads used | ||
| 21481 | under light load conditions. | ||
| 21482 | |||
| 21483 | Defaults to @samp{#f}. | ||
| 21484 | |||
| 21485 | @end deftypevr | ||
| 21486 | |||
| 21487 | @deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-bat? | ||
| 21488 | Same as @code{sched-powersave-on-ac?} but on BAT mode. | ||
| 21489 | |||
| 21490 | Defaults to @samp{#t}. | ||
| 21491 | |||
| 21492 | @end deftypevr | ||
| 21493 | |||
| 21494 | @deftypevr {@code{tlp-configuration} parameter} boolean nmi-watchdog? | ||
| 21495 | Enable Linux kernel NMI watchdog. | ||
| 21496 | |||
| 21497 | Defaults to @samp{#f}. | ||
| 21498 | |||
| 21499 | @end deftypevr | ||
| 21500 | |||
| 21501 | @deftypevr {@code{tlp-configuration} parameter} maybe-string phc-controls | ||
| 21502 | For Linux kernels with PHC patch applied, change CPU voltages. An example | ||
| 21503 | value would be @samp{"F:V F:V F:V F:V"}. | ||
| 21504 | |||
| 21505 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21506 | |||
| 21507 | @end deftypevr | ||
| 21508 | |||
| 21509 | @deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-ac | ||
| 21510 | Set CPU performance versus energy saving policy on AC. Alternatives are | ||
| 21511 | performance, normal, powersave. | ||
| 21512 | |||
| 21513 | Defaults to @samp{"performance"}. | ||
| 21514 | |||
| 21515 | @end deftypevr | ||
| 21516 | |||
| 21517 | @deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-bat | ||
| 21518 | Same as @code{energy-perf-policy-ac} but on BAT mode. | ||
| 21519 | |||
| 21520 | Defaults to @samp{"powersave"}. | ||
| 21521 | |||
| 21522 | @end deftypevr | ||
| 21523 | |||
| 21524 | @deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disks-devices | ||
| 21525 | Hard disk devices. | ||
| 21526 | |||
| 21527 | @end deftypevr | ||
| 21528 | |||
| 21529 | @deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-ac | ||
| 21530 | Hard disk advanced power management level. | ||
| 21531 | |||
| 21532 | @end deftypevr | ||
| 21533 | |||
| 21534 | @deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-bat | ||
| 21535 | Same as @code{disk-apm-bat} but on BAT mode. | ||
| 21536 | |||
| 21537 | @end deftypevr | ||
| 21538 | |||
| 21539 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-ac | ||
| 21540 | Hard disk spin down timeout. One value has to be specified for each | ||
| 21541 | declared hard disk. | ||
| 21542 | |||
| 21543 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21544 | |||
| 21545 | @end deftypevr | ||
| 21546 | |||
| 21547 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-bat | ||
| 21548 | Same as @code{disk-spindown-timeout-on-ac} but on BAT mode. | ||
| 21549 | |||
| 21550 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21551 | |||
| 21552 | @end deftypevr | ||
| 21553 | |||
| 21554 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-iosched | ||
| 21555 | Select IO scheduler for disk devices. One value has to be specified for | ||
| 21556 | each declared hard disk. Example alternatives are cfq, deadline and noop. | ||
| 21557 | |||
| 21558 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21559 | |||
| 21560 | @end deftypevr | ||
| 21561 | |||
| 21562 | @deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-ac | ||
| 21563 | SATA aggressive link power management (ALPM) level. Alternatives are | ||
| 21564 | min_power, medium_power, max_performance. | ||
| 21565 | |||
| 21566 | Defaults to @samp{"max_performance"}. | ||
| 21567 | |||
| 21568 | @end deftypevr | ||
| 21569 | |||
| 21570 | @deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-bat | ||
| 21571 | Same as @code{sata-linkpwr-ac} but on BAT mode. | ||
| 21572 | |||
| 21573 | Defaults to @samp{"min_power"}. | ||
| 21574 | |||
| 21575 | @end deftypevr | ||
| 21576 | |||
| 21577 | @deftypevr {@code{tlp-configuration} parameter} maybe-string sata-linkpwr-blacklist | ||
| 21578 | Exclude specified SATA host devices for link power management. | ||
| 21579 | |||
| 21580 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21581 | |||
| 21582 | @end deftypevr | ||
| 21583 | |||
| 21584 | @deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-ac? | ||
| 21585 | Enable Runtime Power Management for AHCI controller and disks on AC mode. | ||
| 21586 | |||
| 21587 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21588 | |||
| 21589 | @end deftypevr | ||
| 21590 | |||
| 21591 | @deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-bat? | ||
| 21592 | Same as @code{ahci-runtime-pm-on-ac} on BAT mode. | ||
| 21593 | |||
| 21594 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21595 | |||
| 21596 | @end deftypevr | ||
| 21597 | |||
| 21598 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer ahci-runtime-pm-timeout | ||
| 21599 | Seconds of inactivity before disk is suspended. | ||
| 21600 | |||
| 21601 | Defaults to @samp{15}. | ||
| 21602 | |||
| 21603 | @end deftypevr | ||
| 21604 | |||
| 21605 | @deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-ac | ||
| 21606 | PCI Express Active State Power Management level. Alternatives are default, | ||
| 21607 | performance, powersave. | ||
| 21608 | |||
| 21609 | Defaults to @samp{"performance"}. | ||
| 21610 | |||
| 21611 | @end deftypevr | ||
| 21612 | |||
| 21613 | @deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-bat | ||
| 21614 | Same as @code{pcie-aspm-ac} but on BAT mode. | ||
| 21615 | |||
| 21616 | Defaults to @samp{"powersave"}. | ||
| 21617 | |||
| 21618 | @end deftypevr | ||
| 21619 | |||
| 21620 | @deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-ac | ||
| 21621 | Radeon graphics clock speed level. Alternatives are low, mid, high, auto, | ||
| 21622 | default. | ||
| 21623 | |||
| 21624 | Defaults to @samp{"high"}. | ||
| 21625 | |||
| 21626 | @end deftypevr | ||
| 21627 | |||
| 21628 | @deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-bat | ||
| 21629 | Same as @code{radeon-power-ac} but on BAT mode. | ||
| 21630 | |||
| 21631 | Defaults to @samp{"low"}. | ||
| 21632 | |||
| 21633 | @end deftypevr | ||
| 21634 | |||
| 21635 | @deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-ac | ||
| 21636 | Radeon dynamic power management method (DPM). Alternatives are battery, | ||
| 21637 | performance. | ||
| 21638 | |||
| 21639 | Defaults to @samp{"performance"}. | ||
| 21640 | |||
| 21641 | @end deftypevr | ||
| 21642 | |||
| 21643 | @deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-bat | ||
| 21644 | Same as @code{radeon-dpm-state-ac} but on BAT mode. | ||
| 21645 | |||
| 21646 | Defaults to @samp{"battery"}. | ||
| 21647 | |||
| 21648 | @end deftypevr | ||
| 21649 | |||
| 21650 | @deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-ac | ||
| 21651 | Radeon DPM performance level. Alternatives are auto, low, high. | ||
| 21652 | |||
| 21653 | Defaults to @samp{"auto"}. | ||
| 21654 | |||
| 21655 | @end deftypevr | ||
| 21656 | |||
| 21657 | @deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-bat | ||
| 21658 | Same as @code{radeon-dpm-perf-ac} but on BAT mode. | ||
| 21659 | |||
| 21660 | Defaults to @samp{"auto"}. | ||
| 21661 | |||
| 21662 | @end deftypevr | ||
| 21663 | |||
| 21664 | @deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-ac? | ||
| 21665 | Wifi power saving mode. | ||
| 21666 | |||
| 21667 | Defaults to @samp{#f}. | ||
| 21668 | |||
| 21669 | @end deftypevr | ||
| 21670 | |||
| 21671 | @deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-bat? | ||
| 21672 | Same as @code{wifi-power-ac?} but on BAT mode. | ||
| 21673 | |||
| 21674 | Defaults to @samp{#t}. | ||
| 21675 | |||
| 21676 | @end deftypevr | ||
| 21677 | |||
| 21678 | @deftypevr {@code{tlp-configuration} parameter} y-n-boolean wol-disable? | ||
| 21679 | Disable wake on LAN. | ||
| 21680 | |||
| 21681 | Defaults to @samp{#t}. | ||
| 21682 | |||
| 21683 | @end deftypevr | ||
| 21684 | |||
| 21685 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-ac | ||
| 21686 | Timeout duration in seconds before activating audio power saving on Intel | ||
| 21687 | HDA and AC97 devices. A value of 0 disables power saving. | ||
| 21688 | |||
| 21689 | Defaults to @samp{0}. | ||
| 21690 | |||
| 21691 | @end deftypevr | ||
| 21692 | |||
| 21693 | @deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-bat | ||
| 21694 | Same as @code{sound-powersave-ac} but on BAT mode. | ||
| 21695 | |||
| 21696 | Defaults to @samp{1}. | ||
| 21697 | |||
| 21698 | @end deftypevr | ||
| 21699 | |||
| 21700 | @deftypevr {@code{tlp-configuration} parameter} y-n-boolean sound-power-save-controller? | ||
| 21701 | Disable controller in powersaving mode on Intel HDA devices. | ||
| 21702 | |||
| 21703 | Defaults to @samp{#t}. | ||
| 21704 | |||
| 21705 | @end deftypevr | ||
| 21706 | |||
| 21707 | @deftypevr {@code{tlp-configuration} parameter} boolean bay-poweroff-on-bat? | ||
| 21708 | Enable optical drive in UltraBay/MediaBay on BAT mode. Drive can be powered | ||
| 21709 | on again by releasing (and reinserting) the eject lever or by pressing the | ||
| 21710 | disc eject button on newer models. | ||
| 21711 | |||
| 21712 | Defaults to @samp{#f}. | ||
| 21713 | |||
| 21714 | @end deftypevr | ||
| 21715 | |||
| 21716 | @deftypevr {@code{tlp-configuration} parameter} string bay-device | ||
| 21717 | Name of the optical drive device to power off. | ||
| 21718 | |||
| 21719 | Defaults to @samp{"sr0"}. | ||
| 21720 | |||
| 21721 | @end deftypevr | ||
| 21722 | |||
| 21723 | @deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-ac | ||
| 21724 | Runtime Power Management for PCI(e) bus devices. Alternatives are on and | ||
| 21725 | auto. | ||
| 21726 | |||
| 21727 | Defaults to @samp{"on"}. | ||
| 21728 | |||
| 21729 | @end deftypevr | ||
| 21730 | |||
| 21731 | @deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-bat | ||
| 21732 | Same as @code{runtime-pm-ac} but on BAT mode. | ||
| 21733 | |||
| 21734 | Defaults to @samp{"auto"}. | ||
| 21735 | |||
| 21736 | @end deftypevr | ||
| 21737 | |||
| 21738 | @deftypevr {@code{tlp-configuration} parameter} boolean runtime-pm-all? | ||
| 21739 | Runtime Power Management for all PCI(e) bus devices, except blacklisted | ||
| 21740 | ones. | ||
| 21741 | |||
| 21742 | Defaults to @samp{#t}. | ||
| 21743 | |||
| 21744 | @end deftypevr | ||
| 21745 | |||
| 21746 | @deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list runtime-pm-blacklist | ||
| 21747 | Exclude specified PCI(e) device addresses from Runtime Power Management. | ||
| 21748 | |||
| 21749 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21750 | |||
| 21751 | @end deftypevr | ||
| 21752 | |||
| 21753 | @deftypevr {@code{tlp-configuration} parameter} space-separated-string-list runtime-pm-driver-blacklist | ||
| 21754 | Exclude PCI(e) devices assigned to the specified drivers from Runtime Power | ||
| 21755 | Management. | ||
| 21756 | |||
| 21757 | @end deftypevr | ||
| 21758 | |||
| 21759 | @deftypevr {@code{tlp-configuration} parameter} boolean usb-autosuspend? | ||
| 21760 | Enable USB autosuspend feature. | ||
| 21761 | |||
| 21762 | Defaults to @samp{#t}. | ||
| 21763 | |||
| 21764 | @end deftypevr | ||
| 21765 | |||
| 21766 | @deftypevr {@code{tlp-configuration} parameter} maybe-string usb-blacklist | ||
| 21767 | Exclude specified devices from USB autosuspend. | ||
| 21768 | |||
| 21769 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21770 | |||
| 21771 | @end deftypevr | ||
| 21772 | |||
| 21773 | @deftypevr {@code{tlp-configuration} parameter} boolean usb-blacklist-wwan? | ||
| 21774 | Exclude WWAN devices from USB autosuspend. | ||
| 21775 | |||
| 21776 | Defaults to @samp{#t}. | ||
| 21777 | |||
| 21778 | @end deftypevr | ||
| 21779 | |||
| 21780 | @deftypevr {@code{tlp-configuration} parameter} maybe-string usb-whitelist | ||
| 21781 | Include specified devices into USB autosuspend, even if they are already | ||
| 21782 | excluded by the driver or via @code{usb-blacklist-wwan?}. | ||
| 21783 | |||
| 21784 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21785 | |||
| 21786 | @end deftypevr | ||
| 21787 | |||
| 21788 | @deftypevr {@code{tlp-configuration} parameter} maybe-boolean usb-autosuspend-disable-on-shutdown? | ||
| 21789 | Enable USB autosuspend before shutdown. | ||
| 21790 | |||
| 21791 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 21792 | |||
| 21793 | @end deftypevr | ||
| 21794 | |||
| 21795 | @deftypevr {@code{tlp-configuration} parameter} boolean restore-device-state-on-startup? | ||
| 21796 | Restore radio device state (bluetooth, wifi, wwan) from previous shutdown on | ||
| 21797 | system startup. | ||
| 21798 | |||
| 21799 | Defaults to @samp{#f}. | ||
| 21800 | |||
| 21801 | @end deftypevr | ||
| 21802 | |||
| 21803 | @cindex thermald | ||
| 21804 | @cindex CPU frequency scaling with thermald | ||
| 21805 | @subsubheading Thermald-Daemon | ||
| 21806 | |||
| 21807 | The @code{(gnu services pm)} module provides an interface to thermald, a CPU | ||
| 21808 | frequency scaling service which helps prevent overheating. | ||
| 21809 | |||
| 21810 | @defvr {Scheme Variable} thermald-service-type | ||
| 21811 | This is the service type for @uref{https://01.org/linux-thermal-daemon/, | ||
| 21812 | thermald}, the Linux Thermal Daemon, which is responsible for controlling | ||
| 21813 | the thermal state of processors and preventing overheating. | ||
| 21814 | @end defvr | ||
| 21815 | |||
| 21816 | @deftp {Data Type} thermald-configuration | ||
| 21817 | Data type representing the configuration of @code{thermald-service-type}. | ||
| 21818 | |||
| 21819 | @table @asis | ||
| 21820 | @item @code{ignore-cpuid-check?} (default: @code{#f}) | ||
| 21821 | Ignore cpuid check for supported CPU models. | ||
| 21822 | |||
| 21823 | @item @code{thermald} (default: @var{thermald}) | ||
| 21824 | Package object of thermald. | ||
| 21825 | |||
| 21826 | @end table | ||
| 21827 | @end deftp | ||
| 21828 | |||
| 21829 | @node Audio-Dienste | ||
| 21830 | @subsection Audio-Dienste | ||
| 21831 | |||
| 21832 | The @code{(gnu services audio)} module provides a service to start MPD (the | ||
| 21833 | Music Player Daemon). | ||
| 21834 | |||
| 21835 | @cindex mpd | ||
| 21836 | @subsubheading Music Player Daemon | ||
| 21837 | |||
| 21838 | The Music Player Daemon (MPD) is a service that can play music while being | ||
| 21839 | controlled from the local machine or over the network by a variety of | ||
| 21840 | clients. | ||
| 21841 | |||
| 21842 | The following example shows how one might run @code{mpd} as user | ||
| 21843 | @code{"bob"} on port @code{6666}. It uses pulseaudio for output. | ||
| 21844 | |||
| 21845 | @example | ||
| 21846 | (service mpd-service-type | ||
| 21847 | (mpd-configuration | ||
| 21848 | (user "bob") | ||
| 21849 | (port "6666"))) | ||
| 21850 | @end example | ||
| 21851 | |||
| 21852 | @defvr {Scheme Variable} mpd-service-type | ||
| 21853 | The service type for @command{mpd} | ||
| 21854 | @end defvr | ||
| 21855 | |||
| 21856 | @deftp {Data Type} mpd-configuration | ||
| 21857 | Data type representing the configuration of @command{mpd}. | ||
| 21858 | |||
| 21859 | @table @asis | ||
| 21860 | @item @code{user} (default: @code{"mpd"}) | ||
| 21861 | The user to run mpd as. | ||
| 21862 | |||
| 21863 | @item @code{music-dir} (default: @code{"~/Music"}) | ||
| 21864 | The directory to scan for music files. | ||
| 21865 | |||
| 21866 | @item @code{playlist-dir} (default: @code{"~/.mpd/playlists"}) | ||
| 21867 | The directory to store playlists. | ||
| 21868 | |||
| 21869 | @item @code{db-file} (Vorgabe: @code{"~/.mpd/tag_cache"}) | ||
| 21870 | Der Ort, an dem die Musikdatenbank gespeichert wird. | ||
| 21871 | |||
| 21872 | @item @code{state-file} (Vorgabe: @code{"~/.mpd/state"}) | ||
| 21873 | The location of the file that stores current MPD's state. | ||
| 21874 | |||
| 21875 | @item @code{sticker-file} (Vorgabe: @code{"~/.mpd/sticker.sql"}) | ||
| 21876 | Der Ort, an dem die Sticker-Datenbank gespeichert wird. | ||
| 21877 | |||
| 21878 | @item @code{port} (default: @code{"6600"}) | ||
| 21879 | The port to run mpd on. | ||
| 21880 | |||
| 21881 | @item @code{address} (default: @code{"any"}) | ||
| 21882 | The address that mpd will bind to. To use a Unix domain socket, an absolute | ||
| 21883 | path can be specified here. | ||
| 21884 | |||
| 21885 | @end table | ||
| 21886 | @end deftp | ||
| 21887 | |||
| 21888 | @node Virtualisierungsdienste | ||
| 21889 | @subsection Virtualization services | ||
| 21890 | |||
| 21891 | The @code{(gnu services virtualization)} module provides services for the | ||
| 21892 | libvirt and virtlog daemons, as well as other virtualization-related | ||
| 21893 | services. | ||
| 21894 | |||
| 21895 | @subsubheading Libvirt daemon | ||
| 21896 | @code{libvirtd} is the server side daemon component of the libvirt | ||
| 21897 | virtualization management system. This daemon runs on host servers and | ||
| 21898 | performs required management tasks for virtualized guests. | ||
| 21899 | |||
| 21900 | @deffn {Scheme Variable} libvirt-service-type | ||
| 21901 | This is the type of the @uref{https://libvirt.org, libvirt daemon}. Its | ||
| 21902 | value must be a @code{libvirt-configuration}. | ||
| 21903 | |||
| 21904 | @example | ||
| 21905 | (service libvirt-service-type | ||
| 21906 | (libvirt-configuration | ||
| 21907 | (unix-sock-group "libvirt") | ||
| 21908 | (tls-port "16555"))) | ||
| 21909 | @end example | ||
| 21910 | @end deffn | ||
| 21911 | |||
| 21912 | @c Auto-generated with (generate-libvirt-documentation) | ||
| 21913 | Available @code{libvirt-configuration} fields are: | ||
| 21914 | |||
| 21915 | @deftypevr {@code{libvirt-configuration} parameter} package libvirt | ||
| 21916 | Libvirt package. | ||
| 21917 | |||
| 21918 | @end deftypevr | ||
| 21919 | |||
| 21920 | @deftypevr {@code{libvirt-configuration} parameter} boolean listen-tls? | ||
| 21921 | Flag listening for secure TLS connections on the public TCP/IP port. must | ||
| 21922 | set @code{listen} for this to have any effect. | ||
| 21923 | |||
| 21924 | It is necessary to setup a CA and issue server certificates before using | ||
| 21925 | this capability. | ||
| 21926 | |||
| 21927 | Defaults to @samp{#t}. | ||
| 21928 | |||
| 21929 | @end deftypevr | ||
| 21930 | |||
| 21931 | @deftypevr {@code{libvirt-configuration} parameter} boolean listen-tcp? | ||
| 21932 | Listen for unencrypted TCP connections on the public TCP/IP port. must set | ||
| 21933 | @code{listen} for this to have any effect. | ||
| 21934 | |||
| 21935 | Using the TCP socket requires SASL authentication by default. Only SASL | ||
| 21936 | mechanisms which support data encryption are allowed. This is DIGEST_MD5 | ||
| 21937 | and GSSAPI (Kerberos5) | ||
| 21938 | |||
| 21939 | Defaults to @samp{#f}. | ||
| 21940 | |||
| 21941 | @end deftypevr | ||
| 21942 | |||
| 21943 | @deftypevr {@code{libvirt-configuration} parameter} string tls-port | ||
| 21944 | Port for accepting secure TLS connections This can be a port number, or | ||
| 21945 | service name | ||
| 21946 | |||
| 21947 | Defaults to @samp{"16514"}. | ||
| 21948 | |||
| 21949 | @end deftypevr | ||
| 21950 | |||
| 21951 | @deftypevr {@code{libvirt-configuration} parameter} string tcp-port | ||
| 21952 | Port for accepting insecure TCP connections This can be a port number, or | ||
| 21953 | service name | ||
| 21954 | |||
| 21955 | Defaults to @samp{"16509"}. | ||
| 21956 | |||
| 21957 | @end deftypevr | ||
| 21958 | |||
| 21959 | @deftypevr {@code{libvirt-configuration} parameter} string listen-addr | ||
| 21960 | IP address or hostname used for client connections. | ||
| 21961 | |||
| 21962 | Defaults to @samp{"0.0.0.0"}. | ||
| 21963 | |||
| 21964 | @end deftypevr | ||
| 21965 | |||
| 21966 | @deftypevr {@code{libvirt-configuration} parameter} boolean mdns-adv? | ||
| 21967 | Flag toggling mDNS advertisement of the libvirt service. | ||
| 21968 | |||
| 21969 | Alternatively can disable for all services on a host by stopping the Avahi | ||
| 21970 | daemon. | ||
| 21971 | |||
| 21972 | Defaults to @samp{#f}. | ||
| 21973 | |||
| 21974 | @end deftypevr | ||
| 21975 | |||
| 21976 | @deftypevr {@code{libvirt-configuration} parameter} string mdns-name | ||
| 21977 | Default mDNS advertisement name. This must be unique on the immediate | ||
| 21978 | broadcast network. | ||
| 21979 | |||
| 21980 | Defaults to @samp{"Virtualization Host <hostname>"}. | ||
| 21981 | |||
| 21982 | @end deftypevr | ||
| 21983 | |||
| 21984 | @deftypevr {@code{libvirt-configuration} parameter} string unix-sock-group | ||
| 21985 | UNIX domain socket group ownership. This can be used to allow a 'trusted' | ||
| 21986 | set of users access to management capabilities without becoming root. | ||
| 21987 | |||
| 21988 | Defaults to @samp{"root"}. | ||
| 21989 | |||
| 21990 | @end deftypevr | ||
| 21991 | |||
| 21992 | @deftypevr {@code{libvirt-configuration} parameter} string unix-sock-ro-perms | ||
| 21993 | UNIX socket permissions for the R/O socket. This is used for monitoring VM | ||
| 21994 | status only. | ||
| 21995 | |||
| 21996 | Defaults to @samp{"0777"}. | ||
| 21997 | |||
| 21998 | @end deftypevr | ||
| 21999 | |||
| 22000 | @deftypevr {@code{libvirt-configuration} parameter} string unix-sock-rw-perms | ||
| 22001 | UNIX socket permissions for the R/W socket. Default allows only root. If | ||
| 22002 | PolicyKit is enabled on the socket, the default will change to allow | ||
| 22003 | everyone (eg, 0777) | ||
| 22004 | |||
| 22005 | Defaults to @samp{"0770"}. | ||
| 22006 | |||
| 22007 | @end deftypevr | ||
| 22008 | |||
| 22009 | @deftypevr {@code{libvirt-configuration} parameter} string unix-sock-admin-perms | ||
| 22010 | UNIX socket permissions for the admin socket. Default allows only owner | ||
| 22011 | (root), do not change it unless you are sure to whom you are exposing the | ||
| 22012 | access to. | ||
| 22013 | |||
| 22014 | Defaults to @samp{"0777"}. | ||
| 22015 | |||
| 22016 | @end deftypevr | ||
| 22017 | |||
| 22018 | @deftypevr {@code{libvirt-configuration} parameter} string unix-sock-dir | ||
| 22019 | The directory in which sockets will be found/created. | ||
| 22020 | |||
| 22021 | Defaults to @samp{"/var/run/libvirt"}. | ||
| 22022 | |||
| 22023 | @end deftypevr | ||
| 22024 | |||
| 22025 | @deftypevr {@code{libvirt-configuration} parameter} string auth-unix-ro | ||
| 22026 | Authentication scheme for UNIX read-only sockets. By default socket | ||
| 22027 | permissions allow anyone to connect | ||
| 22028 | |||
| 22029 | Defaults to @samp{"polkit"}. | ||
| 22030 | |||
| 22031 | @end deftypevr | ||
| 22032 | |||
| 22033 | @deftypevr {@code{libvirt-configuration} parameter} string auth-unix-rw | ||
| 22034 | Authentication scheme for UNIX read-write sockets. By default socket | ||
| 22035 | permissions only allow root. If PolicyKit support was compiled into | ||
| 22036 | libvirt, the default will be to use 'polkit' auth. | ||
| 22037 | |||
| 22038 | Defaults to @samp{"polkit"}. | ||
| 22039 | |||
| 22040 | @end deftypevr | ||
| 22041 | |||
| 22042 | @deftypevr {@code{libvirt-configuration} parameter} string auth-tcp | ||
| 22043 | Authentication scheme for TCP sockets. If you don't enable SASL, then all | ||
| 22044 | TCP traffic is cleartext. Don't do this outside of a dev/test scenario. | ||
| 22045 | |||
| 22046 | Defaults to @samp{"sasl"}. | ||
| 22047 | |||
| 22048 | @end deftypevr | ||
| 22049 | |||
| 22050 | @deftypevr {@code{libvirt-configuration} parameter} string auth-tls | ||
| 22051 | Authentication scheme for TLS sockets. TLS sockets already have encryption | ||
| 22052 | provided by the TLS layer, and limited authentication is done by | ||
| 22053 | certificates. | ||
| 22054 | |||
| 22055 | It is possible to make use of any SASL authentication mechanism as well, by | ||
| 22056 | using 'sasl' for this option | ||
| 22057 | |||
| 22058 | Defaults to @samp{"none"}. | ||
| 22059 | |||
| 22060 | @end deftypevr | ||
| 22061 | |||
| 22062 | @deftypevr {@code{libvirt-configuration} parameter} optional-list access-drivers | ||
| 22063 | API access control scheme. | ||
| 22064 | |||
| 22065 | By default an authenticated user is allowed access to all APIs. Access | ||
| 22066 | drivers can place restrictions on this. | ||
| 22067 | |||
| 22068 | Defaults to @samp{()}. | ||
| 22069 | |||
| 22070 | @end deftypevr | ||
| 22071 | |||
| 22072 | @deftypevr {@code{libvirt-configuration} parameter} string key-file | ||
| 22073 | Server key file path. If set to an empty string, then no private key is | ||
| 22074 | loaded. | ||
| 22075 | |||
| 22076 | Defaults to @samp{""}. | ||
| 22077 | |||
| 22078 | @end deftypevr | ||
| 22079 | |||
| 22080 | @deftypevr {@code{libvirt-configuration} parameter} string cert-file | ||
| 22081 | Server key file path. If set to an empty string, then no certificate is | ||
| 22082 | loaded. | ||
| 22083 | |||
| 22084 | Defaults to @samp{""}. | ||
| 22085 | |||
| 22086 | @end deftypevr | ||
| 22087 | |||
| 22088 | @deftypevr {@code{libvirt-configuration} parameter} string ca-file | ||
| 22089 | Server key file path. If set to an empty string, then no CA certificate is | ||
| 22090 | loaded. | ||
| 22091 | |||
| 22092 | Defaults to @samp{""}. | ||
| 22093 | |||
| 22094 | @end deftypevr | ||
| 22095 | |||
| 22096 | @deftypevr {@code{libvirt-configuration} parameter} string crl-file | ||
| 22097 | Certificate revocation list path. If set to an empty string, then no CRL is | ||
| 22098 | loaded. | ||
| 22099 | |||
| 22100 | Defaults to @samp{""}. | ||
| 22101 | |||
| 22102 | @end deftypevr | ||
| 22103 | |||
| 22104 | @deftypevr {@code{libvirt-configuration} parameter} boolean tls-no-sanity-cert | ||
| 22105 | Disable verification of our own server certificates. | ||
| 22106 | |||
| 22107 | When libvirtd starts it performs some sanity checks against its own | ||
| 22108 | certificates. | ||
| 22109 | |||
| 22110 | Defaults to @samp{#f}. | ||
| 22111 | |||
| 22112 | @end deftypevr | ||
| 22113 | |||
| 22114 | @deftypevr {@code{libvirt-configuration} parameter} boolean tls-no-verify-cert | ||
| 22115 | Disable verification of client certificates. | ||
| 22116 | |||
| 22117 | Client certificate verification is the primary authentication mechanism. | ||
| 22118 | Any client which does not present a certificate signed by the CA will be | ||
| 22119 | rejected. | ||
| 22120 | |||
| 22121 | Defaults to @samp{#f}. | ||
| 22122 | |||
| 22123 | @end deftypevr | ||
| 22124 | |||
| 22125 | @deftypevr {@code{libvirt-configuration} parameter} optional-list tls-allowed-dn-list | ||
| 22126 | Whitelist of allowed x509 Distinguished Name. | ||
| 22127 | |||
| 22128 | Defaults to @samp{()}. | ||
| 22129 | |||
| 22130 | @end deftypevr | ||
| 22131 | |||
| 22132 | @deftypevr {@code{libvirt-configuration} parameter} optional-list sasl-allowed-usernames | ||
| 22133 | Whitelist of allowed SASL usernames. The format for username depends on the | ||
| 22134 | SASL authentication mechanism. | ||
| 22135 | |||
| 22136 | Defaults to @samp{()}. | ||
| 22137 | |||
| 22138 | @end deftypevr | ||
| 22139 | |||
| 22140 | @deftypevr {@code{libvirt-configuration} parameter} string tls-priority | ||
| 22141 | Override the compile time default TLS priority string. The default is | ||
| 22142 | usually "NORMAL" unless overridden at build time. Only set this is it is | ||
| 22143 | desired for libvirt to deviate from the global default settings. | ||
| 22144 | |||
| 22145 | Defaults to @samp{"NORMAL"}. | ||
| 22146 | |||
| 22147 | @end deftypevr | ||
| 22148 | |||
| 22149 | @deftypevr {@code{libvirt-configuration} parameter} integer max-clients | ||
| 22150 | Maximum number of concurrent client connections to allow over all sockets | ||
| 22151 | combined. | ||
| 22152 | |||
| 22153 | Defaults to @samp{5000}. | ||
| 22154 | |||
| 22155 | @end deftypevr | ||
| 22156 | |||
| 22157 | @deftypevr {@code{libvirt-configuration} parameter} integer max-queued-clients | ||
| 22158 | Maximum length of queue of connections waiting to be accepted by the | ||
| 22159 | daemon. Note, that some protocols supporting retransmission may obey this | ||
| 22160 | so that a later reattempt at connection succeeds. | ||
| 22161 | |||
| 22162 | Defaults to @samp{1000}. | ||
| 22163 | |||
| 22164 | @end deftypevr | ||
| 22165 | |||
| 22166 | @deftypevr {@code{libvirt-configuration} parameter} integer max-anonymous-clients | ||
| 22167 | Maximum length of queue of accepted but not yet authenticated clients. Set | ||
| 22168 | this to zero to turn this feature off | ||
| 22169 | |||
| 22170 | Defaults to @samp{20}. | ||
| 22171 | |||
| 22172 | @end deftypevr | ||
| 22173 | |||
| 22174 | @deftypevr {@code{libvirt-configuration} parameter} integer min-workers | ||
| 22175 | Number of workers to start up initially. | ||
| 22176 | |||
| 22177 | Defaults to @samp{5}. | ||
| 22178 | |||
| 22179 | @end deftypevr | ||
| 22180 | |||
| 22181 | @deftypevr {@code{libvirt-configuration} parameter} integer max-workers | ||
| 22182 | Maximum number of worker threads. | ||
| 22183 | |||
| 22184 | If the number of active clients exceeds @code{min-workers}, then more | ||
| 22185 | threads are spawned, up to max_workers limit. Typically you'd want | ||
| 22186 | max_workers to equal maximum number of clients allowed. | ||
| 22187 | |||
| 22188 | Defaults to @samp{20}. | ||
| 22189 | |||
| 22190 | @end deftypevr | ||
| 22191 | |||
| 22192 | @deftypevr {@code{libvirt-configuration} parameter} integer prio-workers | ||
| 22193 | Number of priority workers. If all workers from above pool are stuck, some | ||
| 22194 | calls marked as high priority (notably domainDestroy) can be executed in | ||
| 22195 | this pool. | ||
| 22196 | |||
| 22197 | Defaults to @samp{5}. | ||
| 22198 | |||
| 22199 | @end deftypevr | ||
| 22200 | |||
| 22201 | @deftypevr {@code{libvirt-configuration} parameter} integer max-requests | ||
| 22202 | Total global limit on concurrent RPC calls. | ||
| 22203 | |||
| 22204 | Defaults to @samp{20}. | ||
| 22205 | |||
| 22206 | @end deftypevr | ||
| 22207 | |||
| 22208 | @deftypevr {@code{libvirt-configuration} parameter} integer max-client-requests | ||
| 22209 | Limit on concurrent requests from a single client connection. To avoid one | ||
| 22210 | client monopolizing the server this should be a small fraction of the global | ||
| 22211 | max_requests and max_workers parameter. | ||
| 22212 | |||
| 22213 | Defaults to @samp{5}. | ||
| 22214 | |||
| 22215 | @end deftypevr | ||
| 22216 | |||
| 22217 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-min-workers | ||
| 22218 | Same as @code{min-workers} but for the admin interface. | ||
| 22219 | |||
| 22220 | Defaults to @samp{1}. | ||
| 22221 | |||
| 22222 | @end deftypevr | ||
| 22223 | |||
| 22224 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-max-workers | ||
| 22225 | Same as @code{max-workers} but for the admin interface. | ||
| 22226 | |||
| 22227 | Defaults to @samp{5}. | ||
| 22228 | |||
| 22229 | @end deftypevr | ||
| 22230 | |||
| 22231 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-max-clients | ||
| 22232 | Same as @code{max-clients} but for the admin interface. | ||
| 22233 | |||
| 22234 | Defaults to @samp{5}. | ||
| 22235 | |||
| 22236 | @end deftypevr | ||
| 22237 | |||
| 22238 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-max-queued-clients | ||
| 22239 | Same as @code{max-queued-clients} but for the admin interface. | ||
| 22240 | |||
| 22241 | Defaults to @samp{5}. | ||
| 22242 | |||
| 22243 | @end deftypevr | ||
| 22244 | |||
| 22245 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-max-client-requests | ||
| 22246 | Same as @code{max-client-requests} but for the admin interface. | ||
| 22247 | |||
| 22248 | Defaults to @samp{5}. | ||
| 22249 | |||
| 22250 | @end deftypevr | ||
| 22251 | |||
| 22252 | @deftypevr {@code{libvirt-configuration} parameter} integer log-level | ||
| 22253 | Logging level. 4 errors, 3 warnings, 2 information, 1 debug. | ||
| 22254 | |||
| 22255 | Defaults to @samp{3}. | ||
| 22256 | |||
| 22257 | @end deftypevr | ||
| 22258 | |||
| 22259 | @deftypevr {@code{libvirt-configuration} parameter} string log-filters | ||
| 22260 | Logging filters. | ||
| 22261 | |||
| 22262 | A filter allows to select a different logging level for a given category of | ||
| 22263 | logs The format for a filter is one of: | ||
| 22264 | |||
| 22265 | @itemize @bullet | ||
| 22266 | @item | ||
| 22267 | x:name | ||
| 22268 | |||
| 22269 | @item | ||
| 22270 | x:+name | ||
| 22271 | |||
| 22272 | @end itemize | ||
| 22273 | |||
| 22274 | where @code{name} is a string which is matched against the category given in | ||
| 22275 | the @code{VIR_LOG_INIT()} at the top of each libvirt source file, e.g., | ||
| 22276 | "remote", "qemu", or "util.json" (the name in the filter can be a substring | ||
| 22277 | of the full category name, in order to match multiple similar categories), | ||
| 22278 | the optional "+" prefix tells libvirt to log stack trace for each message | ||
| 22279 | matching name, and @code{x} is the minimal level where matching messages | ||
| 22280 | should be logged: | ||
| 22281 | |||
| 22282 | @itemize @bullet | ||
| 22283 | @item | ||
| 22284 | 1: DEBUG | ||
| 22285 | |||
| 22286 | @item | ||
| 22287 | 2: INFO | ||
| 22288 | |||
| 22289 | @item | ||
| 22290 | 3: WARNING | ||
| 22291 | |||
| 22292 | @item | ||
| 22293 | 4: ERROR | ||
| 22294 | |||
| 22295 | @end itemize | ||
| 22296 | |||
| 22297 | Multiple filters can be defined in a single filters statement, they just | ||
| 22298 | need to be separated by spaces. | ||
| 22299 | |||
| 22300 | Defaults to @samp{"3:remote 4:event"}. | ||
| 22301 | |||
| 22302 | @end deftypevr | ||
| 22303 | |||
| 22304 | @deftypevr {@code{libvirt-configuration} parameter} string log-outputs | ||
| 22305 | Logging outputs. | ||
| 22306 | |||
| 22307 | An output is one of the places to save logging information The format for an | ||
| 22308 | output can be: | ||
| 22309 | |||
| 22310 | @table @code | ||
| 22311 | @item x:stderr | ||
| 22312 | output goes to stderr | ||
| 22313 | |||
| 22314 | @item x:syslog:name | ||
| 22315 | use syslog for the output and use the given name as the ident | ||
| 22316 | |||
| 22317 | @item x:file:file_path | ||
| 22318 | output to a file, with the given filepath | ||
| 22319 | |||
| 22320 | @item x:journald | ||
| 22321 | output to journald logging system | ||
| 22322 | |||
| 22323 | @end table | ||
| 22324 | |||
| 22325 | In all case the x prefix is the minimal level, acting as a filter | ||
| 22326 | |||
| 22327 | @itemize @bullet | ||
| 22328 | @item | ||
| 22329 | 1: DEBUG | ||
| 22330 | |||
| 22331 | @item | ||
| 22332 | 2: INFO | ||
| 22333 | |||
| 22334 | @item | ||
| 22335 | 3: WARNING | ||
| 22336 | |||
| 22337 | @item | ||
| 22338 | 4: ERROR | ||
| 22339 | |||
| 22340 | @end itemize | ||
| 22341 | |||
| 22342 | Multiple outputs can be defined, they just need to be separated by spaces. | ||
| 22343 | |||
| 22344 | Defaults to @samp{"3:stderr"}. | ||
| 22345 | |||
| 22346 | @end deftypevr | ||
| 22347 | |||
| 22348 | @deftypevr {@code{libvirt-configuration} parameter} integer audit-level | ||
| 22349 | Allows usage of the auditing subsystem to be altered | ||
| 22350 | |||
| 22351 | @itemize @bullet | ||
| 22352 | @item | ||
| 22353 | 0: disable all auditing | ||
| 22354 | |||
| 22355 | @item | ||
| 22356 | 1: enable auditing, only if enabled on host | ||
| 22357 | |||
| 22358 | @item | ||
| 22359 | 2: enable auditing, and exit if disabled on host. | ||
| 22360 | |||
| 22361 | @end itemize | ||
| 22362 | |||
| 22363 | Defaults to @samp{1}. | ||
| 22364 | |||
| 22365 | @end deftypevr | ||
| 22366 | |||
| 22367 | @deftypevr {@code{libvirt-configuration} parameter} boolean audit-logging | ||
| 22368 | Send audit messages via libvirt logging infrastructure. | ||
| 22369 | |||
| 22370 | Defaults to @samp{#f}. | ||
| 22371 | |||
| 22372 | @end deftypevr | ||
| 22373 | |||
| 22374 | @deftypevr {@code{libvirt-configuration} parameter} optional-string host-uuid | ||
| 22375 | Host UUID. UUID must not have all digits be the same. | ||
| 22376 | |||
| 22377 | Defaults to @samp{""}. | ||
| 22378 | |||
| 22379 | @end deftypevr | ||
| 22380 | |||
| 22381 | @deftypevr {@code{libvirt-configuration} parameter} string host-uuid-source | ||
| 22382 | Source to read host UUID. | ||
| 22383 | |||
| 22384 | @itemize @bullet | ||
| 22385 | @item | ||
| 22386 | @code{smbios}: fetch the UUID from @code{dmidecode -s system-uuid} | ||
| 22387 | |||
| 22388 | @item | ||
| 22389 | @code{machine-id}: fetch the UUID from @code{/etc/machine-id} | ||
| 22390 | |||
| 22391 | @end itemize | ||
| 22392 | |||
| 22393 | If @code{dmidecode} does not provide a valid UUID a temporary UUID will be | ||
| 22394 | generated. | ||
| 22395 | |||
| 22396 | Defaults to @samp{"smbios"}. | ||
| 22397 | |||
| 22398 | @end deftypevr | ||
| 22399 | |||
| 22400 | @deftypevr {@code{libvirt-configuration} parameter} integer keepalive-interval | ||
| 22401 | A keepalive message is sent to a client after @code{keepalive_interval} | ||
| 22402 | seconds of inactivity to check if the client is still responding. If set to | ||
| 22403 | -1, libvirtd will never send keepalive requests; however clients can still | ||
| 22404 | send them and the daemon will send responses. | ||
| 22405 | |||
| 22406 | Defaults to @samp{5}. | ||
| 22407 | |||
| 22408 | @end deftypevr | ||
| 22409 | |||
| 22410 | @deftypevr {@code{libvirt-configuration} parameter} integer keepalive-count | ||
| 22411 | Maximum number of keepalive messages that are allowed to be sent to the | ||
| 22412 | client without getting any response before the connection is considered | ||
| 22413 | broken. | ||
| 22414 | |||
| 22415 | In other words, the connection is automatically closed approximately after | ||
| 22416 | @code{keepalive_interval * (keepalive_count + 1)} seconds since the last | ||
| 22417 | message received from the client. When @code{keepalive-count} is set to 0, | ||
| 22418 | connections will be automatically closed after @code{keepalive-interval} | ||
| 22419 | seconds of inactivity without sending any keepalive messages. | ||
| 22420 | |||
| 22421 | Defaults to @samp{5}. | ||
| 22422 | |||
| 22423 | @end deftypevr | ||
| 22424 | |||
| 22425 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-keepalive-interval | ||
| 22426 | Same as above but for admin interface. | ||
| 22427 | |||
| 22428 | Defaults to @samp{5}. | ||
| 22429 | |||
| 22430 | @end deftypevr | ||
| 22431 | |||
| 22432 | @deftypevr {@code{libvirt-configuration} parameter} integer admin-keepalive-count | ||
| 22433 | Same as above but for admin interface. | ||
| 22434 | |||
| 22435 | Defaults to @samp{5}. | ||
| 22436 | |||
| 22437 | @end deftypevr | ||
| 22438 | |||
| 22439 | @deftypevr {@code{libvirt-configuration} parameter} integer ovs-timeout | ||
| 22440 | Timeout for Open vSwitch calls. | ||
| 22441 | |||
| 22442 | The @code{ovs-vsctl} utility is used for the configuration and its timeout | ||
| 22443 | option is set by default to 5 seconds to avoid potential infinite waits | ||
| 22444 | blocking libvirt. | ||
| 22445 | |||
| 22446 | Defaults to @samp{5}. | ||
| 22447 | |||
| 22448 | @end deftypevr | ||
| 22449 | |||
| 22450 | @c %end of autogenerated docs | ||
| 22451 | |||
| 22452 | @subsubheading Virtlog daemon | ||
| 22453 | The virtlogd service is a server side daemon component of libvirt that is | ||
| 22454 | used to manage logs from virtual machine consoles. | ||
| 22455 | |||
| 22456 | This daemon is not used directly by libvirt client applications, rather it | ||
| 22457 | is called on their behalf by @code{libvirtd}. By maintaining the logs in a | ||
| 22458 | standalone daemon, the main @code{libvirtd} daemon can be restarted without | ||
| 22459 | risk of losing logs. The @code{virtlogd} daemon has the ability to re-exec() | ||
| 22460 | itself upon receiving @code{SIGUSR1}, to allow live upgrades without | ||
| 22461 | downtime. | ||
| 22462 | |||
| 22463 | @deffn {Scheme Variable} virtlog-service-type | ||
| 22464 | This is the type of the virtlog daemon. Its value must be a | ||
| 22465 | @code{virtlog-configuration}. | ||
| 22466 | |||
| 22467 | @example | ||
| 22468 | (service virtlog-service-type | ||
| 22469 | (virtlog-configuration | ||
| 22470 | (max-clients 1000))) | ||
| 22471 | @end example | ||
| 22472 | @end deffn | ||
| 22473 | |||
| 22474 | @deftypevr {@code{virtlog-configuration} parameter} integer log-level | ||
| 22475 | Logging level. 4 errors, 3 warnings, 2 information, 1 debug. | ||
| 22476 | |||
| 22477 | Defaults to @samp{3}. | ||
| 22478 | |||
| 22479 | @end deftypevr | ||
| 22480 | |||
| 22481 | @deftypevr {@code{virtlog-configuration} parameter} string log-filters | ||
| 22482 | Logging filters. | ||
| 22483 | |||
| 22484 | A filter allows to select a different logging level for a given category of | ||
| 22485 | logs The format for a filter is one of: | ||
| 22486 | |||
| 22487 | @itemize @bullet | ||
| 22488 | @item | ||
| 22489 | x:name | ||
| 22490 | |||
| 22491 | @item | ||
| 22492 | x:+name | ||
| 22493 | |||
| 22494 | @end itemize | ||
| 22495 | |||
| 22496 | where @code{name} is a string which is matched against the category given in | ||
| 22497 | the @code{VIR_LOG_INIT()} at the top of each libvirt source file, e.g., | ||
| 22498 | "remote", "qemu", or "util.json" (the name in the filter can be a substring | ||
| 22499 | of the full category name, in order to match multiple similar categories), | ||
| 22500 | the optional "+" prefix tells libvirt to log stack trace for each message | ||
| 22501 | matching name, and @code{x} is the minimal level where matching messages | ||
| 22502 | should be logged: | ||
| 22503 | |||
| 22504 | @itemize @bullet | ||
| 22505 | @item | ||
| 22506 | 1: DEBUG | ||
| 22507 | |||
| 22508 | @item | ||
| 22509 | 2: INFO | ||
| 22510 | |||
| 22511 | @item | ||
| 22512 | 3: WARNING | ||
| 22513 | |||
| 22514 | @item | ||
| 22515 | 4: ERROR | ||
| 22516 | |||
| 22517 | @end itemize | ||
| 22518 | |||
| 22519 | Multiple filters can be defined in a single filters statement, they just | ||
| 22520 | need to be separated by spaces. | ||
| 22521 | |||
| 22522 | Defaults to @samp{"3:remote 4:event"}. | ||
| 22523 | |||
| 22524 | @end deftypevr | ||
| 22525 | |||
| 22526 | @deftypevr {@code{virtlog-configuration} parameter} string log-outputs | ||
| 22527 | Logging outputs. | ||
| 22528 | |||
| 22529 | An output is one of the places to save logging information The format for an | ||
| 22530 | output can be: | ||
| 22531 | |||
| 22532 | @table @code | ||
| 22533 | @item x:stderr | ||
| 22534 | output goes to stderr | ||
| 22535 | |||
| 22536 | @item x:syslog:name | ||
| 22537 | use syslog for the output and use the given name as the ident | ||
| 22538 | |||
| 22539 | @item x:file:file_path | ||
| 22540 | output to a file, with the given filepath | ||
| 22541 | |||
| 22542 | @item x:journald | ||
| 22543 | output to journald logging system | ||
| 22544 | |||
| 22545 | @end table | ||
| 22546 | |||
| 22547 | In all case the x prefix is the minimal level, acting as a filter | ||
| 22548 | |||
| 22549 | @itemize @bullet | ||
| 22550 | @item | ||
| 22551 | 1: DEBUG | ||
| 22552 | |||
| 22553 | @item | ||
| 22554 | 2: INFO | ||
| 22555 | |||
| 22556 | @item | ||
| 22557 | 3: WARNING | ||
| 22558 | |||
| 22559 | @item | ||
| 22560 | 4: ERROR | ||
| 22561 | |||
| 22562 | @end itemize | ||
| 22563 | |||
| 22564 | Multiple outputs can be defined, they just need to be separated by spaces. | ||
| 22565 | |||
| 22566 | Defaults to @samp{"3:stderr"}. | ||
| 22567 | |||
| 22568 | @end deftypevr | ||
| 22569 | |||
| 22570 | @deftypevr {@code{virtlog-configuration} parameter} integer max-clients | ||
| 22571 | Maximum number of concurrent client connections to allow over all sockets | ||
| 22572 | combined. | ||
| 22573 | |||
| 22574 | Defaults to @samp{1024}. | ||
| 22575 | |||
| 22576 | @end deftypevr | ||
| 22577 | |||
| 22578 | @deftypevr {@code{virtlog-configuration} parameter} integer max-size | ||
| 22579 | Maximum file size before rolling over. | ||
| 22580 | |||
| 22581 | Defaults to @samp{2MB} | ||
| 22582 | |||
| 22583 | @end deftypevr | ||
| 22584 | |||
| 22585 | @deftypevr {@code{virtlog-configuration} parameter} integer max-backups | ||
| 22586 | Maximum number of backup files to keep. | ||
| 22587 | |||
| 22588 | Defaults to @samp{3} | ||
| 22589 | |||
| 22590 | @end deftypevr | ||
| 22591 | |||
| 22592 | @subsubheading Transparent Emulation with QEMU | ||
| 22593 | |||
| 22594 | @cindex emulation | ||
| 22595 | @cindex @code{binfmt_misc} | ||
| 22596 | @code{qemu-binfmt-service-type} provides support for transparent emulation | ||
| 22597 | of program binaries built for different architectures---e.g., it allows you | ||
| 22598 | to transparently execute an ARMv7 program on an x86_64 machine. It achieves | ||
| 22599 | this by combining the @uref{https://www.qemu.org, QEMU} emulator and the | ||
| 22600 | @code{binfmt_misc} feature of the kernel Linux. | ||
| 22601 | |||
| 22602 | @defvr {Scheme Variable} qemu-binfmt-service-type | ||
| 22603 | This is the type of the QEMU/binfmt service for transparent emulation. Its | ||
| 22604 | value must be a @code{qemu-binfmt-configuration} object, which specifies the | ||
| 22605 | QEMU package to use as well as the architecture we want to emulated: | ||
| 22606 | |||
| 22607 | @example | ||
| 22608 | (service qemu-binfmt-service-type | ||
| 22609 | (qemu-binfmt-configuration | ||
| 22610 | (platforms (lookup-qemu-platforms "arm" "aarch64" "mips64el")))) | ||
| 22611 | @end example | ||
| 22612 | |||
| 22613 | In this example, we enable transparent emulation for the ARM and aarch64 | ||
| 22614 | platforms. Running @code{herd stop qemu-binfmt} turns it off, and running | ||
| 22615 | @code{herd start qemu-binfmt} turns it back on (@pxref{Invoking herd, the | ||
| 22616 | @command{herd} command,, shepherd, The GNU Shepherd Manual}). | ||
| 22617 | @end defvr | ||
| 22618 | |||
| 22619 | @deftp {Data Type} qemu-binfmt-configuration | ||
| 22620 | This is the configuration for the @code{qemu-binfmt} service. | ||
| 22621 | |||
| 22622 | @table @asis | ||
| 22623 | @item @code{platforms} (default: @code{'()}) | ||
| 22624 | The list of emulated QEMU platforms. Each item must be a @dfn{platform | ||
| 22625 | object} as returned by @code{lookup-qemu-platforms} (see below). | ||
| 22626 | |||
| 22627 | @item @code{guix-support?} (default: @code{#f}) | ||
| 22628 | When it is true, QEMU and all its dependencies are added to the build | ||
| 22629 | environment of @command{guix-daemon} (@pxref{Aufruf des guix-daemon, | ||
| 22630 | @code{--chroot-directory} option}). This allows the @code{binfmt_misc} | ||
| 22631 | handlers to be used within the build environment, which in turn means that | ||
| 22632 | you can transparently build programs for another architecture. | ||
| 22633 | |||
| 22634 | For example, let's suppose you're on an x86_64 machine and you have this | ||
| 22635 | service: | ||
| 22636 | |||
| 22637 | @example | ||
| 22638 | (service qemu-binfmt-service-type | ||
| 22639 | (qemu-binfmt-configuration | ||
| 22640 | (platforms (lookup-qemu-platforms "arm")) | ||
| 22641 | (guix-support? #t))) | ||
| 22642 | @end example | ||
| 22643 | |||
| 22644 | You can run: | ||
| 22645 | |||
| 22646 | @example | ||
| 22647 | guix build -s armhf-linux inkscape | ||
| 22648 | @end example | ||
| 22649 | |||
| 22650 | @noindent | ||
| 22651 | and it will build Inkscape for ARMv7 @emph{as if it were a native build}, | ||
| 22652 | transparently using QEMU to emulate the ARMv7 CPU. Pretty handy if you'd | ||
| 22653 | like to test a package build for an architecture you don't have access to! | ||
| 22654 | |||
| 22655 | @item @code{qemu} (default: @code{qemu}) | ||
| 22656 | The QEMU package to use. | ||
| 22657 | @end table | ||
| 22658 | @end deftp | ||
| 22659 | |||
| 22660 | @deffn {Scheme Procedure} lookup-qemu-platforms @var{platforms}@dots{} | ||
| 22661 | Return the list of QEMU platform objects corresponding to | ||
| 22662 | @var{platforms}@dots{}. @var{platforms} must be a list of strings | ||
| 22663 | corresponding to platform names, such as @code{"arm"}, @code{"sparc"}, | ||
| 22664 | @code{"mips64el"}, and so on. | ||
| 22665 | @end deffn | ||
| 22666 | |||
| 22667 | @deffn {Scheme Procedure} qemu-platform? @var{obj} | ||
| 22668 | Return true if @var{obj} is a platform object. | ||
| 22669 | @end deffn | ||
| 22670 | |||
| 22671 | @deffn {Scheme Procedure} qemu-platform-name @var{platform} | ||
| 22672 | Return the name of @var{platform}---a string such as @code{"arm"}. | ||
| 22673 | @end deffn | ||
| 22674 | |||
| 22675 | @node Versionskontrolldienste | ||
| 22676 | @subsection Versionskontrolldienste | ||
| 22677 | |||
| 22678 | The @code{(gnu services version-control)} module provides a service to allow | ||
| 22679 | remote access to local Git repositories. There are three options: the | ||
| 22680 | @code{git-daemon-service}, which provides access to repositories via the | ||
| 22681 | @code{git://} unsecured TCP-based protocol, extending the @code{nginx} web | ||
| 22682 | server to proxy some requests to @code{git-http-backend}, or providing a web | ||
| 22683 | interface with @code{cgit-service-type}. | ||
| 22684 | |||
| 22685 | @deffn {Scheme Procedure} git-daemon-service [#:config (git-daemon-configuration)] | ||
| 22686 | |||
| 22687 | Return a service that runs @command{git daemon}, a simple TCP server to | ||
| 22688 | expose repositories over the Git protocol for anonymous access. | ||
| 22689 | |||
| 22690 | The optional @var{config} argument should be a | ||
| 22691 | @code{<git-daemon-configuration>} object, by default it allows read-only | ||
| 22692 | access to exported@footnote{By creating the magic file | ||
| 22693 | "git-daemon-export-ok" in the repository directory.} repositories under | ||
| 22694 | @file{/srv/git}. | ||
| 22695 | |||
| 22696 | @end deffn | ||
| 22697 | |||
| 22698 | @deftp {Data Type} git-daemon-configuration | ||
| 22699 | Data type representing the configuration for @code{git-daemon-service}. | ||
| 22700 | |||
| 22701 | @table @asis | ||
| 22702 | @item @code{package} (default: @var{git}) | ||
| 22703 | Package object of the Git distributed version control system. | ||
| 22704 | |||
| 22705 | @item @code{export-all?} (default: @var{#f}) | ||
| 22706 | Whether to allow access for all Git repositories, even if they do not have | ||
| 22707 | the @file{git-daemon-export-ok} file. | ||
| 22708 | |||
| 22709 | @item @code{base-path} (default: @file{/srv/git}) | ||
| 22710 | Whether to remap all the path requests as relative to the given path. If | ||
| 22711 | you run git daemon with @var{(base-path "/srv/git")} on example.com, then if | ||
| 22712 | you later try to pull @code{git://example.com/hello.git}, git daemon will | ||
| 22713 | interpret the path as @code{/srv/git/hello.git}. | ||
| 22714 | |||
| 22715 | @item @code{user-path} (default: @var{#f}) | ||
| 22716 | Whether to allow @code{~user} notation to be used in requests. When | ||
| 22717 | specified with empty string, requests to @code{git://host/~alice/foo} is | ||
| 22718 | taken as a request to access @code{foo} repository in the home directory of | ||
| 22719 | user @code{alice}. If @var{(user-path "path")} is specified, the same | ||
| 22720 | request is taken as a request to access @code{path/foo} repository in the | ||
| 22721 | home directory of user @code{alice}. | ||
| 22722 | |||
| 22723 | @item @code{listen} (default: @var{'()}) | ||
| 22724 | Whether to listen on specific IP addresses or hostnames, defaults to all. | ||
| 22725 | |||
| 22726 | @item @code{port} (default: @var{#f}) | ||
| 22727 | Whether to listen on an alternative port, which defaults to 9418. | ||
| 22728 | |||
| 22729 | @item @code{whitelist} (default: @var{'()}) | ||
| 22730 | If not empty, only allow access to this list of directories. | ||
| 22731 | |||
| 22732 | @item @code{extra-options} (default: @var{'()}) | ||
| 22733 | Extra options will be passed to @code{git daemon}, please run @command{man | ||
| 22734 | git-daemon} for more information. | ||
| 22735 | |||
| 22736 | @end table | ||
| 22737 | @end deftp | ||
| 22738 | |||
| 22739 | The @code{git://} protocol lacks authentication. When you pull from a | ||
| 22740 | repository fetched via @code{git://}, you don't know that the data you | ||
| 22741 | receive was modified is really coming from the specified host, and you have | ||
| 22742 | your connection is subject to eavesdropping. It's better to use an | ||
| 22743 | authenticated and encrypted transport, such as @code{https}. Although Git | ||
| 22744 | allows you to serve repositories using unsophisticated file-based web | ||
| 22745 | servers, there is a faster protocol implemented by the | ||
| 22746 | @code{git-http-backend} program. This program is the back-end of a proper | ||
| 22747 | Git web service. It is designed to sit behind a FastCGI proxy. @xref{Web-Dienste}, for more on running the necessary @code{fcgiwrap} daemon. | ||
| 22748 | |||
| 22749 | Guix has a separate configuration data type for serving Git repositories | ||
| 22750 | over HTTP. | ||
| 22751 | |||
| 22752 | @deftp {Data Type} git-http-configuration | ||
| 22753 | Data type representing the configuration for @code{git-http-service}. | ||
| 22754 | |||
| 22755 | @table @asis | ||
| 22756 | @item @code{package} (default: @var{git}) | ||
| 22757 | Package object of the Git distributed version control system. | ||
| 22758 | |||
| 22759 | @item @code{git-root} (default: @file{/srv/git}) | ||
| 22760 | Directory containing the Git repositories to expose to the world. | ||
| 22761 | |||
| 22762 | @item @code{export-all?} (default: @var{#f}) | ||
| 22763 | Whether to expose access for all Git repositories in @var{git-root}, even if | ||
| 22764 | they do not have the @file{git-daemon-export-ok} file. | ||
| 22765 | |||
| 22766 | @item @code{uri-path} (default: @file{/git/}) | ||
| 22767 | Path prefix for Git access. With the default @code{/git/} prefix, this will | ||
| 22768 | map @code{http://@var{server}/git/@var{repo}.git} to | ||
| 22769 | @code{/srv/git/@var{repo}.git}. Requests whose URI paths do not begin with | ||
| 22770 | this prefix are not passed on to this Git instance. | ||
| 22771 | |||
| 22772 | @item @code{fcgiwrap-socket} (default: @code{127.0.0.1:9000}) | ||
| 22773 | The socket on which the @code{fcgiwrap} daemon is listening. @xref{Web-Dienste}. | ||
| 22774 | @end table | ||
| 22775 | @end deftp | ||
| 22776 | |||
| 22777 | There is no @code{git-http-service-type}, currently; instead you can create | ||
| 22778 | an @code{nginx-location-configuration} from a @code{git-http-configuration} | ||
| 22779 | and then add that location to a web server. | ||
| 22780 | |||
| 22781 | @deffn {Scheme Procedure} git-http-nginx-location-configuration @ | ||
| 22782 | [config=(git-http-configuration)] Compute an | ||
| 22783 | @code{nginx-location-configuration} that corresponds to the given Git http | ||
| 22784 | configuration. An example nginx service definition to serve the default | ||
| 22785 | @file{/srv/git} over HTTPS might be: | ||
| 22786 | |||
| 22787 | @example | ||
| 22788 | (service nginx-service-type | ||
| 22789 | (nginx-configuration | ||
| 22790 | (server-blocks | ||
| 22791 | (list | ||
| 22792 | (nginx-server-configuration | ||
| 22793 | (listen '("443 ssl")) | ||
| 22794 | (server-name "git.my-host.org") | ||
| 22795 | (ssl-certificate | ||
| 22796 | "/etc/letsencrypt/live/git.my-host.org/fullchain.pem") | ||
| 22797 | (ssl-certificate-key | ||
| 22798 | "/etc/letsencrypt/live/git.my-host.org/privkey.pem") | ||
| 22799 | (locations | ||
| 22800 | (list | ||
| 22801 | (git-http-nginx-location-configuration | ||
| 22802 | (git-http-configuration (uri-path "/")))))))))) | ||
| 22803 | @end example | ||
| 22804 | |||
| 22805 | This example assumes that you are using Let's Encrypt to get your TLS | ||
| 22806 | certificate. @xref{Zertifikatsdienste}. The default @code{certbot} | ||
| 22807 | service will redirect all HTTP traffic on @code{git.my-host.org} to HTTPS. | ||
| 22808 | You will also need to add an @code{fcgiwrap} proxy to your system services. | ||
| 22809 | @xref{Web-Dienste}. | ||
| 22810 | @end deffn | ||
| 22811 | |||
| 22812 | @subsubheading Cgit Service | ||
| 22813 | |||
| 22814 | @cindex Cgit service | ||
| 22815 | @cindex Git, web interface | ||
| 22816 | @uref{https://git.zx2c4.com/cgit/, Cgit} is a web frontend for Git | ||
| 22817 | repositories written in C. | ||
| 22818 | |||
| 22819 | The following example will configure the service with default values. By | ||
| 22820 | default, Cgit can be accessed on port 80 (@code{http://localhost:80}). | ||
| 22821 | |||
| 22822 | @example | ||
| 22823 | (service cgit-service-type) | ||
| 22824 | @end example | ||
| 22825 | |||
| 22826 | The @code{file-object} type designates either a file-like object | ||
| 22827 | (@pxref{G-Ausdrücke, file-like objects}) or a string. | ||
| 22828 | |||
| 22829 | @c %start of fragment | ||
| 22830 | |||
| 22831 | Available @code{cgit-configuration} fields are: | ||
| 22832 | |||
| 22833 | @deftypevr {@code{cgit-configuration} parameter} package package | ||
| 22834 | The CGIT package. | ||
| 22835 | |||
| 22836 | @end deftypevr | ||
| 22837 | |||
| 22838 | @deftypevr {@code{cgit-configuration} parameter} nginx-server-configuration-list nginx | ||
| 22839 | NGINX configuration. | ||
| 22840 | |||
| 22841 | @end deftypevr | ||
| 22842 | |||
| 22843 | @deftypevr {@code{cgit-configuration} parameter} file-object about-filter | ||
| 22844 | Specifies a command which will be invoked to format the content of about | ||
| 22845 | pages (both top-level and for each repository). | ||
| 22846 | |||
| 22847 | Defaults to @samp{""}. | ||
| 22848 | |||
| 22849 | @end deftypevr | ||
| 22850 | |||
| 22851 | @deftypevr {@code{cgit-configuration} parameter} string agefile | ||
| 22852 | Specifies a path, relative to each repository path, which can be used to | ||
| 22853 | specify the date and time of the youngest commit in the repository. | ||
| 22854 | |||
| 22855 | Defaults to @samp{""}. | ||
| 22856 | |||
| 22857 | @end deftypevr | ||
| 22858 | |||
| 22859 | @deftypevr {@code{cgit-configuration} parameter} file-object auth-filter | ||
| 22860 | Specifies a command that will be invoked for authenticating repository | ||
| 22861 | access. | ||
| 22862 | |||
| 22863 | Defaults to @samp{""}. | ||
| 22864 | |||
| 22865 | @end deftypevr | ||
| 22866 | |||
| 22867 | @deftypevr {@code{cgit-configuration} parameter} string branch-sort | ||
| 22868 | Flag which, when set to @samp{age}, enables date ordering in the branch ref | ||
| 22869 | list, and when set @samp{name} enables ordering by branch name. | ||
| 22870 | |||
| 22871 | Defaults to @samp{"name"}. | ||
| 22872 | |||
| 22873 | @end deftypevr | ||
| 22874 | |||
| 22875 | @deftypevr {@code{cgit-configuration} parameter} string cache-root | ||
| 22876 | Path used to store the cgit cache entries. | ||
| 22877 | |||
| 22878 | Defaults to @samp{"/var/cache/cgit"}. | ||
| 22879 | |||
| 22880 | @end deftypevr | ||
| 22881 | |||
| 22882 | @deftypevr {@code{cgit-configuration} parameter} integer cache-static-ttl | ||
| 22883 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22884 | of repository pages accessed with a fixed SHA1. | ||
| 22885 | |||
| 22886 | Defaults to @samp{-1}. | ||
| 22887 | |||
| 22888 | @end deftypevr | ||
| 22889 | |||
| 22890 | @deftypevr {@code{cgit-configuration} parameter} integer cache-dynamic-ttl | ||
| 22891 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22892 | of repository pages accessed without a fixed SHA1. | ||
| 22893 | |||
| 22894 | Defaults to @samp{5}. | ||
| 22895 | |||
| 22896 | @end deftypevr | ||
| 22897 | |||
| 22898 | @deftypevr {@code{cgit-configuration} parameter} integer cache-repo-ttl | ||
| 22899 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22900 | of the repository summary page. | ||
| 22901 | |||
| 22902 | Defaults to @samp{5}. | ||
| 22903 | |||
| 22904 | @end deftypevr | ||
| 22905 | |||
| 22906 | @deftypevr {@code{cgit-configuration} parameter} integer cache-root-ttl | ||
| 22907 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22908 | of the repository index page. | ||
| 22909 | |||
| 22910 | Defaults to @samp{5}. | ||
| 22911 | |||
| 22912 | @end deftypevr | ||
| 22913 | |||
| 22914 | @deftypevr {@code{cgit-configuration} parameter} integer cache-scanrc-ttl | ||
| 22915 | Number which specifies the time-to-live, in minutes, for the result of | ||
| 22916 | scanning a path for Git repositories. | ||
| 22917 | |||
| 22918 | Defaults to @samp{15}. | ||
| 22919 | |||
| 22920 | @end deftypevr | ||
| 22921 | |||
| 22922 | @deftypevr {@code{cgit-configuration} parameter} integer cache-about-ttl | ||
| 22923 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22924 | of the repository about page. | ||
| 22925 | |||
| 22926 | Defaults to @samp{15}. | ||
| 22927 | |||
| 22928 | @end deftypevr | ||
| 22929 | |||
| 22930 | @deftypevr {@code{cgit-configuration} parameter} integer cache-snapshot-ttl | ||
| 22931 | Number which specifies the time-to-live, in minutes, for the cached version | ||
| 22932 | of snapshots. | ||
| 22933 | |||
| 22934 | Defaults to @samp{5}. | ||
| 22935 | |||
| 22936 | @end deftypevr | ||
| 22937 | |||
| 22938 | @deftypevr {@code{cgit-configuration} parameter} integer cache-size | ||
| 22939 | The maximum number of entries in the cgit cache. When set to @samp{0}, | ||
| 22940 | caching is disabled. | ||
| 22941 | |||
| 22942 | Defaults to @samp{0}. | ||
| 22943 | |||
| 22944 | @end deftypevr | ||
| 22945 | |||
| 22946 | @deftypevr {@code{cgit-configuration} parameter} boolean case-sensitive-sort? | ||
| 22947 | Sort items in the repo list case sensitively. | ||
| 22948 | |||
| 22949 | Defaults to @samp{#t}. | ||
| 22950 | |||
| 22951 | @end deftypevr | ||
| 22952 | |||
| 22953 | @deftypevr {@code{cgit-configuration} parameter} list clone-prefix | ||
| 22954 | List of common prefixes which, when combined with a repository URL, | ||
| 22955 | generates valid clone URLs for the repository. | ||
| 22956 | |||
| 22957 | Defaults to @samp{()}. | ||
| 22958 | |||
| 22959 | @end deftypevr | ||
| 22960 | |||
| 22961 | @deftypevr {@code{cgit-configuration} parameter} list clone-url | ||
| 22962 | List of @code{clone-url} templates. | ||
| 22963 | |||
| 22964 | Defaults to @samp{()}. | ||
| 22965 | |||
| 22966 | @end deftypevr | ||
| 22967 | |||
| 22968 | @deftypevr {@code{cgit-configuration} parameter} file-object commit-filter | ||
| 22969 | Command which will be invoked to format commit messages. | ||
| 22970 | |||
| 22971 | Defaults to @samp{""}. | ||
| 22972 | |||
| 22973 | @end deftypevr | ||
| 22974 | |||
| 22975 | @deftypevr {@code{cgit-configuration} parameter} string commit-sort | ||
| 22976 | Flag which, when set to @samp{date}, enables strict date ordering in the | ||
| 22977 | commit log, and when set to @samp{topo} enables strict topological ordering. | ||
| 22978 | |||
| 22979 | Defaults to @samp{"git log"}. | ||
| 22980 | |||
| 22981 | @end deftypevr | ||
| 22982 | |||
| 22983 | @deftypevr {@code{cgit-configuration} parameter} file-object css | ||
| 22984 | URL which specifies the css document to include in all cgit pages. | ||
| 22985 | |||
| 22986 | Defaults to @samp{"/share/cgit/cgit.css"}. | ||
| 22987 | |||
| 22988 | @end deftypevr | ||
| 22989 | |||
| 22990 | @deftypevr {@code{cgit-configuration} parameter} file-object email-filter | ||
| 22991 | Specifies a command which will be invoked to format names and email address | ||
| 22992 | of committers, authors, and taggers, as represented in various places | ||
| 22993 | throughout the cgit interface. | ||
| 22994 | |||
| 22995 | Defaults to @samp{""}. | ||
| 22996 | |||
| 22997 | @end deftypevr | ||
| 22998 | |||
| 22999 | @deftypevr {@code{cgit-configuration} parameter} boolean embedded? | ||
| 23000 | Flag which, when set to @samp{#t}, will make cgit generate a HTML fragment | ||
| 23001 | suitable for embedding in other HTML pages. | ||
| 23002 | |||
| 23003 | Defaults to @samp{#f}. | ||
| 23004 | |||
| 23005 | @end deftypevr | ||
| 23006 | |||
| 23007 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-commit-graph? | ||
| 23008 | Flag which, when set to @samp{#t}, will make cgit print an ASCII-art commit | ||
| 23009 | history graph to the left of the commit messages in the repository log page. | ||
| 23010 | |||
| 23011 | Defaults to @samp{#f}. | ||
| 23012 | |||
| 23013 | @end deftypevr | ||
| 23014 | |||
| 23015 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-filter-overrides? | ||
| 23016 | Flag which, when set to @samp{#t}, allows all filter settings to be | ||
| 23017 | overridden in repository-specific cgitrc files. | ||
| 23018 | |||
| 23019 | Defaults to @samp{#f}. | ||
| 23020 | |||
| 23021 | @end deftypevr | ||
| 23022 | |||
| 23023 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-follow-links? | ||
| 23024 | Flag which, when set to @samp{#t}, allows users to follow a file in the log | ||
| 23025 | view. | ||
| 23026 | |||
| 23027 | Defaults to @samp{#f}. | ||
| 23028 | |||
| 23029 | @end deftypevr | ||
| 23030 | |||
| 23031 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-http-clone? | ||
| 23032 | If set to @samp{#t}, cgit will act as an dumb HTTP endpoint for Git clones. | ||
| 23033 | |||
| 23034 | Defaults to @samp{#t}. | ||
| 23035 | |||
| 23036 | @end deftypevr | ||
| 23037 | |||
| 23038 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-index-links? | ||
| 23039 | Flag which, when set to @samp{#t}, will make cgit generate extra links | ||
| 23040 | "summary", "commit", "tree" for each repo in the repository index. | ||
| 23041 | |||
| 23042 | Defaults to @samp{#f}. | ||
| 23043 | |||
| 23044 | @end deftypevr | ||
| 23045 | |||
| 23046 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-index-owner? | ||
| 23047 | Flag which, when set to @samp{#t}, will make cgit display the owner of each | ||
| 23048 | repo in the repository index. | ||
| 23049 | |||
| 23050 | Defaults to @samp{#t}. | ||
| 23051 | |||
| 23052 | @end deftypevr | ||
| 23053 | |||
| 23054 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-log-filecount? | ||
| 23055 | Flag which, when set to @samp{#t}, will make cgit print the number of | ||
| 23056 | modified files for each commit on the repository log page. | ||
| 23057 | |||
| 23058 | Defaults to @samp{#f}. | ||
| 23059 | |||
| 23060 | @end deftypevr | ||
| 23061 | |||
| 23062 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-log-linecount? | ||
| 23063 | Flag which, when set to @samp{#t}, will make cgit print the number of added | ||
| 23064 | and removed lines for each commit on the repository log page. | ||
| 23065 | |||
| 23066 | Defaults to @samp{#f}. | ||
| 23067 | |||
| 23068 | @end deftypevr | ||
| 23069 | |||
| 23070 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-remote-branches? | ||
| 23071 | Flag which, when set to @code{#t}, will make cgit display remote branches in | ||
| 23072 | the summary and refs views. | ||
| 23073 | |||
| 23074 | Defaults to @samp{#f}. | ||
| 23075 | |||
| 23076 | @end deftypevr | ||
| 23077 | |||
| 23078 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-subject-links? | ||
| 23079 | Flag which, when set to @code{1}, will make cgit use the subject of the | ||
| 23080 | parent commit as link text when generating links to parent commits in commit | ||
| 23081 | view. | ||
| 23082 | |||
| 23083 | Defaults to @samp{#f}. | ||
| 23084 | |||
| 23085 | @end deftypevr | ||
| 23086 | |||
| 23087 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-html-serving? | ||
| 23088 | Flag which, when set to @samp{#t}, will make cgit use the subject of the | ||
| 23089 | parent commit as link text when generating links to parent commits in commit | ||
| 23090 | view. | ||
| 23091 | |||
| 23092 | Defaults to @samp{#f}. | ||
| 23093 | |||
| 23094 | @end deftypevr | ||
| 23095 | |||
| 23096 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-tree-linenumbers? | ||
| 23097 | Flag which, when set to @samp{#t}, will make cgit generate linenumber links | ||
| 23098 | for plaintext blobs printed in the tree view. | ||
| 23099 | |||
| 23100 | Defaults to @samp{#t}. | ||
| 23101 | |||
| 23102 | @end deftypevr | ||
| 23103 | |||
| 23104 | @deftypevr {@code{cgit-configuration} parameter} boolean enable-git-config? | ||
| 23105 | Flag which, when set to @samp{#f}, will allow cgit to use Git config to set | ||
| 23106 | any repo specific settings. | ||
| 23107 | |||
| 23108 | Defaults to @samp{#f}. | ||
| 23109 | |||
| 23110 | @end deftypevr | ||
| 23111 | |||
| 23112 | @deftypevr {@code{cgit-configuration} parameter} file-object favicon | ||
| 23113 | URL used as link to a shortcut icon for cgit. | ||
| 23114 | |||
| 23115 | Defaults to @samp{"/favicon.ico"}. | ||
| 23116 | |||
| 23117 | @end deftypevr | ||
| 23118 | |||
| 23119 | @deftypevr {@code{cgit-configuration} parameter} string footer | ||
| 23120 | The content of the file specified with this option will be included verbatim | ||
| 23121 | at the bottom of all pages (i.e.@: it replaces the standard "generated | ||
| 23122 | by..."@: message). | ||
| 23123 | |||
| 23124 | Defaults to @samp{""}. | ||
| 23125 | |||
| 23126 | @end deftypevr | ||
| 23127 | |||
| 23128 | @deftypevr {@code{cgit-configuration} parameter} string head-include | ||
| 23129 | The content of the file specified with this option will be included verbatim | ||
| 23130 | in the HTML HEAD section on all pages. | ||
| 23131 | |||
| 23132 | Defaults to @samp{""}. | ||
| 23133 | |||
| 23134 | @end deftypevr | ||
| 23135 | |||
| 23136 | @deftypevr {@code{cgit-configuration} parameter} string header | ||
| 23137 | The content of the file specified with this option will be included verbatim | ||
| 23138 | at the top of all pages. | ||
| 23139 | |||
| 23140 | Defaults to @samp{""}. | ||
| 23141 | |||
| 23142 | @end deftypevr | ||
| 23143 | |||
| 23144 | @deftypevr {@code{cgit-configuration} parameter} file-object include | ||
| 23145 | Name of a configfile to include before the rest of the current config- file | ||
| 23146 | is parsed. | ||
| 23147 | |||
| 23148 | Defaults to @samp{""}. | ||
| 23149 | |||
| 23150 | @end deftypevr | ||
| 23151 | |||
| 23152 | @deftypevr {@code{cgit-configuration} parameter} string index-header | ||
| 23153 | The content of the file specified with this option will be included verbatim | ||
| 23154 | above the repository index. | ||
| 23155 | |||
| 23156 | Defaults to @samp{""}. | ||
| 23157 | |||
| 23158 | @end deftypevr | ||
| 23159 | |||
| 23160 | @deftypevr {@code{cgit-configuration} parameter} string index-info | ||
| 23161 | The content of the file specified with this option will be included verbatim | ||
| 23162 | below the heading on the repository index page. | ||
| 23163 | |||
| 23164 | Defaults to @samp{""}. | ||
| 23165 | |||
| 23166 | @end deftypevr | ||
| 23167 | |||
| 23168 | @deftypevr {@code{cgit-configuration} parameter} boolean local-time? | ||
| 23169 | Flag which, if set to @samp{#t}, makes cgit print commit and tag times in | ||
| 23170 | the servers timezone. | ||
| 23171 | |||
| 23172 | Defaults to @samp{#f}. | ||
| 23173 | |||
| 23174 | @end deftypevr | ||
| 23175 | |||
| 23176 | @deftypevr {@code{cgit-configuration} parameter} file-object logo | ||
| 23177 | URL which specifies the source of an image which will be used as a logo on | ||
| 23178 | all cgit pages. | ||
| 23179 | |||
| 23180 | Defaults to @samp{"/share/cgit/cgit.png"}. | ||
| 23181 | |||
| 23182 | @end deftypevr | ||
| 23183 | |||
| 23184 | @deftypevr {@code{cgit-configuration} parameter} string logo-link | ||
| 23185 | URL loaded when clicking on the cgit logo image. | ||
| 23186 | |||
| 23187 | Defaults to @samp{""}. | ||
| 23188 | |||
| 23189 | @end deftypevr | ||
| 23190 | |||
| 23191 | @deftypevr {@code{cgit-configuration} parameter} file-object owner-filter | ||
| 23192 | Command which will be invoked to format the Owner column of the main page. | ||
| 23193 | |||
| 23194 | Defaults to @samp{""}. | ||
| 23195 | |||
| 23196 | @end deftypevr | ||
| 23197 | |||
| 23198 | @deftypevr {@code{cgit-configuration} parameter} integer max-atom-items | ||
| 23199 | Number of items to display in atom feeds view. | ||
| 23200 | |||
| 23201 | Defaults to @samp{10}. | ||
| 23202 | |||
| 23203 | @end deftypevr | ||
| 23204 | |||
| 23205 | @deftypevr {@code{cgit-configuration} parameter} integer max-commit-count | ||
| 23206 | Number of entries to list per page in "log" view. | ||
| 23207 | |||
| 23208 | Defaults to @samp{50}. | ||
| 23209 | |||
| 23210 | @end deftypevr | ||
| 23211 | |||
| 23212 | @deftypevr {@code{cgit-configuration} parameter} integer max-message-length | ||
| 23213 | Number of commit message characters to display in "log" view. | ||
| 23214 | |||
| 23215 | Defaults to @samp{80}. | ||
| 23216 | |||
| 23217 | @end deftypevr | ||
| 23218 | |||
| 23219 | @deftypevr {@code{cgit-configuration} parameter} integer max-repo-count | ||
| 23220 | Specifies the number of entries to list per page on the repository index | ||
| 23221 | page. | ||
| 23222 | |||
| 23223 | Defaults to @samp{50}. | ||
| 23224 | |||
| 23225 | @end deftypevr | ||
| 23226 | |||
| 23227 | @deftypevr {@code{cgit-configuration} parameter} integer max-repodesc-length | ||
| 23228 | Specifies the maximum number of repo description characters to display on | ||
| 23229 | the repository index page. | ||
| 23230 | |||
| 23231 | Defaults to @samp{80}. | ||
| 23232 | |||
| 23233 | @end deftypevr | ||
| 23234 | |||
| 23235 | @deftypevr {@code{cgit-configuration} parameter} integer max-blob-size | ||
| 23236 | Specifies the maximum size of a blob to display HTML for in KBytes. | ||
| 23237 | |||
| 23238 | Defaults to @samp{0}. | ||
| 23239 | |||
| 23240 | @end deftypevr | ||
| 23241 | |||
| 23242 | @deftypevr {@code{cgit-configuration} parameter} string max-stats | ||
| 23243 | Maximum statistics period. Valid values are @samp{week},@samp{month}, | ||
| 23244 | @samp{quarter} and @samp{year}. | ||
| 23245 | |||
| 23246 | Defaults to @samp{""}. | ||
| 23247 | |||
| 23248 | @end deftypevr | ||
| 23249 | |||
| 23250 | @deftypevr {@code{cgit-configuration} parameter} mimetype-alist mimetype | ||
| 23251 | Mimetype for the specified filename extension. | ||
| 23252 | |||
| 23253 | Defaults to @samp{((gif "image/gif") (html "text/html") (jpg "image/jpeg") | ||
| 23254 | (jpeg "image/jpeg") (pdf "application/pdf") (png "image/png") (svg | ||
| 23255 | "image/svg+xml"))}. | ||
| 23256 | |||
| 23257 | @end deftypevr | ||
| 23258 | |||
| 23259 | @deftypevr {@code{cgit-configuration} parameter} file-object mimetype-file | ||
| 23260 | Specifies the file to use for automatic mimetype lookup. | ||
| 23261 | |||
| 23262 | Defaults to @samp{""}. | ||
| 23263 | |||
| 23264 | @end deftypevr | ||
| 23265 | |||
| 23266 | @deftypevr {@code{cgit-configuration} parameter} string module-link | ||
| 23267 | Text which will be used as the formatstring for a hyperlink when a submodule | ||
| 23268 | is printed in a directory listing. | ||
| 23269 | |||
| 23270 | Defaults to @samp{""}. | ||
| 23271 | |||
| 23272 | @end deftypevr | ||
| 23273 | |||
| 23274 | @deftypevr {@code{cgit-configuration} parameter} boolean nocache? | ||
| 23275 | If set to the value @samp{#t} caching will be disabled. | ||
| 23276 | |||
| 23277 | Defaults to @samp{#f}. | ||
| 23278 | |||
| 23279 | @end deftypevr | ||
| 23280 | |||
| 23281 | @deftypevr {@code{cgit-configuration} parameter} boolean noplainemail? | ||
| 23282 | If set to @samp{#t} showing full author email addresses will be disabled. | ||
| 23283 | |||
| 23284 | Defaults to @samp{#f}. | ||
| 23285 | |||
| 23286 | @end deftypevr | ||
| 23287 | |||
| 23288 | @deftypevr {@code{cgit-configuration} parameter} boolean noheader? | ||
| 23289 | Flag which, when set to @samp{#t}, will make cgit omit the standard header | ||
| 23290 | on all pages. | ||
| 23291 | |||
| 23292 | Defaults to @samp{#f}. | ||
| 23293 | |||
| 23294 | @end deftypevr | ||
| 23295 | |||
| 23296 | @deftypevr {@code{cgit-configuration} parameter} project-list project-list | ||
| 23297 | A list of subdirectories inside of @code{repository-directory}, relative to | ||
| 23298 | it, that should loaded as Git repositories. An empty list means that all | ||
| 23299 | subdirectories will be loaded. | ||
| 23300 | |||
| 23301 | Defaults to @samp{()}. | ||
| 23302 | |||
| 23303 | @end deftypevr | ||
| 23304 | |||
| 23305 | @deftypevr {@code{cgit-configuration} parameter} file-object readme | ||
| 23306 | Text which will be used as default value for @code{cgit-repo-readme}. | ||
| 23307 | |||
| 23308 | Defaults to @samp{""}. | ||
| 23309 | |||
| 23310 | @end deftypevr | ||
| 23311 | |||
| 23312 | @deftypevr {@code{cgit-configuration} parameter} boolean remove-suffix? | ||
| 23313 | If set to @code{#t} and @code{repository-directory} is enabled, if any | ||
| 23314 | repositories are found with a suffix of @code{.git}, this suffix will be | ||
| 23315 | removed for the URL and name. | ||
| 23316 | |||
| 23317 | Defaults to @samp{#f}. | ||
| 23318 | |||
| 23319 | @end deftypevr | ||
| 23320 | |||
| 23321 | @deftypevr {@code{cgit-configuration} parameter} integer renamelimit | ||
| 23322 | Maximum number of files to consider when detecting renames. | ||
| 23323 | |||
| 23324 | Defaults to @samp{-1}. | ||
| 23325 | |||
| 23326 | @end deftypevr | ||
| 23327 | |||
| 23328 | @deftypevr {@code{cgit-configuration} parameter} string repository-sort | ||
| 23329 | The way in which repositories in each section are sorted. | ||
| 23330 | |||
| 23331 | Defaults to @samp{""}. | ||
| 23332 | |||
| 23333 | @end deftypevr | ||
| 23334 | |||
| 23335 | @deftypevr {@code{cgit-configuration} parameter} robots-list robots | ||
| 23336 | Text used as content for the @code{robots} meta-tag. | ||
| 23337 | |||
| 23338 | Defaults to @samp{("noindex" "nofollow")}. | ||
| 23339 | |||
| 23340 | @end deftypevr | ||
| 23341 | |||
| 23342 | @deftypevr {@code{cgit-configuration} parameter} string root-desc | ||
| 23343 | Text printed below the heading on the repository index page. | ||
| 23344 | |||
| 23345 | Defaults to @samp{"a fast webinterface for the git dscm"}. | ||
| 23346 | |||
| 23347 | @end deftypevr | ||
| 23348 | |||
| 23349 | @deftypevr {@code{cgit-configuration} parameter} string root-readme | ||
| 23350 | The content of the file specified with this option will be included verbatim | ||
| 23351 | below thef "about" link on the repository index page. | ||
| 23352 | |||
| 23353 | Defaults to @samp{""}. | ||
| 23354 | |||
| 23355 | @end deftypevr | ||
| 23356 | |||
| 23357 | @deftypevr {@code{cgit-configuration} parameter} string root-title | ||
| 23358 | Text printed as heading on the repository index page. | ||
| 23359 | |||
| 23360 | Defaults to @samp{""}. | ||
| 23361 | |||
| 23362 | @end deftypevr | ||
| 23363 | |||
| 23364 | @deftypevr {@code{cgit-configuration} parameter} boolean scan-hidden-path | ||
| 23365 | If set to @samp{#t} and repository-directory is enabled, | ||
| 23366 | repository-directory will recurse into directories whose name starts with a | ||
| 23367 | period. Otherwise, repository-directory will stay away from such | ||
| 23368 | directories, considered as "hidden". Note that this does not apply to the | ||
| 23369 | ".git" directory in non-bare repos. | ||
| 23370 | |||
| 23371 | Defaults to @samp{#f}. | ||
| 23372 | |||
| 23373 | @end deftypevr | ||
| 23374 | |||
| 23375 | @deftypevr {@code{cgit-configuration} parameter} list snapshots | ||
| 23376 | Text which specifies the default set of snapshot formats that cgit generates | ||
| 23377 | links for. | ||
| 23378 | |||
| 23379 | Defaults to @samp{()}. | ||
| 23380 | |||
| 23381 | @end deftypevr | ||
| 23382 | |||
| 23383 | @deftypevr {@code{cgit-configuration} parameter} repository-directory repository-directory | ||
| 23384 | Name of the directory to scan for repositories (represents | ||
| 23385 | @code{scan-path}). | ||
| 23386 | |||
| 23387 | Defaults to @samp{"/srv/git"}. | ||
| 23388 | |||
| 23389 | @end deftypevr | ||
| 23390 | |||
| 23391 | @deftypevr {@code{cgit-configuration} parameter} string section | ||
| 23392 | The name of the current repository section - all repositories defined after | ||
| 23393 | this option will inherit the current section name. | ||
| 23394 | |||
| 23395 | Defaults to @samp{""}. | ||
| 23396 | |||
| 23397 | @end deftypevr | ||
| 23398 | |||
| 23399 | @deftypevr {@code{cgit-configuration} parameter} string section-sort | ||
| 23400 | Flag which, when set to @samp{1}, will sort the sections on the repository | ||
| 23401 | listing by name. | ||
| 23402 | |||
| 23403 | Defaults to @samp{""}. | ||
| 23404 | |||
| 23405 | @end deftypevr | ||
| 23406 | |||
| 23407 | @deftypevr {@code{cgit-configuration} parameter} integer section-from-path | ||
| 23408 | A number which, if defined prior to repository-directory, specifies how many | ||
| 23409 | path elements from each repo path to use as a default section name. | ||
| 23410 | |||
| 23411 | Defaults to @samp{0}. | ||
| 23412 | |||
| 23413 | @end deftypevr | ||
| 23414 | |||
| 23415 | @deftypevr {@code{cgit-configuration} parameter} boolean side-by-side-diffs? | ||
| 23416 | If set to @samp{#t} shows side-by-side diffs instead of unidiffs per | ||
| 23417 | default. | ||
| 23418 | |||
| 23419 | Defaults to @samp{#f}. | ||
| 23420 | |||
| 23421 | @end deftypevr | ||
| 23422 | |||
| 23423 | @deftypevr {@code{cgit-configuration} parameter} file-object source-filter | ||
| 23424 | Specifies a command which will be invoked to format plaintext blobs in the | ||
| 23425 | tree view. | ||
| 23426 | |||
| 23427 | Defaults to @samp{""}. | ||
| 23428 | |||
| 23429 | @end deftypevr | ||
| 23430 | |||
| 23431 | @deftypevr {@code{cgit-configuration} parameter} integer summary-branches | ||
| 23432 | Specifies the number of branches to display in the repository "summary" | ||
| 23433 | view. | ||
| 23434 | |||
| 23435 | Defaults to @samp{10}. | ||
| 23436 | |||
| 23437 | @end deftypevr | ||
| 23438 | |||
| 23439 | @deftypevr {@code{cgit-configuration} parameter} integer summary-log | ||
| 23440 | Specifies the number of log entries to display in the repository "summary" | ||
| 23441 | view. | ||
| 23442 | |||
| 23443 | Defaults to @samp{10}. | ||
| 23444 | |||
| 23445 | @end deftypevr | ||
| 23446 | |||
| 23447 | @deftypevr {@code{cgit-configuration} parameter} integer summary-tags | ||
| 23448 | Specifies the number of tags to display in the repository "summary" view. | ||
| 23449 | |||
| 23450 | Defaults to @samp{10}. | ||
| 23451 | |||
| 23452 | @end deftypevr | ||
| 23453 | |||
| 23454 | @deftypevr {@code{cgit-configuration} parameter} string strict-export | ||
| 23455 | Filename which, if specified, needs to be present within the repository for | ||
| 23456 | cgit to allow access to that repository. | ||
| 23457 | |||
| 23458 | Defaults to @samp{""}. | ||
| 23459 | |||
| 23460 | @end deftypevr | ||
| 23461 | |||
| 23462 | @deftypevr {@code{cgit-configuration} parameter} string virtual-root | ||
| 23463 | URL which, if specified, will be used as root for all cgit links. | ||
| 23464 | |||
| 23465 | Defaults to @samp{"/"}. | ||
| 23466 | |||
| 23467 | @end deftypevr | ||
| 23468 | |||
| 23469 | @deftypevr {@code{cgit-configuration} parameter} repository-cgit-configuration-list repositories | ||
| 23470 | A list of @dfn{cgit-repo} records to use with config. | ||
| 23471 | |||
| 23472 | Defaults to @samp{()}. | ||
| 23473 | |||
| 23474 | Available @code{repository-cgit-configuration} fields are: | ||
| 23475 | |||
| 23476 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-list snapshots | ||
| 23477 | A mask of snapshot formats for this repo that cgit generates links for, | ||
| 23478 | restricted by the global @code{snapshots} setting. | ||
| 23479 | |||
| 23480 | Defaults to @samp{()}. | ||
| 23481 | |||
| 23482 | @end deftypevr | ||
| 23483 | |||
| 23484 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object source-filter | ||
| 23485 | Override the default @code{source-filter}. | ||
| 23486 | |||
| 23487 | Defaults to @samp{""}. | ||
| 23488 | |||
| 23489 | @end deftypevr | ||
| 23490 | |||
| 23491 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string url | ||
| 23492 | The relative URL used to access the repository. | ||
| 23493 | |||
| 23494 | Defaults to @samp{""}. | ||
| 23495 | |||
| 23496 | @end deftypevr | ||
| 23497 | |||
| 23498 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object about-filter | ||
| 23499 | Override the default @code{about-filter}. | ||
| 23500 | |||
| 23501 | Defaults to @samp{""}. | ||
| 23502 | |||
| 23503 | @end deftypevr | ||
| 23504 | |||
| 23505 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string branch-sort | ||
| 23506 | Flag which, when set to @samp{age}, enables date ordering in the branch ref | ||
| 23507 | list, and when set to @samp{name} enables ordering by branch name. | ||
| 23508 | |||
| 23509 | Defaults to @samp{""}. | ||
| 23510 | |||
| 23511 | @end deftypevr | ||
| 23512 | |||
| 23513 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-list clone-url | ||
| 23514 | A list of URLs which can be used to clone repo. | ||
| 23515 | |||
| 23516 | Defaults to @samp{()}. | ||
| 23517 | |||
| 23518 | @end deftypevr | ||
| 23519 | |||
| 23520 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object commit-filter | ||
| 23521 | Override the default @code{commit-filter}. | ||
| 23522 | |||
| 23523 | Defaults to @samp{""}. | ||
| 23524 | |||
| 23525 | @end deftypevr | ||
| 23526 | |||
| 23527 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string commit-sort | ||
| 23528 | Flag which, when set to @samp{date}, enables strict date ordering in the | ||
| 23529 | commit log, and when set to @samp{topo} enables strict topological ordering. | ||
| 23530 | |||
| 23531 | Defaults to @samp{""}. | ||
| 23532 | |||
| 23533 | @end deftypevr | ||
| 23534 | |||
| 23535 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string defbranch | ||
| 23536 | The name of the default branch for this repository. If no such branch | ||
| 23537 | exists in the repository, the first branch name (when sorted) is used as | ||
| 23538 | default instead. By default branch pointed to by HEAD, or "master" if there | ||
| 23539 | is no suitable HEAD. | ||
| 23540 | |||
| 23541 | Defaults to @samp{""}. | ||
| 23542 | |||
| 23543 | @end deftypevr | ||
| 23544 | |||
| 23545 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string desc | ||
| 23546 | The value to show as repository description. | ||
| 23547 | |||
| 23548 | Defaults to @samp{""}. | ||
| 23549 | |||
| 23550 | @end deftypevr | ||
| 23551 | |||
| 23552 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string homepage | ||
| 23553 | The value to show as repository homepage. | ||
| 23554 | |||
| 23555 | Defaults to @samp{""}. | ||
| 23556 | |||
| 23557 | @end deftypevr | ||
| 23558 | |||
| 23559 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object email-filter | ||
| 23560 | Override the default @code{email-filter}. | ||
| 23561 | |||
| 23562 | Defaults to @samp{""}. | ||
| 23563 | |||
| 23564 | @end deftypevr | ||
| 23565 | |||
| 23566 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-commit-graph? | ||
| 23567 | A flag which can be used to disable the global setting | ||
| 23568 | @code{enable-commit-graph?}. | ||
| 23569 | |||
| 23570 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23571 | |||
| 23572 | @end deftypevr | ||
| 23573 | |||
| 23574 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-log-filecount? | ||
| 23575 | A flag which can be used to disable the global setting | ||
| 23576 | @code{enable-log-filecount?}. | ||
| 23577 | |||
| 23578 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23579 | |||
| 23580 | @end deftypevr | ||
| 23581 | |||
| 23582 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-log-linecount? | ||
| 23583 | A flag which can be used to disable the global setting | ||
| 23584 | @code{enable-log-linecount?}. | ||
| 23585 | |||
| 23586 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23587 | |||
| 23588 | @end deftypevr | ||
| 23589 | |||
| 23590 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-remote-branches? | ||
| 23591 | Flag which, when set to @code{#t}, will make cgit display remote branches in | ||
| 23592 | the summary and refs views. | ||
| 23593 | |||
| 23594 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23595 | |||
| 23596 | @end deftypevr | ||
| 23597 | |||
| 23598 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-subject-links? | ||
| 23599 | A flag which can be used to override the global setting | ||
| 23600 | @code{enable-subject-links?}. | ||
| 23601 | |||
| 23602 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23603 | |||
| 23604 | @end deftypevr | ||
| 23605 | |||
| 23606 | @deftypevr {@code{repository-cgit-configuration} parameter} maybe-repo-boolean enable-html-serving? | ||
| 23607 | A flag which can be used to override the global setting | ||
| 23608 | @code{enable-html-serving?}. | ||
| 23609 | |||
| 23610 | Der Vorgabewert ist @samp{disabled} (d.h.@: deaktiviert). | ||
| 23611 | |||
| 23612 | @end deftypevr | ||
| 23613 | |||
| 23614 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean hide? | ||
| 23615 | Flag which, when set to @code{#t}, hides the repository from the repository | ||
| 23616 | index. | ||
| 23617 | |||
| 23618 | Defaults to @samp{#f}. | ||
| 23619 | |||
| 23620 | @end deftypevr | ||
| 23621 | |||
| 23622 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean ignore? | ||
| 23623 | Flag which, when set to @samp{#t}, ignores the repository. | ||
| 23624 | |||
| 23625 | Defaults to @samp{#f}. | ||
| 23626 | |||
| 23627 | @end deftypevr | ||
| 23628 | |||
| 23629 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object logo | ||
| 23630 | URL which specifies the source of an image which will be used as a logo on | ||
| 23631 | this repo’s pages. | ||
| 23632 | |||
| 23633 | Defaults to @samp{""}. | ||
| 23634 | |||
| 23635 | @end deftypevr | ||
| 23636 | |||
| 23637 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string logo-link | ||
| 23638 | URL loaded when clicking on the cgit logo image. | ||
| 23639 | |||
| 23640 | Defaults to @samp{""}. | ||
| 23641 | |||
| 23642 | @end deftypevr | ||
| 23643 | |||
| 23644 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-file-object owner-filter | ||
| 23645 | Override the default @code{owner-filter}. | ||
| 23646 | |||
| 23647 | Defaults to @samp{""}. | ||
| 23648 | |||
| 23649 | @end deftypevr | ||
| 23650 | |||
| 23651 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string module-link | ||
| 23652 | Text which will be used as the formatstring for a hyperlink when a submodule | ||
| 23653 | is printed in a directory listing. The arguments for the formatstring are | ||
| 23654 | the path and SHA1 of the submodule commit. | ||
| 23655 | |||
| 23656 | Defaults to @samp{""}. | ||
| 23657 | |||
| 23658 | @end deftypevr | ||
| 23659 | |||
| 23660 | @deftypevr {@code{repository-cgit-configuration} parameter} module-link-path module-link-path | ||
| 23661 | Text which will be used as the formatstring for a hyperlink when a submodule | ||
| 23662 | with the specified subdirectory path is printed in a directory listing. | ||
| 23663 | |||
| 23664 | Defaults to @samp{()}. | ||
| 23665 | |||
| 23666 | @end deftypevr | ||
| 23667 | |||
| 23668 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string max-stats | ||
| 23669 | Override the default maximum statistics period. | ||
| 23670 | |||
| 23671 | Defaults to @samp{""}. | ||
| 23672 | |||
| 23673 | @end deftypevr | ||
| 23674 | |||
| 23675 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string name | ||
| 23676 | The value to show as repository name. | ||
| 23677 | |||
| 23678 | Defaults to @samp{""}. | ||
| 23679 | |||
| 23680 | @end deftypevr | ||
| 23681 | |||
| 23682 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string owner | ||
| 23683 | A value used to identify the owner of the repository. | ||
| 23684 | |||
| 23685 | Defaults to @samp{""}. | ||
| 23686 | |||
| 23687 | @end deftypevr | ||
| 23688 | |||
| 23689 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string path | ||
| 23690 | An absolute path to the repository directory. | ||
| 23691 | |||
| 23692 | Defaults to @samp{""}. | ||
| 23693 | |||
| 23694 | @end deftypevr | ||
| 23695 | |||
| 23696 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string readme | ||
| 23697 | A path (relative to repo) which specifies a file to include verbatim as the | ||
| 23698 | "About" page for this repo. | ||
| 23699 | |||
| 23700 | Defaults to @samp{""}. | ||
| 23701 | |||
| 23702 | @end deftypevr | ||
| 23703 | |||
| 23704 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-string section | ||
| 23705 | The name of the current repository section - all repositories defined after | ||
| 23706 | this option will inherit the current section name. | ||
| 23707 | |||
| 23708 | Defaults to @samp{""}. | ||
| 23709 | |||
| 23710 | @end deftypevr | ||
| 23711 | |||
| 23712 | @deftypevr {@code{repository-cgit-configuration} parameter} repo-list extra-options | ||
| 23713 | Extra options will be appended to cgitrc file. | ||
| 23714 | |||
| 23715 | Defaults to @samp{()}. | ||
| 23716 | |||
| 23717 | @end deftypevr | ||
| 23718 | |||
| 23719 | @end deftypevr | ||
| 23720 | |||
| 23721 | @deftypevr {@code{cgit-configuration} parameter} list extra-options | ||
| 23722 | Extra options will be appended to cgitrc file. | ||
| 23723 | |||
| 23724 | Defaults to @samp{()}. | ||
| 23725 | |||
| 23726 | @end deftypevr | ||
| 23727 | |||
| 23728 | |||
| 23729 | @c %end of fragment | ||
| 23730 | |||
| 23731 | However, it could be that you just want to get a @code{cgitrc} up and | ||
| 23732 | running. In that case, you can pass an @code{opaque-cgit-configuration} as | ||
| 23733 | a record to @code{cgit-service-type}. As its name indicates, an opaque | ||
| 23734 | configuration does not have easy reflective capabilities. | ||
| 23735 | |||
| 23736 | Available @code{opaque-cgit-configuration} fields are: | ||
| 23737 | |||
| 23738 | @deftypevr {@code{opaque-cgit-configuration} parameter} package cgit | ||
| 23739 | The cgit package. | ||
| 23740 | @end deftypevr | ||
| 23741 | |||
| 23742 | @deftypevr {@code{opaque-cgit-configuration} parameter} string string | ||
| 23743 | The contents of the @code{cgitrc}, as a string. | ||
| 23744 | @end deftypevr | ||
| 23745 | |||
| 23746 | For example, if your @code{cgitrc} is just the empty string, you could | ||
| 23747 | instantiate a cgit service like this: | ||
| 23748 | |||
| 23749 | @example | ||
| 23750 | (service cgit-service-type | ||
| 23751 | (opaque-cgit-configuration | ||
| 23752 | (cgitrc ""))) | ||
| 23753 | @end example | ||
| 23754 | |||
| 23755 | @subsubheading Gitolite-Dienst | ||
| 23756 | |||
| 23757 | @cindex Gitolite-Dienst | ||
| 23758 | @cindex Git, hosting | ||
| 23759 | @uref{http://gitolite.com/gitolite/, Gitolite} is a tool for hosting Git | ||
| 23760 | repositories on a central server. | ||
| 23761 | |||
| 23762 | Gitolite can handle multiple repositories and users, and supports flexible | ||
| 23763 | configuration of the permissions for the users on the repositories. | ||
| 23764 | |||
| 23765 | The following example will configure Gitolite using the default @code{git} | ||
| 23766 | user, and the provided SSH public key. | ||
| 23767 | |||
| 23768 | @example | ||
| 23769 | (service gitolite-service-type | ||
| 23770 | (gitolite-configuration | ||
| 23771 | (admin-pubkey (plain-file | ||
| 23772 | "yourname.pub" | ||
| 23773 | "ssh-rsa AAAA... guix@@example.com")))) | ||
| 23774 | @end example | ||
| 23775 | |||
| 23776 | Gitolite is configured through a special admin repository which you can | ||
| 23777 | clone, for example, if you setup Gitolite on @code{example.com}, you would | ||
| 23778 | run the following command to clone the admin repository. | ||
| 23779 | |||
| 23780 | @example | ||
| 23781 | git clone git@@example.com:gitolite-admin | ||
| 23782 | @end example | ||
| 23783 | |||
| 23784 | When the Gitolite service is activated, the provided @code{admin-pubkey} | ||
| 23785 | will be inserted in to the @file{keydir} directory in the gitolite-admin | ||
| 23786 | repository. If this results in a change in the repository, it will be | ||
| 23787 | committed using the message ``gitolite setup by GNU Guix''. | ||
| 23788 | |||
| 23789 | @deftp {Datentyp} gitolite-configuration | ||
| 23790 | Repräsentiert die Konfiguration vom @code{gitolite-service-type}. | ||
| 23791 | |||
| 23792 | @table @asis | ||
| 23793 | @item @code{package} (Vorgabe: @var{gitolite}) | ||
| 23794 | Welches Gitolite-Paket benutzt werden soll. | ||
| 23795 | |||
| 23796 | @item @code{user} (Vorgabe: @var{git}) | ||
| 23797 | User to use for Gitolite. This will be user that you use when accessing | ||
| 23798 | Gitolite over SSH. | ||
| 23799 | |||
| 23800 | @item @code{group} (Vorgabe: @var{git}) | ||
| 23801 | Group to use for Gitolite. | ||
| 23802 | |||
| 23803 | @item @code{home-directory} (Vorgabe: @var{"/var/lib/gitolite"}) | ||
| 23804 | Directory in which to store the Gitolite configuration and repositories. | ||
| 23805 | |||
| 23806 | @item @code{rc-file} (Vorgabe: @var{(gitolite-rc-file)}) | ||
| 23807 | A ``file-like'' object (@pxref{G-Ausdrücke, file-like objects}), | ||
| 23808 | representing the configuration for Gitolite. | ||
| 23809 | |||
| 23810 | @item @code{admin-pubkey} (Vorgabe: @var{#f}) | ||
| 23811 | A ``file-like'' object (@pxref{G-Ausdrücke, file-like objects}) used to | ||
| 23812 | setup Gitolite. This will be inserted in to the @file{keydir} directory | ||
| 23813 | within the gitolite-admin repository. | ||
| 23814 | |||
| 23815 | To specify the SSH key as a string, use the @code{plain-file} function. | ||
| 23816 | |||
| 23817 | @example | ||
| 23818 | (plain-file "yourname.pub" "ssh-rsa AAAA... guix@@example.com") | ||
| 23819 | @end example | ||
| 23820 | |||
| 23821 | @end table | ||
| 23822 | @end deftp | ||
| 23823 | |||
| 23824 | @deftp {Datentyp} gitolite-rc-file | ||
| 23825 | Repräsentiert die Gitolie-RC-Datei. | ||
| 23826 | |||
| 23827 | @table @asis | ||
| 23828 | @item @code{umask} (Vorgabe: @code{#o0077}) | ||
| 23829 | This controls the permissions Gitolite sets on the repositories and their | ||
| 23830 | contents. | ||
| 23831 | |||
| 23832 | A value like @code{#o0027} will give read access to the group used by | ||
| 23833 | Gitolite (by default: @code{git}). This is necessary when using Gitolite | ||
| 23834 | with software like cgit or gitweb. | ||
| 23835 | |||
| 23836 | @item @code{git-config-keys} (Vorgabe: @code{""}) | ||
| 23837 | Gitolite allows you to set git config values using the "config" | ||
| 23838 | keyword. This setting allows control over the config keys to accept. | ||
| 23839 | |||
| 23840 | @item @code{roles} (Vorgabe: @code{'(("READERS" . 1) ("WRITERS" . ))}) | ||
| 23841 | Set the role names allowed to be used by users running the perms command. | ||
| 23842 | |||
| 23843 | @item @code{enable} (default: @code{'("help" "desc" "info" "perms" "writable" "ssh-authkeys" "git-config" "daemon" "gitweb")}) | ||
| 23844 | This setting controls the commands and features to enable within Gitolite. | ||
| 23845 | |||
| 23846 | @end table | ||
| 23847 | @end deftp | ||
| 23848 | |||
| 23849 | |||
| 23850 | @node Spieldienste | ||
| 23851 | @subsection Spieldienste | ||
| 23852 | |||
| 23853 | @subsubheading The Battle for Wesnoth Service | ||
| 23854 | @cindex wesnothd | ||
| 23855 | @uref{https://wesnoth.org, The Battle for Wesnoth} is a fantasy, turn based | ||
| 23856 | tactical strategy game, with several single player campaigns, and | ||
| 23857 | multiplayer games (both networked and local). | ||
| 23858 | |||
| 23859 | @defvar {Scheme Variable} wesnothd-service-type | ||
| 23860 | Service type for the wesnothd service. Its value must be a | ||
| 23861 | @code{wesnothd-configuration} object. To run wesnothd in the default | ||
| 23862 | configuration, instantiate it as: | ||
| 23863 | |||
| 23864 | @example | ||
| 23865 | (service wesnothd-service-type) | ||
| 23866 | @end example | ||
| 23867 | @end defvar | ||
| 23868 | |||
| 23869 | @deftp {Data Type} wesnothd-configuration | ||
| 23870 | Data type representing the configuration of @command{wesnothd}. | ||
| 23871 | |||
| 23872 | @table @asis | ||
| 23873 | @item @code{package} (default: @code{wesnoth-server}) | ||
| 23874 | The wesnoth server package to use. | ||
| 23875 | |||
| 23876 | @item @code{port} (default: @code{15000}) | ||
| 23877 | The port to bind the server to. | ||
| 23878 | @end table | ||
| 23879 | @end deftp | ||
| 23880 | |||
| 23881 | @node Verschiedene Dienste | ||
| 23882 | @subsection Verschiedene Dienste | ||
| 23883 | |||
| 23884 | @cindex fingerprint | ||
| 23885 | @subsubheading Fingerabdrucklese-Dienst | ||
| 23886 | |||
| 23887 | The @code{(gnu services authentication)} module provides a DBus service to | ||
| 23888 | read and identify fingerprints via a fingerprint sensor. | ||
| 23889 | |||
| 23890 | @defvr {Scheme Variable} fprintd-service-type | ||
| 23891 | The service type for @command{fprintd}, which provides the fingerprint | ||
| 23892 | reading capability. | ||
| 23893 | |||
| 23894 | @example | ||
| 23895 | (service fprintd-service-type) | ||
| 23896 | @end example | ||
| 23897 | @end defvr | ||
| 23898 | |||
| 23899 | @cindex sysctl | ||
| 23900 | @subsubheading System Control Service | ||
| 23901 | |||
| 23902 | The @code{(gnu services sysctl)} provides a service to configure kernel | ||
| 23903 | parameters at boot. | ||
| 23904 | |||
| 23905 | @defvr {Scheme Variable} sysctl-service-type | ||
| 23906 | The service type for @command{sysctl}, which modifies kernel parameters | ||
| 23907 | under @file{/proc/sys/}. To enable IPv4 forwarding, it can be instantiated | ||
| 23908 | as: | ||
| 23909 | |||
| 23910 | @example | ||
| 23911 | (service sysctl-service-type | ||
| 23912 | (sysctl-configuration | ||
| 23913 | (settings '(("net.ipv4.ip_forward" . "1"))))) | ||
| 23914 | @end example | ||
| 23915 | @end defvr | ||
| 23916 | |||
| 23917 | @deftp {Data Type} sysctl-configuration | ||
| 23918 | The data type representing the configuration of @command{sysctl}. | ||
| 23919 | |||
| 23920 | @table @asis | ||
| 23921 | @item @code{sysctl} (default: @code{(file-append procps "/sbin/sysctl"}) | ||
| 23922 | The @command{sysctl} executable to use. | ||
| 23923 | |||
| 23924 | @item @code{settings} (default: @code{'()}) | ||
| 23925 | An association list specifies kernel parameters and their values. | ||
| 23926 | @end table | ||
| 23927 | @end deftp | ||
| 23928 | |||
| 23929 | @cindex pcscd | ||
| 23930 | @subsubheading PC/SC Smart Card Daemon Service | ||
| 23931 | |||
| 23932 | The @code{(gnu services security-token)} module provides the following | ||
| 23933 | service to run @command{pcscd}, the PC/SC Smart Card Daemon. | ||
| 23934 | @command{pcscd} is the daemon program for pcsc-lite and the MuscleCard | ||
| 23935 | framework. It is a resource manager that coordinates communications with | ||
| 23936 | smart card readers, smart cards and cryptographic tokens that are connected | ||
| 23937 | to the system. | ||
| 23938 | |||
| 23939 | @defvr {Scheme Variable} pcscd-service-type | ||
| 23940 | Service type for the @command{pcscd} service. Its value must be a | ||
| 23941 | @code{pcscd-configuration} object. To run pcscd in the default | ||
| 23942 | configuration, instantiate it as: | ||
| 23943 | |||
| 23944 | @example | ||
| 23945 | (service pcscd-service-type) | ||
| 23946 | @end example | ||
| 23947 | @end defvr | ||
| 23948 | |||
| 23949 | @deftp {Datentyp} pcscd-configuration | ||
| 23950 | Repräsentiert die Konfiguration von @command{pcscd}. | ||
| 23951 | |||
| 23952 | @table @asis | ||
| 23953 | @item @code{pcsc-lite} (Vorgabe: @code{pcsc-lite}) | ||
| 23954 | The pcsc-lite package that provides pcscd. | ||
| 23955 | @item @code{usb-drivers} (Vorgabe: @code{(list ccid)}) | ||
| 23956 | List of packages that provide USB drivers to pcscd. Drivers are expected to | ||
| 23957 | be under @file{pcsc/drivers} in the store directory of the package. | ||
| 23958 | @end table | ||
| 23959 | @end deftp | ||
| 23960 | |||
| 23961 | @cindex lirc | ||
| 23962 | @subsubheading Lirc Service | ||
| 23963 | |||
| 23964 | The @code{(gnu services lirc)} module provides the following service. | ||
| 23965 | |||
| 23966 | @deffn {Scheme Procedure} lirc-service [#:lirc lirc] @ | ||
| 23967 | [#:device #f] [#:driver #f] [#:config-file #f] @ [#:extra-options '()] | ||
| 23968 | Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that | ||
| 23969 | decodes infrared signals from remote controls. | ||
| 23970 | |||
| 23971 | Optionally, @var{device}, @var{driver} and @var{config-file} (configuration | ||
| 23972 | file name) may be specified. See @command{lircd} manual for details. | ||
| 23973 | |||
| 23974 | Finally, @var{extra-options} is a list of additional command-line options | ||
| 23975 | passed to @command{lircd}. | ||
| 23976 | @end deffn | ||
| 23977 | |||
| 23978 | @cindex spice | ||
| 23979 | @subsubheading Spice Service | ||
| 23980 | |||
| 23981 | The @code{(gnu services spice)} module provides the following service. | ||
| 23982 | |||
| 23983 | @deffn {Scheme Procedure} spice-vdagent-service [#:spice-vdagent] | ||
| 23984 | Returns a service that runs @url{http://www.spice-space.org,VDAGENT}, a | ||
| 23985 | daemon that enables sharing the clipboard with a vm and setting the guest | ||
| 23986 | display resolution when the graphical console window resizes. | ||
| 23987 | @end deffn | ||
| 23988 | |||
| 23989 | @cindex inputattach | ||
| 23990 | @subsubheading inputattach-Dienst | ||
| 23991 | |||
| 23992 | @cindex tablet input, for Xorg | ||
| 23993 | @cindex touchscreen input, for Xorg | ||
| 23994 | The @uref{https://linuxwacom.github.io/, inputattach} service allows you to | ||
| 23995 | use input devices such as Wacom tablets, touchscreens, or joysticks with the | ||
| 23996 | Xorg display server. | ||
| 23997 | |||
| 23998 | @deffn {Scheme-Variable} inputattach-service-type | ||
| 23999 | Type of a service that runs @command{inputattach} on a device and dispatches | ||
| 24000 | events from it. | ||
| 24001 | @end deffn | ||
| 24002 | |||
| 24003 | @deftp {Datentyp} inputattach-configuration | ||
| 24004 | @table @asis | ||
| 24005 | @item @code{device-type} (Vorgabe: @code{"wacom"}) | ||
| 24006 | The type of device to connect to. Run @command{inputattach --help}, from | ||
| 24007 | the @code{inputattach} package, to see the list of supported device types. | ||
| 24008 | |||
| 24009 | @item @code{device} (Vorgabe: @code{"/dev/ttyS0"}) | ||
| 24010 | The device file to connect to the device. | ||
| 24011 | |||
| 24012 | @item @code{log-file} (Vorgabe: @code{#f}) | ||
| 24013 | If true, this must be the name of a file to log messages to. | ||
| 24014 | @end table | ||
| 24015 | @end deftp | ||
| 24016 | |||
| 24017 | @subsection Dictionary Services | ||
| 24018 | @cindex dictionary | ||
| 24019 | The @code{(gnu services dict)} module provides the following service: | ||
| 24020 | |||
| 24021 | @deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)] | ||
| 24022 | Return a service that runs the @command{dicod} daemon, an implementation of | ||
| 24023 | DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}). | ||
| 24024 | |||
| 24025 | The optional @var{config} argument specifies the configuration for | ||
| 24026 | @command{dicod}, which should be a @code{<dicod-configuration>} object, by | ||
| 24027 | default it serves the GNU Collaborative International Dictonary of English. | ||
| 24028 | |||
| 24029 | You can add @command{open localhost} to your @file{~/.dico} file to make | ||
| 24030 | @code{localhost} the default server for @command{dico} client | ||
| 24031 | (@pxref{Initialization File,,, dico, GNU Dico Manual}). | ||
| 24032 | @end deffn | ||
| 24033 | |||
| 24034 | @deftp {Data Type} dicod-configuration | ||
| 24035 | Data type representing the configuration of dicod. | ||
| 24036 | |||
| 24037 | @table @asis | ||
| 24038 | @item @code{dico} (default: @var{dico}) | ||
| 24039 | Package object of the GNU Dico dictionary server. | ||
| 24040 | |||
| 24041 | @item @code{interfaces} (default: @var{'("localhost")}) | ||
| 24042 | This is the list of IP addresses and ports and possibly socket file names to | ||
| 24043 | listen to (@pxref{Server Settings, @code{listen} directive,, dico, GNU Dico | ||
| 24044 | Manual}). | ||
| 24045 | |||
| 24046 | @item @code{handlers} (default: @var{'()}) | ||
| 24047 | List of @code{<dicod-handler>} objects denoting handlers (module instances). | ||
| 24048 | |||
| 24049 | @item @code{databases} (default: @var{(list %dicod-database:gcide)}) | ||
| 24050 | List of @code{<dicod-database>} objects denoting dictionaries to be served. | ||
| 24051 | @end table | ||
| 24052 | @end deftp | ||
| 24053 | |||
| 24054 | @deftp {Data Type} dicod-handler | ||
| 24055 | Data type representing a dictionary handler (module instance). | ||
| 24056 | |||
| 24057 | @table @asis | ||
| 24058 | @item @code{name} | ||
| 24059 | Name of the handler (module instance). | ||
| 24060 | |||
| 24061 | @item @code{module} (default: @var{#f}) | ||
| 24062 | Name of the dicod module of the handler (instance). If it is @code{#f}, the | ||
| 24063 | module has the same name as the handler. (@pxref{Module,,, dico, GNU Dico | ||
| 24064 | Manual}). | ||
| 24065 | |||
| 24066 | @item @code{options} | ||
| 24067 | List of strings or gexps representing the arguments for the module handler | ||
| 24068 | @end table | ||
| 24069 | @end deftp | ||
| 24070 | |||
| 24071 | @deftp {Data Type} dicod-database | ||
| 24072 | Data type representing a dictionary database. | ||
| 24073 | |||
| 24074 | @table @asis | ||
| 24075 | @item @code{name} | ||
| 24076 | Name of the database, will be used in DICT commands. | ||
| 24077 | |||
| 24078 | @item @code{handler} | ||
| 24079 | Name of the dicod handler (module instance) used by this database | ||
| 24080 | (@pxref{Handlers,,, dico, GNU Dico Manual}). | ||
| 24081 | |||
| 24082 | @item @code{complex?} (default: @var{#f}) | ||
| 24083 | Whether the database configuration complex. The complex configuration will | ||
| 24084 | need a corresponding @code{<dicod-handler>} object, otherwise not. | ||
| 24085 | |||
| 24086 | @item @code{options} | ||
| 24087 | List of strings or gexps representing the arguments for the database | ||
| 24088 | (@pxref{Databases,,, dico, GNU Dico Manual}). | ||
| 24089 | @end table | ||
| 24090 | @end deftp | ||
| 24091 | |||
| 24092 | @defvr {Scheme Variable} %dicod-database:gcide | ||
| 24093 | A @code{<dicod-database>} object serving the GNU Collaborative International | ||
| 24094 | Dictionary of English using the @code{gcide} package. | ||
| 24095 | @end defvr | ||
| 24096 | |||
| 24097 | The following is an example @code{dicod-service} configuration. | ||
| 24098 | |||
| 24099 | @example | ||
| 24100 | (dicod-service #:config | ||
| 24101 | (dicod-configuration | ||
| 24102 | (handlers (list (dicod-handler | ||
| 24103 | (name "wordnet") | ||
| 24104 | (module "dictorg") | ||
| 24105 | (options | ||
| 24106 | (list #~(string-append "dbdir=" #$wordnet)))))) | ||
| 24107 | (databases (list (dicod-database | ||
| 24108 | (name "wordnet") | ||
| 24109 | (complex? #t) | ||
| 24110 | (handler "wordnet") | ||
| 24111 | (options '("database=wn"))) | ||
| 24112 | %dicod-database:gcide)))) | ||
| 24113 | @end example | ||
| 24114 | |||
| 24115 | @cindex Docker | ||
| 24116 | @subsubheading Docker-Dienst | ||
| 24117 | |||
| 24118 | Das Modul @code{(gnu services docker)} stellt den folgenden Dienst zur | ||
| 24119 | Verfügung. | ||
| 24120 | |||
| 24121 | @defvr {Scheme-Variable} docker-service-type | ||
| 24122 | |||
| 24123 | This is the type of the service that runs | ||
| 24124 | @url{http://www.docker.com,Docker}, a daemon that can execute application | ||
| 24125 | bundles (sometimes referred to as ``containers'') in isolated environments. | ||
| 24126 | |||
| 24127 | @end defvr | ||
| 24128 | |||
| 24129 | @deftp {Datentyp} docker-configuration | ||
| 24130 | Dies ist der Datentyp, der die Konfiguration von Docker und Containerd | ||
| 24131 | repräsentiert. | ||
| 24132 | |||
| 24133 | @table @asis | ||
| 24134 | |||
| 24135 | @item @code{package} (Vorgabe: @code{docker}) | ||
| 24136 | Das Docker-Paket, was benutzt werden soll. | ||
| 24137 | |||
| 24138 | @item @code{containerd} (Vorgabe: @var{containerd}) | ||
| 24139 | Das Containerd-Paket, was benutzt werden soll. | ||
| 24140 | |||
| 24141 | @end table | ||
| 24142 | @end deftp | ||
| 24143 | |||
| 24144 | @node Setuid-Programme | ||
| 24145 | @section Setuid-Programme | ||
| 24146 | |||
| 24147 | @cindex setuid-Programme | ||
| 24148 | Manche Programme müssen mit Administratorrechten (also den Berechtigungen | ||
| 24149 | des »root«-Benutzers) ausgeführt werden, selbst wenn Nutzer ohne besondere | ||
| 24150 | Berechtigungen sie starten. Ein bekanntes Beispiel ist das Programm | ||
| 24151 | @command{passwd}, womit Nutzer ihr Passwort ändern können, wozu das Programm | ||
| 24152 | auf die Dateien @file{/etc/passwd} und @file{/etc/shadow} zugreifen muss — | ||
| 24153 | was normalerweise nur der »root«-Nutzer darf, aus offensichtlichen Gründen | ||
| 24154 | der Informationssicherheit. Deswegen sind diese ausführbaren Programmdateien | ||
| 24155 | @dfn{setuid-root}, d.h.@: sie laufen immer mit den Administratorrechten des | ||
| 24156 | root-Nutzers, egal wer sie startet (siehe @ref{How Change Persona,,, libc, | ||
| 24157 | The GNU C Library Reference Manual} für mehr Informationen über den | ||
| 24158 | setuid-Mechanismus). | ||
| 24159 | |||
| 24160 | Der Store selbst kann @emph{keine} setuid-Programme enthalten: Das wäre eine | ||
| 24161 | Sicherheitslücke, weil dann jeder Nutzer auf dem System Ableitungen | ||
| 24162 | schreiben könnte, die in den Store solche Dateien einfügen würden (siehe | ||
| 24163 | @ref{Der Store}). Wir benutzen also einen anderen Mechanismus: Statt auf den | ||
| 24164 | ausführbaren Dateien im Store selbst deren setuid-Bit zu setzen, lassen wir | ||
| 24165 | den Systemadministrator @emph{deklarieren}, welche Programme mit setuid-root | ||
| 24166 | gestartet werden. | ||
| 24167 | |||
| 24168 | Das Feld @code{setuid-programs} einer @code{operating-system}-Deklaration | ||
| 24169 | enthält eine Liste von G-Ausdrücken, die die Namen der Programme angeben, | ||
| 24170 | die setuid-root sein sollen (siehe @ref{Das Konfigurationssystem nutzen}). Zum Beispiel kann das Programm @command{passwd}, was Teil des | ||
| 24171 | Shadow-Pakets ist, durch diesen G-Ausdruck bezeichnet werden (siehe | ||
| 24172 | @ref{G-Ausdrücke}): | ||
| 24173 | |||
| 24174 | @example | ||
| 24175 | #~(string-append #$shadow "/bin/passwd") | ||
| 24176 | @end example | ||
| 24177 | |||
| 24178 | Eine vorgegebene Menge von setuid-Programmen wird durch die Variable | ||
| 24179 | @code{%setuid-programs} aus dem Modul @code{(gnu system)} definiert. | ||
| 24180 | |||
| 24181 | @defvr {Scheme-Variable} %setuid-programs | ||
| 24182 | Eine Liste von G-Ausdrücken, die übliche Programme angeben, die setuid-root | ||
| 24183 | sein müssen. | ||
| 24184 | |||
| 24185 | Die Liste enthält Befehle wie @command{passwd}, @command{ping}, @command{su} | ||
| 24186 | und @command{sudo}. | ||
| 24187 | @end defvr | ||
| 24188 | |||
| 24189 | Intern erzeugt Guix die eigentlichen setuid-Programme im Verzeichnis | ||
| 24190 | @file{/run/setuid-programs}, wenn das System aktiviert wird. Die Dateien in | ||
| 24191 | diesem Verzeichnis verweisen auf die »echten« Binärdateien im Store. | ||
| 24192 | |||
| 24193 | @node X.509-Zertifikate | ||
| 24194 | @section X.509-Zertifikate | ||
| 24195 | |||
| 24196 | @cindex HTTPS, Zertifikate | ||
| 24197 | @cindex X.509-Zertifikate | ||
| 24198 | @cindex TLS | ||
| 24199 | Über HTTPS verfügbare Webserver (also HTTP mit gesicherter Transportschicht, | ||
| 24200 | englisch »Transport-Layer Security«, kurz TLS) senden Client-Programmen ein | ||
| 24201 | @dfn{X.509-Zertifikat}, mit dem der Client den Server dann | ||
| 24202 | @emph{authentifizieren} kann. Dazu verifiziert der Client, dass das | ||
| 24203 | Zertifikat des Servers von einer sogenannten Zertifizierungsstelle signiert | ||
| 24204 | wurde (englisch @dfn{Certificate Authority}, kurz CA). Damit er aber die | ||
| 24205 | Signatur der Zertifizierungsstelle verifizieren kann, muss jeder Client das | ||
| 24206 | Zertifikat der Zertifizierungsstelle besitzen. | ||
| 24207 | |||
| 24208 | Web-Browser wie GNU@tie{}IceCat liefern ihre eigenen CA-Zertifikate mit, | ||
| 24209 | damit sie von Haus aus Zertifikate verifizieren können. | ||
| 24210 | |||
| 24211 | Den meisten anderen Programmen, die HTTPS sprechen können — @command{wget}, | ||
| 24212 | @command{git}, @command{w3m} etc.@: — muss allerdings erst mitgeteilt | ||
| 24213 | werden, wo die CA-Zertifikate installiert sind. | ||
| 24214 | |||
| 24215 | @cindex @code{nss-certs} | ||
| 24216 | In Guix müssen Sie dazu ein Paket, das Zertifikate enthält, in das | ||
| 24217 | @code{packages}-Feld der @code{operating-system}-Deklaration des | ||
| 24218 | Betriebssystems hinzufügen (siehe @ref{»operating-system«-Referenz}). Guix | ||
| 24219 | liefert ein solches Paket mit, @code{nss-certs}, was als Teil von Mozillas | ||
| 24220 | »Network Security Services« angeboten wird. | ||
| 24221 | |||
| 24222 | Beachten Sie, dass es @emph{nicht} zu den @var{%base-packages} gehört, Sie | ||
| 24223 | es also ausdrücklich hinzufügen müssen. Das Verzeichnis | ||
| 24224 | @file{/etc/ssl/certs}, wo die meisten Anwendungen und Bibliotheken ihren | ||
| 24225 | Voreinstellungen entsprechend nach Zertifikaten suchen, verweist auf die | ||
| 24226 | global installierten Zertifikate. | ||
| 24227 | |||
| 24228 | Unprivilegierte Benutzer, wie die, die Guix auf einer Fremddistribution | ||
| 24229 | benutzen, können sich auch lokal ihre eigenen Pakete mit Zertifikaten in ihr | ||
| 24230 | Profil installieren. Eine Reihe von Umgebungsvariablen muss dazu definiert | ||
| 24231 | werden, damit Anwendungen und Bibliotheken wissen, wo diese Zertifikate zu | ||
| 24232 | finden sind. Und zwar folgt die OpenSSL-Bibliothek den Umgebungsvariablen | ||
| 24233 | @code{SSL_CERT_DIR} und @code{SSL_CERT_FILE}, manche Anwendungen benutzen | ||
| 24234 | stattdessen aber ihre eigenen Umgebungsvariablen. Das Versionskontrollsystem | ||
| 24235 | Git liest den Ort zum Beispiel aus der Umgebungsvariablen | ||
| 24236 | @code{GIT_SSL_CAINFO} aus. Sie würden typischerweise also so etwas | ||
| 24237 | ausführen: | ||
| 24238 | |||
| 24239 | @example | ||
| 24240 | $ guix package -i nss-certs | ||
| 24241 | $ export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" | ||
| 24242 | $ export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" | ||
| 24243 | $ export GIT_SSL_CAINFO="$SSL_CERT_FILE" | ||
| 24244 | @end example | ||
| 24245 | |||
| 24246 | Ein weiteres Beispiel ist R, was voraussetzt, dass die Umgebungsvariable | ||
| 24247 | @code{CURL_CA_BUNDLE} auf ein Zertifikatsbündel verweist, weshalb Sie etwas | ||
| 24248 | wie hier ausführen müssten: | ||
| 24249 | |||
| 24250 | @example | ||
| 24251 | $ guix package -i nss-certs | ||
| 24252 | $ export CURL_CA_BUNDLE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" | ||
| 24253 | @end example | ||
| 24254 | |||
| 24255 | Für andere Anwendungen möchten Sie die Namen der benötigten | ||
| 24256 | Umgebungsvariablen vielleicht in deren Dokumentation nachschlagen. | ||
| 24257 | |||
| 24258 | |||
| 24259 | @node Name Service Switch | ||
| 24260 | @section Name Service Switch | ||
| 24261 | |||
| 24262 | @cindex Name Service Switch | ||
| 24263 | @cindex NSS | ||
| 24264 | Das Modul @code{(gnu system nss)} enthält Anbindungen für die Konfiguration | ||
| 24265 | des @dfn{Name Service Switch} (NSS) der libc (siehe @ref{NSS Configuration | ||
| 24266 | File,,, libc, The GNU C Library Reference Manual}). Kurz gesagt ist der NSS | ||
| 24267 | ein Mechanismus, mit dem die libc um neue »Namens«-Auflösungsmethoden für | ||
| 24268 | Systemdatenbanken erweitert werden kann; dazu gehören Rechnernamen (auch | ||
| 24269 | bekannt als »Host«-Namen), Dienstnamen, Benutzerkonten und mehr (siehe | ||
| 24270 | @ref{Name Service Switch, System Databases and Name Service Switch,, libc, | ||
| 24271 | The GNU C Library Reference Manual}). | ||
| 24272 | |||
| 24273 | Die NSS-Konfiguration legt für jede Systemdatenbank fest, mit welcher | ||
| 24274 | Methode der Name nachgeschlagen (»aufgelöst«) werden kann und welche | ||
| 24275 | Methoden zusammenhängen — z.B.@: unter welchen Umständen der NSS es mit der | ||
| 24276 | nächsten Methode auf seiner Liste versuchen sollte. Die NSS-Konfiguration | ||
| 24277 | wird im Feld @code{name-service-switch} von | ||
| 24278 | @code{operating-system}-Deklarationen angegeben (siehe @ref{»operating-system«-Referenz, @code{name-service-switch}}). | ||
| 24279 | |||
| 24280 | @cindex nss-mdns | ||
| 24281 | @cindex .local, Rechnernamensauflösung | ||
| 24282 | Zum Beispiel konfigurieren die folgenden Deklarationen den NSS so, dass er | ||
| 24283 | das @uref{http://0pointer.de/lennart/projects/nss-mdns/, | ||
| 24284 | @code{nss-mdns}-Backend} benutzt, wodurch er auf @code{.local} endende | ||
| 24285 | Rechnernamen über Multicast-DNS (mDNS) auflöst: | ||
| 24286 | |||
| 24287 | @example | ||
| 24288 | (name-service-switch | ||
| 24289 | (hosts (list %files ;zuerst in /etc/hosts nachschlagen | ||
| 24290 | |||
| 24291 | ;; Wenn das keinen Erfolg hatte, es | ||
| 24292 | ;; mit 'mdns_minimal' versuchen. | ||
| 24293 | (name-service | ||
| 24294 | (name "mdns_minimal") | ||
| 24295 | |||
| 24296 | ;; 'mdns_minimal' ist die Autorität für | ||
| 24297 | ;; '.local'. Gibt es not-found ("nicht | ||
| 24298 | ;; gefunden") zurück, müssen wir die | ||
| 24299 | ;; nächsten Methoden gar nicht erst | ||
| 24300 | ;; versuchen. | ||
| 24301 | (reaction (lookup-specification | ||
| 24302 | (not-found => return)))) | ||
| 24303 | |||
| 24304 | ;; Ansonsten benutzen wir DNS. | ||
| 24305 | (name-service | ||
| 24306 | (name "dns")) | ||
| 24307 | |||
| 24308 | ;; Ein letzter Versuch mit dem | ||
| 24309 | ;; "vollständigen" 'mdns'. | ||
| 24310 | (name-service | ||
| 24311 | (name "mdns"))))) | ||
| 24312 | @end example | ||
| 24313 | |||
| 24314 | Keine Sorge: Die Variable @code{%mdns-host-lookup-nss} (siehe unten) enthält | ||
| 24315 | diese Konfiguration bereits. Statt das alles selst einzutippen, können Sie | ||
| 24316 | sie benutzen, wenn alles, was Sie möchten, eine funktionierende | ||
| 24317 | Namensauflösung für @code{.local}-Rechner ist. | ||
| 24318 | |||
| 24319 | Beachten Sie dabei, dass es zusätzlich zum Festlegen des | ||
| 24320 | @code{name-service-switch} in der @code{operating-system}-Deklaration auch | ||
| 24321 | erforderlich ist, den @code{avahi-service-type} zu benutzen (siehe | ||
| 24322 | @ref{Netzwerkdienste, @code{avahi-service-type}}). Es genügt auch, wenn | ||
| 24323 | Sie die @var{%desktop-services} benutzen, weil er darin enthalten ist (siehe | ||
| 24324 | @ref{Desktop-Dienste}). Dadurch wird @code{nss-mdns} für den Name Service | ||
| 24325 | Cache Daemon nutzbar (siehe @ref{Basisdienste, @code{nscd-service}}). | ||
| 24326 | |||
| 24327 | Um sich eine lange Konfiguration zu ersparen, können Sie auch einfach die | ||
| 24328 | folgenden Variablen für typische NSS-Konfigurationen benutzen. | ||
| 24329 | |||
| 24330 | @defvr {Scheme-Variable} %default-nss | ||
| 24331 | Die vorgegebene Konfiguration des Name Service Switch als ein | ||
| 24332 | @code{name-service-switch}-Objekt. | ||
| 24333 | @end defvr | ||
| 24334 | |||
| 24335 | @defvr {Scheme-Variable} %mdns-host-lookup-nss | ||
| 24336 | Die Name-Service-Switch-Konfiguration mit Unterstützung für | ||
| 24337 | Rechnernamensauflösung über »Multicast DNS« (mDNS) für auf @code{.local} | ||
| 24338 | endende Rechnernamen. | ||
| 24339 | @end defvr | ||
| 24340 | |||
| 24341 | Im Folgenden finden Sie eine Referenz, wie eine | ||
| 24342 | Name-Service-Switch-Konfiguration aussehen muss. Sie hat eine direkte | ||
| 24343 | Entsprechung zum Konfigurationsdateiformat der C-Bibliothek, lesen Sie | ||
| 24344 | weitere Informationen also bitte im Handbuch der C-Bibliothek nach (siehe | ||
| 24345 | @ref{NSS Configuration File,,, libc, The GNU C Library Reference | ||
| 24346 | Manual}). Gegenüber dem Konfigurationsdateiformat des libc-NSS bekommen Sie | ||
| 24347 | mit unserer Syntax nicht nur ein warm umklammerndes Gefühl, sondern auch | ||
| 24348 | eine statische Analyse: Wenn Sie Syntax- und Schreibfehler machen, werden | ||
| 24349 | Sie darüber benachrichtigt, sobald Sie @command{guix system} aufrufen. | ||
| 24350 | |||
| 24351 | @deftp {Datentyp} name-service-switch | ||
| 24352 | |||
| 24353 | Der Datentyp, der die Konfiguration des Name Service Switch (NSS) der libc | ||
| 24354 | repräsentiert. Jedes im Folgenden aufgeführte Feld repräsentiert eine der | ||
| 24355 | unterstützten Systemdatenbanken. | ||
| 24356 | |||
| 24357 | @table @code | ||
| 24358 | @item aliases | ||
| 24359 | @itemx ethers | ||
| 24360 | @itemx group | ||
| 24361 | @itemx gshadow | ||
| 24362 | @itemx hosts | ||
| 24363 | @itemx initgroups | ||
| 24364 | @itemx netgroup | ||
| 24365 | @itemx networks | ||
| 24366 | @itemx password | ||
| 24367 | @itemx public-key | ||
| 24368 | @itemx rpc | ||
| 24369 | @itemx services | ||
| 24370 | @itemx shadow | ||
| 24371 | Das sind die Systemdatenbanken, um die sich NSS kümmern kann. Jedes dieser | ||
| 24372 | Felder muss eine Liste aus @code{<name-service>}-Objekten sein (siehe | ||
| 24373 | unten). | ||
| 24374 | @end table | ||
| 24375 | @end deftp | ||
| 24376 | |||
| 24377 | @deftp {Datentyp} name-service | ||
| 24378 | |||
| 24379 | Der einen eigentlichen Namensdienst repräsentierende Datentyp zusammen mit | ||
| 24380 | der zugehörigen Auflösungsaktion. | ||
| 24381 | |||
| 24382 | @table @code | ||
| 24383 | @item name | ||
| 24384 | Eine Zeichenkette, die den Namensdienst bezeichnet (siehe @ref{Services in | ||
| 24385 | the NSS configuration,,, libc, The GNU C Library Reference Manual}). | ||
| 24386 | |||
| 24387 | Beachten Sie, dass hier aufgeführte Namensdienste für den nscd sichtbar sein | ||
| 24388 | müssen. Dazu übergeben Sie im Argument @code{#:name-services} des | ||
| 24389 | @code{nscd-service} die Liste der Pakete, die die entsprechenden | ||
| 24390 | Namensdienste anbieten (siehe @ref{Basisdienste, @code{nscd-service}}). | ||
| 24391 | |||
| 24392 | @item reaction | ||
| 24393 | Eine mit Hilfe des Makros @code{lookup-specification} angegebene Aktion | ||
| 24394 | (siehe @ref{Actions in the NSS configuration,,, libc, The GNU C Library | ||
| 24395 | Reference Manual}). Zum Beispiel: | ||
| 24396 | |||
| 24397 | @example | ||
| 24398 | (lookup-specification (unavailable => continue) | ||
| 24399 | (success => return)) | ||
| 24400 | @end example | ||
| 24401 | @end table | ||
| 24402 | @end deftp | ||
| 24403 | |||
| 24404 | @node Initiale RAM-Disk | ||
| 24405 | @section Initiale RAM-Disk | ||
| 24406 | |||
| 24407 | @cindex initrd | ||
| 24408 | @cindex initiale RAM-Disk | ||
| 24409 | Um ihn zu initialisieren (zu »bootstrappen«), wird für den Kernel | ||
| 24410 | Linux-Libre eine @dfn{initiale RAM-Disk} angegeben (kurz @dfn{initrd}). Eine | ||
| 24411 | initrd enthält ein temporäres Wurzeldateisystem sowie ein Skript zur | ||
| 24412 | Initialisierung. Letzteres ist dafür zuständig, das echte Wurzeldateisystem | ||
| 24413 | einzubinden und alle Kernel-Module zu laden, die dafür nötig sein könnten. | ||
| 24414 | |||
| 24415 | Mit dem Feld @code{initrd-modules} einer @code{operating-system}-Deklaration | ||
| 24416 | können Sie angeben, welche Kernel-Module für Linux-libre in der initrd | ||
| 24417 | verfügbar sein müssen. Insbesondere müssen hier die Module aufgeführt | ||
| 24418 | werden, um die Festplatte zu betreiben, auf der sich Ihre Wurzelpartition | ||
| 24419 | befindet — allerdings sollte der vorgegebene Wert der @code{initrd-modules} | ||
| 24420 | in dem meisten Fällen genügen. Wenn Sie aber zum Beispiel das Kernel-Modul | ||
| 24421 | @code{megaraid_sas} zusätzlich zu den vorgegebenen Modulen brauchen, um auf | ||
| 24422 | Ihr Wurzeldateisystem zugreifen zu können, würden Sie das so schreiben: | ||
| 24423 | |||
| 24424 | @example | ||
| 24425 | (operating-system | ||
| 24426 | ;; @dots{} | ||
| 24427 | (initrd-modules (cons "megaraid_sas" %base-initrd-modules))) | ||
| 24428 | @end example | ||
| 24429 | |||
| 24430 | @defvr {Scheme-Variable} %base-initrd-modules | ||
| 24431 | Der Vorgabewert für die Liste der Kernel-Module, die in der initrd enthalten | ||
| 24432 | sein sollen. | ||
| 24433 | @end defvr | ||
| 24434 | |||
| 24435 | Wenn Sie noch systemnähere Anpassungen durchführen wollen, können Sie im | ||
| 24436 | Feld @code{initrd} einer @code{operating-system}-Deklaration angeben, was | ||
| 24437 | für eine Art von initrd Sie benutzen möchten. Das Modul @code{(gnu system | ||
| 24438 | linux-initrd)} enthält drei Arten, eine initrd zu erstellen: die abstrakte | ||
| 24439 | Prozedur @code{base-initrd} und die systemnahen Prozeduren @code{raw-initrd} | ||
| 24440 | und @code{expression->initrd}. | ||
| 24441 | |||
| 24442 | Mit der Prozedur @code{base-initrd} sollten Sie die häufigsten | ||
| 24443 | Anwendungszwecke abdecken können. Wenn Sie zum Beispiel ein paar | ||
| 24444 | Kernel-Module zur Boot-Zeit laden lassen möchten, können Sie das | ||
| 24445 | @code{initrd}-Feld auf diese Art definieren: | ||
| 24446 | |||
| 24447 | @example | ||
| 24448 | (initrd (lambda (file-systems . rest) | ||
| 24449 | ;; Eine gewöhnliche initrd, aber das Netzwerk wird | ||
| 24450 | ;; mit den Parametern initialisiert, die QEMU | ||
| 24451 | ;; standardmäßig erwartet. | ||
| 24452 | (apply base-initrd file-systems | ||
| 24453 | #:qemu-networking? #t | ||
| 24454 | rest))) | ||
| 24455 | @end example | ||
| 24456 | |||
| 24457 | Die Prozedur @code{base-initrd} kann auch mit üblichen Anwendungszwecken | ||
| 24458 | umgehen, um das System als QEMU-Gastsystem zu betreiben oder als ein | ||
| 24459 | »Live«-System ohne ein dauerhaft gespeichertes Wurzeldateisystem. | ||
| 24460 | |||
| 24461 | Die Prozedur @code{base-initrd} baut auf der Prozedur @code{raw-initrd} | ||
| 24462 | auf. Anders als @code{base-initrd} hat @code{raw-initrd} keinerlei | ||
| 24463 | Zusatzfunktionalitäten: Es wird kein Versuch unternommen, für die initrd | ||
| 24464 | notwendige Kernel-Module und Pakete automatisch | ||
| 24465 | hinzuzunehmen. @code{raw-initrd} kann zum Beispiel benutzt werden, wenn ein | ||
| 24466 | Nutzer eine eigene Konfiguration des Linux-Kernels verwendet und die | ||
| 24467 | Standard-Kernel-Module, die mit @code{base-initrd} hinzugenommen würden, | ||
| 24468 | nicht verfügbar sind. | ||
| 24469 | |||
| 24470 | Die initiale RAM-Disk, wie sie von @code{base-initrd} oder @code{raw-initrd} | ||
| 24471 | erzeugt wird, richtet sich nach verschiedenen Optionen, die auf der | ||
| 24472 | Kernel-Befehlszeile übergeben werden (also über GRUBs @code{linux}-Befehl | ||
| 24473 | oder die @code{-append}-Befehlszeilenoption von QEMU). Erwähnt werden | ||
| 24474 | sollten: | ||
| 24475 | |||
| 24476 | @table @code | ||
| 24477 | @item --load=@var{boot} | ||
| 24478 | Die initiale RAM-Disk eine Datei @var{boot}, in der ein Scheme-Programm | ||
| 24479 | steht, laden lassen, nachdem das Wurzeldateisystem eingebunden wurde. | ||
| 24480 | |||
| 24481 | Guix übergibt mit dieser Befehlszeilenoption die Kontrolle an ein | ||
| 24482 | Boot-Programm, das die Dienstaktivierungsprogramme ausführt und anschließend | ||
| 24483 | den GNU@tie{}Shepherd startet, das Initialisierungssystem (»init«-System) | ||
| 24484 | von Guix System. | ||
| 24485 | |||
| 24486 | @item --root=@var{Wurzel} | ||
| 24487 | Das mit @var{Wurzel} bezeichnete Dateisystem als Wurzeldateisystem | ||
| 24488 | einbinden. @var{Wurzel} kann ein Geratename wie @code{/dev/sda1}, eine | ||
| 24489 | Dateisystembezeichnung (d.h.@: ein Dateisystem-»Label«) oder eine | ||
| 24490 | Dateisystem-UUID sein. | ||
| 24491 | |||
| 24492 | @item --system=@var{System} | ||
| 24493 | @file{/run/booted-system} und @file{/run/current-system} auf das | ||
| 24494 | @var{System} zeigen lassen. | ||
| 24495 | |||
| 24496 | @item modprobe.blacklist=@var{Module}@dots{} | ||
| 24497 | @cindex Kernel-Module, Sperrliste | ||
| 24498 | @cindex Sperrliste, von Kernel-Modulen | ||
| 24499 | Die initiale RAM-Disk sowie den Befehl @command{modprobe} (aus dem | ||
| 24500 | kmod-Paket) anweisen, das Laden der angegebenen @var{Module} zu | ||
| 24501 | verweigern. Als @var{Module} muss eine kommagetrennte Liste von | ||
| 24502 | Kernel-Modul-Namen angegeben werden — z.B.@: @code{usbkbd,9pnet}. | ||
| 24503 | |||
| 24504 | @item --repl | ||
| 24505 | Eine Lese-Auswerten-Schreiben-Schleife (englisch »Read-Eval-Print Loop«, | ||
| 24506 | kurz REPL) von der initialen RAM-Disk starten, bevor diese die Kernel-Module | ||
| 24507 | zu laden versucht und das Wurzeldateisystem einbindet. Unsere | ||
| 24508 | Marketingabteilung nennt das @dfn{boot-to-Guile}. Der Schemer in Ihnen wird | ||
| 24509 | das lieben. Siehe @ref{Using Guile Interactively,,, guile, GNU Guile | ||
| 24510 | Reference Manual} für mehr Informationen über die REPL von Guile. | ||
| 24511 | |||
| 24512 | @end table | ||
| 24513 | |||
| 24514 | Jetzt wo Sie wissen, was für Funktionalitäten eine durch @code{base-initrd} | ||
| 24515 | und @code{raw-initrd} erzeugte initiale RAM-Disk so haben kann, möchten Sie | ||
| 24516 | vielleicht auch wissen, wie man Sie benutzt und weiter anpasst: | ||
| 24517 | |||
| 24518 | @cindex initrd | ||
| 24519 | @cindex initiale RAM-Disk | ||
| 24520 | @deffn {Scheme-Prozedur} raw-initrd @var{Dateisysteme} @ | ||
| 24521 | [#:linux-modules '()] [#:mapped-devices '()] @ [#:keyboard-layout #f] @ | ||
| 24522 | [#:helper-packages '()] [#:qemu-networking? #f] [#:volatile-root? #f] | ||
| 24523 | Liefert eine Ableitung, die eine rohe (»raw«) initrd | ||
| 24524 | erstellt. @var{Dateisysteme} bezeichnet eine Liste von durch die initrd | ||
| 24525 | einzubindenden Dateisystemen, unter Umständen zusätzlich zum auf der | ||
| 24526 | Kernel-Befehlszeile mit @code{--root} angegebenen | ||
| 24527 | Wurzeldateisystem. @var{linux-modules} ist eine Liste von Kernel-Modulen, | ||
| 24528 | die zur Boot-Zeit geladen werden sollen. @var{mapped-devices} ist eine Liste | ||
| 24529 | von Gerätezuordnungen, die hergestellt sein müssen, bevor die unter | ||
| 24530 | @var{file-systems} aufgeführten Dateisysteme eingebunden werden (siehe | ||
| 24531 | @ref{Zugeordnete Geräte}). @var{helper-packages} ist eine Liste von Paketen, die | ||
| 24532 | in die initrd kopiert werden. Darunter kann @code{e2fsck/static} oder andere | ||
| 24533 | Pakete aufgeführt werden, mit denen durch die initrd das Wurzeldateisystem | ||
| 24534 | auf Fehler hin geprüft werden kann. | ||
| 24535 | |||
| 24536 | When true, @var{keyboard-layout} is a @code{<keyboard-layout>} record | ||
| 24537 | denoting the desired console keyboard layout. This is done before | ||
| 24538 | @var{mapped-devices} are set up and before @var{file-systems} are mounted | ||
| 24539 | such that, should the user need to enter a passphrase or use the REPL, this | ||
| 24540 | happens using the intended keyboard layout. | ||
| 24541 | |||
| 24542 | Wenn @var{qemu-networking?} wahr ist, wird eine Netzwerkverbindung mit den | ||
| 24543 | Standard-QEMU-Parametern hergestellt. Wenn @var{virtio?} wahr ist, werden | ||
| 24544 | zusätzliche Kernel-Module geladen, damit die initrd als ein QEMU-Gast | ||
| 24545 | paravirtualisierte Ein-/Ausgabetreiber benutzen kann. | ||
| 24546 | |||
| 24547 | Wenn @var{volatile-root?} wahr ist, ist Schreiben auf das Wurzeldateisystem | ||
| 24548 | möglich, aber Änderungen daran bleiben nicht erhalten. | ||
| 24549 | @end deffn | ||
| 24550 | |||
| 24551 | @deffn {Scheme-Prozedur} base-initrd @var{Dateisysteme} @ | ||
| 24552 | [#:mapped-devices '()] [#:keyboard-layout #f] @ [#:qemu-networking? #f] | ||
| 24553 | [#:volatile-root? #f] @ [#:linux-modules '()] Liefert eine allgemein | ||
| 24554 | anwendbare, generische initrd als dateiartiges Objekt mit den Kernel-Modulen | ||
| 24555 | aus @var{linux}. Die @var{file-systems} sind eine Liste von durch die initrd | ||
| 24556 | einzubindenden Dateisystemen, unter Umständen zusätzlich zum | ||
| 24557 | Wurzeldateisystem, das auf der Kernel-Befehlszeile mit @code{--root} | ||
| 24558 | angegeben wurde. Die @var{mapped-devices} sind eine Liste von | ||
| 24559 | Gerätezuordnungen, die hergestellt sein müssen, bevor die @var{file-systems} | ||
| 24560 | eingebunden werden. | ||
| 24561 | |||
| 24562 | When true, @var{keyboard-layout} is a @code{<keyboard-layout>} record | ||
| 24563 | denoting the desired console keyboard layout. This is done before | ||
| 24564 | @var{mapped-devices} are set up and before @var{file-systems} are mounted | ||
| 24565 | such that, should the user need to enter a passphrase or use the REPL, this | ||
| 24566 | happens using the intended keyboard layout. | ||
| 24567 | |||
| 24568 | @var{qemu-networking?} und @var{volatile-root?} verhalten sich wie bei | ||
| 24569 | @code{raw-initrd}. | ||
| 24570 | |||
| 24571 | In die initrd werden automatisch alle Kernel-Module eingefügt, die für die | ||
| 24572 | unter @var{file-systems} angegebenen Dateisysteme und die angegebenen | ||
| 24573 | Optionen nötig sind. Zusätzliche Kernel-Module können unter den | ||
| 24574 | @var{linux-modules} aufgeführt werden. Diese werden zur initrd hinzugefügt | ||
| 24575 | und zur Boot-Zeit in der Reihenfolge geladen, in der sie angegeben wurden. | ||
| 24576 | @end deffn | ||
| 24577 | |||
| 24578 | Selbstverständlich betten die hier erzeugten und benutzten initrds ein | ||
| 24579 | statisch gebundenes Guile ein und das Initialisierungsprogramm ist ein | ||
| 24580 | Guile-Programm. Dadurch haben wir viel Flexibilität. Die Prozedur | ||
| 24581 | @code{expression->initrd} erstellt eine solche initrd für ein an sie | ||
| 24582 | übergebenes Programm. | ||
| 24583 | |||
| 24584 | @deffn {Scheme-Prozedur} expression->initrd @var{G-Ausdruck} @ | ||
| 24585 | [#:guile %guile-static-stripped] [#:name "guile-initrd"] Liefert eine | ||
| 24586 | Linux-initrd (d.h.@: ein gzip-komprimiertes cpio-Archiv) als dateiartiges | ||
| 24587 | Objekt, in dem @var{guile} enthalten ist, womit der @var{G-Ausdruck} nach | ||
| 24588 | dem Booten ausgewertet wird. Alle vom @var{G-Ausdruck} referenzierten | ||
| 24589 | Ableitungen werden automatisch in die initrd kopiert. | ||
| 24590 | @end deffn | ||
| 24591 | |||
| 24592 | @node Bootloader-Konfiguration | ||
| 24593 | @section Bootloader-Konfiguration | ||
| 24594 | |||
| 24595 | @cindex bootloader | ||
| 24596 | @cindex Bootloader | ||
| 24597 | |||
| 24598 | Das Betriebssystem unterstützt mehrere Bootloader. Der gewünschte Bootloader | ||
| 24599 | wird mit der @code{bootloader-configuration}-Deklaration konfiguriert. Alle | ||
| 24600 | Felder dieser Struktur sind für alle Bootloader gleich außer dem einen Feld | ||
| 24601 | @code{bootloader}, das angibt, welcher Bootloader konfiguriert und | ||
| 24602 | installiert werden soll. | ||
| 24603 | |||
| 24604 | Manche der Bootloader setzen nicht alle Felder einer | ||
| 24605 | @code{bootloader-configuration} um. Zum Beispiel ignoriert der | ||
| 24606 | extlinux-Bootloader das @code{theme}-Feld, weil er keine eigenen Themen | ||
| 24607 | unterstützt. | ||
| 24608 | |||
| 24609 | @deftp {Datentyp} bootloader-configuration | ||
| 24610 | Der Typ der Deklaration einer Bootloader-Konfiguration. | ||
| 24611 | |||
| 24612 | @table @asis | ||
| 24613 | |||
| 24614 | @item @code{bootloader} | ||
| 24615 | @cindex EFI, Bootloader | ||
| 24616 | @cindex UEFI, Bootloader | ||
| 24617 | @cindex BIOS, Bootloader | ||
| 24618 | Der zu benutzende Bootloader als ein @code{bootloader}-Objekt. Zur Zeit | ||
| 24619 | werden @code{grub-bootloader}, @code{grub-efi-bootloader}, | ||
| 24620 | @code{extlinux-bootloader} und @code{u-boot-bootloader} unterstützt. | ||
| 24621 | |||
| 24622 | @vindex grub-efi-bootloader | ||
| 24623 | @code{grub-efi-bootloader} macht es möglich, auf modernen Systemen mit | ||
| 24624 | @dfn{Unified Extensible Firmware Interface} (UEFI) zu booten. Sie sollten | ||
| 24625 | das hier benutzen, wenn im Installationsabbild ein Verzeichnis | ||
| 24626 | @file{/sys/firmware/efi} vorhanden ist, wenn Sie davon auf Ihrem System | ||
| 24627 | booten. | ||
| 24628 | |||
| 24629 | @vindex grub-bootloader | ||
| 24630 | Mit @code{grub-bootloader} können Sie vor allem auf Intel-basierten | ||
| 24631 | Maschinen im alten »Legacy«-BIOS-Modus booten. | ||
| 24632 | |||
| 24633 | @cindex ARM, Bootloader | ||
| 24634 | @cindex AArch64, Bootloader | ||
| 24635 | Verfügbare Bootloader werden in den Modulen @code{(gnu bootloader @dots{})} | ||
| 24636 | beschrieben. Insbesondere enthält @code{(gnu bootloader u-boot)} | ||
| 24637 | Definitionen für eine Vielzahl von ARM- und AArch64-Systemen, die den | ||
| 24638 | @uref{http://www.denx.de/wiki/U-Boot/, U-Boot-Bootloader} benutzen. | ||
| 24639 | |||
| 24640 | @item @code{target} | ||
| 24641 | Eine Zeichenkette, die angibt, auf welches Ziel der Bootloader installiert | ||
| 24642 | werden soll. | ||
| 24643 | |||
| 24644 | Was das bedeutet, hängt vom jeweiligen Bootloader ab. Für | ||
| 24645 | @code{grub-bootloader} sollte hier zum Beispiel ein Gerätename angegeben | ||
| 24646 | werden, der vom @command{installer}-Befehl des Bootloaders verstanden wird, | ||
| 24647 | etwa @code{/dev/sda} oder @code{(hd0)} (siehe @ref{Invoking grub-install,,, | ||
| 24648 | grub, GNU GRUB Manual}). Für @code{grub-efi-bootloader} sollte der | ||
| 24649 | Einhängepunkt des EFI-Dateisystems angegeben werden, in der Regel | ||
| 24650 | @file{/boot/efi}. | ||
| 24651 | |||
| 24652 | @item @code{menu-entries} (Vorgabe: @code{()}) | ||
| 24653 | Eine möglicherweise leere Liste von @code{menu-entry}-Objekten (siehe | ||
| 24654 | unten), die für Menüeinträge stehen, die im Bootloader-Menü auftauchen | ||
| 24655 | sollen, zusätzlich zum aktuellen Systemeintrag und dem auf vorherige | ||
| 24656 | Systemgenerationen verweisenden Eintrag. | ||
| 24657 | |||
| 24658 | @item @code{default-entry} (Vorgabe: @code{0}) | ||
| 24659 | Die Position des standardmäßig ausgewählten Bootmenü-Eintrags. An Position 0 | ||
| 24660 | steht der Eintrag der aktuellen Systemgeneration. | ||
| 24661 | |||
| 24662 | @item @code{timeout} (Vorgabe: @code{5}) | ||
| 24663 | Wieviele Sekunden lang im Menü auf eine Tastatureingabe gewartet wird, bevor | ||
| 24664 | gebootet wird. 0 steht für sofortiges Booten, für -1 wird ohne | ||
| 24665 | Zeitbeschränkung gewartet. | ||
| 24666 | |||
| 24667 | @cindex Tastaturbelegung, beim Bootloader | ||
| 24668 | @item @code{keyboard-layout} (Vorgabe: @code{#f}) | ||
| 24669 | Wenn dies auf @code{#f} gesetzt ist, verwendet das Menü des Bootloaders | ||
| 24670 | (falls vorhanden) die Vorgabe-Tastaturbelegung, normalerweise | ||
| 24671 | US@tie{}English (»qwerty«). | ||
| 24672 | |||
| 24673 | Andernfalls muss es ein @code{keyboard-layout}-Objekt sein (siehe | ||
| 24674 | @ref{Tastaturbelegung}). | ||
| 24675 | |||
| 24676 | @quotation Anmerkung | ||
| 24677 | Dieses Feld wird derzeit von Bootloadern außer @code{grub} und | ||
| 24678 | @code{grub-efi} ignoriert. | ||
| 24679 | @end quotation | ||
| 24680 | |||
| 24681 | @item @code{theme} (Vorgabe: @var{#f}) | ||
| 24682 | Ein Objekt für das im Bootloader anzuzeigende Thema. Wird kein Thema | ||
| 24683 | angegeben, benutzen manche Bootloader vielleicht ein voreingestelltes Thema; | ||
| 24684 | GRUB zumindest macht es so. | ||
| 24685 | |||
| 24686 | @item @code{terminal-outputs} (Vorgabe: @code{'gfxterm}) | ||
| 24687 | Die Ausgabeterminals, die für das Boot-Menü des Bootloaders benutzt werden, | ||
| 24688 | als eine Liste von Symbolen. GRUB akzeptiert hier diese Werte: | ||
| 24689 | @code{console}, @code{serial}, @code{serial_@{0–3@}}, @code{gfxterm}, | ||
| 24690 | @code{vga_text}, @code{mda_text}, @code{morse} und @code{pkmodem}. Dieses | ||
| 24691 | Feld entspricht der GRUB-Variablen @code{GRUB_TERMINAL_OUTPUT} (siehe | ||
| 24692 | @ref{Simple configuration,,, grub,GNU GRUB manual}). | ||
| 24693 | |||
| 24694 | @item @code{terminal-inputs} (Vorgabe: @code{'()}) | ||
| 24695 | Die Eingabeterminals, die für das Boot-Menü des Bootloaders benutzt werden, | ||
| 24696 | als eine Liste von Symbolen. GRUB verwendet hier das zur Laufzeit bestimmte | ||
| 24697 | Standardterminal. GRUB akzeptiert sonst diese Werte: @code{console}, | ||
| 24698 | @code{serial}, @code{serial_@{0-3@}}, @code{at_keyboard} und | ||
| 24699 | @code{usb_keyboard}. Dieses Feld entspricht der GRUB-Variablen | ||
| 24700 | @code{GRUB_TERMINAL_INPUT} (siehe @ref{Simple configuration,,, grub,GNU GRUB | ||
| 24701 | manual}). | ||
| 24702 | |||
| 24703 | @item @code{serial-unit} (Vorgabe: @code{#f}) | ||
| 24704 | Die serielle Einheit, die der Bootloader benutzt, als eine ganze Zahl | ||
| 24705 | zwischen 0 und 3, einschließlich. Für GRUB wird sie automatisch zur Laufzeit | ||
| 24706 | ausgewählt; derzeit wählt GRUB die 0 aus, die COM1 entspricht (siehe | ||
| 24707 | @ref{Serial terminal,,, grub,GNU GRUB manual}). | ||
| 24708 | |||
| 24709 | @item @code{serial-speed} (Vorgabe: @code{#f}) | ||
| 24710 | Die Geschwindigkeit der seriellen Schnittstelle als eine ganze Zahl. GRUB | ||
| 24711 | bestimmt den Wert standardmäßig zur Laufzeit; derzeit wählt GRUB | ||
| 24712 | 9600@tie{}bps (siehe @ref{Serial terminal,,, grub,GNU GRUB manual}). | ||
| 24713 | @end table | ||
| 24714 | |||
| 24715 | @end deftp | ||
| 24716 | |||
| 24717 | @cindex Dual-Boot | ||
| 24718 | @cindex Bootmenü | ||
| 24719 | Sollten Sie zusätzliche Bootmenü-Einträge über das oben beschriebene | ||
| 24720 | @code{menu-entries}-Feld hinzufügen möchten, müssen Sie diese mit der | ||
| 24721 | @code{menu-entry}-Form erzeugen. Stellen Sie sich zum Beispiel vor, Sie | ||
| 24722 | wollten noch eine andere Distribution booten können (schwer vorstellbar!), | ||
| 24723 | dann könnten Sie einen Menüeintrag wie den Folgenden definieren: | ||
| 24724 | |||
| 24725 | @example | ||
| 24726 | (menu-entry | ||
| 24727 | (label "Die _andere_ Distribution") | ||
| 24728 | (linux "/boot/old/vmlinux-2.6.32") | ||
| 24729 | (linux-arguments '("root=/dev/sda2")) | ||
| 24730 | (initrd "/boot/old/initrd")) | ||
| 24731 | @end example | ||
| 24732 | |||
| 24733 | Details finden Sie unten. | ||
| 24734 | |||
| 24735 | @deftp {Datentyp} menu-entry | ||
| 24736 | Der Typ eines Eintrags im Bootloadermenü. | ||
| 24737 | |||
| 24738 | @table @asis | ||
| 24739 | |||
| 24740 | @item @code{label} | ||
| 24741 | Die Beschriftung, die im Menü gezeigt werden soll — z.B.@: @code{"GNU"}. | ||
| 24742 | |||
| 24743 | @item @code{linux} | ||
| 24744 | Das Linux-Kernel-Abbild, was gebootet werden soll, zum Beispiel: | ||
| 24745 | |||
| 24746 | @example | ||
| 24747 | (file-append linux-libre "/bzImage") | ||
| 24748 | @end example | ||
| 24749 | |||
| 24750 | Für GRUB kann hier auch ein Gerät ausdrücklich zum Dateipfad angegeben | ||
| 24751 | werden, unter Verwendung von GRUBs Konventionen zur Gerätebenennung (siehe | ||
| 24752 | @ref{Naming convention,,, grub, GNU GRUB manual}), zum Beispiel: | ||
| 24753 | |||
| 24754 | @example | ||
| 24755 | "(hd0,msdos1)/boot/vmlinuz" | ||
| 24756 | @end example | ||
| 24757 | |||
| 24758 | Wenn das Gerät auf diese Weise ausdrücklich angegeben wird, wird das | ||
| 24759 | @code{device}-Feld gänzlich ignoriert. | ||
| 24760 | |||
| 24761 | @item @code{linux-arguments} (Vorgabe: @code{()}) | ||
| 24762 | Die Liste zusätzlicher Linux-Kernel-Befehlszeilenargumente — z.B.@: | ||
| 24763 | @code{("console=ttyS0")}. | ||
| 24764 | |||
| 24765 | @item @code{initrd} | ||
| 24766 | Ein G-Ausdruck oder eine Zeichenkette, die den Dateinamen der initialen | ||
| 24767 | RAM-Disk angibt, die benutzt werden soll (siehe @ref{G-Ausdrücke}). | ||
| 24768 | @item @code{device} (Vorgabe: @code{#f}) | ||
| 24769 | Das Gerät, auf dem Kernel und initrd zu finden sind — d.h.@: bei GRUB die | ||
| 24770 | Wurzel (@dfn{root}) dieses Menüeintrags (siehe @ref{root,,, grub, GNU GRUB | ||
| 24771 | manual}). | ||
| 24772 | |||
| 24773 | Dies kann eine Dateisystembezeichnung (als Zeichenkette), eine | ||
| 24774 | Dateisystem-UUID (als Bytevektor, siehe @ref{Dateisysteme}) oder @code{#f} | ||
| 24775 | sein, im letzten Fall wird der Bootloader auf dem Gerät suchen, das die vom | ||
| 24776 | @code{linux}-Feld benannte Datei enthält (siehe @ref{search,,, grub, GNU | ||
| 24777 | GRUB manual}). Ein vom Betriebssystem vergebener Gerätename wie | ||
| 24778 | @file{/dev/sda1} ist aber @emph{nicht} erlaubt. | ||
| 24779 | |||
| 24780 | @end table | ||
| 24781 | @end deftp | ||
| 24782 | |||
| 24783 | @c FIXME: Write documentation once it's stable. | ||
| 24784 | For now only GRUB has theme support. GRUB themes are created using the | ||
| 24785 | @code{grub-theme} form, which is not documented yet. | ||
| 24786 | |||
| 24787 | @defvr {Scheme Variable} %default-theme | ||
| 24788 | Das vorgegebene GRUB-Thema, das vom Betriebssystem benutzt wird, wenn kein | ||
| 24789 | @code{theme}-Feld im @code{bootloader-configuration}-Verbundsobjekt | ||
| 24790 | angegeben wurde. | ||
| 24791 | |||
| 24792 | Es wird von einem feschen Hintergrundbild begleitet, das die Logos von GNU | ||
| 24793 | und Guix zeigt. | ||
| 24794 | @end defvr | ||
| 24795 | |||
| 24796 | |||
| 24797 | @node Aufruf von guix system | ||
| 24798 | @section @code{guix system} aufrufen | ||
| 24799 | |||
| 24800 | Sobald Sie eine Betriebssystemdeklaration geschrieben haben, wie wir sie in | ||
| 24801 | den vorangehenden Abschnitten gesehen haben, kann diese @dfn{instanziiert} | ||
| 24802 | werden, indem Sie den Befehl @command{guix system} | ||
| 24803 | aufrufen. Zusammengefasst: | ||
| 24804 | |||
| 24805 | @example | ||
| 24806 | guix system @var{Optionen}@dots{} @var{Aktion} @var{Datei} | ||
| 24807 | @end example | ||
| 24808 | |||
| 24809 | @var{Datei} muss der Name einer Datei sein, in der eine | ||
| 24810 | Betriebssystemdeklaration als @code{operating-system}-Objekt | ||
| 24811 | steht. @var{Aktion} gibt an, wie das Betriebssystem instanziiert | ||
| 24812 | wird. Derzeit werden folgende Werte dafür unterstützt: | ||
| 24813 | |||
| 24814 | @table @code | ||
| 24815 | @item search | ||
| 24816 | Verfügbare Diensttypendefinitionen anzeigen, die zum angegebenen regulären | ||
| 24817 | Ausdruck passen, sortiert nach Relevanz: | ||
| 24818 | |||
| 24819 | @example | ||
| 24820 | $ guix system search console font | ||
| 24821 | name: console-fonts | ||
| 24822 | location: gnu/services/base.scm:729:2 | ||
| 24823 | extends: shepherd-root | ||
| 24824 | description: Install the given fonts on the specified ttys (fonts are | ||
| 24825 | + per virtual console on GNU/Linux). The value of this service is a list | ||
| 24826 | + of tty/font pairs like: | ||
| 24827 | + | ||
| 24828 | + '(("tty1" . "LatGrkCyr-8x16")) | ||
| 24829 | relevance: 20 | ||
| 24830 | |||
| 24831 | name: mingetty | ||
| 24832 | location: gnu/services/base.scm:1048:2 | ||
| 24833 | extends: shepherd-root | ||
| 24834 | description: Provide console login using the `mingetty' program. | ||
| 24835 | relevance: 2 | ||
| 24836 | |||
| 24837 | name: login | ||
| 24838 | location: gnu/services/base.scm:775:2 | ||
| 24839 | extends: pam | ||
| 24840 | description: Provide a console log-in service as specified by its | ||
| 24841 | + configuration value, a `login-configuration' object. | ||
| 24842 | relevance: 2 | ||
| 24843 | |||
| 24844 | @dots{} | ||
| 24845 | @end example | ||
| 24846 | |||
| 24847 | Wie auch bei @command{guix package --search} wird das Ergebnis im | ||
| 24848 | @code{recutils}-Format geliefert, so dass es leicht ist, die Ausgabe zu | ||
| 24849 | filtern (siehe @ref{Top, GNU recutils databases,, recutils, GNU recutils | ||
| 24850 | manual}). | ||
| 24851 | |||
| 24852 | @item reconfigure | ||
| 24853 | Das in der @var{Datei} beschriebene Betriebssystem erstellen, aktivieren und | ||
| 24854 | zu ihm wechseln@footnote{Diese Aktion (und die dazu ähnlichen Aktionen | ||
| 24855 | @code{switch-generation} und @code{roll-back}) sind nur auf Systemen | ||
| 24856 | nutzbar, auf denen »Guix System« bereits läuft.}. | ||
| 24857 | |||
| 24858 | Dieser Befehl setzt die in der @var{Datei} festgelegte Konfiguration | ||
| 24859 | vollständig um: Benutzerkonten, Systemdienste, die Liste globaler Pakete, | ||
| 24860 | setuid-Programme und so weiter. Der Befehl startet die in der @var{Datei} | ||
| 24861 | angegebenen Systemdienste, die aktuell nicht laufen; bei aktuell laufenden | ||
| 24862 | Diensten wird sichergestellt, dass sie aktualisiert werden, sobald sie das | ||
| 24863 | nächste Mal angehalten wurden (z.B.@: durch @code{herd stop X} oder | ||
| 24864 | @code{herd restart X}). | ||
| 24865 | |||
| 24866 | Dieser Befehl erzeugt eine neue Generation, deren Nummer (wie @command{guix | ||
| 24867 | system list-generations} sie anzeigt) um eins größer als die der aktuellen | ||
| 24868 | Generation ist. Wenn die so nummerierte Generation bereits existiert, wird | ||
| 24869 | sie überschrieben. Dieses Verhalten entspricht dem von @command{guix | ||
| 24870 | package} (siehe @ref{Aufruf von guix package}). | ||
| 24871 | |||
| 24872 | Des Weiteren wird für den Bootloader ein Menüeintrag für die neue | ||
| 24873 | Betriebssystemkonfiguration hinzugefügt, außer die Befehlszeilenoption | ||
| 24874 | @option{--no-bootloader} wurde übergeben. Bei GRUB werden Einträge für | ||
| 24875 | ältere Konfigurationen in ein Untermenü verschoben, so dass Sie auch eine | ||
| 24876 | ältere Systemgeneration beim Booten noch hochfahren können, falls es | ||
| 24877 | notwendig wird. | ||
| 24878 | |||
| 24879 | @quotation Anmerkung | ||
| 24880 | @c The paragraph below refers to the problem discussed at | ||
| 24881 | @c <http://lists.gnu.org/archive/html/guix-devel/2014-08/msg00057.html>. | ||
| 24882 | Es ist sehr zu empfehlen, @command{guix pull} einmal auszuführen, bevor Sie | ||
| 24883 | @command{guix system reconfigure} zum ersten Mal aufrufen (siehe | ||
| 24884 | @ref{Aufruf von guix pull}). Wenn Sie das nicht tun, könnten Sie nach dem | ||
| 24885 | Abschluss von @command{reconfigure} eine ältere Version von Guix vorfinden, | ||
| 24886 | als Sie vorher hatten. | ||
| 24887 | @end quotation | ||
| 24888 | |||
| 24889 | @item switch-generation | ||
| 24890 | @cindex Generationen | ||
| 24891 | Zu einer bestehenden Systemgeneration wechseln. Diese Aktion wechselt das | ||
| 24892 | Systemprofil atomar auf die angegebene Systemgeneration. Hiermit werden auch | ||
| 24893 | die bestehenden Menüeinträge des Bootloaders umgeordnet. Der Menüeintrag für | ||
| 24894 | die angegebene Systemgeneration wird voreingestellt und die Einträge der | ||
| 24895 | anderen Generationen werden in ein Untermenü verschoben, sofern der | ||
| 24896 | verwendete Bootloader dies unterstützt. Das nächste Mal, wenn das System | ||
| 24897 | gestartet wird, wird die hier angegebene Systemgeneration hochgefahren. | ||
| 24898 | |||
| 24899 | Der Bootloader selbst wird durch diesen Befehl @emph{nicht} neu | ||
| 24900 | installiert. Es wird also lediglich der bereits installierte Bootloader mit | ||
| 24901 | einer neuen Konfigurationsdatei benutzt werden. | ||
| 24902 | |||
| 24903 | Die Zielgeneration kann ausdrücklich über ihre Generationsnummer angegeben | ||
| 24904 | werden. Zum Beispiel würde folgender Aufruf einen Wechsel zur | ||
| 24905 | Systemgeneration 7 bewirken: | ||
| 24906 | |||
| 24907 | @example | ||
| 24908 | guix system switch-generation 7 | ||
| 24909 | @end example | ||
| 24910 | |||
| 24911 | Die Zielgeneration kann auch relativ zur aktuellen Generation angegeben | ||
| 24912 | werden, in der Form @code{+N} oder @code{-N}, wobei @code{+3} zum Beispiel | ||
| 24913 | »3 Generationen weiter als die aktuelle Generation« bedeuten würde und | ||
| 24914 | @code{-1} »1 Generation vor der aktuellen Generation« hieße. Wenn Sie einen | ||
| 24915 | negativen Wert wie @code{-1} angeben, müssen Sie @code{--} der | ||
| 24916 | Befehlszeilenoption voranstellen, damit die negative Zahl nicht selbst als | ||
| 24917 | Befehlszeilenoption aufgefasst wird. Zum Beispiel: | ||
| 24918 | |||
| 24919 | @example | ||
| 24920 | guix system switch-generation -- -1 | ||
| 24921 | @end example | ||
| 24922 | |||
| 24923 | Zur Zeit bewirkt ein Aufruf dieser Aktion @emph{nur} einen Wechsel des | ||
| 24924 | Systemprofils auf eine bereits existierende Generation und ein Umordnen der | ||
| 24925 | Bootloader-Menüeinträge. Um die Ziel-Systemgeneration aber tatsächlich zu | ||
| 24926 | benutzen, müssen Sie Ihr System neu hochfahren, nachdem Sie diese Aktion | ||
| 24927 | ausgeführt haben. In einer zukünftigen Version von Guix wird diese Aktion | ||
| 24928 | einmal dieselben Dinge tun, wie @command{reconfigure}, also etwa Dienste | ||
| 24929 | aktivieren und deaktivieren. | ||
| 24930 | |||
| 24931 | Diese Aktion schlägt fehl, wenn die angegebene Generation nicht existiert. | ||
| 24932 | |||
| 24933 | @item roll-back | ||
| 24934 | @cindex rücksetzen | ||
| 24935 | Zur vorhergehenden Systemgeneration wechseln. Wenn das System das nächste | ||
| 24936 | Mal hochgefahren wird, wird es die vorhergehende Systemgeneration | ||
| 24937 | benutzen. Dies ist die Umkehrung von @command{reconfigure} und tut genau | ||
| 24938 | dasselbe, wie @command{switch-generation} mit dem Argument @code{-1} | ||
| 24939 | aufzurufen. | ||
| 24940 | |||
| 24941 | Wie auch bei @command{switch-generation} müssen Sie derzeit, nachdem Sie | ||
| 24942 | diese Aktion aufgerufen haben, Ihr System neu starten, um die vorhergehende | ||
| 24943 | Systemgeneration auch tatsächlich zu benutzen. | ||
| 24944 | |||
| 24945 | @item delete-generations | ||
| 24946 | @cindex Löschen von Systemgenerationen | ||
| 24947 | @cindex Platz sparen | ||
| 24948 | Systemgenerationen löschen, wodurch diese zu Kandidaten für den Müllsammler | ||
| 24949 | werden (siehe @ref{Aufruf von guix gc} für Informationen, wie Sie den | ||
| 24950 | »Müllsammler« laufen lassen). | ||
| 24951 | |||
| 24952 | Es funktioniert auf die gleiche Weise wie @command{guix package | ||
| 24953 | --delete-generations} (siehe @ref{Aufruf von guix package, | ||
| 24954 | @code{--delete-generations}}). Wenn keine Argumente angegeben werden, werden | ||
| 24955 | alle Systemgenerationen außer der aktuellen gelöscht: | ||
| 24956 | |||
| 24957 | @example | ||
| 24958 | guix system delete-generations | ||
| 24959 | @end example | ||
| 24960 | |||
| 24961 | Sie können auch eine Auswahl treffen, welche Generationen Sie löschen | ||
| 24962 | möchten. Das folgende Beispiel hat die Löschung aller Systemgenerationen zur | ||
| 24963 | Folge, die älter als zwei Monate sind: | ||
| 24964 | |||
| 24965 | @example | ||
| 24966 | guix system delete-generations 2m | ||
| 24967 | @end example | ||
| 24968 | |||
| 24969 | Wenn Sie diesen Befehl ausführen, wird automatisch der Bootloader mit einer | ||
| 24970 | aktualisierten Liste von Menüeinträgen neu erstellt — z.B.@: werden im | ||
| 24971 | Untermenü für die »alten Generationen« in GRUB die gelöschten Generationen | ||
| 24972 | nicht mehr aufgeführt. | ||
| 24973 | |||
| 24974 | @item build | ||
| 24975 | Die Ableitung des Betriebssystems erstellen, einschließlich aller | ||
| 24976 | Konfigurationsdateien und Programme, die zum Booten und Starten benötigt | ||
| 24977 | werden. Diese Aktion installiert jedoch nichts davon. | ||
| 24978 | |||
| 24979 | @item init | ||
| 24980 | In das angegebene Verzeichnis alle Dateien einfügen, um das in der | ||
| 24981 | @var{Datei} angegebene Betriebssystem starten zu können. Dies ist nützlich | ||
| 24982 | bei erstmaligen Installationen von »Guix System«. Zum Beispiel: | ||
| 24983 | |||
| 24984 | @example | ||
| 24985 | guix system init my-os-config.scm /mnt | ||
| 24986 | @end example | ||
| 24987 | |||
| 24988 | Hiermit werden alle Store-Objekte nach @file{/mnt} kopiert, die von der in | ||
| 24989 | @file{my-os-config.scm} angegebenen Konfiguration vorausgesetzt werden. Dazu | ||
| 24990 | gehören Konfigurationsdateien, Pakete und so weiter. Auch andere essenzielle | ||
| 24991 | Dateien, die auf dem System vorhanden sein müssen, damit es richtig | ||
| 24992 | funktioniert, werden erzeugt — z.B.@: die Verzeichnisse @file{/etc}, | ||
| 24993 | @file{/var} und @file{/run} und die Datei @file{/bin/sh}. | ||
| 24994 | |||
| 24995 | Dieser Befehl installiert auch den Bootloader auf dem in @file{my-os-config} | ||
| 24996 | angegebenen Ziel, außer die Befehlszeilenoption @option{--no-bootloader} | ||
| 24997 | wurde übergeben. | ||
| 24998 | |||
| 24999 | @item vm | ||
| 25000 | @cindex virtuelle Maschine | ||
| 25001 | @cindex VM | ||
| 25002 | @anchor{guix system vm} | ||
| 25003 | Eine virtuelle Maschine (VM) erstellen, die das in der @var{Datei} | ||
| 25004 | deklarierte Betriebssystem enthält, und ein Skript liefern, das diese | ||
| 25005 | virtuelle Maschine startet. | ||
| 25006 | |||
| 25007 | @quotation Anmerkung | ||
| 25008 | Die Aktion @code{vm} sowie solche, die weiter unten genannt werden, können | ||
| 25009 | KVM-Unterstützung im Kernel Linux-libre ausnutzen. Insbesondere sollte, wenn | ||
| 25010 | die Maschine Hardware-Virtualisierung unterstützt, das entsprechende | ||
| 25011 | KVM-Kernelmodul geladen sein und das Gerät @file{/dev/kvm} muss dann | ||
| 25012 | existieren und dem Benutzer und den Erstellungsbenutzern des Daemons müssen | ||
| 25013 | Berechtigungen zum Lesen und Schreiben darauf gegeben werden (siehe | ||
| 25014 | @ref{Einrichten der Erstellungsumgebung}). | ||
| 25015 | @end quotation | ||
| 25016 | |||
| 25017 | An das Skript übergebene Argumente werden an QEMU weitergereicht, wie Sie am | ||
| 25018 | folgenden Beispiel sehen können. Damit würde eine Netzwerkverbindung | ||
| 25019 | aktiviert und 1@tie{}GiB an RAM für die emulierte Maschine angefragt: | ||
| 25020 | |||
| 25021 | @example | ||
| 25022 | $ /gnu/store/@dots{}-run-vm.sh -m 1024 -net user | ||
| 25023 | @end example | ||
| 25024 | |||
| 25025 | Die virtuelle Maschine verwendet denselben Store wie das Wirtssystem. | ||
| 25026 | |||
| 25027 | Mit den Befehlszeilenoptionen @code{--share} und @code{--expose} können | ||
| 25028 | weitere Dateisysteme zwischen dem Wirtssystem und der VM geteilt werden: Der | ||
| 25029 | erste Befehl gibt ein mit Schreibzugriff zu teilendes Verzeichnis an, | ||
| 25030 | während der letzte Befehl nur Lesezugriff auf das gemeinsame Verzeichnis | ||
| 25031 | gestattet. | ||
| 25032 | |||
| 25033 | Im folgenden Beispiel wird eine virtuelle Maschine erzeugt, die auf das | ||
| 25034 | Persönliche Verzeichnis des Benutzers nur Lesezugriff hat, wo das | ||
| 25035 | Verzeichnis @file{/austausch} aber mit Lese- und Schreibzugriff dem | ||
| 25036 | Verzeichnis @file{$HOME/tmp} auf dem Wirtssystem zugeordnet wurde: | ||
| 25037 | |||
| 25038 | @example | ||
| 25039 | guix system vm my-config.scm \ | ||
| 25040 | --expose=$HOME --share=$HOME/tmp=/austausch | ||
| 25041 | @end example | ||
| 25042 | |||
| 25043 | Für GNU/Linux ist das vorgegebene Verhalten, direkt in den Kernel zu booten, | ||
| 25044 | wodurch nur ein sehr winziges »Disk-Image« (eine Datei mit einem Abbild des | ||
| 25045 | Plattenspeichers der virtuellen Maschine) für das Wurzeldateisystem nötig | ||
| 25046 | wird, weil der Store des Wirtssystems davon eingebunden werden kann. | ||
| 25047 | |||
| 25048 | Mit der Befehlszeilenoption @code{--full-boot} wird erzwungen, einen | ||
| 25049 | vollständigen Bootvorgang durchzuführen, angefangen mit dem | ||
| 25050 | Bootloader. Dadurch wird mehr Plattenplatz verbraucht, weil dazu ein | ||
| 25051 | Disk-Image mindestens mit dem Kernel, initrd und Bootloader-Datendateien | ||
| 25052 | erzeugt werden muss. Mit der Befehlszeilenoption @code{--image-size} kann | ||
| 25053 | die Größe des Disk-Images angegeben werden. | ||
| 25054 | |||
| 25055 | @cindex System-Disk-Images, Erstellung in verschiedenen Formaten | ||
| 25056 | @cindex Erzeugen von System-Disk-Images in verschiedenen Formaten | ||
| 25057 | @item vm-image | ||
| 25058 | @itemx disk-image | ||
| 25059 | @itemx docker-image | ||
| 25060 | Ein eigenständiges Disk-Image für eine virtuelle Maschine, ein allgemeines | ||
| 25061 | Disk-Image oder ein Docker-Abbild für das in der @var{Datei} deklarierte | ||
| 25062 | Betriebssystem liefern. Das vorgegebene Verhalten von @command{guix system} | ||
| 25063 | ist, die Größe des Images zu schätzen, die zum Speichern des Systems | ||
| 25064 | benötigt wird, aber Sie können mit der Befehlszeilenoption | ||
| 25065 | @option{--image-size} selbst Ihre gewünschte Größe | ||
| 25066 | bestimmen. Docker-Abbilder werden aber so erstellt, dass sie gerade nur das | ||
| 25067 | enthalten, was für sie nötig ist, daher wird die Befehlszeilenoption | ||
| 25068 | @option{--image-size} im Fall von @code{docker-image} ignoriert. | ||
| 25069 | |||
| 25070 | Sie können den Dateisystemtyp für das Wurzeldateisystem mit der | ||
| 25071 | Befehlszeilenoption @option{--file-system-type} festlegen. Vorgegeben ist, | ||
| 25072 | @code{ext4} zu verwenden. | ||
| 25073 | |||
| 25074 | Wenn Sie ein @code{vm-image} anfordern, ist das gelieferte Disk-Image im | ||
| 25075 | qcow2-Format, was vom QEMU-Emulator effizient benutzt werden kann. Im | ||
| 25076 | Abschnitt @ref{Guix in einer VM starten} finden Sie mehr Informationen, wie Sie | ||
| 25077 | das Disk-Image in einer virtuellen Maschine laufen lassen. | ||
| 25078 | |||
| 25079 | Wenn Sie ein @code{disk-image} anfordern, wird ein rohes Disk-Image | ||
| 25080 | hergestellt; es kann zum Beispiel auf einen USB-Stick kopiert | ||
| 25081 | werden. Angenommen @code{/dev/sdc} ist das dem USB-Stick entsprechende | ||
| 25082 | Gerät, dann kann das Disk-Image mit dem folgenden Befehls darauf kopiert | ||
| 25083 | werden: | ||
| 25084 | |||
| 25085 | @example | ||
| 25086 | # dd if=$(guix system disk-image my-os.scm) of=/dev/sdc | ||
| 25087 | @end example | ||
| 25088 | |||
| 25089 | Wenn Sie ein @code{docker-image} anfordern, wird ein Abbild für Docker | ||
| 25090 | hergestellt. Guix erstellt das Abbild von Grund auf und @emph{nicht} aus | ||
| 25091 | einem vorerstellten Docker-Basisabbild heraus, daher enthält es @emph{exakt} | ||
| 25092 | das, was Sie in der Konfigurationsdatei für das Betriebssystem angegeben | ||
| 25093 | haben. Sie können das Abbild dann wie folgt laden und einen Docker-Container | ||
| 25094 | damit erzeugen: | ||
| 25095 | |||
| 25096 | @example | ||
| 25097 | image_id="$(docker load < guix-system-docker-image.tar.gz)" | ||
| 25098 | docker run -e GUIX_NEW_SYSTEM=/var/guix/profiles/system \\ | ||
| 25099 | --entrypoint /var/guix/profiles/system/profile/bin/guile \\ | ||
| 25100 | $image_id /var/guix/profiles/system/boot | ||
| 25101 | @end example | ||
| 25102 | |||
| 25103 | Dieser Befehl startet einen neuen Docker-Container aus dem angegebenen | ||
| 25104 | Abbild. Damit wird das Guix-System auf die normale Weise hochgefahren, | ||
| 25105 | d.h.@: zunächst werden alle Dienste gestartet, die Sie in der Konfiguration | ||
| 25106 | des Betriebssystems angegeben haben. Je nachdem, was Sie im Docker-Container | ||
| 25107 | ausführen, kann es nötig sein, dass Sie ihn mit weitergehenden | ||
| 25108 | Berechtigungen ausstatten. Wenn Sie zum Beispiel Software mit Guix innerhalb | ||
| 25109 | des Docker-Containers erstellen wollen, müssen Sie an @code{docker run} die | ||
| 25110 | Befehlszeilenoption @option{--privileged} übergeben. | ||
| 25111 | |||
| 25112 | @item container | ||
| 25113 | Liefert ein Skript, um das in der @var{Datei} deklarierte Betriebssystem in | ||
| 25114 | einem Container auszuführen. Mit Container wird hier eine Reihe | ||
| 25115 | ressourcenschonender Isolierungsmechanismen im Kernel Linux-libre | ||
| 25116 | bezeichnet. Container beanspruchen wesentlich weniger Ressourcen als | ||
| 25117 | vollumfängliche virtuelle Maschinen, weil der Kernel, Bibliotheken in | ||
| 25118 | gemeinsam nutzbaren Objektdateien (»Shared Objects«) sowie andere Ressourcen | ||
| 25119 | mit dem Wirtssystem geteilt werden können. Damit ist also eine »dünnere« | ||
| 25120 | Isolierung möglich. | ||
| 25121 | |||
| 25122 | Zur Zeit muss das Skript als Administratornutzer »root« ausgeführt werden, | ||
| 25123 | damit darin mehr als nur ein einzelner Benutzer und eine Benutzergruppe | ||
| 25124 | unterstützt wird. Der Container teilt seinen Store mit dem Wirtssystem. | ||
| 25125 | |||
| 25126 | Wie bei der Aktion @code{vm} (siehe @ref{guix system vm}) können zusätzlich | ||
| 25127 | weitere Dateisysteme zwischen Wirt und Container geteilt werden, indem man | ||
| 25128 | die Befehlszeilenoptionen @option{--share} und @option{--expose} verwendet: | ||
| 25129 | |||
| 25130 | @example | ||
| 25131 | guix system container my-config.scm \ | ||
| 25132 | --expose=$HOME --share=$HOME/tmp=/austausch | ||
| 25133 | @end example | ||
| 25134 | |||
| 25135 | @quotation Anmerkung | ||
| 25136 | Diese Befehlszeilenoption funktioniert nur mit Linux-libre 3.19 oder neuer. | ||
| 25137 | @end quotation | ||
| 25138 | |||
| 25139 | @end table | ||
| 25140 | |||
| 25141 | Unter den @var{Optionen} können beliebige gemeinsame Erstellungsoptionen | ||
| 25142 | aufgeführt werden (siehe @ref{Gemeinsame Erstellungsoptionen}). Des Weiteren kann als | ||
| 25143 | @var{Optionen} Folgendes angegeben werden: | ||
| 25144 | |||
| 25145 | @table @option | ||
| 25146 | @item --expression=@var{Ausdruck} | ||
| 25147 | @itemx -e @var{Ausdruck} | ||
| 25148 | Als Konfiguration des Betriebssystems das »operating-system« betrachten, zu | ||
| 25149 | dem der @var{Ausdruck} ausgewertet wird. Dies ist eine Alternative dazu, die | ||
| 25150 | Konfiguration in einer Datei festzulegen. Hiermit wird auch das | ||
| 25151 | Installationsabbild des Guix-Systems erstellt, siehe @ref{Ein Abbild zur Installation erstellen}). | ||
| 25152 | |||
| 25153 | @item --system=@var{System} | ||
| 25154 | @itemx -s @var{System} | ||
| 25155 | Versuche, für das angegebene @var{System} statt für denselben Systemtyp wie | ||
| 25156 | auf dem Wirtssystem zu erstellen. Dies funktioniert wie bei @command{guix | ||
| 25157 | build} (siehe @ref{Aufruf von guix build}). | ||
| 25158 | |||
| 25159 | @item --derivation | ||
| 25160 | @itemx -d | ||
| 25161 | Liefert den Namen der Ableitungsdatei für das angegebene Betriebssystem, | ||
| 25162 | ohne dazu etwas zu erstellen. | ||
| 25163 | |||
| 25164 | @item --file-system-type=@var{Typ} | ||
| 25165 | @itemx -t @var{Typ} | ||
| 25166 | Für die Aktion @code{disk-image} wird hiermit ein Dateisystem des | ||
| 25167 | angegebenen @var{Typ}s im Abbild bzw. Disk-Image erzeugt. | ||
| 25168 | |||
| 25169 | Wird diese Befehlszeilenoption nicht angegeben, so benutzt @command{guix | ||
| 25170 | system} als Dateisystemtyp @code{ext4}. | ||
| 25171 | |||
| 25172 | @cindex ISO-9660-Format | ||
| 25173 | @cindex CD-Abbild-Format | ||
| 25174 | @cindex DVD-Abbild-Format | ||
| 25175 | @code{--file-system-type=iso9660} erzeugt ein Abbild im Format ISO-9660, was | ||
| 25176 | für das Brennen auf CDs und DVDs geeignet ist. | ||
| 25177 | |||
| 25178 | @item --image-size=@var{Größe} | ||
| 25179 | Für die Aktionen @code{vm-image} und @code{disk-image} wird hiermit | ||
| 25180 | festgelegt, dass ein Abbild der angegebenen @var{Größe} erstellt werden | ||
| 25181 | soll. Die @var{Größe} kann als Zahl die Anzahl Bytes angeben oder mit einer | ||
| 25182 | Einheit als Suffix versehen werden (siehe @ref{Block size, size | ||
| 25183 | specifications,, coreutils, GNU Coreutils}). | ||
| 25184 | |||
| 25185 | Wird keine solche Befehlszeilenoption angegeben, berechnet @command{guix | ||
| 25186 | system} eine Schätzung der Abbildgröße anhand der Größe des in der | ||
| 25187 | @var{Datei} deklarierten Systems. | ||
| 25188 | |||
| 25189 | @item --root=@var{Datei} | ||
| 25190 | @itemx -r @var{Datei} | ||
| 25191 | Die @var{Datei} zu einer symbolischen Verknüpfung auf das Ergebnis machen | ||
| 25192 | und als Müllsammlerwurzel registrieren. | ||
| 25193 | |||
| 25194 | @item --skip-checks | ||
| 25195 | Die Konfiguration @emph{nicht} vor der Installation zur Sicherheit auf | ||
| 25196 | Fehler prüfen. | ||
| 25197 | |||
| 25198 | Das vorgegebene Verhalten von @command{guix system init} und @command{guix | ||
| 25199 | system reconfigure} sieht vor, die Konfiguration zur Sicherheit auf Fehler | ||
| 25200 | hin zu überprüfen, die ihr Autor übersehen haben könnte: Es wird | ||
| 25201 | sichergestellt, dass die in der @code{operating-system}-Deklaration | ||
| 25202 | erwähnten Dateisysteme tatsächlich existieren (siehe @ref{Dateisysteme}) und | ||
| 25203 | dass alle Linux-Kernelmodule, die beim Booten benötigt werden könnten, auch | ||
| 25204 | im @code{initrd-modules}-Feld aufgeführt sind (siehe @ref{Initiale RAM-Disk}). Mit dieser Befehlszeilenoption werden diese Tests allesamt | ||
| 25205 | übersprungen. | ||
| 25206 | |||
| 25207 | @cindex on-error | ||
| 25208 | @cindex on-error-Strategie | ||
| 25209 | @cindex Fehlerstrategie | ||
| 25210 | @item --on-error=@var{Strategie} | ||
| 25211 | Beim Auftreten eines Fehlers beim Einlesen der @var{Datei} die angegebene | ||
| 25212 | @var{Strategie} verfolgen. Als @var{Strategie} dient eine der Folgenden: | ||
| 25213 | |||
| 25214 | @table @code | ||
| 25215 | @item nothing-special | ||
| 25216 | Nichts besonderes; der Fehler wird kurz gemeldet und der Vorgang | ||
| 25217 | abgebrochen. Dies ist die vorgegebene Strategie. | ||
| 25218 | |||
| 25219 | @item backtrace | ||
| 25220 | Ebenso, aber zusätzlich wird eine Rückverfolgung des Fehlers (ein | ||
| 25221 | »Backtrace«) angezeigt. | ||
| 25222 | |||
| 25223 | @item debug | ||
| 25224 | Nach dem Melden des Fehlers wird der Debugger von Guile zur Fehlersuche | ||
| 25225 | gestartet. Von dort können Sie Befehle ausführen, zum Beispiel können Sie | ||
| 25226 | sich mit @code{,bt} eine Rückverfolgung (»Backtrace«) anzeigen lassen und | ||
| 25227 | mit @code{,locals} die Werte lokaler Variabler anzeigen lassen. Im | ||
| 25228 | Allgemeinen können Sie mit Befehlen den Zustand des Programms | ||
| 25229 | inspizieren. Siehe @ref{Debug Commands,,, guile, GNU Guile Reference Manual} | ||
| 25230 | für eine Liste verfügbarer Befehle zur Fehlersuche. | ||
| 25231 | @end table | ||
| 25232 | @end table | ||
| 25233 | |||
| 25234 | Sobald Sie Ihre Guix-Installation erstellt, konfiguriert, neu konfiguriert | ||
| 25235 | und nochmals neu konfiguriert haben, finden Sie es vielleicht hilfreich, | ||
| 25236 | sich die auf der Platte verfügbaren — und im Bootmenü des Bootloaders | ||
| 25237 | auswählbaren — Systemgenerationen auflisten zu lassen: | ||
| 25238 | |||
| 25239 | @table @code | ||
| 25240 | |||
| 25241 | @item list-generations | ||
| 25242 | Eine für Menschen verständliche Zusammenfassung jeder auf der Platte | ||
| 25243 | verfügbaren Generation des Betriebssystems ausgeben. Dies ähnelt der | ||
| 25244 | Befehlszeilenoption @option{--list-generations} von @command{guix package} | ||
| 25245 | (siehe @ref{Aufruf von guix package}). | ||
| 25246 | |||
| 25247 | Optional kann ein Muster angegeben werden, was dieselbe Syntax wie | ||
| 25248 | @command{guix package --list-generations} benutzt, um damit die Liste | ||
| 25249 | anzuzeigender Generationen einzuschränken. Zum Beispiel zeigt der folgende | ||
| 25250 | Befehl Generationen an, die bis zu 10 Tage alt sind: | ||
| 25251 | |||
| 25252 | @example | ||
| 25253 | $ guix system list-generations 10d | ||
| 25254 | @end example | ||
| 25255 | |||
| 25256 | @end table | ||
| 25257 | |||
| 25258 | Der Befehl @command{guix system} hat sogar noch mehr zu bieten! Mit | ||
| 25259 | folgenden Unterbefehlen wird Ihnen visualisiert, wie Ihre Systemdienste | ||
| 25260 | voneinander abhängen: | ||
| 25261 | |||
| 25262 | @anchor{system-extension-graph} | ||
| 25263 | @table @code | ||
| 25264 | |||
| 25265 | @item extension-graph | ||
| 25266 | Im Dot-/Graphviz-Format auf die Standardausgabe den | ||
| 25267 | @dfn{Diensterweiterungsgraphen} des in der @var{Datei} definierten | ||
| 25268 | Betriebssystems ausgeben (siehe @ref{Dienstkompositionen} für mehr | ||
| 25269 | Informationen zu Diensterweiterungen). | ||
| 25270 | |||
| 25271 | Der Befehl: | ||
| 25272 | |||
| 25273 | @example | ||
| 25274 | $ guix system extension-graph @var{file} | dot -Tpdf > services.pdf | ||
| 25275 | @end example | ||
| 25276 | |||
| 25277 | erzeugt eine PDF-Datei, in der die Erweiterungsrelation unter Diensten | ||
| 25278 | angezeigt wird. | ||
| 25279 | |||
| 25280 | @anchor{system-shepherd-graph} | ||
| 25281 | @item shepherd-graph | ||
| 25282 | Im Dot-/Graphviz-Format auf die Standardausgabe den | ||
| 25283 | @dfn{Abhängigkeitsgraphen} der Shepherd-Dienste des in der @var{Datei} | ||
| 25284 | definierten Betriebssystems ausgeben. Siehe @ref{Shepherd-Dienste} für mehr | ||
| 25285 | Informationen sowie einen Beispielgraphen. | ||
| 25286 | |||
| 25287 | @end table | ||
| 25288 | |||
| 25289 | @node Guix in einer VM starten | ||
| 25290 | @section Guix in einer virtuellen Maschine betreiben | ||
| 25291 | |||
| 25292 | @cindex virtuelle Maschine | ||
| 25293 | Um Guix in einer virtuellen Maschine (VM) auszuführen, können Sie entweder | ||
| 25294 | das vorerstellte Guix-VM-Abbild benutzen, das auf | ||
| 25295 | @indicateurl{https://alpha.gnu.org/gnu/guix/guix-system-vm-image-@value{VERSION}.@var{System}.xz} | ||
| 25296 | angeboten wird, oder Ihr eigenes Abbild erstellen, indem Sie @command{guix | ||
| 25297 | system vm-image} benutzen (siehe @ref{Aufruf von guix system}). Das Abbild | ||
| 25298 | wird im qcow2-Format zurückgeliefert, das der @uref{http://qemu.org/, | ||
| 25299 | QEMU-Emulator} effizient benutzen kann. | ||
| 25300 | |||
| 25301 | @cindex QEMU | ||
| 25302 | Wenn Sie Ihr eigenes Abbild erstellen haben lassen, müssen Sie es aus dem | ||
| 25303 | Store herauskopieren (siehe @ref{Der Store}) und sich darauf | ||
| 25304 | Schreibberechtigung geben, um die Kopie benutzen zu können. Wenn Sie QEMU | ||
| 25305 | aufrufen, müssen Sie einen Systememulator angeben, der für Ihre | ||
| 25306 | Hardware-Plattform passend ist. Hier ist ein minimaler QEMU-Aufruf, der das | ||
| 25307 | Ergebnis von @command{guix system vm-image} auf x86_64-Hardware bootet: | ||
| 25308 | |||
| 25309 | @example | ||
| 25310 | $ qemu-system-x86_64 \ | ||
| 25311 | -net user -net nic,model=virtio \ | ||
| 25312 | -enable-kvm -m 256 /tmp/qemu-image | ||
| 25313 | @end example | ||
| 25314 | |||
| 25315 | Die Bedeutung jeder dieser Befehlszeilenoptionen ist folgende: | ||
| 25316 | |||
| 25317 | @table @code | ||
| 25318 | @item qemu-system-x86_64 | ||
| 25319 | Hiermit wird die zu emulierende Hardware-Plattform angegeben. Sie sollte zum | ||
| 25320 | Wirtsrechner passen. | ||
| 25321 | |||
| 25322 | @item -net user | ||
| 25323 | Den als Nutzer ausgeführten Netzwerkstapel (»User-Mode Network Stack«) ohne | ||
| 25324 | besondere Berechtigungen benutzen. Mit dieser Art von Netzwerkanbindung kann | ||
| 25325 | das Gast-Betriebssystem eine Verbindung zum Wirt aufbauen, aber nicht | ||
| 25326 | andersherum. Es ist die einfachste Art, das Gast-Betriebssystem mit dem | ||
| 25327 | Internet zu verbinden. | ||
| 25328 | |||
| 25329 | @item -net nic,model=virtio | ||
| 25330 | Sie müssen ein Modell einer zu emulierenden Netzwerkschnittstelle | ||
| 25331 | angeben. Wenn Sie keine Netzwerkkarte (englisch »Network Interface Card«, | ||
| 25332 | kurz NIC) erzeugen lassen, wird das Booten fehlschlagen. Falls Ihre | ||
| 25333 | Hardware-Plattform x86_64 ist, können Sie eine Liste verfügbarer NIC-Modelle | ||
| 25334 | einsehen, indem Sie @command{qemu-system-x86_64 -net nic,model=help} | ||
| 25335 | ausführen. | ||
| 25336 | |||
| 25337 | @item -enable-kvm | ||
| 25338 | Wenn Ihr System über Erweiterungen zur Hardware-Virtualisierung verfügt, | ||
| 25339 | beschleunigt es die Dinge, wenn Sie die Virtualisierungsunterstützung »KVM« | ||
| 25340 | des Linux-Kernels benutzen lassen. | ||
| 25341 | |||
| 25342 | @item -m 256 | ||
| 25343 | Die Menge an Arbeitsspeicher (RAM), die dem Gastbetriebssystem zur Verfügung | ||
| 25344 | stehen soll, in Mebibytes. Vorgegeben wären 128@tie{}MiB, was für einige | ||
| 25345 | Operationen zu wenig sein könnte. | ||
| 25346 | |||
| 25347 | @item /tmp/qemu-image | ||
| 25348 | Der Dateiname des qcow2-Abbilds. | ||
| 25349 | @end table | ||
| 25350 | |||
| 25351 | Das voreingestellte @command{run-vm.sh}-Skript, das durch einen Aufruf von | ||
| 25352 | @command{guix system vm} erzeugt wird, fügt keine Befehlszeilenoption | ||
| 25353 | @command{-net user} an. Um innerhalb der virtuellen Maschine Netzwerkzugang | ||
| 25354 | zu haben, fügen Sie den @code{(dhcp-client-service)} zu Ihrer | ||
| 25355 | Systemdefinition hinzu und starten Sie die VM mit @command{`guix system vm | ||
| 25356 | config.scm` -net user}. Erwähnt werden sollte der Nachteil, dass bei | ||
| 25357 | Verwendung von @command{-net user} zur Netzanbindung der | ||
| 25358 | @command{ping}-Befehl @emph{nicht} funktionieren wird, weil dieser das | ||
| 25359 | ICMP-Protokoll braucht. Sie werden also einen anderen Befehl benutzen | ||
| 25360 | müssen, um auszuprobieren, ob Sie mit dem Netzwerk verbunden sind, zum | ||
| 25361 | Beispiel @command{guix download}. | ||
| 25362 | |||
| 25363 | @subsection Verbinden über SSH | ||
| 25364 | |||
| 25365 | @cindex SSH | ||
| 25366 | @cindex SSH server | ||
| 25367 | Um SSH in der virtuellen Maschine zu aktivieren, müssen Sie einen SSH-Server | ||
| 25368 | wie den @code{(dropbear-service)} oder den @code{(lsh-service)} zu ihr | ||
| 25369 | hinzufügen. Der @code{(lsh-service}) kann derzeit nicht ohne | ||
| 25370 | Benutzerinteraktion starten, weil der Benutzer erst ein paar Zeichen | ||
| 25371 | eintippen muss, um den Zufallsgenerator zu initialisieren. Des Weiteren | ||
| 25372 | müssen Sie den SSH-Port für das Wirtssystem freigeben (standardmäßig hat er | ||
| 25373 | die Portnummer 22). Das geht zum Beispiel so: | ||
| 25374 | |||
| 25375 | @example | ||
| 25376 | `guix system vm config.scm` -net user,hostfwd=tcp::10022-:22 | ||
| 25377 | @end example | ||
| 25378 | |||
| 25379 | Um sich mit der virtuellen Maschine zu verbinden, benutzen Sie diesen | ||
| 25380 | Befehl: | ||
| 25381 | |||
| 25382 | @example | ||
| 25383 | ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 10022 | ||
| 25384 | @end example | ||
| 25385 | |||
| 25386 | Mit @command{-p} wird @command{ssh} der Port mitgeteilt, über den eine | ||
| 25387 | Verbindung hergestellt werden soll. @command{-o | ||
| 25388 | UserKnownHostsFile=/dev/null} verhindert, dass @command{ssh} sich bei jeder | ||
| 25389 | Modifikation Ihrer @command{config.scm}-Datei beschwert, ein anderer | ||
| 25390 | bekannter Rechner sei erwartet worden, und @command{-o | ||
| 25391 | StrictHostKeyChecking=no} verhindert, dass Sie die Verbindung zu unbekannten | ||
| 25392 | Rechnern jedes Mal bestätigen müssen, wenn Sie sich verbinden. | ||
| 25393 | |||
| 25394 | @subsection @command{virt-viewer} mit Spice benutzen | ||
| 25395 | |||
| 25396 | Eine Alternative zur grafischen Schnittstelle des standardmäßigen | ||
| 25397 | @command{qemu} ist, sich mit Hilfe des @command{remote-viewer} aus dem Paket | ||
| 25398 | @command{virt-viewer} zu verbinden. Um eine Verbindung herzustellen, | ||
| 25399 | übergeben Sie die Befehlszeilenoption @command{-spice | ||
| 25400 | port=5930,disable-ticketing} an @command{qemu}. Siehe den vorherigen | ||
| 25401 | Abschnitt für weitere Informationen, wie Sie das übergeben. | ||
| 25402 | |||
| 25403 | Spice macht es auch möglich, ein paar nette Hilfestellungen zu benutzen, zum | ||
| 25404 | Beispiel können Sie Ihren Zwischenspeicher zum Kopieren und Einfügen (Ihr | ||
| 25405 | »Clipboard«) mit Ihrer virtuellen Maschine teilen. Um das zu aktivieren, | ||
| 25406 | werden Sie die folgenden Befehlszeilennoptionen zusätzlich an @command{qemu} | ||
| 25407 | übergeben müssen: | ||
| 25408 | |||
| 25409 | @example | ||
| 25410 | -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5 | ||
| 25411 | -chardev spicevmc,name=vdagent,id=vdagent | ||
| 25412 | -device virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent, | ||
| 25413 | name=com.redhat.spice.0 | ||
| 25414 | @end example | ||
| 25415 | |||
| 25416 | Sie werden auch den @ref{Verschiedene Dienste, Spice-Dienst} hinzufügen | ||
| 25417 | müssen. | ||
| 25418 | |||
| 25419 | @node Dienste definieren | ||
| 25420 | @section Dienste definieren | ||
| 25421 | |||
| 25422 | Der vorhergehende Abschnitt präsentiert die verfügbaren Dienste und wie man | ||
| 25423 | sie in einer @code{operating-system}-Deklaration kombiniert. Aber wie | ||
| 25424 | definieren wir solche Dienste eigentlich? Und was ist überhaupt ein Dienst? | ||
| 25425 | |||
| 25426 | @menu | ||
| 25427 | * Dienstkompositionen:: Wie Dienste zusammengestellt werden. | ||
| 25428 | * Diensttypen und Dienste:: Typen und Dienste. | ||
| 25429 | * Service-Referenz:: Referenz zur Programmierschnittstelle. | ||
| 25430 | * Shepherd-Dienste:: Eine spezielle Art von Dienst. | ||
| 25431 | @end menu | ||
| 25432 | |||
| 25433 | @node Dienstkompositionen | ||
| 25434 | @subsection Dienstkompositionen | ||
| 25435 | |||
| 25436 | @cindex services | ||
| 25437 | @cindex Daemons | ||
| 25438 | Wir definieren hier einen @dfn{Dienst} (englisch »Service«) als, grob | ||
| 25439 | gesagt, etwas, das die Funktionalität des Betriebssystems erweitert. Oft ist | ||
| 25440 | ein Dienst ein Prozess — ein sogenannter @dfn{Daemon} —, der beim Hochfahren | ||
| 25441 | des Systems gestartet wird: ein Secure-Shell-Server, ein Web-Server, der | ||
| 25442 | Guix-Erstellungsdaemon usw. Manchmal ist ein Dienst ein Daemon, dessen | ||
| 25443 | Ausführung von einem anderen Daemon ausgelöst wird — zum Beispiel wird ein | ||
| 25444 | FTP-Server von @command{inetd} gestartet oder ein D-Bus-Dienst durch | ||
| 25445 | @command{dbus-daemon} aktiviert. Manchmal entspricht ein Dienst aber auch | ||
| 25446 | keinem Daemon. Zum Beispiel nimmt sich der Benutzerkonten-Dienst (»account | ||
| 25447 | service«) die Benutzerkonten und sorgt dafür, dass sie existieren, wenn das | ||
| 25448 | System läuft. Der »udev«-Dienst sammelt die Regeln zur Geräteverwaltung an | ||
| 25449 | und macht diese für den eudev-Daemon verfügbar. Der @file{/etc}-Dienst fügt | ||
| 25450 | Dateien in das Verzeichnis @file{/etc} des Systems ein. | ||
| 25451 | |||
| 25452 | @cindex Diensterweiterungen | ||
| 25453 | Dienste des Guix-Systems werden durch @dfn{Erweiterungen} (»Extensions«) | ||
| 25454 | miteinander verbunden. Zum Beispiel @emph{erweitert} der Secure-Shell-Dienst | ||
| 25455 | den Shepherd — Shepherd ist das Initialisierungssystem (auch »init«-System | ||
| 25456 | genannt), was als PID@tie{}1 läuft —, indem es ihm die Befehlszeilen zum | ||
| 25457 | Starten und Stoppen des Secure-Shell-Daemons übergibt (siehe @ref{Netzwerkdienste, @code{openssh-service-type}}). Der UPower-Dienst erweitert den | ||
| 25458 | D-Bus-Dienst, indem es ihm seine @file{.service}-Spezifikation übergibt, und | ||
| 25459 | erweitert den udev-Dienst, indem es ihm Geräteverwaltungsregeln übergibt | ||
| 25460 | (siehe @ref{Desktop-Dienste, @code{upower-service}}). Der | ||
| 25461 | Guix-Daemon-Dienst erweitert den Shepherd, indem er ihm die Befehlszeilen | ||
| 25462 | zum Starten und Stoppen des Daemons übergibt, und er erweitert den | ||
| 25463 | Benutzerkontendienst (»account service«), indem er ihm eine Liste der | ||
| 25464 | benötigten Erstellungsbenutzerkonten übergibt (siehe @ref{Basisdienste}). | ||
| 25465 | |||
| 25466 | Alles in allem bilden Dienste und ihre »Erweitert«-Relationen einen | ||
| 25467 | gerichteten azyklischen Graphen (englisch »Directed Acyclic Graph«, kurz | ||
| 25468 | DAG). Wenn wir Dienste als Kästen und Erweiterungen als Pfeile darstellen, | ||
| 25469 | könnte ein typisches System so etwas hier anbieten: | ||
| 25470 | |||
| 25471 | @image{images/service-graph,,5in,Typischer Diensterweiterungsgraph} | ||
| 25472 | |||
| 25473 | @cindex Systemdienst | ||
| 25474 | Ganz unten sehen wir den @dfn{Systemdienst}, der das Verzeichnis erzeugt, in | ||
| 25475 | dem alles zum Ausführen und Hochfahren enthalten ist, so wie es der Befehl | ||
| 25476 | @command{guix system build} liefert. Siehe @ref{Service-Referenz}, um mehr | ||
| 25477 | über die anderen hier gezeigten Diensttypen zu erfahren. Beim | ||
| 25478 | @ref{system-extension-graph, Befehl @command{guix system extension-graph}} | ||
| 25479 | finden Sie Informationen darüber, wie Sie diese Darstellung für eine | ||
| 25480 | Betriebssystemdefinition Ihrer Wahl generieren lassen. | ||
| 25481 | |||
| 25482 | @cindex Diensttypen | ||
| 25483 | Technisch funktioniert es so, dass Entwickler @dfn{Diensttypen} definieren | ||
| 25484 | können, um diese Beziehungen auszudrücken. Im System kann es beliebig viele | ||
| 25485 | Dienste zu jedem Typ geben — zum Beispiel können auf einem System zwei | ||
| 25486 | Instanzen des GNU-Secure-Shell-Servers (lsh) laufen, mit zwei Instanzen des | ||
| 25487 | Diensttyps @code{lsh-service-type} mit je unterschiedlichen Parametern. | ||
| 25488 | |||
| 25489 | Der folgende Abschnitt beschreibt die Programmierschnittstelle für | ||
| 25490 | Diensttypen und Dienste. | ||
| 25491 | |||
| 25492 | @node Diensttypen und Dienste | ||
| 25493 | @subsection Diensttypen und Dienste | ||
| 25494 | |||
| 25495 | Ein @dfn{Diensttyp} (»service type«) ist ein Knoten im oben beschriebenen | ||
| 25496 | ungerichteten azyklischen Graphen (DAG). Fangen wir an mit einem einfachen | ||
| 25497 | Beispiel: dem Diensttyp für den Guix-Erstellungsdaemon (siehe @ref{Aufruf des guix-daemon}): | ||
| 25498 | |||
| 25499 | @example | ||
| 25500 | (define guix-service-type | ||
| 25501 | (service-type | ||
| 25502 | (name 'guix) | ||
| 25503 | (extensions | ||
| 25504 | (list (service-extension shepherd-root-service-type guix-shepherd-service) | ||
| 25505 | (service-extension account-service-type guix-accounts) | ||
| 25506 | (service-extension activation-service-type guix-activation))) | ||
| 25507 | (default-value (guix-configuration)))) | ||
| 25508 | @end example | ||
| 25509 | |||
| 25510 | @noindent | ||
| 25511 | Damit sind drei Dinge definiert: | ||
| 25512 | |||
| 25513 | @enumerate | ||
| 25514 | @item | ||
| 25515 | Ein Name, der nur dazu da ist, dass man leichter die Abläufe verstehen und | ||
| 25516 | Fehler suchen kann. | ||
| 25517 | |||
| 25518 | @item | ||
| 25519 | Eine Liste von @dfn{Diensterweiterungen} (»service extensions«). Jede | ||
| 25520 | Erweiterung gibt den Ziel-Diensttyp an sowie eine Prozedur, die für gegebene | ||
| 25521 | Parameter für den Dienst eine Liste von Objekten zurückliefert, um den | ||
| 25522 | Dienst dieses Typs zu erweitern. | ||
| 25523 | |||
| 25524 | Jeder Diensttyp benutzt mindestens eine Diensterweiterung. Die einzige | ||
| 25525 | Ausnahme ist der @dfn{boot service type}, der die Grundlage aller Dienste | ||
| 25526 | ist. | ||
| 25527 | |||
| 25528 | @item | ||
| 25529 | Optional kann ein Vorgabewert für Instanzen dieses Typs angegeben werden. | ||
| 25530 | @end enumerate | ||
| 25531 | |||
| 25532 | In this example, @code{guix-service-type} extends three services: | ||
| 25533 | |||
| 25534 | @table @code | ||
| 25535 | @item shepherd-root-service-type | ||
| 25536 | The @code{guix-shepherd-service} procedure defines how the Shepherd service | ||
| 25537 | is extended. Namely, it returns a @code{<shepherd-service>} object that | ||
| 25538 | defines how @command{guix-daemon} is started and stopped (@pxref{Shepherd-Dienste}). | ||
| 25539 | |||
| 25540 | @item account-service-type | ||
| 25541 | This extension for this service is computed by @code{guix-accounts}, which | ||
| 25542 | returns a list of @code{user-group} and @code{user-account} objects | ||
| 25543 | representing the build user accounts (@pxref{Aufruf des guix-daemon}). | ||
| 25544 | |||
| 25545 | @item activation-service-type | ||
| 25546 | Here @code{guix-activation} is a procedure that returns a gexp, which is a | ||
| 25547 | code snippet to run at ``activation time''---e.g., when the service is | ||
| 25548 | booted. | ||
| 25549 | @end table | ||
| 25550 | |||
| 25551 | Ein Dienst dieses Typs wird dann so instanziiert: | ||
| 25552 | |||
| 25553 | @example | ||
| 25554 | (service guix-service-type | ||
| 25555 | (guix-configuration | ||
| 25556 | (build-accounts 5) | ||
| 25557 | (use-substitutes? #f))) | ||
| 25558 | @end example | ||
| 25559 | |||
| 25560 | Das zweite Argument an die @code{service}-Form ist ein Wert, der die | ||
| 25561 | Parameter dieser bestimmten Dienstinstanz repräsentiert. Siehe | ||
| 25562 | @ref{guix-configuration-type, @code{guix-configuration}} für Informationen | ||
| 25563 | über den @code{guix-configuration}-Datentyp. Wird kein Wert angegeben, wird | ||
| 25564 | die Vorgabe verwendet, die im @code{guix-service-type} angegeben wurde: | ||
| 25565 | |||
| 25566 | @example | ||
| 25567 | (service guix-service-type) | ||
| 25568 | @end example | ||
| 25569 | |||
| 25570 | @code{guix-service-type} is quite simple because it extends other services | ||
| 25571 | but is not extensible itself. | ||
| 25572 | |||
| 25573 | @c @subsubsubsection Extensible Service Types | ||
| 25574 | |||
| 25575 | Der Diensttyp eines @emph{erweiterbaren} Dienstes sieht ungefähr so aus: | ||
| 25576 | |||
| 25577 | @example | ||
| 25578 | (define udev-service-type | ||
| 25579 | (service-type (name 'udev) | ||
| 25580 | (extensions | ||
| 25581 | (list (service-extension shepherd-root-service-type | ||
| 25582 | udev-shepherd-service))) | ||
| 25583 | |||
| 25584 | (compose concatenate) ;Liste der Regeln zusammenfügen | ||
| 25585 | (extend (lambda (config rules) ;Konfiguration und Regeln | ||
| 25586 | (match config | ||
| 25587 | (($ <udev-configuration> udev initial-rules) | ||
| 25588 | (udev-configuration | ||
| 25589 | (udev udev) ;zu benutzendes udev-Paket | ||
| 25590 | (rules (append initial-rules rules))))))))) | ||
| 25591 | @end example | ||
| 25592 | |||
| 25593 | This is the service type for the | ||
| 25594 | @uref{https://wiki.gentoo.org/wiki/Project:Eudev, eudev device management | ||
| 25595 | daemon}. Compared to the previous example, in addition to an extension of | ||
| 25596 | @code{shepherd-root-service-type}, we see two new fields: | ||
| 25597 | |||
| 25598 | @table @code | ||
| 25599 | @item compose | ||
| 25600 | Die Prozedur, um die Liste der jeweiligen Erweiterungen für den Dienst | ||
| 25601 | dieses Typs zu einem Objekt zusammenzustellen (zu »komponieren«, englisch | ||
| 25602 | @dfn{compose}). | ||
| 25603 | |||
| 25604 | Dienste können den udev-Dienst erweitern, indem sie eine Liste von Regeln | ||
| 25605 | (»Rules«) an ihn übergeben; wir komponieren mehrere solche Erweiterungen, | ||
| 25606 | indem wir die Listen einfach zusammenfügen. | ||
| 25607 | |||
| 25608 | @item extend | ||
| 25609 | Diese Prozedur definiert, wie der Wert des Dienstes um die Komposition mit | ||
| 25610 | Erweiterungen erweitert (»extended«) werden kann. | ||
| 25611 | |||
| 25612 | Udev-Erweiterungen werden zu einer einzigen Liste von Regeln komponiert, | ||
| 25613 | aber der Wert des udev-Dienstes ist ein | ||
| 25614 | @code{<udev-configuration>}-Verbundsobjekt. Deshalb erweitern wir diesen | ||
| 25615 | Verbund, indem wir die Liste der von Erweiterungen beigetragenen Regeln an | ||
| 25616 | die im Verbund gespeicherte Liste der Regeln anhängen. | ||
| 25617 | |||
| 25618 | @item description | ||
| 25619 | Diese Zeichenkette gibt einen Überblick über den Systemtyp. Die Zeichenkette | ||
| 25620 | darf mit Texinfo ausgezeichnet werden (siehe @ref{Overview,,, texinfo, GNU | ||
| 25621 | Texinfo}). Der Befehl @command{guix system search} durchsucht diese | ||
| 25622 | Zeichenketten und zeigt sie an (siehe @ref{Aufruf von guix system}). | ||
| 25623 | @end table | ||
| 25624 | |||
| 25625 | There can be only one instance of an extensible service type such as | ||
| 25626 | @code{udev-service-type}. If there were more, the @code{service-extension} | ||
| 25627 | specifications would be ambiguous. | ||
| 25628 | |||
| 25629 | Sind Sie noch da? Der nächste Abschnitt gibt Ihnen eine Referenz der | ||
| 25630 | Programmierschnittstelle für Dienste. | ||
| 25631 | |||
| 25632 | @node Service-Referenz | ||
| 25633 | @subsection Service-Referenz | ||
| 25634 | |||
| 25635 | Wir haben bereits einen Überblick über Diensttypen gesehen (siehe | ||
| 25636 | @ref{Diensttypen und Dienste}). Dieser Abschnitt hier stellt eine | ||
| 25637 | Referenz dar, wie Dienste und Diensttypen manipuliert werden können. Diese | ||
| 25638 | Schnittstelle wird vom Modul @code{(gnu services)} angeboten. | ||
| 25639 | |||
| 25640 | @deffn {Scheme-Prozedur} service @var{Typ} [@var{Wert}] | ||
| 25641 | Liefert einen neuen Dienst des angegebenen @var{Typ}s. Der @var{Typ} muss | ||
| 25642 | als @code{<service-type>}-Objekt angegeben werden (siehe unten). Als | ||
| 25643 | @var{Wert} kann ein beliebiges Objekt angegeben werden, das die Parameter | ||
| 25644 | dieser bestimmten Instanz dieses Dienstes repräsentiert. | ||
| 25645 | |||
| 25646 | Wenn kein @var{Wert} angegeben wird, wird der vom @var{Typ} festgelegte | ||
| 25647 | Vorgabewert verwendet; verfügt der @var{Typ} über keinen Vorgabewert, dann | ||
| 25648 | wird ein Fehler gemeldet. | ||
| 25649 | |||
| 25650 | Zum Beispiel bewirken Sie hiermit: | ||
| 25651 | |||
| 25652 | @example | ||
| 25653 | (service openssh-service-type) | ||
| 25654 | @end example | ||
| 25655 | |||
| 25656 | @noindent | ||
| 25657 | dasselbe wie mit: | ||
| 25658 | |||
| 25659 | @example | ||
| 25660 | (service openssh-service-type | ||
| 25661 | (openssh-configuration)) | ||
| 25662 | @end example | ||
| 25663 | |||
| 25664 | In beiden Fällen ist das Ergebnis eine Instanz von | ||
| 25665 | @code{openssh-service-type} mit der vorgegebenen Konfiguration. | ||
| 25666 | @end deffn | ||
| 25667 | |||
| 25668 | @deffn {Scheme-Prozedur} service? @var{Objekt} | ||
| 25669 | Liefert wahr zurück, wenn das @var{Objekt} ein Dienst ist. | ||
| 25670 | @end deffn | ||
| 25671 | |||
| 25672 | @deffn {Scheme-Prozedur} service-kind @var{Dienst} | ||
| 25673 | Liefert den Typ des @var{Dienst}es — d.h.@: ein | ||
| 25674 | @code{<service-type>}-Objekt. | ||
| 25675 | @end deffn | ||
| 25676 | |||
| 25677 | @deffn {Scheme-Prozedur} service-value @var{Dienst} | ||
| 25678 | Liefert den Wert, der mit dem @var{Dienst} assoziiert wurde. Er | ||
| 25679 | repräsentiert die Parameter des @var{Dienst}es. | ||
| 25680 | @end deffn | ||
| 25681 | |||
| 25682 | Hier ist ein Beispiel, wie ein Dienst erzeugt und manipuliert werden kann: | ||
| 25683 | |||
| 25684 | @example | ||
| 25685 | (define s | ||
| 25686 | (service nginx-service-type | ||
| 25687 | (nginx-configuration | ||
| 25688 | (nginx nginx) | ||
| 25689 | (log-directory log-Verzeichnis) | ||
| 25690 | (run-directory run-Verzeichnis) | ||
| 25691 | (file config-Datei)))) | ||
| 25692 | |||
| 25693 | (service? s) | ||
| 25694 | @result{} #t | ||
| 25695 | |||
| 25696 | (eq? (service-kind s) nginx-service-type) | ||
| 25697 | @result{} #t | ||
| 25698 | @end example | ||
| 25699 | |||
| 25700 | The @code{modify-services} form provides a handy way to change the | ||
| 25701 | parameters of some of the services of a list such as @code{%base-services} | ||
| 25702 | (@pxref{Basisdienste, @code{%base-services}}). It evaluates to a list of | ||
| 25703 | services. Of course, you could always use standard list combinators such as | ||
| 25704 | @code{map} and @code{fold} to do that (@pxref{SRFI-1, List Library,, guile, | ||
| 25705 | GNU Guile Reference Manual}); @code{modify-services} simply provides a more | ||
| 25706 | concise form for this common pattern. | ||
| 25707 | |||
| 25708 | @deffn {Scheme-Syntax} modify-services @var{Dienste} @ | ||
| 25709 | (@var{Typ} @var{Variable} => @var{Rumpf}) @dots{} | ||
| 25710 | |||
| 25711 | Passt die von @var{Dienste} bezeichnete Dienst-Liste entsprechend den | ||
| 25712 | angegebenen Klauseln an. Jede Klausel hat die Form: | ||
| 25713 | |||
| 25714 | @example | ||
| 25715 | (@var{Typ} @var{Variable} => @var{Rumpf}) | ||
| 25716 | @end example | ||
| 25717 | |||
| 25718 | wobei @var{Typ} einen Diensttyp (»service type«) bezeichnet — wie zum | ||
| 25719 | Beispiel @code{guix-service-type} — und @var{Variable} ein Bezeichner ist, | ||
| 25720 | der im @var{Rumpf} an die Dienst-Parameter — z.B.@: eine | ||
| 25721 | @code{guix-configuration}-Instanz — des ursprünglichen Dienstes mit diesem | ||
| 25722 | @var{Typ} gebunden wird. | ||
| 25723 | |||
| 25724 | Der @var{Rumpf} muss zu den neuen Dienst-Parametern ausgewertet werden, | ||
| 25725 | welche benutzt werden, um den neuen Dienst zu konfigurieren. Dieser neue | ||
| 25726 | Dienst wird das Original in der resultierenden Liste ersetzen. Weil die | ||
| 25727 | Dienstparameter eines Dienstes mit @code{define-record-type*} erzeugt | ||
| 25728 | werden, können Sie einen kurzen @var{Rumpf} schreiben, der zu den neuen | ||
| 25729 | Dienstparametern ausgewertet wird, indem Sie die Funktionalität namens | ||
| 25730 | @code{inherit} benutzen, die von @code{define-record-type*} bereitgestellt | ||
| 25731 | wird. | ||
| 25732 | |||
| 25733 | Siehe @ref{Das Konfigurationssystem nutzen} für ein Anwendungsbeispiel. | ||
| 25734 | |||
| 25735 | @end deffn | ||
| 25736 | |||
| 25737 | Als Nächstes ist die Programmierschnittstelle für Diensttypen an der | ||
| 25738 | Reihe. Sie ist etwas, was Sie kennen werden wollen, wenn Sie neue | ||
| 25739 | Dienstdefinitionen schreiben, aber wenn Sie nur Ihre | ||
| 25740 | @code{operating-system}-Deklaration anpassen möchten, brauchen Sie diese | ||
| 25741 | Schnittstelle wahrscheinlich nicht. | ||
| 25742 | |||
| 25743 | @deftp {Datentyp} service-type | ||
| 25744 | @cindex Diensttyp | ||
| 25745 | Die Repräsentation eines @dfn{Diensttypen} (siehe @ref{Diensttypen und Dienste}). | ||
| 25746 | |||
| 25747 | @table @asis | ||
| 25748 | @item @code{name} | ||
| 25749 | Dieses Symbol wird nur verwendet, um die Abläufe im System anzuzeigen und | ||
| 25750 | die Fehlersuche zu erleichtern. | ||
| 25751 | |||
| 25752 | @item @code{extensions} | ||
| 25753 | Eine nicht-leere Liste von @code{<service-extension>}-Objekten (siehe | ||
| 25754 | unten). | ||
| 25755 | |||
| 25756 | @item @code{compose} (Vorgabe: @code{#f}) | ||
| 25757 | Wenn es auf @code{#f} gesetzt ist, dann definiert der Diensttyp Dienste, die | ||
| 25758 | nicht erweitert werden können — d.h.@: diese Dienste erhalten ihren Wert | ||
| 25759 | nicht von anderen Diensten. | ||
| 25760 | |||
| 25761 | Andernfalls muss es eine Prozedur sein, die ein einziges Argument | ||
| 25762 | entgegennimmt. Die Prozedur wird durch @code{fold-services} aufgerufen und | ||
| 25763 | ihr wird die Liste von aus den Erweiterungen angesammelten Werten | ||
| 25764 | übergeben. Sie gibt daraufhin einen einzelnen Wert zurück. | ||
| 25765 | |||
| 25766 | @item @code{extend} (Vorgabe: @code{#f}) | ||
| 25767 | Ist dies auf @code{#f} gesetzt, dann können Dienste dieses Typs nicht | ||
| 25768 | erweitert werden. | ||
| 25769 | |||
| 25770 | Andernfalls muss es eine zwei Argumente nehmende Prozedur sein, die von | ||
| 25771 | @code{fold-services} mit dem anfänglichen Wert für den Dienst als erstes | ||
| 25772 | Argument und dem durch Anwendung von @code{compose} gelieferten Wert als | ||
| 25773 | zweites Argument aufgerufen wird. Als Ergebnis muss ein Wert geliefert | ||
| 25774 | werden, der einen zulässigen neuen Parameterwert für die Dienstinstanz | ||
| 25775 | darstellt. | ||
| 25776 | @end table | ||
| 25777 | |||
| 25778 | Siehe den Abschnitt @ref{Diensttypen und Dienste} für Beispiele. | ||
| 25779 | @end deftp | ||
| 25780 | |||
| 25781 | @deffn {Scheme-Prozedur} service-extension @var{Zieltyp} @ | ||
| 25782 | @var{Berechner} Liefert eine neue Erweiterung für den Dienst mit dem | ||
| 25783 | @var{Zieltyp}. Als @var{Berechner} muss eine Prozedur angegeben werden, die | ||
| 25784 | ein einzelnes Argument nimmt: @code{fold-services} ruft sie auf und übergibt | ||
| 25785 | an sie den Wert des erweiternden Dienstes, sie muss dafür einen zulässigen | ||
| 25786 | Wert für den @var{Zieltyp} liefern. | ||
| 25787 | @end deffn | ||
| 25788 | |||
| 25789 | @deffn {Scheme-Prozedur} service-extension? @var{Objekt} | ||
| 25790 | Liefert wahr zurück, wenn das @var{Objekt} eine Diensterweiterung ist. | ||
| 25791 | @end deffn | ||
| 25792 | |||
| 25793 | Manchmal wollen Sie vielleicht einfach nur einen bestehenden Dienst | ||
| 25794 | erweitern. Dazu müssten Sie einen neuen Diensttyp definieren und die | ||
| 25795 | Erweiterung definieren, für die Sie sich interessieren, was ganz schön | ||
| 25796 | wortreich werden kann. Mit der Prozedur @code{simple-service} können Sie es | ||
| 25797 | kürzer fassen. | ||
| 25798 | |||
| 25799 | @deffn {Scheme-Prozedur} simple-service @var{Name} @var{Zieltyp} @var{Wert} | ||
| 25800 | Liefert einen Dienst, der den Dienst mit dem @var{Zieltyp} um den @var{Wert} | ||
| 25801 | erweitert. Dazu wird ein Diensttyp mit dem @var{Name}n für den einmaligen | ||
| 25802 | Gebrauch erzeugt, den der zurückgelieferte Dienst instanziiert. | ||
| 25803 | |||
| 25804 | Zum Beispiel kann mcron (siehe @ref{Geplante Auftragsausführung}) so um einen | ||
| 25805 | zusätzlichen Auftrag erweitert werden: | ||
| 25806 | |||
| 25807 | @example | ||
| 25808 | (simple-service 'my-mcron-job mcron-service-type | ||
| 25809 | #~(job '(next-hour (3)) "guix gc -F 2G")) | ||
| 25810 | @end example | ||
| 25811 | @end deffn | ||
| 25812 | |||
| 25813 | Den Kern dieses abstrakten Modells für Dienste bildet die Prozedur | ||
| 25814 | @code{fold-services}, die für das »Kompilieren« einer Liste von Diensten hin | ||
| 25815 | zu einem einzelnen Verzeichnis verantwortlich ist, in welchem alles | ||
| 25816 | enthalten ist, was Sie zum Booten und Hochfahren des Systems brauchen — | ||
| 25817 | d.h.@: das Verzeichnis, das der Befehl @command{guix system build} anzeigt | ||
| 25818 | (siehe @ref{Aufruf von guix system}). Einfach ausgedrückt propagiert | ||
| 25819 | @code{fold-services} Diensterweiterungen durch den Dienstgraphen nach unten | ||
| 25820 | und aktualisiert dabei in jedem Knoten des Graphen dessen Parameter, bis nur | ||
| 25821 | noch der Wurzelknoten übrig bleibt. | ||
| 25822 | |||
| 25823 | @deffn {Scheme-Prozedur} fold-services @var{Dienste} @ | ||
| 25824 | [#:target-type @var{system-service-type}] Faltet die @var{Dienste} wie die | ||
| 25825 | funktionale Prozedur @code{fold} zu einem einzigen zusammen, indem ihre | ||
| 25826 | Erweiterungen nach unten propagiert werden, bis eine Wurzel vom | ||
| 25827 | @var{target-type} als Diensttyp erreicht wird; dieser so angepasste | ||
| 25828 | Wurzeldienst wird zurückgeliefert. | ||
| 25829 | @end deffn | ||
| 25830 | |||
| 25831 | Als Letztes definiert das Modul @code{(gnu services)} noch mehrere | ||
| 25832 | essenzielle Diensttypen, von denen manche im Folgenden aufgelistet sind: | ||
| 25833 | |||
| 25834 | @defvr {Scheme-Variable} system-service-type | ||
| 25835 | Die Wurzel des Dienstgraphen. Davon wird das Systemverzeichnis erzeugt, wie | ||
| 25836 | es vom Befehl @command{guix system build} zurückgeliefert wird. | ||
| 25837 | @end defvr | ||
| 25838 | |||
| 25839 | @defvr {Scheme-Variable} boot-service-type | ||
| 25840 | Der Typ des »Boot-Dienstes«, der das @dfn{Boot-Skript} erzeugt. Das | ||
| 25841 | Boot-Skript ist das, was beim Booten durch die initiale RAM-Disk ausgeführt | ||
| 25842 | wird. | ||
| 25843 | @end defvr | ||
| 25844 | |||
| 25845 | @defvr {Scheme-Variable} etc-service-type | ||
| 25846 | Der Typ des @file{/etc}-Dienstes. Dieser Dienst wird benutzt, um im | ||
| 25847 | @file{/etc}-Verzeichnis Dateien zu platzieren. Er kann erweitert werden, | ||
| 25848 | indem man Name-/Datei-Tupel an ihn übergibt wie in diesem Beispiel: | ||
| 25849 | |||
| 25850 | @example | ||
| 25851 | (list `("issue" ,(plain-file "issue" "Willkommen!\n"))) | ||
| 25852 | @end example | ||
| 25853 | |||
| 25854 | Dieses Beispiel würde bewirken, dass eine Datei @file{/etc/issue} auf die | ||
| 25855 | angegebene Datei verweist. | ||
| 25856 | @end defvr | ||
| 25857 | |||
| 25858 | @defvr {Scheme-Variable} setuid-program-service-type | ||
| 25859 | Der Typ des Dienstes für setuid-Programme, der eine Liste von ausführbaren | ||
| 25860 | Dateien ansammelt, die jeweils als G-Ausdrücke übergeben werden und dann zur | ||
| 25861 | Menge der setuid-gesetzten Programme auf dem System hinzugefügt werden | ||
| 25862 | (siehe @ref{Setuid-Programme}). | ||
| 25863 | @end defvr | ||
| 25864 | |||
| 25865 | @defvr {Scheme-Variable} profile-service-type | ||
| 25866 | Der Typ des Dienstes zum Einfügen von Dateien ins @dfn{Systemprofil} — | ||
| 25867 | d.h.@: die Programme unter @file{/run/current-system/profile}. Andere | ||
| 25868 | Dienste können ihn erweitern, indem sie ihm Listen von ins Systemprofil zu | ||
| 25869 | installierenden Paketen übergeben. | ||
| 25870 | @end defvr | ||
| 25871 | |||
| 25872 | |||
| 25873 | @node Shepherd-Dienste | ||
| 25874 | @subsection Shepherd-Dienste | ||
| 25875 | |||
| 25876 | @cindex Shepherd-Dienste | ||
| 25877 | @cindex PID 1 | ||
| 25878 | @cindex init-System | ||
| 25879 | Das Modul @code{(gnu services shepherd)} gibt eine Methode an, mit der | ||
| 25880 | Dienste definiert werden können, die von GNU@tie{}Shepherd verwaltet werden, | ||
| 25881 | was das Initialisierungssystem (das »init«-System) ist — es ist der erste | ||
| 25882 | Prozess, der gestartet wird, wenn das System gebootet wird, auch bekannt als | ||
| 25883 | PID@tie{}1 (siehe @ref{Einführung,,, shepherd, The GNU Shepherd Manual}). | ||
| 25884 | |||
| 25885 | Dienste unter dem Shepherd können voneinander abhängen. Zum Beispiel kann es | ||
| 25886 | sein, dass der SSH-Daemon erst gestartet werden darf, nachdem der | ||
| 25887 | Syslog-Daemon gestartet wurde, welcher wiederum erst gestartet werden kann, | ||
| 25888 | sobald alle Dateisysteme eingebunden wurden. Das einfache Betriebssystem, | ||
| 25889 | dessen Definition wir zuvor gesehen haben (siehe @ref{Das Konfigurationssystem nutzen}), ergibt folgenden Dienstgraphen: | ||
| 25890 | |||
| 25891 | @image{images/shepherd-graph,,5in,Typischer Shepherd-Dienstgraph} | ||
| 25892 | |||
| 25893 | Sie können so einen Graphen tatsächlich für jedes Betriebssystem erzeugen | ||
| 25894 | lassen, indem Sie den Befehl @command{guix system shepherd-graph} benutzen | ||
| 25895 | (siehe @ref{system-shepherd-graph, @command{guix system shepherd-graph}}). | ||
| 25896 | |||
| 25897 | The @code{%shepherd-root-service} is a service object representing | ||
| 25898 | PID@tie{}1, of type @code{shepherd-root-service-type}; it can be extended by | ||
| 25899 | passing it lists of @code{<shepherd-service>} objects. | ||
| 25900 | |||
| 25901 | @deftp {Datentyp} shepherd-service | ||
| 25902 | Der Datentyp, der einen von Shepherd verwalteten Dienst repräsentiert. | ||
| 25903 | |||
| 25904 | @table @asis | ||
| 25905 | @item @code{provision} | ||
| 25906 | Diese Liste von Symbolen gibt an, was vom Dienst angeboten wird. | ||
| 25907 | |||
| 25908 | Das bedeutet, es sind die Namen, die an @command{herd start}, @command{herd | ||
| 25909 | status} und ähnliche Befehle übergeben werden können (siehe @ref{Invoking | ||
| 25910 | herd,,, shepherd, The GNU Shepherd Manual}). Siehe @ref{Slots of services, | ||
| 25911 | the @code{provides} slot,, shepherd, The GNU Shepherd Manual} für Details. | ||
| 25912 | |||
| 25913 | @item @code{requirements} (Vorgabe: @code{'()}) | ||
| 25914 | Eine Liste von Symbolen, die angegeben, von welchen anderen | ||
| 25915 | Shepherd-Diensten dieser hier abhängt. | ||
| 25916 | |||
| 25917 | @item @code{respawn?} (Vorgabe: @code{#t}) | ||
| 25918 | Ob der Dienst neu gestartet werden soll, nachdem er gestoppt wurde, zum | ||
| 25919 | Beispiel wenn der ihm zu Grunde liegende Prozess terminiert wird. | ||
| 25920 | |||
| 25921 | @item @code{start} | ||
| 25922 | @itemx @code{stop} (Vorgabe: @code{#~(const #f)}) | ||
| 25923 | Die Felder @code{start} und @code{stop} beziehen sich auf Shepherds | ||
| 25924 | Funktionen zum Starten und Stoppen von Prozessen (siehe @ref{Service De- and | ||
| 25925 | Constructors,,, shepherd, The GNU Shepherd Manual}). Sie enthalten | ||
| 25926 | G-Ausdrücke, die in eine Shepherd-Konfigurationdatei umgeschrieben werden | ||
| 25927 | (siehe @ref{G-Ausdrücke}). | ||
| 25928 | |||
| 25929 | @item @code{actions} (Vorgabe: @code{'()}) | ||
| 25930 | @cindex Aktionen, bei Shepherd-Diensten | ||
| 25931 | Dies ist eine Liste von @code{shepherd-action}-Objekten (siehe unten), die | ||
| 25932 | vom Dienst zusätzlich unterstützte @dfn{Aktionen} neben den Standardaktionen | ||
| 25933 | @code{start} und @code{stop} angeben. Hier aufgeführte Aktionen werden als | ||
| 25934 | @command{herd}-Unterbefehle verfügbar gemacht: | ||
| 25935 | |||
| 25936 | @example | ||
| 25937 | herd @var{Aktion} @var{Dienst} [@var{Argumente}@dots{}] | ||
| 25938 | @end example | ||
| 25939 | |||
| 25940 | @item @code{Dokumentation} | ||
| 25941 | Eine Zeichenkette zur Dokumentation, die angezeigt wird, wenn man dies | ||
| 25942 | ausführt: | ||
| 25943 | |||
| 25944 | @example | ||
| 25945 | herd doc @var{Dienstname} | ||
| 25946 | @end example | ||
| 25947 | |||
| 25948 | where @var{service-name} is one of the symbols in @code{provision} | ||
| 25949 | (@pxref{Invoking herd,,, shepherd, The GNU Shepherd Manual}). | ||
| 25950 | |||
| 25951 | @item @code{modules} (default: @code{%default-modules}) | ||
| 25952 | Dies ist die Liste der Module, die in den Sichtbarkeitsbereich geladen sein | ||
| 25953 | müssen, wenn @code{start} und @code{stop} ausgewertet werden. | ||
| 25954 | |||
| 25955 | @end table | ||
| 25956 | @end deftp | ||
| 25957 | |||
| 25958 | @deftp {Datentyp} shepherd-action | ||
| 25959 | Dieser Datentyp definiert zusätzliche Aktionen, die ein Shepherd-Dienst | ||
| 25960 | implementiert (siehe oben). | ||
| 25961 | |||
| 25962 | @table @code | ||
| 25963 | @item name | ||
| 25964 | Die Aktion bezeichnendes Symbol. | ||
| 25965 | |||
| 25966 | @item Dokumentation | ||
| 25967 | Diese Zeichenkette ist die Dokumentation für die Aktion. Sie können sie | ||
| 25968 | sehen, wenn Sie dies ausführen: | ||
| 25969 | |||
| 25970 | @example | ||
| 25971 | herd doc @var{Dienst} action @var{Aktion} | ||
| 25972 | @end example | ||
| 25973 | |||
| 25974 | @item procedure | ||
| 25975 | Dies sollte ein G-Ausdruck sein, der zu einer mindestens ein Argument | ||
| 25976 | nehmenden Prozedur ausgewertet wird. Das Argument ist der »running«-Wert des | ||
| 25977 | Dienstes (siehe @ref{Slots of services,,, shepherd, The GNU Shepherd | ||
| 25978 | Manual}). | ||
| 25979 | @end table | ||
| 25980 | |||
| 25981 | Das folgende Beispiel definiert eine Aktion namens @code{sag-hallo}, die den | ||
| 25982 | Benutzer freundlich begrüßt: | ||
| 25983 | |||
| 25984 | @example | ||
| 25985 | (shepherd-action | ||
| 25986 | (name 'sag-hallo) | ||
| 25987 | (documentation "Sag Hallo!") | ||
| 25988 | (procedure #~(lambda (running . args) | ||
| 25989 | (format #t "Hallo, Freund! Argumente: ~s\n" | ||
| 25990 | args) | ||
| 25991 | #t))) | ||
| 25992 | @end example | ||
| 25993 | |||
| 25994 | Wenn wir annehmen, dass wir die Aktion zum Dienst @code{beispiel} | ||
| 25995 | hinzufügen, können Sie Folgendes ausführen: | ||
| 25996 | |||
| 25997 | @example | ||
| 25998 | # herd sag-hallo beispiel | ||
| 25999 | Hallo, Freund! Argumente: () | ||
| 26000 | # herd sag-hallo beispiel a b c | ||
| 26001 | Hallo, Freund! Argumente: ("a" "b" "c") | ||
| 26002 | @end example | ||
| 26003 | |||
| 26004 | Wie Sie sehen können, ist das eine sehr ausgeklügelte Art, Hallo zu | ||
| 26005 | sagen. Siehe @ref{Service Convenience,,, shepherd, The GNU Shepherd Manual} | ||
| 26006 | für mehr Informationen zu Aktionen. | ||
| 26007 | @end deftp | ||
| 26008 | |||
| 26009 | @defvr {Scheme-Variable} shepherd-root-service-type | ||
| 26010 | Der Diensttyp für den Shepherd-»Wurzeldienst« — also für PID@tie{}1. | ||
| 26011 | |||
| 26012 | Dieser Diensttyp stellt das Ziel für Diensterweiterungen dar, die | ||
| 26013 | Shepherd-Dienste erzeugen sollen (siehe @ref{Diensttypen und Dienste} für | ||
| 26014 | ein Beispiel). Jede Erweiterung muss eine Liste von | ||
| 26015 | @code{<shepherd-service>}-Objekten übergeben. | ||
| 26016 | @end defvr | ||
| 26017 | |||
| 26018 | @defvr {Scheme-Variable} %shepherd-root-service | ||
| 26019 | Dieser Dienst repräsentiert PID@tie{}1. | ||
| 26020 | @end defvr | ||
| 26021 | |||
| 26022 | |||
| 26023 | @node Dokumentation | ||
| 26024 | @chapter Dokumentation | ||
| 26025 | |||
| 26026 | @cindex documentation, searching for | ||
| 26027 | @cindex searching for documentation | ||
| 26028 | @cindex Info, documentation format | ||
| 26029 | @cindex man pages | ||
| 26030 | @cindex manual pages | ||
| 26031 | In most cases packages installed with Guix come with documentation. There | ||
| 26032 | are two main documentation formats: ``Info'', a browseable hypertext format | ||
| 26033 | used for GNU software, and ``manual pages'' (or ``man pages''), the linear | ||
| 26034 | documentation format traditionally found on Unix. Info manuals are accessed | ||
| 26035 | with the @command{info} command or with Emacs, and man pages are accessed | ||
| 26036 | using @command{man}. | ||
| 26037 | |||
| 26038 | You can look for documentation of software installed on your system by | ||
| 26039 | keyword. For example, the following command searches for information about | ||
| 26040 | ``TLS'' in Info manuals: | ||
| 26041 | |||
| 26042 | @example | ||
| 26043 | $ info -k TLS | ||
| 26044 | "(emacs)Network Security" -- STARTTLS | ||
| 26045 | "(emacs)Network Security" -- TLS | ||
| 26046 | "(gnutls)Core TLS API" -- gnutls_certificate_set_verify_flags | ||
| 26047 | "(gnutls)Core TLS API" -- gnutls_certificate_set_verify_function | ||
| 26048 | @dots{} | ||
| 26049 | @end example | ||
| 26050 | |||
| 26051 | @noindent | ||
| 26052 | The command below searches for the same keyword in man pages: | ||
| 26053 | |||
| 26054 | @example | ||
| 26055 | $ man -k TLS | ||
| 26056 | SSL (7) - OpenSSL SSL/TLS library | ||
| 26057 | certtool (1) - GnuTLS certificate tool | ||
| 26058 | @dots {} | ||
| 26059 | @end example | ||
| 26060 | |||
| 26061 | These searches are purely local to your computer so you have the guarantee | ||
| 26062 | that documentation you find corresponds to what you have actually installed, | ||
| 26063 | you can access it off-line, and your privacy is respected. | ||
| 26064 | |||
| 26065 | Once you have these results, you can view the relevant documentation by | ||
| 26066 | running, say: | ||
| 26067 | |||
| 26068 | @example | ||
| 26069 | $ info "(gnutls)Core TLS API" | ||
| 26070 | @end example | ||
| 26071 | |||
| 26072 | @noindent | ||
| 26073 | or: | ||
| 26074 | |||
| 26075 | @example | ||
| 26076 | $ man certtool | ||
| 26077 | @end example | ||
| 26078 | |||
| 26079 | Info manuals contain sections and indices as well as hyperlinks like those | ||
| 26080 | found in Web pages. The @command{info} reader (@pxref{Top, Info reader,, | ||
| 26081 | info-stnd, Stand-alone GNU Info}) and its Emacs counterpart (@pxref{Misc | ||
| 26082 | Help,,, emacs, The GNU Emacs Manual}) provide intuitive key bindings to | ||
| 26083 | navigate manuals. @xref{Getting Started,,, info, Info: An Introduction}, | ||
| 26084 | for an introduction to Info navigation. | ||
| 26085 | |||
| 26086 | @node Dateien zur Fehlersuche installieren | ||
| 26087 | @chapter Dateien zur Fehlersuche installieren | ||
| 26088 | |||
| 26089 | @cindex debugging files | ||
| 26090 | Program binaries, as produced by the GCC compilers for instance, are | ||
| 26091 | typically written in the ELF format, with a section containing | ||
| 26092 | @dfn{debugging information}. Debugging information is what allows the | ||
| 26093 | debugger, GDB, to map binary code to source code; it is required to debug a | ||
| 26094 | compiled program in good conditions. | ||
| 26095 | |||
| 26096 | The problem with debugging information is that is takes up a fair amount of | ||
| 26097 | disk space. For example, debugging information for the GNU C Library weighs | ||
| 26098 | in at more than 60 MiB. Thus, as a user, keeping all the debugging info of | ||
| 26099 | all the installed programs is usually not an option. Yet, space savings | ||
| 26100 | should not come at the cost of an impediment to debugging---especially in | ||
| 26101 | the GNU system, which should make it easier for users to exert their | ||
| 26102 | computing freedom (@pxref{GNU-Distribution}). | ||
| 26103 | |||
| 26104 | Thankfully, the GNU Binary Utilities (Binutils) and GDB provide a mechanism | ||
| 26105 | that allows users to get the best of both worlds: debugging information can | ||
| 26106 | be stripped from the binaries and stored in separate files. GDB is then | ||
| 26107 | able to load debugging information from those files, when they are available | ||
| 26108 | (@pxref{Separate Debug Files,,, gdb, Debugging with GDB}). | ||
| 26109 | |||
| 26110 | The GNU distribution takes advantage of this by storing debugging | ||
| 26111 | information in the @code{lib/debug} sub-directory of a separate package | ||
| 26112 | output unimaginatively called @code{debug} (@pxref{Pakete mit mehreren Ausgaben.}). Users can choose to install the @code{debug} output of a package | ||
| 26113 | when they need it. For instance, the following command installs the | ||
| 26114 | debugging information for the GNU C Library and for GNU Guile: | ||
| 26115 | |||
| 26116 | @example | ||
| 26117 | guix package -i glibc:debug guile:debug | ||
| 26118 | @end example | ||
| 26119 | |||
| 26120 | GDB must then be told to look for debug files in the user's profile, by | ||
| 26121 | setting the @code{debug-file-directory} variable (consider setting it from | ||
| 26122 | the @file{~/.gdbinit} file, @pxref{Startup,,, gdb, Debugging with GDB}): | ||
| 26123 | |||
| 26124 | @example | ||
| 26125 | (gdb) set debug-file-directory ~/.guix-profile/lib/debug | ||
| 26126 | @end example | ||
| 26127 | |||
| 26128 | From there on, GDB will pick up debugging information from the @code{.debug} | ||
| 26129 | files under @file{~/.guix-profile/lib/debug}. | ||
| 26130 | |||
| 26131 | In addition, you will most likely want GDB to be able to show the source | ||
| 26132 | code being debugged. To do that, you will have to unpack the source code of | ||
| 26133 | the package of interest (obtained with @code{guix build --source}, | ||
| 26134 | @pxref{Aufruf von guix build}), and to point GDB to that source directory | ||
| 26135 | using the @code{directory} command (@pxref{Source Path, @code{directory},, | ||
| 26136 | gdb, Debugging with GDB}). | ||
| 26137 | |||
| 26138 | @c XXX: keep me up-to-date | ||
| 26139 | The @code{debug} output mechanism in Guix is implemented by the | ||
| 26140 | @code{gnu-build-system} (@pxref{Erstellungssysteme}). Currently, it is | ||
| 26141 | opt-in---debugging information is available only for the packages with | ||
| 26142 | definitions explicitly declaring a @code{debug} output. This may be changed | ||
| 26143 | to opt-out in the future if our build farm servers can handle the load. To | ||
| 26144 | check whether a package has a @code{debug} output, use @command{guix package | ||
| 26145 | --list-available} (@pxref{Aufruf von guix package}). | ||
| 26146 | |||
| 26147 | |||
| 26148 | @node Sicherheitsaktualisierungen | ||
| 26149 | @chapter Sicherheitsaktualisierungen | ||
| 26150 | |||
| 26151 | @cindex security updates | ||
| 26152 | @cindex Sicherheitslücken | ||
| 26153 | Occasionally, important security vulnerabilities are discovered in software | ||
| 26154 | packages and must be patched. Guix developers try hard to keep track of | ||
| 26155 | known vulnerabilities and to apply fixes as soon as possible in the | ||
| 26156 | @code{master} branch of Guix (we do not yet provide a ``stable'' branch | ||
| 26157 | containing only security updates.) The @command{guix lint} tool helps | ||
| 26158 | developers find out about vulnerable versions of software packages in the | ||
| 26159 | distribution: | ||
| 26160 | |||
| 26161 | @smallexample | ||
| 26162 | $ guix lint -c cve | ||
| 26163 | gnu/packages/base.scm:652:2: glibc@@2.21: probably vulnerable to CVE-2015-1781, CVE-2015-7547 | ||
| 26164 | gnu/packages/gcc.scm:334:2: gcc@@4.9.3: probably vulnerable to CVE-2015-5276 | ||
| 26165 | gnu/packages/image.scm:312:2: openjpeg@@2.1.0: probably vulnerable to CVE-2016-1923, CVE-2016-1924 | ||
| 26166 | @dots{} | ||
| 26167 | @end smallexample | ||
| 26168 | |||
| 26169 | @xref{Aufruf von guix lint}, for more information. | ||
| 26170 | |||
| 26171 | @quotation Anmerkung | ||
| 26172 | As of version @value{VERSION}, the feature described below is considered | ||
| 26173 | ``beta''. | ||
| 26174 | @end quotation | ||
| 26175 | |||
| 26176 | Guix follows a functional package management discipline | ||
| 26177 | (@pxref{Einführung}), which implies that, when a package is changed, | ||
| 26178 | @emph{every package that depends on it} must be rebuilt. This can | ||
| 26179 | significantly slow down the deployment of fixes in core packages such as | ||
| 26180 | libc or Bash, since basically the whole distribution would need to be | ||
| 26181 | rebuilt. Using pre-built binaries helps (@pxref{Substitute}), but | ||
| 26182 | deployment may still take more time than desired. | ||
| 26183 | |||
| 26184 | @cindex grafts | ||
| 26185 | To address this, Guix implements @dfn{grafts}, a mechanism that allows for | ||
| 26186 | fast deployment of critical updates without the costs associated with a | ||
| 26187 | whole-distribution rebuild. The idea is to rebuild only the package that | ||
| 26188 | needs to be patched, and then to ``graft'' it onto packages explicitly | ||
| 26189 | installed by the user and that were previously referring to the original | ||
| 26190 | package. The cost of grafting is typically very low, and order of | ||
| 26191 | magnitudes lower than a full rebuild of the dependency chain. | ||
| 26192 | |||
| 26193 | @cindex replacements of packages, for grafts | ||
| 26194 | For instance, suppose a security update needs to be applied to Bash. Guix | ||
| 26195 | developers will provide a package definition for the ``fixed'' Bash, say | ||
| 26196 | @code{bash-fixed}, in the usual way (@pxref{Pakete definieren}). Then, the | ||
| 26197 | original package definition is augmented with a @code{replacement} field | ||
| 26198 | pointing to the package containing the bug fix: | ||
| 26199 | |||
| 26200 | @example | ||
| 26201 | (define bash | ||
| 26202 | (package | ||
| 26203 | (name "bash") | ||
| 26204 | ;; @dots{} | ||
| 26205 | (replacement bash-fixed))) | ||
| 26206 | @end example | ||
| 26207 | |||
| 26208 | From there on, any package depending directly or indirectly on Bash---as | ||
| 26209 | reported by @command{guix gc --requisites} (@pxref{Aufruf von guix gc})---that | ||
| 26210 | is installed is automatically ``rewritten'' to refer to @code{bash-fixed} | ||
| 26211 | instead of @code{bash}. This grafting process takes time proportional to | ||
| 26212 | the size of the package, usually less than a minute for an ``average'' | ||
| 26213 | package on a recent machine. Grafting is recursive: when an indirect | ||
| 26214 | dependency requires grafting, then grafting ``propagates'' up to the package | ||
| 26215 | that the user is installing. | ||
| 26216 | |||
| 26217 | Currently, the length of the name and version of the graft and that of the | ||
| 26218 | package it replaces (@code{bash-fixed} and @code{bash} in the example above) | ||
| 26219 | must be equal. This restriction mostly comes from the fact that grafting | ||
| 26220 | works by patching files, including binary files, directly. Other | ||
| 26221 | restrictions may apply: for instance, when adding a graft to a package | ||
| 26222 | providing a shared library, the original shared library and its replacement | ||
| 26223 | must have the same @code{SONAME} and be binary-compatible. | ||
| 26224 | |||
| 26225 | The @option{--no-grafts} command-line option allows you to forcefully avoid | ||
| 26226 | grafting (@pxref{Gemeinsame Erstellungsoptionen, @option{--no-grafts}}). Thus, the | ||
| 26227 | command: | ||
| 26228 | |||
| 26229 | @example | ||
| 26230 | guix build bash --no-grafts | ||
| 26231 | @end example | ||
| 26232 | |||
| 26233 | @noindent | ||
| 26234 | returns the store file name of the original Bash, whereas: | ||
| 26235 | |||
| 26236 | @example | ||
| 26237 | guix build bash | ||
| 26238 | @end example | ||
| 26239 | |||
| 26240 | @noindent | ||
| 26241 | returns the store file name of the ``fixed'', replacement Bash. This allows | ||
| 26242 | you to distinguish between the two variants of Bash. | ||
| 26243 | |||
| 26244 | To verify which Bash your whole profile refers to, you can run | ||
| 26245 | (@pxref{Aufruf von guix gc}): | ||
| 26246 | |||
| 26247 | @example | ||
| 26248 | guix gc -R `readlink -f ~/.guix-profile` | grep bash | ||
| 26249 | @end example | ||
| 26250 | |||
| 26251 | @noindent | ||
| 26252 | @dots{} and compare the store file names that you get with those above. | ||
| 26253 | Likewise for a complete Guix system generation: | ||
| 26254 | |||
| 26255 | @example | ||
| 26256 | guix gc -R `guix system build my-config.scm` | grep bash | ||
| 26257 | @end example | ||
| 26258 | |||
| 26259 | Lastly, to check which Bash running processes are using, you can use the | ||
| 26260 | @command{lsof} command: | ||
| 26261 | |||
| 26262 | @example | ||
| 26263 | lsof | grep /gnu/store/.*bash | ||
| 26264 | @end example | ||
| 26265 | |||
| 26266 | |||
| 26267 | @node Bootstrapping | ||
| 26268 | @chapter Bootstrapping | ||
| 26269 | |||
| 26270 | @c Adapted from the ELS 2013 paper. | ||
| 26271 | |||
| 26272 | @cindex bootstrapping | ||
| 26273 | |||
| 26274 | Bootstrapping in our context refers to how the distribution gets built | ||
| 26275 | ``from nothing''. Remember that the build environment of a derivation | ||
| 26276 | contains nothing but its declared inputs (@pxref{Einführung}). So there's | ||
| 26277 | an obvious chicken-and-egg problem: how does the first package get built? | ||
| 26278 | How does the first compiler get compiled? Note that this is a question of | ||
| 26279 | interest only to the curious hacker, not to the regular user, so you can | ||
| 26280 | shamelessly skip this section if you consider yourself a ``regular user''. | ||
| 26281 | |||
| 26282 | @cindex bootstrap binaries | ||
| 26283 | The GNU system is primarily made of C code, with libc at its core. The GNU | ||
| 26284 | build system itself assumes the availability of a Bourne shell and | ||
| 26285 | command-line tools provided by GNU Coreutils, Awk, Findutils, `sed', and | ||
| 26286 | `grep'. Furthermore, build programs---programs that run @code{./configure}, | ||
| 26287 | @code{make}, etc.---are written in Guile Scheme (@pxref{Ableitungen}). | ||
| 26288 | Consequently, to be able to build anything at all, from scratch, Guix relies | ||
| 26289 | on pre-built binaries of Guile, GCC, Binutils, libc, and the other packages | ||
| 26290 | mentioned above---the @dfn{bootstrap binaries}. | ||
| 26291 | |||
| 26292 | These bootstrap binaries are ``taken for granted'', though we can also | ||
| 26293 | re-create them if needed (more on that later). | ||
| 26294 | |||
| 26295 | @unnumberedsec Preparing to Use the Bootstrap Binaries | ||
| 26296 | |||
| 26297 | @c As of Emacs 24.3, Info-mode displays the image, but since it's a | ||
| 26298 | @c large image, it's hard to scroll. Oh well. | ||
| 26299 | @image{images/bootstrap-graph,6in,,Dependency graph of the early bootstrap | ||
| 26300 | derivations} | ||
| 26301 | |||
| 26302 | The figure above shows the very beginning of the dependency graph of the | ||
| 26303 | distribution, corresponding to the package definitions of the @code{(gnu | ||
| 26304 | packages bootstrap)} module. A similar figure can be generated with | ||
| 26305 | @command{guix graph} (@pxref{Aufruf von guix graph}), along the lines of: | ||
| 26306 | |||
| 26307 | @example | ||
| 26308 | guix graph -t derivation \ | ||
| 26309 | -e '(@@@@ (gnu packages bootstrap) %bootstrap-gcc)' \ | ||
| 26310 | | dot -Tps > t.ps | ||
| 26311 | @end example | ||
| 26312 | |||
| 26313 | At this level of detail, things are slightly complex. First, Guile itself | ||
| 26314 | consists of an ELF executable, along with many source and compiled Scheme | ||
| 26315 | files that are dynamically loaded when it runs. This gets stored in the | ||
| 26316 | @file{guile-2.0.7.tar.xz} tarball shown in this graph. This tarball is part | ||
| 26317 | of Guix's ``source'' distribution, and gets inserted into the store with | ||
| 26318 | @code{add-to-store} (@pxref{Der Store}). | ||
| 26319 | |||
| 26320 | But how do we write a derivation that unpacks this tarball and adds it to | ||
| 26321 | the store? To solve this problem, the @code{guile-bootstrap-2.0.drv} | ||
| 26322 | derivation---the first one that gets built---uses @code{bash} as its | ||
| 26323 | builder, which runs @code{build-bootstrap-guile.sh}, which in turn calls | ||
| 26324 | @code{tar} to unpack the tarball. Thus, @file{bash}, @file{tar}, @file{xz}, | ||
| 26325 | and @file{mkdir} are statically-linked binaries, also part of the Guix | ||
| 26326 | source distribution, whose sole purpose is to allow the Guile tarball to be | ||
| 26327 | unpacked. | ||
| 26328 | |||
| 26329 | Once @code{guile-bootstrap-2.0.drv} is built, we have a functioning Guile | ||
| 26330 | that can be used to run subsequent build programs. Its first task is to | ||
| 26331 | download tarballs containing the other pre-built binaries---this is what the | ||
| 26332 | @code{.tar.xz.drv} derivations do. Guix modules such as | ||
| 26333 | @code{ftp-client.scm} are used for this purpose. The | ||
| 26334 | @code{module-import.drv} derivations import those modules in a directory in | ||
| 26335 | the store, using the original layout. The @code{module-import-compiled.drv} | ||
| 26336 | derivations compile those modules, and write them in an output directory | ||
| 26337 | with the right layout. This corresponds to the @code{#:modules} argument of | ||
| 26338 | @code{build-expression->derivation} (@pxref{Ableitungen}). | ||
| 26339 | |||
| 26340 | Finally, the various tarballs are unpacked by the derivations | ||
| 26341 | @code{gcc-bootstrap-0.drv}, @code{glibc-bootstrap-0.drv}, etc., at which | ||
| 26342 | point we have a working C tool chain. | ||
| 26343 | |||
| 26344 | |||
| 26345 | @unnumberedsec Building the Build Tools | ||
| 26346 | |||
| 26347 | Bootstrapping is complete when we have a full tool chain that does not | ||
| 26348 | depend on the pre-built bootstrap tools discussed above. This no-dependency | ||
| 26349 | requirement is verified by checking whether the files of the final tool | ||
| 26350 | chain contain references to the @file{/gnu/store} directories of the | ||
| 26351 | bootstrap inputs. The process that leads to this ``final'' tool chain is | ||
| 26352 | described by the package definitions found in the @code{(gnu packages | ||
| 26353 | commencement)} module. | ||
| 26354 | |||
| 26355 | The @command{guix graph} command allows us to ``zoom out'' compared to the | ||
| 26356 | graph above, by looking at the level of package objects instead of | ||
| 26357 | individual derivations---remember that a package may translate to several | ||
| 26358 | derivations, typically one derivation to download its source, one to build | ||
| 26359 | the Guile modules it needs, and one to actually build the package from | ||
| 26360 | source. The command: | ||
| 26361 | |||
| 26362 | @example | ||
| 26363 | guix graph -t bag \ | ||
| 26364 | -e '(@@@@ (gnu packages commencement) | ||
| 26365 | glibc-final-with-bootstrap-bash)' | dot -Tps > t.ps | ||
| 26366 | @end example | ||
| 26367 | |||
| 26368 | @noindent | ||
| 26369 | produces the dependency graph leading to the ``final'' C | ||
| 26370 | library@footnote{You may notice the @code{glibc-intermediate} label, | ||
| 26371 | suggesting that it is not @emph{quite} final, but as a good approximation, | ||
| 26372 | we will consider it final.}, depicted below. | ||
| 26373 | |||
| 26374 | @image{images/bootstrap-packages,6in,,Dependency graph of the early | ||
| 26375 | packages} | ||
| 26376 | |||
| 26377 | @c See <http://lists.gnu.org/archive/html/gnu-system-discuss/2012-10/msg00000.html>. | ||
| 26378 | The first tool that gets built with the bootstrap binaries is | ||
| 26379 | GNU@tie{}Make---noted @code{make-boot0} above---which is a prerequisite for | ||
| 26380 | all the following packages. From there Findutils and Diffutils get built. | ||
| 26381 | |||
| 26382 | Then come the first-stage Binutils and GCC, built as pseudo cross | ||
| 26383 | tools---i.e., with @code{--target} equal to @code{--host}. They are used to | ||
| 26384 | build libc. Thanks to this cross-build trick, this libc is guaranteed not | ||
| 26385 | to hold any reference to the initial tool chain. | ||
| 26386 | |||
| 26387 | From there the final Binutils and GCC (not shown above) are built. GCC uses | ||
| 26388 | @code{ld} from the final Binutils, and links programs against the just-built | ||
| 26389 | libc. This tool chain is used to build the other packages used by Guix and | ||
| 26390 | by the GNU Build System: Guile, Bash, Coreutils, etc. | ||
| 26391 | |||
| 26392 | And voilà! At this point we have the complete set of build tools that the | ||
| 26393 | GNU Build System expects. These are in the @code{%final-inputs} variable of | ||
| 26394 | the @code{(gnu packages commencement)} module, and are implicitly used by | ||
| 26395 | any package that uses @code{gnu-build-system} (@pxref{Erstellungssysteme, | ||
| 26396 | @code{gnu-build-system}}). | ||
| 26397 | |||
| 26398 | |||
| 26399 | @unnumberedsec Building the Bootstrap Binaries | ||
| 26400 | |||
| 26401 | @cindex bootstrap binaries | ||
| 26402 | Because the final tool chain does not depend on the bootstrap binaries, | ||
| 26403 | those rarely need to be updated. Nevertheless, it is useful to have an | ||
| 26404 | automated way to produce them, should an update occur, and this is what the | ||
| 26405 | @code{(gnu packages make-bootstrap)} module provides. | ||
| 26406 | |||
| 26407 | The following command builds the tarballs containing the bootstrap binaries | ||
| 26408 | (Guile, Binutils, GCC, libc, and a tarball containing a mixture of Coreutils | ||
| 26409 | and other basic command-line tools): | ||
| 26410 | |||
| 26411 | @example | ||
| 26412 | guix build bootstrap-tarballs | ||
| 26413 | @end example | ||
| 26414 | |||
| 26415 | The generated tarballs are those that should be referred to in the | ||
| 26416 | @code{(gnu packages bootstrap)} module mentioned at the beginning of this | ||
| 26417 | section. | ||
| 26418 | |||
| 26419 | Still here? Then perhaps by now you've started to wonder: when do we reach a | ||
| 26420 | fixed point? That is an interesting question! The answer is unknown, but if | ||
| 26421 | you would like to investigate further (and have significant computational | ||
| 26422 | and storage resources to do so), then let us know. | ||
| 26423 | |||
| 26424 | @unnumberedsec Reducing the Set of Bootstrap Binaries | ||
| 26425 | |||
| 26426 | Our bootstrap binaries currently include GCC, Guile, etc. That's a lot of | ||
| 26427 | binary code! Why is that a problem? It's a problem because these big chunks | ||
| 26428 | of binary code are practically non-auditable, which makes it hard to | ||
| 26429 | establish what source code produced them. Every unauditable binary also | ||
| 26430 | leaves us vulnerable to compiler backdoors as described by Ken Thompson in | ||
| 26431 | the 1984 paper @emph{Reflections on Trusting Trust}. | ||
| 26432 | |||
| 26433 | This is mitigated by the fact that our bootstrap binaries were generated | ||
| 26434 | from an earlier Guix revision. Nevertheless it lacks the level of | ||
| 26435 | transparency that we get in the rest of the package dependency graph, where | ||
| 26436 | Guix always gives us a source-to-binary mapping. Thus, our goal is to | ||
| 26437 | reduce the set of bootstrap binaries to the bare minimum. | ||
| 26438 | |||
| 26439 | The @uref{http://bootstrappable.org, Bootstrappable.org web site} lists | ||
| 26440 | on-going projects to do that. One of these is about replacing the bootstrap | ||
| 26441 | GCC with a sequence of assemblers, interpreters, and compilers of increasing | ||
| 26442 | complexity, which could be built from source starting from a simple and | ||
| 26443 | auditable assembler. Your help is welcome! | ||
| 26444 | |||
| 26445 | |||
| 26446 | @node Portierung | ||
| 26447 | @chapter Porting to a New Platform | ||
| 26448 | |||
| 26449 | As discussed above, the GNU distribution is self-contained, and | ||
| 26450 | self-containment is achieved by relying on pre-built ``bootstrap binaries'' | ||
| 26451 | (@pxref{Bootstrapping}). These binaries are specific to an operating system | ||
| 26452 | kernel, CPU architecture, and application binary interface (ABI). Thus, to | ||
| 26453 | port the distribution to a platform that is not yet supported, one must | ||
| 26454 | build those bootstrap binaries, and update the @code{(gnu packages | ||
| 26455 | bootstrap)} module to use them on that platform. | ||
| 26456 | |||
| 26457 | Fortunately, Guix can @emph{cross compile} those bootstrap binaries. When | ||
| 26458 | everything goes well, and assuming the GNU tool chain supports the target | ||
| 26459 | platform, this can be as simple as running a command like this one: | ||
| 26460 | |||
| 26461 | @example | ||
| 26462 | guix build --target=armv5tel-linux-gnueabi bootstrap-tarballs | ||
| 26463 | @end example | ||
| 26464 | |||
| 26465 | For this to work, the @code{glibc-dynamic-linker} procedure in @code{(gnu | ||
| 26466 | packages bootstrap)} must be augmented to return the right file name for | ||
| 26467 | libc's dynamic linker on that platform; likewise, | ||
| 26468 | @code{system->linux-architecture} in @code{(gnu packages linux)} must be | ||
| 26469 | taught about the new platform. | ||
| 26470 | |||
| 26471 | Once these are built, the @code{(gnu packages bootstrap)} module needs to be | ||
| 26472 | updated to refer to these binaries on the target platform. That is, the | ||
| 26473 | hashes and URLs of the bootstrap tarballs for the new platform must be added | ||
| 26474 | alongside those of the currently supported platforms. The bootstrap Guile | ||
| 26475 | tarball is treated specially: it is expected to be available locally, and | ||
| 26476 | @file{gnu/local.mk} has rules to download it for the supported | ||
| 26477 | architectures; a rule for the new platform must be added as well. | ||
| 26478 | |||
| 26479 | In practice, there may be some complications. First, it may be that the | ||
| 26480 | extended GNU triplet that specifies an ABI (like the @code{eabi} suffix | ||
| 26481 | above) is not recognized by all the GNU tools. Typically, glibc recognizes | ||
| 26482 | some of these, whereas GCC uses an extra @code{--with-abi} configure flag | ||
| 26483 | (see @code{gcc.scm} for examples of how to handle this). Second, some of | ||
| 26484 | the required packages could fail to build for that platform. Lastly, the | ||
| 26485 | generated binaries could be broken for some reason. | ||
| 26486 | |||
| 26487 | @c ********************************************************************* | ||
| 26488 | @include contributing.de.texi | ||
| 26489 | |||
| 26490 | @c ********************************************************************* | ||
| 26491 | @node Danksagungen | ||
| 26492 | @chapter Danksagungen | ||
| 26493 | |||
| 26494 | Guix baut auf dem @uref{http://nixos.org/nix/, Nix-Paketverwaltungsprogramm} | ||
| 26495 | auf, das von Eelco Dolstra entworfen und entwickelt wurde, mit Beiträgen von | ||
| 26496 | anderen Leuten (siehe die Datei @file{nix/AUTHORS} in Guix). Nix hat für die | ||
| 26497 | funktionale Paketverwaltung die Pionierarbeit geleistet und noch nie | ||
| 26498 | dagewesene Funktionalitäten vorangetrieben wie transaktionsbasierte | ||
| 26499 | Paketaktualisierungen und die Rücksetzbarkeit selbiger, eigene Paketprofile | ||
| 26500 | für jeden Nutzer und referenziell transparente Erstellungsprozesse. Ohne | ||
| 26501 | diese Arbeit gäbe es Guix nicht. | ||
| 26502 | |||
| 26503 | Die Nix-basierten Software-Distributionen Nixpkgs und NixOS waren auch eine | ||
| 26504 | Inspiration für Guix. | ||
| 26505 | |||
| 26506 | GNU@tie{}Guix ist selbst das Produkt kollektiver Arbeit mit Beiträgen durch | ||
| 26507 | eine Vielzahl von Leuten. Siehe die Datei @file{AUTHORS} in Guix für mehr | ||
| 26508 | Informationen, wer diese wunderbaren Menschen sind. In der Datei | ||
| 26509 | @file{THANKS} finden Sie eine Liste der Leute, die uns geholfen haben, indem | ||
| 26510 | Sie Fehler gemeldet, sich um unsere Infrastruktur gekümmert, künstlerische | ||
| 26511 | Arbeit und schön gestaltete Themen beigesteuert, Vorschläge gemacht und noch | ||
| 26512 | vieles mehr getan haben — vielen Dank! | ||
| 26513 | |||
| 26514 | |||
| 26515 | @c ********************************************************************* | ||
| 26516 | @node GNU-Lizenz für freie Dokumentation | ||
| 26517 | @appendix GNU-Lizenz für freie Dokumentation | ||
| 26518 | @cindex Lizenz, GNU-Lizenz für freie Dokumentation | ||
| 26519 | @include fdl-1.3.texi | ||
| 26520 | |||
| 26521 | @c ********************************************************************* | ||
| 26522 | @node Konzeptverzeichnis | ||
| 26523 | @unnumbered Konzeptverzeichnis | ||
| 26524 | @printindex cp | ||
| 26525 | |||
| 26526 | @node Programmierverzeichnis | ||
| 26527 | @unnumbered Programmierverzeichnis | ||
| 26528 | @syncodeindex tp fn | ||
| 26529 | @syncodeindex vr fn | ||
| 26530 | @printindex fn | ||
| 26531 | |||
| 26532 | @bye | ||
| 26533 | |||
| 26534 | @c Local Variables: | ||
| 26535 | @c ispell-local-dictionary: "american"; | ||
| 26536 | @c End: | ||
