Skip to content

SPECS: Add Docker runtime and module dependencies#792

Open
cl2t wants to merge 26 commits into
openRuyi-Project:mainfrom
cl2t:docker-docker-deps
Open

SPECS: Add Docker runtime and module dependencies#792
cl2t wants to merge 26 commits into
openRuyi-Project:mainfrom
cl2t:docker-docker-deps

Conversation

@cl2t

@cl2t cl2t commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Add Docker 28.5.2 as the main package from the Moby source tree, together with containerd 1.7.28 and the Go dependency closure needed for a non-vendored containerd build.

  • The Docker package installs dockerd, docker-proxy, systemd units, a real sysusers configuration, and the tini integration.
  • The Docker source package also builds the independently tagged Moby API v1.54.2 and client v0.4.1 modules as the noarch go-github-moby-moby-api and go-github-moby-moby-client subpackages. Their virtual Provides match the modules pinned by Prometheus v3.12.0.
  • The Moby API and client source subpackages are trimmed to their importable Go module contents and declare their reusable Go dependency closure explicitly.
  • Containerd is built against distribution Go modules and delivers the daemon and runc shims required by Docker; CRI, tracing, NRI, optional graphdrivers, ctr, and related unused dependencies are excluded.
  • Add github.com/containerd/errdefs/pkg v0.3.0 and update github.com/containerd/typeurl/v2 to v2.2.0 for the Moby client dependency closure.
  • Fix the go-systemd/v22 build by declaring the libsystemd development/runtime dependency and disabling incompatible vet checks without hiding compilation errors.

Related Issue

  • N/A

Validation

  • pre-commit passes for all 29 changed files, and non-patch diff checks are clean.
  • Pure-main OBS project home:cl_2:pr792-fix-puremain succeeds for all 26 source packages on both x86_64 and riscv64.
  • dockerd --version and docker-proxy --version report 28.5.2 on both architectures.
  • The produced RPMs provide go(github.com/moby/moby/api) = 1.54.2 and go(github.com/moby/moby/client) = 0.4.1; their declared dependencies resolve in the pure-main project.
  • Docker runs the targeted dockerd and docker-proxy command-package tests, then compiles every packaged Moby API/client library package against distribution dependencies.
  • The exact Moby API/client tags and containerd/errdefs/pkg pass their upstream Go tests locally; Prometheus' discovery/moby tests pass with the pinned modules.
  • The go-systemd/v22 package compiles successfully on both architectures; only tests requiring a running systemd/D-Bus environment remain tolerated.

Checklist

Assisted-by: Codex:GPT-5

@openruyi-bot openruyi-bot Bot added AI Assistance AI is used to help with portions of code, tests, or documentation. Community: Student contribution Used by contributors that are currently students at an educational institution. BuildSystem: golangmodule Issue/PR related to golangmodule BuildSystem. Target: Rolling Targeting rolling/current branch. Workflow: Ready For Review Ready for review by anyone with domain expertise. labels Jun 24, 2026
@misaka00251

Copy link
Copy Markdown
Member

Why not package the Moby (Docker) program as the main package, then you can package the modules as sub-packages?

@openruyi-bot openruyi-bot Bot added Workflow: In Review Issues that are undergoing code review and/or undergoing design review. and removed Workflow: Ready For Review Ready for review by anyone with domain expertise. labels Jul 1, 2026
@cl2t
cl2t force-pushed the docker-docker-deps branch from 3bee79f to 6cf7e19 Compare July 9, 2026 16:06
@openruyi-bot openruyi-bot Bot added the BuildSystem: golang Issue/PR related to golang BuildSystem. label Jul 9, 2026
@cl2t cl2t changed the title SPECS: Add go-github-docker-docker (Docker API client for Prometheus moby SD) SPECS: Add docker (Moby engine and Go source) Jul 9, 2026
@cl2t
cl2t force-pushed the docker-docker-deps branch from 6cf7e19 to f5b50b2 Compare July 9, 2026 20:03
@cl2t cl2t changed the title SPECS: Add docker (Moby engine and Go source) SPECS: Add Docker runtime and module dependencies Jul 10, 2026
@cl2t
cl2t force-pushed the docker-docker-deps branch 7 times, most recently from 94d8977 to f7db452 Compare July 13, 2026 10:59
Comment on lines +19 to +20
BuildSystem: golangmodules
BuildOption(check): -vet=off

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildSystem: golangmodules
BuildOption(check): -vet=off
BuildSystem: golangmodules
BuildOption(check): -vet=off

