summaryrefslogtreecommitdiffstats
path: root/functions (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary redirections of in_pathColin Watson2017-07-241-3/+3
|
* Avoid the 'type' shell commandSven Joachim2017-07-241-3/+3
| | | | | It is not mandatory in POSIX and tus not implemented by posh. Use the in_path function instead which is taylored for this need.
* Uniformize COMPONENTS/USE_COMPONENTS handling.Cyril Brulebois2017-03-101-3/+1
| | | | | The preliminary fix in 1.0.67 wasn't sufficient, and was extended in 1.0.72 in a different manner. Let's standardize all for loops.
* Don't make /dev/ptmx a symlink to pts/ptmx if we don't have toSimon McVittie2017-03-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | In a plain chroot or on real hardware, it is preferable to use mknod to create /dev/ptmx. This works as intended with older chroot managers such as sbuild and pbuilder, which were designed for the semantics of "legacy" /dev/pts (a single non-virtualized pty subsystem per kernel) and so mount /dev/pts without the newinstance option. It also works in newer kernels where /dev/pts always behaves as though the newinstance option was given, because on those kernels, opening a (c,5,2) device node automatically looks for an adjacent pts directory and uses its ptmx device node instead. However, if we are running debootstrap inside a restricted container such as lxc or systemd-nspawn, mknod ptmx c 5 2 might not be allowed. If so, fall back to a symlink with a warning. This mode is fine if the debootstrap will be used with systemd-nspawn or lxc, or if a devtmpfs will be mounted over its /dev, but will not work for older chroot managers like sbuild or pbuilder, because those chroot managers leave the ptmxmode mount option at its default 000, causing permission to open the pts/ptmx device node to be denied. Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236 Signed-off-by: Simon McVittie <smcv@debian.org>
* pkgdetails_perl: Strip the arch-qualifier (Closes: #836525)Sven Joachim2017-02-031-0/+1
|
* Fix InRelease support (Closes: #842591).Cyril Brulebois2016-10-301-8/+36
| | | | | | The initial tr|sed|tr looked nice on paper but doesn't work within a d-i context, so let's switch to a shell-only implementation supplied by Ansgar Burchardt.
* Refactor (In)Release(.gpg) downloadJulien Cristau2016-10-201-31/+37
| | | | | | | | | | - make a separate split_inline_sig function - move downloading all three files to download_release_sig - don't check InRelease signature if signature checking is disabled Thanks to Ansgar Burchardt for the suggestions. Signed-off-by: Julien Cristau <jcristau@debian.org>
* Merge branch 'master' of https://github.com/aburch/debootstrapJulien Cristau2016-10-201-2/+3
|\
| * Only use `tar -k` for new releasesAnsgar Burchardt2016-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In old releases, notably in Debian 6 (Squeeze), multiple packages ship the same files using diversions (e.g. bash/dash). As debootstrap naively extracts packages without implementing diversions itself, it relies on tar replacing the files without an error. Ideally we could use `tar --keep-directory-symlink`, but this is likely not portable enough. So continue to use `tar -k`, but only for future releases. Note that this requires no file conflicts among packages debootstrap installs (which is a good idea anyway as they might be extracted in the wrong order). Bug: https://bugs.debian.org/838388
* | Fix syntax error from the InRelease changeJulien Cristau2016-10-191-1/+1
| | | | | | | | Thanks, David Schneider!
* | Add support for downloading and validating InRelease filesJulien Cristau2016-10-181-6/+23
|/ | | | | Split up detached signature from signed data, in effect re-creating a Release and Release.gpg pair that we can verify with gpgv.
* Add support for xz-compressed Packages indicesAnsgar Burchardt2016-10-041-0/+10
| | | | Bug: https://bugs.debian.org/837649
* Pass -k to tar when extracting packagesAnsgar Burchardt2016-09-081-2/+2
| | | | | When installing with a merged /usr, the symlinks in / should not be replaced with real directories when extracting the packages.
* Merged /usr support for debootstrapMarco d'Itri2016-09-081-0/+37
|
* Validate SUITE against Release's Suite or CodenameAnsgar Burchardt2016-09-081-0/+14
| | | | Bug: https://bugs.debian.org/837075
* Excise all devices.tar.gz codeAlex Bennée2016-09-061-7/+1
| | | | | | | Since bug #571136 was fixed the --second-stage doesn't even use the devices tarball so we can remove all its related cruft. The README has been updated to show when real root access is required and give an example of a foreign debootstrap which works with fakeroot.
* hurd: move setting up dev and servers firmlink to setup_proc stage.Samuel Thibault2016-02-181-9/+6
| | | | | Also firmlink proc there. Thanks Gabriele Giacone for all the investigation!
* Split setup_devices in setup_devices and setup_dynamic_devices,Marco d'Itri2016-02-181-3/+20
| | | | | | | | | | | | | (setup_devices now only deals with static device nodes) and move the calls to setup_devices from the beginning of the second stage to the end of the first stage. setup_dynamic_devices mounts the appropriate filesystems which provide dynamic device nodes for the architectures which need one in debootstrap (kfreebsd and hurd). This fixes a bug in --second-stage introduced in 1.0.34 and exposed by the devices-related changes of 1.0.76: the second stage debootstrap runs "dpkg --print-architecture >/dev/null" at the very beginning of the program when /dev is still empty, so it creates an empty regular file in place of /dev/null and this will cause mknod to fail later. (Closes: #813232)
* Don't call mknod with --mode, it's not supported in busyboxSteve McIntyre2016-01-291-6/+6
| | | | | | | Use -m instead - fixes the broken fix for #812811. Closes: #813124. Uploading with urgency high to get this fix propagated quickly - it's breaking d-i installs right now.
* Fix permissions on device nodes (Closes: #812811).Cyril Brulebois2016-01-271-6/+6
|
* Stop creating useless device nodes (Closes: #571136).Cyril Brulebois2016-01-241-6/+21
| | | | Thanks to Marco d'Itri.
* Generate a deburis file with (package, version, uri) tuples.Cyril Brulebois2015-10-221-0/+1
| | | | | | It is similar to the existing debpaths. Signed-off-by: Cyril Brulebois <cyril@debamax.com>
* Fix resolve_deps and setup_available to work in the --foreign case (closes: ↵Colin Watson2015-07-281-3/+3
| | | | #757819, LP: #1450980).
* Use tr|tr for symmetry (instead of sed|tr).Cyril Brulebois2015-05-191-1/+1
|
* Use tr instead of (missing in d-i) xargs (Closes: #785693). Thanks, Julian ↵Cyril Brulebois2015-05-191-1/+1
| | | | Schauder!
* Add support for --force-check-gpg (Closes: #661501, #733179, #775454).Cyril Brulebois2015-05-151-1/+4
| | | | | With this option, one can programmatically make sure keyring checks are used and that no fallback to an https mirror happens.
* Make sure to deduplicate package list in download_release (Closes: #709751, ↵Cyril Brulebois2015-05-141-0/+5
| | | | | | | | | #768445, #785276). Do so to avoid issues while counting downloaded packages. The failure path could lead to printing some strange integer. This was reported to mostly happen whenever --no-resolve-deps is used.
* Fix the empty sources.list bug with foreign architectures (Closes: #732255, ↵Cyril Brulebois2014-12-301-1/+3
| | | | | | | #773867). Update setup_apt_sources to look at USE_COMPONENTS if COMPONENTS is empty, so that some iteration over defined components happens.
* Fix reporting of package version in retrieval and validation steps to cope ↵Cyril Brulebois2014-09-141-1/+1
| | | | with epochs.
* Fix "possibly the package $pkg is at fault" warnings to account for changed ↵Colin Watson2014-08-191-1/+1
| | | | error output in dpkg 1.17.2.
* Add uncompressed and xz control.tar deb member supportGuillem Jover2014-05-061-3/+15
| | | | | | | | These are currently not accepted by the Debian archive, but are supported since dpkg 1.17.6, and they do not incur any additional dependency from the host system. This is mostly for completeness' sake, as Debian base packages with uncompressed or xz control.tar members are probably not going to be used at all.
* Add uncompressed data.tar deb member supportGuillem Jover2014-05-061-1/+2
| | | | | | | | These are currently not accepted by the Debian archive, but have been supported since dpkg 1.10.24, and they do not incur any additional dependency from the host system. This is mostly for completeness' sake, as Debian base packages with uncompressed data.tar members are probably not going to be used at all.
* pkgdetails_perl: Only interpret percentages following whitespace, to cope ↵Colin Watson2014-02-071-2/+6
| | | | with GNU wget outputting the local file name (which may contain "%" due to URL-encoding) after it finishes the download (LP: #1172101).
* Avoid writing https urls into sources.list, as apt does not support https.Joey Hess2013-12-271-1/+1
| | | | When a https url is used, fall back to the default mirror for sources.list.
* default to https mirror for Debian when no gpg verification is availableJoey Hess2013-12-271-5/+11
| | | | | | | | | | | | | | | | | When deboostrapping Debian, and the debian-archive-keyring is not available, switch the default mirror to a https url. This way at least the CA level of security is available even for users who have no way to check gpg keys in the WoT. The https mirror is currently https://mirrors.kernel.org/debian. When the keyring is available, the default mirror remains non-https, for several reasons: a) to avoid overloading mirrors.kernel.org b) because http.us.debian.org lacks https support c) because mirrors.kernel.org is not currently in the http.us.debian.org rotation d) because mirrors.kernel.org lacks IPv6 support
* Resolve mount point symlinks relative to the target chroot before unmounting ↵Colin Watson2013-05-181-1/+4
| | | | them (closes: #702861, #703037, #704744).
* Report package version information on package retrieve and validation. ↵Héctor Orón Martínez2013-05-141-3/+5
| | | | | | Closes: #697675 Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
* Move extract_release_components to after signature verification.Julien Cristau2013-03-251-1/+2
| | | | Suggested by Ansgar Burchardt.
* Disable InRelease support.Julien Cristau2013-03-251-34/+13
| | | | | gpgv won't give us back the signed data, and full gpg is not available inside d-i (closes: #703889).
* * Properly decrypt the InRelease file when downloading from an archiveChristian PERRIER2013-03-201-1/+2
| | | | | | | 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
* Revert to using which, but only in non-d-iSamuel Thibault2012-12-271-1/+4
| | | | which is only if /bin/sh does not exist
* Find out /bin/sh using `type` instead of `which`,Samuel Thibault2012-12-271-1/+1
| | | | the latter not being available in d-i.
* functions: check for /bin/sh before using it in shebang (android)Shawn Landden2012-11-261-1/+1
|
* Fix "arc" typo. Closes: #686680Joey Hess2012-09-051-1/+1
|
* Downgrade the absence of an InRelease file from a warning to an info ↵Colin Watson2012-06-251-1/+1
| | | | 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).
* minor cleanupJoey Hess2012-05-221-2/+2
|
* Add support for InRelease files (Closes: #638682)Mehdi Dogguy2012-05-221-30/+55
|
* point users at the log file on error, try to show a package name tooJoey Hess2012-04-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | When installation or configuration of a package fails, output a message that points the user to the log file[1]. Attempt to grep out the first package that dpkg failed on and show its name too. Closes: #472704 Sample: W: Failure while configuring base packages. This will be re-attempted up to five times. W: See sid/debootstrap.log for details (possibly the package libept1 is at fault) This relies on the LANG=C currently set for the debootstrap run. Changes to the "dpkg: error processing $PACKAGE" message would break the package name extractor, but it'd fall back to not showing a package name. This adds cut to the set of utilities debootstrap uses, which shouldn't be a problem. [1] In d-i, debootstrap doesn't know where the log file is, but then this message goes to the same syslog file, so I didn't add any special handling for this case.
* Stop at the end of the retrieval phase if any packages failed to download.Colin Watson2012-03-131-0/+1
|
* Retry corrupted downloads rather than carrying on almost regardless. Patch ↵Colin Watson2012-03-131-31/+23
| | | | mostly due to Michael Gilbert, rearranged somewhat by me (closes: #618920).