- Timestamp:
- Jul 3, 2009, 8:48:04 PM (15 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- fd54d80
- Parents:
- 2cca6fd (diff), 03e0e3d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- scripts
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/fetch/eglibc.sh
r2cca6fd r3c32719 20 20 rm -rf ~/tmp 21 21 22 # Set Patch Directory 23 # 24 PATCH_DIR=$(pwd -P)/eglibc 25 22 26 # Get Current Eglibc from SVN 23 27 # … … 25 29 cd ~/tmp 26 30 FIXEDVERSION=$(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')31 DL_REVISION=$(svn info svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} | grep "Last Changed Rev" | cut -f2 -d: | sed -e 's/ //g') 28 32 echo "Retreiving Revision #${DL_REVISION} from SVN eglibc-${SOURCEVERSION}..." 29 33 svn export -r ${DL_REVISION} svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} eglibc-${SOURCEVERSION} … … 39 43 # Customize the version string, so we know it's patched 40 44 # 45 install -d ~/tmp/eglibc-${SOURCEVERSION} 41 46 cd ~/tmp/eglibc-${SOURCEVERSION} 42 47 DL_DATE=$(date +%Y%m%d) … … 86 91 tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata' libio/Makefile 87 92 93 # Apply Patches from directories 94 # 95 cd ~/tmp/eglibc-${SOURCEVERSION}/libc 96 if [ -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 116 fi 117 118 # Cleanup Directory 119 # 120 for 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 131 done 132 cd ~/tmp/eglibc-${SOURCEVERSION}/libc 133 rm -rf *.orig *~ *.rej 134 88 135 # Create Patch 89 136 # 90 137 cd ~/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." 138 install -d ~/patches/ 139 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 140 echo "Date: `date +%m-%d-%Y`" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 141 echo "Initial Package Version: ${SOURCEVERSION}" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 142 echo "Origin: Upstream" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 143 echo "Upstream Status: Applied" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 144 echo "Description: These are fixes eglibc-${SOURCEVERSION}, and should be" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 145 echo " rechecked periodically." >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 146 echo "" >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 147 diff -Naur libc.orig libc >> ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch 148 echo "Created ~/patches/eglibc-${SOURCEVERSION}-fixes-${PATCH_NUM}.patch." 101 149 102 150 # Remove Patched Copy … … 109 157 # 110 158 cd ~/tmp/eglibc-${SOURCEVERSION} 159 install -d ~/packages 111 160 echo "Creating Tarball for Eglibc Ports ${SOURCEVERSION}...." 112 tar cjf ~/p ublic_html/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports161 tar cjf ~/packages/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports 113 162 rm -rf ports 114 163 echo "Creating Tarball for Eglibc Linuxthreads ${SOURCEVERSION}...." 115 tar cjf ~/p ublic_html/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads164 tar cjf ~/packages/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads 116 165 rm -rf linuxthreads 117 166 echo "Creating Tarball for Eglibc LocaleDef ${SOURCEVERSION}...." 118 tar cjf ~/p ublic_html/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef167 tar cjf ~/packages/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef 119 168 rm -rf localedef 120 169 mv libc eglibc-${SOURCEVERSION} 121 170 echo "Creating Tarball for Eglibc ${SOURCEVERSION}...." 122 tar cjf ~/p ublic_html/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION}171 tar cjf ~/packages/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION} 123 172 124 173 # Clean up Directores … … 126 175 cd ~/tmp 127 176 rm -rf eglibc-${SOURCEVERSION} 128 -
scripts/patch/bash-patch.sh
r2cca6fd r3c32719 16 16 # Get the # of Patches 17 17 # 18 cd /usr/src 18 install -d ~/tmp 19 cd ~/tmp 19 20 wget ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}-patches/ --no-remove-listing 20 21 VERSION2=$(echo ${VERSION} | sed -e 's/\.//g') … … 33 34 # Set Patch Number 34 35 # 35 cd /usr/src36 cd ~/tmp 36 37 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 37 38 PATCH_NUM=$(cat index.html | grep bash | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 41 42 # Cleanup Directory 42 43 # 44 cd ~/tmp 43 45 rm -rf bash-${VERSION} bash-${VERSION}.orig 44 46 tar xvf bash-${VERSION}.tar.gz 45 47 cp -ar bash-${VERSION} bash-${VERSION}.orig 46 cd bash-${VERSION}47 CURRENTDIR=$(pwd -P)48 48 49 49 # Download and Apply Patches 50 50 # 51 install -d ~/tmp/bash-${VERSION}-patches 52 cd ~/tmp/bash-${VERSION} 53 CURRENTDIR=$(pwd -P) 51 54 PATCHURL=ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}-patches 52 mkdir /tmp/bash-${VERSION}53 55 COUNT=1 54 56 while [ ${COUNT} -le ${FILES} ]; do 55 cd /tmp/bash-${VERSION}57 cd ~/tmp/bash-${VERSION} 56 58 DLCOUNT="${COUNT}" 57 59 SKIPME=no … … 71 73 if [ "${SKIPME}" != "yes" ]; then 72 74 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 75 cd ~/tmp/bash-${VERSION}-patches 73 76 wget --quiet ${PATCHURL}/bash${VERSION2}-${DLCOUNT} 74 77 fi 75 78 cd ${CURRENTDIR} 76 patch --dry-run -s -f -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}79 patch --dry-run -s -f -Np0 -i ~/tmp/bash-${VERSION}-patches/bash${VERSION2}-${DLCOUNT} 77 80 if [ "$?" = "0" ]; then 78 81 echo "Patch bash${VERSION2}-${DLCOUNT} applied" 79 patch -s -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}82 patch -s -Np0 -i ~/tmp/bash-${VERSION}-patches/bash${VERSION2}-${DLCOUNT} 80 83 else 81 84 echo "Patch bash${VERSION2}-${DLCOUNT} not applied" 82 rm -f /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}85 rm -f ~/tmp/bash-${VERSION}-patches/bash${VERSION2}-${DLCOUNT} 83 86 SKIPPED="${SKIPPED} ${DLCOUNT}" 84 87 fi … … 89 92 # Cleanup Directory 90 93 # 91 94 cd ~/tmp/bash-${VERSION} 92 95 for dir in $(find * -type d); do 93 cd /usr/src/bash-${VERSION}/${dir}96 cd ~/tmp/bash-${VERSION}/${dir} 94 97 for file in $(find . -name '*~'); do 95 98 rm -f ${file} … … 99 102 done 100 103 done 101 cd /usr/src/bash-${VERSION}104 cd ~/tmp/bash-${VERSION} 102 105 rm -f *~ *.orig 103 106 104 107 # Create Patch 105 108 # 106 cd /usr/src 107 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > bash-${VERSION}-branch_update-${PATCH_NUM}.patch 108 echo "Date: `date +%m-%d-%Y`" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Initial Package Version: ${VERSION}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo "Origin: Upstream" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Upstream Status: Applied" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 112 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 109 cd ~/tmp 110 install -d ~/patches 111 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 112 echo "Date: `date +%m-%d-%Y`" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Initial Package Version: ${VERSION}" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo "Origin: Upstream" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 115 echo "Upstream Status: Applied" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 116 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 113 117 if [ -n "${SKIPPED}" ]; then 114 echo " The following patches were skipped" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch115 echo " ${SKIPPED}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch118 echo " The following patches were skipped" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 119 echo " ${SKIPPED}" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 116 120 fi 117 echo "" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 118 diff -Naur bash-${VERSION}.orig bash-${VERSION} >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch 119 echo "Created /usr/src/bash-${VERSION}-branch_update-${PATCH_NUM}.patch." 121 echo "" >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 122 diff -Naur bash-${VERSION}.orig bash-${VERSION} >> ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch 123 echo "Created ~/patches/bash-${VERSION}-branch_update-${PATCH_NUM}.patch." 124 125 # Cleanup Directory 126 # 127 cd ~/tmp 128 rm -rf bash-${VERSION} bash-${VERSION}.orig -
scripts/patch/binutils-patch.sh
r2cca6fd r3c32719 19 19 # Download Binutils Source 20 20 # 21 cd /usr/src 21 install -d ~/tmp 22 cd ~/tmp 22 23 if ! [ -e binutils-${SOURCEVERSION}.tar.bz2 ]; then 23 24 wget ftp://ftp.gnu.org/gnu/binutils/binutils-${SOURCEVERSION}.tar.bz2 … … 26 27 # Set Patch Number 27 28 # 28 cd /usr/src29 cd ~/tmp 29 30 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 30 31 PATCH_NUM=$(cat index.html | grep binutils | grep "${SOURCEVERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) 31 32 PATCH_NUM=$(expr ${PATCH_NUM} + 1) 33 PATCH_NUM2=$(cat index.html | grep binutils | grep "${SOURCEVERSION}" | grep fixes | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) 34 PATCH_NUM2=$(expr ${PATCH_NUM2} + 1) 32 35 rm -f index.html 33 36 34 37 # Cleanup Directory 35 38 # 39 cd ~/tmp 36 40 rm -rf binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig 37 41 tar xvf binutils-${SOURCEVERSION}.tar.bz2 38 mv binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig39 CURRENTDIR=$(pwd -P)40 42 41 43 # Get Current Updates from CVS 42 44 # 43 cd /usr/src 45 cd ~/tmp 46 mv binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig 47 CURRENTDIR=$(pwd -P) 44 48 FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g') 45 49 cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src export -rbinutils-${FIXEDVERSION}-branch binutils … … 48 52 # Cleanup 49 53 # 54 cd ~/tmp 50 55 DIRS="binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig" 51 56 for DIRECTORY in ${DIRS}; do 52 cd /usr/src/${DIRECTORY}57 cd ~/tmp/${DIRECTORY} 53 58 FILE_LIST=".cvsignore *.gmo" 54 59 for files in ${FILE_LIST}; do … … 66 71 cd .. 67 72 done 68 cd /usr/src/binutils-${SOURCEVERSION}69 rm -f /usr/src/binutils-${SOURCEVERSION}.orig/md5.sum73 cd ~/tmp/binutils-${SOURCEVERSION} 74 rm -f ~/tmp/binutils-${SOURCEVERSION}.orig/md5.sum 70 75 71 76 # Make Binutils a Release 72 77 # 73 cd /usr/src/binutils-${SOURCEVERSION}78 cd ~/tmp/binutils-${SOURCEVERSION} 74 79 sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.am 75 80 sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.in … … 77 82 # Customize the version string, so we know it's patched 78 83 # 79 cd /usr/src/binutils-${SOURCEVERSION}84 cd ~/tmp/binutils-${SOURCEVERSION} 80 85 DATE_STAMP=$(date +%Y%m%d) 81 cd /usr/src/binutils-${SOURCEVERSION}86 cd ~/tmp/binutils-${SOURCEVERSION} 82 87 sed -i "s:@PKGVERSION@:(GNU Binutils for Cross-LFS) :" bfd/Makefile.in 83 88 sed -i "s:^[[:space:]]VERSION=\(.*\)$: VERSION=\1.${DATE_STAMP}:g" bfd/configure … … 85 90 # Create Patch 86 91 # 87 cd /usr/src 88 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 89 echo "Date: `date +%m-%d-%Y`" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 90 echo "Initial Package Version: ${SOURCEVERSION}" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 91 echo "Origin: Upstream" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 92 echo "Upstream Status: Applied" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 93 echo "Description: This is a branch update for binutils-${SOURCEVERSION}, and should be" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 94 echo " rechecked periodically." >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 95 echo "" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 96 echo "This patch was created on ${DATE_STAMP}" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 97 echo "" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 98 diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 99 echo "Created /usr/src/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch." 92 cd ~/tmp 93 install -d ~/patches 94 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 95 echo "Date: `date +%m-%d-%Y`" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 96 echo "Initial Package Version: ${SOURCEVERSION}" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 97 echo "Origin: Upstream" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 98 echo "Upstream Status: Applied" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 99 echo "Description: This is a branch update for binutils-${SOURCEVERSION}, and should be" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 100 echo " rechecked periodically." >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 101 echo "" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 102 echo "This patch was created on ${DATE_STAMP}" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 103 echo "" >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 104 diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch 105 echo "Created ~/patches/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch." 100 106 101 107 # Cleanliness is the name of my game! 102 108 # 103 109 unset DATE_STAMP 110 111 # Create Another Copy to create fixes patch 112 # 113 cd ~/tmp 114 if [ -e ${PATCH_DIR}/${VERSION} ]; then 115 rm -rf binutils-${SOURCEVERSION}.orig 116 cp -ar binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig 117 118 # Apply Patches from directories 119 # 120 cd ~/tmp/binutils-${SOURCEVERSION} 121 PATCH_FILES=$(ls ${PATCH_DIR}/${VERSION}/*.patch) 122 if [ "${PATCH_FILES}" != "" ]; then 123 for pfile in ${PATCH_FILES}; do 124 echo "Applying - ${pfile}..." 125 for pvalue in $(seq 0 5); do 126 patch --dry-run -Np${pvalue} -i ${pfile} > /dev/null 2>&1 127 if [ "${?}" = "0" ]; then 128 PVALUE=${pvalue} 129 break 130 fi 131 done 132 if [ "${PVALUE}" != "" ]; then 133 patch -Np${PVALUE} -i ${pfile} 134 else 135 echo "Patch: ${pfile} Failed to Apply..." 136 exit 255 137 fi 138 done 139 fi 140 141 # Cleanup Directory 142 # 143 cd ~/tmp/binutils-${SOURCEVERSION} 144 rm -f $(find * -name "*~") 145 rm -f $(find * -name "*.orig") 146 rm -f $(find * -name "*.rej") 147 rm -f *.orig *~ *.rej 148 149 # Create Patch 150 # 151 cd ~/tmp 152 install -d ~/patches 153 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 154 echo "Date: `date +%m-%d-%Y`" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 155 echo "Initial Package Version: ${VERSION}" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 156 echo "Origin: Upstream" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 157 echo "Upstream Status: Applied" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 158 echo "Description: This Patch contains fixes for binutils-${SOURCEVERSION}, and should be" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 159 echo " rechecked periodically." >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 160 echo "" >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 161 diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch 162 echo "Created ~/patches/binutils-${SOURCEVERSION}-fixes-${PATCH_NUM2}.patch." 163 fi 164 165 # Cleanup Directory 166 # 167 cd ~/tmp 168 rm -rf binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig -
scripts/patch/gcc-patch.sh
r2cca6fd r3c32719 20 20 # Download GCC Source 21 21 # 22 cd /usr/src 22 install -d ~/tmp 23 cd ~/tmp 23 24 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 24 25 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 … … 27 28 # Set Patch Number 28 29 # 29 cd /usr/src30 cd ~/tmp 30 31 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing > /dev/null 2>&1 31 32 PATCH_NUM=$(cat index.html | grep gcc | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 37 38 # Cleanup Directory 38 39 # 40 cd ~/tmp 39 41 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 40 42 tar xvf gcc-${VERSION}.tar.bz2 41 43 mv gcc-${VERSION} gcc-${VERSION}.orig 42 CURRENTDIR=$(pwd -P)43 44 44 45 # Get Current Updates from SVN 45 46 # 46 cd /usr/src47 cd ~/tmp 47 48 NUM1=$(echo ${VERSION} | cut -f1 -d.) 48 49 NUM2=$(echo ${VERSION} | cut -f2 -d.) … … 53 54 # Add a custom version string 54 55 # 56 cd ~/tmp 55 57 DATE_STAMP=$(cat gcc-${VERSION}/gcc/DATESTAMP) 56 58 echo "${VERSION}" > gcc-${VERSION}/gcc/BASE-VER … … 59 61 # Cleanup 60 62 # 63 cd ~/tmp 61 64 DIRS="gcc-${VERSION} gcc-${VERSION}.orig" 62 65 for DIRECTORY in ${DIRS}; do 63 cd ${DIRECTORY}66 cd ~/tmp/${DIRECTORY} 64 67 REMOVE="ABOUT-NLS COPYING COPYING.LIB MAINTAINERS Makefile.def 65 68 Makefile.in Makefile.tpl README README.SCO BUGS FAQ LAST_UPDATED 66 69 MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DEV-PHASE 67 gcc/f/BUGS gcc/f/NEWS gcc/c-parse.c gcc/gengtype-lex.c gcc/c-parse.y 68 gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/java/parse-scan.c 69 gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y 70 libjava/classpath/doc/cp-tools.info" 70 gcc/f/BUGS gcc/f/NEWS gcc/gengtype-lex.c" 71 71 for file in ${REMOVE}; do 72 72 rm -f $file 73 73 done 74 74 for file in $(find . -name "ChangeLog*" | sed -e 's@./@@'); do 75 rm -f ${file}75 rm -fv ${file} 76 76 done 77 rm -rf INSTALL 78 rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7} 79 rm -f gcc/po/*.{gmo,po} libcpp/po/*.{gmo,po} libgomp/*.{1,info,7} 80 rm -f libjava/classpath/doc/*.{1,info} 81 cd .. 77 REMVOVE_DIRS="INSTALL" 78 for dir in ${REMOVE_DIRS}; do 79 rm -rfv ${dir} 80 done 81 rm -fv fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7} gcc/po/*.{gmo,po} 82 rm -rf libcpp/po/*.{gmo,po} libgomp/*.{1,info,7} libjava/classpath/doc/*.{1,info} 83 cd .. 82 84 done 83 85 84 86 # Create Patch 85 87 # 86 cd /usr/src 87 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 88 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 89 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 90 echo "Origin: Upstream" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 91 echo "Upstream Status: Applied" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 92 echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 93 echo " rechecked periodically." >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 94 echo "" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 95 echo "This patch was made from Revision # ${REVISION}." >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 96 echo "" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 97 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 98 echo "Created /usr/src/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch." 88 cd ~/tmp 89 install -d ~/patches 90 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 91 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 92 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 93 echo "Origin: Upstream" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 94 echo "Upstream Status: Applied" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 95 echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 96 echo " rechecked periodically." >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 97 echo "" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 98 echo "This patch was made from Revision # ${REVISION}." >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 99 echo "" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 100 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 101 echo "Created ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch." 99 102 100 103 # Create Another Copy to create fixes patch 101 104 # 102 cd /usr/src 103 rm -rf gcc-${VERSION}.orig 104 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 105 cd ~/tmp 106 if [ -e ${PATCH_DIR}/${VERSION} ]; then 107 rm -rf gcc-${VERSION}.orig 108 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 105 109 106 # Apply Patches from directories 107 # 108 cd /usr/src/gcc-${VERSION} 109 if [ -e ${PATCH_DIR}/${VERSION} ]; then 110 # Apply Patches from directories 111 # 112 cd ~/tmp/gcc-${VERSION} 110 113 PATCH_FILES=$(ls ${PATCH_DIR}/${VERSION}/*.patch) 111 114 if [ "${PATCH_FILES}" != "" ]; then … … 127 130 done 128 131 fi 132 133 # Cleanup Directory 134 # 135 cd ~/tmp/gcc-${VERSION} 136 rm -f $(find * -name "*~") 137 rm -f $(find * -name "*.orig") 138 rm -f $(find * -name "*.rej") 139 rm -f *.orig *~ *.rej 140 141 # Create Patch 142 # 143 cd ~/tmp 144 install -d ~/patches 145 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 146 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 147 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 148 echo "Origin: Upstream" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 149 echo "Upstream Status: Applied" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 150 echo "Description: This Patch contains fixes for gcc-${VERSION}, and should be" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 151 echo " rechecked periodically." >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 152 echo "" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 153 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 154 echo "Created ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch." 129 155 fi 130 156 131 157 # Cleanup Directory 132 158 # 133 134 for dir in $(find * -type d); do 135 cd /usr/src/gcc-${VERSION}/${dir} 136 for file in $(find . -name '*~'); do 137 rm -f ${file} 138 done 139 for file in $(find . -name '*.orig'); do 140 rm -f ${file} 141 done 142 for file in $(find . -name '*.rej'); do 143 rm -f ${file} 144 done 145 done 146 cd /usr/src/gcc-${VERSION}/ 147 rm -rf *.orig *~ *.rej 148 149 # Create Patch 150 # 151 cd /usr/src 152 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 153 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 154 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 155 echo "Origin: Upstream" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 156 echo "Upstream Status: Applied" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 157 echo "Description: This Patch contains fixes for gcc-${VERSION}, and should be" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 158 echo " rechecked periodically." >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 159 echo "" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 160 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 161 echo "Created /usr/src/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch." 159 cd ~/tmp 160 rm -rf gcc-${VERSION} gcc-${VERSION}.orig -
scripts/patch/gcc-specs-patch.sh
r2cca6fd r3c32719 16 16 # Download GCC Source 17 17 # 18 cd /usr/src18 cd ~/tmp 19 19 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 20 20 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 … … 23 23 # Cleanup Directory 24 24 # 25 cd ~/tmp 25 26 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 26 27 tar xvf gcc-${VERSION}.tar.bz2 27 28 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 28 CURRENTDIR=$(pwd -P)29 29 30 30 # Modify the Data 31 31 # 32 cd /usr/src/gcc-${VERSION}32 cd ~/tmp/gcc-${VERSION} 33 33 for file in $(find gcc/config -name "*.h"); do 34 34 if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then … … 53 53 # Create Patch 54 54 # 55 cd /usr/src 56 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-specs-x.patch 57 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-specs-x.patch 58 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-specs-x.patch 59 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-specs-x.patch 60 echo " the Pure LFS project." >> gcc-${VERSION}-specs-x.patch 61 echo "Upstream Status: Not Applied" >> gcc-${VERSION}-specs-x.patch 62 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-specs-x.patch 63 echo "" >> gcc-${VERSION}-specs-x.patch 64 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-specs-x.patch 55 cd ~/tmp 56 install -d ~/patches 57 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-specs-x.patch 58 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-specs-x.patch 59 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-specs-x.patch 60 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-specs-x.patch 61 echo " the Pure LFS project." >> ~/patches/gcc-${VERSION}-specs-x.patch 62 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-specs-x.patch 63 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-specs-x.patch 64 echo "" >> ~/patches/gcc-${VERSION}-specs-x.patch 65 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-specs-x.patch 65 66 66 67 # Cleanup Directory 67 68 # 69 cd ~/tmp 68 70 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 69 71 tar xvf gcc-${VERSION}.tar.bz2 70 72 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 71 CURRENTDIR=$(pwd -P)72 73 73 74 # Modify the Data 74 75 # 75 cd /usr/src/gcc-${VERSION}76 cd ~/tmp/gcc-${VERSION} 76 77 for file in $(find gcc/config -name "*.h"); do 77 78 if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then … … 98 99 # Create Patch 99 100 # 100 cd /usr/src 101 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64_specs-x.patch 102 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64_specs-x.patch 103 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64_specs-x.patch 104 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64_specs-x.patch 105 echo " the Pure LFS project." >> gcc-${VERSION}-pure64_specs-x.patch 106 echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64_specs-x.patch 107 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64_specs-x.patch 108 echo "" >> gcc-${VERSION}-pure64_specs-x.patch 109 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64_specs-x.patch 101 cd ~/tmp 102 install -d ~/patches 103 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-pure64_specs-x.patch 104 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 105 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 106 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 107 echo " the Pure LFS project." >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 108 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 109 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 110 echo "" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 111 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch 110 112 111 113 # Cleanup Directory 112 114 # 115 cd ~/tmp 113 116 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 114 117 tar xvf gcc-${VERSION}.tar.bz2 … … 118 121 # Modify the Data 119 122 # 120 cd /usr/src/gcc-${VERSION}123 cd ~/tmp/gcc-${VERSION} 121 124 for file in $(find gcc/config -name "*.h"); do 122 125 if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then … … 151 154 # Create Patch 152 155 # 153 cd /usr/src 154 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64-x.patch 155 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64-x.patch 156 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64-x.patch 157 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64-x.patch 158 echo " the Pure LFS project." >> gcc-${VERSION}-pure64-x.patch 159 echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64-x.patch 160 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64-x.patch 161 echo "" >> gcc-${VERSION}-pure64-x.patch 162 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64-x.patch 156 cd ~/tmp 157 install -d ~/patches 158 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-pure64-x.patch 159 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-pure64-x.patch 160 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-pure64-x.patch 161 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-pure64-x.patch 162 echo " the Pure LFS project." >> ~/patches/gcc-${VERSION}-pure64-x.patch 163 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-pure64-x.patch 164 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-pure64-x.patch 165 echo "" >> ~/patches/gcc-${VERSION}-pure64-x.patch 166 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-pure64-x.patch 163 167 164 echo "Created /usr/src/gcc-${VERSION}-specs-x.patch." 165 echo "Created /usr/src/gcc-${VERSION}-pure64_specs-x.patch." 166 echo "Created /usr/src/gcc-${VERSION}-pure64-x.patch." 168 echo "Created ~/patches/gcc-${VERSION}-specs-x.patch." 169 echo "Created ~/patches/gcc-${VERSION}-pure64_specs-x.patch." 170 echo "Created ~/patches/gcc-${VERSION}-pure64-x.patch." 171 172 # Cleanup Directory 173 # 174 cd ~/tmp 175 rm -rf gcc-${VERSION} gcc-${VERSION}.orig -
scripts/patch/ncurses-patch.sh
r2cca6fd r3c32719 16 16 # Get Patch Names 17 17 # 18 cd /usr/src18 cd ~/tmp 19 19 wget ftp://invisible-island.net/ncurses/${VERSION}/ --no-remove-listing 20 20 ROLLUP=$(cat index.html | grep bz2 | cut -f2 -d'>' | cut -f1 -d'<' | tail -n 1) … … 26 26 # Download Ncurses Source 27 27 # 28 cd ~/tmp 28 29 if ! [ -e ncurses-${VERSION}.tar.gz ]; then 29 30 wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz … … 32 33 # Set Patch Number 33 34 # 34 cd /usr/src35 cd ~/tmp 35 36 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 36 37 PATCH_NUM=$(cat index.html | grep ncurses | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 40 41 # Cleanup Directory 41 42 # 43 cd ~/tmp 42 44 rm -rf ncurses-${VERSION} ncurses-${VERSION}.orig 43 45 tar xvf ncurses-${VERSION}.tar.gz 44 46 cp -ar ncurses-${VERSION} ncurses-${VERSION}.orig 45 cd ncurses-${VERSION}46 47 47 48 # Download and Apply Rollup Patch 48 49 # 50 cd ~/tmp/ncurses-${VERSION} 49 51 CURRENTDIR=$(pwd -P) 50 mkdir /tmp/ncurses-${VERSION}51 cd /tmp/ncurses-${VERSION}52 mkdir ~/tmp/ncurses-${VERSION}-patches 53 cd ~/tmp/ncurses-${VERSION} 52 54 if [ "${ROLLUP}" != "" ]; then 53 55 echo "Getting Rollup ${ROLLUP} Patch..." 56 cd ~/tmp/ncurses-${VERSION}-patches 54 57 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${ROLLUP} 55 58 cd ${CURRENTDIR} 56 59 echo "Applying Rollup ${ROLLUP} Patch..." 57 cp /tmp/ncurses-${VERSION}/${ROLLUP} ${CURRENTDIR}/${ROLLUP}60 cp ~/tmp/ncurses-${VERSION}-patches/${ROLLUP} ${CURRENTDIR}/${ROLLUP} 58 61 bunzip2 ${ROLLUP} 59 62 ROLLUP2=$(echo ${ROLLUP} | sed -e 's/.bz2//g') … … 63 66 # Download and Apply Patches 64 67 # 68 install -d ~/tmp/ncurses-${VERSION}-patches 69 cd ~/tmp/ncurses-${VERSION} 70 CURRENTDIR=$(pwd -P) 65 71 for file in ${FILES}; do 66 72 if [ "${ROLLPATCH}" != "" ]; then … … 70 76 fi 71 77 if [ "${TEST}" = "0" ]; then 72 cd /tmp/ncurses-${VERSION}78 cd ~/tmp/ncurses-${VERSION}-patches 73 79 echo "Getting Patch ${file}..." 74 80 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${file} 75 81 cd ${CURRENTDIR} 76 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch --dry-run -s -f -Np182 gunzip -c ~/tmp/ncurses-${VERSION}-patches/${file} | patch --dry-run -s -f -Np1 77 83 if [ "$?" = "0" ]; then 78 84 echo "Apply Patch ${file}..." 79 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch -Np185 gunzip -c ~/tmp/ncurses-${VERSION}-patches/${file} | patch -Np1 80 86 LASTFILE=$(echo ${file} | cut -f2 -d. | cut -f2 -d-) 81 87 fi … … 85 91 # Cleanup Directory 86 92 # 87 # Cleanup Directory 88 # 93 cd ~/tmp 94 cd ncurses-${VERSION} 89 95 for dir in $(find * -type d); do 90 cd /usr/src/ncurses-${VERSION}/${dir}96 cd ~/tmp/ncurses-${VERSION}/${dir} 91 97 for file in $(find . -name '*~'); do 92 98 rm -f ${file} … … 96 102 done 97 103 done 98 cd /usr/src/ncurses-${VERSION}104 cd ~/tmp/ncurses-${VERSION} 99 105 rm -f *~ *.orig 100 106 101 107 # Create Patch 102 108 # 103 cd /usr/src 104 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 105 echo "Date: `date +%m-%d-%Y`" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 106 echo "Initial Package Version: ${VERSION}" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 107 echo "Origin: Upstream" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 108 echo "Upstream Status: Applied" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo " rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 112 diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Created /usr/src/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch." 109 cd ~/tmp 110 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Date: `date +%m-%d-%Y`" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 112 echo "Initial Package Version: ${VERSION}" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Origin: Upstream" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo "Upstream Status: Applied" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 115 echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 116 echo " rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 117 echo "" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 118 diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 119 echo "Created ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch." 120 121 # Cleanup Directory 122 # 123 cd ~/tmp 124 rm -rf ncurses-${VERSION} ncurses-${VERSION}.orig -
scripts/patch/readline-patch.sh
r2cca6fd r3c32719 16 16 # Get the # of Patches 17 17 # 18 cd /usr/src18 cd ~/tmp 19 19 wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}-patches/ --no-remove-listing 20 20 VERSION2=$(echo ${VERSION} | sed -e 's/\.//g') … … 27 27 # Download Readline Source 28 28 # 29 cd ~/tmp 29 30 if ! [ -e readline-${VERSION}.tar.gz ]; then 30 31 wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz … … 33 34 # Set Patch Number 34 35 # 35 cd /usr/src36 cd ~/tmp 36 37 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 37 38 PATCH_NUM=$(cat index.html | grep readline | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 41 42 # Cleanup Directory 42 43 # 44 cd ~/tmp 43 45 rm -rf readline-${VERSION} readline-${VERSION}.orig 44 46 tar xvf readline-${VERSION}.tar.gz 45 47 cp -ar readline-${VERSION} readline-${VERSION}.orig 46 cd readline-${VERSION}47 CURRENTDIR=$(pwd -P)48 48 49 49 # Download and Apply Patches 50 50 # 51 install -d ~/tmp/readline-${VERSION}-patches 52 cd ~/tmp/readline-${VERSION} 53 CURRENTDIR=$(pwd -P) 51 54 PATCHURL=ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}-patches 52 55 mkdir /tmp/readline-${VERSION} 53 56 COUNT=1 54 57 while [ ${COUNT} -le ${FILES} ]; do 55 cd /tmp/readline-${VERSION}58 cd ~/tmp/readline-${VERSION} 56 59 DLCOUNT="${COUNT}" 57 60 SKIPME=no … … 71 74 if [ "${SKIPME}" != "yes" ]; then 72 75 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 76 cd ~/tmp/readline-${VERSION}-patches 73 77 wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT} 74 78 fi 75 79 cd ${CURRENTDIR} 76 patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}80 patch --dry-run -s -f -Np0 -i ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT} 77 81 if [ "$?" = "0" ]; then 78 82 echo "Patch readline${VERSION2}-${DLCOUNT} applied" 79 patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}83 patch -s -Np0 -i ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT} 80 84 else 81 85 echo "Patch readline${VERSION2}-${DLCOUNT} not applied" 82 rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}86 rm -f ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT} 83 87 SKIPPED="${SKIPPED} ${DLCOUNT}" 84 88 fi … … 92 96 # 93 97 for dir in $(find * -type d); do 94 cd /usr/src/readline-${VERSION}/${dir}98 cd ~/tmp/readline-${VERSION}/${dir} 95 99 for file in $(find . -name '*~'); do 96 100 rm -f ${file} … … 100 104 done 101 105 done 102 cd /usr/src/readline-${VERSION}106 cd ~/tmp/readline-${VERSION} 103 107 rm -f *~ *.orig 104 108 105 109 # Create Patch 106 110 # 107 cd /usr/src108 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > readline-${VERSION}-branch_update-${PATCH_NUM}.patch109 echo "Date: `date +%m-%d-%Y`" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch110 echo "Initial Package Version: ${VERSION}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch111 echo "Origin: Upstream" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch112 echo "Upstream Status: Applied" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch113 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch111 cd ~/tmp 112 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Date: `date +%m-%d-%Y`" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo "Initial Package Version: ${VERSION}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 115 echo "Origin: Upstream" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 116 echo "Upstream Status: Applied" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 117 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 114 118 if [ -n "${SKIPPED}" ]; then 115 echo " Thee following patches were skipped" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch116 echo " ${SKIPPED}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch119 echo " Thee following patches were skipped" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 120 echo " ${SKIPPED}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 117 121 fi 118 echo "" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 119 diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 120 echo "Created /usr/src/readline-${VERSION}-branch_update-${PATCH_NUM}.patch." 122 echo "" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 123 diff -Naur readline-${VERSION}.orig readline-${VERSION} >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 124 echo "Created ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch." 125 126 # Cleanup Directory 127 # 128 cd ~/tmp 129 rm -rf readline-${VERSION} readline-${VERSION}.orig -
scripts/patch/vim-patch.sh
r2cca6fd r3c32719 16 16 # Get the # of Patches 17 17 # 18 cd /usr/src18 cd ~/tmp 19 19 wget ftp://ftp.vim.org/pub/vim/patches/${VERSION}/ --no-remove-listing 20 20 FILES=$(cat index.html | grep "${VERSION}" | cut -f6 -d. | cut -f1 -d'"' | sed '/^$/d' | tail -n 1) … … 33 33 # Set Patch Number 34 34 # 35 cd /usr/src35 cd ~/tmp 36 36 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 37 37 PATCH_NUM=$(cat index.html | grep vim | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 44 44 tar xvf vim-${VERSION}.tar.bz2 45 45 cp -ar vim${SERIES} vim${SERIES}.orig 46 cd vim${SERIES}47 CURRENTDIR=$(pwd -P)48 46 49 47 # Download and Apply Patches 50 48 # 49 install -d ~/tmp/vim-${VERSION}-patches 50 cd ~/tmp/vim${SERIES} 51 CURRENTDIR=$(pwd -P) 51 52 PATCHURL=ftp://ftp.vim.org/pub/vim/patches/${VERSION} 52 mkdir /tmp/vim-${VERSION}53 53 COUNT=1 54 54 while [ ${COUNT} -le ${FILES} ]; do 55 cd /tmp/vim-${VERSION}55 cd ~/tmp/vim${SERIES} 56 56 DLCOUNT="${COUNT}" 57 57 SKIPME=no … … 71 71 if [ "${SKIPME}" != "yes" ]; then 72 72 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 73 cd ~/tmp/vim-${VERSION}-patches 73 74 wget --quiet $PATCHURL/${VERSION}.${DLCOUNT} 74 75 fi 75 76 cd $CURRENTDIR 76 patch --dry-run -s -f -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}77 patch --dry-run -s -f -Np0 -i ~/tmp/vim-${VERSION}-patches/${VERSION}.${DLCOUNT} 77 78 if [ "$?" = "0" ]; then 78 79 echo "Patch ${VERSION}.${DLCOUNT} applied" 79 patch -s -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}80 patch -s -Np0 -i ~/tmp/vim-${VERSION}-patches/${VERSION}.${DLCOUNT} 80 81 else 81 82 echo "Patch ${VERSION}.${DLCOUNT} not applied" 82 rm -f /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}83 83 SKIPPED="${SKIPPED} ${DLCOUNT}" 84 84 fi … … 90 90 # 91 91 for dir in $(find * -type d); do 92 cd /usr/src/vim${SERIES}92 cd ~/tmp/vim${SERIES} 93 93 for file in $(find . -name '*~'); do 94 94 rm -f ${file} … … 98 98 done 99 99 done 100 cd /usr/src/vim${SERIES}100 cd ~/tmp/vim${SERIES} 101 101 rm -f *~ *.orig 102 102 103 103 # Create Patch 104 104 # 105 cd /usr/src106 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > vim-${VERSION}-branch_update-${PATCH_NUM}.patch107 echo "Date: `date +%m-%d-%Y`" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch108 echo "Initial Package Version: ${VERSION}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch109 echo "Origin: Upstream" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch110 echo "Upstream Status: Applied" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch111 echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch105 cd ~/tmp 106 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 107 echo "Date: `date +%m-%d-%Y`" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 108 echo "Initial Package Version: ${VERSION}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Origin: Upstream" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo "Upstream Status: Applied" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 112 112 if [ -n "${SKIPPED}" ]; then 113 echo " The following patches were skipped" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch114 echo " ${SKIPPED}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch113 echo " The following patches were skipped" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo " ${SKIPPED}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 115 115 fi 116 echo "" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 117 diff -Naur vim${SERIES}.orig vim${SERIES} >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 118 echo "Created /usr/src/vim-${VERSION}-branch_update-${PATCH_NUM}.patch." 116 echo "" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 117 diff -Naur vim${SERIES}.orig vim${SERIES} >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 118 echo "Created ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch." 119 120 # Cleanup Directory 121 # 122 rm -rf vim${SERIES} vim${SERIES}.orig
Note:
See TracChangeset
for help on using the changeset viewer.