mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 06:52:14 +08:00
231 lines
12 KiB
XML
231 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="beyond" xreflabel="Going Beyond BLFS">
|
|
<?dbhtml filename="beyond.html"?>
|
|
|
|
|
|
<title>Going Beyond BLFS</title>
|
|
|
|
<para>The packages that are installed in this book are only the tip of the
|
|
iceberg. We hope that the experience you gained with the LFS book and
|
|
the BLFS book will give you the background needed to compile, install
|
|
and configure packages that are not included in this book.</para>
|
|
|
|
<para>When you want to install a package to a location other than
|
|
<filename class='directory'>/</filename>, or
|
|
<filename class='directory'>/usr</filename>, you are installing
|
|
outside the default environment settings on most machines. The following
|
|
examples should assist you in determining how to correct this situation.
|
|
The examples cover the complete range of settings that may need
|
|
updating, but they are not all needed in every situation.</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>Expand the <envar>PATH</envar> to include
|
|
<filename class='directory'>$PREFIX/bin</filename>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Expand the <envar>PATH</envar> for
|
|
<systemitem class="username">root</systemitem> to include
|
|
<filename class='directory'>$PREFIX/sbin</filename>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/lib</filename>
|
|
to <filename>/etc/ld.so.conf</filename> or expand
|
|
<envar>LD_LIBRARY_PATH</envar> to include it. Before using the latter
|
|
option, check out <ulink
|
|
url="http://xahlee.info/UnixResource_dir/_/ldpath.html"/>.
|
|
If you modify <filename>/etc/ld.so.conf</filename>, remember to update
|
|
<filename>/etc/ld.so.cache</filename> by executing
|
|
<command>ldconfig</command> as the
|
|
<systemitem class="username">root</systemitem> user.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/man</filename>
|
|
to <filename>/etc/man_db.conf</filename> or expand
|
|
<envar>MANPATH</envar>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/info</filename>
|
|
to <envar>INFOPATH</envar>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/lib/pkgconfig</filename>
|
|
to <envar>PKG_CONFIG_PATH</envar>. Some packages are now installing
|
|
<filename class='extension'>.pc</filename> files in
|
|
<filename class='directory'>$PREFIX/share/pkgconfig</filename>, so you may
|
|
have to include this directory also.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/include</filename> to
|
|
<envar>CPPFLAGS</envar> when compiling packages that depend on
|
|
the package you installed.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Add <filename class='directory'>$PREFIX/lib</filename> to
|
|
<envar>LDFLAGS</envar> when compiling packages that depend on a library
|
|
installed by the package.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<para>If you are in search of a package that is not in the book, the following
|
|
are different ways you can search for the desired package.</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>If you know the name of the package, then search SourceForge for
|
|
it at <ulink url="https://sourceforge.net/directory/"/>, and search
|
|
GitHub for it at <ulink url="https://github.com/"/>.
|
|
Also search Google at <ulink url="https://google.com/"/>. Sometimes a
|
|
search for the <filename class='extension'>rpm</filename> at
|
|
<ulink url="https://rpmfind.net/"/> or the
|
|
<filename class='extension'>deb</filename> at
|
|
<ulink url="https://www.debian.org/distrib/packages#search_packages"/> can
|
|
also lead to a link to the package.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>If you know the name of the executable, but not the package
|
|
that the executable belongs to, first try a Google search with the name
|
|
of the executable. If the results are overwhelming, try searching for the
|
|
given executable in the Debian repository at <ulink
|
|
url="https://www.debian.org/distrib/packages#search_contents"/>.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<para>Some general hints on handling new packages:</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>Many of the newer packages follow the <command>./configure
|
|
&& make && make install</command> process.
|
|
Help on the options accepted by configure can be obtained via the
|
|
command <command>./configure --help</command>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Most of the packages contain documentation on compiling and
|
|
installing the package. Some of the documents are excellent, some not so
|
|
excellent. Check out the homepage of the package for any additional and
|
|
updated hints for compiling and configuring the package.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>If you are having a problem compiling the package, try
|
|
searching the LFS archives at
|
|
<ulink url="https://www.&lfs-domainname;/search.html"/> for the error or if
|
|
that fails, try searching Google. Often, a distribution will have already
|
|
solved the problem (many of them use development versions of packages, so
|
|
they see the changes sooner than those of us who normally use stable released
|
|
versions). But be cautious - all builders tend to carry patches which are no
|
|
longer necessary, and to have fixes which are only required because of their
|
|
particular choices in how they build a package. You may have to search
|
|
deeply to find a fix for the package version you are trying to use, or even
|
|
to find the package (names are sometimes not what you might expect, e.g.
|
|
<application>ghostscript</application> often has a prefix or a suffix in its
|
|
name), but the following notes might help, particularly for those who, like
|
|
the editors, are trying to build the latest versions and encountering
|
|
problems:</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>Arch <ulink url="https://www.archlinux.org/packages/"/> - enter
|
|
the package name in the 'Keywords' box, select the package name,
|
|
select the 'Source Files' field, and then select the
|
|
<filename>PKGBUILD</filename> entry to see how they build this
|
|
package.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Debian
|
|
<ulink url="http://ftp.debian.org/debian/pool"/> (use your country's
|
|
version if there is one) - the source will be in .tar.gz tarballs (either
|
|
the original upstream <filename class='extension'>.orig</filename> source,
|
|
or else a <filename>dfsg</filename> containing those parts which comply
|
|
with Debian's free software guidelines) accompanied by versioned .diff.gz
|
|
or .tar.gz additions. These additions often show how the package is built,
|
|
and may contain patches. In the .diff.gz versions, any patches create files
|
|
in <filename class="directory">debian/patches</filename>.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Fedora package source gets reorganized from time to time.
|
|
At the moment the package source for rpms is at <ulink
|
|
url="https://src.fedoraproject.org/projects/rpms/%2A"/> and from there
|
|
you can try putting a package name in the search box. If the package is
|
|
found you can look at the files (specfile to control the build, various
|
|
patches) or the commits. If that fails, you can download
|
|
an srpm (source rpm) and using <application>rpm2cpio</application> (see
|
|
the Tip at the bottom of the page). For rpms go to <ulink
|
|
url="https://dl.fedoraproject.org/pub/fedora/linux/"/> and then choose
|
|
which repo you wish to look at - development/rawhide is the latest
|
|
development, or choose releases for what was shipped in a release,
|
|
updates for updates to a release, or updates/testing for the latest
|
|
updates which might work or might have problems.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Gentoo - First use a search engine to find an ebuild which looks as
|
|
if it will fix the problem, or search at <ulink
|
|
url="https://packages.gentoo.org/"/> - use the search field. Note where the
|
|
package lives in the portage hierarchy, e.g.
|
|
<filename>app-something/</filename>. In general you can treat the ebuild as
|
|
a sort of pseudo-code / shell combination with some functions you can
|
|
hazard a guess at, such as <command>dodoc</command>. If the fix is just a
|
|
<command>sed</command>, try it. However, in most cases the fix will use a
|
|
patch. To find the patch, use a gentoo-portage mirror: Two links to mirrors
|
|
in the U.S.A. which seem to usually be up to date are
|
|
<ulink url="https://mirror.rackspace.com/gentoo-portage/"/> and
|
|
<ulink url="https://mirror.steadfast.net/gentoo-portage/"/>. Navigate down
|
|
the tree to the package, then to the <filename>files/</filename> directory
|
|
to look for the patch. Sometimes a portage mirror has not yet been updated,
|
|
particularly for a recent new patch. In a few cases, gentoo batch the
|
|
patches into a tarball and the ebuild will have a link in the form
|
|
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz
|
|
: here, look for PATCH_DEV and PATCH_VER in the build and format the full
|
|
URL in your browser or for wget : remember the '~' before the developer's
|
|
ID and note that trying to search the earlier levels of the URL in a
|
|
browser may drop you at www.gentoo.org or return 403 (forbidden).
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>openSUSE provide a rolling release, some package versions are in
|
|
<ulink url="https://download.opensuse.org/source/tumbleweed/repo/oss/src/"/>
|
|
but others are in ../update/openSUSE-current/src - the
|
|
source only seems to be available in source rpms.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Slackware - the official package browser is currently broken. The
|
|
site at <ulink url="https://slackbuilds.org/"/> has current and previous
|
|
versions in their unofficial repository with links to homepages, downloads,
|
|
and some individual files, particularly the <filename>.SlackBuild</filename>
|
|
files.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Ubuntu <ulink url="http://ftp.ubuntu.com/ubuntu/pool/"/> - see the
|
|
Debian notes above.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>If everything else fails, try the blfs-support mailing-list.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<tip>
|
|
<para>If you have found a package that is only available in
|
|
<filename class='extension'>.deb</filename> or
|
|
<filename class='extension'>.rpm</filename>
|
|
format, there are two small scripts, <command>rpm2targz</command> and
|
|
<command>deb2targz</command> that are available at
|
|
<ulink url="&sources-anduin-http;/extras/deb2targz.tar.bz2"/> and
|
|
<ulink url="&sources-anduin-http;/extras/rpm2targz.tar.bz2"/> to convert the archives
|
|
into a simple <filename>tar.gz</filename> format.</para>
|
|
<para>You may also find an rpm2cpio script useful. The Perl version in the
|
|
linux kernel archives at <ulink
|
|
url="https://lore.kernel.org/all/20021016121842.GA2292@ncsu.edu/2-rpm2cpio"/>
|
|
works for most source rpms. The rpm2targz script will use an rpm2cpio script
|
|
or binary if one is on your path. Note that rpm2cpio will unpack a source
|
|
rpm in the current directory, giving a tarball, a spec file, and perhaps patches
|
|
or other files.</para>
|
|
</tip>
|
|
|
|
</sect1>
|