[pacman-dev] [PATCH] makepkg: Use SKIP in checksum to skip integrity check
Using the value of "SKIP" in the checksum array will cause that integrity check to be skipped. This makes building packages that rely on user configurable sources less painful. Based-on-patch-by: Dan McGee <dan@archlinux.org> Based-on-patch-by: David Campbell <davekong@archlinux.us> Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 7 ++++--- scripts/makepkg.sh.in | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index fad93e5..cd6b09f 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -120,9 +120,10 @@ of the corresponding source file. *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 'SKIP' 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 a4a3d13..c4a0031 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -668,6 +668,8 @@ check_checksums() { realsum="${realsum##* }" if [[ $expectedsum = $realsum ]]; then echo "$(gettext "Passed")" >&2 + elif [[ $expectedsum = 'SKIP' ]]; then + echo "$(gettext "Skipped")" >&2 else echo "$(gettext "FAILED")" >&2 errors=1 -- 1.7.8
On Thu, Dec 22, 2011 at 04:55:12PM +1000, Allan McRae wrote:
Using the value of "SKIP" in the checksum array will cause that integrity check to be skipped. This makes building packages that rely on user configurable sources less painful.
Based-on-patch-by: Dan McGee <dan@archlinux.org> Based-on-patch-by: David Campbell <davekong@archlinux.us>
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 7 ++++--- scripts/makepkg.sh.in | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index fad93e5..cd6b09f 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -120,9 +120,10 @@ of the corresponding source file. *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 'SKIP' 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 a4a3d13..c4a0031 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -668,6 +668,8 @@ check_checksums() { realsum="${realsum##* }" if [[ $expectedsum = $realsum ]]; then echo "$(gettext "Passed")" >&2 + elif [[ $expectedsum = 'SKIP' ]]; then + echo "$(gettext "Skipped")" >&2
How about doing this check *before* we invoke openssl(1) so that the checksum calculation is actually skipped?
else echo "$(gettext "FAILED")" >&2 errors=1 -- 1.7.8
On 22/12/11 17:27, Lukas Fleischer wrote:
On Thu, Dec 22, 2011 at 04:55:12PM +1000, Allan McRae wrote:
Using the value of "SKIP" in the checksum array will cause that integrity check to be skipped. This makes building packages that rely on user configurable sources less painful.
Based-on-patch-by: Dan McGee <dan@archlinux.org> Based-on-patch-by: David Campbell <davekong@archlinux.us>
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 7 ++++--- scripts/makepkg.sh.in | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index fad93e5..cd6b09f 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -120,9 +120,10 @@ of the corresponding source file. *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 'SKIP' 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 a4a3d13..c4a0031 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -668,6 +668,8 @@ check_checksums() { realsum="${realsum##* }" if [[ $expectedsum = $realsum ]]; then echo "$(gettext "Passed")" >&2 + elif [[ $expectedsum = 'SKIP' ]]; then + echo "$(gettext "Skipped")" >&2
How about doing this check *before* we invoke openssl(1) so that the checksum calculation is actually skipped?
Even better... do it before the "tr" line which breaks things especially given there is an "I" there... New version on its way. Allan
participants (2)
-
Allan McRae
-
Lukas Fleischer