summaryrefslogtreecommitdiffstats
path: root/nixos/doc
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-11-23 18:10:33 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-11-23 18:10:33 +0100
commit587538d08767e032f9a50ec28405e94e3627af9b (patch)
tree272e2638607b25b11e8cfaaf4b1f0659fb84c055 /nixos/doc
parent31b7ef797a550b2113055a686f660e1e7c7e50af (diff)
parent9f591befb157f2bc44ba9bdcb24af144c7b5471d (diff)
Merge staging-next into staging
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/configuration/configuration.xml1
-rw-r--r--nixos/doc/manual/configuration/subversion.xml140
-rw-r--r--nixos/doc/manual/release-notes/rl-2103.xml42
3 files changed, 183 insertions, 0 deletions
diff --git a/nixos/doc/manual/configuration/configuration.xml b/nixos/doc/manual/configuration/configuration.xml
index 44ff1f1b571a..6949189b8883 100644
--- a/nixos/doc/manual/configuration/configuration.xml
+++ b/nixos/doc/manual/configuration/configuration.xml
@@ -23,6 +23,7 @@
<xi:include href="xfce.xml" />
<xi:include href="networking.xml" />
<xi:include href="linux-kernel.xml" />
+ <xi:include href="subversion.xml" />
<xi:include href="../generated/modules.xml" xpointer="xpointer(//section[@id='modules']/*)" />
<xi:include href="profiles.xml" />
<xi:include href="kubernetes.xml" />
diff --git a/nixos/doc/manual/configuration/subversion.xml b/nixos/doc/manual/configuration/subversion.xml
new file mode 100644
index 000000000000..940d63cc4e6d
--- /dev/null
+++ b/nixos/doc/manual/configuration/subversion.xml
@@ -0,0 +1,140 @@
+<chapter xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ version="5.0"
+ xml:id="module-services-subversion">
+ <title>Subversion</title>
+
+ <para>
+ <link xlink:href="https://subversion.apache.org/">Subversion</link>
+ is a centralized version-control system. It can use a <link
+ xlink:href="http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.serverconfig.choosing">variety
+ of protocols</link> for communication between client and server.
+ </para>
+ <section xml:id="module-services-subversion-apache-httpd">
+ <title>Subversion inside Apache HTTP</title>
+
+ <para>
+ This section focuses on configuring a web-based server on top of
+ the Apache HTTP server, which uses
+ <link xlink:href="http://www.webdav.org/">WebDAV</link>/<link
+ xlink:href="http://www.webdav.org/deltav/WWW10/deltav-intro.htm">DeltaV</link>
+ for communication.
+ </para>
+
+ <para>For more information on the general setup, please refer to
+ the <link
+ xlink:href="http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.serverconfig.httpd">the
+ appropriate section of the Subversion book</link>.
+ </para>
+
+ <para>To configure, include in
+ <literal>/etc/nixos/configuration.nix</literal> code to activate
+ Apache HTTP, setting <xref linkend="opt-services.httpd.adminAddr" />
+ appropriately:
+ </para>
+
+ <para>
+<programlisting>
+ services.httpd.enable = true;
+ services.httpd.adminAddr = ...;
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
+</programlisting>
+ </para>
+
+ <para>For a simple Subversion server with basic authentication,
+ configure the Subversion module for Apache as follows, setting
+ <literal>hostName</literal> and <literal>documentRoot</literal>
+ appropriately, and <literal>SVNParentPath</literal> to the parent
+ directory of the repositories,
+ <literal>AuthzSVNAccessFile</literal> to the location of the
+ <code>.authz</code> file describing access permission, and
+ <literal>AuthUserFile</literal> to the password file.
+ </para>
+ <para>
+<programlisting>
+services.httpd.extraModules = [
+ # note that order is *super* important here
+ { name = "dav_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so"; }
+ { name = "authz_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_authz_svn.so"; }
+ ];
+ services.httpd.virtualHosts = {
+ "svn" = {
+ hostName = HOSTNAME;
+ documentRoot = DOCUMENTROOT;
+ locations."/svn".extraConfig = ''
+ DAV svn
+ SVNParentPath REPO_PARENT
+ AuthzSVNAccessFile ACCESS_FILE
+ AuthName "SVN Repositories"
+ AuthType Basic
+ AuthUserFile PASSWORD_FILE
+ Require valid-user
+ '';
+ }
+</programlisting>
+ </para>
+
+ <para>
+ The key <code>"svn"</code> is just a symbolic name identifying the
+ virtual host. The <code>"/svn"</code> in
+ <code>locations."/svn".extraConfig</code> is the path underneath
+ which the repositories will be served.
+ </para>
+
+ <para><link
+ xlink:href="https://wiki.archlinux.org/index.php/Subversion">This
+ page</link> explains how to set up the Subversion configuration
+ itself. This boils down to the following:
+ </para>
+ <para>
+ Underneath <literal>REPO_PARENT</literal> repositories can be set up
+ as follows:
+ </para>
+ <para>
+<screen>
+<prompt>$ </prompt> svn create REPO_NAME
+</screen>
+ </para>
+ <para>Repository files need to be accessible by
+ <literal>wwwrun</literal>:
+ </para>
+ <para>
+<screen>
+<prompt>$ </prompt> chown -R wwwrun:wwwrun REPO_PARENT
+</screen>
+ </para>
+ <para>
+ The password file <literal>PASSWORD_FILE</literal> can be created as follows:
+ </para>
+ <para>
+<screen>
+<prompt>$ </prompt> htpasswd -cs PASSWORD_FILE USER_NAME
+</screen>
+ </para>
+ <para>
+ Additional users can be set up similarly, omitting the
+ <code>c</code> flag:
+ </para>
+ <para>
+<screen>
+<prompt>$ </prompt> htpasswd -s PASSWORD_FILE USER_NAME
+</screen>
+ </para>
+ <para>
+ The file describing access permissions
+ <literal>ACCESS_FILE</literal> will look something like
+ the following:
+ </para>
+ <para>
+<programlisting>
+[/]
+* = r
+
+[REPO_NAME:/]
+USER_NAME = rw
+</programlisting>
+ </para>
+ <para>The Subversion repositories will be accessible as <code>http://HOSTNAME/svn/REPO_NAME</code>.</para>
+ </section>
+</chapter>
diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml
index a099bbb76384..4b4ae07f2e68 100644
--- a/nixos/doc/manual/release-notes/rl-2103.xml
+++ b/nixos/doc/manual/release-notes/rl-2103.xml
@@ -185,6 +185,48 @@
which is the new stable release. OpenAFS 1.6 was removed.
</para>
</listitem>
+ <listitem>
+ <para>
+ The <literal>openldap</literal> module now has support for OLC-style
+ configuration, users of the <literal>configDir</literal> option may wish
+ to migrate. If you continue to use <literal>configDir</literal>, ensure that
+ <literal>olcPidFile</literal> is set to <literal>/run/slapd/slapd.pid</literal>.
+ </para>
+ <para>
+ As a result, <literal>extraConfig</literal> and <literal>extraDatabaseConfig</literal>
+ are removed. To help with migration, you can convert your <literal>slapd.conf</literal>
+ file to OLC configuration with the following script (find the location of this
+ configuration file by running <literal>systemctl status openldap</literal>, it is the
+ <literal>-f</literal> option.
+ </para>
+ <programlisting>
+ TMPDIR=$(mktemp -d)
+ slaptest -f /path/to/slapd.conf $TMPDIR
+ slapcat -F $TMPDIR -n0 -H 'ldap:///???(!(objectClass=olcSchemaConfig))'
+ </programlisting>
+ <para>
+ This will dump your current configuration in LDIF format, which should be
+ straightforward to convert into Nix settings. This does not show your schema
+ configuration, as this is unnecessarily verbose for users of the default schemas
+ and <literal>slaptest</literal> is buggy with schemas directly in the config file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Amazon EC2 and OpenStack Compute (nova) images now re-fetch instance meta data and user data from the instance
+ metadata service (IMDS) on each boot. For example: stopping an EC2 instance, changing its user data, and
+ restarting the instance will now cause it to fetch and apply the new user data.
+ </para>
+ <warning>
+ <para>
+ Specifically, <literal>/etc/ec2-metadata</literal> is re-populated on each boot. Some NixOS scripts that read
+ from this directory are guarded to only run if the files they want to manipulate do not already exist, and so
+ will not re-apply their changes if the IMDS response changes. Examples: <literal>root</literal>'s SSH key is
+ only added if <literal>/root/.ssh/authorized_keys</literal> does not exist, and SSH host keys are only set from
+ user data if they do not exist in <literal>/etc/ssh</literal>.
+ </para>
+ </warning>
+ </listitem>
</itemizedlist>
</section>