2024-07-12 06:51:23 +00:00
|
|
|
%global with_debug 1
|
2018-07-24 14:01:40 +00:00
|
|
|
|
2024-07-12 06:51:23 +00:00
|
|
|
%if 0%{?with_debug}
|
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
|
|
|
%global _dwz_low_mem_die_limit 0
|
|
|
|
%else
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# RHEL's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we
|
|
|
|
# set it separately here and do not depend on RHEL's go-[s]rpm-macros package
|
|
|
|
# until that's fixed.
|
|
|
|
# c9s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227328
|
|
|
|
# c8s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227331
|
|
|
|
%if %{defined rhel}
|
|
|
|
%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%global gomodulesmode GO111MODULE=on
|
|
|
|
|
|
|
|
# No btrfs on RHEL
|
|
|
|
%if %{defined fedora}
|
|
|
|
%define build_with_btrfs 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Only used in official koji builds
|
|
|
|
# Copr builds set a separate epoch for all environments
|
|
|
|
%if %{defined fedora}
|
|
|
|
%define conditional_epoch 1
|
|
|
|
%else
|
|
|
|
%define conditional_epoch 2
|
|
|
|
%endif
|
2016-02-03 16:54:55 +00:00
|
|
|
|
2023-07-06 19:28:16 +00:00
|
|
|
Name: skopeo
|
2024-07-12 06:51:23 +00:00
|
|
|
%if %{defined copr_username}
|
|
|
|
Epoch: 102
|
|
|
|
%else
|
|
|
|
Epoch: %{conditional_epoch}
|
|
|
|
%endif
|
|
|
|
# DO NOT TOUCH the Version string!
|
|
|
|
# The TRUE source of this specfile is:
|
|
|
|
# https://github.com/containers/skopeo/blob/main/rpm/skopeo.spec
|
|
|
|
# If that's what you're reading, Version must be 0, and will be updated by Packit for
|
|
|
|
# copr and koji builds.
|
|
|
|
# If you're reading this on dist-git, the version is automatically filled in by Packit.
|
2024-07-29 18:38:58 +00:00
|
|
|
Version: 1.16.0
|
2024-07-12 06:51:23 +00:00
|
|
|
# The `AND` needs to be uppercase in the License for SPDX compatibility
|
|
|
|
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
|
2024-07-30 07:52:14 +00:00
|
|
|
Release: 2%{?dist}
|
2024-07-12 06:51:23 +00:00
|
|
|
%if %{defined golang_arches_future}
|
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2024-03-28 11:38:22 +00:00
|
|
|
%else
|
2024-07-12 06:51:23 +00:00
|
|
|
ExclusiveArch: aarch64 ppc64le s390x x86_64
|
|
|
|
%endif
|
|
|
|
Summary: Inspect container images and repositories on registries
|
|
|
|
URL: https://github.com/containers/%{name}
|
|
|
|
# Tarball fetched from upstream
|
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz
|
|
|
|
BuildRequires: %{_bindir}/go-md2man
|
|
|
|
%if %{defined build_with_btrfs}
|
|
|
|
BuildRequires: btrfs-progs-devel
|
2023-04-25 01:23:02 +00:00
|
|
|
%endif
|
2021-01-12 19:31:58 +00:00
|
|
|
BuildRequires: git-core
|
2024-07-12 06:51:23 +00:00
|
|
|
BuildRequires: golang
|
|
|
|
%if !%{defined gobuild}
|
|
|
|
BuildRequires: go-rpm-macros
|
|
|
|
%endif
|
2018-04-08 02:51:52 +00:00
|
|
|
BuildRequires: gpgme-devel
|
|
|
|
BuildRequires: libassuan-devel
|
2024-07-12 06:51:23 +00:00
|
|
|
BuildRequires: ostree-devel
|
2018-04-08 02:51:52 +00:00
|
|
|
BuildRequires: glib2-devel
|
2018-04-16 02:42:43 +00:00
|
|
|
BuildRequires: make
|
2024-07-12 06:51:23 +00:00
|
|
|
BuildRequires: shadow-utils-subid-devel
|
|
|
|
Requires: containers-common >= 4:1-21
|
2018-08-12 03:29:06 +00:00
|
|
|
|
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
|
|
|
|
|
2019-10-15 19:25:53 +00:00
|
|
|
%package tests
|
|
|
|
Summary: Tests for %{name}
|
2024-07-12 06:51:23 +00:00
|
|
|
|
2019-10-15 19:25:53 +00:00
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
2024-07-29 18:38:58 +00:00
|
|
|
%if %{defined fedora}
|
2024-07-12 06:51:23 +00:00
|
|
|
Requires: bats
|
2024-07-29 18:38:58 +00:00
|
|
|
%endif
|
2019-10-15 19:25:53 +00:00
|
|
|
Requires: gnupg
|
|
|
|
Requires: jq
|
2024-07-12 06:51:23 +00:00
|
|
|
Requires: golang
|
2019-10-15 19:25:53 +00:00
|
|
|
Requires: podman
|
2022-10-20 10:12:53 +00:00
|
|
|
Requires: crun
|
2020-07-20 19:28:33 +00:00
|
|
|
Requires: httpd-tools
|
2021-03-01 19:19:13 +00:00
|
|
|
Requires: openssl
|
2024-07-30 07:45:44 +00:00
|
|
|
%if %{defined fedora}
|
2024-07-12 06:51:23 +00:00
|
|
|
Requires: fakeroot
|
2024-07-30 07:45:44 +00:00
|
|
|
%endif
|
2022-03-22 13:10:27 +00:00
|
|
|
Requires: squashfs-tools
|
2019-10-15 19:25:53 +00:00
|
|
|
|
|
|
|
%description tests
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
This package contains system tests for %{name}
|
|
|
|
|
2016-02-03 16:54:55 +00:00
|
|
|
%prep
|
2024-07-12 06:51:23 +00:00
|
|
|
%autosetup -Sgit %{name}-%{version}
|
|
|
|
# The %%install stage should not rebuild anything but only install what's
|
|
|
|
# built in the %%build stage. So, remove any dependency on build targets.
|
|
|
|
sed -i 's/^install-binary: bin\/%{name}.*/install-binary:/' Makefile
|
|
|
|
sed -i 's/^completions: bin\/%{name}.*/completions:/' Makefile
|
|
|
|
sed -i 's/^install-docs: docs.*/install-docs:/' Makefile
|
|
|
|
|
|
|
|
%build
|
|
|
|
%set_build_flags
|
|
|
|
export CGO_CFLAGS=$CFLAGS
|
|
|
|
|
|
|
|
# These extra flags present in $CFLAGS have been skipped for now as they break the build
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
export CGO_CFLAGS="$CGO_CFLAGS -m64 -mtune=generic -fcf-protection=full"
|
|
|
|
%endif
|
|
|
|
|
2024-07-29 18:38:58 +00:00
|
|
|
BASEBUILDTAGS="$(hack/libsubid_tag.sh)"
|
2024-07-12 06:51:23 +00:00
|
|
|
%if %{defined build_with_btrfs}
|
|
|
|
export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_tag.sh) $(hack/btrfs_installed_tag.sh)"
|
2023-07-06 19:28:16 +00:00
|
|
|
%else
|
2024-07-12 06:51:23 +00:00
|
|
|
export BUILDTAGS="$BASEBUILDTAGS btrfs_noversion exclude_graphdriver_btrfs"
|
2023-04-25 01:23:02 +00:00
|
|
|
%endif
|
|
|
|
|
2024-07-12 06:51:23 +00:00
|
|
|
# unset LDFLAGS earlier set from set_build_flags
|
|
|
|
LDFLAGS=''
|
|
|
|
|
2023-07-06 19:28:16 +00:00
|
|
|
%gobuild -o bin/%{name} ./cmd/%{name}
|
2022-02-04 21:28:41 +00:00
|
|
|
%{__make} docs
|
2016-02-03 16:54:55 +00:00
|
|
|
|
|
|
|
%install
|
2024-07-12 06:51:23 +00:00
|
|
|
make \
|
|
|
|
DESTDIR=%{buildroot} \
|
|
|
|
PREFIX=%{_prefix} \
|
|
|
|
install-binary install-docs install-completions
|
2017-10-17 12:35:18 +00:00
|
|
|
|
2019-10-15 19:25:53 +00:00
|
|
|
# system tests
|
|
|
|
install -d -p %{buildroot}/%{_datadir}/%{name}/test/system
|
|
|
|
cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
|
|
|
|
|
2016-02-03 16:54:55 +00:00
|
|
|
#define license tag if not already defined
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
|
|
|
%files
|
2016-09-21 19:09:54 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2016-08-11 14:24:17 +00:00
|
|
|
%{_bindir}/%{name}
|
2019-03-27 12:38:58 +00:00
|
|
|
%{_mandir}/man1/%{name}*
|
2016-09-21 19:09:54 +00:00
|
|
|
%dir %{_datadir}/bash-completion
|
|
|
|
%dir %{_datadir}/bash-completion/completions
|
2016-08-25 19:34:12 +00:00
|
|
|
%{_datadir}/bash-completion/completions/%{name}
|
2022-07-15 15:48:48 +00:00
|
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
|
|
%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
2022-07-15 17:53:35 +00:00
|
|
|
%dir %{_datadir}/zsh/site-functions
|
2022-07-15 15:48:48 +00:00
|
|
|
%{_datadir}/zsh/site-functions/_%{name}
|
2016-02-03 16:54:55 +00:00
|
|
|
|
2019-10-15 19:25:53 +00:00
|
|
|
%files tests
|
2024-07-29 18:38:58 +00:00
|
|
|
%license LICENSE vendor/modules.txt
|
2019-10-15 19:25:53 +00:00
|
|
|
%{_datadir}/%{name}/test
|
|
|
|
|
2016-02-03 16:54:55 +00:00
|
|
|
%changelog
|
2024-07-30 07:52:14 +00:00
|
|
|
* Tue Jul 30 2024 Jindrich Novy <jnovy@redhat.com> - 1:1.16.0-2
|
|
|
|
- Don't require fakeroot for tests
|
|
|
|
- Resolves: RHEL-27608
|
|
|
|
|
2024-07-29 18:38:58 +00:00
|
|
|
* Mon Jul 29 2024 Jindrich Novy <jnovy@redhat.com> - 1:1.16.0-1
|
|
|
|
- Update to version 1.16.0
|
|
|
|
|
2024-07-12 06:51:23 +00:00
|
|
|
* Fri Jul 12 2024 Jindrich Novy <jnovy@redhat.com> - 1:1.15.2-1
|
|
|
|
- Update to version 1.15.2
|
|
|
|
|
2024-06-24 16:24:40 +00:00
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2:1.15.1-2
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
2024-05-16 14:15:58 +00:00
|
|
|
* Thu May 16 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.15.1-1
|
|
|
|
- update to https://github.com/containers/skopeo/releases/tag/v1.15.1
|
|
|
|
- Related: RHEL-34195
|
|
|
|
|
2024-03-28 14:21:57 +00:00
|
|
|
* Thu Mar 28 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.15.0-3
|
|
|
|
- BR: go-rpm-macros
|
|
|
|
- Related: RHEL-30637
|
|
|
|
|
2024-03-28 12:31:46 +00:00
|
|
|
* Thu Mar 28 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.15.0-2
|
|
|
|
- remove Fedora hack
|
|
|
|
- Related: RHEL-30637
|
|
|
|
|
2024-03-28 11:38:22 +00:00
|
|
|
* Thu Mar 28 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.15.0-2.14.2
|
|
|
|
- Sync with RHEL9
|
|
|
|
- Resolves: RHEL-30637
|