Commit Pierre Labastie's patch for including package management support in jhalfs. NOTE: Package management is by default disabled.

This commit is contained in:
Thomas Pegg 2012-02-01 23:29:37 +00:00
parent f5dc6d7423
commit 7072e1faf4
40 changed files with 2119 additions and 400 deletions

View file

@ -824,16 +824,16 @@ menu "--- Build Settings"
help
#-- Run test suites
#
# You will can to select between:
# You will have to select between:
#
# - Only final system Glibc, GCC and Binutils testsuites
# - All final system testsuites
# - Both temporary tools and final system testsuites
#
# HLFS and CLFS has no testsuites available in the
# HLFS and CLFS have no testsuites available in the
# temporary tools phase
# You will be promt also about the "flavour" of the
# You will be prompted also about the "flavour" of the
# testsuites run:
#
# - Don't stop on test suite failures
@ -843,10 +843,10 @@ menu "--- Build Settings"
choice
prompt "Tests level"
depends CONFIG_TESTS
default TEST_1
default TST_1
config TST_1
bool "Only final system Glibc, GCC and Binutils testsuites"
bool "Only final system Glibc, GMP, MPFR, GCC and Binutils testsuites"
config TST_2
bool "All final system testsuites"
@ -880,6 +880,28 @@ menu "--- Build Settings"
#--- End Test Suites
#--- Package Management
config PKGMNGT
bool "Package management"
depends BOOK_LFS
default n
help
#-- Use package management
#
# If set, the packages in the final phase are built
# in a separate directory PKG_DEST.
# You should provide a bash function for packing
# and installing the package.
# Also you have to provide the instructions
# to build the package manager during the
# temporary tools phase, in the form of a
# sect1 of the book identical to a package
# sect1. See README.PACKAGE_MANAGEMENT
#
# For now, works only with LFS
#--- End package management
#--- Installed files logs
config INSTALL_LOG
bool "Create installed files logs"
@ -914,7 +936,7 @@ menu "--- Build Settings"
#
# You will be prompted for the full path to the .config
# file. It will be copied to the 'sources' directory and
# rename kernel-config
# renamed kernel-config
config CONFIG
string "Kernel config file"
@ -937,13 +959,15 @@ menu "--- Build Settings"
depends on !BOOK_HLFS && !BOOK_CLFS3
help
#-- Install the optional vim-lang package
# NOTE: This option is obsolete with the 7.3 release of Vim
# which is included in all recent releases of LFS.
config NO_PROGRESS_BAR
bool "DO NOT use/display progress_bar "
default n
help
#-- No not use the progress bar routine. On slower machines
# this functions consumes precious CPU cycles.
#-- Do not use the progress bar routine. On slower machines
# this function consumes precious CPU cycles.
config TIMEZONE
string "TimeZone"
@ -1135,7 +1159,7 @@ config REBUILD_MAKEFILE
help
#-- Rebuild the Makefile
#
# This option alow to rebuild the Makefile after
# This option allows to rebuild the Makefile after
# customizing the base system build scripts.
#
# See README.CUSTOM for more info about this feature.

388
FUNCTION_LIST Normal file
View file

@ -0,0 +1,388 @@
$Id:$
This is the list of functions used in jhalfs, excluding BLFS tool functions
and functions defined in {C,H}LFS/master.sh.
I felt the need for documenting it when trying to add package management.
Functions are listed in alphabetical order, with a short description and the
file where they are defined.
-----------------------------------------------------------------------------
add_blfs_deps_urls():
From common/libs/func_blfs_deps.
Description: Since the URLS and MD5 of BLFS dependencies are hardcoded,
there is no easy way to extrat them. So this function adds them at the
end of `urls.lst'.
Called by: create_urls
--------------------------------------------------------------------------
copy_blfs_deps_scripts():
From common/libs/func_blfs_deps.
Description: Copies the scriptlets from `blfs-tools-deps' to the
subdirectory `blfs-tools-deps' in `${PROGNAME}-commands'. Must
be called from `$JHALFSDIR' where `$COMMON/blfs-tools-deps' should have
been copied first. Removes `$JHALFSDIR/blfs-tools-deps' at the end.
Called by: extract_commands
--------------------------------------------------------------------------
wrt_blfs_tool_targets():
From common/libs/func_blfs_deps.
Description: Writes Makefile entries for BLFS tools dependencies.
should be called from the `${PROGNAME}-commands' directory and
with `$MKFILE' set.
TODO: Notice that tidy, unzip, lynx and docbook versions are hardcoded there.
TODO: This function does not implement the mechanism described in
`README.CUSTOM' for the `ddd-d-scriptlet' naming scheme.
Called by: build_Makefiles (from master.sh)
Uses: makefile helper functions to write in makefile.
--------------------------------------------------------------------------
get_sources():
From common/libs/func_download_pkgs.
Description: Downloads packages if `GETPKG' is `y'. Writes package name
and md5 checksum to `MISSING_FILES.DMP' if a package cannot be found in
`$SRC_ARCHIVE' and cannot be downloaded, or if md5 checksum does not agree
book's one. If `MISSING_FILES.DMP' is not empty at the end of the process,
disable the excution of the makefile.
Actually, if `$BUILDDIR/sources' does not exist, it is not created if
`GETPKG' is `n'. And an empty or non existent `$BUILDDIR/sources' is
not flagged...
If `GETPKG' is `y', removes `MD5SUMS', `MISSING_FILES.DMP', and `urls.lst'
from `$BUILDDIR/sources' and generates them in the course of the process.
Called by: get_book and extract_commands
--------------------------------------------------------------------------
gs_wrt_message():
From common/libs/func_download_pkgs.
Description: internal function in get_sources. Writes a message to the screen
and a package name to `MISSING_FILES.DMP'.
--------------------------------------------------------------------------
create_urls():
From common/libs/func_download_pkgs.
Description: Runs xsltproc with stylesheet urls.xsl on chapter 3 of the
book. Add BLFS dependencies and custom dependencies if `BLFS_TOOLS' is `y'
and `CUSTOM_TOOLS' is `y' respectively.
Called by: get_sources
--------------------------------------------------------------------------
wrt_CustomTools_target():
From common/libs/func_custom_pkgs.
Description: Add users supplied scripts to `$JHALFSDIR/custom-tools', with
corresponding entry in the Makefile.
TODO: Add package management (instructions to user and Makefile entry)
Called by: All master.sh `build_Makefile'.
--------------------------------------------------------------------------
add_CustomToolsURLS():
From common/libs/func_custom_pkgs.
Description: Add any users supplied scripts URL information to urls.lst
Called by: create_urls
--------------------------------------------------------------------------
wrt_Makefile_header():
From common/libs/func_wrt_Makefile.
Description: Writes the beginning of the Makefile into $MKFILE, which created
or erased before.
Called by: All master.sh `build_Makefile'.
--------------------------------------------------------------------------
get_package_tarball_name():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains the script_name
Description: Retrieves the tarball name from `pkg_tarball_list' by comparing
script-name to the beginning of a line in the list. Writes the name found
to stdout.
Implements the behavior described in README.CUSTOM, that is, if script_name
begins with d-, strip that part.
Called by: various functions in master.sh
--------------------------------------------------------------------------
LUSER_wrt_target():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains target name; $2 contains dependency(ies)
Description: Add lines in the Makefile, which create target and
initialize log file.
LUSER version uses $MOUNT_PT in absolute path names.
Called by: chapter5_Makefiles and chapter6_Makefiles in LFS/master.sh
and other master.sh
--------------------------------------------------------------------------
CHROOT_wrt_target():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains target name; $2 contains dependency(ies)
Description: Add lines in the Makefile, which create target and
initialize log file.
CHROOT version uses / in absolute path names.
Called by: chapter6_Makefiles and chapter78_Makefiles in LFS/master.sh
and other functions in other master.sh
--------------------------------------------------------------------------
LUSER_wrt_unpack():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains tarball name; $2 contains 1 if the existing directory
is to be presserved.
Description: Add lines in the Makefile, which unpack and set 'ROOT' var and
remove existing dir if $2 != 1
LUSER version uses $MOUNT_PT in absolute path names.
Uses: Makefile functions remove_existing_dirs, unpack, get_pkg_root.
--------------------------------------------------------------------------
CHROOT_Unpack():
From common/libs/func_wrt_Makefile.
Arguments: $1 contains tarball name; $2 contains 1 if the existing directory
is to be presserved.
Description: Add lines in the Makefile, which unpack and set 'ROOT' var and
remove existing dir if $2 != 1
CHROOT version uses / in absolute path names.
Uses: Makefile functions remove_existing_dirs2, unpack2, get_pkg_root2.
--------------------------------------------------------------------------
LUSER_wrt_test_log():
From common/libs/func_wrt_Makefile.
Description: Add lines in the Makefile, which initialize testsuite
log file.
LUSER version uses $MOUNT_PT in absolute path names.
--------------------------------------------------------------------------
CHROOT_wrt_test_log():
From common/libs/func_wrt_Makefile.
Description: Add lines in the Makefile, which initialize testsuite
log file.
CHROOT version uses / in absolute path names.
--------------------------------------------------------------------------
wrt_RunAsRoot():
From common/libs/func_wrt_Makefile.
Description: Some scripts must be run as root..
--------------------------------------------------------------------------
LUSER_wrt_RunAsUser():
From common/libs/func_wrt_Makefile.
Description: Calculate time with perl, footer to log file
--------------------------------------------------------------------------
CHROOT_wrt_RunAsRoot():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_CopyFstab():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_CopyFstab():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_TouchTimestamp():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_TouchTimestamp():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_wrt_LogNewFiles():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_LogNewFiles():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
LUSER_RemoveBuildDirs():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
CHROOT_wrt_RemoveBuildDirs():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
wrt_touch():
From common/libs/func_wrt_Makefile.
Description:
--------------------------------------------------------------------------
wrt_compare_targets():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_system_build():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_compare_work():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_do_ica_work():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_do_farce_work():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
wrt_logs():
From common/libs/func_compare.sh.
Description:
--------------------------------------------------------------------------
validate_config():
From common/libs/func_validate_configs.sh.
Description: Are the config values sane (within reason)
--------------------------------------------------------------------------
write_error_and_die():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
validate_file():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
validate_dir():
From common/libs/func_validate_configs.sh.
Description:
--------------------------------------------------------------------------
get_book():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
extract_commands():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
create_package_list():
From common/libs/func_book_parser.
Description:
--------------------------------------------------------------------------
check_version():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
write_error_and_die():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
check_prerequisites():
From common/libs/func_check_version.sh.
Description:
--------------------------------------------------------------------------
write_or_exit():
From common/progress_bar.sh.
Description:
--------------------------------------------------------------------------
no_empty_builddir():
From common/common-functions.
Description:
--------------------------------------------------------------------------
run_make():
From common/common-functions.
Description:
--------------------------------------------------------------------------
clean_builddir():
From common/common-functions.
Description:
--------------------------------------------------------------------------
function dohelp():
From extras/farce.
Description:
--------------------------------------------------------------------------
function emessage():
From extras/farce.
Description:
--------------------------------------------------------------------------
function expected():
From extras/farce.
Description:
--------------------------------------------------------------------------
function failure():
From extras/farce.
Description:
--------------------------------------------------------------------------
extras/farce: emessage "internal error in failure() for TYPE $TYPE"
function fatal():
From extras/farce.
Description:
--------------------------------------------------------------------------
function filetype():
From extras/farce.
Description:
--------------------------------------------------------------------------
function message():
From extras/farce.
Description:
--------------------------------------------------------------------------
function onlyone():
From extras/farce.
Description:
--------------------------------------------------------------------------
function testar():
From extras/farce.
Description:
--------------------------------------------------------------------------
function testgzip():
From extras/farce.
Description:
--------------------------------------------------------------------------
function testso():
From extras/farce.
Description:
--------------------------------------------------------------------------
function tokenize():
From extras/farce.
Description:
--------------------------------------------------------------------------
function tokenizeanddiff():
From extras/farce.
Description:
--------------------------------------------------------------------------
function validateargs():
From extras/farce.
Description:
--------------------------------------------------------------------------
process_toolchain():
From HLFS/master.sh.
Description: embryo,cocoon and butterfly need special handling
--------------------------------------------------------------------------
chapter3_Makefiles():
From HLFS/master.sh.
Description: Initialization of the system
--------------------------------------------------------------------------
chapter5_Makefiles():
From HLFS/master.sh.
Description: Bootstrap or temptools phase
--------------------------------------------------------------------------
chapter6_Makefiles():
From HLFS/master.sh.
Description: sysroot or chroot build phase
--------------------------------------------------------------------------
chapter7_Makefiles():
From HLFS/master.sh.
Description: Create a bootable system.. kernel, bootscripts..etc
--------------------------------------------------------------------------
build_Makefile():
From HLFS/master.sh.
Description: Construct a Makefile from the book scripts
--------------------------------------------------------------------------
simple_error():
From jhalfs.
Description: Basic error trap.... JUST DIE
--------------------------------------------------------------------------
see_ya():
From jhalfs.
Description:
--------------------------------------------------------------------------
jhalfs: # Tidy and Unzip version are harcoded also in wrt_blfs_tool_targets()
jhalfs: # Create $BUILDDIR/sources even though it could be created by get_sources()
chapter4_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter5_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter6_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
chapter78_Makefiles():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
build_Makefile():
From LFS/master.sh.
Description:
--------------------------------------------------------------------------
validate_opt_settings():
From optimize/optimize_functions.
Description: Show optimize setting and wait user agreement
--------------------------------------------------------------------------
wrt_optimize():
From optimize/optimize_functions.
Description: Apply pkg specific opt's to build
--------------------------------------------------------------------------
wrt_makeflags():
From optimize/optimize_functions.
Description: Apply MAKEFLAGS to build
--------------------------------------------------------------------------

