- 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
106 lines
2.6 KiB
RPMSpec
106 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package umoci
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
# nodebuginfo
|
|
|
|
|
|
# Handle all Go arches.
|
|
%{!?go_arches: %global go_arches %ix86 x86_64 aarch64 ppc64le}
|
|
|
|
# Remove stripping of Go binaries.
|
|
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
|
|
|
|
# Project name when using go tooling.
|
|
%define project github.com/openSUSE/umoci
|
|
|
|
Name: umoci
|
|
Version: 0.2.0
|
|
Release: 0
|
|
Summary: Open Container Image manipulation tool
|
|
License: Apache-2.0
|
|
Group: System/Management
|
|
Url: https://github.com/openSUSE/umoci
|
|
Source: %{name}-%{version}.tar.xz
|
|
%ifarch %{go_arches}
|
|
BuildRequires: go >= 1.6
|
|
BuildRequires: go-go-md2man
|
|
%else
|
|
BuildRequires: gcc6-go >= 6.1
|
|
%endif
|
|
BuildRequires: fdupes
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?is_opensuse}
|
|
ExcludeArch: s390x
|
|
%endif
|
|
|
|
%description
|
|
umoci modifies Open Container images.
|
|
|
|
umoci is a manipulation tool for OCI images. In particular, it is an
|
|
alternative to oci-image-tools provided by the OCI.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
|
|
# We can't use symlinks here because go-list gets confused by symlinks, so we
|
|
# have to copy the source to $HOME/go and then use that as the GOPATH.
|
|
export GOPATH=$HOME/go
|
|
mkdir -pv $HOME/go/src/%{project}
|
|
rm -rf $HOME/go/src/%{project}/*
|
|
cp -avr * $HOME/go/src/%{project}
|
|
|
|
export VERSION="$(cat ./VERSION)"
|
|
if [ "$VERSION" != "%{version}" ]; then
|
|
VERSION="%{version}_suse"
|
|
fi
|
|
|
|
# Build the binary.
|
|
make VERSION="$VERSION" umoci
|
|
|
|
# Build the docs if we have go-md2man.
|
|
%ifarch %{go_arches}
|
|
make doc
|
|
%endif
|
|
|
|
%install
|
|
# Install the binary.
|
|
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
|
|
|
|
# Install all of the docs.
|
|
%ifarch %{go_arches}
|
|
for file in man/*.1; do
|
|
install -D -m 0644 $file "%{buildroot}/%{_mandir}/man1/$(basename $file)"
|
|
done
|
|
%endif
|
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
%check
|
|
export GOPATH=$HOME/go
|
|
hack/test-unit.sh
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc COPYING README.md man/*.md
|
|
%{_bindir}/%{name}
|
|
%ifarch %{go_arches}
|
|
%{_mandir}/man1/umoci*
|
|
%endif
|
|
|
|
%changelog
|