From 95629eaab09f28437175c71c2de52fb25e36e8ee Mon Sep 17 00:00:00 2001 From: David Campbell Date: Tue, 1 Feb 2011 14:51:03 -0500 Subject: [PATCH] Allow 'volatile' as a hash to skip integrity check This makes building packages that rely on user configurable sources less painful. Signed-off-by: David Campbell --- doc/PKGBUILD.5.txt | 7 ++++--- scripts/makepkg.sh.in | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index c0fa594..f2de3cb 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -117,9 +117,10 @@ name. The syntax is: `source=('filename::url')`. *md5sums (array)*:: This array contains an MD5 hash for every source file specified in the source array (in the same order). makepkg will use this to verify source - file integrity during subsequent builds. To easily generate md5sums, run - ``makepkg -g >> PKGBUILD''. If desired, move the md5sums line to an - appropriate location. + file integrity during subsequent builds. If 'volatile' is put in the array + in place of a normal hash, the integrity check for that source file will + be skipped. To easily generate md5sums, run ``makepkg -g >> PKGBUILD''. If + desired, move the md5sums line to an appropriate location. *sha1sums, sha256sums, sha384sums, sha512sums (arrays)*:: Alternative integrity checks that makepkg supports; these all behave diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index b1b1b75..286d630 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -642,6 +642,10 @@ check_checksums() { if (( $found )) ; then local expectedsum=$(tr '[:upper:]' '[:lower:]' <<< "${integrity_sums[$idx]}") + if [[ $expectedsum = 'volatile' ]]; then + echo "$(gettext "Skipped")" >&2 + continue + fi local realsum="$(openssl dgst -${integ} "$file")" realsum="${realsum##* }" if [[ $expectedsum = $realsum ]]; then -- 1.7.3.5