Package: docker.io Version: 19.03.12+dfsg1-3 Severity: serious Please see the patches attached.
BTW, is there any instruction to work with the docker.io git repo? It seems `gbp buildpackage` or `gbp pq` are hard to use with it.
Description: Fix build with runc 1.0.0~rc92 Author: Shengjing Zhu <z...@debian.org> Forwarded: not-needed Last-Update: 2020-08-29 --- docker.io-19.03.12+dfsg1.orig/containerd/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go +++ docker.io-19.03.12+dfsg1/containerd/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go @@ -421,7 +421,7 @@ func WithDevices(osi osinterface.OS, con Type: string(dev.Type), Major: &dev.Major, Minor: &dev.Minor, - Access: dev.Permissions, + Access: string(dev.Permissions), }) } return nil --- docker.io-19.03.12+dfsg1.orig/engine/daemon/stats/collector_unix.go +++ docker.io-19.03.12+dfsg1/engine/daemon/stats/collector_unix.go @@ -8,14 +8,14 @@ import ( "strconv" "strings" - "github.com/opencontainers/runc/libcontainer/system" "golang.org/x/sys/unix" ) // platformNewStatsCollector performs platform specific initialisation of the // Collector structure. func platformNewStatsCollector(s *Collector) { - s.clockTicksPerSecond = uint64(system.GetClockTicks()) + // modified from https://github.com/moby/moby/pull/41186 + s.clockTicksPerSecond = 100 } const nanoSecondsPerSecond = 1e9 --- docker.io-19.03.12+dfsg1.orig/engine/oci/devices_linux.go +++ docker.io-19.03.12+dfsg1/engine/oci/devices_linux.go @@ -31,7 +31,7 @@ func deviceCgroup(d *configs.Device) spe Type: t, Major: &d.Major, Minor: &d.Minor, - Access: d.Permissions, + Access: string(d.Permissions), } } --- docker.io-19.03.12+dfsg1.orig/containerd/sys/proc.go +++ /dev/null @@ -1,80 +0,0 @@ -// +build linux - -/* - 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 sys - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" - - "github.com/opencontainers/runc/libcontainer/system" -) - -const nanoSecondsPerSecond = 1e9 - -var clockTicksPerSecond = uint64(system.GetClockTicks()) - -// GetSystemCPUUsage returns the host system's cpu usage in -// nanoseconds. An error is returned if the format of the underlying -// file does not match. -// -// Uses /proc/stat defined by POSIX. Looks for the cpu -// statistics line and then sums up the first seven fields -// provided. See `man 5 proc` for details on specific field -// information. -func GetSystemCPUUsage() (uint64, error) { - var line string - f, err := os.Open("/proc/stat") - if err != nil { - return 0, err - } - bufReader := bufio.NewReaderSize(nil, 128) - defer func() { - bufReader.Reset(nil) - f.Close() - }() - bufReader.Reset(f) - err = nil - for err == nil { - line, err = bufReader.ReadString('\n') - if err != nil { - break - } - parts := strings.Fields(line) - switch parts[0] { - case "cpu": - if len(parts) < 8 { - return 0, fmt.Errorf("bad format of cpu stats") - } - var totalClockTicks uint64 - for _, i := range parts[1:8] { - v, err := strconv.ParseUint(i, 10, 64) - if err != nil { - return 0, fmt.Errorf("error parsing cpu stats") - } - totalClockTicks += v - } - return (totalClockTicks * nanoSecondsPerSecond) / - clockTicksPerSecond, nil - } - } - return 0, fmt.Errorf("bad stats format") -}
Description: Fix build against libcap2 2.43 Author: Shengjing Zhu <z...@debian.org> Bug: https://github.com/moby/moby/issues/41398 Forwarded: no Last-Update: 2020-08-29 --- docker.io-19.03.12+dfsg1.orig/engine/pkg/archive/archive_unix_test.go +++ docker.io-19.03.12+dfsg1/engine/pkg/archive/archive_unix_test.go @@ -264,7 +264,7 @@ func TestTarUntarWithXattr(t *testing.T) } out, err := exec.Command("getcap", filepath.Join(origin, "2")).CombinedOutput() assert.NilError(t, err, string(out)) - assert.Check(t, is.Contains(string(out), "= cap_block_suspend+ep"), "untar should have kept the 'security.capability' xattr") + assert.Check(t, is.Contains(string(out), "cap_block_suspend=ep"), "untar should have kept the 'security.capability' xattr") } }