Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,6 @@
downstream_package_name: skopeo
upstream_tag_template: v{version}

# These files get synced from upstream to downstream (Fedora / CentOS Stream) on every
# propose-downstream job. This is done so tests maintained upstream can be run
# downstream in Zuul CI and Bodhi.
# Ref: https://packit.dev/docs/configuration#files_to_sync
files_to_sync:
- src: rpm/gating.yaml
dest: gating.yaml
delete: true
- src: plans/
dest: plans/
delete: true
mkpath: true
- src: systemtest/tmt/
dest: test/tmt/
delete: true
mkpath: true
- src: .fmf/
dest: .fmf/
delete: true
- .packit.yaml

packages:
skopeo-fedora:
pkg_tool: fedpkg
Expand All @@ -40,6 +19,10 @@ packages:
skopeo-eln:
specfile_path: rpm/skopeo.spec

actions:
prepare-files: >-
bash -c "sed -i 's/^\(\s*\)ref: .*/\1ref: \"${PACKIT_PROJECT_TAG}\"/' ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf"

srpm_build_deps:
- make

Expand All @@ -60,7 +43,7 @@ jobs:

# Ignore until golang is updated in distro buildroot to go 1.23.3+
- job: copr_build
trigger: ignore
trigger: pull_request
packages: [skopeo-eln]
notifications: *copr_build_failure_notification
targets:
Expand Down
8 changes: 8 additions & 0 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ prepare:
fi
dnf -y upgrade --allowerasing
order: 20
- name: Disable installing everything from srpm
how: install
exclude:
- ".*"
- name: Install the main package
how: install
package:
- skopeo-tests
16 changes: 0 additions & 16 deletions rpm/gating.yaml

This file was deleted.

22 changes: 6 additions & 16 deletions rpm/skopeo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Copr builds set a separate epoch for all environments
%if %{defined fedora}
%define conditional_epoch 1
%define fakeroot 1
%else
%define conditional_epoch 2
%endif
Expand Down Expand Up @@ -71,17 +70,14 @@ Requires: containers-common >= 4:1-21

%description
Command line utility to inspect images and repositories directly on Docker
registries without the need to pull them
registries without the need to pull them.

# NOTE: The tests subpackage is only intended for testing and will not be supported
# for end-users and/or customers.
%package tests
Summary: Tests for %{name}
Summary: Test dependencies for %{name}

Requires: %{name} = %{epoch}:%{version}-%{release}
%if %{defined fakeroot}
Requires: fakeroot
%endif
Requires: gnupg
Requires: jq
Requires: golang
Expand All @@ -90,13 +86,12 @@ Requires: crun
Requires: httpd-tools
Requires: openssl
Requires: squashfs-tools
# bats is not present on RHEL and ELN so it shouldn't be a strong dep
# bats and fakeroot are not present on RHEL and ELN so they shouldn't be strong deps
Recommends: bats
Recommends: fakeroot

%description tests
%{summary}

This package contains system tests for %{name}
This package installs system test dependencies for %{name}

%prep
%autosetup -Sgit %{name}-%{version}
Expand Down Expand Up @@ -142,10 +137,6 @@ make \
PREFIX=%{_prefix} \
install-binary install-docs install-completions

# system tests
install -d -p %{buildroot}/%{_datadir}/%{name}/test/system
cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/

#define license tag if not already defined
%{!?_licensedir:%global license %doc}

Expand All @@ -166,9 +157,8 @@ cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}

# Only test dependencies installed, no files.
%files tests
%license LICENSE vendor/modules.txt
%{_datadir}/%{name}/test

%changelog
%autochangelog
9 changes: 5 additions & 4 deletions systemtest/tmt/main.fmf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require:
- skopeo-tests

environment:
SKOPEO_BINARY: /usr/bin/skopeo

Expand All @@ -11,8 +8,12 @@ adjust:

summary: System test
test: |
rpm -q containers-common skopeo skopeo-tests
rpm -q containers-common skopeo-tests
# If these tests are to be run anywhere else, TMT can fetch
# them using the URL and git ref, so git commands should work.
make -C $(git rev-parse --show-toplevel) test-system-local
require:
- git-core
- make
- skopeo-tests
duration: 60m