Le 28/02/2013 23:27, Matt Burgess a écrit :
On Thu, 2013-02-28 at 23:17 +0100, Pierre Labastie wrote:

Sorry it is too late now: I'll have a look at that tomorrow.
No need to apologise, and there's no rush!  For anyone building systemd
using jhalfs, just comment out that the whole of XML-Parser's<sect2>  in
chapter06/perl.xml, then build it by hand after Perl whilst you wait for
autoconf's testsuite to complete :-)

Can you try the attached patch?

I have tested various things (not package management yet).

It seems to generate correctly lfs trunk and perl for lfs systemd.

Regards
Pierre

Index: jhalfs-trunk/LFS/lfs.xsl
===================================================================
--- jhalfs-trunk.orig/LFS/lfs.xsl	2013-02-20 09:24:05.839102040 +0100
+++ jhalfs-trunk/LFS/lfs.xsl	2013-03-01 18:10:40.140031735 +0100
@@ -118,21 +118,57 @@
       <xsl:if test="sect2[@role='installation']">
         <xsl:text>cd $PKGDIR&#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}
+      <xsl:apply-templates select="sect2|
+                                   screen[not(@role) or
+                                          @role!='nodump']/userinput"/>
+      <xsl:if test="@id='ch-system-creatingdirs'">
+        <xsl:apply-templates
+           select="document('packageManager.xml')//sect1[
+                                       @id='ch-pkgmngt-creatingdirs'
+                                                        ]//userinput"/>
+      </xsl:if>
+      <xsl:if test="@id='ch-system-createfiles'">
+        <xsl:apply-templates
+           select="document('packageManager.xml')//sect1[
+                                       @id='ch-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>
+      </xsl:if>
+      <xsl:text>exit&#xA;</xsl:text>
+    </exsl:document>
+    </xsl:if>
+  </xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+  <xsl:template match="sect2">
+    <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}
@@ -141,26 +177,26 @@
  x86_64) ln -sv lib $PKG_DEST/lib64 &amp;&amp; ln -sv lib $PKG_DEST/usr/lib64 ;;
 esac
 </xsl:text>
-      </xsl:if>
-      <xsl:if test="@id = 'ch-system-glibc' and
-                            $pkgmngt = 'y'">
-        <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
+    </xsl:if>
+    <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'">
+    </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
+      </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
@@ -177,65 +213,48 @@
 packInstall
 rm -rf $PKG_DEST
 </xsl:text>
-      </xsl:if>
-      <xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
-        <xsl:copy-of select="//userinput[@remap='locale-test']"/>
-        <xsl:text>&#xA;</xsl:text>
-      </xsl:if>
-      <xsl:if test="@id='ch-system-glibc'">
-        <xsl:choose>
-          <xsl:when test="$full-locale='y'">
-            <xsl:copy-of select="//userinput[@remap='locale-full']"/>
-            <xsl:text>&#xA;</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="//userinput[@remap='locale-test']"/>
-            <xsl:text>&#xA;</xsl:text>
-            <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
-              <xsl:text>if LOCALE=`grep "</xsl:text>
-              <xsl:value-of select="$lang"/>
-              <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
+    </xsl:if>
+    <xsl:if test="$testsuite='3' and
+            ../@id='ch-tools-glibc' and
+            @role='installation'">
+      <xsl:copy-of select="//userinput[@remap='locale-test']"/>
+      <xsl:text>&#xA;</xsl:text>
+    </xsl:if>
+    <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
+      <xsl:choose>
+        <xsl:when test="$full-locale='y'">
+          <xsl:copy-of select="//userinput[@remap='locale-full']"/>
+          <xsl:text>&#xA;</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:copy-of select="//userinput[@remap='locale-test']"/>
+          <xsl:text>&#xA;</xsl:text>
+          <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
+            <xsl:text>if LOCALE=`grep "</xsl:text>
+            <xsl:value-of select="$lang"/>
+            <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
   CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
   INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
   LOCALE=`echo $LOCALE | sed 's,/.*,,'`
   localedef -i $INPUT -f $CHARMAP $LOCALE
 fi
 </xsl:text>
-            </xsl:if>
-          </xsl:otherwise>
-        </xsl:choose>
-      </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-pkgmngt-creatingdirs'
-                                                        ]//userinput"/>
-      </xsl:if>
-      <xsl:if test="@id='ch-system-createfiles'">
-        <xsl:apply-templates
-           select="document('packageManager.xml')//sect1[
-                                       @id='ch-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>
-      </xsl:if>
-      <xsl:text>exit&#xA;</xsl:text>
-    </exsl:document>
+          </xsl:if>
+        </xsl:otherwise>
+      </xsl:choose>
     </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:template>
 
-<xsl:template match="sect1" mode="pkgmngt">
+  <xsl:template match="sect1" mode="pkgmngt">
     <xsl:param name="dirname" select="chapter05"/>
     <!-- The build order -->
     <xsl:param name="order" select="062"/>
Index: jhalfs-trunk/common/libs/func_book_parser
===================================================================
--- jhalfs-trunk.orig/common/libs/func_book_parser	2012-02-21 10:08:02.000000000 +0100
+++ jhalfs-trunk/common/libs/func_book_parser	2013-03-01 15:40:26.403595495 +0100
@@ -137,7 +137,9 @@
     lfs)
         echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
         pushd $BOOK > /dev/null
-        bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
+        if [ -f process.scripts.sh ]; then
+          bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
+        fi
         popd > /dev/null
         xsltproc --nonet \
                  --xinclude \
Index: jhalfs-trunk/common/libs/func_wrt_Makefile
===================================================================
--- jhalfs-trunk.orig/common/libs/func_wrt_Makefile	2013-03-01 15:43:17.691603785 +0100
+++ jhalfs-trunk/common/libs/func_wrt_Makefile	2013-03-01 15:44:33.995607478 +0100
@@ -96,6 +96,8 @@
          ;;
      e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
          ;;
+     libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
+         ;;
      util-linux-libs) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
          ;;
      xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to