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