source: general/prog/git.xml@ 039c1a2

12.1 ken/TL2024 lazarus plabs/newcss rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 039c1a2 was 2cec8a0, checked in by Xi Ruoyao <xry111@…>, 6 months ago

git: Remove -k from make test

As the previously known failures are (hopefully) resolved and removed
from text, there seems no reason using -k.

  • Property mode set to 100644
File size: 17.0 KB
RevLine 
[800f6b1]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[8dfc5c3]7 <!ENTITY git-root "&kernel-dl;/software/scm/git" >
[a79f8e7]8
[dba6b4e0]9 <!ENTITY git-download-http "&git-root;/git-&git-version;.tar.xz">
[faa68e4a]10 <!ENTITY git-download-ftp " ">
[01b92cda]11 <!ENTITY git-md5sum "66a036a0442b8d159b0eff5a0fe0dc94">
[6f0a3e2a]12
[01b92cda]13 <!ENTITY git-size "7.0 MB">
[feb043a]14 <!-- but people keep forgetting that an install not only needs the net build
[5d20400]15 space, it also needs the install space (or DESTDIR) -->
[01b92cda]16 <!ENTITY git-buildsize "255 MB (with downloaded documentation; add 18 MB for building doc)">
[6030130]17 <!-- With 2.23.0, there was a large increase in time for tests. Possibly disk related? -->
[25ff6d5]18 <!-- Confirmed that it is disk related.-->
[01b92cda]19 <!ENTITY git-time "0.3 SBU (with parallelism=4; add 0.4 SBU for building doc, and up to 13 SBU (disk speed dependent) for tests)">
[800f6b1]20]>
21
22<sect1 id="git" xreflabel="git-&git-version;">
23 <?dbhtml filename="git.html"?>
24
25
26 <title>Git-&git-version;</title>
27
28 <indexterm zone="git">
[32696a4]29 <primary sortas="a-Git">Git</primary>
[800f6b1]30 </indexterm>
31
32 <sect2 role="package">
33 <title>Introduction to Git</title>
34
[32696a4]35 <para>
36 <application>Git</application> is a free and open source, distributed
37 version control system designed to handle everything from small to very
38 large projects with speed and efficiency. Every
39 <application>Git</application> clone is a full-fledged repository with
[bdf19997]40 complete history and full revision tracking capabilities, not dependent
41 on network access or a central server. Branching and merging are fast and
42 easy to do. <application>Git</application> is used for version control of
[9276b6ee]43 files, much like tools such as <xref linkend="mercurial"/>,
[32696a4]44 <application>Bazaar</application>, <xref linkend="subversion"/>,
[80106051]45 <ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
[d1c51434]46 <application>Perforce</application>, and
[32696a4]47 <application>Team Foundation Server</application>.
48 </para>
[800f6b1]49
[a73fc762]50 &lfs120_checked;
[800f6b1]51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
[32696a4]55 <para>
56 Download (HTTP): <ulink url="&git-download-http;"/>
57 </para>
[800f6b1]58 </listitem>
59 <listitem>
[32696a4]60 <para>
61 Download (FTP): <ulink url="&git-download-ftp;"/>
62 </para>
[800f6b1]63 </listitem>
64 <listitem>
[32696a4]65 <para>
66 Download MD5 sum: &git-md5sum;
67 </para>
[800f6b1]68 </listitem>
69 <listitem>
[32696a4]70 <para>
71 Download size: &git-size;
72 </para>
[800f6b1]73 </listitem>
74 <listitem>
[32696a4]75 <para>
76 Estimated disk space required: &git-buildsize;
77 </para>
[800f6b1]78 </listitem>
79 <listitem>
[32696a4]80 <para>
81 Estimated build time: &git-time;
82 </para>
[800f6b1]83 </listitem>
84 </itemizedlist>
85
[435934c]86 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
87 <itemizedlist spacing="compact">
88 <listitem>
[32696a4]89 <para>
[a79f8e7]90 <ulink url="&git-root;/git-manpages-&git-version;.tar.xz">
[7053ca8]91 &git-root;/git-manpages-&git-version;.tar.xz</ulink>
[2bbb3379]92 (not needed if you've installed <xref linkend="asciidoc"/>,
93 <xref linkend="xmlto"/>, and prefer to rebuild them)
[32696a4]94 </para>
[435934c]95 </listitem>
96 <listitem>
[32696a4]97 <para>
[a79f8e7]98 <ulink url="&git-root;/git-htmldocs-&git-version;.tar.xz">
[7053ca8]99 &git-root;/git-htmldocs-&git-version;.tar.xz</ulink>
[2bbb3379]100 and other docs (not needed if you've installed
101 <xref linkend="asciidoc"/> and want to rebuild the documentation).
[32696a4]102 </para>
[435934c]103 </listitem>
104 </itemizedlist>
105
[800f6b1]106 <bridgehead renderas="sect3">Git Dependencies</bridgehead>
107
108 <bridgehead renderas="sect4">Recommended</bridgehead>
[1b2d41b]109 <para role="recommended">
[4f8ca94]110 <xref linkend="curl"/> (needed to use <application>Git</application> over
111 http, https, ftp or ftps)
[1b2d41b]112 </para>
[800f6b1]113
114 <bridgehead renderas="sect4">Optional</bridgehead>
[1b2d41b]115 <para role="optional">
[d98ca85]116 <xref linkend="apache"/> (for some tests),
[6e5b09c0]117 <xref role="runtime" linkend="gnupg2"/> (runtime, may be used to sign
[f5524b6]118 <application>Git</application> commits or tags, or verify the signatures
[6e5b09c0]119 of them),
[4992564]120 <xref role="runtime" linkend="openssh"/> (runtime, needed to use
121 <application>Git</application> over ssh),
[d86a91f]122 <xref linkend="pcre2"/> (<emphasis>or</emphasis> the deprecated <xref
[cac7f93]123 role="nodep" linkend="pcre"/>), in either case configured with
[d86a91f]124 <literal>--enable-jit</literal>,
[f1c6a8a]125 <xref role="runtime" linkend="subversion"/> with Perl bindings
126 (runtime, for <command>git svn</command>),
[572553b]127 <xref role="runtime" linkend="tk"/>
128 (gitk, a simple <application>Git</application>
[bc0c417]129 repository viewer, uses <application>Tk</application> at runtime),
130 <xref linkend="valgrind"/>,
131 <ulink url="https://metacpan.org/pod/Authen::SASL">Authen::SASL</ulink> and
132 <ulink url="https://metacpan.org/pod/MIME::Base64">MIME::Base64</ulink>
[694f194]133 (both runtime, for <command>git send-email</command>),
134 and <xref linkend='perl-io-socket-ssl'/> (runtime, for
135 <command>git send-email</command> to connect to a SMTP server with
[431a8f1]136 SSL encryption)
[1b2d41b]137 </para>
138
[28814022]139 <bridgehead renderas="sect4">Optional (to create the man pages, html docs
140 and other docs)</bridgehead>
[464f030]141 <para role="optional">
[fad8db2]142 <xref linkend="xmlto"/> and
[b1c3841]143 <xref linkend="asciidoc"/>
144 <!-- or xref linkend="asciidoctor", doesn't work now because it needs docbook-xsl-ns -->,
145 and also
[17aa21c]146 <ulink url="https://dblatex.sourceforge.net/">dblatex</ulink>
[28814022]147 (for the PDF version of the user manual), and
[17aa21c]148 <ulink url="https://docbook2x.sourceforge.net/">docbook2x</ulink> to
[28814022]149 create info pages
[1b2d41b]150 </para>
[800f6b1]151
152 </sect2>
153
154 <sect2 role="installation">
155 <title>Installation of Git</title>
156
[32696a4]157 <para>
158 Install <application>Git</application> by running the following
159 commands:
160 </para>
[800f6b1]161
[7e81406]162<screen><userinput>./configure --prefix=/usr \
163 --with-gitconfig=/etc/gitconfig \
164 --with-python=python3 &amp;&amp;
[800f6b1]165make</userinput></screen>
166
[6e08e9c0]167 <para>
168 You can build the man pages and/or html docs, or
[3ec1600]169 use downloaded ones. If you choose to build them, use the next two
[6e08e9c0]170 instructions.
171 </para>
172
[32696a4]173 <para>
[9faa23b6]174 If you have installed <xref linkend="asciidoc"/> you can
[32696a4]175 create the html version of the man pages and other docs:
176 </para>
[800f6b1]177
[a42c273]178<screen remap="doc"><userinput>make html</userinput></screen>
[800f6b1]179
[32696a4]180 <para>
[9faa23b6]181 If you have installed <xref linkend="asciidoc"/> and
[32696a4]182 <xref linkend="xmlto"/> you can create the man pages:
183 </para>
[435934c]184
[a42c273]185<screen remap="doc"><userinput>make man</userinput></screen>
[435934c]186
[32696a4]187 <para>
[28814022]188 The test suite can be run in parallel mode. To run the test suite, issue:
[2cec8a0]189 <command>make test</command>. <!--If run as a normal user, 0 tests
[6c7614f7]190 should be reported as failed in the final summary.-->
[72d9cebb]191 <!-- all tests pass with 2.42.0
[d98ca85]192 If <xref linkend="apache"/> is installed,
193 three tests in <filename>t5559-http-fetch-smart-http2.sh</filename> are
[72d9cebb]194 known to fail due to cURL-8.1.x.-->
[32696a4]195 </para>
[800f6b1]196
[32696a4]197 <para>
198 Now, as the <systemitem class="username">root</systemitem>
199 user:
200 </para>
[800f6b1]201
[eacfe160]202<screen role="root"><userinput>make perllibdir=/usr/lib/perl5/&lfs-perl-version;/site_perl install</userinput></screen>
[800f6b1]203
[6e08e9c0]204<!-- ==== Method 1 for docs ====== -->
205 <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
206
[32696a4]207 <para>
[3ec1600]208 Install the man pages as the
[32696a4]209 <systemitem class="username">root</systemitem> user:
210 </para>
[800f6b1]211
[06908bf6]212<screen role="root"
213 remap="doc"><userinput>make install-man</userinput></screen>
[435934c]214
[32696a4]215 <para>
[3ec1600]216 Install the html docs as the
[32696a4]217 <systemitem class="username">root</systemitem> user:
218 </para>
[435934c]219
[06908bf6]220<screen role="root"
221 remap="doc"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
[6e08e9c0]222
223<!-- ==== Method 2 for docs ====== -->
224 <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
[435934c]225
[32696a4]226 <para>
[6e08e9c0]227 If you downloaded the man pages untar them as the
[32696a4]228 <systemitem class="username">root</systemitem> user:
229 </para>
[435934c]230
[64419b7]231<screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.xz \
232 -C /usr/share/man --no-same-owner --no-overwrite-dir</userinput></screen>
[435934c]233
[32696a4]234 <para>
235 If you downloaded the html docs untar them as the
236 <systemitem class="username">root</systemitem> user:
237 </para>
[435934c]238
[78a00a4e]239<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version; &amp;&amp;
240tar -xf ../git-htmldocs-&git-version;.tar.xz \
241 -C /usr/share/doc/git-&git-version; --no-same-owner --no-overwrite-dir &amp;&amp;
[0524804]242
[78a00a4e]243find /usr/share/doc/git-&git-version; -type d -exec chmod 755 {} \; &amp;&amp;
244find /usr/share/doc/git-&git-version; -type f -exec chmod 644 {} \;</userinput></screen>
[c4ab33b5]245
[6e08e9c0]246<!-- ==== Reorganize docs ====== -->
[28814022]247 <bridgehead renderas="sect3">Reorganize text and html in the html-docs (both methods)</bridgehead>
[6e08e9c0]248
249 <para>
[28814022]250 For both methods, the html-docs include a lot of plain text files.
251 Reorganize the files as the
[6e08e9c0]252 <systemitem class="username">root</systemitem> user:
253 </para>
254
[78a00a4e]255<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version;/man-pages/{html,text} &amp;&amp;
256mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &amp;&amp;
257mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &amp;&amp;
[64419b7]258
[78a00a4e]259mkdir -vp /usr/share/doc/git-&git-version;/technical/{html,text} &amp;&amp;
260mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &amp;&amp;
261mv /usr/share/doc/git-&git-version;/technical/{*.,}html &amp;&amp;
262
263mkdir -vp /usr/share/doc/git-&git-version;/howto/{html,text} &amp;&amp;
264mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &amp;&amp;
[6da25cc8]265mv /usr/share/doc/git-&git-version;/howto/{*.,}html &amp;&amp;
266
[d86a91f]267sed -i '/^&lt;a href=/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.html &amp;&amp;
268sed -i '/^\* link:/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.txt</userinput></screen>
[32696a4]269
[800f6b1]270 </sect2>
271
272 <sect2 role="commands">
273 <title>Command Explanations</title>
274
[5e5a8d5]275 <para>
[35943a41]276 <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
[5e5a8d5]277 <filename>/etc/gitconfig</filename> as the file that stores
278 the default, system wide, <application>Git</application>
279 settings.
280 </para>
281
[32696a4]282 <para>
[8ff2771]283 <parameter>--with-python=python3</parameter>: Use this switch to use
[7e81406]284 <application>Python 3</application>, instead of the EOL'ed
285 <application>Python 2</application>. Python is used for the
286 <command>git p4</command> interface to Perforce repositories,
287 and also used in some tests.
[32696a4]288 </para>
[435934c]289
[32696a4]290 <para>
[d86a91f]291 <option>--with-libpcre2</option>: Use this switch if
292 <application>PCRE2</application> is installed and has been built with
293 the non-default JIT enabled.
294 </para>
295
296 <para>
[026e083]297 <option>--with-libpcre1</option>: As an alternative to PCRE2, use this
[d86a91f]298 switch if the deprecated <application>PCRE</application> is installed
299 and has been built with the non-default JIT enabled.
[32696a4]300 </para>
[0524804]301
[32696a4]302 <para>
303 <command>tar -xf ../git-manpages-&git-version;.tar.gz -C
304 /usr/share/man --no-same-owner</command>: This untars
305 <filename>git-manpages-&git-version;.tar.gz</filename>. The
306 <option>-C</option> option makes tar change directory to
307 <filename class="directory">/usr/share/man</filename> before
308 it starts to decompress the docs. The <option>--no-same-owner</option>
309 option stops tar from preserving the user and group details of the
310 files. This is useful as that user or group may not exist on your
311 system; this could (potentially) be a security risk.
312 </para>
[0524804]313
[32696a4]314 <para>
315 <command>mv /usr/share/doc/git-&git-version; ...</command>: These
316 commands move some of the files into subfolders to make it easier to sort
317 through the docs and find what you're looking for.
318 </para>
[435934c]319
[c4ab33b5]320 <para>
[49ee8357]321 <command>find ... chmod ...</command>: These commands correct the
[c4ab33b5]322 permissions in the shipped documentation tar file.
323 </para>
324
[800f6b1]325 </sect2>
326
327 <sect2 role="configuration">
328 <title>Configuring Git</title>
329
330 <sect3 id="git-config">
331 <title>Config Files</title>
[32696a4]332 <para>
333 <filename>~/.gitconfig</filename> and
334 <filename>/etc/gitconfig</filename>
335 </para>
[800f6b1]336
337 <indexterm zone="git git-config">
338 <primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
339 </indexterm>
340
341 <indexterm zone="git git-config">
342 <primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
343 </indexterm>
[32696a4]344
[800f6b1]345 </sect3>
346
347 </sect2>
348
349 <sect2 role="content">
350 <title>Contents</title>
351
352 <segmentedlist>
353 <segtitle>Installed Programs</segtitle>
[c3c56b2]354 <segtitle>Installed Libraries</segtitle>
[800f6b1]355 <segtitle>Installed Directories</segtitle>
356
357 <seglistitem>
[32696a4]358 <seg>
[21b1ead]359 git, git-receive-pack, git-upload-archive, and
360 git-upload-pack (hardlinked to each
[be5298b4]361 other), git-cvsserver, git-shell, gitk, and scalar
[32696a4]362 </seg>
363 <seg>
364 None
365 </seg>
366 <seg>
[72d9cebb]367 /usr/libexec/git-core,
368 /usr/lib/perl5/&lfs-perl-version;/site_perl/Git, and
[5a04ffa]369 /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
[32696a4]370 </seg>
[800f6b1]371 </seglistitem>
372 </segmentedlist>
373
374 <variablelist>
375 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
376 <?dbfo list-presentation="list"?>
377 <?dbhtml list-presentation="table"?>
378
379 <varlistentry id="git-prog">
380 <term><command>git</command></term>
381 <listitem>
[32696a4]382 <para>
[4c24eb0a]383 is the stupid content tracker
[32696a4]384 </para>
[800f6b1]385 <indexterm zone="git git-prog">
386 <primary sortas="b-git">git</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="git-cvsserver">
392 <term><command>git-cvsserver</command></term>
393 <listitem>
[32696a4]394 <para>
[4c24eb0a]395 is a CVS server emulator for <application>Git</application>
[32696a4]396 </para>
[800f6b1]397 <indexterm zone="git git-cvsserver">
398 <primary sortas="b-git-cvsserver">git-cvsserver</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="gitk">
404 <term><command>gitk</command></term>
405 <listitem>
[32696a4]406 <para>
[a79f8e7]407 is a graphical <application>Git</application> repository browser
[4c24eb0a]408 (needs <xref linkend="tk"/>)
[32696a4]409 </para>
[800f6b1]410 <indexterm zone="git gitk">
411 <primary sortas="b-gitk">gitk</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="git-receive-pack">
417 <term><command>git-receive-pack</command></term>
418 <listitem>
[32696a4]419 <para>
420 is invoked by <command>git send-pack</command> and updates the
[4c24eb0a]421 repository with the information fed from the remote end
[32696a4]422 </para>
[800f6b1]423 <indexterm zone="git git-receive-pack">
424 <primary sortas="b-git-receive-pack">git-receive-pack</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="git-shell">
430 <term><command>git-shell</command></term>
431 <listitem>
[32696a4]432 <para>
433 is a login shell for SSH accounts to provide restricted Git
[4c24eb0a]434 access
[32696a4]435 </para>
[800f6b1]436 <indexterm zone="git git-shell">
437 <primary sortas="b-git-shell">git-shell</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="git-upload-archive">
443 <term><command>git-upload-archive</command></term>
444 <listitem>
[32696a4]445 <para>
446 is invoked by <command>git archive --remote</command> and sends
[4c24eb0a]447 a generated archive to the other end over the git protocol
[32696a4]448 </para>
[800f6b1]449 <indexterm zone="git git-upload-archive">
450 <primary sortas="b-git-upload-archive">git-upload-archive</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="git-upload-pack">
456 <term><command>git-upload-pack</command></term>
457 <listitem>
[32696a4]458 <para>
459 is invoked by <command>git fetch-pack</command>, it discovers
460 what objects the other side is missing, and sends them after
[4c24eb0a]461 packing
[32696a4]462 </para>
[800f6b1]463 <indexterm zone="git git-upload-pack">
464 <primary sortas="b-git-upload-pack">git-upload-pack</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
[32696a4]468
[be5298b4]469 <varlistentry id="scalar">
470 <term><command>scalar</command></term>
471 <listitem>
472 <para>
473 is a repository management tool that optimizes Git for use in
474 large repositories
475 </para>
476 <indexterm zone="git scalar">
477 <primary sortas="b-scalar">scalar</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
[800f6b1]481 </variablelist>
[32696a4]482
[800f6b1]483 </sect2>
[32696a4]484
[800f6b1]485</sect1>
Note: See TracBrowser for help on using the repository browser.