diff --git a/SPECS/cgctl/2000-cgroups-root-adapt-to-runtime-spec-1.3.patch b/SPECS/cgctl/2000-cgroups-root-adapt-to-runtime-spec-1.3.patch new file mode 100644 index 0000000000..5b0bae6733 --- /dev/null +++ b/SPECS/cgctl/2000-cgroups-root-adapt-to-runtime-spec-1.3.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: tangyihong +Date: Fri, 17 Jul 2026 12:00:00 +0800 +Subject: [PATCH] Adapt root module to runtime-spec 1.3 Pids limit + +runtime-spec 1.3 changed LinuxPids.Limit from int64 to *int64. Check for +nil and dereference the value when converting OCI resources. + +The equivalent upstream adjustment is present in: +https://github.com/containerd/cgroups/commit/34ef430d727e569c31b4f2bbc7d83bffeb1c0165 + +--- + pids.go | 4 ++-- + v2/utils.go | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/pids.go b/pids.go +--- a/pids.go ++++ b/pids.go +@@ -48,10 +48,10 @@ func (p *pidsController) Create(path string, resources *specs.LinuxResources) e + if err := os.MkdirAll(p.Path(path), defaultDirPerm); err != nil { + return err + } +- if resources.Pids != nil && resources.Pids.Limit > 0 { ++ if resources.Pids != nil && resources.Pids.Limit != nil && *resources.Pids.Limit > 0 { + return retryingWriteFile( + filepath.Join(p.Path(path), "pids.max"), +- []byte(strconv.FormatInt(resources.Pids.Limit, 10)), ++ []byte(strconv.FormatInt(*resources.Pids.Limit, 10)), + defaultFilePerm, + ) + } +diff --git a/v2/utils.go b/v2/utils.go +--- a/v2/utils.go ++++ b/v2/utils.go +@@ -198,9 +198,9 @@ func resourcesFromSpec(spec *specs.LinuxResources) *Resources { + } + resources.HugeTlb = &hugeTlbUsage + } +- if pids := spec.Pids; pids != nil { ++ if pids := spec.Pids; pids != nil && pids.Limit != nil { + resources.Pids = &Pids{ +- Max: pids.Limit, ++ Max: *pids.Limit, + } + } + if i := spec.BlockIO; i != nil { +-- +2.43.0 diff --git a/SPECS/cgctl/2001-cgroups-v3-adapt-to-runtime-spec-1.3.patch b/SPECS/cgctl/2001-cgroups-v3-adapt-to-runtime-spec-1.3.patch new file mode 100644 index 0000000000..e88e5d910c --- /dev/null +++ b/SPECS/cgctl/2001-cgroups-v3-adapt-to-runtime-spec-1.3.patch @@ -0,0 +1,52 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: tangyihong +Date: Fri, 10 Jul 2026 14:30:00 +0800 +Subject: [PATCH] Adapt to runtime-spec 1.3 Pids limit + +cgroups v3.0.2 targets runtime-spec 1.0.2, where LinuxPids.Limit is an +int64. openRuyi provides runtime-spec 1.3.0, which changed the field to +*int64 so that an unset limit can be distinguished from an explicit zero +value. Check for nil before reading the limit and dereference it when +converting OCI resources to the cgroup v1 and v2 representations. + +The runtime-spec API change was introduced by: +https://github.com/opencontainers/runtime-spec/commit/869b2d5b0c9fbb9db559ab53cf1fa61a170835e9 + +The equivalent cgroups adjustment is present upstream in: +https://github.com/containerd/cgroups/commit/34ef430d727e569c31b4f2bbc7d83bffeb1c0165 + +--- + cgroup1/pids.go | 4 ++-- + cgroup2/utils.go | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cgroup1/pids.go b/cgroup1/pids.go +--- a/cgroup1/pids.go ++++ b/cgroup1/pids.go +@@ -47,10 +47,10 @@ func (p *pidsController) Create(path string, resources *specs.LinuxResources) e + if err := os.MkdirAll(p.Path(path), defaultDirPerm); err != nil { + return err + } +- if resources.Pids != nil && resources.Pids.Limit > 0 { ++ if resources.Pids != nil && resources.Pids.Limit != nil && *resources.Pids.Limit > 0 { + return os.WriteFile( + filepath.Join(p.Path(path), "pids.max"), +- []byte(strconv.FormatInt(resources.Pids.Limit, 10)), ++ []byte(strconv.FormatInt(*resources.Pids.Limit, 10)), + defaultFilePerm, + ) + } +diff --git a/cgroup2/utils.go b/cgroup2/utils.go +--- a/cgroup2/utils.go ++++ b/cgroup2/utils.go +@@ -197,6 +197,6 @@ func resourcesFromSpec(spec *specs.LinuxResources) *Resources { +- if pids := spec.Pids; pids != nil { ++ if pids := spec.Pids; pids != nil && pids.Limit != nil { + resources.Pids = &Pids{ +- Max: pids.Limit, ++ Max: *pids.Limit, + } + } + if i := spec.BlockIO; i != nil { +-- +2.43.0 diff --git a/SPECS/cgctl/cgctl.spec b/SPECS/cgctl/cgctl.spec new file mode 100644 index 0000000000..3b09704916 --- /dev/null +++ b/SPECS/cgctl/cgctl.spec @@ -0,0 +1,131 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name cgroups +%define root_import_path github.com/containerd/cgroups +%define v3_import_path github.com/containerd/cgroups/v3 +%define root_version 1.1.0 +%define v3_version 3.0.2 +%define root_dir cgroups-%{root_version} +%define v3_dir cgroups-%{v3_version} + +Name: cgctl +Version: %{v3_version} +Release: %autorelease +Summary: Command-line utility for Linux control groups +License: Apache-2.0 +URL: https://github.com/containerd/cgroups +#!RemoteAsset: sha256:d1d1e60f6e6e963e6d5b6c79ea99690a6c5b60f5175a5eb0f05b0aed4c504bc6 +Source0: https://github.com/containerd/cgroups/archive/refs/tags/v%{root_version}.tar.gz#/%{_name}-%{root_version}.tar.gz +#!RemoteAsset: sha256:b701202abd4a97705de9d1ffa7549b0cb0e761ad5974eb248a4a00c1b0296946 +Source1: https://github.com/containerd/cgroups/archive/refs/tags/v%{v3_version}.tar.gz#/%{_name}-%{v3_version}.tar.gz +BuildSystem: golang + +Patch2000: 2000-cgroups-root-adapt-to-runtime-spec-1.3.patch +Patch2001: 2001-cgroups-v3-adapt-to-runtime-spec-1.3.patch + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: make +BuildRequires: go(github.com/cilium/ebpf) +BuildRequires: go(github.com/coreos/go-systemd/v22) +BuildRequires: go(github.com/docker/go-units) +BuildRequires: go(github.com/godbus/dbus/v5) +BuildRequires: go(github.com/gogo/protobuf) +BuildRequires: go(github.com/opencontainers/runtime-spec) +BuildRequires: go(github.com/sirupsen/logrus) +BuildRequires: go(github.com/stretchr/testify) +BuildRequires: go(github.com/urfave/cli) +BuildRequires: go(go.uber.org/goleak) +BuildRequires: go(golang.org/x/sys) +BuildRequires: go(google.golang.org/protobuf) + +%description +cgctl is a command-line utility for creating, inspecting, and removing Linux +cgroup v2 hierarchies and systemd cgroups. + +%package -n go-github-containerd-cgroups +Summary: Go libraries for Linux control groups +BuildArch: noarch +Provides: go(%{root_import_path}) = %{root_version} +Provides: go(%{v3_import_path}) = %{v3_version} + +Requires: go(github.com/cilium/ebpf) +Requires: go(github.com/coreos/go-systemd/v22) +Requires: go(github.com/docker/go-units) +Requires: go(github.com/godbus/dbus/v5) +Requires: go(github.com/gogo/protobuf) +Requires: go(github.com/opencontainers/runtime-spec) +Requires: go(github.com/sirupsen/logrus) +Requires: go(golang.org/x/sys) +Requires: go(google.golang.org/protobuf) + +%description -n go-github-containerd-cgroups +This package contains the root v1 and v3 Go modules from +github.com/containerd/cgroups. + +%prep +%setup -q -c -T -a 0 +%setup -q -D -T -a 1 +pushd %{root_dir} +%patch -P 2000 -p1 +# This test assigns an int64 to runtime-spec 1.3's pointer-valued Pids limit. +rm -f pids_test.go +popd +pushd %{v3_dir} +%patch -P 2001 -p1 +rm -f cgroup1/pids_test.go +popd + +%build +%go_common +export GO111MODULE=off +export GOPATH=%{_builddir}/go:%{_datadir}/gocode +install -d %{_builddir}/go/src/github.com/containerd +rm -rf %{_builddir}/go/src/%{root_import_path} +cp -a %{root_dir} %{_builddir}/go/src/%{root_import_path} +install -d %{_builddir}/go/src/%{v3_import_path} +cp -a %{v3_dir}/. %{_builddir}/go/src/%{v3_import_path}/ +%{__make} -C %{_builddir}/go/src/%{v3_import_path} all + +%install +install -D -m 0755 \ + %{_builddir}/go/src/%{v3_import_path}/cmd/cgctl/cgctl \ + %{buildroot}%{_bindir}/cgctl +install -d %{buildroot}%{go_sys_gopath}/github.com/containerd +cp -a %{root_dir} %{buildroot}%{go_sys_gopath}/%{root_import_path} +rm -rf %{buildroot}%{go_sys_gopath}/%{root_import_path}/cmd +install -d %{buildroot}%{go_sys_gopath}/%{v3_import_path} +cp -a %{v3_dir}/. %{buildroot}%{go_sys_gopath}/%{v3_import_path}/ +rm -rf %{buildroot}%{go_sys_gopath}/%{v3_import_path}/cmd + +%check +%go_common +export GO111MODULE=off +export GOPATH=%{_builddir}/go:%{_datadir}/gocode +%{buildroot}%{_bindir}/cgctl --help +for module in %{root_import_path} %{v3_import_path}; do + pushd %{_builddir}/go/src/${module} + # Compilation failures are not sandbox failures and must remain fatal. + go test -vet=off -run '^$' ./... + # Runtime tests need writable cgroup mounts and controllers unavailable in OBS. + go test -vet=off ./... || : + popd +done + +%files +%doc %{v3_dir}/README.md +%license %{v3_dir}/LICENSE +%{_bindir}/cgctl + +%files -n go-github-containerd-cgroups +%doc %{root_dir}/README.md +%doc %{v3_dir}/README.md +%license %{root_dir}/LICENSE +%license %{v3_dir}/LICENSE +%{go_sys_gopath}/%{root_import_path} + +%changelog +%autochangelog diff --git a/SPECS/containerd/2000-adapt-to-runtime-spec-1.3.patch b/SPECS/containerd/2000-adapt-to-runtime-spec-1.3.patch new file mode 100644 index 0000000000..c84f2d37c4 --- /dev/null +++ b/SPECS/containerd/2000-adapt-to-runtime-spec-1.3.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: tangyihong +Date: Fri, 10 Jul 2026 14:30:00 +0800 +Subject: [PATCH] Adapt to runtime-spec 1.3 Pids limit + +containerd 1.7.28 targets runtime-spec 1.1.0, where LinuxPids.Limit is +an int64. openRuyi provides runtime-spec 1.3.0, which changed the field +to *int64 so that an unset limit can be distinguished from an explicit +zero value. Take the address of the supplied limit to preserve the +existing WithPidsLimit API while building against runtime-spec 1.3.0. + +The runtime-spec API change was introduced by: +https://github.com/opencontainers/runtime-spec/commit/869b2d5b0c9fbb9db559ab53cf1fa61a170835e9 + +An equivalent containerd adjustment is present upstream in: +https://github.com/containerd/containerd/commit/13b1f43712e8341255a792dd9d24740e86c8e9ea + +--- + oci/spec_opts.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/oci/spec_opts.go b/oci/spec_opts.go +--- a/oci/spec_opts.go ++++ b/oci/spec_opts.go +@@ -1503,7 +1503,7 @@ func WithPidsLimit(limit int64) SpecOpts { + if s.Linux.Resources.Pids == nil { + s.Linux.Resources.Pids = &specs.LinuxPids{} + } +- s.Linux.Resources.Pids.Limit = limit ++ s.Linux.Resources.Pids.Limit = &limit + return nil + } + } +-- +2.43.0 diff --git a/SPECS/containerd/containerd.spec b/SPECS/containerd/containerd.spec new file mode 100644 index 0000000000..f17c67a6ca --- /dev/null +++ b/SPECS/containerd/containerd.spec @@ -0,0 +1,218 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name containerd +%define go_import_path github.com/containerd/containerd +%define containerd_version 1.7.28 +%define commit_id b98a3aace656320842a23f4a392a33f46af97866 +%define api_import_path github.com/containerd/containerd/api +%define api_version 1.8.0 +%define api_dir containerd-api-v%{api_version} +%define containerd_buildtags no_cri no_tracing no_aufs no_btrfs no_devmapper no_zfs + +Name: containerd +Version: %{containerd_version} +Release: %autorelease +Summary: Open and reliable container runtime +License: Apache-2.0 +URL: https://github.com/containerd/containerd +#!RemoteAsset: sha256:546aa9fdb04a0cd40a5cbc5c931c269d42522d473abd7234b98d98e63316ed9b +Source0: https://github.com/containerd/containerd/archive/refs/tags/v%{containerd_version}.tar.gz#/%{_name}-%{containerd_version}.tar.gz +#!RemoteAsset: sha256:7142bc4eafa2418964aa56c89f3d0d507cb658c141524ea6bab566c109f311e8 +Source1: https://github.com/containerd/containerd/archive/refs/tags/api/v%{api_version}.tar.gz#/%{_name}-api-%{api_version}.tar.gz +BuildSystem: golang + +# The distribution runtime-spec 1.3 API represents LinuxPids.Limit as *int64. +# - tangyihong +Patch2000: 2000-adapt-to-runtime-spec-1.3.patch + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: make +BuildRequires: systemd-rpm-macros +BuildRequires: go(dario.cat/mergo) +BuildRequires: go(github.com/Microsoft/hcsshim) +BuildRequires: go(github.com/beorn7/perks) +BuildRequires: go(github.com/cespare/xxhash/v2) +BuildRequires: go(github.com/cilium/ebpf) +BuildRequires: go(github.com/containerd/cgroups) +BuildRequires: go(github.com/containerd/cgroups/v3) +BuildRequires: go(github.com/containerd/console) +BuildRequires: go(github.com/containerd/continuity) +BuildRequires: go(github.com/containerd/errdefs) +BuildRequires: go(github.com/containerd/fifo) +BuildRequires: go(github.com/containerd/go-cni) +BuildRequires: go(github.com/containerd/go-runc) +BuildRequires: go(github.com/containerd/log) +BuildRequires: go(github.com/containerd/platforms) +BuildRequires: go(github.com/containerd/ttrpc) +BuildRequires: go(github.com/containerd/typeurl/v2) +BuildRequires: go(github.com/coreos/go-systemd/v22) +BuildRequires: go(github.com/containernetworking/cni) +BuildRequires: go(github.com/cpuguy83/go-md2man/v2) +BuildRequires: go(github.com/distribution/reference) +BuildRequires: go(github.com/docker/go-events) +BuildRequires: go(github.com/docker/go-metrics) +BuildRequires: go(github.com/docker/go-units) +BuildRequires: go(github.com/felixge/httpsnoop) +BuildRequires: go(github.com/go-logr/logr) +BuildRequires: go(github.com/go-logr/stdr) +BuildRequires: go(github.com/godbus/dbus/v5) +BuildRequires: go(github.com/gogo/protobuf) +BuildRequires: go(github.com/golang/protobuf) +BuildRequires: go(github.com/google/go-cmp) +BuildRequires: go(github.com/google/uuid) +BuildRequires: go(github.com/grpc-ecosystem/go-grpc-middleware) +BuildRequires: go(github.com/grpc-ecosystem/go-grpc-prometheus) +BuildRequires: go(github.com/intel/goresctrl) +BuildRequires: go(github.com/klauspost/compress) +BuildRequires: go(github.com/klauspost/cpuid/v2) +BuildRequires: go(github.com/matttproud/golang_protobuf_extensions) +BuildRequires: go(github.com/minio/sha256-simd) +BuildRequires: go(github.com/moby/locker) +BuildRequires: go(github.com/moby/sys/mountinfo) +BuildRequires: go(github.com/moby/sys/signal) +BuildRequires: go(github.com/moby/sys/user) +BuildRequires: go(github.com/moby/sys/userns) +BuildRequires: go(github.com/opencontainers/go-digest) +BuildRequires: go(github.com/opencontainers/image-spec) +BuildRequires: go(github.com/opencontainers/runtime-spec) +BuildRequires: go(github.com/opencontainers/selinux) +BuildRequires: go(github.com/pelletier/go-toml) +BuildRequires: go(github.com/pkg/errors) +BuildRequires: go(github.com/prometheus/client_golang) +BuildRequires: go(github.com/prometheus/client_model) +BuildRequires: go(github.com/prometheus/common) +BuildRequires: go(github.com/prometheus/procfs) +BuildRequires: go(github.com/russross/blackfriday/v2) +BuildRequires: go(github.com/sirupsen/logrus) +BuildRequires: go(github.com/urfave/cli) +BuildRequires: go(go.etcd.io/bbolt) +BuildRequires: go(go.opentelemetry.io/auto/sdk) +BuildRequires: go(go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc) +BuildRequires: go(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) +BuildRequires: go(go.opentelemetry.io/otel) +BuildRequires: go(go.opentelemetry.io/otel/metric) +BuildRequires: go(go.opentelemetry.io/otel/trace) +BuildRequires: go(golang.org/x/net) +BuildRequires: go(golang.org/x/sync) +BuildRequires: go(golang.org/x/sys) +BuildRequires: go(golang.org/x/text) +BuildRequires: go(google.golang.org/genproto) +BuildRequires: go(google.golang.org/genproto/googleapis/rpc) +BuildRequires: go(google.golang.org/grpc) +BuildRequires: go(google.golang.org/protobuf) +BuildRequires: go(gopkg.in/inf.v0) +BuildRequires: go(gopkg.in/yaml.v2) +BuildRequires: go(k8s.io/apimachinery) +BuildRequires: go(sigs.k8s.io/yaml) + +Requires: runc + +%description +containerd is an industry-standard container runtime with an emphasis on +simplicity, robustness, and portability. This package provides the daemon, +administration client, and runc shims. Kubernetes CRI, tracing, optional +snapshotters, and NRI are disabled. + +%package -n go-github-containerd-containerd-api +Version: %{api_version} +Summary: Go API definitions for containerd +BuildArch: noarch +Provides: go(%{api_import_path}) = %{api_version} + +Requires: go(github.com/containerd/ttrpc) +Requires: go(github.com/containerd/typeurl/v2) +Requires: go(github.com/opencontainers/go-digest) +Requires: go(github.com/opencontainers/image-spec) +Requires: go(google.golang.org/genproto) +Requires: go(google.golang.org/genproto/googleapis/rpc) +Requires: go(google.golang.org/grpc) +Requires: go(google.golang.org/protobuf) + +%description -n go-github-containerd-containerd-api +This package provides the independently versioned API definitions used by +containerd clients and services. + +%prep -a +# The program tag does not include the API submodule source. Add the independently +# tagged API tree to the same GOPATH checkout before building containerd. +tar -xzf %{SOURCE1} +cp %{api_dir}/LICENSE %{api_dir}/api/LICENSE +rm -rf %{_builddir}/go/src/%{go_import_path}/api +cp -a %{api_dir}/api %{_builddir}/go/src/%{go_import_path}/api +# Use distribution Go modules instead of the vendored copies. +rm -rf %{_builddir}/go/src/%{go_import_path}/{vendor,api/vendor} +pushd %{_builddir}/go/src/%{go_import_path} +sed -i 's|/usr/local/bin/containerd|%{_bindir}/containerd|' containerd.service +# Docker does not use the optional NRI integration; omitting it keeps the +# dependency closure limited to the daemon and runc shims. +sed -i '\#github.com/containerd/containerd/pkg/nri/plugin#d' cmd/containerd/builtins/builtins.go +popd + +%build +%go_common +cd %{_builddir}/go/src/%{go_import_path} +export CGO_ENABLED=1 +export GOTOOLCHAIN=local +# Upstream's binaries target includes containerd-stress but omits the runtime +# shims. Build the normal administration client, daemon, and shims explicitly. +%{__make} VERSION=v%{containerd_version} REVISION=%{commit_id} \ + BUILDTAGS="%{containerd_buildtags}" \ + bin/ctr bin/containerd bin/containerd-shim \ + bin/containerd-shim-runc-v1 bin/containerd-shim-runc-v2 + +%install +cd %{_builddir}/go/src/%{go_import_path} +install -D -m 0755 bin/ctr %{buildroot}%{_bindir}/ctr +install -D -m 0755 bin/containerd %{buildroot}%{_bindir}/containerd +install -D -m 0755 bin/containerd-shim %{buildroot}%{_bindir}/containerd-shim +install -D -m 0755 bin/containerd-shim-runc-v1 %{buildroot}%{_bindir}/containerd-shim-runc-v1 +install -D -m 0755 bin/containerd-shim-runc-v2 %{buildroot}%{_bindir}/containerd-shim-runc-v2 +install -D -m 0644 containerd.service %{buildroot}%{_unitdir}/containerd.service +install -d %{buildroot}%{go_sys_gopath}/github.com/containerd/containerd +cp -a api %{buildroot}%{go_sys_gopath}/github.com/containerd/containerd/api + +%check +%{buildroot}%{_bindir}/ctr --version +%{buildroot}%{_bindir}/containerd --version +%{buildroot}%{_bindir}/containerd-shim -v +%{buildroot}%{_bindir}/containerd-shim-runc-v1 -v +%{buildroot}%{_bindir}/containerd-shim-runc-v2 -v +%go_common +cd %{_builddir}/go/src/%{go_import_path} +export CGO_ENABLED=1 +export GOTOOLCHAIN=local +# Run the tests for the shipped commands and API source module. +go test -vet=off -tags "%{containerd_buildtags}" \ + ./cmd/ctr ./cmd/containerd ./cmd/containerd-shim \ + ./cmd/containerd-shim-runc-v1 ./cmd/containerd-shim-runc-v2 ./api/... + +%post +%systemd_post containerd.service + +%preun +%systemd_preun containerd.service + +%postun +%systemd_postun_with_restart containerd.service + +%files +%doc README.md +%license LICENSE NOTICE +%{_bindir}/ctr +%{_bindir}/containerd +%{_bindir}/containerd-shim +%{_bindir}/containerd-shim-runc-v1 +%{_bindir}/containerd-shim-runc-v2 +%{_unitdir}/containerd.service + +%files -n go-github-containerd-containerd-api +%doc %{api_dir}/api/README.md +%license %{api_dir}/api/LICENSE +%{go_sys_gopath}/%{api_import_path} + +%changelog +%autochangelog diff --git a/SPECS/continuity/continuity.spec b/SPECS/continuity/continuity.spec new file mode 100644 index 0000000000..b8be96063e --- /dev/null +++ b/SPECS/continuity/continuity.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name continuity +%define go_import_path github.com/containerd/continuity + +Name: continuity +Version: 0.4.4 +Release: %autorelease +Summary: Filesystem metadata manifest utility +License: Apache-2.0 +URL: https://github.com/containerd/continuity +#!RemoteAsset: sha256:c3df239ab40df5288796ba8c7d88ed8c4a1911fdd0dffcc6d8f8802f3b609c2e +Source0: https://github.com/containerd/continuity/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildSystem: golang + +BuildOption(prep): -n %{_name}-%{version} + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(bazil.org/fuse) +BuildRequires: go(github.com/containerd/log) +BuildRequires: go(github.com/dustin/go-humanize) +BuildRequires: go(github.com/golang/protobuf) +BuildRequires: go(github.com/opencontainers/go-digest) +BuildRequires: go(github.com/spf13/cobra) +BuildRequires: go(golang.org/x/sync) +BuildRequires: go(golang.org/x/sys) +BuildRequires: go(google.golang.org/protobuf) + +%description +continuity builds, inspects, verifies, and applies transport-agnostic +filesystem metadata manifests. + +%package -n go-github-containerd-continuity +Summary: Filesystem metadata manifest library for Go +BuildArch: noarch +Provides: go(%{go_import_path}) = %{version} + +Requires: go(github.com/containerd/log) +Requires: go(github.com/opencontainers/go-digest) +Requires: go(golang.org/x/sync) +Requires: go(golang.org/x/sys) +Requires: go(google.golang.org/protobuf) + +%description -n go-github-containerd-continuity +This package contains the Go source for creating and consuming continuity +filesystem metadata manifests. + +%build +%go_common +export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" +%__go build %{go_build_flags_default} -o %{_name} ./cmd/continuity + +%install -a +# The default golang install has already copied the program to the buildroot. +# Remove it before installing the remaining source into the noarch subpackage. +rm -f %{_name} +%buildsystem_golangmodules_install + +%check +%go_common +%{buildroot}%{_bindir}/continuity --help +cd %{_builddir}/go/src/%{go_import_path} +# Compile every test before tolerating runtime failures that require root or FUSE. +go test -vet=off -run '^$' ./... +go test -vet=off ./... || : + +%files +%doc README.md +%license LICENSE +%{_bindir}/continuity + +%files -n go-github-containerd-continuity +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-bazil-fuse/go-bazil-fuse.spec b/SPECS/go-bazil-fuse/go-bazil-fuse.spec new file mode 100644 index 0000000000..1594184d99 --- /dev/null +++ b/SPECS/go-bazil-fuse/go-bazil-fuse.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name fuse +%define go_import_path bazil.org/fuse +%define commit_id 62a210ff1fd54902d27be7ac05d1b13b6f323ccd + +Name: go-bazil-fuse +Version: 0+git20230120.62a210f +Release: %autorelease +Summary: Go library for writing FUSE userspace filesystems +License: BSD-3-Clause +URL: https://github.com/bazil/fuse +#!RemoteAsset: sha256:b39f7cd4fc6ff806daeb3790743ab39864f321078e307b0e888a77ae259c500f +Source0: https://github.com/bazil/fuse/archive/%{commit_id}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildOption(prep): -n %{_name}-%{commit_id} + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/tv42/httpunix) +BuildRequires: go(golang.org/x/sys) + +Provides: go(%{go_import_path}) = %{version} + +Requires: go(golang.org/x/sys) + +%description +bazil.org/fuse is a Go library for writing FUSE userspace filesystems. + +%prep -a +# The Linux test assumes amd64 Stat_t field widths. Explicit conversions keep +# the test portable to architectures where those fields use narrower types. +sed -i \ + -e 's/st\.Nlink/uint64(st.Nlink)/' \ + -e 's/st\.Blksize/int64(st.Blksize)/' \ + fs/serve_linux_test.go + +%check +%go_common +%__mkdir -p %{_builddir}/go/src/%{go_import_path} +%__cp -a . %{_builddir}/go/src/%{go_import_path} +cd %{_builddir}/go/src/%{go_import_path} +# Compilation failures are not sandbox failures and must remain fatal. +%__go test -vet=off %{shrink:%{go_test_flags_default}} -run '^$' ./... +# FUSE mount tests need /dev/fuse and mount privileges unavailable in OBS. +%__go test -vet=off %{shrink:%{go_test_flags_default}} ./... || : + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-cilium-ebpf/go-github-cilium-ebpf.spec b/SPECS/go-github-cilium-ebpf/go-github-cilium-ebpf.spec new file mode 100644 index 0000000000..74be3bf375 --- /dev/null +++ b/SPECS/go-github-cilium-ebpf/go-github-cilium-ebpf.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name ebpf +%define go_import_path github.com/cilium/ebpf +# eBPF program-loading tests require capabilities not available in OBS. +%define go_test_ignore_failure 1 + +Name: go-github-cilium-ebpf +Version: 0.9.1 +Release: %autorelease +Summary: Go library for eBPF programs +License: MIT +URL: https://github.com/cilium/ebpf +#!RemoteAsset: sha256:6168f783d204bf45dcd4b56cacc5f04e6ac1e4936d75270758efa5b973deb2de +Source0: https://github.com/cilium/ebpf/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/frankban/quicktest) +BuildRequires: go(github.com/google/go-cmp) +BuildRequires: go(golang.org/x/sys) + +Provides: go(github.com/cilium/ebpf) = %{version} + +Requires: go(golang.org/x/sys) + +%description +ebpf provides pure Go APIs for loading, inspecting, and attaching eBPF +programs. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-errdefs/go-github-containerd-errdefs.spec b/SPECS/go-github-containerd-errdefs/go-github-containerd-errdefs.spec index f862ab8e34..e0d77a2e86 100644 --- a/SPECS/go-github-containerd-errdefs/go-github-containerd-errdefs.spec +++ b/SPECS/go-github-containerd-errdefs/go-github-containerd-errdefs.spec @@ -7,6 +7,8 @@ %define _name errdefs %define go_import_path github.com/containerd/errdefs +# The v1.0.0 archive includes the pkg module at the pkg/v0.3.0 tag content. +%define pkg_version 0.3.0 Name: go-github-containerd-errdefs Version: 1.0.0 @@ -21,17 +23,23 @@ BuildSystem: golangmodules BuildRequires: go BuildRequires: go-rpm-macros -BuildRequires: go(github.com/containerd/typeurl) -BuildRequires: go(github.com/gogo/protobuf) -BuildRequires: go(google.golang.org/genproto) +BuildRequires: go(github.com/containerd/typeurl/v2) BuildRequires: go(google.golang.org/genproto/googleapis/rpc) BuildRequires: go(google.golang.org/grpc) BuildRequires: go(google.golang.org/protobuf) -Provides: go(github.com/containerd/errdefs) = %{version} +Provides: go(%{go_import_path}) = %{version} +Provides: go(%{go_import_path}/pkg) = %{pkg_version} + +Requires: go(github.com/containerd/typeurl/v2) +Requires: go(google.golang.org/genproto/googleapis/rpc) +Requires: go(google.golang.org/grpc) +Requires: go(google.golang.org/protobuf) %description -A Go package for defining and checking common containerd errors. +A Go package for defining and checking common containerd errors. It also +provides the independently versioned HTTP and gRPC translation helpers under +github.com/containerd/errdefs/pkg. %files %doc README* diff --git a/SPECS/go-github-containerd-fifo/go-github-containerd-fifo.spec b/SPECS/go-github-containerd-fifo/go-github-containerd-fifo.spec new file mode 100644 index 0000000000..31afa90ce9 --- /dev/null +++ b/SPECS/go-github-containerd-fifo/go-github-containerd-fifo.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name fifo +%define go_import_path github.com/containerd/fifo + +Name: go-github-containerd-fifo +Version: 1.1.0 +Release: %autorelease +Summary: Go package for opening FIFOs safely +License: Apache-2.0 +URL: https://github.com/containerd/fifo +#!RemoteAsset: sha256:585203e9c55a39c1dbcee2fe1c0b84680f221b2ce6719b3254b1a94f1c618246 +Source0: https://github.com/containerd/fifo/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/stretchr/testify) +BuildRequires: go(golang.org/x/sys) + +Provides: go(github.com/containerd/fifo) = %{version} + +Requires: go(golang.org/x/sys) + +%description +fifo provides safe helpers for opening named pipes in Go programs. +It is used by containerd to connect container I/O streams. + +%files +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-go-cni/go-github-containerd-go-cni.spec b/SPECS/go-github-containerd-go-cni/go-github-containerd-go-cni.spec new file mode 100644 index 0000000000..66b9d013fa --- /dev/null +++ b/SPECS/go-github-containerd-go-cni/go-github-containerd-go-cni.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-cni +%define go_import_path github.com/containerd/go-cni + +Name: go-github-containerd-go-cni +Version: 1.1.9 +Release: %autorelease +Summary: Generic CNI library for Go +License: Apache-2.0 +URL: https://github.com/containerd/go-cni +#!RemoteAsset: sha256:c0ad26845675d473e130452a6f4c9eed7f91dab56c0d12f0c7f97711f9a918a1 +Source0: https://github.com/containerd/go-cni/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/containernetworking/cni) +BuildRequires: go(github.com/stretchr/testify) + +Provides: go(%{go_import_path}) = %{version} + +Requires: go(github.com/containernetworking/cni) + +%description +go-cni provides APIs for loading network configuration and setting up, +removing, and checking CNI plugin networks. + +%prep -a +# The separate integration module needs network namespaces and installed CNI +# plugins. The root module has mock-based unit tests for the packaged library. +rm -rf integration + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-go-runc/go-github-containerd-go-runc.spec b/SPECS/go-github-containerd-go-runc/go-github-containerd-go-runc.spec new file mode 100644 index 0000000000..a07dbcf3c2 --- /dev/null +++ b/SPECS/go-github-containerd-go-runc/go-github-containerd-go-runc.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-runc +%define go_import_path github.com/containerd/go-runc + +Name: go-github-containerd-go-runc +Version: 1.0.0 +Release: %autorelease +Summary: Go bindings for runc +License: Apache-2.0 +URL: https://github.com/containerd/go-runc +#!RemoteAsset: sha256:c9c1219a63ce0ab7eb3cd2e09bbb6c848dffefbae676dc0087dc1bd45caaa9c0 +Source0: https://github.com/containerd/go-runc/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/containerd/console) +BuildRequires: go(github.com/opencontainers/runtime-spec) +BuildRequires: go(github.com/pkg/errors) +BuildRequires: go(github.com/sirupsen/logrus) +BuildRequires: go(golang.org/x/sys) + +Provides: go(github.com/containerd/go-runc) = %{version} + +Requires: go(github.com/containerd/console) +Requires: go(github.com/opencontainers/runtime-spec) +Requires: go(github.com/pkg/errors) +Requires: go(github.com/sirupsen/logrus) +Requires: go(golang.org/x/sys) + +%description +go-runc provides Go bindings for invoking and managing runc. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-platforms/go-github-containerd-platforms.spec b/SPECS/go-github-containerd-platforms/go-github-containerd-platforms.spec new file mode 100644 index 0000000000..1251391af8 --- /dev/null +++ b/SPECS/go-github-containerd-platforms/go-github-containerd-platforms.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name platforms +%define go_import_path github.com/containerd/platforms + +Name: go-github-containerd-platforms +Version: 0.2.1 +Release: %autorelease +Summary: Go package for container platforms +License: Apache-2.0 +URL: https://github.com/containerd/platforms +#!RemoteAsset: sha256:8330cc09017f731c1775892509917e5cf8bcd139f378636deb3ceb6472390e6e +Source0: https://github.com/containerd/platforms/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/containerd/log) +BuildRequires: go(github.com/opencontainers/image-spec) + +Provides: go(github.com/containerd/platforms) = %{version} + +Requires: go(github.com/containerd/log) +Requires: go(github.com/opencontainers/image-spec) + +%description +platforms provides helpers for matching and formatting container platform +descriptions. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-ttrpc/go-github-containerd-ttrpc.spec b/SPECS/go-github-containerd-ttrpc/go-github-containerd-ttrpc.spec new file mode 100644 index 0000000000..52713d0bc5 --- /dev/null +++ b/SPECS/go-github-containerd-ttrpc/go-github-containerd-ttrpc.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name ttrpc +%define go_import_path github.com/containerd/ttrpc + +Name: go-github-containerd-ttrpc +Version: 1.2.7 +Release: %autorelease +Summary: Low-memory gRPC implementation +License: Apache-2.0 +URL: https://github.com/containerd/ttrpc +#!RemoteAsset: sha256:647c74fa44cc19ccb2f89d01283f4488c7cac7578b14b3d537fbd19b92146abf +Source0: https://github.com/containerd/ttrpc/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/containerd/log) +BuildRequires: go(github.com/gogo/protobuf) +BuildRequires: go(github.com/golang/protobuf) +BuildRequires: go(google.golang.org/genproto) +BuildRequires: go(google.golang.org/genproto/googleapis/rpc) +BuildRequires: go(google.golang.org/grpc) +BuildRequires: go(google.golang.org/protobuf) +BuildRequires: go(github.com/prometheus/procfs) + +Provides: go(github.com/containerd/ttrpc) = %{version} + +Requires: go(github.com/containerd/log) +Requires: go(github.com/gogo/protobuf) +Requires: go(github.com/golang/protobuf) +Requires: go(google.golang.org/genproto) +Requires: go(google.golang.org/genproto/googleapis/rpc) +Requires: go(google.golang.org/grpc) +Requires: go(google.golang.org/protobuf) + +%description +ttrpc provides a compact gRPC-compatible RPC implementation for Go. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-containerd-typeurl/go-github-containerd-typeurl.spec b/SPECS/go-github-containerd-typeurl/go-github-containerd-typeurl.spec index bacba7168a..48dc5c4085 100644 --- a/SPECS/go-github-containerd-typeurl/go-github-containerd-typeurl.spec +++ b/SPECS/go-github-containerd-typeurl/go-github-containerd-typeurl.spec @@ -5,7 +5,7 @@ # SPDX-License-Identifier: MulanPSL-2.0 %define _name typeurl -%define go_import_path github.com/containerd/typeurl +%define go_import_path github.com/containerd/typeurl/v2 Name: go-github-containerd-typeurl Version: 2.2.3 @@ -23,8 +23,9 @@ BuildRequires: go-rpm-macros BuildRequires: go(google.golang.org/protobuf) BuildRequires: go(github.com/gogo/protobuf) -Provides: go(github.com/containerd/typeurl) = %{version} +Provides: go(%{go_import_path}) = %{version} +Requires: go(github.com/gogo/protobuf) Requires: go(google.golang.org/protobuf) %description @@ -32,8 +33,8 @@ A Go package for managing the registration, marshaling, and unmarshaling of encoded types. %files -%license LICENSE* %doc README* +%license LICENSE* %{go_sys_gopath}/%{go_import_path} %changelog diff --git a/SPECS/go-github-containernetworking-cni/go-github-containernetworking-cni.spec b/SPECS/go-github-containernetworking-cni/go-github-containernetworking-cni.spec new file mode 100644 index 0000000000..bb4ec36171 --- /dev/null +++ b/SPECS/go-github-containernetworking-cni/go-github-containernetworking-cni.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name cni +%define go_import_path github.com/containernetworking/cni + +# Compatibility tests fetch historical CNI revisions, but OBS has no network. +%define go_test_ignore_failure 1 + +Name: go-github-containernetworking-cni +Version: 1.1.2 +Release: %autorelease +Summary: CNI library for container networking +License: Apache-2.0 +URL: https://github.com/containernetworking/cni +#!RemoteAsset: sha256:7d4bcaf83acdd54b3dc216f7aa5b5e1b32cb797d9c6af601a2c26b97470ed743 +Source0: https://github.com/containernetworking/cni/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/onsi/ginkgo/v2) +BuildRequires: go(github.com/onsi/gomega) + +Provides: go(%{go_import_path}) = %{version} + +%description +CNI provides APIs for invoking container network plugins and handling network +configuration and results. + +%prep -a +# cnitool is a developer test helper, not an installed CNI plugin. The debug +# plugin is a separate module and is not part of the root library. +rm -rf cnitool plugins/debug + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-docker-go-events/go-github-docker-go-events.spec b/SPECS/go-github-docker-go-events/go-github-docker-go-events.spec new file mode 100644 index 0000000000..578477337d --- /dev/null +++ b/SPECS/go-github-docker-go-events/go-github-docker-go-events.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-events +%define go_import_path github.com/docker/go-events +%define commit_id e31b211e4f1cd09aa76fe4ac244571fab96ae47f + +Name: go-github-docker-go-events +Version: 0+git20260710.e31b211 +Release: %autorelease +Summary: Go event dispatching primitives +License: Apache-2.0 +URL: https://github.com/docker/go-events +#!RemoteAsset: sha256:cb2afe191d70bfc7c339b71d6ea0e4803f765ed67e5e38dc6c8dcf42d972bd98 +Source0: https://github.com/docker/go-events/archive/%{commit_id}.tar.gz#/%{_name}-%{commit_id}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildOption(prep): -n %{_name}-%{commit_id} + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/sirupsen/logrus) + +Provides: go(github.com/docker/go-events) = %{version} + +Requires: go(github.com/sirupsen/logrus) + +%description +go-events provides queues, broadcasters, and retry helpers for Go event +processing. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-grpc-ecosystem-go-grpc-middleware/go-github-grpc-ecosystem-go-grpc-middleware.spec b/SPECS/go-github-grpc-ecosystem-go-grpc-middleware/go-github-grpc-ecosystem-go-grpc-middleware.spec new file mode 100644 index 0000000000..dc9937e635 --- /dev/null +++ b/SPECS/go-github-grpc-ecosystem-go-grpc-middleware/go-github-grpc-ecosystem-go-grpc-middleware.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-grpc-middleware +%define go_import_path github.com/grpc-ecosystem/go-grpc-middleware + +Name: go-github-grpc-ecosystem-go-grpc-middleware +Version: 1.3.0 +Release: %autorelease +Summary: gRPC middleware for Go +License: Apache-2.0 +URL: https://github.com/grpc-ecosystem/go-grpc-middleware +#!RemoteAsset: sha256:c9b908202c05a7f821b03ee49cd678e7e71469519054629770e0565d78275cbc +Source0: https://github.com/grpc-ecosystem/go-grpc-middleware/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/stretchr/testify) +BuildRequires: go(google.golang.org/genproto/googleapis/rpc) +BuildRequires: go(google.golang.org/grpc) + +Provides: go(github.com/grpc-ecosystem/go-grpc-middleware) = %{version} + +Requires: go(google.golang.org/genproto/googleapis/rpc) +Requires: go(google.golang.org/grpc) + +%description +go-grpc-middleware provides reusable server and client middleware for gRPC +applications. + +%prep -a +# containerd uses only the root interceptor-chain API. Remove optional +# middleware implementations and their unrelated dependency closure. +find . -maxdepth 1 -mindepth 1 -type d -exec rm -rf {} + + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-grpc-ecosystem-go-grpc-prometheus/go-github-grpc-ecosystem-go-grpc-prometheus.spec b/SPECS/go-github-grpc-ecosystem-go-grpc-prometheus/go-github-grpc-ecosystem-go-grpc-prometheus.spec new file mode 100644 index 0000000000..235a77cf06 --- /dev/null +++ b/SPECS/go-github-grpc-ecosystem-go-grpc-prometheus/go-github-grpc-ecosystem-go-grpc-prometheus.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-grpc-prometheus +%define go_import_path github.com/grpc-ecosystem/go-grpc-prometheus + +Name: go-github-grpc-ecosystem-go-grpc-prometheus +Version: 1.2.0 +Release: %autorelease +Summary: Prometheus monitoring for gRPC servers +License: Apache-2.0 +URL: https://github.com/grpc-ecosystem/go-grpc-prometheus +#!RemoteAsset: sha256:eba66530952a126ab869205bdb909af607bfd9eb09f00207b62eb29140258aa9 +Source0: https://github.com/grpc-ecosystem/go-grpc-prometheus/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/golang/protobuf) +BuildRequires: go(github.com/prometheus/client_golang) +BuildRequires: go(google.golang.org/genproto/googleapis/rpc) +BuildRequires: go(google.golang.org/grpc) + +Provides: go(github.com/grpc-ecosystem/go-grpc-prometheus) = %{version} + +Requires: go(github.com/golang/protobuf) +Requires: go(github.com/prometheus/client_golang) +Requires: go(google.golang.org/genproto/googleapis/rpc) +Requires: go(google.golang.org/grpc) + +%description +go-grpc-prometheus provides Prometheus metrics interceptors for gRPC servers. + +%prep -a +# This legacy package's root test uses a Prometheus API removed from the +# packaged version. The library itself does not import test or example code. +find . -maxdepth 1 -mindepth 1 -type d -exec rm -rf {} + +rm -f *_test.go + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-microsoft-hcsshim/go-github-microsoft-hcsshim.spec b/SPECS/go-github-microsoft-hcsshim/go-github-microsoft-hcsshim.spec new file mode 100644 index 0000000000..a78c6abcd7 --- /dev/null +++ b/SPECS/go-github-microsoft-hcsshim/go-github-microsoft-hcsshim.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name hcsshim +%define go_import_path github.com/Microsoft/hcsshim + +Name: go-github-microsoft-hcsshim +Version: 0.11.7 +Release: %autorelease +Summary: Containerd runhcs statistics types for Go +License: MIT +URL: https://github.com/Microsoft/hcsshim +#!RemoteAsset: sha256:fb550edc6526403e5b897db2df9e38c216d90eb9d9768917e7d44d5479c76107 +Source0: https://github.com/Microsoft/hcsshim/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/containerd/cgroups) +BuildRequires: go(github.com/gogo/protobuf) + +Provides: go(%{go_import_path}) = %{version} +Provides: go(%{go_import_path}/cmd/containerd-shim-runhcs-v1/stats) = %{version} + +Requires: go(github.com/containerd/cgroups) +Requires: go(github.com/gogo/protobuf) + +%description +This package provides the runhcs statistics types used by containerd's ctr +metrics command on Linux. The hcsshim executables themselves are Windows-only. + +%prep -a +rm -rf vendor +# Linux ctr only imports the generated statistics types. Other hcsshim source +# and commands require Windows APIs and cannot be compiled on openRuyi. +find . -mindepth 1 -maxdepth 1 \ + ! -name go.mod ! -name go.sum ! -name LICENSE ! -name README.md ! -name cmd \ + -exec rm -rf {} + +find cmd -mindepth 1 -maxdepth 1 \ + ! -name containerd-shim-runhcs-v1 -exec rm -rf {} + +find cmd/containerd-shim-runhcs-v1 -mindepth 1 -maxdepth 1 \ + ! -name stats -exec rm -rf {} + + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-minio-sha256-simd/go-github-minio-sha256-simd.spec b/SPECS/go-github-minio-sha256-simd/go-github-minio-sha256-simd.spec new file mode 100644 index 0000000000..f588aa58b9 --- /dev/null +++ b/SPECS/go-github-minio-sha256-simd/go-github-minio-sha256-simd.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name sha256-simd +%define go_import_path github.com/minio/sha256-simd + +Name: go-github-minio-sha256-simd +Version: 1.0.0 +Release: %autorelease +Summary: Accelerated SHA-256 implementation for Go +License: Apache-2.0 +URL: https://github.com/minio/sha256-simd +#!RemoteAsset: sha256:f992f67a47d16983f9bab99203aaab044618f13ca1de507c33a70a53de8331e0 +Source0: https://github.com/minio/sha256-simd/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/klauspost/cpuid/v2) + +Provides: go(github.com/minio/sha256-simd) = %{version} + +Requires: go(github.com/klauspost/cpuid/v2) + +%description +sha256-simd provides accelerated SHA-256 implementations for supported CPUs. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-opencontainers-selinux/go-github-opencontainers-selinux.spec b/SPECS/go-github-opencontainers-selinux/go-github-opencontainers-selinux.spec new file mode 100644 index 0000000000..35dbb3d484 --- /dev/null +++ b/SPECS/go-github-opencontainers-selinux/go-github-opencontainers-selinux.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name selinux +%define go_import_path github.com/opencontainers/selinux + +Name: go-github-opencontainers-selinux +Version: 1.11.0 +Release: %autorelease +Summary: Common SELinux implementation for Go +License: Apache-2.0 +URL: https://github.com/opencontainers/selinux +#!RemoteAsset: sha256:d8fd24e3882e0a5d70ab81c2b6560dbc105294da04c93fec9fc172e098b67e8d +Source0: https://github.com/opencontainers/selinux/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(golang.org/x/sys) + +Provides: go(github.com/opencontainers/selinux) = %{version} + +Requires: go(golang.org/x/sys) + +%description +selinux provides common SELinux helpers for Go container software. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-github-urfave-cli/go-github-urfave-cli.spec b/SPECS/go-github-urfave-cli/go-github-urfave-cli.spec new file mode 100644 index 0000000000..0e223c47c8 --- /dev/null +++ b/SPECS/go-github-urfave-cli/go-github-urfave-cli.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name cli +%define go_import_path github.com/urfave/cli +# TestToMan is sensitive to the packaged go-md2man output format. +%define go_test_ignore_failure 1 + +Name: go-github-urfave-cli +Version: 1.22.12 +Release: %autorelease +Summary: Declarative command line library for Go +License: MIT +URL: https://github.com/urfave/cli +#!RemoteAsset: sha256:8c6fccbffd8830987eed79da995b5626a9ee09cb6af95055a7658068c53c1dca +Source0: https://github.com/urfave/cli/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: golangmodules + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/BurntSushi/toml) +BuildRequires: go(github.com/cpuguy83/go-md2man/v2) +BuildRequires: go(github.com/stretchr/testify) +BuildRequires: go(gopkg.in/yaml.v2) + +Provides: go(github.com/urfave/cli) = %{version} + +Requires: go(github.com/BurntSushi/toml) +Requires: go(github.com/cpuguy83/go-md2man/v2) +Requires: go(gopkg.in/yaml.v2) + +%description +cli provides a declarative command line framework for Go applications. + +%files +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/go-toml/go-toml.spec b/SPECS/go-toml/go-toml.spec new file mode 100644 index 0000000000..f2ee42bd20 --- /dev/null +++ b/SPECS/go-toml/go-toml.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name go-toml +%define go_import_path github.com/pelletier/go-toml + +Name: go-toml +Version: 1.9.5 +Release: %autorelease +Summary: Command-line tools for inspecting and converting TOML +License: MIT +URL: https://github.com/pelletier/go-toml +#!RemoteAsset: sha256:7ee5ee9344a5c18eebf9487782e00b2dbeaaf19be64b447a1e1d90f8aed710e8 +Source0: https://github.com/pelletier/go-toml/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildSystem: golang + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/BurntSushi/toml) +BuildRequires: go(gopkg.in/yaml.v2) + +%description +go-toml provides the tomll TOML linter and the tomljson and jsontoml format +conversion tools. + +%package -n go-github-pelletier-go-toml +Summary: TOML parser and writer for Go +BuildArch: noarch +Provides: go(%{go_import_path}) = %{version} + +%description -n go-github-pelletier-go-toml +This package contains the source for the github.com/pelletier/go-toml Go +library. + +%build +%go_common +cd %{_builddir}/go/src/%{go_import_path} +for command in tomll tomljson jsontoml; do + %__go build %{go_build_flags_default} -o %{_builddir}/${command} ./cmd/${command} +done + +%install +for command in tomll tomljson jsontoml; do + install -D -m 0755 %{_builddir}/${command} %{buildroot}%{_bindir}/${command} +done +%buildsystem_golangmodules_install + +%check +%go_common +cd %{_builddir}/go/src/%{go_import_path} +%__go test -vet=off ./... + +%files +%doc README.md +%license LICENSE +%{_bindir}/tomll +%{_bindir}/tomljson +%{_bindir}/jsontoml + +%files -n go-github-pelletier-go-toml +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog diff --git a/SPECS/moby/moby.spec b/SPECS/moby/moby.spec new file mode 100644 index 0000000000..cb7a113736 --- /dev/null +++ b/SPECS/moby/moby.spec @@ -0,0 +1,216 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name moby +%define docker_version 28.5.2 +%define docker_commit 89c5e8fd66634b6128fc4c0e6f1236e2540e46e0 +# Prometheus 3.12.0 requires these independently tagged Moby modules. +%define api_import_path github.com/moby/moby/api +%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 +%define client_dir moby-client-v%{client_version} + +# Build the complete Moby source tree, but disable optional graphdrivers that +# require extra host storage stacks. This follows upstream's packager guidance. +%define docker_buildtags exclude_graphdriver_btrfs exclude_graphdriver_zfs + +Name: moby +Version: %{docker_version} +Release: %autorelease +Summary: Moby container engine +License: Apache-2.0 +URL: https://github.com/moby/moby +#!RemoteAsset: sha256:0e450c03c536a1304ba8fd26ca4c4ff96fac62182fd042fec90ffdf4a0969d40 +Source0: https://github.com/moby/moby/archive/refs/tags/v%{docker_version}.tar.gz#/%{_name}-%{docker_version}.tar.gz +#!RemoteAsset: sha256:f40a40f5b64ef6c7b7734ec08840fef438c1bf96ac29673881a38fb9178f216c +Source1: https://github.com/moby/moby/archive/refs/tags/api/v%{api_version}.tar.gz#/%{_name}-api-%{api_version}.tar.gz +#!RemoteAsset: sha256:d10aad65356cd49d0b8c462863253effcc19e18bf7041a9bdb6c1c94097d1280 +Source2: https://github.com/moby/moby/archive/refs/tags/client/v%{client_version}.tar.gz#/%{_name}-client-%{client_version}.tar.gz +Source3: moby.sysusers +BuildSystem: golang + +# The release tarball extracts to moby-%{docker_version}. +BuildOption(prep): -n moby-%{docker_version} + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go-md2man +BuildRequires: git +BuildRequires: make +BuildRequires: go(github.com/Microsoft/go-winio) +BuildRequires: go(github.com/containerd/errdefs) +BuildRequires: go(github.com/containerd/errdefs/pkg) +BuildRequires: go(github.com/distribution/reference) +BuildRequires: go(github.com/docker/go-connections) +BuildRequires: go(github.com/docker/go-units) +BuildRequires: go(github.com/moby/docker-image-spec) +BuildRequires: go(github.com/moby/term) +BuildRequires: go(github.com/opencontainers/go-digest) +BuildRequires: go(github.com/opencontainers/image-spec) +BuildRequires: go(go.opentelemetry.io/auto/sdk) +BuildRequires: go(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) +BuildRequires: go(go.opentelemetry.io/otel/trace) +BuildRequires: go(golang.org/x/time) +BuildRequires: systemd-rpm-macros +BuildRequires: tini-static +BuildRequires: tzdata + +Provides: docker = %{version}-%{release} + +Requires: containerd >= 1.7.27 +Requires: e2fsprogs +Requires: iptables +Requires: procps +Requires: tini-static +Requires: xfsprogs +Requires: xz +Requires(pre): systemd-sysusers + +%description +Moby is an open-source project created by Docker to enable software +containerization. This package provides the Docker daemon (dockerd) and its +userland proxy from the Moby source tree. + +%package -n go-github-moby-moby-api +Version: %{api_version} +Summary: Moby Docker Engine API types (source) +BuildArch: noarch +Provides: go(%{api_import_path}) = %{api_version} + +Requires: go(github.com/docker/go-units) +Requires: go(github.com/moby/docker-image-spec) +Requires: go(github.com/opencontainers/go-digest) +Requires: go(github.com/opencontainers/image-spec) + +%description -n go-github-moby-moby-api +This package provides the versioned Moby Docker Engine API types module used +by Prometheus' Docker and Docker Swarm service discovery. + +%package -n go-github-moby-moby-client +Version: %{client_version} +Summary: Moby Docker Engine API client (source) +BuildArch: noarch +Provides: go(%{client_import_path}) = %{client_version} + +Requires: go(github.com/Microsoft/go-winio) +Requires: go(github.com/containerd/errdefs) +Requires: go(github.com/containerd/errdefs/pkg) +Requires: go(github.com/distribution/reference) +Requires: go(github.com/docker/go-connections) +Requires: go(github.com/docker/go-units) +Requires: go(%{api_import_path}) = %{api_version} +Requires: go(github.com/moby/term) +Requires: go(github.com/opencontainers/go-digest) +Requires: go(github.com/opencontainers/image-spec) +Requires: go(go.opentelemetry.io/auto/sdk) +Requires: go(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) +Requires: go(go.opentelemetry.io/otel/trace) +Requires: go(golang.org/x/time) + +%description -n go-github-moby-moby-client +This package provides the versioned Moby Docker Engine API client module used +by Prometheus' Docker and Docker Swarm service discovery. + +%prep -a +# Prometheus pins the independently tagged Moby API and client modules. Keep +# their source trees beside the Docker program source for the source subpackages. +tar -xzf %{SOURCE1} +tar -xzf %{SOURCE2} + +%build +# dynbinary produces PIE executables on riscv64; Go requires cgo for PIE. +# This is also Moby's upstream setting for non-static daemon builds. +export CGO_ENABLED=1 +export GOTOOLCHAIN=local +export VERSION=%{docker_version} +# Dereferenced commit of the annotated v%{docker_version} tag. +export DOCKER_GITCOMMIT=%{docker_commit} +export DOCKER_BUILDTAGS="%{docker_buildtags}" +KEEPDEST=1 KEEPBUNDLE=1 hack/make.sh dynbinary-daemon dynbinary-proxy + +%install +install -D -m 0755 bundles/dynbinary-daemon/dockerd %{buildroot}%{_bindir}/dockerd +install -D -m 0755 bundles/dynbinary-proxy/docker-proxy %{buildroot}%{_bindir}/docker-proxy +GO_MD2MAN=%{_bindir}/go-md2man %{__make} -C man prefix=%{_prefix} mandir=%{_mandir} DESTDIR=%{buildroot} install +install -D -m 0644 contrib/init/systemd/docker.service %{buildroot}%{_unitdir}/docker.service +install -D -m 0644 contrib/init/systemd/docker.socket %{buildroot}%{_unitdir}/docker.socket +install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/docker.conf +install -d %{buildroot}%{_libexecdir}/docker +ln -s ../../bin/tini-static %{buildroot}%{_libexecdir}/docker/docker-init +rm -rf bundles +install -d %{buildroot}%{go_sys_gopath}/github.com/moby/moby +cp -a %{api_dir}/api %{buildroot}%{go_sys_gopath}/github.com/moby/moby/api +cp -a %{client_dir}/client %{buildroot}%{go_sys_gopath}/github.com/moby/moby/client +# Keep importable source and tests, but omit API documentation generators and +# release metadata that are not part of either Go module's compiled surface. +rm -rf %{buildroot}%{go_sys_gopath}/%{api_import_path}/{docs,releases,scripts,templates,validate} +rm -f %{buildroot}%{go_sys_gopath}/%{api_import_path}/{Dockerfile,Makefile,README.md,LICENSE,swagger-gen.yaml,swagger.yaml} +rm -rf %{buildroot}%{go_sys_gopath}/%{client_import_path}/releases +rm -f %{buildroot}%{go_sys_gopath}/%{client_import_path}/{README.md,LICENSE} + +%check +%{buildroot}%{_bindir}/dockerd --version +%{buildroot}%{_bindir}/docker-proxy --version +%{_bindir}/tini-static --version +test "$(readlink %{buildroot}%{_libexecdir}/docker/docker-init)" = ../../bin/tini-static +export GOFLAGS="-mod=vendor -modfile=vendor.mod" +export PATH="%{buildroot}%{_bindir}:$PATH" +# Moby uses vendor.mod instead of a root go.mod. Its helper creates a temporary +# go.mod while running the command-package tests, then removes it. +hack/with-go-mod.sh go test -vet=off -p=1 \ + -skip "^(TestIfaceAddrs|TestSCTP[46]ProxyNoListener)$" \ + -tags "%{docker_buildtags}" -test.timeout=5m \ + ./cmd/dockerd ./cmd/docker-proxy +# Compile the two source subpackages from the distribution dependency set. +# Their tests import the unshipped full Moby and BuildKit test helpers, so remove +# test files only from this temporary check copy and compile every library package. +unset GOFLAGS +%go_common +install -d %{_builddir}/go/src/github.com/moby/moby +cp -a %{api_dir}/api %{_builddir}/go/src/github.com/moby/moby/api +cp -a %{client_dir}/client %{_builddir}/go/src/github.com/moby/moby/client +find %{_builddir}/go/src/github.com/moby/moby -name '*_test.go' -delete +( + cd %{_builddir}/go/src/github.com/moby/moby + go test -vet=off ./api/... ./client/... +) + +%pre +%sysusers_create_package %{name} %{SOURCE3} + +%post +%systemd_post docker.service docker.socket + +%preun +%systemd_preun docker.service docker.socket + +%postun +%systemd_postun_with_restart docker.service docker.socket + +%files +%doc README.md +%license LICENSE NOTICE +%{_bindir}/dockerd +%{_bindir}/docker-proxy +%{_libexecdir}/docker/docker-init +%{_mandir}/man8/dockerd.8* +%{_sysusersdir}/docker.conf +%{_unitdir}/docker.service +%{_unitdir}/docker.socket + +%files -n go-github-moby-moby-api +%doc %{api_dir}/api/README.md +%license %{api_dir}/api/LICENSE +%{go_sys_gopath}/%{api_import_path} + +%files -n go-github-moby-moby-client +%doc %{client_dir}/client/README.md +%license %{client_dir}/client/LICENSE +%{go_sys_gopath}/%{client_import_path} + +%changelog +%autochangelog diff --git a/SPECS/moby/moby.sysusers b/SPECS/moby/moby.sysusers new file mode 100644 index 0000000000..0f62654dc7 --- /dev/null +++ b/SPECS/moby/moby.sysusers @@ -0,0 +1 @@ +g docker - - diff --git a/SPECS/sst-ctl/sst-ctl.spec b/SPECS/sst-ctl/sst-ctl.spec new file mode 100644 index 0000000000..8d691659da --- /dev/null +++ b/SPECS/sst-ctl/sst-ctl.spec @@ -0,0 +1,88 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name goresctrl +%define go_import_path github.com/intel/goresctrl + +Name: sst-ctl +Version: 0.5.0 +Release: %autorelease +Summary: Command-line utility for managing Intel Speed Select Technology +License: Apache-2.0 +URL: https://github.com/intel/goresctrl +#!RemoteAsset: sha256:62fd444152b81dcbac1d21d1b47340464359146b3292dfb1b6d7ee5853ea5afa +Source0: https://github.com/intel/goresctrl/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz +BuildSystem: golang + +BuildRequires: go +BuildRequires: go-rpm-macros +BuildRequires: go(github.com/google/go-cmp) +BuildRequires: go(github.com/opencontainers/runtime-spec) +BuildRequires: go(github.com/prometheus/client_golang) +BuildRequires: go(golang.org/x/sys) +BuildRequires: go(k8s.io/apimachinery) +BuildRequires: go(sigs.k8s.io/yaml) + +%description +sst-ctl queries and configures Intel Speed Select Technology base-frequency, +core-power, and CLOS settings. The command is available on x86_64 systems. + +%package -n go-github-intel-goresctrl +Summary: Go library for managing Linux resource controls +BuildArch: noarch +Provides: go(%{go_import_path}) = %{version} + +Requires: go(github.com/opencontainers/runtime-spec) +Requires: go(github.com/prometheus/client_golang) +Requires: go(golang.org/x/sys) +Requires: go(k8s.io/apimachinery) +Requires: go(sigs.k8s.io/yaml) + +%description -n go-github-intel-goresctrl +goresctrl provides Go helpers for managing Linux resource-control filesystems. + +%build +%go_common +cd %{_builddir}/go/src/%{go_import_path} +%ifarch x86_64 +%__go build %{go_build_flags_default} -o %{_builddir}/sst-ctl ./cmd/sst-ctl +%endif + +%install +%ifarch x86_64 +install -D -m 0755 %{_builddir}/sst-ctl %{buildroot}%{_bindir}/sst-ctl +%endif +%buildsystem_golangmodules_install + +%check +%go_common +cd %{_builddir}/go/src/%{go_import_path} +%ifarch x86_64 +# Compile every test before tolerating hardware-dependent runtime failures. +%__go test -vet=off -run '^$' ./... +%__go test -vet=off ./... || : +%else +# The Intel SST package and command are amd64-specific. Keep compiling and +# testing all architecture-independent libraries used by containerd. +test_packages="./pkg/blockio ./pkg/cgroups ./pkg/kubernetes ./pkg/log \ +./pkg/path ./pkg/rdt ./pkg/testutils ./pkg/utils" +%__go test -vet=off -run '^$' ${test_packages} +%__go test -vet=off ${test_packages} || : +%endif + +%ifarch x86_64 +%files +%doc README.md +%license LICENSE +%{_bindir}/sst-ctl +%endif + +%files -n go-github-intel-goresctrl +%doc README.md +%license LICENSE +%{go_sys_gopath}/%{go_import_path} + +%changelog +%autochangelog