| 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
 | 
|---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
| 3 |   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
| 4 |   <!ENTITY % general-entities SYSTEM "../../general.ent">
 | 
|---|
| 5 |   %general-entities;
 | 
|---|
| 6 | ]>
 | 
|---|
| 7 | 
 | 
|---|
| 8 | <sect1 id="ch-cross-tools-shadow">
 | 
|---|
| 9 |   <?dbhtml filename="shadow.html"?>
 | 
|---|
| 10 | 
 | 
|---|
| 11 |   <title>Shadow-&shadow-version; - Native</title>
 | 
|---|
| 12 | 
 | 
|---|
| 13 |   <sect2 role="installation">
 | 
|---|
| 14 |     <title>Installation of Shadow</title>
 | 
|---|
| 15 | 
 | 
|---|
| 16 |     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
 | 
|---|
| 17 |     href="../../final-system/common/shadow.xml"
 | 
|---|
| 18 |     xpointer="xpointer(//*[@os='p1'])"/>
 | 
|---|
| 19 | 
 | 
|---|
| 20 |     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
 | 
|---|
| 21 |     href="../../final-system/common/shadow.xml"
 | 
|---|
| 22 |     xpointer="xpointer(//*[@os='p2'])"/>
 | 
|---|
| 23 | 
 | 
|---|
| 24 |     <para>The following patch changes the hard-coded <filename>/etc</filename>
 | 
|---|
| 25 |     in the sources to whatever was passed to configure. It also allows the
 | 
|---|
| 26 |     utilities to run as a user other then root:</para>
 | 
|---|
| 27 | 
 | 
|---|
| 28 | <screen><userinput>patch -Np1 -i ../&shadow-sysroot_hacks-patch;</userinput></screen>
 | 
|---|
| 29 | 
 | 
|---|
| 30 |     <para>The following value is added to <filename>config.cache</filename> to
 | 
|---|
| 31 |     make sure that the <filename>passwd</filename> program is found:</para>
 | 
|---|
| 32 | 
 | 
|---|
| 33 | <screen><userinput>echo "shadow_cv_passwd_dir=${CLFS}/bin" > config.cache</userinput></screen>
 | 
|---|
| 34 | 
 | 
|---|
| 35 |     <para>The following value causes Shadow to use its internal lckpwdf
 | 
|---|
| 36 |     instead of the one provided by Glibc. The one provided by Glibc will
 | 
|---|
| 37 |     attempt to modify the host system:</para>
 | 
|---|
| 38 | 
 | 
|---|
| 39 | <screen><userinput>echo "ac_cv_func_lckpwdf=no" >> config.cache</userinput></screen>
 | 
|---|
| 40 | 
 | 
|---|
| 41 |     <para>Prepare Shadow for compilation:</para>
 | 
|---|
| 42 | 
 | 
|---|
| 43 | <screen><userinput>./configure --prefix=${CLFS}/cross-tools --sbindir=${CLFS}/cross-tools/bin \
 | 
|---|
| 44 |     --sysconfdir=$CLFS/etc --disable-shared --without-libpam \
 | 
|---|
| 45 |     --without-audit --without-selinux --program-prefix=${CLFS_TARGET}- \
 | 
|---|
| 46 |     --cache-file=config.cache</userinput></screen>
 | 
|---|
| 47 | 
 | 
|---|
| 48 |     <para>Add the proper prefix to the <filename>passwd</filename> program:</para>
 | 
|---|
| 49 | 
 | 
|---|
| 50 | <screen><userinput>cp config.h{,.orig}
 | 
|---|
| 51 | sed "/PASSWD_PROGRAM/s/passwd/${CLFS_TARGET}-&/" config.h.orig > config.h</userinput></screen>
 | 
|---|
| 52 | 
 | 
|---|
| 53 |     <para>Compile the package:</para>
 | 
|---|
| 54 | 
 | 
|---|
| 55 | <screen><userinput>make</userinput></screen>
 | 
|---|
| 56 | 
 | 
|---|
| 57 |     <para>Install the package:</para>
 | 
|---|
| 58 | 
 | 
|---|
| 59 | <screen><userinput>make install</userinput></screen>
 | 
|---|
| 60 | 
 | 
|---|
| 61 |     <note>
 | 
|---|
| 62 |       <para>The tools built on this page will be used later in this book.</para>
 | 
|---|
| 63 |     </note>
 | 
|---|
| 64 | 
 | 
|---|
| 65 |   </sect2>
 | 
|---|
| 66 | 
 | 
|---|
| 67 |   <sect2 role="content">
 | 
|---|
| 68 |     <title/>
 | 
|---|
| 69 | 
 | 
|---|
| 70 |     <para>Details on this package are located in <xref
 | 
|---|
| 71 |     linkend="contents-shadow" role="."/></para>
 | 
|---|
| 72 | 
 | 
|---|
| 73 |   </sect2>
 | 
|---|
| 74 | 
 | 
|---|
| 75 | </sect1>
 | 
|---|