source: general/prog/git.xml@ 4992564

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4992564 was 4992564, checked in by Xi Ruoyao <xry111@…>, 3 years ago

git: add openssh as optional runtime dependency

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