r3594 - in jhalfs/branches/ablfs: . BLFS LFS common common/libs

pierre at linuxfromscratch.org pierre at linuxfromscratch.org
Thu Mar 8 09:43:03 PST 2012


Author: pierre
Date: 2012-03-08 10:42:55 -0700 (Thu, 08 Mar 2012)
New Revision: 3594

Modified:
   jhalfs/branches/ablfs/BLFS/envars.conf
   jhalfs/branches/ablfs/Config.in
   jhalfs/branches/ablfs/LFS/master.sh
   jhalfs/branches/ablfs/common/common-functions
   jhalfs/branches/ablfs/common/libs/func_book_parser
   jhalfs/branches/ablfs/common/libs/func_download_pkgs
   jhalfs/branches/ablfs/common/libs/func_validate_configs.sh
   jhalfs/branches/ablfs/jhalfs
Log:
Major change for the inclusion of blfs-tool dependencies:
- build them before custom tools
- use instructions in the BLFS book instead of harcoded ones
- use the dependency tracker of the tool itself (kind of bootstrap)

Modified: jhalfs/branches/ablfs/BLFS/envars.conf
===================================================================
--- jhalfs/branches/ablfs/BLFS/envars.conf	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/BLFS/envars.conf	2012-03-08 17:42:55 UTC (rev 3594)
@@ -98,4 +98,3 @@
 # up to date
 
 source /etc/profile
-

Modified: jhalfs/branches/ablfs/Config.in
===================================================================
--- jhalfs/branches/ablfs/Config.in	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/Config.in	2012-03-08 17:42:55 UTC (rev 3594)
@@ -565,17 +565,12 @@
 		bool	"DocBook XML DTD (required)"
 		default	y
 
-		config	DEP_UNZIP
-		bool	"UnZip (required to install DocBook XML DTD)"
-		default	y
-		depends on DEP_DBXML
-
 		#config	DEP_DBXSL
 		#bool	"DocBook XSL (required)"
 		#default	y
 
 		config	DEP_LYNX
-		bool	"lynx (required)"
+		bool	"lynx (optional, for reading the generated book)"
 		default	y
 
 		config	DEP_SUDO
@@ -590,23 +585,18 @@
 		bool	"GPM (optional, see help)"
 		default	y
 		help
-			#-- You MUST install the gpm bootscript manually
-			#   and create its configuration file.
-			#
-			#   An alternative is to unselect this option and
-			#   install gpm, its configuration file, and its
-			#   bootscript using the custom tools support.
+			#-- if you install gpm, it will be started
+			#   automatically on boot. You'll have to edit
+			#   /etc/sysconfig/mouse for your system
 
 		config	DEP_SVN
 		bool	"SVN client (optional, see help)"
 		default	n
 		help
-			#-- Subversion-1.3.1 will be installed. This version is
-			#   old but does not rely on additional packages to be
-			#   built.
-			#
-			#   If you are happy with this old version and don't
-			#   need extra features, select this option.
+			#-- Subversion is needed for updating the book
+			#   sources. It is built without ssl support,
+			#   so you may have to rebuild it afterwards.
+
 	endmenu
 	#--- End blfs-tool Support
 

