summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-04-11 15:46:43 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-04-11 15:46:43 +0000
commit385ab69fd6ff553498173c59bdc88cea296169f5 (patch)
treed371aab5ccd0443d57c898959c6ccfc90f8e50af
parentbc64c5865b94ce29f1ae583fe5a2207fd0b90f50 (diff)
parentec1a5515f0d0bdaa9535ee4eccc2eb2ea16e741a (diff)
downloaddebootstrap-385ab69fd6ff553498173c59bdc88cea296169f5.tar.gz
Merge git://git.debian.org/d-i/debootstrap
Conflicts: debian/changelog
-rw-r--r--debian/changelog102
-rw-r--r--debian/control6
-rwxr-xr-xdebootstrap2
-rw-r--r--functions118
l---------scripts/quantal1
l---------scripts/raring1
6 files changed, 174 insertions, 56 deletions
diff --git a/debian/changelog b/debian/changelog
index f44c540..757f2f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,105 @@
+debootstrap (1.0.48) unstable; urgency=low
+
+ * Team upload
+
+ [ Julien Cristau ]
+ * Disable InRelease support. gpgv won't give us back the signed data, and
+ full gpg is not available inside d-i (closes: #703889).
+ * Move extract_release_components to after signature verification.
+ Suggested by Ansgar Burchardt.
+
+ -- Didier Raboud <odyx@debian.org> Thu, 04 Apr 2013 16:17:57 +0200
+
+debootstrap (1.0.47) unstable; urgency=low
+
+ * Team upload
+ * Properly decrypt the InRelease file when downloading from an archive
+ where InRelease is used. This longstanding bug was masked by former
+ APT behaviour and was revealed only with recent APT versions
+ Closes: #703146
+ Thanks to Michael Vogt for the analysis and patch
+ * Add a dependency on gpg because of the above change.
+
+ -- Christian Perrier <bubulle@debian.org> Wed, 20 Mar 2013 21:34:29 +0100
+
+debootstrap (1.0.46) unstable; urgency=low
+
+ * Team upload.
+ * Use `which` to find out sh only if /bin/sh does not exist.
+
+ -- Samuel Thibault <sthibault@debian.org> Thu, 27 Dec 2012 15:47:16 +0100
+
+debootstrap (1.0.45) unstable; urgency=low
+
+ [ Joey Hess ]
+ * Better support use on Android by not hardcoding /bin/sh
+ in a test file that's created, and instead putting in the
+ actual path to sh. Closes: #694310 Thanks, Shawn Landden
+
+ -- Christian Perrier <bubulle@debian.org> Sat, 22 Dec 2012 12:56:32 +0100
+
+debootstrap (1.0.44) unstable; urgency=low
+
+ * Remove double quotes to fix for loop on GNU/kFreeBSD, thanks to
+ Oleg Ginzburg (Closes: #693718).
+
+ -- Cyril Brulebois <kibi@debian.org> Tue, 20 Nov 2012 23:55:53 +0100
+
+debootstrap (1.0.43) unstable; urgency=low
+
+ [ Joey Hess ]
+ * Fix "arc" typo. Closes: #686680
+
+ [ Colin Watson ]
+ * Add (Ubuntu) raring as a symlink to gutsy.
+
+ [ Christian Perrier ]
+ * Add myself to Uploaders and drop Anthony Towns who is no
+ longer active in debootstrap maintenance for a few years. Thanks
+ for your work, Anthony.
+ * Bump Standards to 3.9.3 (checked)
+ * Replace XC-Package-Type by Package-Type in debian/control
+
+ -- Christian Perrier <bubulle@debian.org> Sat, 27 Oct 2012 12:46:46 +0200
+
+debootstrap (1.0.42) unstable; urgency=low
+
+ * Downgrade the absence of an InRelease file from a warning to an info
+ message. For now, debootstrap can cope fine without, and it's possible
+ there are Debian mirrors that don't have InRelease; Ubuntu doesn't quite
+ have InRelease support yet either (LP: #1017398).
+
+ -- Colin Watson <cjwatson@debian.org> Tue, 03 Jul 2012 15:34:57 +0100
+
+debootstrap (1.0.41) unstable; urgency=low
+
+ [ Mehdi Dogguy ]
+ * Add support for InRelease files (Closes: #638682)
+
+ -- Joey Hess <joeyh@debian.org> Thu, 21 Jun 2012 13:16:22 -0400
+
+debootstrap (1.0.40) unstable; urgency=low
+
+ [ Joey Hess ]
+ * When installation or configuration of a package fails, output a message
+ that points the user to the log file. Attempt to grep out the first
+ package that dpkg failed on and show its name too. Closes: #472704
+
+ [ Colin Watson ]
+ * Add (Ubuntu) quantal as a symlink to gutsy.
+
+ -- Colin Watson <cjwatson@debian.org> Thu, 26 Apr 2012 17:44:44 +0100
+
+debootstrap (1.0.39) unstable; urgency=low
+
+ * Retry corrupted downloads rather than carrying on almost regardless.
+ Patch mostly due to Michael Gilbert, rearranged somewhat by me (closes:
+ #618920).
+ * Stop at the end of the retrieval phase if any packages failed to
+ download.
+
+ -- Colin Watson <cjwatson@debian.org> Tue, 13 Mar 2012 17:21:13 +0000
+
debootstrap (1.0.38+dyson2) unstable; urgency=low
* Test for /dev/null again on illumos, determining major number
diff --git a/debian/control b/debian/control
index 016773b..0894e08 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,9 @@ Source: debootstrap
Section: admin
Priority: extra
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
-Uploaders: Anthony Towns <ajt@debian.org>, Joey Hess <joeyh@debian.org>, Junichi Uekawa <dancer@debian.org>, Colin Watson <cjwatson@debian.org>
+Uploaders: Joey Hess <joeyh@debian.org>, Junichi Uekawa <dancer@debian.org>, Colin Watson <cjwatson@debian.org>, Christian Perrier <bubulle@debian.org>
Build-Depends: debhelper (>= 7.0.50), makedev (>= 2.3.1-69) [linux-any]
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
Vcs-Browser: http://git.debian.org/?p=d-i/debootstrap.git
Vcs-Git: git://git.debian.org/d-i/debootstrap.git
@@ -20,7 +20,7 @@ Description: Bootstrap a basic Debian system
Package: debootstrap-udeb
Section: debian-installer
-XC-Package-Type: udeb
+Package-Type: udeb
Architecture: all
Depends: ${misc:Depends}, mounted-partitions
Description: Bootstrap the Debian system
diff --git a/debootstrap b/debootstrap
index 6af3689..87f074f 100755
--- a/debootstrap
+++ b/debootstrap
@@ -436,7 +436,7 @@ if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then
fi
if [ "$HOST_OS" = "kfreebsd" ] || [ "$HOST_OS" = "freebsd" ]; then
- for module in "linprocfs fdescfs tmpfs linsysfs"; do
+ for module in linprocfs fdescfs tmpfs linsysfs; do
kldstat -m "$module" > /dev/null 2>&1 || warning SANITYCHECK "Probably required module %s is not loaded" "$module"
done
fi
diff --git a/functions b/functions
index c1b3763..5c18368 100644
--- a/functions
+++ b/functions
@@ -315,6 +315,7 @@ get () {
local typ="$(eval echo \${$(( $a+2 ))})"
local from
local dest
+ local iters=0
case "$typ" in
bz2) from="$1.bz2"; dest="$2.bz2" ;;
@@ -330,24 +331,29 @@ get () {
dest2="${dest2%/*}/partial/${dest2##*/}"
fi
- info RETRIEVING "Retrieving %s" "$displayname"
- if ! just_get "$from" "$dest2"; then continue; fi
- if [ "$checksum" != "" ]; then
- info VALIDATING "Validating %s" "$displayname"
- if verify_checksum "$dest2" "$checksum" "$siz"; then
- checksum=""
+ while [ "$iters" -lt 10 ]; do
+ info RETRIEVING "Retrieving %s" "$displayname"
+ if ! just_get "$from" "$dest2"; then continue 2; fi
+ if [ "$checksum" != "" ]; then
+ info VALIDATING "Validating %s" "$displayname"
+ if verify_checksum "$dest2" "$checksum" "$siz"; then
+ checksum=""
+ fi
fi
- fi
- if [ -z "$checksum" ]; then
- [ "$dest2" = "$dest" ] || mv "$dest2" "$dest"
- case "$typ" in
- gz) gunzip "$dest" ;;
- bz2) bunzip2 "$dest" ;;
- esac
- return 0
- else
- warning CORRUPTFILE "%s was corrupt" "$from"
- fi
+ if [ -z "$checksum" ]; then
+ [ "$dest2" = "$dest" ] || mv "$dest2" "$dest"
+ case "$typ" in
+ gz) gunzip "$dest" ;;
+ bz2) bunzip2 "$dest" ;;
+ esac
+ return 0
+ else
+ rm -f "$dest2"
+ warning RETRYING "Retrying failed download of %s" "$from"
+ iters="$(($iters + 1))"
+ fi
+ done
+ warning CORRUPTFILE "%s was corrupt" "$from"
done
return 1
}
@@ -363,13 +369,6 @@ just_get () {
# http/ftp mirror
if wgetprogress -O "$dest" "$from"; then
return 0
- elif [ -s "$dest" ]; then
- local iters=0
- while [ "$iters" -lt 3 ]; do
- warning RETRYING "Retrying failed download of %s" "$from"
- if wgetprogress -c -O "$dest" "$from"; then break; fi
- iters="$(($iters + 1))"
- done
else
rm -f "$dest"
return 1
@@ -378,13 +377,6 @@ just_get () {
# http/ftp mirror
if wgetprogress $CHECKCERTIF $CERTIFICATE $PRIVATEKEY -O "$dest" "$from"; then
return 0
- elif [ -s "$dest" ]; then
- local iters=0
- while [ "$iters" -lt 3 ]; do
- warning RETRYING "Retrying failed download of %s" "$from"
- if wgetprogress $CHECKCERTIF $CERTIFICATE $PRIVATEKEY -c -O "$dest" "$from"; then break; fi
- iters="$(($iters + 1))"
- done
else
rm -f "$dest"
return 1
@@ -488,10 +480,29 @@ get_release_checksum () {
done | head -n 1
}
+extract_release_components () {
+ local reldest="$1"; shift
+ TMPCOMPONENTS="$(sed -n 's/Components: *//p' "$reldest")"
+ for c in $TMPCOMPONENTS ; do
+ eval "
+ case \"\$c\" in
+ $USE_COMPONENTS)
+ COMPONENTS=\"\$COMPONENTS \$c\"
+ ;;
+ esac
+ "
+ done
+ COMPONENTS="$(echo $COMPONENTS)"
+ if [ -z "$COMPONENTS" ]; then
+ mv "$reldest" "$reldest.malformed"
+ error 1 INVALIDREL "Invalid Release file, no valid components"
+ fi
+}
+
download_release_sig () {
local m1="$1"
local reldest="$2"
- local relsigdest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/Release.gpg")"
+ local relsigdest="$3"
if [ -n "$KEYRING" ] && [ -z "$DISABLE_KEYRING" ]; then
progress 0 100 DOWNRELSIG "Downloading Release file signature"
@@ -515,30 +526,17 @@ download_release_sig () {
download_release_indices () {
local m1="${MIRRORS%% *}"
local reldest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/Release")"
+ local relsigdest
progress 0 100 DOWNREL "Downloading Release file"
progress_next 100
get "$m1/dists/$SUITE/Release" "$reldest" nocache ||
error 1 NOGETREL "Failed getting release file %s" "$m1/dists/$SUITE/Release"
-
- TMPCOMPONENTS="$(sed -n 's/Components: *//p' "$reldest")"
- for c in $TMPCOMPONENTS ; do
- eval "
- case \"\$c\" in
- $USE_COMPONENTS)
- COMPONENTS=\"\$COMPONENTS \$c\"
- ;;
- esac
- "
- done
- COMPONENTS="$(echo $COMPONENTS)"
-
- if [ -z "$COMPONENTS" ]; then
- mv "$reldest" "$reldest.malformed"
- error 1 INVALIDREL "Invalid Release file, no valid components"
- fi
+ relsigdest="$TARGET/$($DLDEST rel "$SUITE" "$m1" "dists/$SUITE/Release.gpg")"
progress 100 100 DOWNREL "Downloading Release file"
- download_release_sig "$m1" "$reldest"
+ download_release_sig "$m1" "$reldest" "$relsigdest"
+
+ extract_release_components $reldest
local totalpkgs=0
for c in $COMPONENTS; do
@@ -637,7 +635,8 @@ download_debs () {
dloaddebs="$(($dloaddebs + $size))"
echo >>$TARGET/debootstrap/debpaths "$p $debdest"
else
- warning COULDNTDL "Couldn't download package %s (ver %s arc %s)" "$p" "$ver" "$arc"
+ warning COULDNTDL "Couldn't download package %s (ver %s arch %s)" "$p" "$ver" "$arc"
+ leftover="$leftover $p"
fi
fi
done
@@ -884,6 +883,18 @@ in_target_failmsg () {
shift; shift; shift
if ! $CHROOT_CMD "$@"; then
warning "$code" "$msg" "$arg"
+ # Try to point user at actual failing package.
+ msg="See %s for details"
+ if [ -e "$TARGET/debootstrap/debootstrap.log" ]; then
+ arg="$TARGET/debootstrap/debootstrap.log"
+ local pkg="$(grep '^dpkg: error processing ' "$TARGET/debootstrap/debootstrap.log" | head -n 1 | cut -d ' ' -f 4)"
+ if [ -n "$pkg" ]; then
+ msg="$msg (possibly the package $pkg is at fault)"
+ fi
+ else
+ arg="the log"
+ fi
+ warning "$code" "$msg" "$arg"
return 1
fi
return 0
@@ -1294,8 +1305,11 @@ check_sane_mount () {
;;
esac
+ SH=/bin/sh
+ [ -x $SH ] || SH=`which sh`
+
cat > "$1/test-exec" <<EOF
-#! /bin/sh
+#! $SH
:
EOF
chmod +x "$1/test-exec"
diff --git a/scripts/quantal b/scripts/quantal
new file mode 120000
index 0000000..3840936
--- /dev/null
+++ b/scripts/quantal
@@ -0,0 +1 @@
+gutsy \ No newline at end of file
diff --git a/scripts/raring b/scripts/raring
new file mode 120000
index 0000000..3840936
--- /dev/null
+++ b/scripts/raring
@@ -0,0 +1 @@
+gutsy \ No newline at end of file