[4122007] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[4122007] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[4afc2603] | 8 | <sect1 id="beyond" xreflabel="Going Beyond BLFS">
|
---|
[8b354833] | 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
|
---|
[24ca7aa] | 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
|
---|
[8b354833] | 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
|
---|
[24ca7aa] | 20 | <filename class='directory'>/</filename>, or
|
---|
[8b354833] | 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>
|
---|
[24ca7aa] | 33 | <para>Expand the <envar>PATH</envar> for
|
---|
[8b354833] | 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
|
---|
[4afc2603] | 40 | <envar>LD_LIBRARY_PATH</envar> to include it. Before using the latter
|
---|
[506a625] | 41 | option, check out <ulink
|
---|
[824ddcc] | 42 | url="http://xahlee.info/UnixResource_dir/_/ldpath.html"/>.
|
---|
[4afc2603] | 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>
|
---|
[8b354833] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Add <filename class='directory'>$PREFIX/man</filename>
|
---|
[58c6057] | 50 | to <filename>/etc/man_db.conf</filename> or expand
|
---|
[4afc2603] | 51 | <envar>MANPATH</envar>.</para>
|
---|
[8b354833] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Add <filename class='directory'>$PREFIX/info</filename>
|
---|
| 55 | to <envar>INFOPATH</envar>.</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[4afc2603] | 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>
|
---|
[8b354833] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[24ca7aa] | 65 | <para>Add <filename class='directory'>$PREFIX/include</filename> to
|
---|
| 66 | <envar>CPPFLAGS</envar> when compiling packages that depend on
|
---|
[8b354833] | 67 | the package you installed.</para>
|
---|
| 68 | </listitem>
|
---|
[dc8a51e7] | 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>
|
---|
[8b354833] | 74 | </itemizedlist>
|
---|
| 75 |
|
---|
| 76 | <para>If you are in search of a package that is not in the book, the following
|
---|
[4afc2603] | 77 | are different ways you can search for the desired package.</para>
|
---|
[8b354833] | 78 |
|
---|
| 79 | <itemizedlist>
|
---|
| 80 | <listitem>
|
---|
[824ddcc] | 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
|
---|
[4afc2603] | 87 | <filename class='extension'>deb</filename> at
|
---|
[824ddcc] | 88 | <ulink url="https://www.debian.org/distrib/packages#search_packages"/> can
|
---|
[4afc2603] | 89 | also lead to a link to the package.</para>
|
---|
[8b354833] | 90 | </listitem>
|
---|
| 91 | <listitem>
|
---|
[24ca7aa] | 92 | <para>If you know the name of the executable, but not the package
|
---|
[4afc2603] | 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
|
---|
[824ddcc] | 96 | url="https://www.debian.org/distrib/packages#search_contents"/>.</para>
|
---|
[8b354833] | 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 | && make && make install</command> process.
|
---|
[24ca7aa] | 106 | Help on the options accepted by configure can be obtained via the
|
---|
[8b354833] | 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
|
---|
[4afc2603] | 112 | excellent. Check out the homepage of the package for any additional and
|
---|
| 113 | updated hints for compiling and configuring the package.</para>
|
---|
[8b354833] | 114 | </listitem>
|
---|
| 115 | <listitem>
|
---|
| 116 | <para>If you are having a problem compiling the package, try
|
---|
[4afc2603] | 117 | searching the LFS archives at
|
---|
[4a570af1] | 118 | <ulink url="https://www.&lfs-domainname;/search.html"/> for the error or if
|
---|
[6ed5123] | 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
|
---|
[58b66af3] | 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>
|
---|
[6ed5123] | 131 | <itemizedlist>
|
---|
| 132 | <listitem>
|
---|
[824ddcc] | 133 | <para>Arch <ulink url="https://www.archlinux.org/packages/"/> - enter
|
---|
[6693e21] | 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>
|
---|
[6ed5123] | 138 | </listitem>
|
---|
| 139 | <listitem>
|
---|
| 140 | <para>Debian
|
---|
[824ddcc] | 141 | <ulink url="https://ftp.debian.org/debian/pool"/> (use your country's
|
---|
[6ed5123] | 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
|
---|
[342d139a] | 145 | with Debian's free software guidelines) accompanied by versioned .diff.gz
|
---|
[6ed5123] | 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>
|
---|
[ddbbdde] | 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
|
---|
[ac421ac] | 157 | an srpm (source rpm) and using <application>rpm2cpio</application> (see
|
---|
[ddbbdde] | 158 | the Tip at the bottom of the page). For rpms go to <ulink
|
---|
[ac421ac] | 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>
|
---|
[6ed5123] | 165 | </listitem>
|
---|
| 166 | <listitem>
|
---|
[6ad6bac] | 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>
|
---|
[6ed5123] | 189 | </listitem>
|
---|
| 190 | <listitem>
|
---|
[58b66af3] | 191 | <para>openSUSE provide a rolling release, some package versions are in
|
---|
[824ddcc] | 192 | <ulink url="https://download.opensuse.org/source/tumbleweed/repo/oss/src/"/>
|
---|
[58b66af3] | 193 | but others are in ../update/openSUSE-current/src - the
|
---|
[df4bcb1] | 194 | source only seems to be available in source rpms.</para>
|
---|
[6ed5123] | 195 | </listitem>
|
---|
| 196 | <listitem>
|
---|
| 197 | <para>Slackware - the official package browser is currently broken. The
|
---|
[824ddcc] | 198 | site at <ulink url="https://slackbuilds.org/"/> has current and previous
|
---|
[6ed5123] | 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="ftp://ftp.ubuntu.com/ubuntu/pool/"/> - see the
|
---|
[5031e90] | 205 | Debian notes above.</para>
|
---|
[6ed5123] | 206 | </listitem>
|
---|
| 207 | </itemizedlist>
|
---|
| 208 | <para>If everything else fails, try the blfs-support mailing-list.</para>
|
---|
[8b354833] | 209 | </listitem>
|
---|
| 210 | </itemizedlist>
|
---|
| 211 |
|
---|
| 212 | <tip>
|
---|
[4afc2603] | 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>
|
---|
[24ca7aa] | 216 | format, there are two small scripts, <command>rpm2targz</command> and
|
---|
| 217 | <command>deb2targz</command> that are available at
|
---|
[0a0ad3a] | 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
|
---|
[8b354833] | 220 | into a simple <filename>tar.gz</filename> format.</para>
|
---|
[601a838] | 221 | <para>You may also find an rpm2cpio script useful. The Perl version in the
|
---|
[6ed5123] | 222 | linux kernel archives at <ulink
|
---|
[824ddcc] | 223 | url="https://lore.kernel.org/all/20021016121842.GA2292@ncsu.edu/2-rpm2cpio"/>
|
---|
[6ed5123] | 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>
|
---|
[8b354833] | 228 | </tip>
|
---|
[f45b1953] | 229 |
|
---|
| 230 | </sect1>
|
---|