- Timestamp:
- 05/16/2006 06:27:02 PM (18 years ago)
- Branches:
- experimental
- Children:
- 25b52e2
- Parents:
- d68d2c1
- Location:
- common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
common/common-functions
rd68d2c1 r3a27393 613 613 # Create the packages file. We need it for proper Makefile creation 614 614 rm -f packages 615 case "${PROGNAME}" in 616 clfs) 617 echo -n "Creating <${PROGNAME}> specific packages file" 618 grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \ 619 -e 's@">@"@' \ 620 -e '/generic/d' > packages 621 echo " ...OK" 622 ;; 623 624 hlfs) 625 echo -n "Creating <${PROGNAME}> specific packages file" 626 grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \ 627 -e 's@">@"@' \ 628 -e '/generic/d' >> packages 629 echo " ...OK" 630 ;; 631 632 lfs) 633 echo -n "Creating <${PROGNAME}> specific packages file" 634 grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \ 635 -e 's@">@"@' \ 636 -e '/generic/d' >> packages 637 echo " ...OK" 638 ;; 639 esac 615 if [[ "${PROGNAME}" != "blfs" ]] ; then 616 echo -n "Creating <${PROGNAME}> specific packages file" 617 grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \ 618 -e 's@">@"@' > packages 619 echo " ...OK" 620 fi 640 621 641 622 # Done. Moving on... … … 660 641 cd $BUILDDIR/sources 661 642 [[ -f MD5SUMS ]] && rm MD5SUMS 662 [[ -f MD5SUMS-$VERSION ]] && rm MD5SUMS-$VERSION663 643 [[ -f MISSING_FILES.DMP ]] && rm MISSING_FILES.DMP 664 644 [[ -f urls.lst ]] && rm urls.lst 665 666 # Download a fresh MD5SUMS file667 wget $SERVER/pub/lfs/conglomeration/MD5SUMS668 645 669 646 # Generate URLs file … … 682 659 [[ "$VIMLANG" = "0" ]] && continue 683 660 ;; 661 *linux/linux-* ) 662 [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && continue 663 ;; 684 664 esac 685 665 … … 690 670 BOOKMD5=`echo $line | cut -d" " -f3` # MD5 book value 691 671 692 if [[ x"$BOOKMD5" != "x" ]]; then 693 HAVEMD5=1 694 MD5="$BOOKMD5 $FILE" 695 else 696 # Find the md5 sum for this package in the server MD5SUMS file. 697 set +e 698 HAVEMD5=1 # Always assume we have a MD5SUM 699 MD5=`grep " $FILE" MD5SUMS` 700 if [ $? -ne 0 ]; then 701 set -e 702 gs_wrt_message "$FILE not found in MD5SUMS" 703 # IMPORTANT:: There is no MD5SUM for this file. 704 HAVEMD5=0 705 fi 706 fi 672 # Validation pair 673 MD5="$BOOKMD5 $FILE" 674 HAVEMD5=1 707 675 708 676 set -e … … 718 686 echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE}${OFF}" 719 687 fromARCHIVE=0 720 # If the file does not exist in /sources download a fresh one688 # If the file does not exist yet in /sources download a fresh one 721 689 if [ ! -f $FILE ] ; then 722 690 if ! wget $URL1 && ! wget $URL2 ; then … … 727 695 fi 728 696 729 # Is there a MD5SUM to validate the file against. 730 if [[ "$HAVEMD5" = "1" ]] ; then 731 # IF the md5sum does not match the existing files 732 if ! echo "$MD5" | md5sum -c - >/dev/null ; then 733 [[ $fromARCHIVE = "1" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match SRC_ARCHIVE copy${OFF}" 734 [[ $fromARCHIVE = "0" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match REMOTE copy${OFF}" 735 # Remove the old file and download a new one 736 rm -fv $FILE 737 # Force generation of MD5SUM and storage in SRC_ARCHIVE 738 fromARCHIVE=0; 739 # Try and retrieve the file. Servers in reverse order. 740 if ! wget $URL2 && ! wget $URL1 ; then 741 gs_wrt_message "$FILE not found on the servers.. SKIPPING" 742 continue 743 fi 697 # IF the md5sum does not match the existing files 698 if ! echo "$MD5" | md5sum -c - >/dev/null ; then 699 [[ $fromARCHIVE = "1" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match SRC_ARCHIVE copy${OFF}" 700 [[ $fromARCHIVE = "0" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match REMOTE copy${OFF}" 701 # Remove the old file and download a new one 702 rm -fv $FILE 703 # Force storage in SRC_ARCHIVE 704 fromARCHIVE=0; 705 # Try to retrieve again the file. Servers in reverse order. 706 if ! wget $URL2 && ! wget $URL1 ; then 707 gs_wrt_message "$FILE not found on the servers.. SKIPPING" 708 continue 744 709 fi 745 710 fi 746 711 747 712 # Validate the MD5SUM one last time 748 if [[ "$HAVEMD5" = "1" ]] &&! echo "$MD5" | md5sum -c - >/dev/null ; then713 if ! echo "$MD5" | md5sum -c - >/dev/null ; then 749 714 gs_wrt_message "$FILE does not match MD5SUMS value" 750 715 # Force generation of MD5SUM … … 755 720 if [[ "$HAVEMD5" = "0" ]] ; then 756 721 echo "${BOLD}${YELLOW}Generating a new MD5SUM for ${OFF}$FILE" 757 echo "NEW MD5SUM $(md5sum $FILE)" >> MISSING_FILES.DMP722 echo "NEW MD5SUM: $(md5sum $FILE)" >> MISSING_FILES.DMP 758 723 fi 759 724 760 725 # Good or bad we write the original md5sum to a file 761 echo "$MD5" >> MD5SUMS -$VERSION726 echo "$MD5" >> MD5SUMS 762 727 763 728 # Copy the freshly downloaded file -
common/config
rd68d2c1 r3a27393 61 61 62 62 #--- set default timezone. 63 TIMEZONE= GMT63 TIMEZONE=${TZ:-GMT} 64 64 65 65 #--- install the optional vim-lang package 0(no)/1(yes) -
common/func_validate_configs.sh
rd68d2c1 r3a27393 170 170 # This is a tricky little piece of code.. executes a cmd string. 171 171 case $config_param in 172 BUILDDIR) # We cannot have an <empty> or </> root mount point173 echo -e "`eval echo $PARAM_VALS`"174 [[ "xx x/x" =~ "x${!config_param}x" ]] &&175 write_error_and_die176 ;;177 172 TIMEZONE) echo -e "`eval echo $PARAM_VALS`" ;; 178 173 … … 228 223 # warning -z+ -w+ 229 224 SRC_ARCHIVE) validate_dir -z+ -d -w+ ;; 225 BUILDDIR) # The build directory/partition MUST exist and be writable by the user 226 validate_dir -z -d -w 227 [[ "xx x/x" =~ "x${!config_param}x" ]] && 228 write_error_and_die 229 ;; 230 230 231 231 # Validate files, testable states: -
common/urls.xsl
rd68d2c1 r3a27393 55 55 <xsl:text>/pub/lfs/conglomeration/</xsl:text> 56 56 <xsl:choose> 57 <!-- Fix some directories. Test against dirname to be sure that we 58 are matching the start of a package name, not a string in a patch name --> 57 <!-- Fix some directories. Test against $dirname to be sure that we 58 are matching the start of a package name, not a string in a patch name 59 But some packages requires test against $package. --> 59 60 <xsl:when test="contains($dirname, 'bash')"> 60 61 <xsl:text>bash/</xsl:text> 62 </xsl:when> 63 <xsl:when test="contains($package, 'dvhtool')"> 64 <xsl:text>dvhtool/</xsl:text> 61 65 </xsl:when> 62 66 <xsl:when test="contains($dirname, 'gcc')"> … … 66 70 <xsl:text>glibc/</xsl:text> 67 71 </xsl:when> 68 <xsl:when test="contains($dirname, 'tcl')"> 72 <xsl:when test="contains($package, 'powerpc-utils')"> 73 <xsl:text>powerpc-utils/</xsl:text> 74 </xsl:when> 75 <xsl:when test="contains($package, 'tcl')"> 69 76 <xsl:text>tcl/</xsl:text> 70 77 </xsl:when>
Note:
See TracChangeset
for help on using the changeset viewer.