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

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

  <title>Shadow-&shadow-version;</title>

  <indexterm zone="ch-boot-shadow">
    <primary sortas="a-Shadow">Shadow</primary>
    <secondary>boot</secondary>
  </indexterm>

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

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

    <para os="a">Run the following <command>sed</command> command to disable
    the installation of the <command>groups</command> and
    <command>nologin</command> programs, as better versions of these programs
    are provided by other packages, and prevent Shadow from setting the suid
    bit on its installed programs:</para>

<screen os="b"><userinput>cp -v src/Makefile.in{,.orig}
sed -e 's/groups$(EXEEXT) //' \
    -e 's/= nologin$(EXEEXT)/= /' \
    -e 's/\(^suidu*bins = \).*/\1/' \
    src/Makefile.in.orig &gt; src/Makefile.in</userinput></screen>

    <para os="c">Tell Shadow to use <command>passwd</command> in
    <filename class="directory">/tools/bin</filename>:</para>

<screen os="d"><userinput>cat > config.cache &lt;&lt; "EOF"
shadow_cv_passwd_dir=/tools/bin
EOF</userinput></screen>

    <para os="e">Prepare Shadow for compilation:</para>

<screen os="f"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} --cache-file=config.cache \
    --enable-subordinate-ids=no</userinput></screen>

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

      <varlistentry os="h">
        <term><parameter>--enable-subordinate-ids=no</parameter></term>
        <listitem>
          <para>Disable subordinate ids option during cross-compile.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para os="i">Append to <filename>config.h</filename> since a test program
    will not be ran when cross-compiling:</para>

<screen os="j"><userinput>echo "#define ENABLE_SUBIDS 1" &gt;&gt; config.h</userinput></screen>

    <para os="k">Compile the package:</para>

<screen os="l"><userinput>make</userinput></screen>

    <para os="m">Install the package:</para>

<screen os="n"><userinput>make install</userinput></screen>

  </sect2>

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

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

</sect1>
