source: introduction/important/beyond.xml

trunk
Last change on this file was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 7 days ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 11.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
8<sect1 id="beyond" xreflabel="Going Beyond BLFS">
9 <?dbhtml filename="beyond.html"?>
10
11
12 <title>Going Beyond BLFS</title>
13
14 <para>The packages that are installed in this book are only the tip of the
15 iceberg. We hope that the experience you gained with the LFS book and
16 the BLFS book will give you the background needed to compile, install
17 and configure packages that are not included in this book.</para>
18
19 <para>When you want to install a package to a location other than
20 <filename class='directory'>/</filename>, or
21 <filename class='directory'>/usr</filename>, you are installing
22 outside the default environment settings on most machines. The following
23 examples should assist you in determining how to correct this situation.
24 The examples cover the complete range of settings that may need
25 updating, but they are not all needed in every situation.</para>
26
27 <itemizedlist>
28 <listitem>
29 <para>Expand the <envar>PATH</envar> to include
30 <filename class='directory'>$PREFIX/bin</filename>.</para>
31 </listitem>
32 <listitem>
33 <para>Expand the <envar>PATH</envar> for
34 <systemitem class="username">root</systemitem> to include
35 <filename class='directory'>$PREFIX/sbin</filename>.</para>
36 </listitem>
37 <listitem>
38 <para>Add <filename class='directory'>$PREFIX/lib</filename>
39 to <filename>/etc/ld.so.conf</filename> or expand
40 <envar>LD_LIBRARY_PATH</envar> to include it. Before using the latter
41 option, check out <ulink
42 url="http://xahlee.info/UnixResource_dir/_/ldpath.html"/>.
43 If you modify <filename>/etc/ld.so.conf</filename>, remember to update
44 <filename>/etc/ld.so.cache</filename> by executing
45 <command>ldconfig</command> as the
46 <systemitem class="username">root</systemitem> user.</para>
47 </listitem>
48 <listitem>
49 <para>Add <filename class='directory'>$PREFIX/man</filename>
50 to <filename>/etc/man_db.conf</filename> or expand
51 <envar>MANPATH</envar>.</para>
52 </listitem>
53 <listitem>
54 <para>Add <filename class='directory'>$PREFIX/info</filename>
55 to <envar>INFOPATH</envar>.</para>
56 </listitem>
57 <listitem>
58 <para>Add <filename class='directory'>$PREFIX/lib/pkgconfig</filename>
59 to <envar>PKG_CONFIG_PATH</envar>. Some packages are now installing
60 <filename class='extension'>.pc</filename> files in
61 <filename class='directory'>$PREFIX/share/pkgconfig</filename>, so you may
62 have to include this directory also.</para>
63 </listitem>
64 <listitem>
65 <para>Add <filename class='directory'>$PREFIX/include</filename> to
66 <envar>CPPFLAGS</envar> when compiling packages that depend on
67 the package you installed.</para>
68 </listitem>
69 <listitem>
70 <para>Add <filename class='directory'>$PREFIX/lib</filename> to
71 <envar>LDFLAGS</envar> when compiling packages that depend on a library
72 installed by the package.</para>
73 </listitem>
74 </itemizedlist>
75
76 <para>If you are in search of a package that is not in the book, the following
77 are different ways you can search for the desired package.</para>
78
79 <itemizedlist>
80 <listitem>
81 <para>If you know the name of the package, then search SourceForge for
82 it at <ulink url="https://sourceforge.net/directory/"/>, and search
83 GitHub for it at <ulink url="https://github.com/"/>.
84 Also search Google at <ulink url="https://google.com/"/>. Sometimes a
85 search for the <filename class='extension'>rpm</filename> at
86 <ulink url="https://rpmfind.net/"/> or the
87 <filename class='extension'>deb</filename> at
88 <ulink url="https://www.debian.org/distrib/packages#search_packages"/> can
89 also lead to a link to the package.</para>
90 </listitem>
91 <listitem>
92 <para>If you know the name of the executable, but not the package
93 that the executable belongs to, first try a Google search with the name
94 of the executable. If the results are overwhelming, try searching for the
95 given executable in the Debian repository at <ulink
96 url="https://www.debian.org/distrib/packages#search_contents"/>.</para>
97 </listitem>
98 </itemizedlist>
99
100 <para>Some general hints on handling new packages:</para>
101
102 <itemizedlist>
103 <listitem>
104 <para>Many of the newer packages follow the <command>./configure
105 &amp;&amp; make &amp;&amp; make install</command> process.
106 Help on the options accepted by configure can be obtained via the
107 command <command>./configure --help</command>.</para>
108 </listitem>
109 <listitem>
110 <para>Most of the packages contain documentation on compiling and
111 installing the package. Some of the documents are excellent, some not so
112 excellent. Check out the homepage of the package for any additional and
113 updated hints for compiling and configuring the package.</para>
114 </listitem>
115 <listitem>
116 <para>If you are having a problem compiling the package, try
117 searching the LFS archives at
118 <ulink url="https://www.&lfs-domainname;/search.html"/> for the error or if
119 that fails, try searching Google. Often, a distribution will have already
120 solved the problem (many of them use development versions of packages, so
121 they see the changes sooner than those of us who normally use stable released
122 versions). But be cautious - all builders tend to carry patches which are no
123 longer necessary, and to have fixes which are only required because of their
124 particular choices in how they build a package. You may have to search
125 deeply to find a fix for the package version you are trying to use, or even
126 to find the package (names are sometimes not what you might expect, e.g.
127 <application>ghostscript</application> often has a prefix or a suffix in its
128 name), but the following notes might help, particularly for those who, like
129 the editors, are trying to build the latest versions and encountering
130 problems:</para>
131 <itemizedlist>
132 <listitem>
133 <para>Arch <ulink url="https://www.archlinux.org/packages/"/> - enter
134 the package name in the 'Keywords' box, select the package name,
135 select the 'Source Files' field, and then select the
136 <filename>PKGBUILD</filename> entry to see how they build this
137 package.</para>
138 </listitem>
139 <listitem>
140 <para>Debian
141 <ulink url="https://ftp.debian.org/debian/pool"/> (use your country's
142 version if there is one) - the source will be in .tar.gz tarballs (either
143 the original upstream <filename class='extension'>.orig</filename> source,
144 or else a <filename>dfsg</filename> containing those parts which comply
145 with debian's free software guidelines) accompanied by versioned .diff.gz
146 or .tar.gz additions. These additions often show how the package is built,
147 and may contain patches. In the .diff.gz versions, any patches create files
148 in <filename class="directory">debian/patches</filename>.</para>
149 </listitem>
150 <listitem>
151 <para>Fedora package source gets reorganized from time to time.
152 At the moment the package source for rpms is at <ulink
153 url="https://src.fedoraproject.org/projects/rpms/%2A"/> and from there
154 you can try putting a package name in the search box. If the package is
155 found you can look at the files (specfile to control the build, various
156 patches) or the commits. If that fails, you can download
157 an srpm (source rpm) and using <application>rpm2cpio</application> (see
158 the Tip at the bottom of the page). For rpms go to <ulink
159 url="https://dl.fedoraproject.org/pub/fedora/linux/"/> and then choose
160 which repo you wish to look at - development/rawhide is the latest
161 development, or choose releases for what was shipped in a release,
162 updates for updates to a release, or updates/testing for the latest
163 updates which might work or might have problems.
164 </para>
165 </listitem>
166 <listitem>
167 <para>Gentoo - the mirrors for ebuilds and patches seem to be well-hidden,
168 and they change frequently. Also, if you have found a mirror, you need to
169 know which directory the application has been assigned to. The ebuilds
170 themselves can be found at <ulink url="https://packages.gentoo.org/"/> -
171 use the search field. If there are any patches, a mirror will have them
172 in the <filename class="directory">files/</filename> directory. Depending
173 on your browser, or the mirror, you might need to download the ebuild to
174 be able to read it. Treat the ebuild as a sort of pseudo-code / shell
175 combination - look in particular for <command>sed</command> commands and
176 patches, or hazard a guess at the meanings of the functions such as
177 <command>dodoc</command>.</para>
178 </listitem>
179 <listitem>
180 <para>openSUSE provide a rolling release, some package versions are in
181 <ulink url="https://download.opensuse.org/source/tumbleweed/repo/oss/src/"/>
182 but others are in ../update/openSUSE-current/src - the
183 source only seems to be available in source rpms.</para>
184 </listitem>
185 <listitem>
186 <para>Slackware - the official package browser is currently broken. The
187 site at <ulink url="https://slackbuilds.org/"/> has current and previous
188 versions in their unofficial repository with links to homepages, downloads,
189 and some individual files, particularly the <filename>.SlackBuild</filename>
190 files.</para>
191 </listitem>
192 <listitem>
193 <para>Ubuntu <ulink url="ftp://ftp.ubuntu.com/ubuntu/pool/"/> - see the
194 debian notes above.</para>
195 </listitem>
196 </itemizedlist>
197 <para>If everything else fails, try the blfs-support mailing-list.</para>
198 </listitem>
199 </itemizedlist>
200
201 <tip>
202 <para>If you have found a package that is only available in
203 <filename class='extension'>.deb</filename> or
204 <filename class='extension'>.rpm</filename>
205 format, there are two small scripts, <command>rpm2targz</command> and
206 <command>deb2targz</command> that are available at
207 <ulink url="&sources-anduin-http;/extras/deb2targz.tar.bz2"/> and
208 <ulink url="&sources-anduin-http;/extras/rpm2targz.tar.bz2"/> to convert the archives
209 into a simple <filename>tar.gz</filename> format.</para>
210 <para>You may also find an rpm2cpio script useful. The Perl version in the
211 linux kernel archives at <ulink
212 url="https://lore.kernel.org/all/20021016121842.GA2292@ncsu.edu/2-rpm2cpio"/>
213 works for most source rpms. The rpm2targz script will use an rpm2cpio script
214 or binary if one is on your path. Note that rpm2cpio will unpack a source
215 rpm in the current directory, giving a tarball, a spec file, and perhaps patches
216 or other files.</para>
217 </tip>
218
219</sect1>
Note: See TracBrowser for help on using the repository browser.