Modified: jhalfs/branches/ablfs/LFS/master.sh
===================================================================
--- jhalfs/branches/ablfs/LFS/master.sh	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/LFS/master.sh	2012-03-08 17:42:55 UTC (rev 3594)
@@ -408,8 +408,6 @@
   chapter78_Makefiles
   # Add the CUSTOM_TOOLS targets, if needed
   [[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target
-  # Add the BLFS_TOOL targets, if needed
-  [[ "$BLFS_TOOL" = "y" ]] && wrt_blfs_tool_targets
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
@@ -440,7 +438,7 @@
 (
     cat << EOF
 
-all:	ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL
+all:	ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL mk_CUSTOM_TOOLS
 	@sudo make do_housekeeping
 	@echo "$VERSION - jhalfs build" > lfs-release && \\
 	sudo mv lfs-release \$(MOUNT_PT)/etc
@@ -487,7 +485,14 @@
 	@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
 	@touch \$@
 
-mk_CUSTOM_TOOLS: create-sbu_du-report
+mk_BLFS_TOOL: create-sbu_du-report
+	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
+	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
+	  (sudo \$(CHROOT2) "make -C $BLFS_ROOT/work"); \\
+	fi;
+	@touch \$@
+
+mk_CUSTOM_TOOLS: mk_BLFS_TOOL
 	@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
 	  \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
 	  sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
@@ -495,14 +500,6 @@
 	fi;
 	@touch \$@
 
-mk_BLFS_TOOL: mk_CUSTOM_TOOLS
-	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
-	  \$(call sh_echo_PHASE,Building BLFS_TOOL); \\
-	  sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
-	  (sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\
-	fi;
-	@touch \$@
-
 devices: ck_LFS ck_UID
 	sudo mount -v --bind /dev \$(LFS)/dev
 	sudo mount -vt devpts devpts \$(LFS)/dev/pts
@@ -531,7 +528,6 @@
 CHROOT:       $chapter6
 BOOT:         $chapter78
 CUSTOM_TOOLS: $custom_list
-BLFS_TOOL:    $blfs_tool
 
 
 create-sbu_du-report:  mk_BOOT

Modified: jhalfs/branches/ablfs/common/common-functions
===================================================================
--- jhalfs/branches/ablfs/common/common-functions	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/common/common-functions	2012-03-08 17:42:55 UTC (rev 3594)
@@ -106,9 +106,4 @@
 [[ $VERBOSITY2 > 0 ]] && echo "OK"
 
 
-[[ $VERBOSITY2 > 0 ]] && echo -n "Loading <func_blfs_deps>..."
-source $COMMON_DIR/libs/func_blfs_deps
-[[ $? > 0 ]] && echo "file libs/func_blfs_deps did not load.." && exit 1
-[[ $VERBOSITY2 > 0 ]] && echo "OK"
-
 [[ $VERBOSITY2 > 0 ]] && echo -n "    ..."

Modified: jhalfs/branches/ablfs/common/libs/func_book_parser
===================================================================
--- jhalfs/branches/ablfs/common/libs/func_book_parser	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/common/libs/func_book_parser	2012-03-08 17:42:55 UTC (rev 3594)
@@ -155,8 +155,6 @@
         exit 1 ;;
   esac
 
-  [[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts
-
   echo "done"
 
   # Make the scripts executable.

Modified: jhalfs/branches/ablfs/common/libs/func_download_pkgs
===================================================================
--- jhalfs/branches/ablfs/common/libs/func_download_pkgs	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/common/libs/func_download_pkgs	2012-03-08 17:42:55 UTC (rev 3594)
@@ -197,10 +197,6 @@
 
   cd $BUILDDIR/sources
 
-  if [[ "${BLFS_TOOL}" = "y" ]]; then
-    add_blfs_deps_urls
-  fi
-
   if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
     add_CustomToolsURLS
   fi

Modified: jhalfs/branches/ablfs/common/libs/func_validate_configs.sh
===================================================================
--- jhalfs/branches/ablfs/common/libs/func_validate_configs.sh	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/common/libs/func_validate_configs.sh	2012-03-08 17:42:55 UTC (rev 3594)
@@ -57,7 +57,7 @@
 
   # Additional variables (add DEP_DBXSL when required again)
   local -r blfs_tool_PARAM_LIST="BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR \
-                                 DEP_LIBXML DEP_LIBXSLT DEP_TIDY DEP_UNZIP \
+                                 DEP_LIBXML DEP_LIBXSLT DEP_TIDY \
                                  DEP_DBXML DEP_LYNX DEP_SUDO DEP_WGET \
                                  DEP_SVN DEP_GPM"
   local -r custom_tool_PARAM_LIST="TRACKING_DIR"

Modified: jhalfs/branches/ablfs/jhalfs
===================================================================
--- jhalfs/branches/ablfs/jhalfs	2012-03-07 21:38:18 UTC (rev 3593)
+++ jhalfs/branches/ablfs/jhalfs	2012-03-08 17:42:55 UTC (rev 3594)
@@ -176,85 +176,6 @@
 # Set the document location...
 BOOK=${BOOK:=$PROGNAME-$LFSVRS}
 
-# blfs-tool envars
-BLFS_TOOL=${BLFS_TOOL:-n}
-if [[ "${BLFS_TOOL}" = "y" ]] ; then
-  BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
-  case $BLFS_BRANCH_ID in
-    development )  BLFS_TREE=trunk/BOOK ;;
-         *EDIT* )  echo " You forgot to set the BLFS branch or stable book version."
-                   echo " Please rerun make and fix the configuration."
-                   exit 2 ;;
-       branch-* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
-              * )  BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
-  esac
-  # Dependencies envars, easier to update.
-  # Tidy and Unzip version are harcoded also in wrt_blfs_tool_targets()
-    # libxml2
-  LIBXML_PKG="libxml2-2.7.8.tar.gz"
-  LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}"
-  LIBXML_MD5="8127a65e8c3b08856093099b52599c86"
-    # libxslt
-  LIBXSLT_PKG="libxslt-1.1.26.tar.gz"
-  LIBXSLT_URL="ftp://xmlsoft.org/libxslt/${LIBXSLT_PKG}"
-  LIBXSLT_MD5="e61d0364a30146aaa3001296f853b2b9"
-    # tidy
-  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="unzip60.tar.gz"
-  UNZIP_URL="http://downloads.sourceforge.net/infozip/${UNZIP_PKG}"
-  UNZIP_MD5="62b490407489521db863b523a7f86375"
-    # DocBook XML DTD
-  DBXML_PKG="docbook-xml-4.5.zip"
-  DBXML_URL="http://www.docbook.org/xml/4.5/${DBXML_PKG}"
-  DBXML_MD5="03083e288e87a7e829e437358da7ef9e"
-    # DocBook XSL
-#   DBXSL_PKG="docbook-xsl-1.69.1.tar.bz2"
-#   DBXSL_URL="http://prdownloads.sourceforge.net/docbook/${DBXSL_PKG}"
-#   DBXSL_MD5="6ebd29a67f2dcc3f2220f475ee6f6552"
-    # Lynx
-  LYNX_PKG="lynx2.8.8dev.10.tar.bz2"
-  LYNX_URL="http://lynx.isc.org/current/${LYNX_PKG}"
-  LYNX_MD5="1c9ef3746520c69914b461f88de6b12e"
-    # sudo
-  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.13.4.tar.xz"
-  WGET_URL="ftp://ftp.gnu.org/gnu/wget/${WGET_PKG}"
-  WGET_MD5="7f518b3a71e9efd330e9a0c3714f8463"
-    # SQLite (for subversion)
-  SQLITE_PKG="sqlite-autoconf-3071000.tar.gz"
-  SQLITE_URL="http://sqlite.org/${SQLITE_PKG}"
-  SQLITE_MD5="9ed2ca93577b58cfa0d01f64b9312ab9"
-    # 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.7.1.tar.bz2"
-  SVN_URL="http://archive.apache.org/dist/subversion/${SVN_PKG}"
-  SVN_MD5="8a4fa74385df85a9702141b6b68b8307"
-    # GPM
-  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
@@ -304,6 +225,23 @@
 
 [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
 
+# blfs-tool envars
+BLFS_TOOL=${BLFS_TOOL:-n}
+if [[ "${BLFS_TOOL}" = "y" ]] ; then
+  BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
+  case $BLFS_BRANCH_ID in
+    development )  BLFS_TREE=trunk/BOOK ;;
+         *EDIT* )  echo " You forgot to set the BLFS branch or stable book version."
+                   echo " Please rerun make and fix the configuration."
+                   exit 2 ;;
+       branch-* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
+              * )  BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
+  esac
+  [[ $VERBOSITY > 0 ]] && echo -n "Loading blfs tools installation function..."
+  source $COMMON_DIR/libs/func_install_blfs
+  [[ $? > 0 ]] && echo "function module did not load.." && exit 1
+  [[ $VERBOSITY > 0 ]] && echo "OK"
+fi
 
 ###################################
 ###          MAIN               ###