Comment on lines +21 to +22
BuildSystem: golangmodules
BuildOption(check): -vet=off

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildSystem: golangmodules
BuildOption(check): -vet=off
BuildSystem: golangmodules
BuildOption(check): -vet=off

Comment thread SPECS/go-github-godbus-dbus-v5/go-github-godbus-dbus-v5.spec
Comment thread SPECS/go-github-docker-go-events/go-github-docker-go-events.spec
Comment on lines +21 to +22
BuildSystem: golangmodules
BuildOption(check): -vet=off

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildSystem: golangmodules
BuildOption(check): -vet=off
BuildSystem: golangmodules
BuildOption(check): -vet=off

# SPDX-License-Identifier: MulanPSL-2.0

%define _name errdefs
%define go_import_path github.com/containerd/errdefs/pkg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why noe package github.com/containerd/errdefs?

%define _name containerd-api
%define go_import_path github.com/containerd/containerd/api

Name: go-github-containerd-containerd-api

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why split this package?

Comment thread SPECS/docker/docker.spec Outdated
# require extra host storage stacks. This follows upstream's packager guidance.
%define docker_buildtags exclude_graphdriver_btrfs exclude_graphdriver_zfs

Name: docker

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the name moby, and Provides: docker = %{version}-%{release}.

Comment thread SPECS/containerd/containerd.spec Outdated
Comment on lines +113 to +114
# BuildSystem: golang has already populated GOPATH before this custom section.
# Drop upstream's vendored copies there so the build uses distribution modules.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is so ChatGPT. Rewrite in plain English instead.

Comment thread SPECS/containerd/containerd.spec Outdated
Comment on lines +128 to +131
%{__make} -j1 VERSION=v%{version} REVISION=%{commit_id} \
BUILDTAGS="%{containerd_buildtags}" \
bin/containerd bin/containerd-shim \
bin/containerd-shim-runc-v1 bin/containerd-shim-runc-v2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we just make binaries? Also, why -j1?

Comment thread SPECS/containerd/containerd.spec Outdated
Comment on lines +146 to +156
%go_common
cd %{_builddir}/go/src/%{go_import_path}
export CGO_ENABLED=1
export GOTOOLCHAIN=local
# Test the internal dependency closure of the binaries shipped by this build.
# Disable vet only: Go 1.26 rejects two legacy printf formats before tests run.
packages=$(go list -tags "%{containerd_buildtags}" -deps \
./cmd/containerd ./cmd/containerd-shim \
./cmd/containerd-shim-runc-v1 ./cmd/containerd-shim-runc-v2 | \
grep '^github.com/containerd/containerd\(/\|$\)')
go test -vet=off -tags "%{containerd_buildtags}" $packages

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to do these kinds of tests...

Comment thread SPECS/moby/moby.spec
Comment on lines +11 to +14
%define api_version 1.54.2
%define api_dir moby-api-v%{api_version}
%define client_import_path github.com/moby/moby/client
%define client_version 0.4.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where to check these versions? Please add necessary comments.

Comment thread SPECS/docker/docker.spec Outdated
export CGO_ENABLED=1
export GOTOOLCHAIN=local
export VERSION=%{docker_version}
export DOCKER_GITCOMMIT=3ef3c07c883be49a2e8097bcf6d2952fce1d70eb

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where to get this data? Maybe try to macro this w/ comments.

@cl2t
cl2t force-pushed the docker-docker-deps branch 3 times, most recently from 3986588 to 1f7217f Compare July 17, 2026 15:44
cl2t added 4 commits July 18, 2026 12:00
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
cl2t added 22 commits July 18, 2026 12:00
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
Signed-off-by: cl2t <yihong.or@isrc.iscas.ac.cn>
@cl2t
cl2t force-pushed the docker-docker-deps branch from 1f7217f to a9fb32f Compare July 18, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Assistance AI is used to help with portions of code, tests, or documentation. BuildSystem: golang Issue/PR related to golang BuildSystem. BuildSystem: golangmodule Issue/PR related to golangmodule BuildSystem. Community: Student contribution Used by contributors that are currently students at an educational institution. Target: Rolling Targeting rolling/current branch. Workflow: In Review Issues that are undergoing code review and/or undergoing design review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants