Changeset 52b47970


Ignore:
Timestamp:
01/08/2021 09:19:18 PM (9 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
10.1, 11.0, lazarus, qt5new, trunk, xry111/git-date, xry111/git-date-for-trunk, xry111/git-date-test
Children:
d6de80b
Parents:
7c9ae62
Message:

Explain the config file

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24094 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/gitserver.xml

    r7c9ae62 r52b47970  
    285285<screen role="root"><userinput>touch /srv/git/project1.git/git-daemon-export-ok</userinput></screen>
    286286
    287       <para>
    288         Finally, review the configuration file
    289         <filename revision="sysv">/etc/sysconfig/git-daemon</filename>
    290         <filename revision="systemd">/etc/default/git-daemon</filename>
    291         for valid repository paths and change them as appropriate.
    292       </para>
    293 
     287      <para revision="sysv">
     288        The script to start the git daemon uses some default values
     289        internally. Most important is the path to the repository
     290        directory which is set to <filename class="directory">/srv/git</filename>.
     291        In case you have for whatever reason created the repository in a
     292        different location, you'll need to tell the boot script where the
     293        repository is to be found. This can be achieved by creating a
     294        configuration file named <filename>/etc/sysconfig/git-daemon</filename>.
     295        This configuration file will be imported if it exists. It can
     296        look like:</para>
     297<screen revision="sysv">
     298# Begin /etc/sysconfig/git-daemon
     299
     300# Specify the location of the git repository
     301GIT_BASE_DIR="/srv/git/"
     302
     303# Directories added to whitelist
     304DFT_REPO_DIR="$GIT_BASE_DIR"
     305
     306# Add extra options which will appended to the 'git daemon'
     307# command executed in the boot script
     308GIT_DAEMON_OPTS=""
     309
     310# End /etc/sysconfig/git-daemon
     311</screen>
     312      <para revision="systemd">
     313        Along with the <filename>git-daemon.service</filename> unit, a
     314        configuration file named <filename>/etc/default/git-daemon</filename>
     315        has been installed. Review this configuration file to match your
     316        needs.
     317      </para>
     318
     319      <para>
     320        There are only three options to set in the configuration file:
     321        <itemizedlist>
     322          <listitem>
     323            <para>
     324              GIT_BASE_DIR=&lt;dirname&gt;
     325            </para>
     326            <para>Specify the location of the repository directory
     327              on which the git daemon operates on. Relative pathes
     328              in access to the daemon will translated to be relative
     329              to this directory.
     330            </para>
     331          </listitem>
     332          <listitem>
     333            <para>
     334              DFT_REPO_DIR=&lt;dirname&gt;
     335            </para>
     336            <para>The directory is added to the white list of allowed
     337              directories. This variable can hold multible directory
     338              names but is usually set equal to <literal>GIT_BASE_DIR</literal>.
     339            </para>
     340          </listitem>
     341          <listitem>
     342            <para>
     343              GIT_DAEMON_OPTS=&lt;options&gt;
     344            </para>
     345            <para>In case you have to pass special options to the
     346              <command>git daemon</command> command, they have to be
     347              specified in this setting. On example might be to adjust
     348              the port number the daemon is listening on. In this case,
     349              add <literal>--port=XYZ</literal> to this variable.
     350              For more information which options can be set, take a look
     351              at the output of <command>git daemon --help</command>.
     352            </para>
     353          </listitem>
     354        </itemizedlist>
     355      </para>
     356     
    294357    </sect3>
    295358
Note: See TracChangeset for help on using the changeset viewer.