- 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
- Location:
- BLFS
- Files:
-
- 3 added
- 2 deleted
- 8 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
Note:
See TracChangeset
for help on using the changeset viewer.