View file

@ -1,17 +1,18 @@
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "FAKEDIR/general.ent">
%general-entities;
]>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Id$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<!-- XSLT stylesheet to create shell scripts from LFS books. -->
<!-- use package management ?
n = no, original behavior
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
-->
<xsl:param name="pkgmngt" select="n"/>
<!-- Run test suites?
0 = none
@ -27,8 +28,8 @@
-->
<xsl:param name="bomb-testsuite" select="n"/>
<!-- Install vim-lang package? -->
<xsl:param name="vim-lang" select="y"/>
<!-- Install vim-lang package? OBSOLETE should always be 'n'-->
<xsl:param name="vim-lang" select="n"/>
<!-- Time zone -->
<xsl:param name="timezone" select="GMT"/>
@ -77,6 +78,23 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Inclusion of package manager scriptlets -->
<xsl:if test="@id='ch-tools-stripping' and $pkgmngt='y'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[@id='ch-tools-pkgmngt']"
mode="pkgmngt">
<xsl:with-param name="order" select="concat($order,'-1')"/>
<xsl:with-param name="dirname" select="$dirname"/>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="@id='ch-system-strippingagain' and $pkgmngt='y'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[@id='ch-system-pkgmngt']"
mode="pkgmngt">
<xsl:with-param name="order" select="concat($order,'-1')"/>
<xsl:with-param name="dirname" select="$dirname"/>
</xsl:apply-templates>
</xsl:if>
<!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:choose>
@ -96,15 +114,92 @@
<xsl:text>&#xA;</xsl:text>
<xsl:if test="sect2[@role='installation']">
<xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">
<xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1&#xA;</xsl:text>
</xsl:if>
<xsl:apply-templates
select=".//screen[not(@role) or
@role != 'nodump']/userinput[
@remap = 'pre' or
@remap = 'configure' or
@remap = 'make' or
@remap = 'test' and
not(current()/@id='ch-tools-dejagnu')]"/>
<xsl:if
test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
$pkgmngt = 'y' and
descendant::screen[not(@role) or
@role != 'nodump']/userinput[
@remap='install']">
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 &amp;&amp; ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
</xsl:text>
</xsl:if>
<xsl:apply-templates select=".//screen"/>
<xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
<xsl:if test="@id = 'ch-system-glibc' and
$pkgmngt = 'y'">
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
</xsl:text>
</xsl:if>
<xsl:apply-templates
select=".//screen[not(@role) or
@role != 'nodump']/userinput[@remap = 'install']"/>
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
$pkgmngt = 'y' and
descendant::screen[not(@role) or
@role != 'nodump']/userinput[
@remap='install']">
<xsl:if test="@id = 'ch-system-man-pages'">
<!-- those files are provided by the shadow package -->
<xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
</xsl:text>
</xsl:if>
<xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/man/man{1..8}; do
[[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
done
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
[[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
done
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
[[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
done
packInstall
rm -rf $PKG_DEST
</xsl:text>
</xsl:if>
<xsl:if test="$testsuite='3' and @id='ch-tools-glibc' or @id='ch-system-glibc'">
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:apply-templates
select=".//screen[
not(@role) or
@role != 'nodump'
]/userinput[
not(@remap) or
@remap='adjust' or
@remap='test' and current()/@id='ch-tools-dejagnu'
]"/>
<xsl:if test="@id='ch-system-creatingdirs'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[
@id='ch-system-pkgmngt-creatingdirs'
]//userinput"/>
</xsl:if>
<xsl:if test="@id='ch-system-createfiles'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[
@id='ch-system-pkgmngt-createfiles'
]//userinput"/>
</xsl:if>
<xsl:if test="not(@id='ch-system-chroot') and
not(@id='ch-system-revisedchroot')">
<xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
@ -114,34 +209,53 @@
</xsl:if>
</xsl:template>
<xsl:template match="screen">
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
<xsl:apply-templates select="userinput" mode="screen"/>
<xsl:template match="sect1" mode="pkgmngt">
<xsl:param name="dirname" select="chapter05"/>
<!-- The build order -->
<xsl:param name="order" select="062-1"/>
<!-- The file names -->
<xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
<xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
<!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:text>#!/bin/bash
set +h
set -e
cd $PKGDIR
</xsl:text>
<xsl:apply-templates
select=".//screen[not(@role) or @role != 'nodump']/userinput[@remap != 'adjust']"
mode="pkgmngt"/>
<xsl:if test="@id = 'ch-system-pkgmngt'">
<xsl:text>packInstall
rm -rf $PKG_DEST
</xsl:text>
</xsl:if>
<xsl:apply-templates
select=".//screen[
not(@role) or
@role != 'nodump'
]/userinput[
not(@remap) or
@remap='adjust'
]"
mode="pkgmngt"/>
<xsl:text>
echo -e "\n\nTotalseconds: $SECONDS\n"
exit
</xsl:text>
</exsl:document>
</xsl:template>
<xsl:template match="userinput" mode="screen">
<xsl:choose>
<!-- Estandarized package formats -->
<xsl:when test="contains(string(),'tar.gz')">
<xsl:value-of select="substring-before(string(),'tar.gz')"/>
<xsl:text>tar.*</xsl:text>
<xsl:value-of select="substring-after(string(),'tar.gz')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Avoiding a race condition in a patch -->
<xsl:when test="contains(string(),'debian_fixes')">
<xsl:value-of select="substring-before(string(),'patch')"/>
<xsl:text>patch -Z</xsl:text>
<xsl:value-of select="substring-after(string(),'patch')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Fix Udev reinstallation after a build failure -->
<xsl:when test="contains(string(),'firmware,udev')">
<xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
<xsl:template match="userinput" mode="pkgmngt">
<xsl:apply-templates/>
<xsl:text>&#xA;fi&#xA;</xsl:text>
</xsl:when>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="userinput">
<xsl:choose>
<!-- Copying the kernel config file -->
<xsl:when test="string() = 'make mrproper'">
<xsl:text>make mrproper&#xA;</xsl:text>
@ -149,119 +263,33 @@
<xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
</xsl:if>
</xsl:when>
<!-- The Bash, Coreutils, and Module-Init-Tools test suites are optional -->
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
ancestor::sect1[@id='ch-system-bash'] or
ancestor::sect1[@id='ch-system-module-init-tools'])
and @remap = 'test'">
<xsl:choose>
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
<xsl:otherwise>
<xsl:if test="not(contains(string(),'check')) and
not(contains(string(),'make tests'))">
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<!-- Coreutils and Module-Init-Tools -->
<xsl:if test="contains(string(),'check')">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:value-of select="substring-before(string(),'check')"/>
<xsl:text>-k check</xsl:text>
<xsl:value-of select="substring-after(string(),'check')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- Bash -->
<xsl:if test="contains(string(),'make tests')">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:value-of select="substring-before(string(),'tests')"/>
<xsl:text>-k tests</xsl:text>
<xsl:value-of select="substring-after(string(),'tests')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Fixing toolchain test suites run -->
<xsl:when test="(string() = 'make check' or
string() = 'make -k check') and
(ancestor::sect1[@id='ch-system-gcc'] or
ancestor::sect1[@id='ch-system-glibc'] or
ancestor::sect1[@id='ch-system-binutils'] or
ancestor::sect1[@id='ch-tools-gcc-pass2'])">
<xsl:choose>
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3'">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(string(),'glibc-check-log')">
<xsl:choose>
<xsl:when test="$testsuite != '0'">
<xsl:value-of select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(string(),'test_summary') or
contains(string(),'expect -c')">
<xsl:choose>
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3'">
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG&#xA;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:when>
<!-- The rest of testsuites -->
<!-- test instructions -->
<xsl:when test="@remap = 'test'">
<xsl:choose>
<xsl:when test="$testsuite = '0'"/>
<xsl:when test="$testsuite = '1' and
not(ancestor::sect1[@id='ch-system-gcc']) and
not(ancestor::sect1[@id='ch-system-glibc']) and
not(ancestor::sect1[@id='ch-system-gmp']) and
not(ancestor::sect1[@id='ch-system-mpfr']) and
not(ancestor::sect1[@id='ch-system-binutils'])"/>
<xsl:when test="$testsuite = '2' and
ancestor::chapter[@id='chapter-temporary-tools']"/>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:choose>
<!-- special case for glibc -->
<xsl:when test="contains(string(), 'glibc-check-log')">
<xsl:value-of
select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:when test="contains(string(), 'make -k')">
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:when test="contains(string(), 'make')">
<xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/>
@ -269,21 +297,84 @@
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:if test="not(contains(string(), '&gt;&gt;'))">
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- bomb-testsuite != 'n'-->
<xsl:choose>
<!-- special case for glibc -->
<xsl:when test="contains(string(), 'glibc-check-log')">
<xsl:value-of
select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 &#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:if test="not(contains(string(), '&gt;&gt;'))">
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- End of test instructions -->
<!-- Don't stop on strip run -->
<xsl:when test="contains(string(),'strip ')">
<xsl:apply-templates/>
<xsl:text> || true&#xA;</xsl:text>
</xsl:when>
<!-- Package management -->
<!-- Add $PKG_DEST to installation commands -->
<xsl:when test="@remap='install' and
not(ancestor::chapter[
@id='chapter-temporary-tools'
])">
<xsl:choose>
<xsl:when test="$pkgmngt='n'">
<xsl:choose>
<xsl:when test="contains(string(),'firmware,udev')">
<xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#xA;fi&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise><!--pkgmngt = 'y'-->
<xsl:choose>
<xsl:when test="./literal">
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring"
select="text()[1]"/>
</xsl:call-template>
<xsl:apply-templates select="literal"/>
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring"
select="text()[2]"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring" select="string()"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- End addition for package management -->
<!-- The rest of commands -->
<xsl:otherwise>
<xsl:apply-templates/>
@ -311,4 +402,95 @@
</xsl:choose>
</xsl:template>
<xsl:template name="outputpkgdest">
<xsl:param name="outputstring" select="foo"/>
<xsl:choose>
<xsl:when test="contains($outputstring,'make ')">
<xsl:choose>
<xsl:when test="not(starts-with($outputstring,'make'))">
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring"
select="substring-before($outputstring,'make')"/>
</xsl:call-template>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
select="substring-after($outputstring,
substring-before($outputstring,'make'))"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<!-- special cases (no DESTDIR) here -->
<xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
<xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
<xsl:value-of
select="substring-before(substring-after(string(),'make'),
'install')"/>
<xsl:text>install&#xA;</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
<xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
<xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
<xsl:value-of
select="substring-before(substring-after(string(),'DESTDIR='),
'install')"/>
<xsl:text>install&#xA;</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
<xsl:text>make ROOT=$PKG_DEST</xsl:text>
<xsl:value-of
select="substring-before(substring-after(string(),'make'),
'install')"/>
<xsl:text>install&#xA;</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
<xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
<xsl:value-of
select="substring-before(substring-after(string(),'make'),
'install')"/>
<xsl:text>install&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
select="substring-after($outputstring,'make')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise> <!-- no make in this string -->
<xsl:choose>
<xsl:when test="contains($outputstring,'&gt;/') and
not(contains(substring-before($outputstring,'&gt;/'),' /'))">
<xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
<xsl:text>&gt;$PKG_DEST/</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($outputstring,' /')">
<xsl:value-of select="substring-before($outputstring,' /')"/>
<xsl:text> $PKG_DEST/</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$outputstring"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View file

