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