@@ -386,10 +324,6 @@
   # 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
   #
@@ -413,7 +347,6 @@
     cp extras/* $JHALFSDIR/extras
   fi
   #
-
   # Copy custom tools config files, if requested
   if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
     echo "Copying custom tool scripts to $JHALFSDIR"
@@ -423,44 +356,15 @@
   #
   # Install blfs-tool, if requested.
   if [[ "${BLFS_TOOL}" = "y" ]] ; then
-    # Install the files
-    [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
-    cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
-    cp -r menu ${BUILDDIR}${BLFS_ROOT}
-    cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
-    cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
-    # Clean-up
-    make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
-    rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
-    rm -rf ${BUILDDIR}${BLFS_ROOT}/xsl/.svn
-    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
-    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
-    # Set some harcoded envars to their proper values
-    sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{Makefile,gen-makefile.sh}
-    # Copy the dependencies build scripts
-    cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
-    rm -rf $JHALFSDIR/blfs-tool-deps/.svn
+    echo Downloading and validating the BLFS book
+    echo '(may take some time...)'
+    install_blfs_tools 2>&1 | tee -a $LOGDIR/$LOG
   fi
   #
 
   get_book
   echo "${SD_BORDER}${nl_}"
 
-  # Get the BLFS book, if requested.
-  if [[ "${BLFS_TOOL}" = "y" ]] ; then
-    echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
-    if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
-      mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
-      svn co $SVN_2/BLFS/$BLFS_TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
-    else
-      pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
-        svn up >>$LOGDIR/$LOG 2>&1
-      popd 1> /dev/null
-    fi
-    echo -ne "done\n"
-    echo "${SD_BORDER}${nl_}"
-  fi
-
 fi
 
 # When regenerating the Makefile, we need to know also the




More information about the alfs-log mailing list