@ -244,7 +244,7 @@ chapter6_Makefiles() {
CHROOT_Unpack "$pkg_tarball"
# If the testsuites must be run, initialize the log file
case $name in
binutils | gcc | glibc )
binutils | gcc | glibc | gmp | mpfr )
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
;;
* )

63
README.PACKGE_MANAGEMENT Normal file
View file

@ -0,0 +1,63 @@
TITLE : Package management in jhalfs
ADDED : $Date:$
BY : Pierre Labastie
1. INTRODUCTION:
There are several hints discussing package management for LFS, but
nothing under jhalfs. There used to be a patch for PACO that I cannot
find now. This is a modification, which allows to use a package manager
inside jhalfs. I hope it is flexible enough to support several package
managers. My implementation uses dpkg, from Debian, in a very crude way.
Debian has a sophisticated package management system, which I have not
tried to use here. For example, it should be usable with Pacman from
Arch Linux (http://www.archlinux.org), as far as I remember from my old
days with DIYL. I am sorry to say I have (almost) no experience with
rpm, so I cannot tell whether it would fit.
2. OVERVIEW OF THE SYSTEM:
For now, package management is only available for LFS. I plan to
upgrade BLFS tools, but nothing usable right now. The other flavours of
LFS do not seem very active, so there is no point in updating jhalfs
for them.
The first thing to do is to modify the install instructions of the
chapter 6, 7 and 8 of the book so that the installed files end up in a
directory other than `/'. We choose to call this directory by the name
of the executed script, and to put the path to this directory in the
PKG_DEST variable which is made available to the scriplets.
Almost all the packages have a way to redirect the destination of
the files they install at the `make install' stage with the variable
DESTDIR. Furthermore, the authors of the book have been kind enough to
flag the installation instructions with `remap=install'. This allows an
xsl stylesheet to find those instructions. Then, places where `make '
occurs (make followed by a space) are replaced by `make DESTDIR=$PKG_DEST '.
Places where the book instructions move files into their destination
are harder to deal with: it is possible to change all occurences of ` /' or
`>/' (beginning of absolute paths) to `$PKG_DEST', but you end up moving
files to non existent directories. There is no simple way to automatically
create those directories, because you have sometimes to use the full path
(instructions of the form `cp file dir') and sometimes only the dirname
(instructions of the form `cp file1 file2'). So I am conservative and
create a reasonable subset of the FHS hierarchy into the destination
directory. Empty directories should then be removed before packing the
binary package.
Supposing now that the scriptlets have been adequately modified, the
package manager installation instructions have to be added at the end of
chapter 5 and chapter 6. Furthermore, the administrative files and
directories have to be created during the `Creating Directories' and
`Creating Essential Files' stage. For all this, the user has to supply a
file in docbook format, with the necessary instructions and enough
information to download the tarball. A template is provided in the pkgmngt
subdirectory.
The last thing to do is to tell how to use the package manager. When
the binary package is ready, the scriptlets call a shell function named
`packInstall', which should pack the binary package and install it on the
system. Note that nothing has been done to manage configuration files,
which are ususally treated specially by package managers. Depending on
the book layout, it is sometimes possible to create those files afterwards,
and sometimes not, which means that you have to check them after each
upgrade. The user has to provide his own function. A template is provided
in the pkgmngt subdirectory.

View file

@ -6,6 +6,28 @@ set -e
cd $PKGDIR
./configure --prefix=/usr
make
make install
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -6,6 +6,28 @@ set -e
cd $PKGDIR
./configure --prefix=/usr
make
make install
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -7,7 +7,33 @@ cd $PKGDIR
./configure --prefix=/usr
make
make install
make -C htmldoc install_apidocs
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
install -v -m644 -D htmldoc/tidy.1 \
$PKG_DEST/usr/share/man/man1/tidy.1
install -v -m755 -d $PKG_DEST/usr/share/doc/tidy-cvs_20101110
install -v -m644 htmldoc/*.{html,gif,css} \
$PKG_DEST/usr/share/doc/tidy-cvs_20101110
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -5,8 +5,38 @@
set -e
cd $PKGDIR
patch -Np1 -i ../unzip-5.52-security_fix-1.patch
make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux
make prefix=/usr install
case `uname -m` in
i?86)
sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile
make -f unix/Makefile linux
;;
*)
sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile
make -f unix/Makefile linux_noasm
;;
esac
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make prefix=$PKG_DEST/usr install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -8,100 +8,103 @@ cd /sources
mkdir docbook-xml
cd docbook-xml
unzip ../docbook-xml-4.5.zip
install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5
install -v -d -m755 /etc/xml
install -v -d -m755 $PKG_DEST/usr/share/xml/docbook/xml-dtd-4.5
install -v -d -m755 $PKG_DEST/etc/xml
chown -R root:root .
cp -v -af docbook.cat *.dtd ent/ *.mod \
/usr/share/xml/docbook/xml-dtd-4.5
if [ ! -e /etc/xml/docbook ]; then
xmlcatalog --noout --create /etc/xml/docbook
$PKG_DEST/usr/share/xml/docbook/xml-dtd-4.5
if [ ! -e $PKG_DEST/etc/xml/docbook ]; then
xmlcatalog --noout --create $PKG_DEST/etc/xml/docbook
fi
xmlcatalog --noout --add "public" \
"-//OASIS//DTD DocBook XML V4.5//EN" \
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "public" \
"-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
"file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "rewriteSystem" \
"http://www.oasis-open.org/docbook/xml/4.5" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "rewriteURI" \
"http://www.oasis-open.org/docbook/xml/4.5" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook
if [ ! -e /etc/xml/catalog ]; then
xmlcatalog --noout --create /etc/xml/catalog
$PKG_DEST/etc/xml/docbook
if [ ! -e $PKG_DEST/etc/xml/catalog ]; then
xmlcatalog --noout --create $PKG_DEST/etc/xml/catalog
fi
xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//ENTITIES DocBook XML" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//DTD DocBook XML" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
xmlcatalog --noout --add "delegateSystem" \
"http://www.oasis-open.org/docbook/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
xmlcatalog --noout --add "delegateURI" \
"http://www.oasis-open.org/docbook/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
for DTDVERSION in 4.1.2 4.2 4.3 4.4
do
xmlcatalog --noout --add "public" \
"-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
"http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "rewriteSystem" \
"http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "rewriteURI" \
"http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
"file:///usr/share/xml/docbook/xml-dtd-4.5" \
/etc/xml/docbook
$PKG_DEST/etc/xml/docbook
xmlcatalog --noout --add "delegateSystem" \
"http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
xmlcatalog --noout --add "delegateURI" \
"http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
"file:///etc/xml/docbook" \
/etc/xml/catalog
$PKG_DEST/etc/xml/catalog
done
export PKGDIR=/sources/docbook-xml
packInstall
rm -rf $PKG_DEST
cd ..
rm -rf docbook-xml

View file

@ -5,12 +5,38 @@
set -e
cd $PKGDIR
patch -Np1 -i ../gpm-1.20.1-segfault-1.patch
patch -Np1 -i ../gpm-1.20.1-silent-1.patch
./configure --prefix=/usr --sysconfdir=/etc
LDFLAGS="$LDFLAGS -lm" make
make install
cp -v conf/gpm-root.conf /etc
ldconfig
make
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
ln -v -s libgpm.so.2.1.0 $PKG_DEST/usr/lib/libgpm.so
mkdir -pv $PKG_DEST/etc
install -v -m644 conf/gpm-root.conf $PKG_DEST/etc
install -v -m755 -d $PKG_DEST/usr/share/doc/gpm-1.20.6
chmod -v 755 doc/{changes,support}
chmod -v 644 doc/{changes/*,support/*,FAQ,HACK_GPM,README*}
cp -v -R doc/{FAQ,HACK_GPM,README*,changes,support} \
$PKG_DEST/usr/share/doc/gpm-1.20.6
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -7,13 +7,35 @@ cd $PKGDIR
./configure --prefix=/usr \
--sysconfdir=/etc/lynx \
--datadir=/usr/share/doc/lynx-2.8.6 \
--datadir=/usr/share/doc/lynx-2.8.7rel.2 \
--with-zlib \
--with-bzlib \
--with-screen=ncursesw \
--enable-locale-charset
make
make install-full
chgrp -v -R root /usr/share/doc/lynx-2.8.6/lynx_doc
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install-full
chgrp -v -R root $PKG_DEST/usr/share/doc/lynx-2.8.7rel.2/lynx_doc
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -5,11 +5,38 @@
set -e
cd $PKGDIR
patch -Np1 -i ../sudo-1.6.8p12-envvar_fix-1.patch
./configure --prefix=/usr --libexecdir=/usr/lib \
--enable-noargs-shell --with-ignore-dot --with-all-insults \
--enable-shell-sets-home
./configure --prefix=/usr \
--libexecdir=/usr/lib \
--with-ignore-dot \
--with-all-insults \
--enable-shell-sets-home \
--disable-root-sudo \
--with-logfac=auth \
--without-pam \
--without-sendmail
make
make install
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -5,8 +5,32 @@
set -e
cd $PKGDIR
./configure --prefix=/usr --sysconfdir=/etc
./configure --prefix=/usr \
--sysconfdir=/etc \
--without-ssl
make
make install
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -0,0 +1,38 @@
#!/bin/bash
# $Id:$
set -e
cd $PKGDIR
CFLAGS="-g -O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1" \
./configure --prefix=/usr \
--enable-threadsafe \
--enable-readline \
--enable-dynamic-extensions &&
make
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -1,19 +0,0 @@
#!/bin/bash
# $Id$
set -e
cd $PKGDIR
./configure --prefix=/usr \
--without-berkeley-db \
--with-installbuilddir=/usr/lib/apr-0
make
make install
rm doc/{Makefile,doxygen.conf}
find doc -type d -exec chmod 755 {} \;
find doc -type f -exec chmod 644 {} \;
install -v -m755 -d /usr/share/doc/subversion-1.3.1
cp -v -R doc/* /usr/share/doc/subversion-1.3.1
exit

View file

@ -0,0 +1,35 @@
#!/bin/bash
# $Id:$
set -e
cd $PKGDIR
patch -Np1 -i ../apr-1.4.5-config.patch
./configure
make
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -0,0 +1,35 @@
#!/bin/bash
# $Id:$
set -e
cd $PKGDIR
patch -Np1 -i ../apr-util-1.4.1-config.patch
./configure --with-apr=/usr/bin/apr-1-config
make
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -0,0 +1,36 @@
#!/bin/bash
# $Id: $
set -e
cd $PKGDIR
./configure --prefix=/usr
make
if ! [ -z $PKG_DEST ]; then
mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
ln -sv share/{man,doc,info} $PKG_DEST/usr
case $(uname -m) in
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
esac
fi
make DESTDIR=$PKG_DEST install
install -v -m755 -d $PKG_DEST/usr/share/doc/subversion-1.7.1
cp -v -R doc/* $PKG_DEST/usr/share/doc/subversion-1.7.1
if ! [ -z $PKG_DEST ]; then
rm -fv $PKG_DEST/{,usr/}lib64
rm -fv $PKG_DEST/usr/{man,doc,info}
for dir in $PKG_DEST/usr/share/{doc,info,man}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/usr/{lib,share}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
for dir in $PKG_DEST/{lib,usr}; do
[[ -z $(ls $dir) ]] && rmdir -v $dir
done
packInstall
fi
rm -rf $PKG_DEST
exit

View file

@ -0,0 +1,37 @@
Submitted By: Pierre Labastie
Date: 2011-12-27
Initial Package Version: 1.4.5 (taken from BLFS patch for httpd-2.2.0)
Upstream Status: Not submitted (jhalfs specific)
Origin: jhalfs
Description: Modify the layout for installing Apache Portable Runtime
diff -Naur apr-1.4.5-orig/config.layout apr-1.4.5/config.layout
--- apr-1.4.5-orig/config.layout 2004-11-24 22:51:51.000000000 +0000
+++ apr-1.4.5/config.layout 2005-12-14 21:06:37.000000000 +0000
@@ -11,18 +11,18 @@
# Classical APR path layout designed for parallel installs.
<Layout apr>
- prefix: /usr/local/apr
+ prefix: /usr
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
- sbindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
- libexecdir: ${exec_prefix}/modules
- mandir: ${prefix}/man
- sysconfdir: ${prefix}/conf
- datadir: ${prefix}
- installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
- includedir: ${prefix}/include/apr-${APR_MAJOR_VERSION}
- localstatedir: ${prefix}
+ libexecdir: ${exec_prefix}/lib/apache
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/apache
+ datadir: /srv/www
+ installbuilddir: ${libexecdir}/build
+ includedir: ${prefix}/include/apache
+ localstatedir: ${datadir}
libsuffix: -${APR_MAJOR_VERSION}
</Layout>

View file

@ -0,0 +1,31 @@
diff -Naur apr-util-1.4.1.orig/config.layout apr-util-1.4.1/config.layout
--- apr-util-1.4.1.orig/config.layout 2005-02-09 13:18:43.000000000 +0100
+++ apr-util-1.4.1/config.layout 2011-12-27 19:29:41.667841632 +0100
@@ -11,18 +11,18 @@
# Classical APR-util path layout designed for parallel installs.
<Layout apr-util>
- prefix: /usr/local/apr
+ prefix: /usr
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
- sbindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
- libexecdir: ${exec_prefix}/modules
- mandir: ${prefix}/man
- sysconfdir: ${prefix}/conf
- datadir: ${prefix}
- installbuilddir: ${datadir}/build
- includedir: ${prefix}/include/apr-${APRUTIL_MAJOR_VERSION}
- localstatedir: ${prefix}
+ libexecdir: ${exec_prefix}/lib/apache
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/apache
+ datadir: /srv/www
+ installbuilddir: ${libexecdir}/build
+ includedir: ${prefix}/include/apache
+ localstatedir: ${datadir}
libsuffix: -${APRUTIL_MAJOR_VERSION}
</Layout>

View file

@ -60,7 +60,7 @@ clean_builddir() { #
# Clean the build directory
echo -n "Cleaning $BUILDDIR ..."
# First delete proc and sys directories, if exist.
# Both should be empty, if not be sure to exit.
# Both should be empty. If not, be sure to exit.
if [ -d $BUILDDIR/proc ] ; then
sudo rmdir $BUILDDIR/proc || exit 1
fi
@ -72,7 +72,7 @@ clean_builddir() { #
echo -n "Cleaning $JHALFSDIR ..."
sudo rm -rf $JHALFSDIR
echo "done"
echo -n "Cleaning remainig extracted sources in $BUILDDIR/sources ..."
echo -n "Cleaning remaining extracted sources in $BUILDDIR/sources ..."
sudo rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
echo "done"
fi

View file

@ -22,7 +22,6 @@ add_blfs_deps_urls() { # No easy way to extract it.
if [[ "${DEP_UNZIP}" = "y" ]] ; then
echo "${UNZIP_URL} ${BLFS_SERVER}unzip/${UNZIP_PKG} ${UNZIP_MD5}" >> urls.lst
echo "${UNZIP_PATCH_URL} ${BLFS_SERVER}unzip/${UNZIP_PATCH} ${UNZIP_PATCH_MD5}" >> urls.lst
fi
if [[ "${DEP_DBXML}" = "y" ]] ; then
@ -39,7 +38,6 @@ add_blfs_deps_urls() { # No easy way to extract it.
if [[ "${DEP_SUDO}" = "y" ]] ; then
echo "${SUDO_URL} ${BLFS_SERVER}sudo/${SUDO_PKG} ${SUDO_MD5}" >> urls.lst
echo "${SUDO_PATCH_URL} ${BLFS_SERVER}sudo/${SUDO_PATCH} ${SUDO_PATCH_MD5}" >> urls.lst
fi
if [[ "${DEP_WGET}" = "y" ]] ; then
@ -47,13 +45,20 @@ add_blfs_deps_urls() { # No easy way to extract it.
fi
if [[ "${DEP_SVN}" = "y" ]] ; then
echo "${SQLITE_URL} ${BLFS_SERVER}sqlite/${SQLITE_PKG} ${SQLITE_MD5}" >> urls.lst
echo "${APR_URL} ${BLFS_SERVER}apr/${APR_PKG} ${APR_MD5}" >> urls.lst
## Cannot use file:// with wget, so cannot download apr patches.
## They have been put directly in $BUILDDIR/sources
## The next line only for being able to check md5sum
echo "${APR_PATCH_1_URL} ${BLFS_SERVER}apr/${APR_PATCH_1} ${APR_PATCH_1_MD5}" >> urls.lst
echo "${APR_U_URL} ${BLFS_SERVER}apr-util/${APR_U_PKG} ${APR_U_MD5}" >> urls.lst
echo "${APR_U_PATCH_1_URL} ${BLFS_SERVER}apr-util/${APR_U_PATCH_1} ${APR_U_PATCH_1_MD5}" >> urls.lst
echo "${SVN_URL} ${BLFS_SERVER}subversion/${SVN_PKG} ${SVN_MD5}" >> urls.lst
fi
if [[ "${DEP_GPM}" = "y" ]] ; then
echo "${GPM_URL} ${BLFS_SERVER}gpm/${GPM_PKG} ${GPM_MD5}" >> urls.lst
echo "${GPM_PATCH_1_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_1} ${GPM_PATCH_1_MD5}" >> urls.lst
echo "${GPM_PATCH_2_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_2} ${GPM_PATCH_2_MD5}" >> urls.lst
fi
}
@ -101,7 +106,10 @@ copy_blfs_deps_scripts() { # method avoid to place the test on all
fi
if [[ "${DEP_SVN}" = "y" ]] ; then
mv blfs-tool-deps/911-subversion ${PROGNAME}-commands/blfs-tool-deps
mv blfs-tool-deps/911-sqlite ${PROGNAME}-commands/blfs-tool-deps
mv blfs-tool-deps/912-apr ${PROGNAME}-commands/blfs-tool-deps
mv blfs-tool-deps/913-apr-util ${PROGNAME}-commands/blfs-tool-deps
mv blfs-tool-deps/914-subversion ${PROGNAME}-commands/blfs-tool-deps
fi
if [[ "${DEP_GPM}" = "y" ]] ; then
@ -156,7 +164,19 @@ wrt_blfs_tool_targets() { #
if [ "$PROGNAME" = "clfs2" ]; then
[[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
else
[[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
case "$name" in
*docbook*)
(
cat << EOF
@if [ "\$(PKGMNGT)" = "y" ]; then \\
echo "export PKG_DEST=\$(SRC)/\$@" > envars; \\
echo "source packInstall.sh" >> envars; \\
echo "export -f packInstall" >> envars; \\
fi;
EOF
) >> $MKFILE.tmp ;;
*) CHROOT_Unpack "$pkg_tarball" ;;
esac
fi
# Run the script.
@ -176,9 +196,9 @@ wrt_blfs_tool_targets() { #
# Touch the tracking file.
case $name in
docbook-xml ) pkg_ver=DocBook-4.5 ;;
lynx ) pkg_ver=lynx-2.8.6 ;;
tidy ) pkg_ver=html-tidy-cvs_20070326 ;;
unzip ) pkg_ver=unzip-5.52 ;;
lynx ) pkg_ver=lynx-2.8.7 ;;
tidy ) pkg_ver=html-tidy-cvs_20101110 ;;
unzip ) pkg_ver=unzip-6.0 ;;
* ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
esac
if [ "$PROGNAME" = "clfs2" ]; then

View file

@ -144,6 +144,7 @@ extract_commands() { #
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--stringparam pkgmngt $PKGMNGT \
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
;;
*) echo -n " ${L_arrow}${BOLD}${PROGNAME}${R_arrow} book invalid, terminate build... "
@ -187,7 +188,9 @@ create_package_list() { #
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
;;
lfs)
xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
xsltproc --nonet --xinclude \
--stringparam pkgmngt $PKGMNGT \
-o pkg_tarball_list packages.xsl \
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
;;
esac
@ -204,6 +207,9 @@ $DBXSL_PKG
$LYNX_PKG
$SUDO_PKG
$WGET_PKG
$SQLITE_PKG
$APR_PKG
$APR_U_PKG
$SVN_PKG
$GPM_PKG
EOF

View file

@ -24,6 +24,8 @@ inline_doc
declare -i ref_major ref_minor ref_revision ref_change
declare -r spaceSTR=" "
shopt -s extglob #needed for ${x##*(0)} below
ref_version=$1
tst_version=$2
TXT=$3
@ -53,11 +55,14 @@ inline_doc
# echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
IFS=".-(pa" # Split up w.x.y.z as well as w.x.y-rc (catch release candidates)
set -- $ref_version # set postional parameters to minimum ver values
set -- $ref_version # set positional parameters to minimum ver values
ref_major=$1; ref_minor=$2; ref_revision=$3
#
set -- $tst_version # Set postional parameters to test version values
major=$1; minor=$2; revision=$3
set -- $tst_version # Set positional parameters to test version values
# Values beginning with zero are taken as octal, so that for example
# 2.07.08 gives an error because 08 cannot be octal. The ## stuff supresses
# leading sero's
major=${1##*(0)}; minor=${2##*(0)}; revision=${3##*(0)}
#
# Compare against minimum acceptable version..
(( major > ref_major )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return
@ -82,31 +87,31 @@ check_prerequisites() { #
export LC_ALL
# LFS/HLFS/CLFS prerequisites
check_version "2.6.2" "`uname -r`" "KERNEL"
check_version "3.0" "$BASH_VERSION" "BASH"
check_version "3.0.1" "`gcc -dumpversion`" "GCC"
check_version "2.6.25" "`uname -r`" "KERNEL"
check_version "3.2" "$BASH_VERSION" "BASH"
check_version "4.1.2" "`gcc -dumpversion`" "GCC"
libcLib="`find /lib /lib64 -name libc.so.6 -print`"
libcVer="`/${libcLib} | head -n1`"
libcVer="${libcVer##*version }"
check_version "2.2.5" ${libcVer%%,*} "GLIBC"
check_version "2.12" "$(ld --version | head -n1 | awk '{print $NF}')" "BINUTILS"
check_version "1.15" "$(tar --version | head -n1 | cut -d" " -f4)" "TAR"
check_version "2.5.1" "${libcVer%%,*}" "GLIBC"
check_version "2.17" "$(ld --version | head -n1 | awk '{print $NF}')" "BINUTILS"
check_version "1.18" "$(tar --version | head -n1 | cut -d" " -f4)" "TAR"
bzip2Ver="$(bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f8)"
check_version "1.0.2" "${bzip2Ver%%,*}" "BZIP2"
check_version "1.875" "$(bison --version | head -n1 | cut -d" " -f4)" "BISON"
check_version "5.2.1" "$(chown --version | head -n1 | cut -d")" -f2)" "COREUTILS"
check_version "2.8" "$(diff --version | head -n1 | cut -d" " -f4)" "DIFF"
check_version "4.1.20" "$(find --version | head -n1 | cut -d" " -f4)" "FIND"
check_version "3.0" "$(gawk --version | head -n1 | cut -d" " -f3)" "GAWK"
check_version "2.5" "$(grep --version | head -n1 | awk '{print $NF}')" "GREP"
check_version "1.2.4" "$(gzip --version 2>&1 | head -n1 | cut -d" " -f2)" "GZIP"
check_version "1.4" "$(m4 --version 2>&1 | head -n1 | awk '{print $NF}')" "M4"
check_version "3.79.1" "$(make --version | head -n1 | cut -d " " -f3 | cut -c1-4)" "MAKE"
check_version "2.5.4" "$(patch --version | head -n1 | cut -d" " -f2)" "PATCH"
check_version "5.6.0" "$(perl -V:version | cut -f2 -d\')" "PERL"
check_version "3.0.2" "$(sed --version | head -n1 | cut -d" " -f4)" "SED"
check_version "4.8" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO"
check_version "1.0.4" "${bzip2Ver%%,*}" "BZIP2"
check_version "2.3" "$(bison --version | head -n1 | cut -d" " -f4)" "BISON"
check_version "6.9" "$(chown --version | head -n1 | cut -d")" -f2)" "COREUTILS"
check_version "2.8.1" "$(diff --version | head -n1 | cut -d" " -f4)" "DIFF"
check_version "4.2.31" "$(find --version | head -n1 | cut -d" " -f4)" "FIND"
check_version "3.1.5" "$(gawk --version | head -n1 | cut -d" " -f3)" "GAWK"
check_version "2.5.1a" "$(grep --version | head -n1 | awk '{print $NF}')" "GREP"
check_version "1.3.12" "$(gzip --version 2>&1 | head -n1 | cut -d" " -f2)" "GZIP"
check_version "1.4.10" "$(m4 --version 2>&1 | head -n1 | awk '{print $NF}')" "M4"
check_version "3.81" "$(make --version | head -n1 | cut -d " " -f3 | cut -c1-4)" "MAKE"
check_version "2.5.4" "$(patch --version | head -n1 | sed 's/.*patch //')" "PATCH"
check_version "5.8.8" "$(perl -V:version | cut -f2 -d\')" "PERL"
check_version "4.1.5" "$(sed --version | head -n1 | cut -d" " -f4)" "SED"
check_version "4.9" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO"
check_version "5.0.3" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ"
# Check for minimum sudo version
SUDO_LOC="$(whereis -b sudo | cut -d" " -f2)"
if [ -x $SUDO_LOC ]; then

View file

@ -39,7 +39,7 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
# Skip some packages if they aren't needed
case $line in
*/tcl* | */expect* | */dejagnu* | */tree* | */gcc-testsuite* )
*/check* | */tcl* | */expect* | */dejagnu* | */tree* | */gcc-testsuite* )
[[ "$TEST" = "0" ]] && continue
;;
*/vim-*-lang* )
@ -75,16 +75,16 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
# If the file does not exist yet in /sources download a fresh one
if [ ! -f $FILE ] ; then
if [[ ! ("$SRC_ARCHIVE" = "") ]] ; then
echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE} or /sources${OFF}"
echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE} or ${BUILDDIR}/sources${OFF}"
else
echo "${BOLD}${YELLOW}$FILE: not found in /sources${OFF}"
echo "${BOLD}${YELLOW}$FILE: not found in ${BUILDDIR}/sources${OFF}"
fi
if ! wget $URL1 $WGETPARAM && ! wget $URL2 $WGETPARAM ; then
gs_wrt_message "$FILE not found in the SRC_ARCHIVE or on any server..SKIPPING"
continue
fi
else
echo "${BOLD}${YELLOW}$FILE: using cached file in /sources${OFF}"
echo "${BOLD}${YELLOW}$FILE: using cached file in ${BUILDDIR}/sources${OFF}"
fi
fi
@ -121,7 +121,7 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
fi
# Good or bad we write the original md5sum to a file
echo "$MD5" >> MD5SUMS
echo "$MD5" >> MD5SUM
# Copy the freshly downloaded file
# to the source archive.
@ -192,6 +192,7 @@ create_urls() { #
xsltproc --nonet --xinclude \
--stringparam server $SERVER \
--stringparam family lfs \
--stringparam pkgmngt $PKGMNGT \
-o ../sources/urls.lst urls.xsl \
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"

View file

@ -41,7 +41,7 @@ inline_doc
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
# Build Settings by book
local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common"
local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT"
local -r HLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"

View file

@ -44,6 +44,7 @@ PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lo
ADD_REPORT = $REPORT
ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
ADD_BLFS_TOOLS = $BLFS_TOOL
PKGMNGT = $PKGMNGT
export PATH := \${PATH}:/usr/sbin
@ -92,7 +93,9 @@ get_package_tarball_name() { #
;;
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
*) echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
*) echo $(grep "^$script_name[_-][[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
esac

View file

@ -27,7 +27,7 @@ endef
define sh_echo_PHASE
echo $(BOLD)--------------------------------------------------------------------------------;\
echo $(tab_)$(tab_)Executing $(BLUE)$(1)$(WHITE) scripts; \
echo $(BOLD)--------------------------------------------------------------------------------echo $(WHITE)
echo $(BOLD)--------------------------------------------------------------------------------$(WHITE)
endef
define echo_SU_request
@ -79,6 +79,9 @@ define remove_existing_dirs2
rm -rf $(SRC)/$$ROOT && \
rm -rf $(SRC)/$${ROOT%-*}-build; \
fi;
@if [ "$(PKGMNGT)" = "y" ] && [ -d $(SRC)/$@ ]; then \
rm -rf $(SRC)/$@ && rm -f $(SRC)/*.deb; \
fi;
endef
#==#
@ -107,7 +110,12 @@ endef
define get_pkg_root2
@ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
echo "export PKGDIR=$(SRC)/$$ROOT" > envars
echo "export PKGDIR=$(SRC)/$$ROOT" > envars; \
if [ "$(PKGMNGT)" = "y" ]; then \
echo "export PKG_DEST=$(SRC)/$@" >> envars; \
echo "source packInstall.sh" >> envars; \
echo "export -f packInstall" >> envars; \
fi;
endef
define get_pkg_root_LUSER

View file

@ -13,8 +13,15 @@
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="2.6"/>
<!-- Should we include a package manager -->
<xsl:param name="pkgmngt" select="n"/>
<xsl:template match="/">
<xsl:apply-templates select="//para"/>
<xsl:if test="$pkgmngt='y'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[@id='package']//para"/>
</xsl:if>
</xsl:template>
<xsl:template match="para">
@ -26,13 +33,12 @@
<xsl:call-template name="package_name">
<xsl:with-param name="url" select="ulink/@url"/>
</xsl:call-template>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template name="package_name">
<xsl:param name="url" select="foo"/>
<xsl:param name="sub-url" select="substring-after($url,'/')"/>
<xsl:variable name="sub-url" select="substring-after($url,'/')"/>
<xsl:choose>
<xsl:when test="contains($sub-url,'/')">
<xsl:call-template name="package_name">
@ -44,9 +50,11 @@
<xsl:when test="contains($sub-url,'.patch')"/>
<xsl:when test="contains($sub-url,'?')">
<xsl:value-of select="substring-before($sub-url,'?')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$sub-url"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>

View file

@ -59,7 +59,7 @@ while true ; do
# Detect rollover of the seconds.
(( PREV_SEC > SEC )) && write_or_exit "${RESET_LINE}"
(( PREV_SEC = SEC ))
PREV_SEC=$SEC
# Display the accumulated time. div minutes.. modulo seconds.
write_or_exit "${TS_POSITION}$(($SECONDS / 60)) min. $SEC sec"

View file

@ -19,12 +19,19 @@
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="2.6"/>
<!-- Do we use a package manager? -->
<xsl:param name="pkgmngt" select="n"/>
<xsl:template match="/">
<xsl:apply-templates select="//ulink"/>
<xsl:if test="$pkgmngt='y'">
<xsl:apply-templates
select="document('packageManager.xml')//ulink"/>
</xsl:if>
</xsl:template>
<xsl:template match="ulink">
<!-- If some package don't have the predefined strings in their
<!-- If some package doesn't have the predefined strings in their
name, the next test must be fixed to match it also. Skip possible
duplicated URLs due that may be splitted for PDF output -->
<xsl:if test="(ancestor::varlistentry[@condition=$model]

117
jhalfs
View file

@ -87,21 +87,22 @@ VERBOSITY=1
[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
source configuration
[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
[[ $? > 0 ]] && echo "file: configuration did not load.." && exit 1
[[ $VERBOSITY > 0 ]] && echo "OK"
# These are boolean vars generated from Config.in.
# ISSUE: If a boolean parameter is not set <true> that
# variable is not defined by the menu app. This can
# cause a headache if you are not careful.
# The following parameters MUST be created and have a
# default value.
# ISSUE: If a boolean parameter is not set to y(es) there
# is no variable defined by the menu app. This can
# cause a headache if you are not aware.
# The following variables MUST exist. If they don't, the
# default value is n(o).
RUNMAKE=${RUNMAKE:-n}
GETPKG=${GETPKG:-n}
GETKERNEL=${GETKERNEL:-n}
COMPARE=${COMPARE:-n}
RUN_FARCE=${RUN_FARCE:-n}
RUN_ICA=${RUN_ICA:-n}
PKGMNGT=${PKGMNGT:-n}
BOMB_TEST=${BOMB_TEST:-n}
STRIP=${STRIP:=n}
REPORT=${REPORT:=n}
@ -180,28 +181,24 @@ if [[ "${BLFS_TOOL}" = "y" ]] ; then
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
* ) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
esac
# Dependencies envars, more easy to update.
# Dependencies envars, easier to update.
# Tidy and Unzip version are harcoded also in wrt_blfs_tool_targets()
# libxml2
LIBXML_PKG="libxml2-2.6.29.tar.gz"
LIBXML_PKG="libxml2-2.7.8.tar.gz"
LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}"
LIBXML_MD5="8b99b6e8b08e838438d9e6b639d79ebd"
LIBXML_MD5="8127a65e8c3b08856093099b52599c86"
# libxslt
LIBXSLT_PKG="libxslt-1.1.21.tar.gz"
LIBXSLT_PKG="libxslt-1.1.26.tar.gz"
LIBXSLT_URL="ftp://xmlsoft.org/libxslt/${LIBXSLT_PKG}"
LIBXSLT_MD5="59fe34e85692f71df2a38c2ee291b3ca"
LIBXSLT_MD5="e61d0364a30146aaa3001296f853b2b9"
# tidy
TIDY_PKG="tidy-cvs_20070326.tar.bz2"
TIDY_URL="http://anduin.linuxfromscratch.org/files/BLFS/sources/${TIDY_PKG}"
TIDY_MD5="468bfaa5cf917a8ecbe7834c13a61376"
TIDY_PKG="tidy-cvs_20101110.tar.bz2"
TIDY_URL="http://anduin.linuxfromscratch.org/sources/BLFS/svn/t/${TIDY_PKG}"
TIDY_MD5="dd1fe109b4259ad3f364b175787ad5e9"
# unzip
UNZIP_PKG="unzip552.tar.gz"
UNZIP_PKG="unzip60.tar.gz"
UNZIP_URL="http://downloads.sourceforge.net/infozip/${UNZIP_PKG}"
UNZIP_MD5="9d23919999d6eac9217d1f41472034a9"
# unzip security patch
UNZIP_PATCH="unzip-5.52-security_fix-1.patch"
UNZIP_PATCH_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${UNZIP_PATCH}"
UNZIP_PATCH_MD5="00ebf64fdda2ad54ddfc619f85f328bb"
UNZIP_MD5="62b490407489521db863b523a7f86375"
# DocBook XML DTD
DBXML_PKG="docbook-xml-4.5.zip"
DBXML_URL="http://www.docbook.org/xml/4.5/${DBXML_PKG}"
@ -210,53 +207,64 @@ if [[ "${BLFS_TOOL}" = "y" ]] ; then
# DBXSL_PKG="docbook-xsl-1.69.1.tar.bz2"
# DBXSL_URL="http://prdownloads.sourceforge.net/docbook/${DBXSL_PKG}"
# DBXSL_MD5="6ebd29a67f2dcc3f2220f475ee6f6552"
# Links
LYNX_PKG="lynx2.8.6.tar.bz2"
LYNX_URL="http://lynx.isc.org/release/${LYNX_PKG}"
LYNX_MD5="dc80497b7dda6a28fd80404684d27548"
# Lynx
LYNX_PKG="lynx2.8.7rel.2.tar.bz2"
LYNX_URL="http://lynx.isc.org/current/${LYNX_PKG}"
LYNX_MD5="cb936aef812e4e463ab86cbbe14d4db9"
# sudo
SUDO_PKG="sudo-1.6.8p12.tar.gz"
SUDO_URL="http://anduin.linuxfromscratch.org/sources/BLFS/svn/s/${SUDO_PKG}"
SUDO_MD5="b29893c06192df6230dd5f340f3badf5"
# sudo envar fix patch
SUDO_PATCH="sudo-1.6.8p12-envvar_fix-1.patch"
SUDO_PATCH_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${SUDO_PATCH}"
SUDO_PATCH_MD5="454925aedfe054dff8fe0d03b209f986"
SUDO_PKG="sudo-1.8.2.tar.gz"
SUDO_URL="http://www.sudo.ws/sudo/dist/${SUDO_PKG}"
SUDO_MD5="000f458e7391be9fdf459a9ad6a4912a"
# wget
WGET_PKG="wget-1.10.2.tar.gz"
WGET_PKG="wget-1.13.4.tar.xz"
WGET_URL="ftp://ftp.gnu.org/gnu/wget/${WGET_PKG}"
WGET_MD5="795fefbb7099f93e2d346b026785c4b8"
WGET_MD5="7f518b3a71e9efd330e9a0c3714f8463"
# SQLite (for subversion)
SQLITE_PKG="sqlite-autoconf-3070800.tar.gz"
SQLITE_URL="http://sqlite.org/${SQLITE_PKG}"
SQLITE_MD5="6bfb46d73caaa1bbbcd2b52184b6c542"
# Apache Portable Runtime (for subversion)
APR_PKG="apr-1.4.5.tar.bz2"
APR_URL="http://mirror.speednetwork.de/apache/apr/$APR_PKG"
APR_MD5="8b53f5a5669d0597f2da889a2f576eb6"
# APR config patch
APR_PATCH_1="apr-1.4.5-config.patch"
APR_PATCH_1_URL="file:///sources/local-patches/${APR_PATCH_1}"
APR_PATCH_1_MD5="fff6eddf998f4e956915f8053c15e41e"
# Apache Portable Runtime Utilities (for subversion)
APR_U_PKG="apr-util-1.4.1.tar.bz2"
APR_U_URL="http://mirrors.ircam.fr/pub/apache/apr/$APR_U_PKG"
APR_U_MD5="52b31b33fb1aa16e65ddaefc76e41151"
# APR-util config patch
APR_U_PATCH_1="apr-util-1.4.1-config.patch"
APR_U_PATCH_1_URL="file:///sources/local-patches/${APR_U_PATCH_1}"
APR_U_PATCH_1_MD5="4c07cb0d298ae9ddc75cd2d5acdedb2b"
# Subversion
SVN_PKG="subversion-1.3.1.tar.bz2"
SVN_URL="http://subversion.tigris.org/tarballs/${SVN_PKG}"
SVN_MD5="07b95963968ae345541ca99d0e7bf082"
SVN_PKG="subversion-1.7.1.tar.bz2"
SVN_URL="http://archive.apache.org/dist/subversion/${SVN_PKG}"
SVN_MD5="8a4fa74385df85a9702141b6b68b8307"
# GPM
GPM_PKG="gpm-1.20.1.tar.bz2"
GPM_URL="ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/${GPM_PKG}"
GPM_MD5="2c63e827d755527950d9d13fe3d87692"
# GPM segfaul patch
GPM_PATCH_1="gpm-1.20.1-segfault-1.patch"
GPM_PATCH_1_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${GPM_PATCH_1}"
GPM_PATCH_1_MD5="8c88f92990ba7613014fcd1db14ca7ac"
# GPM silent patch
GPM_PATCH_2="gpm-1.20.1-silent-1.patch"
GPM_PATCH_2_URL="http://www.linuxfromscratch.org/patches/blfs/svn/${GPM_PATCH_2}"
GPM_PATCH_2_MD5="bf6cbefe20c6f15b587f19ebc1c8a37a"
GPM_PKG="gpm-1.20.6.tar.bz2"
GPM_URL="http://www.nico.schottelius.org/software/gpm/archives/$GPM_PKG"
GPM_MD5="6b534da16dc1b28ba828dea89e520f6f"
fi
#--- Envars not sourced from configuration
case $PROGNAME in
clfs* ) declare -r SVN="http://svn.cross-lfs.org/svn/repos" ;;
# TODO: clfs is now on git
# clfs* ) declare -r SVN="http://svn.cross-lfs.org/svn/repos" ;;
* ) declare -r SVN="svn://svn.linuxfromscratch.org" ;;
esac
declare -r LOG=000-masterscript.log
# Needed to can fetch BLFS book sources when building CLFS
# Needed for fetching BLFS book sources when building CLFS
declare -r SVN_2="svn://svn.linuxfromscratch.org"
# Set true internal variables
COMMON_DIR="common"
PACKAGE_DIR=$(echo $PROGNAME | tr '[a-z]' '[A-Z]')
MODULE=$PACKAGE_DIR/master.sh
PKGMNGTDIR="pkgmngt"
# The name packageManager.xml is hardcoded in *.xsl, so no variable.
[[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..."
source $COMMON_DIR/common-functions
@ -369,9 +377,18 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
export XSL=$JHALFSDIR/${XSL}
#
# Copy packageManager.xml, if needed
[[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] &&
cp $PKGMNGTDIR/packageManager.xml $JHALFSDIR/ &&
cp $PKGMNGTDIR/packInstall.sh $JHALFSDIR/
#
# Copy urls.xsl, if needed
[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/
#
# Copy APR patches, if needed
[[ "$DEP_SVN" = "y" ]] &&
cp $COMMON_DIR/blfs-tool-deps/apr*.patch $BUILDDIR/sources
#
# Create the test-log directory, if needed
[[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
#
@ -381,7 +398,7 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
# Prepare report creation, if needed
if [[ "$REPORT" = "y" ]]; then
cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/
# After being sure that all looks sane, dump the settings to a file
# After making sure that all looks sane, dump the settings to a file
# This file will be used to create the REPORT header
validate_config > $JHALFSDIR/jhalfs.config
fi

View file

@ -16,7 +16,7 @@ MAKEFLAGS="-j3"
# This list may be different for you.
# If your MAKEFLAGS don't contains a -jX option, you can set
# a empty list here.
BLACK_LIST="autoconf dejagnu gettext groff man-db"
BLACK_LIST="autoconf dejagnu gettext groff man-db vim"
#--- Default optimization mode
# This mode is overridden by definitions in opt_override;
@ -26,7 +26,7 @@ BLACK_LIST="autoconf dejagnu gettext groff man-db"
#
# Not set here combined modes of form defOpt_myMode.
# Combined modes of form modeA_modeB can be set here.
DEF_OPT_MODE=O3pipe
DEF_OPT_MODE=O2pipe
#--- Active optimization variables

View file

@ -0,0 +1,20 @@
#
#$Id$
# Pierre Labastie from O3pipe: 12/20/2011
#####
#
# MODE O2pipe configuration
#
# Usage: - Apply optimization string to each variable
# - "unset" will cause the variable to be not set
# instead of just set to null.
#
#####
CFLAGS_O2pipe="-O2 -pipe"
CXXFLAGS_O2pipe=$CFLAGS_O2pipe
LDFLAGS_O2pipe="unset"
OTHER_CFLAGS_O2pipe=$CFLAGS_O2pipe
OTHER_CXXFLAGS_O2pipe=$CXXFLAGS_O2pipe
OTHER_LDFLAGS_O2pipe=$LDFLAGS_O2pipe

View file

@ -16,10 +16,10 @@
# Inherit optimizations from O3pipe
source optimize/opt_config.d/O3pipe
CFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=pentium4"
CXXFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=pentium4"
CFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=native"
CXXFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=native"
LDFLAGS_O3pipe_march=$LDFLAGS_O3pipe
OTHER_CFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=pentium4"
OTHER_CXXFLAGS_O3pipe_march=$CXXFLAGS_O3pipe" -march=pentium4"
OTHER_CFLAGS_O3pipe_march=$CFLAGS_O3pipe" -march=native"
OTHER_CXXFLAGS_O3pipe_march=$CXXFLAGS_O3pipe" -march=native"
OTHER_LDFLAGS_O3pipe_march=$LDFLAGS_O3pipe

38
pkgmngt/packInstall.sh Normal file
View file

@ -0,0 +1,38 @@
# $Id:$
# function for packing and installing a tree. We only have access
# to variables PKGDIR and PKG_DEST
packInstall() {
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
sed 's/^[0-9]\{1\}-//')
case $PCKGVRS in
expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;;
vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;;
docbook-xml) local VERSION=4.5 ;;
*) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*-\([0-9]\)/\1/');;
esac
local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
case $(uname -m) in
x86_64) local ARCH=amd64 ;;
*) local ARCH=i386 ;;
esac
pushd $PKG_DEST
rm -fv ./usr/share/info/dir
mkdir DEBIAN
cat > DEBIAN/control <<EOF
Package: $PACKAGE
Version: $VERSION
Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
Description: $PACKAGE
Architecture: $ARCH
EOF
dpkg-deb -b . $ARCHIVE_NAME
dpkg -i $ARCHIVE_NAME
mv -v $ARCHIVE_NAME /var/lib/packages
popd
}

View file

@ -0,0 +1,50 @@
# $Id:$
# function for packing and installing a tree. We only have access
# to variables PKGDIR and PKG_DEST
# Other variables can be passed on the command line, or in the environment
packInstall() {
# A proposed implementation for versions and package names.
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
sed 's/^[0-9]\{1\}-//')
# version is only accessible from PKGDIR name. Since the format of the
# name is not normalized, several hacks are necessary...
case $PCKGVRS in
expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;;
vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;;
docbook-xml) local VERSION=4.5 ;;
*) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*[-_]\([0-9]\)/\1/');;
esac
local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
case $(uname -m) in
x86_64) local ARCH=amd64 ;;
*) local ARCH=i386 ;;
esac
pushd $PKG_DEST
rm -fv ./usr/share/info/dir # recommended since this directory is already there
# on the system
# The next lines are specific to dpkg, but usually all pacakge managers
# need some information on the version and the package.
mkdir DEBIAN
cat > DEBIAN/control <<EOF
Package: $PACKAGE
Version: $VERSION
Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
Description: $PACKAGE
Architecture: $ARCH
EOF
# Building the binary package
dpkg-deb -b . $ARCHIVE_NAME
# Installing it on LFS
dpkg -i $ARCHIVE_NAME
# Storing the package (recommended).
mv -v $ARCHIVE_NAME /var/lib/packages
popd # Since the $PKG_DEST directory is destroyed
# immediately after the return of the function,
# getting back to $PKGDIR is important...
}

341
pkgmngt/packageManager.xml Normal file
View file

@ -0,0 +1,341 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY buildtime "Approximate build time">
<!ENTITY diskspace "Required disk space">
<!ENTITY dependencies "Installation depends on">
<!ENTITY testsuites "Test suite depends on">
<!ENTITY before "Must be installed before">
<!ENTITY external "Optional dependencies">
<!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
<!ENTITY dpkg-version "1.16.1.2">
<!ENTITY dpkg-size "5,236 KB">
<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.bz2">
<!ENTITY dpkg-md5 "068ae5e650e54968230de19d6c4e2241">
<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
<!ENTITY dpkg-ch5-du "5 MB">
<!ENTITY dpkg-ch5-sbu "0.4 SBU">
<!ENTITY dpkg-ch6-du "5 MB">
<!ENTITY dpkg-ch6-sbu "0.4 SBU">
]>
<article>
<sect1 id="package">
<?dbhtml filename="packages.html"?>
<title>All Packages</title>
<para>Download or otherwise obtain the following packages:</para>
<variablelist role="materials">
<varlistentry>
<term>Dpkg (&dpkg-version;) - <token>&dpkg-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&dpkg-home;"/></para>
<para>Download: <ulink url="&dpkg-url;"/></para>
<para>MD5 sum: <literal>&dpkg-md5;</literal></para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
<!-- If needed, uncomment and edit this:
<sect1 id="patches">
<?dbhtml filename="patches.html"?>
<title>Needed Patches</title>
<para>In addition to the package(s), zero or more patches are also required.
These patches correct any mistakes in the packages that should be
fixed by the maintainer. The patches also make small modifications to
make the packages easier to work with. The following patches will be
needed to build an LFS system:</para>
<variablelist role="materials">
<varlistentry>
<term>Dpkg Some Patch - <token>&dpkg-somepatche-size;</token>:</term>
<listitem>
<para>Download: <ulink url="&somepatch-url;"/></para>
<para>MD5 sum: <literal>&somepatch-md5;</literal></para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
-->
<sect1 id="ch-tools-pkgmngt" role="wrap">
<?dbhtml filename="dpkg.html"?>
<sect1info condition="script">
<productname>dpkg</productname>
<productnumber>&dpkg-version;</productnumber>
<address>&dpkg-url;</address>
</sect1info>
<title>Dpkg-&dpkg-version;</title>
<sect2 role="package">
<title/>
<para>This is my choice of package manager. Dpkg is the basic package
manager of Debian. It can be complemented by deselect (in the same
package), apt or aptitude. We use it in a very crude way.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&dpkg-ch5-sbu;</seg>
<seg>&dpkg-ch5-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Dpkg</title>
<para>Since Debian is shipping its own package, all patches have already
been applied. However, the <command>configure</command> script calls
<command>dpkg</command> itself, which is found only on Debian hosts. The
following <command>sed</command> command prevents that call:</para>
<screen><userinput remap="pre">sed '/\$v[{]DEB_BUILD/d' \
-i scripts/dpkg-architecture.pl</userinput></screen>
<para> Configure the package:</para>
<screen><userinput remap="configure">./configure --prefix=/tools \
--disable-nls --without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-zlib --with-bz2=static --without-selinux</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>--without-dselect</parameter></term>
<listitem>
<para>Avoids building <command>dselect</command>, an
awful thing!</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-start-stop-daemon</parameter></term>
<listitem>
<para>The utility <command>start-stop-daemon</command>
is not needed here.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-update-alternatives</parameter></term>
<listitem>
<para>Same for <command>update-alternatives</command>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-install-info</parameter></term>
<listitem>
<para>Debian <command>install-info</command> is a wrapper to
<command>install-info</command> installed by Texinfo. Not
needed either.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">(cd lib &amp;&amp; make)
(cd src &amp;&amp; make)
(cd dpkg-deb &amp;&amp; make)
(cd dpkg-split &amp;&amp; make)</userinput></screen>
<para>This package does not come with a test suite.</para>
<para>Install only the needed files:</para>
<screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
cp dpkg-deb/dpkg-deb /tools/bin
cp dpkg-split/dpkg-split /tools/bin
mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
<para>Add a line in <filename>dpkg.cfg</filename> to
tell where to put administration files</para>
<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF</userinput></screen>
<para>On a Debian system, <command>dpkg</command> relies on two other
files to be present. Since we do not install them, issue:</para>
<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# disable fatal error on path checking
force-bad-path
EOF</userinput></screen>
</sect2>
</sect1>
<sect1 id="ch-system-pkgmngt-creatingdirs">
<?dbhtml filename="creatingdirs.html"?>
<title>Adding Directories for package management</title>
<para>Those directories should be added to the system.
<filename>/var/lib/dpkg</filename> and subdirectories are
adminitrative directories of <command>dpkg</command>.
<filename>/var/log</filename> is the log directory for
<command>dpkg</command>. <filename>/var/lib/packages</filename>
will be used to store our packages.deb files.</para>
<screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
mkdir -pv /var/lib/packages</userinput></screen>
</sect1>
<sect1 id="ch-system-pkgmngt-createfiles">
<?dbhtml filename="createfiles.html"?>
<title>Adding administrative files for Dpkg</title>
<para><command>dpkg</command> needs that some files exist to run
for the first time. The log file must exist in order to be
used.</para>
<screen><userinput>touch /var/lib/dpkg/{available,status}
touch /var/log/dpkg.log</userinput></screen>
</sect1>
<sect1 id="ch-system-pkgmngt" role="wrap">
<?dbhtml filename="dpkg.html"?>
<sect1info condition="script">
<productname>dpkg</productname>
<productnumber>&dpkg-version;</productnumber>
<address>&dpkg-url;</address>
</sect1info>
<title>Dpkg-&dpkg-version;</title>
<sect2 role="package">
<title/>
<para>This is my choice of package manager. Dpkg is the basic package
manager of Debian. It can be complemented by deselect (in the same
package), apt or aptitude. We use it in a very crude way.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&dpkg-ch6-sbu;</seg>
<seg>&dpkg-ch6-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Dpkg</title>
<para>Since Debian is shipping its own package, all patches have already
been applied. We can go directly to configuring it:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-selinux</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>--without-dselect</parameter></term>
<listitem>
<para>Avoids building <command>dselect</command>, an
awful thing!</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-start-stop-daemon</parameter></term>
<listitem>
<para>The utility <command>start-stop-daemon</command>
is not needed here.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-update-alternatives</parameter></term>
<listitem>
<para>Same for <command>update-alternatives</command>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-install-info</parameter></term>
<listitem>
<para>Debian <command>install-info</command> is a wrapper to
<command>install-info</command> installed by Texinfo. Not
needed either.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>This package does not come with a test suite.</para>
<para>Install the package:</para>
<screen><userinput remap="install">mkdir -pv $PKG_DEST
make DESTDIR=$PKG_DEST install
mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
<para>Add a line in <filename>dpkg.cfg</filename> to
tell where to put administration files</para>
<screen><userinput remap="install">cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF</userinput></screen>
<!-- Is this needed in chapter 06 -->
<para>On a Debian system, <command>dpkg</command> relies on two other
files (<command>ldconfig</command> and maybe <command>update-rc.d</command>)
to be present. Since we do not install them, issue:</para>
<screen><userinput>cat &gt;&gt; /etc/dpkg/dpkg.cfg &lt;&lt; EOF
# disable fatal error on path checking
force-bad-path
EOF</userinput></screen>
</sect2>
</sect1>
</article>

View file

@ -0,0 +1,143 @@
<!-- Mandatory header for xml files change encoding to the one
you use on your computer -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- Mandatory DOCTYPE declaration. Fill free to add entities,
but no external entities in local files, since they would not
be accessible from JHALFSDIR. Change the document type `article' to
book if you prefer. That slightly changes the aspect if you render
it in html -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >
<!-- The first markup should be the one defined in the DOCTYPE DECLARATION -->
<article>
<!-- First section for the tarball download address.
Only the next four lines are mandatory, but you can add anything
to make the text look more like the LFS book.
Do not change anything, except the url and the md5 checksum. -->
<sect1 id="package">
<para>Download: <ulink url="http://your/package-manager/url"/></para>
<para>MD5 sum: <literal>package-md5-checksum</literal></para>
</sect1>
<!-- If needed, uncomment and edit this:
<sect1 id="patches">
<para>Download: <ulink url="somepatch-url"/></para>
<para>MD5 sum: <literal>somepatch-md5</literal></para>
</sect1>
-->
<!-- Do not change the next line. The name of the scriptlet will be taken
from the dbhtml instruction: it is the name of the file less .html, with
xxx-x-added before (x, digits). Furthermore, the tarball name must be in the form
name_x.y.z(.extension) or name-x.y.z(.extension) if the dbhtml
instruction contains file="name.html" -->
<sect1 id="ch-tools-pkgmngt" role="wrap">
<?dbhtml filename="dpkg.html"?>
<!-- next line mandatory without change, but feel free to add any title,
other sect2 (with different role), sectinfo and so on -->
<sect2 role="installation">
<!-- You can use any number of remap="pre", "configure", "make", "test", "install"
<screen><userinput remap="something">Instructions</userinput></screen>.
They are executed in that order. "pre" can be used for patching for example.
In case testing is enabled, the instructions flagged test are logged to a different
file (test-log). If testing is not enabled, they are not executed at all. Do not
put line breaks before and after your instructions. <userinput> without
remap attribute are considered configuration instructions and executed last. You
can also use remap="adjust" for the same purpose. -->
<screen><userinput remap="configure">./configure --prefix=/tools \
--disable-nls --without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-zlib --with-bz2=static --without-selinux</userinput></screen>
<screen><userinput remap="make">(cd lib &amp;&amp; make)
(cd src &amp;&amp; make)
(cd dpkg-deb &amp;&amp; make)
(cd dpkg-split &amp;&amp; make)</userinput></screen>
<screen><userinput remap="install">cp src/dpkg src/dpkg-* /tools/bin
cp dpkg-deb/dpkg-deb /tools/bin
cp dpkg-split/dpkg-split /tools/bin
mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg /tools/etc/dpkg</userinput></screen>
<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF</userinput></screen>
<screen><userinput>cat &gt;&gt; /tools/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# disable fatal error on path checking
force-bad-path
EOF</userinput></screen>
</sect2>
</sect1>
<!-- Mandatory section for creating dirs. These instructions are added at the
end of the creating dirs instructions of the book. Do not change the
following line -->
<sect1 id="ch-system-pkgmngt-creatingdirs">
<!-- Put the create dir intructions there. fille free to add
any explaining <title>Title</title> and <para>explanations</para> -->
<screen><userinput>mkdir -pv /var/{log,lib/dpkg/{info,updates}}
mkdir -pv /var/lib/packages</userinput></screen>
</sect1>
<!-- Same for files. Do not change the following line -->
<sect1 id="ch-system-pkgmngt-createfiles">
<screen><userinput>touch /var/lib/dpkg/{available,status}
touch /var/log/dpkg.log</userinput></screen>
</sect1>
<!-- Last but not least : Final instructions for installing the
package manager at the end of chapter 6. Again, the scriptlet file name is
taken from the dbhtml instruction, with digits added before and .html cut
and the tarball name is formed from this name + version. So the file
here _must_ be the same as in chapter 5. If rendering in html, both
sets of instructions end up in the same file, which is usually not a problem.
-->
<sect1 id="ch-system-pkgmngt" role="wrap">
<?dbhtml filename="dpkg.html"?>
<sect2 role="installation">
<screen><userinput remap="configure">./configure --prefix=/usr \
--without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-selinux</userinput></screen>
<screen><userinput remap="make">make</userinput></screen>
<!-- Those instructions are executed with PKG_DEST set. They are not processed
in any way to add $PKG_DEST at some place, and the PKG_DEST directory is not
populated before, so it is basically empty. You have thus to create any directory
needed in $PKG_DEST and not otherwise created by the make install command. -->
<screen><userinput remap="install">mkdir -pv $PKG_DEST
make DESTDIR=$PKG_DEST install
mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg $PKG_DEST/etc/dpkg</userinput></screen>
<screen><userinput remap="install">cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF</userinput></screen>
<screen><userinput>cat &gt;&gt; $PKG_DEST/etc/dpkg/dpkg.cfg &lt;&lt; EOF
# disable fatal error on path checking
force-bad-path
EOF</userinput></screen>
</sect2>
</sect1>
</article>