umoci/umoci.spec

77 lines
2.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package umoci
#
# 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/
#
# Project name when using go tooling.
Accepting request 816888 from home:cyphar:umoci - Update to umoci v0.4.6. umoci has been adopted by the Open Container Initative as a reference implementation of the OCI Image Specification. This will have little impact on the roadmap or scope of umoci, but it does further solidify umoci as a useful piece of "boring container infrastructure" that can be used to build larger systems. > **NOTICE**: As part of the adoption procedure, the import path and module > name of umoci has changed from `github.com/openSUSE/umoci` to > `github.com/opencontainers/umoci`. This means that users of our (still > unstable) Go API will have to change their import paths in order to update > to newer versions of umoci. > > The old GitHub project will contain a snapshot of `v0.4.5` with a few > minor changes to the readme that explain the situation. Go projects which > import import the archived project will receive build warnings that > explain the need to update their import paths. + umoci now builds on MacOS, and we currently run the unit tests on MacOS to hopefully catch core regressions (in the future we will get the integration tests running to catch more possible regressions). opencontainers/umoci#318 * Suppress repeated xattr warnings on destination filesystems that do not support xattrs. opencontainers/umoci#311 * Work around a long-standing issue in our command-line parsing library (see urfave/cli#1152) by disabling argument re-ordering for `umoci config`, which often takes `-`-prefixed flag arguments. opencontainers/umoci#328 * For details, see CHANGELOG.md in the package. OBS-URL: https://build.opensuse.org/request/show/816888 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=49
2020-06-24 20:35:56 +00:00
%define project github.com/opencontainers/umoci
Name: umoci
Version: 0.4.7
Release: 0
Summary: Open Container Image manipulation tool
License: Apache-2.0
Group: System/Management
URL: https://umo.ci
Accepting request 816888 from home:cyphar:umoci - Update to umoci v0.4.6. umoci has been adopted by the Open Container Initative as a reference implementation of the OCI Image Specification. This will have little impact on the roadmap or scope of umoci, but it does further solidify umoci as a useful piece of "boring container infrastructure" that can be used to build larger systems. > **NOTICE**: As part of the adoption procedure, the import path and module > name of umoci has changed from `github.com/openSUSE/umoci` to > `github.com/opencontainers/umoci`. This means that users of our (still > unstable) Go API will have to change their import paths in order to update > to newer versions of umoci. > > The old GitHub project will contain a snapshot of `v0.4.5` with a few > minor changes to the readme that explain the situation. Go projects which > import import the archived project will receive build warnings that > explain the need to update their import paths. + umoci now builds on MacOS, and we currently run the unit tests on MacOS to hopefully catch core regressions (in the future we will get the integration tests running to catch more possible regressions). opencontainers/umoci#318 * Suppress repeated xattr warnings on destination filesystems that do not support xattrs. opencontainers/umoci#311 * Work around a long-standing issue in our command-line parsing library (see urfave/cli#1152) by disabling argument re-ordering for `umoci config`, which often takes `-`-prefixed flag arguments. opencontainers/umoci#328 * For details, see CHANGELOG.md in the package. OBS-URL: https://build.opensuse.org/request/show/816888 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=49
2020-06-24 20:35:56 +00:00
Source0: https://github.com/opencontainers/umoci/releases/download/v%{version}/umoci.tar.xz#/%{name}-%{version}.tar.xz
Source1: https://github.com/opencontainers/umoci/releases/download/v%{version}/umoci.tar.xz.asc#/%{name}-%{version}.tar.xz.asc
Source2: https://umo.ci/%{name}.keyring
# OPENSUSE-FIX-UPSTREAM: Backport of <https://github.com/opencontainers/umoci/pull/369>.
Patch1: 0001-makefile-fix-bad-build-flags.patch
BuildRequires: fdupes
BuildRequires: go
BuildRequires: go-go-md2man
ExcludeArch: s390
%description
umoci modifies Open Container images. umoci is a manipulation tool for OCI
images. In particular, it is a more complete alternative to oci-image-tools
provided by the OCI.
%prep
Accepting request 487107 from home:cyphar:containers - Update to umoci v0.2.0. Upstream changelog: * `umoci` now has some automated scripts for generated RPMs that are used in openSUSE to automatically submit packages to OBS. openSUSE/umoci#101 * `--clear=config.{cmd,entrypoint}` is now supported. While this interface is a bit weird (`cmd` and `entrypoint` aren't treated atomically) this makes the UX more consistent while we come up with a better `cmd` and `entrypoint` UX. openSUSE/umoci#107 * New subcommand: `umoci raw runtime-config`. It generates the runtime-spec config.json for a particular image without also unpacking the root filesystem, allowing for users of `umoci` that are regularly parsing `config.json` without caring about the root filesystem to be more efficient. However, a downside of this approach is that some image-spec fields (`Config.User`) require a root filesystem in order to make sense, which is why this command is hidden under the `umoci-raw(1)` subcommand (to make sure only users that understand what they're doing use it). openSUSE/umoci#110 * `umoci`'s `oci/cas` and `oci/config` libraries have been massively refactored and rewritten, to allow for third-parties to use the OCI libraries. The plan is for these to eventually become part of an OCI project. openSUSE/umoci#90 * The `oci/cas` interface has been modifed to switch from `*ispec.Descriptor` to `ispec.Descriptor`. This is a breaking, but fairly insignificant, change. openSUSE/umoci#89 * `umoci` now uses an updated version of `go-mtree`, which has a complete rewrite of `Vis` and `Unvis`. The rewrite ensures that unicode handling is handled in a far more consistent and sane way. openSUSE/umoci#88 * `umoci` used to set `process.user.additionalGids` to the "normal value" when unpacking an image in rootless mode, causing issues when trying to actually run said bundle with runC. openSUSE/umoci#109 OBS-URL: https://build.opensuse.org/request/show/487107 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=18
2017-04-10 17:45:50 +00:00
%setup -q
# <https://github.com/opencontainers/umoci/pull/369>
%patch -P 1 -p1
%build
export VERSION="$(cat ./VERSION)"
if [ "$VERSION" != "%{version}" ]; then
Accepting request 816888 from home:cyphar:umoci - Update to umoci v0.4.6. umoci has been adopted by the Open Container Initative as a reference implementation of the OCI Image Specification. This will have little impact on the roadmap or scope of umoci, but it does further solidify umoci as a useful piece of "boring container infrastructure" that can be used to build larger systems. > **NOTICE**: As part of the adoption procedure, the import path and module > name of umoci has changed from `github.com/openSUSE/umoci` to > `github.com/opencontainers/umoci`. This means that users of our (still > unstable) Go API will have to change their import paths in order to update > to newer versions of umoci. > > The old GitHub project will contain a snapshot of `v0.4.5` with a few > minor changes to the readme that explain the situation. Go projects which > import import the archived project will receive build warnings that > explain the need to update their import paths. + umoci now builds on MacOS, and we currently run the unit tests on MacOS to hopefully catch core regressions (in the future we will get the integration tests running to catch more possible regressions). opencontainers/umoci#318 * Suppress repeated xattr warnings on destination filesystems that do not support xattrs. opencontainers/umoci#311 * Work around a long-standing issue in our command-line parsing library (see urfave/cli#1152) by disabling argument re-ordering for `umoci config`, which often takes `-`-prefixed flag arguments. opencontainers/umoci#328 * For details, see CHANGELOG.md in the package. OBS-URL: https://build.opensuse.org/request/show/816888 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=49
2020-06-24 20:35:56 +00:00
# Append "_suse" if the version is not an upstream one.
VERSION="%{version}_suse"
fi
Accepting request 816888 from home:cyphar:umoci - Update to umoci v0.4.6. umoci has been adopted by the Open Container Initative as a reference implementation of the OCI Image Specification. This will have little impact on the roadmap or scope of umoci, but it does further solidify umoci as a useful piece of "boring container infrastructure" that can be used to build larger systems. > **NOTICE**: As part of the adoption procedure, the import path and module > name of umoci has changed from `github.com/openSUSE/umoci` to > `github.com/opencontainers/umoci`. This means that users of our (still > unstable) Go API will have to change their import paths in order to update > to newer versions of umoci. > > The old GitHub project will contain a snapshot of `v0.4.5` with a few > minor changes to the readme that explain the situation. Go projects which > import import the archived project will receive build warnings that > explain the need to update their import paths. + umoci now builds on MacOS, and we currently run the unit tests on MacOS to hopefully catch core regressions (in the future we will get the integration tests running to catch more possible regressions). opencontainers/umoci#318 * Suppress repeated xattr warnings on destination filesystems that do not support xattrs. opencontainers/umoci#311 * Work around a long-standing issue in our command-line parsing library (see urfave/cli#1152) by disabling argument re-ordering for `umoci config`, which often takes `-`-prefixed flag arguments. opencontainers/umoci#328 * For details, see CHANGELOG.md in the package. OBS-URL: https://build.opensuse.org/request/show/816888 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=49
2020-06-24 20:35:56 +00:00
# Build umoci and docs.
make VERSION="$VERSION" umoci docs
%install
# Install the binary.
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
# Install all of the docs.
Accepting request 512069 from home:cyphar:containers - Update to umoci v0.3.0. Upstream changelog: - `umoci` now passes all of the requirements for the [CII best practices bading program][cii]. openSUSE/umoci#134 - `umoci` also now has more extensive architecture, quick-start and roadmap documentation. openSUSE/umoci#134 - `umoci` now supports [`1.0.0` of the OCI image specification][ispec-v1.0.0] and [`1.0.0` of the OCI runtime specification][rspec-v1.0.0], which are the first milestone release. Note that there are still some remaining UX issues with `--image` and other parts of `umoci` which may be subject to change in future versions. In particular, this update of the specification now means that images may have ambiguous tags. `umoci` will warn you if an operation may have an ambiguous result, but we plan to improve this functionality far more in the future. openSUSE/umoci#133 openSUSE/umoci#142 - `umoci` also now supports more complicated descriptor walk structures, and also handles mutation of such structures more sanely. At the moment, this functionality has not been used "in the wild" and `umoci` doesn't have the UX to create such structures (yet) but these will be implemented in future versions. openSUSE/umoci#145 - `umoci repack` now supports `--mask-path` to ignore changes in the rootfs that are in a child of at least one of the provided masks when generating new layers. openSUSE/umoci#127 - Error messages from `github.com/openSUSE/umoci/oci/cas/drivers/dir` actually make sense now. openSUSE/umoci#121 - `umoci unpack` now generates `config.json` blobs according to the [still proposed][ispec-pr492] OCI image specification conversion document. openSUSE/umoci#120 - `umoci repack` also now automatically adding `Config.Volumes` from the image configuration to the set of masked paths. This matches recently added [recommendations by the spec][ispec-pr694], but is a backwards-incompatible change because the new default is that `Config.Volumes` **will** be masked. If you wish to retain the old semantics, use `--no-mask-volumes` (though make sure to be aware of the reasoning behind `Config.Volume` masking). openSUSE/umoci#127 - `umoci` now uses [`SecureJoin`][securejoin] rather than a patched version of `FollowSymlinkInScope`. The two implementations are roughly equivalent, but `SecureJoin` has a nicer API and is maintained as a separate project. - Switched to using `golang.org/x/sys/unix` over `syscall` where possible, which makes the codebase significantly cleaner. openSUSE/umoci#141 [cii]: https://bestpractices.coreinfrastructure.org/projects/1084 [rspec-v1.0.0]: https://github.com/opencontainers/runtime-spec/releases/tag/v1.0.0 [ispec-v1.0.0]: https://github.com/opencontainers/image-spec/releases/tag/v1.0.0 [ispec-pr492]: https://github.com/opencontainers/image-spec/pull/492 [ispec-pr694]: https://github.com/opencontainers/image-spec/pull/694 [securejoin]: https://github.com/cyphar/filepath-securejoin OBS-URL: https://build.opensuse.org/request/show/512069 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=23
2017-07-24 10:39:50 +00:00
for file in doc/man/*.1; do
install -D -m 0644 $file "%{buildroot}/%{_mandir}/man1/$(basename $file)"
done
%fdupes %{buildroot}
%files
%defattr(-,root,root)
%doc README.md CHANGELOG.md doc/*
%license COPYING
%{_bindir}/%{name}
%{_mandir}/man1/umoci*
%changelog