source: general/prog/git.xml@ bc0c417

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 bc0c417 was bc0c417, checked in by Xi Ruoyao <xry111@…>, 3 years ago

git: add external dependencies for git send-email

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

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