summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-05-20 12:24:36 -0400
committerJoey Hess <joey@kitenet.net>2011-05-20 12:24:36 -0400
commit3bcad664b0fe6c05ffd363f408b6bae7b06aa1ec (patch)
tree7180db0d0d9d588598edbb4ae451a58760f4d42d
parent0c1544678c59d41bde16b893bc590360b20ff749 (diff)
parentf957b3b90f103a1468fa499a88eb3d2357367f3c (diff)
downloaddebootstrap-3bcad664b0fe6c05ffd363f408b6bae7b06aa1ec.tar.gz
Merge branch 'new'
Conflicts: debian/changelog
-rw-r--r--debian/changelog9
-rw-r--r--functions13
-rw-r--r--scripts/potato1
-rw-r--r--scripts/woody1
-rw-r--r--scripts/woody.buildd1
5 files changed, 22 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index b390af6..01efbc7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,11 @@
-debootstrap (1.0.31) unstable; urgency=low
+debootstrap (1.0.31) UNRELEASED; urgency=low
+
+ * Use md5sums for woody and potato, which only had those checksums
+ in the Packages files. Closes: #627365
+
+ -- Joey Hess <joeyh@debian.org> Fri, 20 May 2011 12:08:37 -0400
+
+debootstrap (1.0.30) unstable; urgency=low
[ Mark Hymers ]
* Don't use the Build-Essential: yes field in Debian, use the
diff --git a/functions b/functions
index 48ba59e..b6e3ba8 100644
--- a/functions
+++ b/functions
@@ -226,11 +226,20 @@ mirror_style () {
export DOWNLOAD_DEBS
}
+force_md5 () {
+ DEBOOTSTRAP_CHECKSUM_FIELD=MD5SUM
+ export DEBOOTSTRAP_CHECKSUM_FIELD
+}
+
verify_checksum () {
# args: dest checksum size
local expchecksum="$2"
local expsize="$3"
- relchecksum=`sha${SHA_SIZE}sum < "$1" | sed 's/ .*$//'`
+ if [ "$DEBOOTSTRAP_CHECKSUM_FIELD" = "MD5SUM" ]; then
+ relchecksum=`md5sum < "$1" | sed 's/ .*$//'`
+ else
+ relchecksum=`sha${SHA_SIZE}sum < "$1" | sed 's/ .*$//'`
+ fi
relsize=`wc -c < "$1"`
if [ "$expsize" -ne "$relsize" ] || [ "$expchecksum" != "$relchecksum" ]; then
return 1
@@ -1027,7 +1036,7 @@ while (<STDIN>) {
$ver = $v if ($f eq "version:");
$arc = $v if ($f eq "architecture:");
$fil = $v if ($f eq "filename:");
- $chk = $v if ($f eq lc($ENV{DEBOOTSTRAP_CHECKSUM_FIELD}).":");
+ $chk = $v if (lc $f eq lc($ENV{DEBOOTSTRAP_CHECKSUM_FIELD}).":");
$siz = $v if ($f eq "size:");
$val = $v if ($f eq $field);
} elsif (/^$/) {
diff --git a/scripts/potato b/scripts/potato
index 304cbe0..50dc86a 100644
--- a/scripts/potato
+++ b/scripts/potato
@@ -1,5 +1,6 @@
mirror_style release
download_style apt var-state
+force_md5
LIBC=libc6
if [ "$ARCH" = alpha ]; then
diff --git a/scripts/woody b/scripts/woody
index fa0920a..12c65a3 100644
--- a/scripts/woody
+++ b/scripts/woody
@@ -1,5 +1,6 @@
mirror_style release
download_style apt
+force_md5
LIBC=libc6
if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then
diff --git a/scripts/woody.buildd b/scripts/woody.buildd
index 2942478..0dd8d50 100644
--- a/scripts/woody.buildd
+++ b/scripts/woody.buildd
@@ -1,5 +1,6 @@
mirror_style release
download_style apt
+force_md5
LIBC=libc6
if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then