Ignore:
Timestamp:
Jul 3, 2009, 6:37:39 PM (15 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
03e0e3d
Parents:
392a73c
Message:

Updated eglibc fetch script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/fetch/eglibc.sh

    r392a73c r65a1d51  
    2020rm -rf ~/tmp
    2121
     22# Set Patch Directory
     23#
     24PATCH_DIR=$(pwd -P)/eglibc
     25
    2226# Get Current Eglibc from SVN
    2327#
     
    2529cd ~/tmp
    2630FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
    27 DL_REVISION=$(svn info svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} | grep -i "Last Changed Rev" | cut -f2 -d: | sed -e 's/ //g')
     31DL_REVISION=$(svn info svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} | grep "Last Changed Rev" | cut -f2 -d: | sed -e 's/ //g')
    2832echo "Retreiving Revision #${DL_REVISION} from SVN eglibc-${SOURCEVERSION}..."
    2933svn export -r ${DL_REVISION} svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} eglibc-${SOURCEVERSION}
     
    3943# Customize the version string, so we know it's patched
    4044#
     45install -d ~/tmp/eglibc-${SOURCEVERSION}
    4146cd ~/tmp/eglibc-${SOURCEVERSION}
    4247DL_DATE=$(date +%Y%m%d)
     
    8691tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata' libio/Makefile
    8792
     93# Apply Patches from directories
     94#
     95cd ~/tmp/eglibc-${SOURCEVERSION}/libc
     96if [ -e ${PATCH_DIR}/${VERSION} ]; then
     97  PATCH_FILES=$(ls ${PATCH_DIR}/${VERSION}/*.patch)
     98  if [ "${PATCH_FILES}" != "" ]; then
     99    for pfile in ${PATCH_FILES}; do
     100      echo "Applying - ${pfile}..."
     101      for pvalue in $(seq 0 5); do
     102        patch --dry-run -Np${pvalue} -i ${pfile} > /dev/null 2>&1
     103        if [ "${?}" = "0" ]; then
     104          PVALUE=${pvalue}
     105          break
     106        fi
     107      done
     108      if [ "${PVALUE}" != "" ]; then
     109        patch -Np${PVALUE} -i ${pfile}
     110      else
     111        echo "Patch: ${pfile} Failed to Apply..."
     112        exit 255
     113      fi
     114    done
     115  fi
     116fi
     117
     118# Cleanup Directory
     119#
     120for dir in $(find * -type d); do
     121  cd ~/tmp/eglibc-${SOURCEVERSION}/libc
     122  for file in $(find . -name '*~'); do
     123    rm -f ${file}
     124  done
     125  for file in $(find . -name '*.orig'); do
     126    rm -f ${file}
     127  done
     128  for file in $(find . -name '*.rej'); do
     129    rm -f ${file}
     130  done
     131done
     132cd ~/tmp/eglibc-${SOURCEVERSION}/libc
     133rm -rf *.orig *~ *.rej
     134
    88135# Create Patch
    89136#
    90137cd ~/tmp/eglibc-${SOURCEVERSION}
    91 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" >  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    92 echo "Date: `date +%m-%d-%Y`" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    93 echo "Initial Package Version: ${SOURCEVERSION}" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    94 echo "Origin: Upstream" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    95 echo "Upstream Status: Applied" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    96 echo "Description: These are fixes eglibc-${SOURCEVERSION}, and should be" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    97 echo "             rechecked periodically." >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    98 echo "" >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    99 diff -Naur libc.orig libc >>  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
    100 echo "Created  ~/public_html/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch."
     138install -d ~/patches/
     139echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" >  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     140echo "Date: `date +%m-%d-%Y`" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     141echo "Initial Package Version: ${SOURCEVERSION}" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     142echo "Origin: Upstream" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     143echo "Upstream Status: Applied" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     144echo "Description: These are fixes eglibc-${SOURCEVERSION}, and should be" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     145echo "             rechecked periodically." >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     146echo "" >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     147diff -Naur libc.orig libc >>  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch
     148echo "Created  ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch."
    101149
    102150# Remove Patched Copy
     
    109157#
    110158cd ~/tmp/eglibc-${SOURCEVERSION}
     159install -d ~/packages
    111160echo "Creating Tarball for Eglibc Ports ${SOURCEVERSION}...."
    112 tar cjf ~/public_html/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports
     161tar cjf ~/packages/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports
    113162rm -rf ports
    114163echo "Creating Tarball for Eglibc Linuxthreads ${SOURCEVERSION}...."
    115 tar cjf ~/public_html/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads
     164tar cjf ~/packages/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads
    116165rm -rf linuxthreads
    117166echo "Creating Tarball for Eglibc LocaleDef ${SOURCEVERSION}...."
    118 tar cjf ~/public_html/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef
     167tar cjf ~/packages/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef
    119168rm -rf localedef
    120169mv libc eglibc-${SOURCEVERSION}
    121170echo "Creating Tarball for Eglibc ${SOURCEVERSION}...."
    122 tar cjf ~/public_html/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION}
     171tar cjf ~/packages/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION}
    123172
    124173# Clean up Directores
     
    126175cd ~/tmp
    127176rm -rf eglibc-${SOURCEVERSION}
    128 
Note: See TracChangeset for help on using the changeset viewer.