Changeset f4ed135
- Timestamp:
- 08/24/2006 08:38:22 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- a3b0e38
- Parents:
- 7bf2fdd
- Files:
-
- 3 added
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/TODO
r7bf2fdd rf4ed135 6 6 ##### 7 7 8 For now the code is able to do the first step for the new approach: to create9 LFS-like books from BLFS sources, allowing to create linear build scrips and10 Makefiles similars to the current ones for {C,H}LFS.11 8 12 What remains to do: 9 -- Review generated scripts for bugs trying to figure out if are due fails 10 in the BLFS book XML tagging (that will implied that the book need be 11 fixed) or are required variations due book layout. If the latter, try 12 to fix it via XSL, documenting in README.BLFS that issues that can't be 13 fixed. 13 14 14 -- To review the XSL code needed to create the build scripts. 15 A lot of book-versus-scripts and testing is needed. 16 We need yet to figure out if we can to to handle Perl modules installation 17 and other pages that have commands to install more that one package 18 (e.g., Gnat in GCC Java-bin in Java, sane-backends and sane-frontends 19 in Sane, etc) or not-estandart installations, like Xorg7 20 21 -- Test the method used to track already installed packages by previous runs. 22 See if the packages version can be watched also. 23 24 -- Integrate the menuconfig based package selection, trying to make use of the 25 installed packages traking system. 15 This is an on-going and never-end task due that, ideally, each commit to 16 the BLFS book should be revised and validated, but our time is limited. 26 17 27 18 -- Bugs hunting. -
BLFS/gen-makefile.sh
r7bf2fdd rf4ed135 5 5 set -e 6 6 7 8 9 7 # TEMPORARY VARIABLES.. development use only 10 8 declare MKFILE=Makefile 11 9 declare PREV_PACKAGE="" 12 10 declare BUILD_SCRIPTS=scripts 13 declare TRACKING_DIR= /var/lib/jhalfs/BLFS11 declare TRACKING_DIR=tracking-dir 14 12 15 13 HEADER="# This file is automatically generated by jhalfs … … 51 49 local pkg_name=$1 52 50 local pkg_ver=$2 51 local alsa_ver=$(grep "^alsa[[:space:]]" ../packages | cut -f3) 52 local kde_core_ver=$(grep "^kde-core[[:space:]]" ../packages | cut -f3) 53 local xorg7_ver=$(grep "^xorg7[[:space:]]" ../packages | cut -f3) 54 55 if [[ -n "$pkg_ver" ]] ; then 56 ( 57 cat << EOF 58 @touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} 59 EOF 60 ) >> $MKFILE.tmp 61 fi 62 63 case $pkg_name in 64 *-alsa-lib ) #this the unique mandatory package for ALSA support. 65 ( 66 cat << EOF 67 @touch \$(TRACKING_DIR)/alsa-${alsa_ver} 68 EOF 69 ) >> $MKFILE.tmp 70 ;; 71 *-kdebase ) 72 ( 73 cat << EOF 74 @touch \$(TRACKING_DIR)/kde-core-${kde_core_ver} 75 EOF 76 ) >> $MKFILE.tmp 77 ;; 78 *-xorg7-driver ) # xtrerm2 and rman are optional 79 ( 80 cat << EOF 81 @touch \$(TRACKING_DIR)/xorg7-${xorg7_ver} 82 EOF 83 ) >> $MKFILE.tmp 84 ;; 85 esac 86 53 87 ( 54 88 cat << EOF 55 89 @touch \$@ && \\ 56 touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} && \\57 90 sleep .25 && \\ 58 91 echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 68 101 local script_name=$1 69 102 local pkg_ver=$2 70 103 71 104 echo -n "${tab_}${tab_} entry for <$script_name>" 72 105 … … 91 124 92 125 #----------------------------# 126 __write_meta_pkg_touch() { # 127 #----------------------------# 128 local meta_pkg=$1 129 local pkg_ver=$(grep "^${meta_pkg}[[:space:]]" ../packages | cut -f3) 130 local gnome_core_ver=$(grep "^gnome-core[[:space:]]" ../packages | cut -f3) 131 local kde_full_ver=$(grep "^kde-full[[:space:]]" ../packages | cut -f3) 132 133 ( 134 cat << EOF 135 136 999-z-$meta_pkg: $PREV_PACKAGE 137 @touch \$(TRACKING_DIR)/${meta_pkg}-${pkg_ver} 138 EOF 139 ) >> $MKFILE.tmp 140 141 case $meta_pkg in 142 gnome-full ) 143 ( 144 cat << EOF 145 @touch \$(TRACKING_DIR)/gnome-core-${gnome_core_ver} 146 EOF 147 ) >> $MKFILE.tmp 148 ;; 149 kde-koffice ) 150 ( 151 cat << EOF 152 @touch \$(TRACKING_DIR)/kde-full-${kde_full_ver} 153 EOF 154 ) >> $MKFILE.tmp 155 ;; 156 esac 157 158 ( 159 cat << EOF 160 @touch \$@ 161 EOF 162 ) >> $MKFILE.tmp 163 164 } 165 166 #----------------------------# 93 167 generate_Makefile () { # 94 168 #----------------------------# … … 104 178 for package_script in scripts/* ; do 105 179 this_script=`basename $package_script` 106 script_ver=$(xmllint --noent ../blfs-xml/book/bookinfo.xml 2>/dev/null | \ 107 grep -i " ${this_script#*-?-}-version " | \ 108 cut -d "\"" -f2 ) 109 if [ ! -e $TRACKING_DIR/${this_script#*-?-}-$script_ver ]; then 110 pkg_list="$pkg_list ${this_script}" 111 __write_entry "${this_script}" "${script_ver}" 112 PREV_PACKAGE=${this_script} 113 fi 180 pkg_ver=$(grep "^${this_script#*-?-}[[:space:]]" ../packages | cut -f3) 181 pkg_list="$pkg_list ${this_script}" 182 __write_entry "${this_script}" "${pkg_ver}" 183 PREV_PACKAGE=${this_script} 114 184 done 185 186 PACKAGE=$(basename $PWD) 187 188 # alsa, kde-core and xorg7 are also available dependencies, thus handled 189 # in another way. 190 case $PACKAGE in 191 gnome-core | \ 192 gnome-full | \ 193 kde-full | \ 194 kde-koffice ) pkg_list="$pkg_list 999-z-${PACKAGE}" 195 __write_meta_pkg_touch "${PACKAGE}" 196 ;; 197 esac 115 198 116 199 … … 121 204 $HEADER 122 205 123 PACKAGE= "`basename $PWD`"206 PACKAGE= $PACKAGE 124 207 TRACKING_DIR= $TRACKING_DIR 125 208 -
BLFS/libs/constants.inc
r7bf2fdd rf4ed135 3 3 # common constants 4 4 # 5 # $Id :5 # $Id$ 6 6 ##### 7 7 -
BLFS/libs/func_dependencies
r7bf2fdd rf4ed135 47 47 #--------------------- 48 48 # The BLFS sources directory. 49 # Note: for book.xsl this value must be set via a sed in ./blfs.50 # For consistency, we should to do the same here.51 49 BLFS_XML=`echo $PKGXML | sed -e 's,/.*,,'` 52 50 … … 74 72 75 73 # Meta-packages at target level 76 # KDE and Gnome-{core,full} could be made via packages.sh, but not sure yet how.77 74 alsa ) 78 echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \ 79 alsa-plugins\nalsa-lib" > dependencies/alsa.dep 75 cp ../libs/alsa.dep dependencies/ 80 76 ;; 81 77 gnome-core ) … … 92 88 ;; 93 89 kde-koffice ) 94 cp ../libs/kde-{core,full}.dep dependencies/ 95 echo -e "koffice\nkde-full\nkde-core" > dependencies/kde-koffice.dep 96 ;; 97 xorg7 ) # At atarget level, add also x-config and x-setup 98 echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n \ 99 xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \ 100 xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep 90 cp ../libs/kde-{core,full,koffice}.dep dependencies/ 91 ;; 92 xorg7 ) 93 cp ../libs/xorg7.dep dependencies/ 101 94 ;; 102 95 * ) # Default … … 115 108 case $TARGET in 116 109 # If there is no usefull XML page, skip it. 117 alsa | gnome-core | gnome-full | kde-core | kde-full | kde-koffice ) ;;110 alsa | gnome-core | gnome-full | kde-core | kde-full | kde-koffice | xorg7) ;; 118 111 * ) 119 112 echo -e " $ENTRY_START$PKGXML$ENTRY_END" >> $TARGET-index.xml.tmp … … 161 154 local saveIFS=$IFS 162 155 local DEP_LV=$DEP_LEVEL 163 local line line2 DEP 156 local line line2 DEP pkg_ver inst_ver 164 157 165 158 #------------------ … … 185 178 > xincludes/$PKG.xinc.tmp 186 179 for DEP in `cat dependencies/$PKG.dep`; do 187 # Special packages (a lot of hacks) 180 181 # Special packages that need be remaped 188 182 case $DEP in 189 183 … … 198 192 kde ) DEP=kde-core ;; 199 193 200 # Dummy gnome-core pages201 GNOME-desktop-file-utils ) DEP=desktop-file-utils ;;202 GNOME-shared-mime-info ) DEP=shared-mime-info ;;203 204 194 # Set values for alternative packages 205 # X is a meta-package, thus handled in another way.206 195 LPRng | cups ) DEP=$PRINT_SERVER ;; 207 196 mitkrb | heimdal ) DEP=$KBR5 ;; 208 197 gs | espgs ) DEP=$GHOSTSCRIPT ;; 209 198 server-mail ) DEP=$MAIL_SERVER ;; 199 x-window-system ) 200 case $X11 in 201 xorg7 ) DEP=xorg7 ;; 202 * ) 203 pkg_ver=$(grep "^${X11}[[:space:]]" ../packages | cut -f3) 204 inst_ver=$(grep "^${X11}[[:space:]]" ../packages | cut -f4) 205 [ -n "${pkg_ver}" ] && [ "x${pkg_ver}" = "x${inst_ver}" ] && continue 206 ;; 207 esac 208 ;; 210 209 esac 210 211 # If DEP has been previouly installed, skip it 212 pkg_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f3) 213 inst_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f4) 214 [ -n "${pkg_ver}" ] && [ "x${pkg_ver}" = "x${inst_ver}" ] && continue 211 215 212 216 #------------------ … … 272 276 # Skip the creation when all dependencies are circular. 273 277 alsa-lib | cracklib | libexif | unixodbc ) ;; 274 # Meta-packages at dependency level (ugly *.dep files, but work for now) 275 alsa ) # When dependency "alsa", use all alsa-* packages 276 echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \ 277 alsa-plugins\nalsa-lib" > dependencies/alsa.dep 278 # Meta-packages at dependency level 279 alsa ) 280 cp ../libs/alsa.dep dependencies/ 278 281 ;; 279 282 kde-core ) 280 283 cp ../libs/kde-core.dep dependencies/ 281 284 ;; 282 x-window-system ) # X11 alternatives285 x-window-system ) # When X11 is not Xorg7 283 286 echo -e "x-config\nx-setup\n$X11" > dependencies/x-window-system.dep 284 287 ;; 285 288 xorg7 ) 286 echo -e "rman\nxterm2\nxorg7-driver\nxorg7-server\nluit\nxorg7-font\n \ 287 xorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \ 288 xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep 289 cp ../libs/xorg7.dep dependencies/ 289 290 ;; 290 291 * ) xsltproc --stringparam dependencies $DEP_LV \ … … 338 339 if [[ "$PKG" = "xorg7" ]] ; then 339 340 # Add their XInclude 340 PKG_XML= `grep "^$PKG[[:space:]]" ../packages | cut -f2`341 PKG_XML=${BLFS_XML}/x/installing/xorg7.xml 341 342 echo -e " $ENTRY_START$PKG_XML$ENTRY_END" >> xincludes/$PKG.xinc.tmp 342 343 fi -
BLFS/libs/func_packages
r7bf2fdd rf4ed135 6 6 7 7 #-----------------------# 8 get_pkg_ver() { # Find package version for a given package ID 9 #-----------------------# 10 local pkg_id=$1 11 12 case ${pkg_id} in 13 # ALSA packages version 14 alsa* ) pkg_id=alsa ;; 15 16 # KDE packages version 17 kdevelop ) : ;; 18 kde*config ) : ;; 19 kde* ) pkg_id=kde ;; 20 21 # Xorg7 packages version 22 xorg7-server ) pkg_id=xorg-server ;; 23 xterm2 ) pkg_id=xterm ;; 24 xorg7* ) pkg_id=xorg7 ;; 25 26 # Others (ID value don't match entity name) 27 wireless_tools ) pkg_id=wireless-tools ;; 28 bind-utils ) pkg_id=bind ;; 29 html-tidy ) pkg_id=tidy ;; 30 jdk ) pkg_id=jdk-src ;; 31 reiserfs ) pkg_id=reiser ;; 32 xfs ) pkg_id=xfsprogs ;; 33 esac 34 35 xmllint --noent ./${BLFS_XML}/book/bookinfo.xml 2>/dev/null | \ 36 grep -i " ${pkg_id}-version " | cut -d "\"" -f2 37 38 } 39 40 #-----------------------# 41 get_installed_ver() { # Find installed package version for a given package ID 42 #-----------------------# 43 local pkg_id=$1 44 45 find $TRACKING_DIR -name "${pkg_id}-[[:digit:]]*" | sed "s/.*${pkg_id}-//" 46 47 } 48 49 #-----------------------# 8 50 generate_packages() { # Master packages file 9 51 #-----------------------# 10 local pkg_id file 52 local pkg_id file pkg_ver 53 local ALSA_VER GNOME_VER GNOME_MINOR_VER KDE_VER KDE_KOFFICE_VER XORG7_VER 11 54 12 55 > packages.tmp … … 14 57 # Extract Id and path for sect1 files 15 58 for file in `find $BLFS_XML -name "*.xml"` ; do 16 pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'` 17 [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp 59 pkg_id=$(grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//') 60 pkg_ver=$(get_pkg_ver $pkg_id) 61 installed_ver=$(get_installed_ver $pkg_id) 62 [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file\t$pkg_ver\t$installed_ver" >> packages.tmp 18 63 done 19 64 20 65 # IDs clean-up (unuseful pages or commented-out packages, could be more) 21 sed -i '/template/d;/ntroduction/d;/preface/d' packages.tmp 22 sed -i '/courier.xml/d' packages.tmp 23 sed -i '/nautilus-media.xml/d;/gal.xml/d;/gpdf.xml/d;/gv.xml/d' packages.tmp 66 sed -i '/template/d;/ntroduction/d;/preface/d;/alsa.xml/d' packages.tmp 67 sed -i '/obsolete/d;/postlfs-/d;/-client.xml/d;/xorg7.xml/d' packages.tmp 68 sed -i '/courier.xml/d;/-other\t/d;/others-/d;/other-/d' packages.tmp 69 sed -i '/fw-firewall\t/d;/gcc2\t/d;/cvsserver\t/d;/svnserver\t/d' packages.tmp 70 sed -i '/fam\t/d;/libungif\t/d;/ncpfs\t/d;/slrn\t/d;/konq\t/d' packages.tmp 71 sed -i '/gst-plugins\t/d;/openquicktime\t/d;/compressdoc\t/d' packages.tmp 72 73 # Meta-packages version 74 ALSA_VER=$(get_pkg_ver alsa) 75 GNOME_VER=$(get_pkg_ver gnome) 76 GNOME_MINOR_VER=$(get_pkg_ver gnome-minor) 77 KDE_VER=$(get_pkg_ver kde) 78 KDE_INST_VER=$(get_installed_ver kde) 79 KDE_KOFFICE_VER=$(get_pkg_ver koffice) 80 XORG7_VER=$(get_pkg_ver xorg7) 81 82 # Meta-packages installed version 83 ALSA_INST_VER=$(get_installed_ver alsa) 84 GNOME_CORE_INST_VER=$(get_installed_ver gnome-core) 85 GNOME_FULL_INST_VER=$(get_installed_ver gnome-full) 86 KDE_CORE_INST_VER=$(get_installed_ver kde-core) 87 KDE_FULL_INST_VER=$(get_installed_ver kde-full) 88 KDE_KOFFICE_INST_VER=$(get_installed_ver kde-koffice) 89 XORG7_INST_VER=$(get_installed_ver xorg7) 24 90 25 91 # Add header with meta-packages pseudo Id 26 92 { 27 93 cat << EOF 28 29 === GNOME META-PACKAGES === 30 # GNOME base packages 31 gnome-core $BLFS_XML 32 # All GNOME packages 33 gnome-full $BLFS_XML 34 35 === KDE META-PACKAGES === 36 # KDE base packages 37 kde-core $BLFS_XML 38 # All KDE packages 39 kde-full $BLFS_XML 40 # All KDE packages plus Koffice 41 kde-koffice $BLFS_XML 42 43 === INDIVIDUAL PACKAGES === 44 94 alsa $BLFS_XML $ALSA_VER $ALSA_INST_VER 95 gnome-core $BLFS_XML $GNOME_VER$GNOME_MINOR_VER $GNOME_CORE_INST_VER 96 gnome-full $BLFS_XML $GNOME_VER$GNOME_MINOR_VER $GNOME_FULL_INST_VER 97 kde-core $BLFS_XML $KDE_VER $KDE_CORE_INST_VER 98 kde-full $BLFS_XML $KDE_VER $KDE_FULL_INST_VER 99 kde-koffice $BLFS_XML $KDE_KOFFICE_VER $KDE_KOFFICE_INST_VER 100 xorg7 $BLFS_XML $XORG7_VER $XORG7_INST_VER 45 101 EOF 46 } > packages102 } >> packages.tmp 47 103 48 104 # Dump packages list 49 sort packages.tmp >>packages105 sort packages.tmp -b --key=2 --field-separator=/ --output=packages 50 106 51 107 # Clean up … … 68 124 done 69 125 126 # Replace dummy packages with the proper ones 127 sed -i 's/GNOME-//g' gnome-core.dep.tmp 128 70 129 tac gnome-core.dep.tmp > libs/gnome-core.dep 71 130 rm gnome-core.dep.tmp … … 128 187 rm kde-full.dep.tmp 129 188 } 189 190 #--------------------------# 191 generate_kde_koffice() { # KDE full + Koffice 192 #--------------------------# 193 echo -e "koffice\nkde-full\nkde-core" > libs/kde-koffice.dep 194 } 195 196 #--------------------------# 197 generate_alsa() { # ALSA packages 198 #--------------------------# 199 echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n\ 200 alsa-plugins\nalsa-lib" > libs/alsa.dep 201 } 202 203 #--------------------------# 204 generate_xorg7() { # Xorg7 packages 205 #--------------------------# 206 echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n\ 207 xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n\ 208 xorg7-lib\nxorg7-util\nxorg7-proto" > libs/xorg7.dep 209 } -
BLFS/libs/func_parser
r7bf2fdd rf4ed135 144 144 -o ./scripts/ ../libs/scripts.xsl \ 145 145 $TARGET-index.xml >> xsltproc.log 2>&1 146 echo -e "done\n"147 146 # Make the scripts executable. 148 147 chmod -R +x scripts 148 cd .. 149 echo -e "done\n" 149 150 150 151 } -
BLFS/libs/scripts.xsl
r7bf2fdd rf4ed135 27 27 28 28 <!-- The file names --> 29 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/> 30 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/> 31 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/> 29 <xsl:variable name="filename" select="@id"/> 32 30 33 31 <!-- Package name (use "Download FTP" by default. If empty, use "Download HTTP" --> -
BLFS/update_book.sh
r7bf2fdd rf4ed135 7 7 declare -r SVN="svn://svn.linuxfromscratch.org" 8 8 9 BLFS_XML=$1 # Book directory 10 DOC_MODE=$2 # Action to take, update or get 9 DOC_MODE=$1 # Action to take, update, get or none 10 BLFS_XML=$2 # Book directory 11 11 TREE=$3 # SVN tree for the BLFS book version 12 12 … … 14 14 [[ -z $DOC_MODE ]] && DOC_MODE=update 15 15 [[ -z $TREE ]] && TREE=trunk/BOOK 16 17 TRACKING_DIR=tracking-dir 16 18 17 19 #--------------------- … … 69 71 } 70 72 71 BOOK_Source73 [ "${DOC_MODE}" != "none" ] && BOOK_Source 72 74 73 echo -en "\n\tGenerating packages file ..." 74 generate_packages 75 echo "done." 75 if [ "${DOC_MODE}" = "none" ] ; then 76 echo -en "\n\tGenerating packages database file ..." 77 generate_packages 78 echo "done." 76 79 77 echo -en "\tGenerating gnome-coredependencies list ..."78 generate_gnome_core 79 echo "done."80 echo -en "\tGenerating alsa dependencies list ..." 81 generate_alsa 82 echo "done." 80 83 81 echo -en "\tGenerating gnome-fulldependencies list ..."82 generate_gnome_full 83 echo "done."84 echo -en "\tGenerating gnome-core dependencies list ..." 85 generate_gnome_core 86 echo "done." 84 87 85 echo -en "\tGenerating kde-coredependencies list ..."86 generate_kde_core 87 echo "done."88 echo -en "\tGenerating gnome-full dependencies list ..." 89 generate_gnome_full 90 echo "done." 88 91 89 echo -en "\tGenerating kde-fulldependencies list ..."90 generate_kde_full 91 echo -e "done.\n"92 echo -en "\tGenerating kde-core dependencies list ..." 93 generate_kde_core 94 echo "done." 92 95 96 echo -en "\tGenerating kde-full dependencies list ..." 97 generate_kde_full 98 echo -e "done." 99 100 echo -en "\tGenerating kde-koffice dependencies list ..." 101 generate_kde_koffice 102 echo -e "done." 103 104 echo -en "\tGenerating xorg7 dependencies list ..." 105 generate_xorg7 106 echo "done." 107 fi 108 -
Config.in
r7bf2fdd rf4ed135 295 295 #-- The directory name where BLFS book sources 296 296 # will be checkout. 297 298 config TRACKING_DIR 299 string "Installed packages database directory" 300 default "/var/lib/jhalfs/BLFS" 301 depends on BOOK_BLFS 302 help 303 #-- Full path to the directory where the installed 304 # packages database will be created. 305 # 306 # Note that the user that will build the packages must 307 # have read and write privileges on that directory. 297 308 #--- End BLFS specific params 298 309 -
README
r7bf2fdd rf4ed135 22 22 uClibc rather than glibc. 23 23 24 2. INSTALLATION:: 24 2. PREREQUISITES:: 25 26 To use this tool you MUST: 27 28 - have experience building {c,h,b}LFS packages 29 - know how to edit and write shell scripts 30 - know how a Makefile works 31 - be able to trace build failures and to find what is causing it 32 (user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug) 33 34 If you don't have the above skill, please don't use this tool. 35 36 37 3. INSTALLATION:: 25 38 No installation is required. System-wide installation is not allowed 26 39 for now. 27 40 28 3. CONFIGURATION FILES::41 4. CONFIGURATION FILES:: 29 42 Each book in the LFS series has its own set of configurable parameters 30 43 as well as the common parameters file. … … 49 62 This will create a new file named configuration but will not launch jhalfs. 50 63 51 4. RUNNING::64 5. RUNNING:: 52 65 The script master.sh cannot be invoked directly but only via the 53 66 supplied symlinks. After editing the config file for the project you wish … … 115 128 116 129 117 5. LAYOUT::130 6. LAYOUT:: 118 131 119 132 /CLFS/config … … 157 170 158 171 159 6. FAQ::172 7. FAQ:: 160 173 Q. "This 'help' file is very sparse" 161 174 A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books -
README.BLFS
r7bf2fdd rf4ed135 18 18 19 19 20 2. USAGE:: 20 2. PREREQUISITES:: 21 22 To use this tool you MUST to: 23 24 - have experience building BLFS packages 25 - know how to edit and write shell scripts 26 - know how a Makefile works 27 - be able to trace build failures and to find what is causing it 28 (user error, package bug, BLFS command bug, or jhalfs code bug) 29 30 If you don't have the above skill, please don't use this tool. 31 32 33 3. USAGE:: 21 34 22 35 Due the complexity of the BLFS book, the scripts/Makefile generation is 23 36 done in several steps: 24 37 25 2.1 INSTALLATION:: 26 Run "make" to launch the menuconfig interface. Select the BLFS book 27 and it version. Then set the installation directory (default 38 3.1 INSTALLATION:: 39 40 Run "make" to launch the jhalfs menuconfig interface. Select the BLFS 41 book and it version. Then set the installation directory (default 28 42 $HOME/blfs_root) and the BLFS sources directory (default blfs-xml). 29 43 … … 33 47 Installed files: 34 48 35 lib/* functions, xsl, and auto-generates dependencies tree files 49 blfs-xml/* SVN tree of the selected BLFS book version 50 lib/* functions libraries, xsl stylesheets, and auto-generated 51 meta-packages dependencies tree files 52 menu/* lxdialog and menuconfig source code 36 53 README.BLFS this file 37 54 TODO developers notes 38 packages auto-generated file with packages info 39 alternatives.conf configuration files for alternative packages 40 envars.conf envars needed when running the build scripts 41 update_book.sh update the XML book sources and regenerate packages file 42 and GNOME and KDE dependencies tree 43 blfs-parser.sh generates linear BLFS books and build scripts 44 gen-makefile.sh generates Makefile 45 progress_bar.sh the Makefile progress bar 55 update_book.sh update the XML book sources and regenerates packages 56 database and meta-packages dependencies tree 57 gen_config.sh regenerates Config.in 58 gen_pkg_book.sh solve dependencies and generates linear BLFS books 59 and build scripts 60 gen-makefile.sh generates target Makefile 61 progress_bar.sh the target Makefile progress bar 62 Makefile run gen_config.sh to update Config.in, 63 then launch the menuconfig interface, and lastly run 64 gen_pkg_book.sh based on configuration settings 65 Config.in menuconfig interface input file 66 packages auto-generated packages database 67 envars.conf envars needed when running the target build scripts 46 68 47 69 From now on, all the work must be done from inside the installation 48 70 root directory. 49 71 50 2.2 UPDATING BOOK SOURCES:: 51 If using the SVN book version, from time to time you may want to update 52 the XML sources. To do that run "./update_book.sh" 53 54 2.3 PARSING THE BOOK:: 72 3.2 UPDATING BOOK SOURCES:: 73 74 If using the development book version, and if you want to update already 75 installed packages to the new version found in that book, you need to update 76 the XML sources and packages database. 77 78 To do that run "./update_book.sh" 79 80 3.3 CONFIGURING AND PARSING THE BOOK:: (obsolete, to be rewritten) 81 55 82 Next step is to create a book and build scripts in dependencies build order 56 83 for a target package. A target package can be any of the ones listed in the … … 76 103 that uses sudo for commands that need root privileges. 77 104 78 There is also two other directories that contains files generated while 79 resolving dependencies trees. 80 81 Now is the time to review the generated book and scripts, making in the 82 scripts any changes you want to fit your needs. Scripts for additional 83 packages (i.e., for non-BLFS packages) can be inserted in an easy way. 84 85 2.4 CREATING THE MAKEFILE 105 There is also two other directories, dependencies and xincludes, that 106 contains files generated while resolving dependencies trees. 107 108 3.4 EDITING BUILD SCRIPTS 109 110 Now is the time to review the generated book and scripts, making in the 111 scripts any changes required to fix generation bugs or to fit your needs. 112 113 Scripts for additional packages (i.e., for non-BLFS packages) can be 114 inserted in an easy way due how the scripts are named. For example, if you 115 want to install the external dependency "bar" before "foo" package and the 116 "foo" script is named "064-z-foo", you need to create a "064-y-bar" build 117 script. 118 119 Note that the packages tracking system isn't a packages management tool 120 and know nothing about packages not in the BLFS book. 121 122 3.5 CREATING THE MAKEFILE 86 123 When the build scripts are ready to be run, the Makefile can be 87 124 created. Be sure that you cd into the "package" directory and run … … 92 129 93 130 94 (Text is needed for the installed packages tracking system and like) 95 96 3. GENERATED BUILD SCRIPTS ISSUES:: 131 (Text is needed about meta-packages, the installed packages tracking system 132 and like) 133 134 (The TRACKING_DIR directory must be created before using this tool running as root 135 136 install -d -m1777 /var/lib/jhalfs/BLFS ) 137 138 4. GENERATED BUILD SCRIPTS ISSUES:: 97 139 98 140 In this section known issues with the generated build scripts are 99 discussed. They are due build procedures and BLFS layout particularities100 than we can't handle. In s omecases editing the build scripts is mandatory.141 discussed. They are due build procedures and/or BLFS layout particularities 142 than we can't handle. In several cases editing the build scripts is mandatory. 101 143 You may need also to insert some build script created by you to resolve 102 unhandled dependencies and/or to remove some script and install the103 affectedpackage by hand.104 105 3.1 BLFS BOOTSCRIPTS144 unhandled dependencies and/or to remove some script installing the affected 145 package by hand. 146 147 4.1 BLFS BOOTSCRIPTS 106 148 107 149 For now, bootscripts installation will fail. You will need to edit the … … 109 151 command. That could be fixed in the future, but not sure. 110 152 111 3.2 PACKAGES CONFIGURATION153 4.2 PACKAGES CONFIGURATION 112 154 113 155 For that packages that have a "Configuration" section, you should to 114 156 edit it build script to fit the configuration to your needs. 115 157 116 3.4 PDL and Perl modules.158 4.4 PDL and Perl modules. 117 159 118 160 The generated scripts for that packages are plainly broken and can't … … 120 162 packages by hand. 121 163 122 3.4 GCC, JDK, Sane, and KDE-multimedia164 4.4 GCC, JDK, Sane, and KDE-multimedia 123 165 124 166 On the pages for that packages, the BLFS book actually have instructions … … 126 168 try to fix some of them, but may not be possible. 127 169 128 3.5 OTHERS 170 4.5 XORG7 171 172 The generated scripts for Xorg7 pseudo-packages don't have support for 173 $SRC_ARCHIVE nor MD5 checking. 174 175 If you has downloaded previously the packages, you must to edit the scripts 176 to make it to use your local packages. 177 178 Also, you will need to edit the scripts to fix the commands that must 179 be applied only to a concret individual sub-package. For example the "for" 180 loop to install xotg7-util packages may read like: 181 182 for package in $(cat $WGET_LST) ; do 183 packagedir=$(echo $package | sed 's/.tar.bz2//') 184 tar -xf $package 185 cd $packagedir 186 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && 187 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config 188 sudo sh -c "make install" 189 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config && 190 make 191 sudo sh -c "make install" 192 ./configure $XORG_CONFIG && 193 make 194 sudo sh -c "make install" 195 cd .. 196 rm -rf $packagedir 197 done 198 199 After reading the HTML page to know what commands is for what package, 200 the loop can be changed to read something like: 201 202 for package in $(cat $WGET_LST) ; do 203 packagedir=$(echo $package | sed 's/.tar.bz2//') 204 tar -xf $package 205 cd $packagedir 206 if [ ${packagedir} = "xorg-cf-files" ] ; then 207 sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl && 208 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config 209 sudo sh -c "make install" 210 elif [ ${packagedir} = "Imake" ] ; then 211 ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config && 212 make 213 sudo sh -c "make install" 214 else 215 ./configure $XORG_CONFIG && 216 make 217 sudo sh -c "make install" 218 fi 219 cd .. 220 rm -rf $packagedir 221 done 222 223 4.6 PATCHES 224 225 By default all required patches will be downloaded from the NET. 226 227 If you has downloaded previously the patches, you must to edit the scripts 228 to make it to use your local patches. 229 230 Also, be sure that all scripts have the commands to download/apply the 231 required patches. Due book layout issues some patches may be missing. 232 233 4.7 ROOT COMMANDS 234 235 If building as a normal user (the default setting) be sure that all 236 commands that need root privileges are run using sudo. 237 238 Due book layout issues some sudo command may be missing. 239 240 4.8 OTHERS 129 241 130 242 May have other issues that we are not aware on them yet. If you find -
blfs
r7bf2fdd rf4ed135 112 112 113 113 cp -r BLFS/* $BLFS_ROOT 114 cp -r menu $BLFS_ROOT 114 115 cp $COMMON_DIR/progress_bar.sh $BLFS_ROOT 115 # cp -r menu$BLFS_ROOT116 cp README.BLFS $BLFS_ROOT 116 117 117 118 # Start the work … … 120 121 # Clean-up 121 122 rm -rf libs/.svn 123 rm -rf menu/.svn 124 rm -rf menu/lxdialog/.svn 122 125 123 # Fix BLFS_XML harcoded values124 sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh125 sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl126 126 127 # Fetch book sources and create packages and GNOME/KDE dependencies files 127 # Set some harcoded envars to their proper values 128 sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh libs/book.xsl 129 sed -i 's,tracking-dir,'$TRACKING_DIR',' update_book.sh gen-makefile.sh 130 131 # Fetch book sources and create packages and meta-packages dependencies files 128 132 if [[ -d $BLFS_XML ]] ; then 129 133 ./update_book.sh 130 134 else 131 ./update_book.sh $BLFS_XML get$TREE135 ./update_book.sh get $BLFS_XML $TREE 132 136 fi 133 137 134 # Generate Config.in and run the menuconfig interfaz 135 # ./gen_config.sh 136 # make 138 # Run the menuconfig interface 139 make 137 140 -
common/func_validate_configs.sh
r7bf2fdd rf4ed135 93 93 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" 94 94 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" 95 local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML "95 local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR" 96 96 97 97 local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' … … 268 268 269 269 # BLFS params. No validation is required/allowed, IMHO 270 BRANCH_ID | BLFS_ROOT | BLFS_XML) echo "`eval echo $PARAM_VALS`" ;; 270 BRANCH_ID | BLFS_ROOT | BLFS_XML ) echo "`eval echo $PARAM_VALS`" ;; 271 TRACKING_DIR ) validate_dir -z -d -w ;; 271 272 272 273 esac
Note:
See TracChangeset
for help on using the changeset viewer.