Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: docker.io

docker.io (20.10.2-0ubuntu1) hirsute; urgency=medium * New upstream release. * d/watch: update components, docker-ce is deprecated now. Add "engine", "cli" and "packaging" components which were previously provided by docker-ce. * Pass create-empty-orig to dpkg-source since now there is no main tarball. Due to docker-ce deprecation this source package is now composed by multiple components but no main tarball. In order to allow that, create-empty-orig is passed to dpkg-source which creates an empty tarball for us. * Drop patches applied by upstream: - d/p/41518--apparmor-parser-beta.patch - d/p/CVE-2020-15157.patch * Add docker systemd service and socket to the debian directory. Instead of using the packaging component just to get those two files let's embed them in the debian directory. They were downloaded from the master branch of the docker/docker-ce-packaging: https://github.com/docker/docker-ce-packaging/tree/master/systemd * Apply changes in do-not-bind-docker-to-containerd.patch to systemd service. The systemd service is part of the debian packaging directory, so no need to have a patch for this. This change was a decision made by the Ubuntu community, pay attention to this when updating the systemd service file. * Pass --name=docker to dh_installsystemd * Remove "components/" from all references of engine and cli. Now engine and cli are regular components in the root of the source package. They are not under the components directory anymore. * d/rules: use DEB_VERSION_UPSTREAM from pkg-info.mk instead of VERSION file. The VERSION file was previously provided by the deprecated docker-ce. * d/rules: do not try to install md2man in /go/bin/md2man. Upstream source code changed and by default it tries to install it in /go/bin/md2man. A sed command was added to replace this path with $(OUR_GOPATH)/bin/md2man. * d/vim-syntax-docker.install: do not install files from engine. Those files do not exist anymore because they were incorporated in vim itself upstream. * Remove d/{helpers/gitcommit.sh,upstream-version-gitcommits} Since the main repo, docker-ce, is deprecated there is no way to get a consistent git commit hash across all the components. Let's use DEB_VERSION for now. * Bump debhelper compatibility level to 11. For instance to call dh_installsystemd we need a compat level > 9. I picked 11 because it is available from Bionic on in case we want to backport the package. -- Lucas Kanashiro <kanashiro@ubuntu.com> Fri, 15 Jan 2021 10:30:18 -0300 docker.io (19.03.13-0ubuntu6) hirsute; urgency=medium * d/docker.io.postinst: check if zfs exists before calling it (LP: #1910133). The zfs executable is provided by zfs-fuse | zfsutils and they are runtime Suggested dependencies, which means they might not be available during configuration time. -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 04 Jan 2021 17:25:39 -0300 docker.io (19.03.13-0ubuntu5) hirsute; urgency=medium * d/rules: pass -r instead of --no-stop-on-upgrade to dh_systemd_start. The --no-stop-on-upgrade is not backport-able to xenial because debhelper 9 does not support that, and --no-restart-on-upgrade will be deprecated in debhelper 14. Therefore, let's use the short version which is supported by a larger range of debhelper versions. -- Lucas Kanashiro <kanashiro@ubuntu.com> Thu, 10 Dec 2020 16:16:09 -0300 docker.io (19.03.13-0ubuntu4) hirsute; urgency=medium * d/p/do_not_bind_docker_to_containerd.patch: Update docker.io to not stop when containerd is upgraded, by using Wants= rather than BindTo=. (LP: #1870514) * d/rules: Fix docker.io to not restart its service during package upgrades, to prevent service downtime from automatic updates via unattended-upgrade. (LP: #1906364) -- Bryce Harrington <bryce@canonical.com> Fri, 04 Dec 2020 23:02:49 +0000 docker.io (19.03.13-0ubuntu3) groovy; urgency=medium * SECURITY UPDATE: Sensitive information disclosure - debian/patches/CVE-2020-15157.patch: Improve fetch function. - CVE-2020-15157 -- Paulo Flabiano Smorigo <pfsmorigo@canonical.com> Wed, 14 Oct 2020 13:25:32 +0000 docker.io (19.03.13-0ubuntu2) groovy; urgency=medium [ Tianon Gravi ] * Backport https://github.com/moby/moby/pull/41518 to handle newer AppArmor -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 09 Oct 2020 08:28:02 +1300 docker.io (19.03.13-0ubuntu1) groovy; urgency=medium [ Tianon Gravi ] * Update to 19.03.13 upstream release * Build against Go 1.13 (per upstream) * Use dh-golang to generate appropriate Built-Using -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 08 Oct 2020 10:43:13 +1300 docker.io (19.03.11-0ubuntu1) groovy; urgency=medium * Update to 19.03.11 upstream release (CVE-2020-13401, LP: #1881679) * Apply wrap-and-sort * Move cgroupfs-mount to Suggests (esp. on Ubuntu where systemd is canonical) -- Tianon Gravi <tianon@debian.org> Mon, 01 Jun 2020 15:14:15 -0700 docker.io (19.03.8-0ubuntu4) groovy; urgency=medium * Provide "image" and "oci" components in golang dev package, mirroring Debian to address libpod FTBFS -- Reinhard Tartler <siretart@tauware.de> Sat, 30 May 2020 11:56:59 -0400 docker.io (19.03.8-0ubuntu3) groovy; urgency=medium * Provide the rootless component in golang dev package, mirroring Debian (addresses nomad FTBFS). -- Logan Rosen <logan@ubuntu.com> Tue, 26 May 2020 21:06:20 -0400 docker.io (19.03.8-0ubuntu2) groovy; urgency=medium [ Jean-Baptiste Lallement ] [ Didier Roche ] * Fix use with ZFS on root: - docker creates one dataset for any layer of containers that were created. Create now a <pool>/var/lib/docker for creating them in the persistent namespace and migrate existing one here. - purge the automated historic that was created. The migration only impacts the ubuntu desktop installation with experimental ZFS on root, and we have thus to stop and start the daemon to migrate data. (LP: #1879473) -- Didier Roche <didrocks@ubuntu.com> Tue, 19 May 2020 11:01:22 +0200 docker.io (19.03.8-0ubuntu1) focal; urgency=medium * Update to 19.03.8 upstream release (LP: #1867068) - Improve mitigation for CVE-2019-14271 for some nscd configuration. -- Tianon Gravi <tianon@debian.org> Wed, 11 Mar 2020 15:48:33 -0700 docker.io (19.03.6-0ubuntu1) focal; urgency=medium * Update to 19.03.6 upstream release -- Tianon Gravi <tianon@debian.org> Tue, 18 Feb 2020 09:03:26 +1300 docker.io (19.03.2-0ubuntu1) eoan; urgency=medium * Update to 19.03.2 -- Tianon Gravi <tianon@debian.org> Wed, 11 Sep 2019 15:45:55 -0700 docker.io (18.09.9-0ubuntu1) eoan; urgency=medium * Update to 18.09.9 * Remove leftover sysvinit/upstart patches - cgroupfs-mount-convenience-copy.patch - devicemapper-cleanup.patch -- Tianon Gravi <tianon@debian.org> Wed, 11 Sep 2019 15:21:11 -0700 docker.io (18.09.8-0ubuntu5) eoan; urgency=medium * Set GOCACHE to a safely writable directory during build as the cache is mandatory with Go 1.12. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 26 Aug 2019 10:20:12 +1200 docker.io (18.09.8-0ubuntu4) eoan; urgency=medium * Add dependency on golang-github-docker-docker-credential-helpers-dev, needed by github.com/docker/cli/cli/config/credentials/native_store.go. -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 23 Aug 2019 14:21:42 -0700 docker.io (18.09.8-0ubuntu3) eoan; urgency=medium * d/tests/docker-in-lxd: skip on eoan+/i386 as lxd images are no longer provided. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 18 Jul 2019 22:44:03 +1200 docker.io (18.09.8-0ubuntu2) eoan; urgency=medium * Remove extraneous start/stop of docker via init.d script from basic-smoke autopkgtest. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 18 Jul 2019 15:42:38 +1200 docker.io (18.09.8-0ubuntu1) eoan; urgency=medium [ Michael Hudson-Doyle ] * Version dependency on containerd. [ Tianon Gravi ] * Remove sysvinit and upstart scripts (LP: #1832819) * Update to 18.09.8 (CVE-2019-13509, LP: #1836987) -- Tianon Gravi <tianon@debian.org> Wed, 17 Jul 2019 18:26:58 -0700 docker.io (18.09.7-0ubuntu1) eoan; urgency=medium * Update to 18.09.7. (LP: #1834690) - Includes fix for CVE-2018-15664. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 28 Jun 2019 21:13:02 +0100 docker.io (18.09.5-0ubuntu1) disco; urgency=medium * Update to 18.09.5. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 12 Apr 2019 12:27:37 +1200 docker.io (18.09.3-0ubuntu1) disco; urgency=medium * Update to 18.09.3. - update d/upstream-version-commits - refresh d/patches/docker-prefix.patch to maintain dependence on docker-specific containerd daemon. - remove d/patches/0001-nsenter-clone-proc-self-exe-to-avoid-exposing-host-b.patch, now included upstream. * Stop bundling containerd and runc and instead depend on the containerd package from the archive. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 14 Mar 2019 11:22:11 +1300 docker.io (18.09.2-0ubuntu1) disco; urgency=medium * Update to 18.09.2, including fix for CVE-2019-5736. - Convert components/engine/git-bundles/CVE-2019-5736.bundle into d/patches/0001-nsenter-clone-proc-self-exe-to-avoid-exposing-host-b.patch. - Hard code RUNC_COMMIT in d/rules for now. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 12 Feb 2019 10:55:11 +1300 docker.io (18.09.1-0ubuntu2) disco; urgency=medium * Update "docker-prefix.patch" to also fix "docker.service" -- Tianon Gravi <tianon@debian.org> Fri, 08 Feb 2019 14:52:47 -0800 docker.io (18.09.1-0~ubuntu1) disco; urgency=medium [ Michael Hudson-Doyle ] * d/tests/docker-in-lxd: Increase timeout passed to lxd waitready. [ Tianon Gravi ] * Update to 18.09.1 upstream release [ Michael Hudson-Doyle ] * d/rules: Empty XDG_RUNTIME_DIR when smoke testing runc to avoid it doing silly things. * d/golang-github-docker-docker-dev.install: install some more go packages that other packages in the archive depend on. -- Tianon Gravi <tianon@debian.org> Thu, 17 Jan 2019 16:14:51 -0800 docker.io (18.06.1-0ubuntu2) disco; urgency=medium * Fix containerd/runc embedded commit values * Add "libsystemd-dev" to "Build-Depends" (LP: #1802979) -- Tianon Gravi <tianon@debian.org> Fri, 19 Oct 2018 13:06:35 -0700 docker.io (18.06.1-0ubuntu1) cosmic; urgency=medium * Update to 18.06.1 upstream release (LP: #1794396) - drop "fix-btrfs-constants.patch" (applied upstream) * Update debconf to prompt more aggressively (LP: #1784602) 1. does not prompt on initial install (but does start the daemon) 2. does prompt on every reinstall / upgrade (if the daemon is running) 3. does prompt during "dpkg-reconfigure docker.io" (but does _not_ [re]start the daemon) 4. works properly with DEBIAN_FRONTEND=noninteractive -- user's previous/stored answer to the question automatically applies with no prompt * Check if "docker" group exists before creating it (LP: #1769911) -- Tianon Gravi <tianon@debian.org> Mon, 24 Sep 2018 15:42:19 -0700 docker.io (17.12.1-0ubuntu6) cosmic; urgency=medium * d/tests/docker-in-lxd: Avoid startup race and drop lxd-client depends -- Stéphane Graber <stgraber@ubuntu.com> Sat, 15 Sep 2018 03:07:49 +0200 docker.io (17.12.1-0ubuntu5) cosmic; urgency=medium * Fix ftbfs by cherry-picking https://github.com/containerd/btrfs/pull/16. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 01 Aug 2018 11:40:05 +1200 docker.io (17.12.1-0ubuntu4) cosmic; urgency=medium * d/tests/docker-in-lxd: only setup network bridge if missing -- Stéphane Graber <stgraber@ubuntu.com> Tue, 05 Jun 2018 22:58:51 -0400 docker.io (17.12.1-0ubuntu3) cosmic; urgency=medium * d/tests/docker-in-lxd: switch to ubuntu-daily lxd remote and wait for cloud-init to finish before running commands in the container. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 22 May 2018 10:54:00 +1200 docker.io (17.12.1-0ubuntu2) cosmic; urgency=medium * Update btrfs dependencies to use the new libbtrfs-dev & btrfs-progs. -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 17 May 2018 09:27:15 +0100 docker.io (17.12.1-0ubuntu1) bionic; urgency=medium [ Tianon Gravi ] * Update to 17.12.1-ce upstream release - swap from github.com/docker/docker to .../docker/docker-ce - build separate components in a way that can be parallelized - remove older (unsupported) contrib/ bits from being shipped - drop a lot of unnecessary packaging bits from debian/ * Adjust debconf prompt: - ask during _every_ upgrade - default to not restarting [ Michael Hudson-Doyle ] * Switch to building with default version of Go. * Adjust debconf template to match change in behavior. -- Tianon Gravi <tianon@debian.org> Wed, 28 Feb 2018 09:46:05 -0800 docker.io (17.03.2-0ubuntu5) bionic; urgency=medium * d/control, d/rules: Fix FTBFS when built with golang 1.10 by build depending on golang-1.9-go. See https://github.com/moby/moby/pull/35739 for upstream discussion on golang 1.10 compatibility. -- Tyler Hicks <tyhicks@canonical.com> Tue, 20 Mar 2018 13:57:16 +0000 docker.io (17.03.2-0ubuntu4) bionic; urgency=medium * d/tests/docker-in-lxd: Fix failing test due to /etc/resolv.conf being a symlink in Bionic. The 'lxc file pull <path> -' command prints the symlink contents (the target path) to stdout, rather than the contents of the target file, so use 'lxc exec' to grep /etc/resolv.conf. Grep will follow the symlink in situations where /etc/resolv.conf is a symlink. -- Tyler Hicks <tyhicks@canonical.com> Mon, 19 Mar 2018 19:35:52 +0000 docker.io (17.03.2-0ubuntu3) bionic; urgency=medium * d/tests/docker-in-lxd: set DEBIAN_FRONTEND=noninteractive when installing docker in the lxd container -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 21 Feb 2018 10:49:58 +1300 docker.io (17.03.2-0ubuntu2) bionic; urgency=medium * Replace "--no-restart-on-upgrade" with "--no-start" and a debconf prompt - not restarting Docker causes many issues (LP: #1658691) - suggested methods for keeping containers up are to use a restart policy ("--restart=..." on "docker run"), Swarm Mode services, or rolling replacement of k8s workers * Backport 30519 for bashism (LP: #1744599) - https://github.com/docker/docker/pull/30519 -- Tianon Gravi <tianon@debian.org> Thu, 07 Dec 2017 09:42:53 -0800 docker.io (17.03.2-0ubuntu1) bionic; urgency=medium * Update to 17.03.2 upstream release -- Tianon Gravi <tianon@debian.org> Wed, 01 Nov 2017 12:30:17 -0700 docker.io (1.13.1-0ubuntu6) artful; urgency=medium * Add missing "runc" patches for LXD-enablement -- Tianon Gravi <tianon@debian.org> Wed, 11 Oct 2017 19:38:03 -0700 docker.io (1.13.1-0ubuntu5) artful; urgency=medium * Replace "runc" dependency with a multiorig copy of Docker's exact supported commit contents (installed as "/usr/bin/docker-runc" mirroring upstream's package) * Replace "containerd" in the same way (with the exact upstream-supported commit, binaries installed as "/usr/bin/docker-containerd*") -- Tianon Gravi <tianon@debian.org> Fri, 29 Sep 2017 13:22:39 -0700 docker.io (1.13.1-0ubuntu4) artful; urgency=medium * d/tests/docker-in-lxd: Better handle DNS with systemd-resolved. -- Stéphane Graber <stgraber@ubuntu.com> Thu, 21 Sep 2017 01:12:33 -0400 docker.io (1.13.1-0ubuntu3) artful; urgency=medium * d/tests/docker-in-lxd: check for network-up has a race condition when systemd-resolved is used. Add an additional check for a real DNS server in systemd-resolve --status. -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 15 Sep 2017 23:32:16 -0700 docker.io (1.13.1-0ubuntu2) artful; urgency=medium * d/tests/docker-in-lxd: copy more apt config into container * d/golang-github-docker-docker-dev.install: install missing packages. (LP: #1714564) * d/control: Add Build-Depend on tzdata. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 04 Sep 2017 13:31:34 +1200 docker.io (1.13.1-0ubuntu1) artful; urgency=medium * Update to 1.13.1 upstream release - refresh patches (removing many that are applied upstream in 1.13+) - use dh_clean (via debian/clean) instead of explicit "rm" in rules - pull in explicit libnetwork sources for "docker-proxy" - drop unnecessary dh_golang usage (only used for Built-Using calculation) - update "upstream-version-gitcommits" with a more recent list of commits - add "tini" for building "docker-init" (used by "docker run --init") - prefer Go 1.7 explicitly if it's available -- Tianon Gravi <tianon@debian.org> Tue, 22 Aug 2017 09:30:24 -0700 docker.io (1.12.6-0ubuntu7) artful; urgency=medium * Make sure to set security.nesting for the LXD autopkgtest. -- Stéphane Graber <stgraber@ubuntu.com> Tue, 06 Jun 2017 14:55:34 -0600 docker.io (1.12.6-0ubuntu6) artful; urgency=medium * Fix FTBFS on Go 1.8. -- Stéphane Graber <stgraber@ubuntu.com> Mon, 05 Jun 2017 16:21:16 -0600 docker.io (1.12.6-0ubuntu5) artful; urgency=medium * Update LXD autopkgtest now that the "docker" profile is deprecated. -- Stéphane Graber <stgraber@ubuntu.com> Mon, 05 Jun 2017 15:59:18 -0600 docker.io (1.12.6-0ubuntu4) zesty; urgency=medium * Revert 1.12.6-0ubuntu2 as it does not achieve the stated goal on both s390x and armhf. And lxc/lxd adt runners are too restrictive to e.g. import an ubuntu-base container for a minimal functional test. -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 14 Mar 2017 09:41:30 +0000 docker.io (1.12.6-0ubuntu3) zesty; urgency=medium * debian/tests/docker-in-lxd: Fix a latent version comparison bug that was causing migration failures due to the script thinking it was dealing with an old LXD (< 2.2) when it was really dealing with a recent LXD (>= 2.10). The fix is to use `lxc info` to check if the network extension is supported, rather than trying to compare version strings. -- Tyler Hicks <tyhicks@canonical.com> Fri, 10 Mar 2017 17:40:22 +0000 docker.io (1.12.6-0ubuntu2) zesty; urgency=medium * Remove isolation-machine restriction from adt smoke-test testcase. Should pass on s390x lxd runners; will fails on armhf runners but that is not a regressions since previously all tests were simply skipped on armhf. LP: #1658150 -- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 01 Feb 2017 10:08:00 +0000 docker.io (1.12.6-0ubuntu1) zesty; urgency=medium * Update to 1.12.6 upstream release (LP: #1655906) - add a few new privileged tests to "skip-privileged-unit-tests.patch" * Adjust runc Depends to ensure fix for CVE-2016-9962 is included -- Tianon Gravi <tianon@debian.org> Fri, 13 Jan 2017 11:57:24 +1300 docker.io (1.12.3-0ubuntu4) zesty; urgency=medium * Explicity depend on the version of runc that was built with seccomp support. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 12 Dec 2016 11:15:01 +1300 docker.io (1.12.3-0ubuntu3) zesty; urgency=medium [ Michael Hudson-Doyle ] * d/test/docker-in-lxd: make test for "is network up" more robust. [ Stefan Bader ] * Backport upstream 1.13 change to keep existing bridges untouched (LP: #1647376) - upstream-1.13-Vendor-libnetwork-51d88e9ae63f.patch -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 08 Dec 2016 11:53:36 +1300 docker.io (1.12.3-0ubuntu2) zesty; urgency=medium [ Tianon Gravi ] * Enable seccomp support (LP: #1639407) -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 30 Nov 2016 12:34:22 -0800 docker.io (1.12.3-0ubuntu1) zesty; urgency=medium * Update to 1.12.3 upstream release - https://github.com/docker/docker/releases/tag/v1.12.2 - https://github.com/docker/docker/releases/tag/v1.12.3 -- Tianon Gravi <tianon@debian.org> Tue, 15 Nov 2016 15:50:32 -0800 docker.io (1.12.1-0ubuntu15) yakkety; urgency=medium * d/test/docker-in-lxd: use images:ubuntu/${suite}/${arch} instead of ubuntu-daily:${suite} because the former does not have cloud-init in it to rewrite /etc/apt/sources.list at unexpected times. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 10 Oct 2016 21:38:17 +1300 docker.io (1.12.1-0ubuntu14) yakkety; urgency=medium * d/test/docker-in-lxd: cope with changes in lxd 2.3. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 10 Oct 2016 15:30:42 +1300 docker.io (1.12.1-0ubuntu13) yakkety; urgency=medium * d/tests/docker-in-lxd: copy apt config from host to container rather than just enabling all of the -proposed pocket. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 27 Sep 2016 12:23:56 +1300 docker.io (1.12.1-0ubuntu12) yakkety; urgency=medium * Final(?) docker-in-lxd fix: of course, alpine:latest is only the name of the image on amd64. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 19 Sep 2016 20:34:59 +1200 docker.io (1.12.1-0ubuntu11) yakkety; urgency=medium * Even more docker-in-lxd fixes. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 19 Sep 2016 14:14:33 +1200 docker.io (1.12.1-0ubuntu10) yakkety; urgency=medium * Yet another docker-in-lxd fix. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 16 Sep 2016 19:02:41 +1200 docker.io (1.12.1-0ubuntu9) yakkety; urgency=medium * Proxy related fix for docker-in-lxd. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 16 Sep 2016 18:59:54 +1200 docker.io (1.12.1-0ubuntu8) yakkety; urgency=medium * Re-enable docker-in-lxd again after many fixes. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 16 Sep 2016 12:26:04 +1200 docker.io (1.12.1-0ubuntu7) yakkety; urgency=medium * d/tests/control: disable docker-in-lxd again, does not work in production infrastructure. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 08 Sep 2016 09:41:13 +1200 docker.io (1.12.1-0ubuntu6) yakkety; urgency=medium * d/tests/control: docker-in-lxd needs to depend on lxd-client as well. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 07 Sep 2016 21:18:18 +1200 docker.io (1.12.1-0ubuntu5) yakkety; urgency=medium * Ignore failure to set oom_score_adj, as happens in an unprivileged container. * Use $DOCKER_OPTS in service file again. * Add an autopkgtest to test docker-in-lxd. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 07 Sep 2016 15:36:50 +1200 docker.io (1.12.1-0ubuntu4) yakkety; urgency=medium * Fix service file. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 07 Sep 2016 14:13:12 +1200 docker.io (1.12.1-0ubuntu3) yakkety; urgency=medium * Skip "TestOverlay50LayerRead" on "overlay" driver too (in "skip-privileged-unit-tests.patch") -- Tianon Gravi <tianon@debian.org> Mon, 29 Aug 2016 16:00:00 -0700 docker.io (1.12.1-0ubuntu2) yakkety; urgency=medium * Add new "overlay2" driver's tests to "skip-privileged-unit-tests.patch" (FTBFS fix) -- Tianon Gravi <tianon@debian.org> Fri, 26 Aug 2016 10:20:24 -0700 docker.io (1.12.1-0ubuntu1) yakkety; urgency=medium * Update to 1.12.1 upstream release (LP: #1602243) - refresh "cgroupfs-mount-convenience-copy.patch" - remove "fatal-error-old-kernels.patch"; applied upstream, https://github.com/docker/docker/commit/51b23d88422918c24291f5876df35f91b23a446a - refresh "change-system-unit-env-file.patch" - refresh "21491--systemd-tasksmax.patch" - remove "22000--ignore-invalid-host-header.patch"; applied upstream, https://github.com/docker/docker/pull/22000 https://github.com/docker/docker/pull/22888 https://github.com/docker/docker/pull/23046 - refresh "remove-docker-prefix.patch" - refresh "skip-privileged-unit-tests.patch"; add new privileged tests, + TestMakeRemoteContext + TestMakeSumTarContext + TestDispatch + TestEmptyDockerfile + TestDockerfileOutsideTheBuildContext + TestRealodNoOpts - replace "lxd--20902--docker-in-userns.patch" with the upstream-applied "lxd--25672--docker-in-userns.patch" - remove "lxd--runc-617.patch"; no longer necessary (due to kernel fixes), https://github.com/opencontainers/runc/pull/617#issuecomment-223654149 - remove "21714--no-aufs-in-userns.patch"; applied upstream, https://github.com/docker/docker/pull/21714 - add "man" to "DH_GOLANG_EXCLUDES" (has new "generate.go" which imports the non-vendored "github.com/spf13/cobra/doc", causing dh_golang to choke) - add "docker-proxy-vendor.patch" to account for "vendor/..." vs "vendor/src/..." - install new explicit "dockerd" and "docker-proxy" binaries - update containerd dependency (>= 0.2.3) - update runc dependency (>= 1.0.0-rc1) * Update "debian/watch" to use "uscan.tianon.xyz" so older versions are still easily fetchable without excess work outside uscan -- Tianon Gravi <tianon@debian.org> Wed, 24 Aug 2016 11:48:34 -0700 docker.io (1.11.2-0ubuntu6) yakkety; urgency=medium * Merge from Debian Unstable: - more README.Debian notes (including a fixed href) - new "docker-doc" package which contains the documentation - use "dh-golang" for building (generates appropriate Built-Using) - run upstream unit tests during dh_auto_test - convert upstream-discouraged "/etc/default/docker" to comments-only - utilize dh_install (w/dh-exec) more fully to simplify debian/rules - fix "/etc/docker" permissions for co-existence with docker-registry - remove "/var/lib/docker" on purge * Remaining Ubuntu delta: - non-pruned vendor/ (included in golang-github-docker-docker-dev) - Docker-in-userns patches * Changes from pending Debian upload: - build from within GOPATH so Go packages are resolved properly - split "dh_auto_build-arch" from "dh_auto_build-indep" - include vendor/ in golang-github-docker-docker-dev (since we don't necessarily have the appropriate packages for Depends on that package) -- Tianon Gravi <tianon@debian.org> Fri, 19 Aug 2016 10:15:14 -0700

Modifications :
  1. Download patch cli/.gitignore

    --- 20.10.1+dfsg1-1/cli/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/.gitignore 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,19 @@ +# if you want to ignore files created by your editor/tools, +# please consider a global .gitignore https://help.github.com/articles/ignoring-files +*.exe +*.exe~ +*.orig +.*.swp +.DS_Store +Thumbs.db +.editorconfig +/build/ +cli/winresources/rsrc_386.syso +cli/winresources/rsrc_amd64.syso +/man/man1/ +/man/man5/ +/man/man8/ +/docs/yaml/gen/ +coverage.txt +profile.out +/vndr.log
  2. Download patch cli/vendor/github.com/containerd/console/console_linux.go
  3. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash.go
  4. Download patch cli/vendor/github.com/beorn7/perks/go.mod

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/beorn7/perks/go.mod 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/beorn7/perks/go.mod 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,3 @@ +module github.com/beorn7/perks + +go 1.11
  5. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,9 @@ +// +build windows + +package winterm + +// AddInRange increments a value by the passed quantity while ensuring the values +// always remain within the supplied min / max range. +func addInRange(n int16, increment int16, min int16, max int16) int16 { + return ensureInRange(n+increment, min, max) +}
  6. Download patch cli/vendor/github.com/Azure/go-ansiterm/context.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/context.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/context.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,7 @@ +package ansiterm + +type ansiContext struct { + currentChar byte + paramBuffer []byte + interBuffer []byte +}
  7. Download patch cli/vendor/github.com/containerd/console/tc_solaris_nocgo.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_solaris_nocgo.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_solaris_nocgo.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,47 @@ +// +build solaris,!cgo + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// +// Implementing the functions below requires cgo support. Non-cgo stubs +// versions are defined below to enable cross-compilation of source code +// that depends on these functions, but the resultant cross-compiled +// binaries cannot actually be used. If the stub function(s) below are +// actually invoked they will display an error message and cause the +// calling process to exit. +// + +package console + +import ( + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TCGETS + cmdTcSet = unix.TCSETS +) + +func ptsname(f *os.File) (string, error) { + panic("ptsname() support requires cgo.") +} + +func unlockpt(f *os.File) error { + panic("unlockpt() support requires cgo.") +}
  8. Download patch cli/vendor/github.com/Azure/go-ansiterm/states.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/states.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/states.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,71 @@ +package ansiterm + +type stateID int + +type state interface { + Enter() error + Exit() error + Handle(byte) (state, error) + Name() string + Transition(state) error +} + +type baseState struct { + name string + parser *AnsiParser +} + +func (base baseState) Enter() error { + return nil +} + +func (base baseState) Exit() error { + return nil +} + +func (base baseState) Handle(b byte) (s state, e error) { + + switch { + case b == CSI_ENTRY: + return base.parser.csiEntry, nil + case b == DCS_ENTRY: + return base.parser.dcsEntry, nil + case b == ANSI_ESCAPE_PRIMARY: + return base.parser.escape, nil + case b == OSC_STRING: + return base.parser.oscString, nil + case sliceContains(toGroundBytes, b): + return base.parser.ground, nil + } + + return nil, nil +} + +func (base baseState) Name() string { + return base.name +} + +func (base baseState) Transition(s state) error { + if s == base.parser.ground { + execBytes := []byte{0x18} + execBytes = append(execBytes, 0x1A) + execBytes = append(execBytes, getByteRange(0x80, 0x8F)...) + execBytes = append(execBytes, getByteRange(0x91, 0x97)...) + execBytes = append(execBytes, 0x99) + execBytes = append(execBytes, 0x9A) + + if sliceContains(execBytes, base.parser.context.currentChar) { + return base.parser.execute() + } + } + + return nil +} + +type dcsEntryState struct { + baseState +} + +type errorState struct { + baseState +}
  9. Download patch cli/vendor/github.com/agl/ed25519/edwards25519/const.go
  10. Download patch cli/vendor/github.com/containerd/console/tc_freebsd.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_freebsd.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_freebsd.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,45 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "fmt" + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TIOCGETA + cmdTcSet = unix.TIOCSETA +) + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +// This does not exist on FreeBSD, it does not allocate controlling terminals on open +func unlockpt(f *os.File) error { + return nil +} + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCGPTN) + if err != nil { + return "", err + } + return fmt.Sprintf("/dev/pts/%d", n), nil +}
  11. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,118 @@ +// +build windows + +package winterm + +// effectiveSr gets the current effective scroll region in buffer coordinates +func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion { + top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom) + bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom) + if top >= bottom { + top = window.Top + bottom = window.Bottom + } + return scrollRegion{top: top, bottom: bottom} +} + +func (h *windowsAnsiEventHandler) scrollUp(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + sr := h.effectiveSr(info.Window) + return h.scroll(param, sr, info) +} + +func (h *windowsAnsiEventHandler) scrollDown(param int) error { + return h.scrollUp(-param) +} + +func (h *windowsAnsiEventHandler) deleteLines(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + start := info.CursorPosition.Y + sr := h.effectiveSr(info.Window) + // Lines cannot be inserted or deleted outside the scrolling region. + if start >= sr.top && start <= sr.bottom { + sr.top = start + return h.scroll(param, sr, info) + } else { + return nil + } +} + +func (h *windowsAnsiEventHandler) insertLines(param int) error { + return h.deleteLines(-param) +} + +// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates. +func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error { + h.logf("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom) + h.logf("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom) + + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: 0, + Y: sr.top - int16(param), + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +} + +func (h *windowsAnsiEventHandler) deleteCharacters(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + return h.scrollLine(param, info.CursorPosition, info) +} + +func (h *windowsAnsiEventHandler) insertCharacters(param int) error { + return h.deleteCharacters(-param) +} + +// scrollLine scrolls a line horizontally starting at the provided position by a number of columns. +func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error { + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: position.Y, + Bottom: position.Y, + Left: position.X, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: position.X - int16(columns), + Y: position.Y, + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +}
  12. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,101 @@ +// +build windows + +package winterm + +const ( + horizontal = iota + vertical +) + +func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT { + if h.originMode { + sr := h.effectiveSr(info.Window) + return SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + } else { + return SMALL_RECT{ + Top: info.Window.Top, + Bottom: info.Window.Bottom, + Left: 0, + Right: info.Size.X - 1, + } + } +} + +// setCursorPosition sets the cursor to the specified position, bounded to the screen size +func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error { + position.X = ensureInRange(position.X, window.Left, window.Right) + position.Y = ensureInRange(position.Y, window.Top, window.Bottom) + err := SetConsoleCursorPosition(h.fd, position) + if err != nil { + return err + } + h.logf("Cursor position set: (%d, %d)", position.X, position.Y) + return err +} + +func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error { + return h.moveCursor(vertical, param) +} + +func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error { + return h.moveCursor(horizontal, param) +} + +func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + switch moveMode { + case horizontal: + position.X += int16(param) + case vertical: + position.Y += int16(param) + } + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorLine(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = 0 + position.Y += int16(param) + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = int16(param) - 1 + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +}
  13. Download patch cli/vendor/github.com/Azure/go-ansiterm/osc_string_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/osc_string_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/osc_string_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,31 @@ +package ansiterm + +type oscStringState struct { + baseState +} + +func (oscState oscStringState) Handle(b byte) (s state, e error) { + oscState.parser.logf("OscString::Handle %#x", b) + nextState, err := oscState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case isOscStringTerminator(b): + return oscState.parser.ground, nil + } + + return oscState, nil +} + +// See below for OSC string terminators for linux +// http://man7.org/linux/man-pages/man4/console_codes.4.html +func isOscStringTerminator(b byte) bool { + + if b == ANSI_BEL || b == 0x5C { + return true + } + + return false +}
  14. Download patch cli/vendor/github.com/containerd/console/tc_linux.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_linux.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_linux.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,44 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "fmt" + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TCGETS + cmdTcSet = unix.TCSETS +) + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +func unlockpt(f *os.File) error { + return unix.IoctlSetPointerInt(int(f.Fd()), unix.TIOCSPTLCK, 0) +} + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + u, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCGPTN) + if err != nil { + return "", err + } + return fmt.Sprintf("/dev/pts/%d", u), nil +}
  15. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,84 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error { + // Ignore an invalid (negative area) request + if toCoord.Y < fromCoord.Y { + return nil + } + + var err error + + var coordStart = COORD{} + var coordEnd = COORD{} + + xCurrent, yCurrent := fromCoord.X, fromCoord.Y + xEnd, yEnd := toCoord.X, toCoord.Y + + // Clear any partial initial line + if xCurrent > 0 { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yCurrent + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent += 1 + } + + // Clear intervening rectangular section + if yCurrent < yEnd { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd-1 + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent = yEnd + } + + // Clear remaining partial ending line + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error { + region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X} + width := toCoord.X - fromCoord.X + 1 + height := toCoord.Y - fromCoord.Y + 1 + size := uint32(width) * uint32(height) + + if size <= 0 { + return nil + } + + buffer := make([]CHAR_INFO, size) + + char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes} + for i := 0; i < int(size); i++ { + buffer[i] = char + } + + err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, &region) + if err != nil { + return err + } + + return nil +}
  16. Download patch cli/vendor/cloud.google.com/go/compute/metadata/metadata.go
  17. Download patch cli/vendor/github.com/containerd/containerd/defaults/defaults_windows.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/defaults/defaults_windows.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/defaults/defaults_windows.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,45 @@ +// +build windows + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package defaults + +import ( + "os" + "path/filepath" +) + +var ( + // DefaultRootDir is the default location used by containerd to store + // persistent data + DefaultRootDir = filepath.Join(os.Getenv("ProgramData"), "containerd", "root") + // DefaultStateDir is the default location used by containerd to store + // transient data + DefaultStateDir = filepath.Join(os.Getenv("ProgramData"), "containerd", "state") +) + +const ( + // DefaultAddress is the default winpipe address + DefaultAddress = `\\.\pipe\containerd-containerd` + // DefaultDebugAddress is the default winpipe address for pprof data + DefaultDebugAddress = `\\.\pipe\containerd-debug` + // DefaultFIFODir is the default location used by client-side cio library + // to store FIFOs. Unused on Windows. + DefaultFIFODir = "" + // DefaultRuntime is the default windows runtime + DefaultRuntime = "io.containerd.runhcs.v1" +)
  18. Download patch cli/vendor/github.com/cespare/xxhash/v2/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,67 @@ +# xxhash + +[![GoDoc](https://godoc.org/github.com/cespare/xxhash?status.svg)](https://godoc.org/github.com/cespare/xxhash) +[![Build Status](https://travis-ci.org/cespare/xxhash.svg?branch=master)](https://travis-ci.org/cespare/xxhash) + +xxhash is a Go implementation of the 64-bit +[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a +high-quality hashing algorithm that is much faster than anything in the Go +standard library. + +This package provides a straightforward API: + +``` +func Sum64(b []byte) uint64 +func Sum64String(s string) uint64 +type Digest struct{ ... } + func New() *Digest +``` + +The `Digest` type implements hash.Hash64. Its key methods are: + +``` +func (*Digest) Write([]byte) (int, error) +func (*Digest) WriteString(string) (int, error) +func (*Digest) Sum64() uint64 +``` + +This implementation provides a fast pure-Go implementation and an even faster +assembly implementation for amd64. + +## Compatibility + +This package is in a module and the latest code is in version 2 of the module. +You need a version of Go with at least "minimal module compatibility" to use +github.com/cespare/xxhash/v2: + +* 1.9.7+ for Go 1.9 +* 1.10.3+ for Go 1.10 +* Go 1.11 or later + +I recommend using the latest release of Go. + +## Benchmarks + +Here are some quick benchmarks comparing the pure-Go and assembly +implementations of Sum64. + +| input size | purego | asm | +| --- | --- | --- | +| 5 B | 979.66 MB/s | 1291.17 MB/s | +| 100 B | 7475.26 MB/s | 7973.40 MB/s | +| 4 KB | 17573.46 MB/s | 17602.65 MB/s | +| 10 MB | 17131.46 MB/s | 17142.16 MB/s | + +These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using +the following commands under Go 1.11.2: + +``` +$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes' +$ go test -benchtime 10s -bench '/xxhash,direct,bytes' +``` + +## Projects using this package + +- [InfluxDB](https://github.com/influxdata/influxdb) +- [Prometheus](https://github.com/prometheus/prometheus) +- [FreeCache](https://github.com/coocood/freecache)
  19. Download patch cli/vendor/github.com/containerd/console/tc_unix.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_unix.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_unix.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,91 @@ +// +build darwin freebsd linux netbsd openbsd solaris + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "golang.org/x/sys/unix" +) + +func tcget(fd uintptr, p *unix.Termios) error { + termios, err := unix.IoctlGetTermios(int(fd), cmdTcGet) + if err != nil { + return err + } + *p = *termios + return nil +} + +func tcset(fd uintptr, p *unix.Termios) error { + return unix.IoctlSetTermios(int(fd), cmdTcSet, p) +} + +func tcgwinsz(fd uintptr) (WinSize, error) { + var ws WinSize + + uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) + if err != nil { + return ws, err + } + + // Translate from unix.Winsize to console.WinSize + ws.Height = uws.Row + ws.Width = uws.Col + ws.x = uws.Xpixel + ws.y = uws.Ypixel + return ws, nil +} + +func tcswinsz(fd uintptr, ws WinSize) error { + // Translate from console.WinSize to unix.Winsize + + var uws unix.Winsize + uws.Row = ws.Height + uws.Col = ws.Width + uws.Xpixel = ws.x + uws.Ypixel = ws.y + + return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, &uws) +} + +func setONLCR(fd uintptr, enable bool) error { + var termios unix.Termios + if err := tcget(fd, &termios); err != nil { + return err + } + if enable { + // Set +onlcr so we can act like a real terminal + termios.Oflag |= unix.ONLCR + } else { + // Set -onlcr so we don't have to deal with \r. + termios.Oflag &^= unix.ONLCR + } + return tcset(fd, &termios) +} + +func cfmakeraw(t unix.Termios) unix.Termios { + t.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + t.Oflag &^= unix.OPOST + t.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + t.Cflag &^= (unix.CSIZE | unix.PARENB) + t.Cflag &^= unix.CS8 + t.Cc[unix.VMIN] = 1 + t.Cc[unix.VTIME] = 0 + + return t +}
  20. Download patch cli/vendor/github.com/containerd/containerd/errdefs/errors.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/errdefs/errors.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/errdefs/errors.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,93 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with errors.Wrap and error.Wrapf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +// +// The functions ToGRPC and FromGRPC can be used to map server-side and +// client-side errors to the correct types. +package errdefs + +import ( + "context" + + "github.com/pkg/errors" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// For the most part, we just try to provide local grpc errors. Most conditions +// map very well to those defined by grpc. +var ( + ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. + ErrInvalidArgument = errors.New("invalid argument") + ErrNotFound = errors.New("not found") + ErrAlreadyExists = errors.New("already exists") + ErrFailedPrecondition = errors.New("failed precondition") + ErrUnavailable = errors.New("unavailable") + ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented +) + +// IsInvalidArgument returns true if the error is due to an invalid argument +func IsInvalidArgument(err error) bool { + return errors.Is(err, ErrInvalidArgument) +} + +// IsNotFound returns true if the error is due to a missing object +func IsNotFound(err error) bool { + return errors.Is(err, ErrNotFound) +} + +// IsAlreadyExists returns true if the error is due to an already existing +// metadata item +func IsAlreadyExists(err error) bool { + return errors.Is(err, ErrAlreadyExists) +} + +// IsFailedPrecondition returns true if an operation could not proceed to the +// lack of a particular condition +func IsFailedPrecondition(err error) bool { + return errors.Is(err, ErrFailedPrecondition) +} + +// IsUnavailable returns true if the error is due to a resource being unavailable +func IsUnavailable(err error) bool { + return errors.Is(err, ErrUnavailable) +} + +// IsNotImplemented returns true if the error is due to not being implemented +func IsNotImplemented(err error) bool { + return errors.Is(err, ErrNotImplemented) +} + +// IsCanceled returns true if the error is due to `context.Canceled`. +func IsCanceled(err error) bool { + return errors.Is(err, context.Canceled) +} + +// IsDeadlineExceeded returns true if the error is due to +// `context.DeadlineExceeded`. +func IsDeadlineExceeded(err error) bool { + return errors.Is(err, context.DeadlineExceeded) +}
  21. Download patch cli/vendor/github.com/containerd/console/console.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/console.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/console.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,87 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "errors" + "io" + "os" +) + +var ErrNotAConsole = errors.New("provided file is not a console") + +type File interface { + io.ReadWriteCloser + + // Fd returns its file descriptor + Fd() uintptr + // Name returns its file name + Name() string +} + +type Console interface { + File + + // Resize resizes the console to the provided window size + Resize(WinSize) error + // ResizeFrom resizes the calling console to the size of the + // provided console + ResizeFrom(Console) error + // SetRaw sets the console in raw mode + SetRaw() error + // DisableEcho disables echo on the console + DisableEcho() error + // Reset restores the console to its orignal state + Reset() error + // Size returns the window size of the console + Size() (WinSize, error) +} + +// WinSize specifies the window size of the console +type WinSize struct { + // Height of the console + Height uint16 + // Width of the console + Width uint16 + x uint16 + y uint16 +} + +// Current returns the current process' console +func Current() (c Console) { + var err error + // Usually all three streams (stdin, stdout, and stderr) + // are open to the same console, but some might be redirected, + // so try all three. + for _, s := range []*os.File{os.Stderr, os.Stdout, os.Stdin} { + if c, err = ConsoleFromFile(s); err == nil { + return c + } + } + // One of the std streams should always be a console + // for the design of this function. + panic(err) +} + +// ConsoleFromFile returns a console using the provided file +// nolint:golint +func ConsoleFromFile(f File) (Console, error) { + if err := checkConsole(f); err != nil { + return nil, err + } + return newMaster(f) +}
  22. Download patch cli/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
  23. Download patch cli/vendor/github.com/cespare/xxhash/v2/go.mod

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/go.mod 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/go.mod 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,3 @@ +module github.com/cespare/xxhash/v2 + +go 1.11
  24. Download patch cli/vendor/github.com/beorn7/perks/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/beorn7/perks/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/beorn7/perks/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,31 @@ +# Perks for Go (golang.org) + +Perks contains the Go package quantile that computes approximate quantiles over +an unbounded data stream within low memory and CPU bounds. + +For more information and examples, see: +http://godoc.org/github.com/bmizerany/perks + +A very special thank you and shout out to Graham Cormode (Rutgers University), +Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and +Divesh Srivastava (AT&T Labs–Research) for their research and publication of +[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf) + +Thank you, also: +* Armon Dadgar (@armon) +* Andrew Gerrand (@nf) +* Brad Fitzpatrick (@bradfitz) +* Keith Rarick (@kr) + +FAQ: + +Q: Why not move the quantile package into the project root? +A: I want to add more packages to perks later. + +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. Download patch cli/vendor/github.com/agl/ed25519/LICENSE

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/agl/ed25519/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/agl/ed25519/LICENSE 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. Download patch cli/.github/workflows/codeql-analysis.yml

    --- 20.10.1+dfsg1-1/cli/.github/workflows/codeql-analysis.yml 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/.github/workflows/codeql-analysis.yml 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,80 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +name: "CodeQL" + +on: +# push: +# branches: [master] +# pull_request: +# # The branches below must be a subset of the branches above +# branches: [master] + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12) + # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: '0 9 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['go'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1
  27. Download patch cli/vendor/github.com/Azure/go-ansiterm/ground_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/ground_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/ground_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,24 @@ +package ansiterm + +type groundState struct { + baseState +} + +func (gs groundState) Handle(b byte) (s state, e error) { + gs.parser.context.currentChar = b + + nextState, err := gs.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(printables, b): + return gs, gs.parser.print() + + case sliceContains(executors, b): + return gs, gs.parser.execute() + } + + return gs, nil +}
  28. Download patch cli/vendor/github.com/containerd/console/tc_openbsd_cgo.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_openbsd_cgo.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_openbsd_cgo.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,51 @@ +// +build openbsd,cgo + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "os" + + "golang.org/x/sys/unix" +) + +//#include <stdlib.h> +import "C" + +const ( + cmdTcGet = unix.TIOCGETA + cmdTcSet = unix.TIOCSETA +) + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + ptspath, err := C.ptsname(C.int(f.Fd())) + if err != nil { + return "", err + } + return C.GoString(ptspath), nil +} + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +func unlockpt(f *os.File) error { + if _, err := C.grantpt(C.int(f.Fd())); err != nil { + return err + } + return nil +}
  29. Download patch cli/vendor/github.com/Azure/go-ansiterm/parser_actions.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/parser_actions.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/parser_actions.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,119 @@ +package ansiterm + +func (ap *AnsiParser) collectParam() error { + currChar := ap.context.currentChar + ap.logf("collectParam %#x", currChar) + ap.context.paramBuffer = append(ap.context.paramBuffer, currChar) + return nil +} + +func (ap *AnsiParser) collectInter() error { + currChar := ap.context.currentChar + ap.logf("collectInter %#x", currChar) + ap.context.paramBuffer = append(ap.context.interBuffer, currChar) + return nil +} + +func (ap *AnsiParser) escDispatch() error { + cmd, _ := parseCmd(*ap.context) + intermeds := ap.context.interBuffer + ap.logf("escDispatch currentChar: %#x", ap.context.currentChar) + ap.logf("escDispatch: %v(%v)", cmd, intermeds) + + switch cmd { + case "D": // IND + return ap.eventHandler.IND() + case "E": // NEL, equivalent to CRLF + err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN) + if err == nil { + err = ap.eventHandler.Execute(ANSI_LINE_FEED) + } + return err + case "M": // RI + return ap.eventHandler.RI() + } + + return nil +} + +func (ap *AnsiParser) csiDispatch() error { + cmd, _ := parseCmd(*ap.context) + params, _ := parseParams(ap.context.paramBuffer) + ap.logf("Parsed params: %v with length: %d", params, len(params)) + + ap.logf("csiDispatch: %v(%v)", cmd, params) + + switch cmd { + case "@": + return ap.eventHandler.ICH(getInt(params, 1)) + case "A": + return ap.eventHandler.CUU(getInt(params, 1)) + case "B": + return ap.eventHandler.CUD(getInt(params, 1)) + case "C": + return ap.eventHandler.CUF(getInt(params, 1)) + case "D": + return ap.eventHandler.CUB(getInt(params, 1)) + case "E": + return ap.eventHandler.CNL(getInt(params, 1)) + case "F": + return ap.eventHandler.CPL(getInt(params, 1)) + case "G": + return ap.eventHandler.CHA(getInt(params, 1)) + case "H": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.CUP(x, y) + case "J": + param := getEraseParam(params) + return ap.eventHandler.ED(param) + case "K": + param := getEraseParam(params) + return ap.eventHandler.EL(param) + case "L": + return ap.eventHandler.IL(getInt(params, 1)) + case "M": + return ap.eventHandler.DL(getInt(params, 1)) + case "P": + return ap.eventHandler.DCH(getInt(params, 1)) + case "S": + return ap.eventHandler.SU(getInt(params, 1)) + case "T": + return ap.eventHandler.SD(getInt(params, 1)) + case "c": + return ap.eventHandler.DA(params) + case "d": + return ap.eventHandler.VPA(getInt(params, 1)) + case "f": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.HVP(x, y) + case "h": + return ap.hDispatch(params) + case "l": + return ap.lDispatch(params) + case "m": + return ap.eventHandler.SGR(getInts(params, 1, 0)) + case "r": + ints := getInts(params, 2, 1) + top, bottom := ints[0], ints[1] + return ap.eventHandler.DECSTBM(top, bottom) + default: + ap.logf("ERROR: Unsupported CSI command: '%s', with full context: %v", cmd, ap.context) + return nil + } + +} + +func (ap *AnsiParser) print() error { + return ap.eventHandler.Print(ap.context.currentChar) +} + +func (ap *AnsiParser) clear() error { + ap.context = &ansiContext{} + return nil +} + +func (ap *AnsiParser) execute() error { + return ap.eventHandler.Execute(ap.context.currentChar) +}
  30. Download patch cli/vendor/github.com/Azure/go-ansiterm/event_handler.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/event_handler.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/event_handler.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,90 @@ +package ansiterm + +type AnsiEventHandler interface { + // Print + Print(b byte) error + + // Execute C0 commands + Execute(b byte) error + + // CUrsor Up + CUU(int) error + + // CUrsor Down + CUD(int) error + + // CUrsor Forward + CUF(int) error + + // CUrsor Backward + CUB(int) error + + // Cursor to Next Line + CNL(int) error + + // Cursor to Previous Line + CPL(int) error + + // Cursor Horizontal position Absolute + CHA(int) error + + // Vertical line Position Absolute + VPA(int) error + + // CUrsor Position + CUP(int, int) error + + // Horizontal and Vertical Position (depends on PUM) + HVP(int, int) error + + // Text Cursor Enable Mode + DECTCEM(bool) error + + // Origin Mode + DECOM(bool) error + + // 132 Column Mode + DECCOLM(bool) error + + // Erase in Display + ED(int) error + + // Erase in Line + EL(int) error + + // Insert Line + IL(int) error + + // Delete Line + DL(int) error + + // Insert Character + ICH(int) error + + // Delete Character + DCH(int) error + + // Set Graphics Rendition + SGR([]int) error + + // Pan Down + SU(int) error + + // Pan Up + SD(int) error + + // Device Attributes + DA([]string) error + + // Set Top and Bottom Margins + DECSTBM(int, int) error + + // Index + IND() error + + // Reverse Index + RI() error + + // Flush updates from previous commands + Flush() error +}
  31. Download patch cli/vendor/github.com/containerd/containerd/defaults/defaults.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/defaults/defaults.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/defaults/defaults.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,32 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package defaults + +const ( + // DefaultMaxRecvMsgSize defines the default maximum message size for + // receiving protobufs passed over the GRPC API. + DefaultMaxRecvMsgSize = 16 << 20 + // DefaultMaxSendMsgSize defines the default maximum message size for + // sending protobufs passed over the GRPC API. + DefaultMaxSendMsgSize = 16 << 20 + // DefaultRuntimeNSLabel defines the namespace label to check for the + // default runtime + DefaultRuntimeNSLabel = "containerd.io/defaults/runtime" + // DefaultSnapshotterNSLabel defines the namespace label to check for the + // default snapshotter + DefaultSnapshotterNSLabel = "containerd.io/defaults/snapshotter" +)
  32. Download patch cli/vendor/github.com/containerd/containerd/content/local/store_unix.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/local/store_unix.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/local/store_unix.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,35 @@ +// +build linux solaris darwin freebsd netbsd + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "syscall" + "time" + + "github.com/containerd/containerd/sys" +) + +func getATime(fi os.FileInfo) time.Time { + if st, ok := fi.Sys().(*syscall.Stat_t); ok { + return sys.StatATimeAsTime(st) + } + + return fi.ModTime() +}
  33. Download patch cli/vendor/github.com/cespare/xxhash/v2/LICENSE.txt

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/LICENSE.txt 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/LICENSE.txt 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,22 @@ +Copyright (c) 2016 Caleb Spare + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  34. Download patch cli/vendor/github.com/containerd/containerd/defaults/doc.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/defaults/doc.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/defaults/doc.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,19 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package defaults provides several common defaults for interacting with +// containerd. These can be used on the client-side or server-side. +package defaults
  35. Download patch cli/experimental/README.md

    --- 20.10.1+dfsg1-1/cli/experimental/README.md 2020-12-15 02:27:14.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/experimental/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -41,7 +41,7 @@ Metrics (Prometheus) output for basic co * [External graphdriver plugins](../docs/extend/plugins_graphdriver.md) * [Ipvlan Network Drivers](vlan-networks.md) * [Checkpoint & Restore](checkpoint-restore.md) - * [Docker build with --squash argument](../docs/reference/commandline/build.md#squash-an-images-layers---squash-experimental-only) + * [Docker build with --squash argument](../docs/reference/commandline/build.md#squash-an-images-layers---squash-experimental) ## How to comment on an experimental feature
  36. Download patch cli/vendor/github.com/containerd/cgroups/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/cgroups/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/cgroups/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,149 @@ +# cgroups + +[![Build Status](https://github.com/containerd/cgroups/workflows/CI/badge.svg)](https://github.com/containerd/cgroups/actions?query=workflow%3ACI) +[![codecov](https://codecov.io/gh/containerd/cgroups/branch/master/graph/badge.svg)](https://codecov.io/gh/containerd/cgroups) +[![GoDoc](https://godoc.org/github.com/containerd/cgroups?status.svg)](https://godoc.org/github.com/containerd/cgroups) +[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/cgroups)](https://goreportcard.com/report/github.com/containerd/cgroups) + +Go package for creating, managing, inspecting, and destroying cgroups. +The resources format for settings on the cgroup uses the OCI runtime-spec found +[here](https://github.com/opencontainers/runtime-spec). + +## Examples + +### Create a new cgroup + +This creates a new cgroup using a static path for all subsystems under `/test`. + +* /sys/fs/cgroup/cpu/test +* /sys/fs/cgroup/memory/test +* etc.... + +It uses a single hierarchy and specifies cpu shares as a resource constraint and +uses the v1 implementation of cgroups. + + +```go +shares := uint64(100) +control, err := cgroups.New(cgroups.V1, cgroups.StaticPath("/test"), &specs.LinuxResources{ + CPU: &specs.CPU{ + Shares: &shares, + }, +}) +defer control.Delete() +``` + +### Create with systemd slice support + + +```go +control, err := cgroups.New(cgroups.Systemd, cgroups.Slice("system.slice", "runc-test"), &specs.LinuxResources{ + CPU: &specs.CPU{ + Shares: &shares, + }, +}) + +``` + +### Load an existing cgroup + +```go +control, err = cgroups.Load(cgroups.V1, cgroups.StaticPath("/test")) +``` + +### Add a process to the cgroup + +```go +if err := control.Add(cgroups.Process{Pid:1234}); err != nil { +} +``` + +### Update the cgroup + +To update the resources applied in the cgroup + +```go +shares = uint64(200) +if err := control.Update(&specs.LinuxResources{ + CPU: &specs.LinuxCPU{ + Shares: &shares, + }, +}); err != nil { +} +``` + +### Freeze and Thaw the cgroup + +```go +if err := control.Freeze(); err != nil { +} +if err := control.Thaw(); err != nil { +} +``` + +### List all processes in the cgroup or recursively + +```go +processes, err := control.Processes(cgroups.Devices, recursive) +``` + +### Get Stats on the cgroup + +```go +stats, err := control.Stat() +``` + +By adding `cgroups.IgnoreNotExist` all non-existent files will be ignored, e.g. swap memory stats without swap enabled +```go +stats, err := control.Stat(cgroups.IgnoreNotExist) +``` + +### Move process across cgroups + +This allows you to take processes from one cgroup and move them to another. + +```go +err := control.MoveTo(destination) +``` + +### Create subcgroup + +```go +subCgroup, err := control.New("child", resources) +``` + +### Registering for memory events + +This allows you to get notified by an eventfd for v1 memory cgroups events. + +```go +event := cgroups.MemoryThresholdEvent(50 * 1024 * 1024, false) +efd, err := control.RegisterMemoryEvent(event) +``` + +```go +event := cgroups.MemoryPressureEvent(cgroups.MediumPressure, cgroups.DefaultMode) +efd, err := control.RegisterMemoryEvent(event) +``` + +```go +efd, err := control.OOMEventFD() +// or by using RegisterMemoryEvent +event := cgroups.OOMEvent() +efd, err := control.RegisterMemoryEvent(event) +``` + +### Attention + +All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name + +## Project details + +Cgroups is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + + * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository.
  37. Download patch cli/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,99 @@ +package ansiterm + +import ( + "strconv" +) + +func parseParams(bytes []byte) ([]string, error) { + paramBuff := make([]byte, 0, 0) + params := []string{} + + for _, v := range bytes { + if v == ';' { + if len(paramBuff) > 0 { + // Completed parameter, append it to the list + s := string(paramBuff) + params = append(params, s) + paramBuff = make([]byte, 0, 0) + } + } else { + paramBuff = append(paramBuff, v) + } + } + + // Last parameter may not be terminated with ';' + if len(paramBuff) > 0 { + s := string(paramBuff) + params = append(params, s) + } + + return params, nil +} + +func parseCmd(context ansiContext) (string, error) { + return string(context.currentChar), nil +} + +func getInt(params []string, dflt int) int { + i := getInts(params, 1, dflt)[0] + return i +} + +func getInts(params []string, minCount int, dflt int) []int { + ints := []int{} + + for _, v := range params { + i, _ := strconv.Atoi(v) + // Zero is mapped to the default value in VT100. + if i == 0 { + i = dflt + } + ints = append(ints, i) + } + + if len(ints) < minCount { + remaining := minCount - len(ints) + for i := 0; i < remaining; i++ { + ints = append(ints, dflt) + } + } + + return ints +} + +func (ap *AnsiParser) modeDispatch(param string, set bool) error { + switch param { + case "?3": + return ap.eventHandler.DECCOLM(set) + case "?6": + return ap.eventHandler.DECOM(set) + case "?25": + return ap.eventHandler.DECTCEM(set) + } + return nil +} + +func (ap *AnsiParser) hDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], true) + } + + return nil +} + +func (ap *AnsiParser) lDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], false) + } + + return nil +} + +func getEraseParam(params []string) int { + param := getInt(params, 0) + if param < 0 || 3 < param { + param = 0 + } + + return param +}
  38. Download patch cli/vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.go
  39. Download patch cli/vendor/github.com/agl/ed25519/ed25519.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/agl/ed25519/ed25519.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/agl/ed25519/ed25519.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,127 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ed25519 implements the Ed25519 signature algorithm. See +// http://ed25519.cr.yp.to/. +package ed25519 + +// This code is a port of the public domain, "ref10" implementation of ed25519 +// from SUPERCOP. + +import ( + "crypto/sha512" + "crypto/subtle" + "io" + + "github.com/agl/ed25519/edwards25519" +) + +const ( + PublicKeySize = 32 + PrivateKeySize = 64 + SignatureSize = 64 +) + +// GenerateKey generates a public/private key pair using randomness from rand. +func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error) { + privateKey = new([64]byte) + publicKey = new([32]byte) + _, err = io.ReadFull(rand, privateKey[:32]) + if err != nil { + return nil, nil, err + } + + h := sha512.New() + h.Write(privateKey[:32]) + digest := h.Sum(nil) + + digest[0] &= 248 + digest[31] &= 127 + digest[31] |= 64 + + var A edwards25519.ExtendedGroupElement + var hBytes [32]byte + copy(hBytes[:], digest) + edwards25519.GeScalarMultBase(&A, &hBytes) + A.ToBytes(publicKey) + + copy(privateKey[32:], publicKey[:]) + return +} + +// Sign signs the message with privateKey and returns a signature. +func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte { + h := sha512.New() + h.Write(privateKey[:32]) + + var digest1, messageDigest, hramDigest [64]byte + var expandedSecretKey [32]byte + h.Sum(digest1[:0]) + copy(expandedSecretKey[:], digest1[:]) + expandedSecretKey[0] &= 248 + expandedSecretKey[31] &= 63 + expandedSecretKey[31] |= 64 + + h.Reset() + h.Write(digest1[32:]) + h.Write(message) + h.Sum(messageDigest[:0]) + + var messageDigestReduced [32]byte + edwards25519.ScReduce(&messageDigestReduced, &messageDigest) + var R edwards25519.ExtendedGroupElement + edwards25519.GeScalarMultBase(&R, &messageDigestReduced) + + var encodedR [32]byte + R.ToBytes(&encodedR) + + h.Reset() + h.Write(encodedR[:]) + h.Write(privateKey[32:]) + h.Write(message) + h.Sum(hramDigest[:0]) + var hramDigestReduced [32]byte + edwards25519.ScReduce(&hramDigestReduced, &hramDigest) + + var s [32]byte + edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced) + + signature := new([64]byte) + copy(signature[:], encodedR[:]) + copy(signature[32:], s[:]) + return signature +} + +// Verify returns true iff sig is a valid signature of message by publicKey. +func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool { + if sig[63]&224 != 0 { + return false + } + + var A edwards25519.ExtendedGroupElement + if !A.FromBytes(publicKey) { + return false + } + edwards25519.FeNeg(&A.X, &A.X) + edwards25519.FeNeg(&A.T, &A.T) + + h := sha512.New() + h.Write(sig[:32]) + h.Write(publicKey[:]) + h.Write(message) + var digest [64]byte + h.Sum(digest[:0]) + + var hReduced [32]byte + edwards25519.ScReduce(&hReduced, &digest) + + var R edwards25519.ProjectiveGroupElement + var b [32]byte + copy(b[:], sig[32:]) + edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b) + + var checkR [32]byte + R.ToBytes(&checkR) + return subtle.ConstantTimeCompare(sig[:32], checkR[:]) == 1 +}
  40. Download patch cli/vendor/github.com/containerd/console/tc_solaris_cgo.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_solaris_cgo.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_solaris_cgo.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,51 @@ +// +build solaris,cgo + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "os" + + "golang.org/x/sys/unix" +) + +//#include <stdlib.h> +import "C" + +const ( + cmdTcGet = unix.TCGETS + cmdTcSet = unix.TCSETS +) + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + ptspath, err := C.ptsname(C.int(f.Fd())) + if err != nil { + return "", err + } + return C.GoString(ptspath), nil +} + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +func unlockpt(f *os.File) error { + if _, err := C.grantpt(C.int(f.Fd())); err != nil { + return err + } + return nil +}
  41. Download patch cli/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h

    --- 20.10.1+dfsg1-1/cli/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclinetest.h 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,9 @@ +// +build ignore + +// Empty include file to generate z symbols + + + + + +// EOF
  42. Download patch cli/vendor/github.com/containerd/containerd/content/local/store.go
  43. Download patch cli/vendor/github.com/containerd/console/tc_darwin.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_darwin.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_darwin.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,44 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "fmt" + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TIOCGETA + cmdTcSet = unix.TIOCSETA +) + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +func unlockpt(f *os.File) error { + return unix.IoctlSetPointerInt(int(f.Fd()), unix.TIOCPTYUNLK, 0) +} + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCPTYGNAME) + if err != nil { + return "", err + } + return fmt.Sprintf("/dev/pts/%d", n), nil +}
  44. Download patch cli/vendor/github.com/containerd/containerd/content/local/writer.go
  45. Download patch cli/vendor/github.com/beorn7/perks/quantile/stream.go
  46. Download patch cli/vendor/github.com/Azure/go-ansiterm/csi_param_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/csi_param_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/csi_param_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,38 @@ +package ansiterm + +type csiParamState struct { + baseState +} + +func (csiState csiParamState) Handle(b byte) (s state, e error) { + csiState.parser.logf("CsiParam::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + csiState.parser.collectParam() + return csiState, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiParamState) Transition(s state) error { + csiState.parser.logf("CsiParam::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + } + + return nil +}
  47. Download patch cli/.github/PULL_REQUEST_TEMPLATE.md

    --- 20.10.1+dfsg1-1/cli/.github/PULL_REQUEST_TEMPLATE.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/.github/PULL_REQUEST_TEMPLATE.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,30 @@ +<!-- +Please make sure you've read and understood our contributing guidelines; +https://github.com/docker/cli/blob/master/CONTRIBUTING.md + +** Make sure all your commits include a signature generated with `git commit -s` ** + +For additional information on our contributing process, read our contributing +guide https://docs.docker.com/opensource/code/ + +If this is a bug fix, make sure your description includes "fixes #xxxx", or +"closes #xxxx" + +Please provide the following information: +--> + +**- What I did** + +**- How I did it** + +**- How to verify it** + +**- Description for the changelog** +<!-- +Write a short (one line) summary that describes the changes in this +pull request for inclusion in the changelog: +--> + + +**- A picture of a cute animal (not mandatory but encouraged)** +
  48. Download patch cli/vendor/github.com/containerd/containerd/content/helpers.go
  49. Download patch cli/vendor/github.com/containerd/console/tc_openbsd_nocgo.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_openbsd_nocgo.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_openbsd_nocgo.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,47 @@ +// +build openbsd,!cgo + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// +// Implementing the functions below requires cgo support. Non-cgo stubs +// versions are defined below to enable cross-compilation of source code +// that depends on these functions, but the resultant cross-compiled +// binaries cannot actually be used. If the stub function(s) below are +// actually invoked they will display an error message and cause the +// calling process to exit. +// + +package console + +import ( + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TIOCGETA + cmdTcSet = unix.TIOCSETA +) + +func ptsname(f *os.File) (string, error) { + panic("ptsname() support requires cgo.") +} + +func unlockpt(f *os.File) error { + panic("unlockpt() support requires cgo.") +}
  50. Download patch cli/vendor/github.com/containerd/cgroups/LICENSE
  51. Download patch cli/.github/CODEOWNERS

    --- 20.10.1+dfsg1-1/cli/.github/CODEOWNERS 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/.github/CODEOWNERS 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,7 @@ +# GitHub code owners +# See https://github.com/blog/2392-introducing-code-owners + +cli/command/stack/** @silvin-lubecki +contrib/completion/bash/** @albers +contrib/completion/zsh/** @sdurrheimer +docs/** @thaJeztah
  52. Download patch cli/vendor/github.com/containerd/containerd/content/proxy/content_writer.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/proxy/content_writer.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/proxy/content_writer.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,139 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package proxy + +import ( + "context" + "io" + + contentapi "github.com/containerd/containerd/api/services/content/v1" + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + digest "github.com/opencontainers/go-digest" + "github.com/pkg/errors" +) + +type remoteWriter struct { + ref string + client contentapi.Content_WriteClient + offset int64 + digest digest.Digest +} + +// send performs a synchronous req-resp cycle on the client. +func (rw *remoteWriter) send(req *contentapi.WriteContentRequest) (*contentapi.WriteContentResponse, error) { + if err := rw.client.Send(req); err != nil { + return nil, err + } + + resp, err := rw.client.Recv() + + if err == nil { + // try to keep these in sync + if resp.Digest != "" { + rw.digest = resp.Digest + } + } + + return resp, err +} + +func (rw *remoteWriter) Status() (content.Status, error) { + resp, err := rw.send(&contentapi.WriteContentRequest{ + Action: contentapi.WriteActionStat, + }) + if err != nil { + return content.Status{}, errors.Wrap(errdefs.FromGRPC(err), "error getting writer status") + } + + return content.Status{ + Ref: rw.ref, + Offset: resp.Offset, + Total: resp.Total, + StartedAt: resp.StartedAt, + UpdatedAt: resp.UpdatedAt, + }, nil +} + +func (rw *remoteWriter) Digest() digest.Digest { + return rw.digest +} + +func (rw *remoteWriter) Write(p []byte) (n int, err error) { + offset := rw.offset + + resp, err := rw.send(&contentapi.WriteContentRequest{ + Action: contentapi.WriteActionWrite, + Offset: offset, + Data: p, + }) + if err != nil { + return 0, errors.Wrap(errdefs.FromGRPC(err), "failed to send write") + } + + n = int(resp.Offset - offset) + if n < len(p) { + err = io.ErrShortWrite + } + + rw.offset += int64(n) + if resp.Digest != "" { + rw.digest = resp.Digest + } + return +} + +func (rw *remoteWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { + var base content.Info + for _, opt := range opts { + if err := opt(&base); err != nil { + return err + } + } + resp, err := rw.send(&contentapi.WriteContentRequest{ + Action: contentapi.WriteActionCommit, + Total: size, + Offset: rw.offset, + Expected: expected, + Labels: base.Labels, + }) + if err != nil { + return errors.Wrap(errdefs.FromGRPC(err), "commit failed") + } + + if size != 0 && resp.Offset != size { + return errors.Errorf("unexpected size: %v != %v", resp.Offset, size) + } + + if expected != "" && resp.Digest != expected { + return errors.Errorf("unexpected digest: %v != %v", resp.Digest, expected) + } + + rw.digest = resp.Digest + rw.offset = resp.Offset + return nil +} + +func (rw *remoteWriter) Truncate(size int64) error { + // This truncation won't actually be validated until a write is issued. + rw.offset = size + return nil +} + +func (rw *remoteWriter) Close() error { + return rw.client.CloseSend() +}
  53. Download patch cli/vendor/github.com/containerd/console/console_windows.go
  54. Download patch cli/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,36 @@ +package ansiterm + +type escapeIntermediateState struct { + baseState +} + +func (escState escapeIntermediateState) Handle(b byte) (s state, e error) { + escState.parser.logf("escapeIntermediateState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(intermeds, b): + return escState, escState.parser.collectInter() + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeIntermediateToGroundBytes, b): + return escState.parser.ground, nil + } + + return escState, nil +} + +func (escState escapeIntermediateState) Transition(s state) error { + escState.parser.logf("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + } + + return nil +}
  55. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,13 @@ +// +build !appengine +// +build gc +// +build !purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +// +//go:noescape +func Sum64(b []byte) uint64 + +//go:noescape +func writeBlocks(d *Digest, b []byte) int
  56. Download patch cli/vendor/github.com/Azure/go-ansiterm/constants.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/constants.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/constants.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,188 @@ +package ansiterm + +const LogEnv = "DEBUG_TERMINAL" + +// ANSI constants +// References: +// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm +// -- http://man7.org/linux/man-pages/man4/console_codes.4.html +// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html +// -- http://en.wikipedia.org/wiki/ANSI_escape_code +// -- http://vt100.net/emu/dec_ansi_parser +// -- http://vt100.net/emu/vt500_parser.svg +// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html +// -- http://www.inwap.com/pdp10/ansicode.txt +const ( + // ECMA-48 Set Graphics Rendition + // Note: + // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved + // -- Fonts could possibly be supported via SetCurrentConsoleFontEx + // -- Windows does not expose the per-window cursor (i.e., caret) blink times + ANSI_SGR_RESET = 0 + ANSI_SGR_BOLD = 1 + ANSI_SGR_DIM = 2 + _ANSI_SGR_ITALIC = 3 + ANSI_SGR_UNDERLINE = 4 + _ANSI_SGR_BLINKSLOW = 5 + _ANSI_SGR_BLINKFAST = 6 + ANSI_SGR_REVERSE = 7 + _ANSI_SGR_INVISIBLE = 8 + _ANSI_SGR_LINETHROUGH = 9 + _ANSI_SGR_FONT_00 = 10 + _ANSI_SGR_FONT_01 = 11 + _ANSI_SGR_FONT_02 = 12 + _ANSI_SGR_FONT_03 = 13 + _ANSI_SGR_FONT_04 = 14 + _ANSI_SGR_FONT_05 = 15 + _ANSI_SGR_FONT_06 = 16 + _ANSI_SGR_FONT_07 = 17 + _ANSI_SGR_FONT_08 = 18 + _ANSI_SGR_FONT_09 = 19 + _ANSI_SGR_FONT_10 = 20 + _ANSI_SGR_DOUBLEUNDERLINE = 21 + ANSI_SGR_BOLD_DIM_OFF = 22 + _ANSI_SGR_ITALIC_OFF = 23 + ANSI_SGR_UNDERLINE_OFF = 24 + _ANSI_SGR_BLINK_OFF = 25 + _ANSI_SGR_RESERVED_00 = 26 + ANSI_SGR_REVERSE_OFF = 27 + _ANSI_SGR_INVISIBLE_OFF = 28 + _ANSI_SGR_LINETHROUGH_OFF = 29 + ANSI_SGR_FOREGROUND_BLACK = 30 + ANSI_SGR_FOREGROUND_RED = 31 + ANSI_SGR_FOREGROUND_GREEN = 32 + ANSI_SGR_FOREGROUND_YELLOW = 33 + ANSI_SGR_FOREGROUND_BLUE = 34 + ANSI_SGR_FOREGROUND_MAGENTA = 35 + ANSI_SGR_FOREGROUND_CYAN = 36 + ANSI_SGR_FOREGROUND_WHITE = 37 + _ANSI_SGR_RESERVED_01 = 38 + ANSI_SGR_FOREGROUND_DEFAULT = 39 + ANSI_SGR_BACKGROUND_BLACK = 40 + ANSI_SGR_BACKGROUND_RED = 41 + ANSI_SGR_BACKGROUND_GREEN = 42 + ANSI_SGR_BACKGROUND_YELLOW = 43 + ANSI_SGR_BACKGROUND_BLUE = 44 + ANSI_SGR_BACKGROUND_MAGENTA = 45 + ANSI_SGR_BACKGROUND_CYAN = 46 + ANSI_SGR_BACKGROUND_WHITE = 47 + _ANSI_SGR_RESERVED_02 = 48 + ANSI_SGR_BACKGROUND_DEFAULT = 49 + // 50 - 65: Unsupported + + ANSI_MAX_CMD_LENGTH = 4096 + + MAX_INPUT_EVENTS = 128 + DEFAULT_WIDTH = 80 + DEFAULT_HEIGHT = 24 + + ANSI_BEL = 0x07 + ANSI_BACKSPACE = 0x08 + ANSI_TAB = 0x09 + ANSI_LINE_FEED = 0x0A + ANSI_VERTICAL_TAB = 0x0B + ANSI_FORM_FEED = 0x0C + ANSI_CARRIAGE_RETURN = 0x0D + ANSI_ESCAPE_PRIMARY = 0x1B + ANSI_ESCAPE_SECONDARY = 0x5B + ANSI_OSC_STRING_ENTRY = 0x5D + ANSI_COMMAND_FIRST = 0x40 + ANSI_COMMAND_LAST = 0x7E + DCS_ENTRY = 0x90 + CSI_ENTRY = 0x9B + OSC_STRING = 0x9D + ANSI_PARAMETER_SEP = ";" + ANSI_CMD_G0 = '(' + ANSI_CMD_G1 = ')' + ANSI_CMD_G2 = '*' + ANSI_CMD_G3 = '+' + ANSI_CMD_DECPNM = '>' + ANSI_CMD_DECPAM = '=' + ANSI_CMD_OSC = ']' + ANSI_CMD_STR_TERM = '\\' + + KEY_CONTROL_PARAM_2 = ";2" + KEY_CONTROL_PARAM_3 = ";3" + KEY_CONTROL_PARAM_4 = ";4" + KEY_CONTROL_PARAM_5 = ";5" + KEY_CONTROL_PARAM_6 = ";6" + KEY_CONTROL_PARAM_7 = ";7" + KEY_CONTROL_PARAM_8 = ";8" + KEY_ESC_CSI = "\x1B[" + KEY_ESC_N = "\x1BN" + KEY_ESC_O = "\x1BO" + + FILL_CHARACTER = ' ' +) + +func getByteRange(start byte, end byte) []byte { + bytes := make([]byte, 0, 32) + for i := start; i <= end; i++ { + bytes = append(bytes, byte(i)) + } + + return bytes +} + +var toGroundBytes = getToGroundBytes() +var executors = getExecuteBytes() + +// SPACE 20+A0 hex Always and everywhere a blank space +// Intermediate 20-2F hex !"#$%&'()*+,-./ +var intermeds = getByteRange(0x20, 0x2F) + +// Parameters 30-3F hex 0123456789:;<=>? +// CSI Parameters 30-39, 3B hex 0123456789; +var csiParams = getByteRange(0x30, 0x3F) + +var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...) + +// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +var upperCase = getByteRange(0x40, 0x5F) + +// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~ +var lowerCase = getByteRange(0x60, 0x7E) + +// Alphabetics 40-7E hex (all of upper and lower case) +var alphabetics = append(upperCase, lowerCase...) + +var printables = getByteRange(0x20, 0x7F) + +var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E) +var escapeToGroundBytes = getEscapeToGroundBytes() + +// See http://www.vt100.net/emu/vt500_parser.png for description of the complex +// byte ranges below + +func getEscapeToGroundBytes() []byte { + escapeToGroundBytes := getByteRange(0x30, 0x4F) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...) + escapeToGroundBytes = append(escapeToGroundBytes, 0x59) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5A) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5C) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...) + return escapeToGroundBytes +} + +func getExecuteBytes() []byte { + executeBytes := getByteRange(0x00, 0x17) + executeBytes = append(executeBytes, 0x19) + executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...) + return executeBytes +} + +func getToGroundBytes() []byte { + groundBytes := []byte{0x18} + groundBytes = append(groundBytes, 0x1A) + groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...) + groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...) + groundBytes = append(groundBytes, 0x99) + groundBytes = append(groundBytes, 0x9A) + groundBytes = append(groundBytes, 0x9C) + return groundBytes +} + +// Delete 7F hex Always and everywhere ignored +// C1 Control 80-9F hex 32 additional control characters +// G1 Displayable A1-FE hex 94 additional displayable characters +// Special A0+FF hex Same as SPACE and DELETE
  57. Download patch cli/vendor/github.com/containerd/containerd/defaults/defaults_unix.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/defaults/defaults_unix.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/defaults/defaults_unix.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,37 @@ +// +build !windows + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package defaults + +const ( + // DefaultRootDir is the default location used by containerd to store + // persistent data + DefaultRootDir = "/var/lib/containerd" + // DefaultStateDir is the default location used by containerd to store + // transient data + DefaultStateDir = "/run/containerd" + // DefaultAddress is the default unix socket address + DefaultAddress = "/run/containerd/containerd.sock" + // DefaultDebugAddress is the default unix socket address for pprof data + DefaultDebugAddress = "/run/containerd/debug.sock" + // DefaultFIFODir is the default location used by client-side cio library + // to store FIFOs. + DefaultFIFODir = "/run/containerd/fifo" + // DefaultRuntime is the default linux runtime + DefaultRuntime = "io.containerd.runc.v2" +)
  58. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,100 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +const ( + FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE +) + +// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the +// request represented by the passed ANSI mode. +func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) { + switch ansiMode { + + // Mode styles + case ansiterm.ANSI_SGR_BOLD: + windowsMode = windowsMode | FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF: + windowsMode &^= FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_UNDERLINE: + windowsMode = windowsMode | COMMON_LVB_UNDERSCORE + + case ansiterm.ANSI_SGR_REVERSE: + inverted = true + + case ansiterm.ANSI_SGR_REVERSE_OFF: + inverted = false + + case ansiterm.ANSI_SGR_UNDERLINE_OFF: + windowsMode &^= COMMON_LVB_UNDERSCORE + + // Foreground colors + case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT: + windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_BLACK: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_RED: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED + + case ansiterm.ANSI_SGR_FOREGROUND_GREEN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_YELLOW: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_BLUE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_CYAN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_WHITE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + + // Background colors + case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT: + // Black with no intensity + windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_BLACK: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_RED: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED + + case ansiterm.ANSI_SGR_BACKGROUND_GREEN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_YELLOW: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_BLUE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_CYAN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_WHITE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE + } + + return windowsMode, inverted +} + +// invertAttributes inverts the foreground and background colors of a Windows attributes value +func invertAttributes(windowsMode uint16) uint16 { + return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4) +}
  59. Download patch cli/vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go
  60. Download patch cli/vendor/github.com/containerd/containerd/filters/parser.go
  61. Download patch cli/vendor/github.com/containerd/containerd/content/content.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/content.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/content.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,182 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package content + +import ( + "context" + "io" + "time" + + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +// ReaderAt extends the standard io.ReaderAt interface with reporting of Size and io.Closer +type ReaderAt interface { + io.ReaderAt + io.Closer + Size() int64 +} + +// Provider provides a reader interface for specific content +type Provider interface { + // ReaderAt only requires desc.Digest to be set. + // Other fields in the descriptor may be used internally for resolving + // the location of the actual data. + ReaderAt(ctx context.Context, dec ocispec.Descriptor) (ReaderAt, error) +} + +// Ingester writes content +type Ingester interface { + // Some implementations require WithRef to be included in opts. + Writer(ctx context.Context, opts ...WriterOpt) (Writer, error) +} + +// Info holds content specific information +// +// TODO(stevvooe): Consider a very different name for this struct. Info is way +// to general. It also reads very weird in certain context, like pluralization. +type Info struct { + Digest digest.Digest + Size int64 + CreatedAt time.Time + UpdatedAt time.Time + Labels map[string]string +} + +// Status of a content operation +type Status struct { + Ref string + Offset int64 + Total int64 + Expected digest.Digest + StartedAt time.Time + UpdatedAt time.Time +} + +// WalkFunc defines the callback for a blob walk. +type WalkFunc func(Info) error + +// Manager provides methods for inspecting, listing and removing content. +type Manager interface { + // Info will return metadata about content available in the content store. + // + // If the content is not present, ErrNotFound will be returned. + Info(ctx context.Context, dgst digest.Digest) (Info, error) + + // Update updates mutable information related to content. + // If one or more fieldpaths are provided, only those + // fields will be updated. + // Mutable fields: + // labels.* + Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error) + + // Walk will call fn for each item in the content store which + // match the provided filters. If no filters are given all + // items will be walked. + Walk(ctx context.Context, fn WalkFunc, filters ...string) error + + // Delete removes the content from the store. + Delete(ctx context.Context, dgst digest.Digest) error +} + +// IngestManager provides methods for managing ingests. +type IngestManager interface { + // Status returns the status of the provided ref. + Status(ctx context.Context, ref string) (Status, error) + + // ListStatuses returns the status of any active ingestions whose ref match the + // provided regular expression. If empty, all active ingestions will be + // returned. + ListStatuses(ctx context.Context, filters ...string) ([]Status, error) + + // Abort completely cancels the ingest operation targeted by ref. + Abort(ctx context.Context, ref string) error +} + +// Writer handles the write of content into a content store +type Writer interface { + // Close closes the writer, if the writer has not been + // committed this allows resuming or aborting. + // Calling Close on a closed writer will not error. + io.WriteCloser + + // Digest may return empty digest or panics until committed. + Digest() digest.Digest + + // Commit commits the blob (but no roll-back is guaranteed on an error). + // size and expected can be zero-value when unknown. + // Commit always closes the writer, even on error. + // ErrAlreadyExists aborts the writer. + Commit(ctx context.Context, size int64, expected digest.Digest, opts ...Opt) error + + // Status returns the current state of write + Status() (Status, error) + + // Truncate updates the size of the target blob + Truncate(size int64) error +} + +// Store combines the methods of content-oriented interfaces into a set that +// are commonly provided by complete implementations. +type Store interface { + Manager + Provider + IngestManager + Ingester +} + +// Opt is used to alter the mutable properties of content +type Opt func(*Info) error + +// WithLabels allows labels to be set on content +func WithLabels(labels map[string]string) Opt { + return func(info *Info) error { + info.Labels = labels + return nil + } +} + +// WriterOpts is internally used by WriterOpt. +type WriterOpts struct { + Ref string + Desc ocispec.Descriptor +} + +// WriterOpt is used for passing options to Ingester.Writer. +type WriterOpt func(*WriterOpts) error + +// WithDescriptor specifies an OCI descriptor. +// Writer may optionally use the descriptor internally for resolving +// the location of the actual data. +// Write does not require any field of desc to be set. +// If the data size is unknown, desc.Size should be set to 0. +// Some implementations may also accept negative values as "unknown". +func WithDescriptor(desc ocispec.Descriptor) WriterOpt { + return func(opts *WriterOpts) error { + opts.Desc = desc + return nil + } +} + +// WithRef specifies a ref string. +func WithRef(ref string) WriterOpt { + return func(opts *WriterOpts) error { + opts.Ref = ref + return nil + } +}
  62. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash_other.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_other.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_other.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,76 @@ +// +build !amd64 appengine !gc purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +func Sum64(b []byte) uint64 { + // A simpler version would be + // d := New() + // d.Write(b) + // return d.Sum64() + // but this is faster, particularly for small inputs. + + n := len(b) + var h uint64 + + if n >= 32 { + v1 := prime1v + prime2 + v2 := prime2 + v3 := uint64(0) + v4 := -prime1v + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + h = mergeRound(h, v1) + h = mergeRound(h, v2) + h = mergeRound(h, v3) + h = mergeRound(h, v4) + } else { + h = prime5 + } + + h += uint64(n) + + i, end := 0, len(b) + for ; i+8 <= end; i += 8 { + k1 := round(0, u64(b[i:i+8:len(b)])) + h ^= k1 + h = rol27(h)*prime1 + prime4 + } + if i+4 <= end { + h ^= uint64(u32(b[i:i+4:len(b)])) * prime1 + h = rol23(h)*prime2 + prime3 + i += 4 + } + for ; i < end; i++ { + h ^= uint64(b[i]) * prime5 + h = rol11(h) * prime1 + } + + h ^= h >> 33 + h *= prime2 + h ^= h >> 29 + h *= prime3 + h ^= h >> 32 + + return h +} + +func writeBlocks(d *Digest, b []byte) int { + v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 + n := len(b) + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4 + return n - len(b) +}
  63. Download patch cli/vendor/github.com/containerd/containerd/content/local/locks.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/local/locks.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/local/locks.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,51 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "sync" + + "github.com/containerd/containerd/errdefs" + "github.com/pkg/errors" +) + +// Handles locking references + +var ( + // locks lets us lock in process + locks = map[string]struct{}{} + locksMu sync.Mutex +) + +func tryLock(ref string) error { + locksMu.Lock() + defer locksMu.Unlock() + + if _, ok := locks[ref]; ok { + return errors.Wrapf(errdefs.ErrUnavailable, "ref %s locked", ref) + } + + locks[ref] = struct{}{} + return nil +} + +func unlock(ref string) { + locksMu.Lock() + defer locksMu.Unlock() + + delete(locks, ref) +}
  64. Download patch cli/vendor/github.com/containerd/console/tc_netbsd.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/tc_netbsd.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/tc_netbsd.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,45 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "bytes" + "os" + + "golang.org/x/sys/unix" +) + +const ( + cmdTcGet = unix.TIOCGETA + cmdTcSet = unix.TIOCSETA +) + +// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. +// unlockpt should be called before opening the slave side of a pty. +// This does not exist on NetBSD, it does not allocate controlling terminals on open +func unlockpt(f *os.File) error { + return nil +} + +// ptsname retrieves the name of the first available pts for the given master. +func ptsname(f *os.File) (string, error) { + ptm, err := unix.IoctlGetPtmget(int(f.Fd()), unix.TIOCPTSNAME) + if err != nil { + return "", err + } + return string(ptm.Sn[:bytes.IndexByte(ptm.Sn[:], 0)]), nil +}
  65. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,46 @@ +// +build !appengine + +// This file encapsulates usage of unsafe. +// xxhash_safe.go contains the safe implementations. + +package xxhash + +import ( + "reflect" + "unsafe" +) + +// Notes: +// +// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ +// for some discussion about these unsafe conversions. +// +// In the future it's possible that compiler optimizations will make these +// unsafe operations unnecessary: https://golang.org/issue/2205. +// +// Both of these wrapper functions still incur function call overhead since they +// will not be inlined. We could write Go/asm copies of Sum64 and Digest.Write +// for strings to squeeze out a bit more speed. Mid-stack inlining should +// eventually fix this. + +// Sum64String computes the 64-bit xxHash digest of s. +// It may be faster than Sum64([]byte(s)) by avoiding a copy. +func Sum64String(s string) uint64 { + var b []byte + bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data + bh.Len = len(s) + bh.Cap = len(s) + return Sum64(b) +} + +// WriteString adds more data to d. It always returns len(s), nil. +// It may be faster than Write([]byte(s)) by avoiding a copy. +func (d *Digest) WriteString(s string) (n int, err error) { + var b []byte + bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data + bh.Len = len(s) + bh.Cap = len(s) + return d.Write(b) +}
  66. Download patch cli/vendor/github.com/containerd/containerd/filters/filter.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/filters/filter.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/filters/filter.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,179 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package filters defines a syntax and parser that can be used for the +// filtration of items across the containerd API. The core is built on the +// concept of protobuf field paths, with quoting. Several operators allow the +// user to flexibly select items based on field presence, equality, inequality +// and regular expressions. Flexible adaptors support working with any type. +// +// The syntax is fairly familiar, if you've used container ecosystem +// projects. At the core, we base it on the concept of protobuf field +// paths, augmenting with the ability to quote portions of the field path +// to match arbitrary labels. These "selectors" come in the following +// syntax: +// +// ``` +// <fieldpath>[<operator><value>] +// ``` +// +// A basic example is as follows: +// +// ``` +// name==foo +// ``` +// +// This would match all objects that have a field `name` with the value +// `foo`. If we only want to test if the field is present, we can omit the +// operator. This is most useful for matching labels in containerd. The +// following will match objects that have the field "labels" and have the +// label "foo" defined: +// +// ``` +// labels.foo +// ``` +// +// We also allow for quoting of parts of the field path to allow matching +// of arbitrary items: +// +// ``` +// labels."very complex label"==something +// ``` +// +// We also define `!=` and `~=` as operators. The `!=` will match all +// objects that don't match the value for a field and `~=` will compile the +// target value as a regular expression and match the field value against that. +// +// Selectors can be combined using a comma, such that the resulting +// selector will require all selectors are matched for the object to match. +// The following example will match objects that are named `foo` and have +// the label `bar`: +// +// ``` +// name==foo,labels.bar +// ``` +// +package filters + +import ( + "regexp" + + "github.com/containerd/containerd/log" +) + +// Filter matches specific resources based the provided filter +type Filter interface { + Match(adaptor Adaptor) bool +} + +// FilterFunc is a function that handles matching with an adaptor +type FilterFunc func(Adaptor) bool + +// Match matches the FilterFunc returning true if the object matches the filter +func (fn FilterFunc) Match(adaptor Adaptor) bool { + return fn(adaptor) +} + +// Always is a filter that always returns true for any type of object +var Always FilterFunc = func(adaptor Adaptor) bool { + return true +} + +// Any allows multiple filters to be matched against the object +type Any []Filter + +// Match returns true if any of the provided filters are true +func (m Any) Match(adaptor Adaptor) bool { + for _, m := range m { + if m.Match(adaptor) { + return true + } + } + + return false +} + +// All allows multiple filters to be matched against the object +type All []Filter + +// Match only returns true if all filters match the object +func (m All) Match(adaptor Adaptor) bool { + for _, m := range m { + if !m.Match(adaptor) { + return false + } + } + + return true +} + +type operator int + +const ( + operatorPresent = iota + operatorEqual + operatorNotEqual + operatorMatches +) + +func (op operator) String() string { + switch op { + case operatorPresent: + return "?" + case operatorEqual: + return "==" + case operatorNotEqual: + return "!=" + case operatorMatches: + return "~=" + } + + return "unknown" +} + +type selector struct { + fieldpath []string + operator operator + value string + re *regexp.Regexp +} + +func (m selector) Match(adaptor Adaptor) bool { + value, present := adaptor.Field(m.fieldpath) + + switch m.operator { + case operatorPresent: + return present + case operatorEqual: + return present && value == m.value + case operatorNotEqual: + return value != m.value + case operatorMatches: + if m.re == nil { + r, err := regexp.Compile(m.value) + if err != nil { + log.L.Errorf("error compiling regexp %q", m.value) + return false + } + + m.re = r + } + + return m.re.MatchString(value) + default: + return false + } +}
  67. Download patch cli/vendor/github.com/containerd/containerd/content/proxy/content_reader.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/proxy/content_reader.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/proxy/content_reader.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,71 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package proxy + +import ( + "context" + + contentapi "github.com/containerd/containerd/api/services/content/v1" + digest "github.com/opencontainers/go-digest" +) + +type remoteReaderAt struct { + ctx context.Context + digest digest.Digest + size int64 + client contentapi.ContentClient +} + +func (ra *remoteReaderAt) Size() int64 { + return ra.size +} + +func (ra *remoteReaderAt) ReadAt(p []byte, off int64) (n int, err error) { + rr := &contentapi.ReadContentRequest{ + Digest: ra.digest, + Offset: off, + Size_: int64(len(p)), + } + // we need a child context with cancel, or the eventually called + // grpc.NewStream will leak the goroutine until the whole thing is cleared. + // See comment at https://godoc.org/google.golang.org/grpc#ClientConn.NewStream + childCtx, cancel := context.WithCancel(ra.ctx) + // we MUST cancel the child context; see comment above + defer cancel() + rc, err := ra.client.Read(childCtx, rr) + if err != nil { + return 0, err + } + + for len(p) > 0 { + var resp *contentapi.ReadContentResponse + // fill our buffer up until we can fill p. + resp, err = rc.Recv() + if err != nil { + return n, err + } + + copied := copy(p, resp.Data) + n += copied + p = p[copied:] + } + return n, nil +} + +func (ra *remoteReaderAt) Close() error { + return nil +}
  68. Download patch cli/vendor/github.com/containerd/containerd/api/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/api/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/api/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,18 @@ +This directory contains the GRPC API definitions for containerd. + +All defined services and messages have been aggregated into `*.pb.txt` +descriptors files in this directory. Definitions present here are considered +frozen after the release. + +At release time, the current `next.pb.txt` file will be moved into place to +freeze the API changes for the minor version. For example, when 1.0.0 is +released, `next.pb.txt` should be moved to `1.0.txt`. Notice that we leave off +the patch number, since the API will be completely locked down for a given +patch series. + +We may find that by default, protobuf descriptors are too noisy to lock down +API changes. In that case, we may filter out certain fields in the descriptors, +possibly regenerating for old versions. + +This process is similar to the [process used to ensure backwards compatibility +in Go](https://github.com/golang/go/tree/master/api).
  69. Download patch cli/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,49 @@ +package ansiterm + +type csiEntryState struct { + baseState +} + +func (csiState csiEntryState) Handle(b byte) (s state, e error) { + csiState.parser.logf("CsiEntry::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + return csiState.parser.csiParam, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiEntryState) Transition(s state) error { + csiState.parser.logf("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + case csiState.parser.csiParam: + switch { + case sliceContains(csiParams, csiState.parser.context.currentChar): + csiState.parser.collectParam() + case sliceContains(intermeds, csiState.parser.context.currentChar): + csiState.parser.collectInter() + } + } + + return nil +} + +func (csiState csiEntryState) Enter() error { + csiState.parser.clear() + return nil +}
  70. Download patch cli/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/pclntab.go
  71. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/api.go
  72. Download patch cli/vendor/github.com/containerd/console/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,27 @@ +# console + +[![Build Status](https://travis-ci.org/containerd/console.svg?branch=master)](https://travis-ci.org/containerd/console) + +Golang package for dealing with consoles. Light on deps and a simple API. + +## Modifying the current process + +```go +current := console.Current() +defer current.Reset() + +if err := current.SetRaw(); err != nil { +} +ws, err := current.Size() +current.Resize(ws) +``` + +## Project details + +console is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), + * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository.
  73. Download patch cli/vendor/github.com/Azure/go-ansiterm/escape_state.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/escape_state.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/escape_state.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,47 @@ +package ansiterm + +type escapeState struct { + baseState +} + +func (escState escapeState) Handle(b byte) (s state, e error) { + escState.parser.logf("escapeState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case b == ANSI_ESCAPE_SECONDARY: + return escState.parser.csiEntry, nil + case b == ANSI_OSC_STRING_ENTRY: + return escState.parser.oscString, nil + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeToGroundBytes, b): + return escState.parser.ground, nil + case sliceContains(intermeds, b): + return escState.parser.escapeIntermediate, nil + } + + return escState, nil +} + +func (escState escapeState) Transition(s state) error { + escState.parser.logf("Escape::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + case escState.parser.escapeIntermediate: + return escState.parser.collectInter() + } + + return nil +} + +func (escState escapeState) Enter() error { + escState.parser.clear() + return nil +}
  74. Download patch cli/vendor/cloud.google.com/go/LICENSE
  75. Download patch cli/vendor/github.com/Azure/go-ansiterm/LICENSE

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/LICENSE 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.
  76. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
  77. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,182 @@ +// +build windows + +package winterm + +import ( + "fmt" + "os" + "strconv" + "strings" + "syscall" + + "github.com/Azure/go-ansiterm" +) + +// Windows keyboard constants +// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx. +const ( + VK_PRIOR = 0x21 // PAGE UP key + VK_NEXT = 0x22 // PAGE DOWN key + VK_END = 0x23 // END key + VK_HOME = 0x24 // HOME key + VK_LEFT = 0x25 // LEFT ARROW key + VK_UP = 0x26 // UP ARROW key + VK_RIGHT = 0x27 // RIGHT ARROW key + VK_DOWN = 0x28 // DOWN ARROW key + VK_SELECT = 0x29 // SELECT key + VK_PRINT = 0x2A // PRINT key + VK_EXECUTE = 0x2B // EXECUTE key + VK_SNAPSHOT = 0x2C // PRINT SCREEN key + VK_INSERT = 0x2D // INS key + VK_DELETE = 0x2E // DEL key + VK_HELP = 0x2F // HELP key + VK_F1 = 0x70 // F1 key + VK_F2 = 0x71 // F2 key + VK_F3 = 0x72 // F3 key + VK_F4 = 0x73 // F4 key + VK_F5 = 0x74 // F5 key + VK_F6 = 0x75 // F6 key + VK_F7 = 0x76 // F7 key + VK_F8 = 0x77 // F8 key + VK_F9 = 0x78 // F9 key + VK_F10 = 0x79 // F10 key + VK_F11 = 0x7A // F11 key + VK_F12 = 0x7B // F12 key + + RIGHT_ALT_PRESSED = 0x0001 + LEFT_ALT_PRESSED = 0x0002 + RIGHT_CTRL_PRESSED = 0x0004 + LEFT_CTRL_PRESSED = 0x0008 + SHIFT_PRESSED = 0x0010 + NUMLOCK_ON = 0x0020 + SCROLLLOCK_ON = 0x0040 + CAPSLOCK_ON = 0x0080 + ENHANCED_KEY = 0x0100 +) + +type ansiCommand struct { + CommandBytes []byte + Command string + Parameters []string + IsSpecial bool +} + +func newAnsiCommand(command []byte) *ansiCommand { + + if isCharacterSelectionCmdChar(command[1]) { + // Is Character Set Selection commands + return &ansiCommand{ + CommandBytes: command, + Command: string(command), + IsSpecial: true, + } + } + + // last char is command character + lastCharIndex := len(command) - 1 + + ac := &ansiCommand{ + CommandBytes: command, + Command: string(command[lastCharIndex]), + IsSpecial: false, + } + + // more than a single escape + if lastCharIndex != 0 { + start := 1 + // skip if double char escape sequence + if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY { + start++ + } + // convert this to GetNextParam method + ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP) + } + + return ac +} + +func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 { + if index < 0 || index >= len(ac.Parameters) { + return defaultValue + } + + param, err := strconv.ParseInt(ac.Parameters[index], 10, 16) + if err != nil { + return defaultValue + } + + return int16(param) +} + +func (ac *ansiCommand) String() string { + return fmt.Sprintf("0x%v \"%v\" (\"%v\")", + bytesToHex(ac.CommandBytes), + ac.Command, + strings.Join(ac.Parameters, "\",\"")) +} + +// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands. +// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html. +func isAnsiCommandChar(b byte) bool { + switch { + case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY: + return true + case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM: + // non-CSI escape sequence terminator + return true + case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL: + // String escape sequence terminator + return true + } + return false +} + +func isXtermOscSequence(command []byte, current byte) bool { + return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL) +} + +func isCharacterSelectionCmdChar(b byte) bool { + return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3) +} + +// bytesToHex converts a slice of bytes to a human-readable string. +func bytesToHex(b []byte) string { + hex := make([]string, len(b)) + for i, ch := range b { + hex[i] = fmt.Sprintf("%X", ch) + } + return strings.Join(hex, "") +} + +// ensureInRange adjusts the passed value, if necessary, to ensure it is within +// the passed min / max range. +func ensureInRange(n int16, min int16, max int16) int16 { + if n < min { + return min + } else if n > max { + return max + } else { + return n + } +} + +func GetStdFile(nFile int) (*os.File, uintptr) { + var file *os.File + switch nFile { + case syscall.STD_INPUT_HANDLE: + file = os.Stdin + case syscall.STD_OUTPUT_HANDLE: + file = os.Stdout + case syscall.STD_ERROR_HANDLE: + file = os.Stderr + default: + panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile)) + } + + fd, err := syscall.GetStdHandle(nFile) + if err != nil { + panic(fmt.Errorf("Invalid standard handle identifier: %v -- %v", nFile, err)) + } + + return file, uintptr(fd) +}
  78. Download patch cli/vendor/github.com/containerd/console/go.mod

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/go.mod 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/go.mod 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,8 @@ +module github.com/containerd/console + +go 1.13 + +require ( + github.com/pkg/errors v0.9.1 + golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f +)
  79. Download patch cli/vendor/github.com/containerd/console/console_unix.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/console_unix.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/console_unix.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,158 @@ +// +build darwin freebsd linux netbsd openbsd solaris + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package console + +import ( + "os" + + "golang.org/x/sys/unix" +) + +// NewPty creates a new pty pair +// The master is returned as the first console and a string +// with the path to the pty slave is returned as the second +func NewPty() (Console, string, error) { + f, err := os.OpenFile("/dev/ptmx", unix.O_RDWR|unix.O_NOCTTY|unix.O_CLOEXEC, 0) + if err != nil { + return nil, "", err + } + slave, err := ptsname(f) + if err != nil { + return nil, "", err + } + if err := unlockpt(f); err != nil { + return nil, "", err + } + m, err := newMaster(f) + if err != nil { + return nil, "", err + } + return m, slave, nil +} + +type master struct { + f File + original *unix.Termios +} + +func (m *master) Read(b []byte) (int, error) { + return m.f.Read(b) +} + +func (m *master) Write(b []byte) (int, error) { + return m.f.Write(b) +} + +func (m *master) Close() error { + return m.f.Close() +} + +func (m *master) Resize(ws WinSize) error { + return tcswinsz(m.f.Fd(), ws) +} + +func (m *master) ResizeFrom(c Console) error { + ws, err := c.Size() + if err != nil { + return err + } + return m.Resize(ws) +} + +func (m *master) Reset() error { + if m.original == nil { + return nil + } + return tcset(m.f.Fd(), m.original) +} + +func (m *master) getCurrent() (unix.Termios, error) { + var termios unix.Termios + if err := tcget(m.f.Fd(), &termios); err != nil { + return unix.Termios{}, err + } + return termios, nil +} + +func (m *master) SetRaw() error { + rawState, err := m.getCurrent() + if err != nil { + return err + } + rawState = cfmakeraw(rawState) + rawState.Oflag = rawState.Oflag | unix.OPOST + return tcset(m.f.Fd(), &rawState) +} + +func (m *master) DisableEcho() error { + rawState, err := m.getCurrent() + if err != nil { + return err + } + rawState.Lflag = rawState.Lflag &^ unix.ECHO + return tcset(m.f.Fd(), &rawState) +} + +func (m *master) Size() (WinSize, error) { + return tcgwinsz(m.f.Fd()) +} + +func (m *master) Fd() uintptr { + return m.f.Fd() +} + +func (m *master) Name() string { + return m.f.Name() +} + +// checkConsole checks if the provided file is a console +func checkConsole(f File) error { + var termios unix.Termios + if tcget(f.Fd(), &termios) != nil { + return ErrNotAConsole + } + return nil +} + +func newMaster(f File) (Console, error) { + m := &master{ + f: f, + } + t, err := m.getCurrent() + if err != nil { + return nil, err + } + m.original = &t + return m, nil +} + +// ClearONLCR sets the necessary tty_ioctl(4)s to ensure that a pty pair +// created by us acts normally. In particular, a not-very-well-known default of +// Linux unix98 ptys is that they have +onlcr by default. While this isn't a +// problem for terminal emulators, because we relay data from the terminal we +// also relay that funky line discipline. +func ClearONLCR(fd uintptr) error { + return setONLCR(fd, false) +} + +// SetONLCR sets the necessary tty_ioctl(4)s to ensure that a pty pair +// created by us acts as intended for a terminal emulator. +func SetONLCR(fd uintptr) error { + return setONLCR(fd, true) +}
  80. Download patch cli/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,15 @@ +// +build appengine + +// This file contains the safe implementations of otherwise unsafe-using code. + +package xxhash + +// Sum64String computes the 64-bit xxHash digest of s. +func Sum64String(s string) uint64 { + return Sum64([]byte(s)) +} + +// WriteString adds more data to d. It always returns len(s), nil. +func (d *Digest) WriteString(s string) (n int, err error) { + return d.Write([]byte(s)) +}
  81. Download patch cli/vendor/github.com/beorn7/perks/LICENSE

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/beorn7/perks/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/beorn7/perks/LICENSE 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,20 @@ +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  82. Download patch cli/vendor/github.com/containerd/containerd/errdefs/grpc.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/errdefs/grpc.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/errdefs/grpc.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import ( + "context" + "strings" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + if err == nil { + return nil + } + + if isGRPCError(err) { + // error has already been mapped to grpc + return err + } + + switch { + case IsInvalidArgument(err): + return status.Errorf(codes.InvalidArgument, err.Error()) + case IsNotFound(err): + return status.Errorf(codes.NotFound, err.Error()) + case IsAlreadyExists(err): + return status.Errorf(codes.AlreadyExists, err.Error()) + case IsFailedPrecondition(err): + return status.Errorf(codes.FailedPrecondition, err.Error()) + case IsUnavailable(err): + return status.Errorf(codes.Unavailable, err.Error()) + case IsNotImplemented(err): + return status.Errorf(codes.Unimplemented, err.Error()) + case IsCanceled(err): + return status.Errorf(codes.Canceled, err.Error()) + case IsDeadlineExceeded(err): + return status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + return err +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errors.ToGRPC(errors.Wrapf(err, format, args...)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return ToGRPC(errors.Wrapf(err, format, args...)) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + if err == nil { + return nil + } + + var cls error // divide these into error classes, becomes the cause + + switch code(err) { + case codes.InvalidArgument: + cls = ErrInvalidArgument + case codes.AlreadyExists: + cls = ErrAlreadyExists + case codes.NotFound: + cls = ErrNotFound + case codes.Unavailable: + cls = ErrUnavailable + case codes.FailedPrecondition: + cls = ErrFailedPrecondition + case codes.Unimplemented: + cls = ErrNotImplemented + case codes.Canceled: + cls = context.Canceled + case codes.DeadlineExceeded: + cls = context.DeadlineExceeded + default: + cls = ErrUnknown + } + + msg := rebaseMessage(cls, err) + if msg != "" { + err = errors.Wrap(cls, msg) + } else { + err = errors.WithStack(cls) + } + + return err +} + +// rebaseMessage removes the repeats for an error at the end of an error +// string. This will happen when taking an error over grpc then remapping it. +// +// Effectively, we just remove the string of cls from the end of err if it +// appears there. +func rebaseMessage(cls error, err error) string { + desc := errDesc(err) + clss := cls.Error() + if desc == clss { + return "" + } + + return strings.TrimSuffix(desc, ": "+clss) +} + +func isGRPCError(err error) bool { + _, ok := status.FromError(err) + return ok +} + +func code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +func errDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +}
  83. Download patch cli/vendor/github.com/containerd/cgroups/go.mod

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/cgroups/go.mod 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/cgroups/go.mod 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,18 @@ +module github.com/containerd/cgroups + +go 1.13 + +require ( + github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 + github.com/coreos/go-systemd/v22 v22.0.0 + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/docker/go-units v0.4.0 + github.com/godbus/dbus/v5 v5.0.3 + github.com/gogo/protobuf v1.3.1 + github.com/opencontainers/runtime-spec v1.0.2 + github.com/pkg/errors v0.9.1 + github.com/sirupsen/logrus v1.6.0 + github.com/stretchr/testify v1.2.2 + github.com/urfave/cli v1.22.2 + golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 +)
  84. Download patch cli/vendor/cloud.google.com/go/go.mod

    --- 20.10.1+dfsg1-1/cli/vendor/cloud.google.com/go/go.mod 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/cloud.google.com/go/go.mod 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,29 @@ +module cloud.google.com/go + +go 1.9 + +require ( + cloud.google.com/go/datastore v1.0.0 + github.com/golang/mock v1.3.1 + github.com/golang/protobuf v1.3.2 + github.com/google/btree v1.0.0 + github.com/google/go-cmp v0.3.0 + github.com/google/martian v2.1.0+incompatible + github.com/google/pprof v0.0.0-20190515194954-54271f7e092f + github.com/googleapis/gax-go/v2 v2.0.5 + github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 + go.opencensus.io v0.22.0 + golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 + golang.org/x/lint v0.0.0-20190409202823-959b441ac422 + golang.org/x/net v0.0.0-20190620200207-3b0461eec859 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + golang.org/x/sync v0.0.0-20190423024810-112230192c58 + golang.org/x/text v0.3.2 + golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 + golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 + google.golang.org/api v0.8.0 + google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 + google.golang.org/grpc v1.21.1 + honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a + rsc.io/binaryregexp v0.2.0 +)
  85. Download patch cli/vendor/github.com/containerd/containerd/content/local/store_windows.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/local/store_windows.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/local/store_windows.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,26 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" + "time" +) + +func getATime(fi os.FileInfo) time.Time { + return fi.ModTime() +}
  86. Download patch cli/vendor/github.com/Azure/go-ansiterm/utilities.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/utilities.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/utilities.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,21 @@ +package ansiterm + +import ( + "strconv" +) + +func sliceContains(bytes []byte, b byte) bool { + for _, v := range bytes { + if v == b { + return true + } + } + + return false +} + +func convertBytesToInteger(bytes []byte) int { + s := string(bytes) + i, _ := strconv.Atoi(s) + return i +}
  87. Download patch cli/vendor/github.com/agl/ed25519/edwards25519/edwards25519.go
  88. Download patch cli/vendor/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym/symtab.go
  89. Download patch cli/vendor/github.com/containerd/cgroups/stats/v1/doc.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/cgroups/stats/v1/doc.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/cgroups/stats/v1/doc.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,17 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package v1
  90. Download patch cli/vendor/github.com/Azure/go-ansiterm/README.md

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/README.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/README.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,12 @@ +# go-ansiterm + +This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent. + +For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position. + +The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go). + +See parser_test.go for examples exercising the state machine and generating appropriate function calls. + +----- +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
  91. Download patch cli/vendor/github.com/containerd/containerd/filters/adaptor.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/filters/adaptor.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/filters/adaptor.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,33 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package filters + +// Adaptor specifies the mapping of fieldpaths to a type. For the given field +// path, the value and whether it is present should be returned. The mapping of +// the fieldpath to a field is deferred to the adaptor implementation, but +// should generally follow protobuf field path/mask semantics. +type Adaptor interface { + Field(fieldpath []string) (value string, present bool) +} + +// AdapterFunc allows implementation specific matching of fieldpaths +type AdapterFunc func(fieldpath []string) (string, bool) + +// Field returns the field name and true if it exists +func (fn AdapterFunc) Field(fieldpath []string) (string, bool) { + return fn(fieldpath) +}
  92. Download patch cli/vendor/cloud.google.com/go/README.md
  93. Download patch cli/internal/test/builders/container.go

    --- 20.10.1+dfsg1-1/cli/internal/test/builders/container.go 2020-12-15 02:27:14.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/internal/test/builders/container.go 2020-12-22 17:32:20.000000000 +0000 @@ -17,7 +17,7 @@ func Container(name string, builders ... Command: "top", Image: "busybox:latest", Status: "Up 1 second", - Created: time.Now().UnixNano(), + Created: time.Now().Unix(), } for _, builder := range builders {
  94. Download patch cli/vendor/github.com/containerd/containerd/content/proxy/content_store.go
  95. Download patch cli/vendor/github.com/containerd/containerd/content/local/readerat.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/containerd/content/local/readerat.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/containerd/content/local/readerat.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,40 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package local + +import ( + "os" +) + +// readerat implements io.ReaderAt in a completely stateless manner by opening +// the referenced file for each call to ReadAt. +type sizeReaderAt struct { + size int64 + fp *os.File +} + +func (ra sizeReaderAt) ReadAt(p []byte, offset int64) (int, error) { + return ra.fp.ReadAt(p, offset) +} + +func (ra sizeReaderAt) Size() int64 { + return ra.size +} + +func (ra sizeReaderAt) Close() error { + return ra.fp.Close() +}
  96. Download patch cli/vendor/github.com/containerd/console/LICENSE

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/console/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/console/LICENSE 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.
  97. Download patch cli/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package io.containerd.cgroups.v1; + +import "gogoproto/gogo.proto"; + +message Metrics { + repeated HugetlbStat hugetlb = 1; + PidsStat pids = 2; + CPUStat cpu = 3 [(gogoproto.customname) = "CPU"]; + MemoryStat memory = 4; + BlkIOStat blkio = 5; + RdmaStat rdma = 6; + repeated NetworkStat network = 7; + CgroupStats cgroup_stats = 8; + MemoryOomControl memory_oom_control = 9; +} + +message HugetlbStat { + uint64 usage = 1; + uint64 max = 2; + uint64 failcnt = 3; + string pagesize = 4; +} + +message PidsStat { + uint64 current = 1; + uint64 limit = 2; +} + +message CPUStat { + CPUUsage usage = 1; + Throttle throttling = 2; +} + +message CPUUsage { + // values in nanoseconds + uint64 total = 1; + uint64 kernel = 2; + uint64 user = 3; + repeated uint64 per_cpu = 4 [(gogoproto.customname) = "PerCPU"]; + +} + +message Throttle { + uint64 periods = 1; + uint64 throttled_periods = 2; + uint64 throttled_time = 3; +} + +message MemoryStat { + uint64 cache = 1; + uint64 rss = 2 [(gogoproto.customname) = "RSS"]; + uint64 rss_huge = 3 [(gogoproto.customname) = "RSSHuge"]; + uint64 mapped_file = 4; + uint64 dirty = 5; + uint64 writeback = 6; + uint64 pg_pg_in = 7; + uint64 pg_pg_out = 8; + uint64 pg_fault = 9; + uint64 pg_maj_fault = 10; + uint64 inactive_anon = 11; + uint64 active_anon = 12; + uint64 inactive_file = 13; + uint64 active_file = 14; + uint64 unevictable = 15; + uint64 hierarchical_memory_limit = 16; + uint64 hierarchical_swap_limit = 17; + uint64 total_cache = 18; + uint64 total_rss = 19 [(gogoproto.customname) = "TotalRSS"]; + uint64 total_rss_huge = 20 [(gogoproto.customname) = "TotalRSSHuge"]; + uint64 total_mapped_file = 21; + uint64 total_dirty = 22; + uint64 total_writeback = 23; + uint64 total_pg_pg_in = 24; + uint64 total_pg_pg_out = 25; + uint64 total_pg_fault = 26; + uint64 total_pg_maj_fault = 27; + uint64 total_inactive_anon = 28; + uint64 total_active_anon = 29; + uint64 total_inactive_file = 30; + uint64 total_active_file = 31; + uint64 total_unevictable = 32; + MemoryEntry usage = 33; + MemoryEntry swap = 34; + MemoryEntry kernel = 35; + MemoryEntry kernel_tcp = 36 [(gogoproto.customname) = "KernelTCP"]; + +} + +message MemoryEntry { + uint64 limit = 1; + uint64 usage = 2; + uint64 max = 3; + uint64 failcnt = 4; +} + +message MemoryOomControl { + uint64 oom_kill_disable = 1; + uint64 under_oom = 2; + uint64 oom_kill = 3; +} + +message BlkIOStat { + repeated BlkIOEntry io_service_bytes_recursive = 1; + repeated BlkIOEntry io_serviced_recursive = 2; + repeated BlkIOEntry io_queued_recursive = 3; + repeated BlkIOEntry io_service_time_recursive = 4; + repeated BlkIOEntry io_wait_time_recursive = 5; + repeated BlkIOEntry io_merged_recursive = 6; + repeated BlkIOEntry io_time_recursive = 7; + repeated BlkIOEntry sectors_recursive = 8; +} + +message BlkIOEntry { + string op = 1; + string device = 2; + uint64 major = 3; + uint64 minor = 4; + uint64 value = 5; +} + +message RdmaStat { + repeated RdmaEntry current = 1; + repeated RdmaEntry limit = 2; +} + +message RdmaEntry { + string device = 1; + uint32 hca_handles = 2; + uint32 hca_objects = 3; +} + +message NetworkStat { + string name = 1; + uint64 rx_bytes = 2; + uint64 rx_packets = 3; + uint64 rx_errors = 4; + uint64 rx_dropped = 5; + uint64 tx_bytes = 6; + uint64 tx_packets = 7; + uint64 tx_errors = 8; + uint64 tx_dropped = 9; +} + +// CgroupStats exports per-cgroup statistics. +message CgroupStats { + // number of tasks sleeping + uint64 nr_sleeping = 1; + // number of tasks running + uint64 nr_running = 2; + // number of tasks in stopped state + uint64 nr_stopped = 3; + // number of tasks in uninterruptible state + uint64 nr_uninterruptible = 4; + // number of tasks waiting on IO + uint64 nr_io_wait = 5; +}
  98. Download patch cli/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
  99. Download patch cli/.github/ISSUE_TEMPLATE.md

    --- 20.10.1+dfsg1-1/cli/.github/ISSUE_TEMPLATE.md 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/.github/ISSUE_TEMPLATE.md 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,64 @@ +<!-- +If you are reporting a new issue, make sure that we do not have any duplicates +already open. You can ensure this by searching the issue list for this +repository. If there is a duplicate, please close your issue and add a comment +to the existing issue instead. + +If you suspect your issue is a bug, please edit your issue description to +include the BUG REPORT INFORMATION shown below. If you fail to provide this +information within 7 days, we cannot debug your issue and will close it. We +will, however, reopen it if you later provide the information. + +For more information about reporting issues, see +https://github.com/docker/cli/blob/master/CONTRIBUTING.md#reporting-other-issues + +--------------------------------------------------- +GENERAL SUPPORT INFORMATION +--------------------------------------------------- + +The GitHub issue tracker is for bug reports and feature requests. +General support can be found at the following locations: + +- Docker Support Forums - https://forums.docker.com +- Docker Community Slack - https://dockr.ly/community +- Post a question on StackOverflow, using the Docker tag + +--------------------------------------------------- +BUG REPORT INFORMATION +--------------------------------------------------- +Use the commands below to provide key information from your environment: +You do NOT have to include this information if this is a FEATURE REQUEST +--> + +**Description** + +<!-- +Briefly describe the problem you are having in a few paragraphs. +--> + +**Steps to reproduce the issue:** +1. +2. +3. + +**Describe the results you received:** + + +**Describe the results you expected:** + + +**Additional information you deem important (e.g. issue happens only occasionally):** + +**Output of `docker version`:** + +``` +(paste your output here) +``` + +**Output of `docker info`:** + +``` +(paste your output here) +``` + +**Additional environment details (AWS, VirtualBox, physical, etc.):**
  100. Download patch cli/vendor/github.com/Azure/go-ansiterm/parser.go

    --- 20.10.1+dfsg1-1/cli/vendor/github.com/Azure/go-ansiterm/parser.go 1970-01-01 00:00:00.000000000 +0000 +++ 20.10.2-0ubuntu1/cli/vendor/github.com/Azure/go-ansiterm/parser.go 2020-12-22 17:32:20.000000000 +0000 @@ -0,0 +1,151 @@ +package ansiterm + +import ( + "errors" + "log" + "os" +) + +type AnsiParser struct { + currState state + eventHandler AnsiEventHandler + context *ansiContext + csiEntry state + csiParam state + dcsEntry state + escape state + escapeIntermediate state + error state + ground state + oscString state + stateMap []state + + logf func(string, ...interface{}) +} + +type Option func(*AnsiParser) + +func WithLogf(f func(string, ...interface{})) Option { + return func(ap *AnsiParser) { + ap.logf = f + } +} + +func CreateParser(initialState string, evtHandler AnsiEventHandler, opts ...Option) *AnsiParser { + ap := &AnsiParser{ + eventHandler: evtHandler, + context: &ansiContext{}, + } + for _, o := range opts { + o(ap) + } + + if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" { + logFile, _ := os.Create("ansiParser.log") + logger := log.New(logFile, "", log.LstdFlags) + if ap.logf != nil { + l := ap.logf + ap.logf = func(s string, v ...interface{}) { + l(s, v...) + logger.Printf(s, v...) + } + } else { + ap.logf = logger.Printf + } + } + + if ap.logf == nil { + ap.logf = func(string, ...interface{}) {} + } + + ap.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: ap}} + ap.csiParam = csiParamState{baseState{name: "CsiParam", parser: ap}} + ap.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: ap}} + ap.escape = escapeState{baseState{name: "Escape", parser: ap}} + ap.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: ap}} + ap.error = errorState{baseState{name: "Error", parser: ap}} + ap.ground = groundState{baseState{name: "Ground", parser: ap}} + ap.oscString = oscStringState{baseState{name: "OscString", parser: ap}} + + ap.stateMap = []state{ + ap.csiEntry, + ap.csiParam, + ap.dcsEntry, + ap.escape, + ap.escapeIntermediate, + ap.error, + ap.ground, + ap.oscString, + } + + ap.currState = getState(initialState, ap.stateMap) + + ap.logf("CreateParser: parser %p", ap) + return ap +} + +func getState(name string, states []state) state { + for _, el := range states { + if el.Name() == name { + return el + } + } + + return nil +} + +func (ap *AnsiParser) Parse(bytes []byte) (int, error) { + for i, b := range bytes { + if err := ap.handle(b); err != nil { + return i, err + } + } + + return len(bytes), ap.eventHandler.Flush() +} + +func (ap *AnsiParser) handle(b byte) error { + ap.context.currentChar = b + newState, err := ap.currState.Handle(b) + if err != nil { + return err + } + + if newState == nil { + ap.logf("WARNING: newState is nil") + return errors.New("New state of 'nil' is invalid.") + } + + if newState != ap.currState { + if err := ap.changeState(newState); err != nil { + return err + } + } + + return nil +} + +func (ap *AnsiParser) changeState(newState state) error { + ap.logf("ChangeState %s --> %s", ap.currState.Name(), newState.Name()) + + // Exit old state + if err := ap.currState.Exit(); err != nil { + ap.logf("Exit state '%s' failed with : '%v'", ap.currState.Name(), err) + return err + } + + // Perform transition action + if err := ap.currState.Transition(newState); err != nil { + ap.logf("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err) + return err + } + + // Enter new state + if err := newState.Enter(); err != nil { + ap.logf("Enter state '%s' failed with: '%v'", newState.Name(), err) + return err + } + + ap.currState = newState + return nil +}
  101. ...

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: golang-1.13

golang-1.13 (1.13.8-1ubuntu2) groovy; urgency=medium * Apply applicable parts of https://go-review.googlesource.com/c/go/+/262357/ to fix build on arm64. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 15 Oct 2020 21:55:17 +1300 golang-1.13 (1.13.8-1ubuntu1) focal; urgency=low * Merge from Debian unstable. Remaining changes: - cherry-pick upstream build fixes from 1.14 branch - debian/patches/d3595f71712ce1b322f754ef985005e87fac6d44.patch: - debian/patches/5d548f1243df8d586a03df085b40299f1e427fb1.patch: -- Gianfranco Costamagna <locutusofborg@debian.org> Sat, 15 Feb 2020 19:41:49 +0100

Modifications :
  1. Download patch debian/control

    --- 1.13.8-1/debian/control 2020-02-13 21:17:59.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/control 2020-10-14 23:22:07.000000000 +0000 @@ -3,7 +3,8 @@ # Source: golang-1.13 -Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> Uploaders: Michael Stapelberg <stapelberg@debian.org>, Paul Tagliamonte <paultag@debian.org>, Tianon Gravi <tianon@debian.org>,
  2. Download patch debian/patches/d3595f71712ce1b322f754ef985005e87fac6d44.patch

    --- 1.13.8-1/debian/patches/d3595f71712ce1b322f754ef985005e87fac6d44.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/patches/d3595f71712ce1b322f754ef985005e87fac6d44.patch 2020-10-14 21:49:22.000000000 +0000 @@ -0,0 +1,65 @@ +From d3595f71712ce1b322f754ef985005e87fac6d44 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser <tklauser@distanz.ch> +Date: Tue, 17 Sep 2019 09:05:02 +0200 +Subject: [PATCH] syscall: skip TestAmbientCapsUserns if user namespaces are + not supported + +Fixes #34015 + +Change-Id: I29798fb9c72b6f4bee8aecea96ab13b4cba2e80d +Reviewed-on: https://go-review.googlesource.com/c/go/+/195738 +Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> +TryBot-Result: Gobot Gobot <gobot@golang.org> +Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> +--- + src/syscall/exec_linux_test.go | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go +index cc2140f8112..ee864ac0d4b 100644 +--- a/src/syscall/exec_linux_test.go ++++ b/src/syscall/exec_linux_test.go +@@ -42,6 +42,18 @@ func skipInContainer(t *testing.T) { + } + } + ++func skipNoUserNamespaces(t *testing.T) { ++ if _, err := os.Stat("/proc/self/ns/user"); err != nil { ++ if os.IsNotExist(err) { ++ t.Skip("kernel doesn't support user namespaces") ++ } ++ if os.IsPermission(err) { ++ t.Skip("unable to test user namespaces due to permissions") ++ } ++ t.Fatalf("Failed to stat /proc/self/ns/user: %v", err) ++ } ++} ++ + func skipUnprivilegedUserClone(t *testing.T) { + // Skip the test if the sysctl that prevents unprivileged user + // from creating user namespaces is enabled. +@@ -64,15 +76,7 @@ func isChrooted(t *testing.T) bool { + + func checkUserNS(t *testing.T) { + skipInContainer(t) +- if _, err := os.Stat("/proc/self/ns/user"); err != nil { +- if os.IsNotExist(err) { +- t.Skip("kernel doesn't support user namespaces") +- } +- if os.IsPermission(err) { +- t.Skip("unable to test user namespaces due to permissions") +- } +- t.Fatalf("Failed to stat /proc/self/ns/user: %v", err) +- } ++ skipNoUserNamespaces(t) + if isChrooted(t) { + // create_user_ns in the kernel (see + // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c) +@@ -573,6 +577,7 @@ func TestAmbientCaps(t *testing.T) { + } + + func TestAmbientCapsUserns(t *testing.T) { ++ skipNoUserNamespaces(t) + testAmbientCaps(t, true) + } +
  3. Download patch debian/control.in

    --- 1.13.8-1/debian/control.in 2020-02-13 21:17:10.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/control.in 2020-10-14 23:22:07.000000000 +0000 @@ -1,5 +1,6 @@ Source: golang-X.Y -Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> Uploaders: Michael Stapelberg <stapelberg@debian.org>, Paul Tagliamonte <paultag@debian.org>, Tianon Gravi <tianon@debian.org>,
  4. Download patch debian/patches/5d548f1243df8d586a03df085b40299f1e427fb1.patch

    --- 1.13.8-1/debian/patches/5d548f1243df8d586a03df085b40299f1e427fb1.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/patches/5d548f1243df8d586a03df085b40299f1e427fb1.patch 2020-10-14 21:49:22.000000000 +0000 @@ -0,0 +1,32 @@ +From 5d548f1243df8d586a03df085b40299f1e427fb1 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser <tklauser@distanz.ch> +Date: Thu, 19 Sep 2019 17:16:59 +0200 +Subject: [PATCH] syscall: extend skip criteria for TestAmbientCapsUserns + +TestAmbientCapsUserns also needs to be skipped, e.g. in case the test is +run inside a chroot. + +Updates #34015 + +Change-Id: I53913432fe9408217edfe64619adbfd911a51a7a +Reviewed-on: https://go-review.googlesource.com/c/go/+/196500 +Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> +Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> +TryBot-Result: Gobot Gobot <gobot@golang.org> +--- + src/syscall/exec_linux_test.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go +index ee864ac0d4b..f7fab7b6596 100644 +--- a/src/syscall/exec_linux_test.go ++++ b/src/syscall/exec_linux_test.go +@@ -577,7 +577,7 @@ func TestAmbientCaps(t *testing.T) { + } + + func TestAmbientCapsUserns(t *testing.T) { +- skipNoUserNamespaces(t) ++ checkUserNS(t) + testAmbientCaps(t, true) + } +
  5. Download patch debian/patches/series

    --- 1.13.8-1/debian/patches/series 2020-02-13 21:17:50.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/patches/series 2020-10-14 23:14:59.000000000 +0000 @@ -1,2 +1,5 @@ 0001-Disable-test-for-UserHomeDir.patch 0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch +d3595f71712ce1b322f754ef985005e87fac6d44.patch +5d548f1243df8d586a03df085b40299f1e427fb1.patch +0003-fix-build-failure-of-misc-cgo-test-on-arm64.patch
  6. Download patch debian/patches/0003-fix-build-failure-of-misc-cgo-test-on-arm64.patch

    --- 1.13.8-1/debian/patches/0003-fix-build-failure-of-misc-cgo-test-on-arm64.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.13.8-1ubuntu2/debian/patches/0003-fix-build-failure-of-misc-cgo-test-on-arm64.patch 2020-10-14 23:17:51.000000000 +0000 @@ -0,0 +1,34 @@ +From 651e76818d94149e37b7662230a52215aefe0161 Mon Sep 17 00:00:00 2001 +From: xd <xiangdong.ji@gmail.com> +Date: Wed, 14 Oct 2020 11:02:49 -0700 +Subject: [PATCH] cmd/dist: fix build failure of misc/cgo/test on arm64 + +misc/cgo/test fails in 'dist test' on arm64 if the C compiler is of GCC-9.4 or +above and its 'outline atomics' feature is enabled, since the internal linking +hasn't yet supported "__attribute__((constructor))" and also mis-handles hidden +visibility. + +This change addresses the problem by skipping the internal linking cases of +misc/cgo/test on arm64. It fixes 'dist test' failure only, user is expected to +pass a GCC option '-mno-outline-atomics' via CGO_CFLAGS if running into the same +problem when building cgo programs using internal linking. + +Updates #39466 + +Change-Id: I57f9e85fca881e5fd2dae6c1b4446bce9e0c1975 +--- + +--- a/src/cmd/dist/test.go ++++ b/src/cmd/dist/test.go +@@ -1018,7 +1018,10 @@ + cmd := t.addCmd(dt, "misc/cgo/test", t.goTest()) + cmd.Env = append(os.Environ(), "GOFLAGS=-ldflags=-linkmode=auto") + +- if t.internalLink() { ++ // arm64 experiences internal link issue with GCC-9.4 and above, see issue #39466 ++ skipInternalLink := goarch == "arm64" ++ ++ if t.internalLink() && !skipInternalLink { + cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=internal") + cmd.Env = append(os.Environ(), "GOFLAGS=-ldflags=-linkmode=internal") + }

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: golang-1.15

golang-1.15 (1.15.4-1ubuntu2) hirsute; urgency=medium * d/patches/0001-cmd-link-check-CGO_CFLAGS-for-non-g-I-O-options-befo.patch: disable internal linking when dynamically linking and CGO_CFLAGS contains flags that might make host object files that the internal linkers ELF reader does not support. This fixes lots of package builds when LTO is enabled by default via dpkg-buildflags. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Sun, 17 Jan 2021 12:09:47 +1300 golang-1.15 (1.15.4-1ubuntu1) hirsute; urgency=medium * Merge from Debian unstable. Remaining changes: - cmd/dist: increase default timeout scale for arm (LP: #1893640) * Cherrypick cgo riscv64 patches. -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 10 Nov 2020 17:23:08 +0000

Modifications :
  1. Download patch debian/patches/fc3e6af10297b424175b44d2274de04c5f0b9e82.patch
  2. Download patch debian/patches/98d9c96b21ae096926575363091ec1fccfd6416e.patch
  3. Download patch debian/patches/0001-cmd-link-check-CGO_CFLAGS-for-non-g-I-O-options-befo.patch
  4. Download patch debian/control

    --- 1.15.4-1/debian/control 2020-11-09 21:48:51.000000000 +0000 +++ 1.15.4-1ubuntu2/debian/control 2021-01-15 01:45:24.000000000 +0000 @@ -3,7 +3,8 @@ # Source: golang-1.15 -Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> Uploaders: Michael Stapelberg <stapelberg@debian.org>, Paul Tagliamonte <paultag@debian.org>, Tianon Gravi <tianon@debian.org>,
  5. Download patch debian/patches/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch

    --- 1.15.4-1/debian/patches/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.15.4-1ubuntu2/debian/patches/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch 2021-01-15 01:45:24.000000000 +0000 @@ -0,0 +1,31 @@ +From d744b0f547278b49a0187d2a9404288b25a04948 Mon Sep 17 00:00:00 2001 +From: Balint Reczey <balint.reczey@canonical.com> +Date: Mon, 31 Aug 2020 13:14:51 +0200 +Subject: [PATCH] cmd/dist: increase default timeout scale for arm + +Most developers use (faster) amd64 machines setting the test timeouts, +but test may run on slower arm ones and also different tests may suffer +different relative slowdown on the arm CPUs. + +Due to those two varying factors it is safer to allow a higher timeout +scale on arm to avoid tests timing out. +--- + src/cmd/dist/test.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go +index 5ea5c81656..d3e7832fb1 100644 +--- a/src/cmd/dist/test.go ++++ b/src/cmd/dist/test.go +@@ -149,7 +149,7 @@ func (t *tester) run() { + t.timeoutScale = 1 + switch goarch { + case "arm": +- t.timeoutScale = 2 ++ t.timeoutScale = 3 + case "mips", "mipsle", "mips64", "mips64le": + t.timeoutScale = 4 + } +-- +2.25.1 +
  6. Download patch debian/control.in

    --- 1.15.4-1/debian/control.in 2020-11-09 21:47:59.000000000 +0000 +++ 1.15.4-1ubuntu2/debian/control.in 2021-01-15 01:45:24.000000000 +0000 @@ -1,5 +1,6 @@ Source: golang-X.Y -Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Go Compiler Team <team+go-compiler@tracker.debian.org> Uploaders: Michael Stapelberg <stapelberg@debian.org>, Paul Tagliamonte <paultag@debian.org>, Tianon Gravi <tianon@debian.org>,
  7. Download patch debian/patches/1f76e888dfcc67159b012c503ed2961691e0cf85.patch
  8. Download patch debian/patches/70ca9a801164e370cc6adf443d40a95c24143400.patch
  9. Download patch debian/patches/series

    --- 1.15.4-1/debian/patches/series 2020-11-09 21:47:59.000000000 +0000 +++ 1.15.4-1ubuntu2/debian/patches/series 2021-01-15 01:46:50.000000000 +0000 @@ -2,3 +2,10 @@ 0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch 0003-cmd-go-cmd-cgo-pass-mfp32-and-mhard-soft-float-to-MI.patch 0004-cmd-dist-fix-build-failure-of-misc-cgo-test-on-arm64.patch +0005-cmd-dist-increase-default-timeout-scale-for-arm.patch +fc3e6af10297b424175b44d2274de04c5f0b9e82.patch +98d9c96b21ae096926575363091ec1fccfd6416e.patch +70ca9a801164e370cc6adf443d40a95c24143400.patch +1f76e888dfcc67159b012c503ed2961691e0cf85.patch +ba41f5960408a58339e6efb1bf379031cc35efeb.patch +0001-cmd-link-check-CGO_CFLAGS-for-non-g-I-O-options-befo.patch
  10. Download patch debian/patches/ba41f5960408a58339e6efb1bf379031cc35efeb.patch

    --- 1.15.4-1/debian/patches/ba41f5960408a58339e6efb1bf379031cc35efeb.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.15.4-1ubuntu2/debian/patches/ba41f5960408a58339e6efb1bf379031cc35efeb.patch 2021-01-15 01:45:24.000000000 +0000 @@ -0,0 +1,78 @@ +From ba41f5960408a58339e6efb1bf379031cc35efeb Mon Sep 17 00:00:00 2001 +From: Joel Sing <joel@sing.id.au> +Date: Tue, 2 Jun 2020 23:34:06 +1000 +Subject: [PATCH] cmd/compile,cmd/internal/sys: enable non-exe build modes on + linux/riscv64 + +Change-Id: I15a8a51b84dbbb82a5b6592aec84a7f09f0cc37f +--- + src/cmd/compile/internal/gc/main.go | 2 +- + src/cmd/go/go_test.go | 2 +- + src/cmd/internal/sys/supported.go | 8 ++++---- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go +index 756cdbd3c9bc..34997f475409 100644 +--- a/src/cmd/compile/internal/gc/main.go ++++ b/src/cmd/compile/internal/gc/main.go +@@ -132,7 +132,7 @@ func hidePanic() { + // supportsDynlink reports whether or not the code generator for the given + // architecture supports the -shared and -dynlink flags. + func supportsDynlink(arch *sys.Arch) bool { +- return arch.InFamily(sys.AMD64, sys.ARM, sys.ARM64, sys.I386, sys.PPC64, sys.S390X) ++ return arch.InFamily(sys.AMD64, sys.ARM, sys.ARM64, sys.I386, sys.PPC64, sys.RISCV64, sys.S390X) + } + + // timing data for compiler phases +diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go +index 021930a8a817..8093341a1adb 100644 +--- a/src/cmd/go/go_test.go ++++ b/src/cmd/go/go_test.go +@@ -2058,7 +2058,7 @@ func TestBuildmodePIE(t *testing.T) { + + platform := fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH) + switch platform { +- case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x", ++ case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x", + "android/amd64", "android/arm", "android/arm64", "android/386", + "freebsd/amd64", + "windows/386", "windows/amd64", "windows/arm": +diff --git a/src/cmd/internal/sys/supported.go b/src/cmd/internal/sys/supported.go +index c27b3b986d8b..527f739d4168 100644 +--- a/src/cmd/internal/sys/supported.go ++++ b/src/cmd/internal/sys/supported.go +@@ -66,7 +66,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { + + case "c-shared": + switch platform { +- case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le", "linux/s390x", ++ case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le", "linux/riscv64", "linux/s390x", + "android/amd64", "android/arm", "android/arm64", "android/386", + "freebsd/amd64", + "darwin/amd64", +@@ -83,7 +83,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { + + case "pie": + switch platform { +- case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x", ++ case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x", + "android/amd64", "android/arm", "android/arm64", "android/386", + "freebsd/amd64", + "darwin/amd64", +@@ -95,14 +95,14 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { + + case "shared": + switch platform { +- case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x": ++ case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x": + return true + } + return false + + case "plugin": + switch platform { +- case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/s390x", "linux/ppc64le", ++ case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/s390x", "linux/riscv64", "linux/ppc64le", + "android/amd64", "android/arm", "android/arm64", "android/386", + "darwin/amd64", + "freebsd/amd64":
  1. docker.io
  2. golang-1.13
  3. golang-1.15