source: introduction/important/beyond.xml@ 865ea30

12.1 ken/TL2024 lazarus plabs/newcss rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 865ea30 was ab4fdfc, checked in by Pierre Labastie <pierre.labastie@…>, 3 months ago

Change all xml decl to encoding=utf-8

  • Property mode set to 100644
File size: 11.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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="http://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 - First use a search engine to find an ebuild which looks as
168 if it will fix the problem, or search at <ulink
169 url="https://packages.gentoo.org/"/> - use the search field. Note where the
170 package lives in the portage hierarchy, e.g.
171 <filename>app-something/</filename>. In general you can treat the ebuild as
172 a sort of pseudo-code / shell combination with some functions you can
173 hazard a guess at, such as <command>dodoc</command>. If the fix is just a
174 <command>sed</command>, try it. However, in most cases the fix will use a
175 patch. To find the patch, use a gentoo-portage mirror: Two links to mirrors
176 in the U.S.A. which seem to usually be up to date are
177 <ulink url="https://mirror.rackspace.com/gentoo-portage/"/> and
178 <ulink url="https://mirror.steadfast.net/gentoo-portage/"/>. Navigate down
179 the tree to the package, then to the <filename>files/</filename> directory
180 to look for the patch. Sometimes a portage mirror has not yet been updated,
181 particularly for a recent new patch. In a few cases, gentoo batch the
182 patches into a tarball and the ebuild will have a link in the form
183 https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz
184 : here, look for PATCH_DEV and PATCH_VER in the build and format the full
185 URL in your browser or for wget : remember the '~' before the developer's
186 ID and note that trying to search the earlier levels of the URL in a
187 browser may drop you at www.gentoo.org or return 403 (forbidden).
188 </para>
189 </listitem>
190 <listitem>
191 <para>openSUSE provide a rolling release, some package versions are in
192 <ulink url="https://download.opensuse.org/source/tumbleweed/repo/oss/src/"/>
193 but others are in ../update/openSUSE-current/src - the
194 source only seems to be available in source rpms.</para>
195 </listitem>
196 <listitem>
197 <para>Slackware - the official package browser is currently broken. The
198 site at <ulink url="https://slackbuilds.org/"/> has current and previous
199 versions in their unofficial repository with links to homepages, downloads,
200 and some individual files, particularly the <filename>.SlackBuild</filename>
201 files.</para>
202 </listitem>
203 <listitem>
204 <para>Ubuntu <ulink url="http://ftp.ubuntu.com/ubuntu/pool/"/> - see the
205 Debian notes above.</para>
206 </listitem>
207 </itemizedlist>
208 <para>If everything else fails, try the blfs-support mailing-list.</para>
209 </listitem>
210 </itemizedlist>
211
212 <tip>
213 <para>If you have found a package that is only available in
214 <filename class='extension'>.deb</filename> or
215 <filename class='extension'>.rpm</filename>
216 format, there are two small scripts, <command>rpm2targz</command> and
217 <command>deb2targz</command> that are available at
218 <ulink url="&sources-anduin-http;/extras/deb2targz.tar.bz2"/> and
219 <ulink url="&sources-anduin-http;/extras/rpm2targz.tar.bz2"/> to convert the archives
220 into a simple <filename>tar.gz</filename> format.</para>
221 <para>You may also find an rpm2cpio script useful. The Perl version in the
222 linux kernel archives at <ulink
223 url="https://lore.kernel.org/all/20021016121842.GA2292@ncsu.edu/2-rpm2cpio"/>
224 works for most source rpms. The rpm2targz script will use an rpm2cpio script
225 or binary if one is on your path. Note that rpm2cpio will unpack a source
226 rpm in the current directory, giving a tarball, a spec file, and perhaps patches
227 or other files.</para>
228 </tip>
229
230</sect1>
Note: See TracBrowser for help on using the repository browser.