Changeset 718 for branches


Ignore:
Timestamp:
Dec 16, 2015, 7:13:07 AM (4 years ago)
Author:
ehem
Message:

Add logging application of patches, warn if fuzz is present during application

The logging is valuable for diagnosis of issues, so save these to a file
in the target. If fuzz is present, that is a pretty big danger, and so
add a warning if it is present.

Location:
branches/contrib/debian/package-build
Files:
8 edited
10 copied

Legend:

Unmodified
Added
Removed
  • branches/contrib/debian/package-build/linux-patch-ar71xx/debian/changelog

    r712 r718  
     1linux-patch-ar71xx (0.1.2) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-ar71xx (0.1.1) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-ar71xx/scripts/apply

    r707 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-ar71xx/scripts/remove.sh

    r707 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
  • branches/contrib/debian/package-build/linux-patch-bcm4716/debian/changelog

    r641 r718  
     1linux-patch-bcm4716 (0.1.3) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-bcm4716 (0.1.2) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-bcm4716/scripts/apply

    r707 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-bcm4716/scripts/remove.sh

    r707 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
  • branches/contrib/debian/package-build/linux-patch-bcm47xx/debian/changelog

    r671 r718  
     1linux-patch-bcm47xx (0.2.1) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-bcm47xx (0.2) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-bcm47xx/scripts/apply

    r707 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-bcm47xx/scripts/remove.sh

    r707 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
  • branches/contrib/debian/package-build/linux-patch-ocf/debian/changelog

    r653 r718  
     1linux-patch-ocf (0.1.3) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-ocf (0.1.2) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-ocf/scripts/apply

    r707 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-ocf/scripts/remove.sh

    r707 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
  • branches/contrib/debian/package-build/linux-patch-openwrt/debian/changelog

    r712 r718  
     1linux-patch-openwrt (0.2.3) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-openwrt (0.2.2) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-openwrt/scripts/apply

    r668 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-openwrt/scripts/remove.sh

    r598 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
  • branches/contrib/debian/package-build/linux-patch-yaffs2/debian/changelog

    r654 r718  
     1linux-patch-yaffs2 (0.1.3) unstable; urgency=low
     2
     3  * Script updates.  Copy patch output to patches/##-<patchname>.log
     4
     5 -- Elliott Mitchell <ehem+debwrt@m5p.com>  Tue, 15 Dec 2015 21:32:18 -0800
     6
    17linux-patch-yaffs2 (0.1.2) unstable; urgency=low
    28
  • branches/contrib/debian/package-build/linux-patch-yaffs2/scripts/apply

    r707 r718  
    7474expr ${patidx} + 1 > ${target}/patches/.last
    7575record=${target}/patches/${patidx}-$(basename ${srcdir})
    76 ln -s ${srcdir}/scripts/remove.sh ${record}.remove
     76ln -s ${srcdir}/scripts/remove.sh "${record}.remove"
    7777
    7878if [ -s "${srcdir}/files-${version}.tar.xz" ]
     
    8080fi
    8181
     82cat /dev/null > "${record}.log"
     83
    8284for pat in ${srcdir}/patches-${version}/[0-9][0-9][0-9]*-*.patch
    83 do if ! patch -d ${target} -p1 < ${pat} > /dev/null
     85do echo APPLY\: applying patch "${pat##*/}" >> "${record}.log"
     86        if ! patch -d ${target} -p1 < ${pat} >> "${record}.log"
    8487        then echo $0\: error\: failed during application of patch\: `basename ${pat}` 1>&2
    8588                echo warning\: removal of uncleanly applied patches is unreliable
    86                 echo ${pat} > ${record}.last
     89                echo ${pat} > "${record}.last"
    8790                exit 1
    8891        fi
    8992done
    9093
     94if grep -qefuzz "${record}.log"
     95then echo WARNING\: fuzz present during patch application\! > /dev/stderr
     96fi
     97
    9198echo $0\: successfully completed application of patches
    9299exit 0
  • branches/contrib/debian/package-build/linux-patch-yaffs2/scripts/remove.sh

    r707 r718  
    2727        then break
    2828        fi
    29         local name value
    3029        name=${line%%=*}
    3130        value=${line#*=}
     
    5049fi
    5150
    52 lastf="${target}/patches/${patidx}-$(basename ${srcdir}).last"
     51record="${target}/patches/${patidx}-$(basename ${srcdir})"
     52lastf="${record}.last"
     53cat /dev/null > "${record}.log"
     54
    5355last=`cat ${lastf}` > /dev/null 2>&1
    54 find "${srcdir}/patches-${version}" -name .svn -prune -o \! -type d -printf %p\\n | \
     56find "${srcdir}/patches-${version}" -name \[0-9]\[0-9]\[0-9]\*-\*.patch -printf %p\\n | \
    5557( if [ -f "${lastf}" ]
    5658then sort -r | awk -F / 'found { print }
     
    5961else sort -r
    6062fi) | while read pat
    61 do if ! patch -R -d "${target}" -p1 < "${pat}" > /dev/null
     63do echo REMOVE\: removing patch \""${pat##*/}"\" >> "${record}.log"
     64        if ! patch -R -d "${target}" -p1 < "${pat}" >> "${record}.log"
    6265        then if [ "${pat}" \!\= "${last}" ]
    6366                then echo $0\: error\: failed during removal of patch\: `basename ${pat}` 1>&2
     
    6972done
    7073
    71 rm -f "${lastf}"
     74rm -f "${lastf}" "${record}.log"
    7275
    7376if ! [ -f "${target}/patches/.last" ]
Note: See TracChangeset for help on using the changeset viewer.