<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-e2fsprogs" role="wrap">
  <?dbhtml filename="e2fsprogs.html"?>

  <title>E2fsprogs-&e2fsprogs-version;</title>

  <indexterm zone="ch-boot-e2fsprogs">
    <primary sortas="a-E2fsprogs">E2fsprogs</primary>
    <secondary>boot</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../final-system/common/e2fsprogs.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of E2fsprogs</title>

    <para os="s1">We will disable the building of the test progs. This
    will prevent a glibc error during our build.</para>

<screen os="s2"><userinput>cp Makefile.in{,.orig}
sed -e 's@tests/progs@@g' Makefile.in.orig > Makefile.in </userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='a'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='b'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='c'])"/>

<screen os="aa"><userinput>../configure --prefix=/tools \
    --enable-elf-shlibs --disable-evms --with-cc=${CC} --with-linker=${LD} \
    --build=${CLFS_HOST} --host=${CLFS_TARGET}</userinput></screen>

    <variablelist os="e">
      <title>The meaning of the configure options:</title>

      <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
      href="../../final-system/common/e2fsprogs.xml"
      xpointer="xpointer(//*[@os='e2'])"/>

      <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
      href="../../final-system/common/e2fsprogs.xml"
      xpointer="xpointer(//*[@os='e3'])"/>

    </variablelist>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='f'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='g'])"/>

    <para os="h">Install the binaries and documentation:</para>

<screen os="i"><userinput>make DESTDIR=${CLFS} install</userinput></screen>

    <variablelist os="j">
      <title>The meaning of the make option:</title>

      <varlistentry>
        <term><parameter>DESTDIR=${CLFS}</parameter></term>
        <listitem>
          <para>The Makefile for e2fsprogs hard-codes a path to the 
          <filename>mke2fs.conf</filename> file, attempting to install it into
          ${DESTDIR}/etc, causing the installation to fail as it tries to write
          to /etc. The DESTDIR parameter prevents this.</para>
        </listitem>
      </varlistentry>
    </variablelist>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/e2fsprogs.xml"
    xpointer="xpointer(//*[@os='k'])"/>

<screen os="l"><userinput>make DESTDIR=${CLFS} install-libs</userinput></screen>

    <para os="ad">Create needed symlinks for a bootable system:</para>

<screen os="ae"><userinput>ln -sv /tools/sbin/{fsck.ext2,fsck.ext3,e2fsck} ${CLFS}/sbin</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-e2fsprogs" role="."/></para>

  </sect2>

</sect1>
