# HG changeset patch # User Aleksej Bobylev # Date 1496111625 -10800 # Node ID e68dad1ffbffd3ca6fc631d32aacc1c6984f96e7 # Parent f439bf689ac8b4b58ea3bd39720ceb36be2e6607 cook: fix check_integrity() diff -r f439bf689ac8 -r e68dad1ffbff cook --- a/cook Mon May 29 04:48:50 2017 +0300 +++ b/cook Tue May 30 05:33:45 2017 +0300 @@ -541,15 +541,16 @@ # Check source tarball integrity. check_integrity() { - if [ -n "$TARBALL_SHA1" ]; then - echo "$TARBALL_SHA1 $SRC/$TARBALL" | sha1sum -c || exit 1 - fi - if [ -n "$TARBALL_SHA256" ]; then - echo "$TARBALL_SHA256 $SRC/$TARBALL" | sha256sum -c || exit 1 - fi - if [ -n "$TARBALL_MD5" ]; then - echo "$TARBALL_MD5 $SRC/$TARBALL" | md5sum -c || exit 1 - fi + for i in sha1 sha3 sha256 sha512 md5; do + I=$(echo $i | tr 'a-z' 'A-Z') + eval sum=\$TARBALL_$I + if [ -n "$sum" ]; then + newline + _ 'Checking %ssum of source tarball...' "$i" + echo "$sum $SRC/$TARBALL" | ${i}sum -c || exit 1 + fi + done + newline } @@ -715,7 +716,7 @@ # Get source tarball and make sure we have source dir named: # $PACKAGE-$VERSION to be standard in receipts. Here we use tar.lzma # tarball if it exists. - if [ -n "$WGET_URL" ] && [ ! -f "$SRC/$TARBALL" ]; then + if [ -n "$WGET_URL" -a ! -f "$SRC/$TARBALL" ]; then if [ -f "$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then TARBALL="${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" LZMA_SRC='' @@ -723,7 +724,7 @@ get_source || { broken; exit 1; } fi fi - if [ -z "$WANTED" ] && [ -n "$TARBALL" ] && [ ! -d "$src" ]; then + if [ -z "$WANTED" -a -n "$TARBALL" -a ! -d "$src" ]; then mkdir -p $pkgdir/source/tmp; cd $pkgdir/source/tmp if ! extract_source ; then get_source @@ -731,7 +732,7 @@ fi if [ -n "$LZMA_SRC" ]; then cd $pkgdir/source - if [ "$(ls -A tmp | wc -l)" -gl 1 ] || [ -f "$(echo tmp/*)" ]; then + if [ "$(ls -A tmp | wc -l)" -gl 1 -o -f "$(echo tmp/*)" ]; then mv tmp tmp-1; mkdir tmp mv tmp-1 tmp/${SOURCE:-$PACKAGE}-$VERSION fi @@ -742,14 +743,16 @@ cd $pkgdir/source/tmp # Some archives are not well done and don't extract to one dir (ex lzma). files=$(ls | wc -l) - [ "$files" == 1 ] && [ -d "$(ls)" ] && mv * ../$PACKAGE-$VERSION - [ "$files" == 1 ] && [ -f "$(ls)" ] && mkdir -p ../$PACKAGE-$VERSION && \ + [ "$files" -eq 1 -a -d "$(ls)" ] && mv * ../$PACKAGE-$VERSION + [ "$files" -eq 1 -a -f "$(ls)" ] && mkdir -p ../$PACKAGE-$VERSION && \ mv * ../$PACKAGE-$VERSION/$TARBALL [ "$files" -gt 1 ] && mkdir -p ../$PACKAGE-$VERSION && \ mv * ../$PACKAGE-$VERSION cd ..; rm -rf tmp fi + check_integrity + # Libtool shared libs path hack. case "$ARCH" in arm*) cross libhack ;; @@ -1791,7 +1794,6 @@ done # Cook and pack or exit on error and log everything. - check_integrity cookit $@ 2>&1 | loglimit 50 > $LOGS/$pkg.log remove_deps | tee -a $LOGS/$pkg.log cookit_quality diff -r f439bf689ac8 -r e68dad1ffbff lighttpd/index.cgi --- a/lighttpd/index.cgi Mon May 29 04:48:50 2017 +0300 +++ b/lighttpd/index.cgi Tue May 30 05:33:45 2017 +0300 @@ -475,7 +475,7 @@ -e 's#\([^a-zA-Z]\)\([Ee]rror\)$#\1\2#' \ -e 's#ERROR:#ERROR:#g' \ \ - -e 's#^.*[Ff]ailed.*#\0#' \ + -e 's#^.*[Ff][Aa][Ii][Ll][Ee][Dd].*#\0#' \ -e 's#^.*[Ff]atal.*#\0#' \ -e 's#^.*[Nn]ot found.*#\0#' \ -e 's#^.*[Nn]o such file.*#\0#' \