1f2fd3
%global with_devel 0
1f2fd3
%global with_bundled 1
1f2fd3
%global with_debug 1
1f2fd3
%global with_check 0
339ab7
339ab7
%if 0%{?with_debug}
339ab7
%global _find_debuginfo_dwz_opts %{nil}
339ab7
%global _dwz_low_mem_die_limit 0
1f2fd3
%else
339ab7
%global debug_package   %{nil}
1f2fd3
%endif
1f2fd3
1f2fd3
%global provider        github
1f2fd3
%global provider_tld    com
1f2fd3
%global project         projectatomic
1f2fd3
%global repo            skopeo
1f2fd3
# https://github.com/projectatomic/skopeo
1f2fd3
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
1f2fd3
%global import_path     %{provider_prefix}
339ab7
%global commit0         ae64ff7084c8ba60275232740b79c1876f8a5256
3b9609
%global shortcommit0    %(c=%{commit0}; echo ${c:0:7})
ee3aa9
%global git0            https://%{import_path}
1f2fd3
f2b288
Name:           %{repo}
1f2fd3
Epoch:          1
339ab7
Version:        0.1.31
ae093f
Release:        1.dev.git%{shortcommit0}%{?dist}
1f2fd3
Summary:        Inspect Docker images and repositories on registries
1f2fd3
License:        ASL 2.0
ee3aa9
URL:            %{git0}
ee3aa9
Source0:        %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
5849f4
Source1:        storage.conf
5849f4
Source2:        containers-storage.conf.5.md
5849f4
Source3:        mounts.conf
13b226
Source4:        registries.conf
13b226
Source5:        registries.conf.5.md
1f2fd3
BuildRequires:  git
1f2fd3
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
1f2fd3
BuildRequires:  %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} >= 1.6.2
339ab7
%if 0%{?rhel} > 7
339ab7
BuildRequires: go-toolset-7-golang-bin
339ab7
BuildRequires: go-toolset-7-runtime
339ab7
%endif
1f2fd3
BuildRequires:  go-md2man
1f2fd3
BuildRequires:  gpgme-devel
1f2fd3
BuildRequires:  libassuan-devel
6f80eb
BuildRequires:  btrfs-progs-devel
6f80eb
BuildRequires:  device-mapper-devel
6f80eb
BuildRequires:  pkgconfig(glib-2.0)
6f80eb
BuildRequires:  pkgconfig(gobject-2.0)
6f80eb
BuildRequires:  pkgconfig(ostree-1)
ee3aa9
Requires: %{name}-containers = %{epoch}:%{version}-%{release}
1f2fd3
1f2fd3
%description
1f2fd3
Command line utility to inspect images and repositories directly on Docker
1f2fd3
registries without the need to pull them
1f2fd3
06ee43
%package containers
06ee43
Summary: Configuration files for working with image signature
06ee43
# /etc/containers/registries.d/default.yaml has been moved from atomic to
06ee43
# skopeo-containers
13b226
Conflicts: atomic <= 1:1.13.1-1
13b226
Conflicts: atomic-registries <= 1:1.22.1-2
06ee43
06ee43
%description containers
06ee43
This package installs a default signature store configuration
06ee43
policy under `/etc/containers/`.
06ee43
339ab7
%if 0%{?rhel} > 7
339ab7
%{enable_gotoolset7}
339ab7
%endif
339ab7
1f2fd3
%prep
ee3aa9
%autosetup -Sgit -n %{name}-%{commit0}
1f2fd3
1f2fd3
%build
1f2fd3
mkdir -p src/github.com/projectatomic
5849f4
ln -s ../../../ src/github.com/projectatomic/%{name}
1f2fd3
1f2fd3
mkdir -p vendor/src
1f2fd3
for v in vendor/*; do
1f2fd3
    if test ${v} = vendor/src; then continue; fi
1f2fd3
    if test -d ${v}; then
1f2fd3
	mv ${v} vendor/src/
1f2fd3
    fi
1f2fd3
done
1f2fd3
1f2fd3
export GOPATH=$(pwd):$(pwd)/vendor:%{gopath}
1f2fd3
1f2fd3
%if ! 0%{?gobuild:1}
1f2fd3
%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
1f2fd3
%endif
1f2fd3
5849f4
%gobuild -o %{name} ./cmd/%{name}
1f2fd3
5849f4
if test -f man/%{name}.1.md; then
5849f4
    go-md2man -in man/%{name}.1.md -out %{name}.1
1f2fd3
fi
1f2fd3
5849f4
go-md2man -in %{SOURCE2} -out containers-storage.conf.5
13b226
go-md2man -in %{SOURCE5} -out registries.conf.5
5849f4
1f2fd3
%install
1f2fd3
make DESTDIR=%{buildroot} install
5849f4
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/storage.conf
5849f4
mkdir -p %{buildroot}%{_mandir}/man5
5849f4
install -m644 containers-storage.conf.5 %{buildroot}%{_mandir}/man5
13b226
install -m644 registries.conf.5 %{buildroot}%{_mandir}/man5
5849f4
mkdir -p %{buildroot}%{_datadir}/containers
5849f4
install -m0644 %{SOURCE3} %{buildroot}%{_datadir}/containers/mounts.conf
13b226
install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/containers/
5849f4
5849f4
# install secrets patch directory
5849f4
install -d -p -m 750 %{buildroot}%{_datadir}/rhel/secrets
5849f4
# rhbz#1110876 - update symlinks for subscription management
5849f4
ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement
5849f4
ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
5849f4
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/rhel7.repo
1f2fd3
1f2fd3
%check
339ab7
%if 0%{?with_check}
1f2fd3
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
1f2fd3
%gotest %{import_path}/integration
1f2fd3
%endif
1f2fd3
1f2fd3
#define license tag if not already defined
1f2fd3
%{!?_licensedir:%global license %doc}
1f2fd3
06ee43
%files containers
13b226
%dir %{_sysconfdir}/containers
13b226
%dir %{_sysconfdir}/containers/registries.d
06ee43
%config(noreplace) %{_sysconfdir}/containers/policy.json
06ee43
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
5849f4
%config(noreplace) %{_sysconfdir}/containers/storage.conf
13b226
%config(noreplace) %{_sysconfdir}/containers/registries.conf
5849f4
%dir %{_datadir}/containers
5849f4
%{_datadir}/containers/mounts.conf
06ee43
%dir %{_sharedstatedir}/atomic/sigstore
13b226
%{_mandir}/man5/*.conf.5*
5849f4
%dir %{_datadir}/rhel/secrets
5849f4
%{_datadir}/rhel/secrets/etc-pki-entitlement
5849f4
%{_datadir}/rhel/secrets/rhel7.repo
5849f4
%{_datadir}/rhel/secrets/rhsm
06ee43
1f2fd3
%files
f2b288
%{_bindir}/%{name}
f2b288
%{_mandir}/man1/%{name}.1*
1f2fd3
%license LICENSE
1f2fd3
%doc README.md
13b226
%dir %{_datadir}/bash-completion/
13b226
%dir %{_datadir}/bash-completion/completions
13b226
%{_datadir}/bash-completion/completions/%{name}
1f2fd3
1f2fd3
%changelog
88221d
* Mon Jul 16 2018 Johnny Hughes <johnny@centos.org> - 0.1.31-1.dev.gitae64ff7
88221d
- Manual CentOS Debranding
88221d
339ab7
* Wed Jul 11 2018 Lokesh Mandvekar <lsm5@redhat.com> - 0.1.31-1.dev.gitae64ff7
339ab7
- Resolves: #1599980, #1599224
339ab7
- bump to v0.1.31-dev
339ab7
- built commit ae64ff7
339ab7
ae093f
* Sun May 20 2018 dwalsh <dwalsh@redhat.com> - 0.1.30-14.gitca3bff6
ae093f
- Add devicemapper support
09943a
13b226
* Tue Apr 10 2018 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.29-3.git7add6fc
13b226
- move registries.conf to skopeo-containers from atomic
13b226
13b226
* Thu Mar 29 2018 dwalsh <dwalsh@redhat.com> - 0.1.29-2.git
13b226
- bump to 0.1.29-1
13b226
- Updated containers/image
13b226
    docker-archive generates docker legacy compatible images
13b226
    Do not create $DiffID subdirectories for layers with no configs
13b226
    Ensure the layer IDs in legacy docker/tarfile metadata are unique
13b226
    docker-archive: repeated layers are symlinked in the tar file
13b226
    sysregistries: remove all trailing slashes
13b226
    Improve docker/* error messages
13b226
    Fix failure to make auth directory
13b226
    Create a new slice in Schema1.UpdateLayerInfos
13b226
    Drop unused storageImageDestination.{image,systemContext}
13b226
    Load a *storage.Image only once in storageImageSource
13b226
    Support gzip for docker-archive files
13b226
    Remove .tar extension from blob and config file names
13b226
    ostree, src: support copy of compressed layers
13b226
    ostree: re-pull layer if it misses uncompressed_digest|uncompressed_size
13b226
    image: fix docker schema v1 -> OCI conversion
13b226
    Add /etc/containers/certs.d as default certs directory
13b226
c0fdef
* Wed Mar 21 2018 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.29-1.dev,gitb08350d
c0fdef
- Resolves: #1543707
c0fdef
45a3f5
* Thu Feb 01 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.28-1.git0270e56
45a3f5
- rebased to 0.1.28
45a3f5
45a3f5
* Mon Dec 11 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.27-3.dev.git14245f2
45a3f5
- rebased to 0.1.27-3.dev.git14245f2
45a3f5
5849f4
* Thu Nov 16 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.26-2.dev.git2e8377a
5849f4
- bump changelog
5849f4
5849f4
* Wed Nov 15 2017 dwalsh <dwalsh@redhat.com> - 0.1.25-2.git2e8377a7
5849f4
-  Add manifest type conversion to skopeo copy
5849f4
-  User can select from 3 manifest types: oci, v2s1, or v2s2
5849f4
-   e.g skopeo copy --format v2s1 --compress-blobs docker-archive:alp.tar dir:my-directory
5849f4
5849f4
* Wed Nov 8 2017 dwalsh <dwalsh@redhat.com> - 0.1.25-2.git7fd6f66b
5849f4
- Force storage.conf to default to overlay
5849f4
5849f4
* Wed Nov 8 2017 dwalsh <dwalsh@redhat.com> - 0.1.25-1.git7fd6f66b
5849f4
-   Fix CVE in tar-split
5849f4
-   copy: add shared blob directory support for OCI sources/destinations
5849f4
-   Aligning Docker version between containers/image and skopeo
5849f4
-   Update image-tools, and remove the duplicate Sirupsen/logrus vendor
5849f4
-   makefile: use -buildmode=pie
5849f4
5849f4
* Tue Nov 7 2017 dwalsh <dwalsh@redhat.com> - 1:0.1.24-8.git28d4e08a
5849f4
- Add /usr/share/containers/mounts.conf
5849f4
5849f4
* Mon Oct 23 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.24-5.gitdd2c3e3
5849f4
- built commit dd2c3e3a8e33b849f3625f4f56fa229c76448629
5849f4
5849f4
* Thu Oct 19 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.24-3.dev.git28d4e08
5849f4
- add rhel subscription secrets date to skopeo-containers
5849f4
- skopeo-containers conflicts with docker >= 2:1.13.1-61
5849f4
5849f4
* Thu Oct 12 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.24-2.dev.git28d4e08
5849f4
- Update container/storage.conf and containers-storage.conf man page
5849f4
- Default override to true so it is consistent with RHEL.
5849f4
 
ee3aa9
* Fri Oct 06 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.24-1.dev.git28d4e08
ee3aa9
- Resolves: #1499274
ee3aa9
- built commit 28d4e08
ee3aa9
6f80eb
* Mon Aug 07 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.23-1.git1bbd87f
6f80eb
- Resolves: #1455575, #1478416, #1387217
6f80eb
- bump to v0.1.23
6f80eb
716ae0
* Fri Jun 30 2017 Ryan Hartman <rhartman@redhat.com> - 1:0.1.20-2.1.gite802625
716ae0
- bump release to 2.1
716ae0
- built commit e802625b7cb7f4af9ab77bd2be9eb441ff2f28a2
716ae0
716ae0
* Tue Jun 06 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.20-1.1.gite802625
dfdf7f
- built commit e802625b7cb7f4af9ab77bd2be9eb441ff2f28a2
dfdf7f
716ae0
* Thu Mar 30 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.19-1.1.git62e3747
716ae0
- bump to v0.1.19
716ae0
- built commit 62e3747
716ae0
716ae0
* Thu Mar 30 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.18-1.2
716ae0
- build for all available arches (previous build didn't do this)
716ae0
716ae0
* Mon Mar 27 2017 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.18-1.1
716ae0
- rebuilt for all arches on extras 7.4
716ae0
- enable debuginfo package
3b9609
03852f
* Fri Feb 03 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.18-1
03852f
- btrfs-progs-devel, device-mapper-devel added to build dependencies
03852f
- built commit b08008c
03852f
f2b288
* Tue Dec 13 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-1
f2b288
- Resolves: #1404274 - ship upstream v0.1.17 release
f2b288
- built commit b3b4e2b
f2b288
06ee43
* Tue Nov 22 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-0.7.git1f655f3
06ee43
- runtime dep was missing epoch value, added now
06ee43
06ee43
* Fri Nov 18 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-0.6.git1f655f3
06ee43
- Resolves: #1396531 - list skopeo runtime requirements correctly
06ee43
06ee43
* Mon Oct 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-0.5
06ee43
- built commit 1f655f3
06ee43
06ee43
* Tue Oct 18 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-0.4
06ee43
- Resolves: #1386386 - skopeo-containers conflicts with atomic <= 1.13.1-1
06ee43
- use correct bug number, #1385584 was for atomic
06ee43
06ee43
* Tue Oct 18 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.17-0.3
06ee43
- Resolves: #1385584 - skopeo-containers conflicts with atomic <= 1.13.1-1
06ee43
06ee43
* Mon Oct 17 2016 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.17-0.2
06ee43
- obsoletes atomic, fixed dependencies
06ee43
- %{_sysconfdir}/containers/ owned only by skopeo-containers
06ee43
06ee43
* Fri Oct 14 2016 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.17-0.1
06ee43
- rebase, skopeo-containers subpackage added
06ee43
afbf16
* Tue Sep 20 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.14-0.6
afbf16
- built mtrmac/integrate-all-the-things commit d830391
afbf16
afbf16
* Fri Sep 16 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.14-0.5
afbf16
- built mtrmac/integrate-all-the-things commit 85e4551
afbf16
afbf16
* Tue Sep 13 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.14-0.4
afbf16
- built mtrmac/integrate-all-the-things commit 02b9f8b
afbf16
afbf16
* Tue Sep 13 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.14-0.3
afbf16
- built mtrmac/integrate-all-the-things commit b3fcce0
afbf16
afbf16
* Tue Sep 06 2016 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.14-0.2.dev
afbf16
- own the whole bash-completion dir (https://fedoraproject.org/wiki/Packaging:Guidelines)
afbf16
afbf16
* Tue Sep 06 2016 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.14-0.1.dev
afbf16
- update to 0.1.14-dev
afbf16
6f80eb
* Tue Jul 26 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.13-8
1f2fd3
- bump release, srpm issues in previous build
1f2fd3
1f2fd3
* Tue Jul 12 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.13-7
1f2fd3
- build with golang >= 1.6.2
1f2fd3
1f2fd3
* Fri Jun 24 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1:0.1.13-6
1f2fd3
- Bump Epoch to 1 since that's what skopeo had when it was an atomic
1f2fd3
subpackage
1f2fd3
1f2fd3
* Tue Jun 21 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.1.13-5
1f2fd3
- include go-srpm-macros and compiler(go-compiler) in fedora conditionals
1f2fd3
- define %%gobuild if not already
1f2fd3
- add patch to build with older version of golang
1f2fd3
1f2fd3
* Thu Jun 02 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.13-4
1f2fd3
- update to v0.1.12
1f2fd3
1f2fd3
* Tue May 31 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.12-3
1f2fd3
- fix go build source path
1f2fd3
1f2fd3
* Fri May 27 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.12-2
1f2fd3
- update to v0.1.12
1f2fd3
1f2fd3
* Tue Mar 08 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.11-1
1f2fd3
- update to v0.1.11
1f2fd3
1f2fd3
* Tue Mar 08 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.10-1
1f2fd3
- update to v0.1.10
1f2fd3
- change runcom -> projectatomic
1f2fd3
1f2fd3
* Mon Feb 29 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.9-1
1f2fd3
- update to v0.1.9
1f2fd3
1f2fd3
* Mon Feb 29 2016 Antonio Murdaca <runcom@fedoraproject.org> - 0.1.8-1
1f2fd3
- update to v0.1.8
1f2fd3
1f2fd3
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.4-2
1f2fd3
- https://fedoraproject.org/wiki/Changes/golang1.6
1f2fd3
1f2fd3
* Fri Jan 29 2016 Antonio Murdaca <runcom@redhat.com> - 0.1.4
1f2fd3
- First package for Fedora