2016-02-03 16:54:55 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} == 6
|
|
|
|
%global with_devel 0
|
|
|
|
%global with_bundled 1
|
|
|
|
%global with_debug 1
|
|
|
|
%global with_check 0
|
|
|
|
%global with_unit_test 0
|
|
|
|
%else
|
|
|
|
%global with_devel 0
|
|
|
|
%global with_bundled 1
|
|
|
|
%global with_debug 1
|
|
|
|
%global with_check 0
|
|
|
|
%global with_unit_test 0
|
|
|
|
%endif
|
|
|
|
|
2016-05-27 10:45:30 +00:00
|
|
|
#%if 0%{?with_debug}
|
|
|
|
#%global _dwz_low_mem_die_limit 0
|
|
|
|
#%else
|
2016-02-03 16:54:55 +00:00
|
|
|
%global debug_package %{nil}
|
2016-05-27 10:45:30 +00:00
|
|
|
#%endif
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
%global provider github
|
|
|
|
%global provider_tld com
|
2016-03-08 08:11:45 +00:00
|
|
|
%global project projectatomic
|
2016-02-03 16:54:55 +00:00
|
|
|
%global repo skopeo
|
2016-03-08 08:11:45 +00:00
|
|
|
# https://github.com/projectatomic/skopeo
|
2016-02-03 16:54:55 +00:00
|
|
|
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
|
|
|
%global import_path %{provider_prefix}
|
2016-06-02 09:33:31 +00:00
|
|
|
%global commit 9e971b4937d176aa7ac3af6377b69e58bfd789eb
|
2016-02-03 16:54:55 +00:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
|
|
|
|
Name: skopeo
|
2016-06-02 09:33:31 +00:00
|
|
|
Version: 0.1.13
|
|
|
|
Release: 1%{?dist}
|
2016-02-03 16:54:55 +00:00
|
|
|
Summary: Inspect Docker images and repositories on registries
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: https://%{provider_prefix}
|
|
|
|
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
|
|
|
|
|
|
|
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
|
|
|
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
|
2016-04-21 18:56:50 +00:00
|
|
|
BuildRequires: go-srpm-macros
|
|
|
|
BuildRequires: compiler(go-compiler)
|
2016-02-03 16:54:55 +00:00
|
|
|
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
|
|
|
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
|
|
BuildRequires: golang-github-cpuguy83-go-md2man
|
2016-04-21 19:30:08 +00:00
|
|
|
BuildRequires: gpgme-devel
|
2016-04-26 21:27:51 +00:00
|
|
|
BuildRequires: libassuan-devel
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Command line utility to inspect images and repositories directly on Docker
|
|
|
|
registries without the need to pull them
|
|
|
|
|
|
|
|
%if 0%{?with_devel}
|
|
|
|
%package devel
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%if 0%{?with_check} && ! 0%{?with_bundled}
|
|
|
|
BuildRequires: golang(github.com/Azure/go-ansiterm/winterm)
|
|
|
|
BuildRequires: golang(github.com/Sirupsen/logrus)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/context)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/digest)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/manifest)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/manifest/manifestlist)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/manifest/schema1)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/manifest/schema2)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/reference)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/api/errcode)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/api/v2)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/client)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/client/auth)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/client/transport)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/storage/cache)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/registry/storage/cache/memory)
|
|
|
|
BuildRequires: golang(github.com/docker/distribution/uuid)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/api)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/daemon/graphdriver)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/distribution/metadata)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/distribution/xfer)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/dockerversion)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/image)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/image/v1)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/layer)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/opts)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/archive)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/chrootarchive)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/fileutils)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/homedir)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/httputils)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/idtools)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/ioutils)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/jsonlog)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/jsonmessage)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/longpath)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/mflag)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/parsers/kernel)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/plugins)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/pools)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/progress)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/promise)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/random)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/reexec)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/stringid)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/system)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/tarsum)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/term)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/term/windows)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/useragent)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/pkg/version)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/reference)
|
|
|
|
BuildRequires: golang(github.com/docker/docker/registry)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/blkiodev)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/container)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/filters)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/image)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/network)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/registry)
|
|
|
|
BuildRequires: golang(github.com/docker/engine-api/types/strslice)
|
|
|
|
BuildRequires: golang(github.com/docker/go-connections/nat)
|
|
|
|
BuildRequires: golang(github.com/docker/go-connections/tlsconfig)
|
|
|
|
BuildRequires: golang(github.com/docker/go-units)
|
|
|
|
BuildRequires: golang(github.com/docker/libtrust)
|
|
|
|
BuildRequires: golang(github.com/gorilla/context)
|
|
|
|
BuildRequires: golang(github.com/gorilla/mux)
|
|
|
|
BuildRequires: golang(github.com/opencontainers/runc/libcontainer/user)
|
|
|
|
BuildRequires: golang(github.com/vbatts/tar-split/archive/tar)
|
|
|
|
BuildRequires: golang(github.com/vbatts/tar-split/tar/asm)
|
|
|
|
BuildRequires: golang(github.com/vbatts/tar-split/tar/storage)
|
|
|
|
BuildRequires: golang(golang.org/x/net/context)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
This package contains library source intended for
|
|
|
|
building other packages which use import path with
|
|
|
|
%{import_path} prefix.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
|
%package unit-test-devel
|
|
|
|
Summary: Unit tests for %{name} package
|
|
|
|
%if 0%{?with_check}
|
|
|
|
#Here comes all BuildRequires: PACKAGE the unit tests
|
|
|
|
#in %%check section need for running
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# test subpackage tests code from devel subpackage
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
%description unit-test-devel
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
This package contains unit tests for project
|
|
|
|
providing packages with %{import_path} prefix.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{repo}-%{commit}
|
|
|
|
|
|
|
|
%build
|
2016-03-08 08:11:45 +00:00
|
|
|
mkdir -p src/github.com/projectatomic
|
|
|
|
ln -s ../../../ src/github.com/projectatomic/skopeo
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
mkdir -p vendor/src
|
2016-05-05 14:35:57 +00:00
|
|
|
for v in vendor/*; do
|
|
|
|
if test ${v} = vendor/src; then continue; fi
|
|
|
|
if test -d ${v}; then
|
|
|
|
mv ${v} vendor/src/
|
2016-04-21 18:34:52 +00:00
|
|
|
fi
|
2016-05-31 07:12:02 +00:00
|
|
|
done
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
%if ! 0%{?with_bundled}
|
|
|
|
rm -rf vendor/
|
|
|
|
export GOPATH=$(pwd):%{gopath}
|
|
|
|
%else
|
|
|
|
export GOPATH=$(pwd):$(pwd)/vendor:%{gopath}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
export GO15VENDOREXPERIMENT=1
|
2016-05-31 07:12:02 +00:00
|
|
|
%gobuild -o skopeo ./cmd/skopeo
|
2016-02-03 16:54:55 +00:00
|
|
|
|
2016-04-26 21:32:37 +00:00
|
|
|
if test -f man/skopeo.1.md; then
|
|
|
|
go-md2man -in man/skopeo.1.md -out skopeo.1
|
2016-05-31 07:12:02 +00:00
|
|
|
fi
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_mandir}/man1
|
|
|
|
make DESTDIR=%{buildroot} install
|
|
|
|
|
|
|
|
# source codes for building projects
|
|
|
|
%if 0%{?with_devel}
|
|
|
|
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
|
|
echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
|
|
|
|
# find all *.go but no *_test.go files and generate devel.file-list
|
|
|
|
for file in $(find . -iname "*.go" \! -iname "*_test.go" | grep -v "./vendor") ; do
|
|
|
|
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
|
|
|
|
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
|
|
|
|
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
|
|
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# testing files for this project
|
|
|
|
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
|
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
|
|
# find all *_test.go files and generate unit-test.file-list
|
|
|
|
for file in $(find . -iname "*_test.go" | grep -v "./vendor"); do
|
|
|
|
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
|
|
|
|
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
|
|
|
|
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
|
|
echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?with_devel}
|
|
|
|
sort -u -o devel.file-list devel.file-list
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
|
|
|
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
|
%if ! 0%{?with_bundled}
|
|
|
|
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
|
|
|
|
%else
|
|
|
|
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%gotest %{import_path}/integration
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#define license tag if not already defined
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
|
|
|
%if 0%{?with_devel}
|
|
|
|
%files devel -f devel.file-list
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
|
%files unit-test-devel -f unit-test-devel.file-list
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/skopeo
|
|
|
|
%{_mandir}/man1/skopeo.1*
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
%changelog
|
2016-06-02 09:33:31 +00:00
|
|
|
* Thu Jun 02 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.13-4
|
|
|
|
- update to v0.1.12
|
|
|
|
|
2016-05-31 07:12:02 +00:00
|
|
|
* Tue May 31 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.12-3
|
|
|
|
- fix go build source path
|
|
|
|
|
2016-05-27 10:29:39 +00:00
|
|
|
* Fri May 27 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.12-2
|
|
|
|
- update to v0.1.12
|
|
|
|
|
2016-03-08 08:33:42 +00:00
|
|
|
* Tue Mar 08 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.11-1
|
|
|
|
- update to v0.1.11
|
|
|
|
|
2016-03-08 08:11:45 +00:00
|
|
|
* Tue Mar 08 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.10-1
|
|
|
|
- update to v0.1.10
|
|
|
|
- change runcom -> projectatomic
|
|
|
|
|
2016-02-29 11:23:53 +00:00
|
|
|
* Mon Feb 29 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.9-1
|
|
|
|
- update to v0.1.9
|
|
|
|
|
2016-02-29 10:50:15 +00:00
|
|
|
* Mon Feb 29 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.8-1
|
|
|
|
- update to v0.1.8
|
|
|
|
|
2016-02-22 18:47:54 +00:00
|
|
|
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-2
|
|
|
|
- https://fedoraproject.org/wiki/Changes/golang1.6
|
|
|
|
|
2016-02-03 16:54:55 +00:00
|
|
|
* Fri Jan 29 2016 Antonio Murdaca <runcom@redhat.com> - 0.1.4
|
|
|
|
- First package for Fedora
|