# # spec file for package libcontainers-common # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # commonver - version from containers/common %define commonver 0.51.0 # storagever - version from containers/storage %define storagever 1.45.3 # imagever - version from containers/image %define imagever 5.24.1 # skopeover - version from containers/skopeo %define skopeover 1.11.1 # https://github.com/containers/shortnames %define shortnamesver 2023.02.20 Name: libcontainers-common Version: 20230214 Release: 0 Summary: Configuration files common to github.com/containers License: Apache-2.0 Group: System/Management URL: https://github.com/containers Source0: image-%{imagever}.tar.xz Source1: storage-%{storagever}.tar.xz Source2: LICENSE # https://raw.githubusercontent.com/containers/skopeo/main/default-policy.json Source3: https://raw.githubusercontent.com/containers/skopeo/v%{skopeover}/default-policy.json#./policy.json # https://github.com/containers/storage/blob/main/storage.conf + custom changes Source4: storage.conf # heavily modified version of https://github.com/containers/common/blob/main/pkg/subscriptions/mounts.conf Source5: mounts.conf # https://raw.githubusercontent.com/containers/image/main/registries.conf with our own registries inserted Source6: registries.conf # https://github.com/containers/skopeo/blob/main/default.yaml but heavily modified Source7: default.yaml Source8: common-%{commonver}.tar.xz # https://github.com/containers/common/blob/main/pkg/config/containers.conf with custom settings Source9: containers.conf Source10: %{name}.rpmlintrc Source11: https://raw.githubusercontent.com/containers/shortnames/v%{shortnamesver}/shortnames.conf BuildRequires: go-go-md2man Requires(post): %{_bindir}/grep Requires(post): %{_bindir}/sed Provides: libcontainers-image = %{version} Provides: libcontainers-storage = %{version} Obsoletes: libcontainers-image < %{version} Obsoletes: libcontainers-storage < %{version} BuildArch: noarch %description Configuration files and manpages shared by tools that are based on the github.com/containers libraries, such as Buildah, CRI-O, Podman and Skopeo. %prep %setup -q -Tcq -b0 -b1 -b8 # copy the LICENSE file in the build root cp %{SOURCE2} . %build cd .. pwd # compile containers/image manpages cd image-%{imagever} for md in docs/*.md do go-md2man -in $md -out $md done rename '.5.md' '.5' docs/* rename '.md' '.1' docs/* cd .. # compile containers/storage manpages cd storage-%{storagever} for md in docs/*.md do go-md2man -in $md -out $md done rename '.5.md' '.5' docs/* rename '.md' '.1' docs/* cd .. # compile subset of containers/common manpages cd common-%{commonver} go-md2man -in pkg/hooks/docs/oci-hooks.5.md -out pkg/hooks/docs/oci-hooks.5 cd .. %if 0%{?is_opensuse} # no default mounts %else cat >>%{SOURCE5} <