Skip to content

Commit

Permalink
packit: Bump FMF test plan ref on release
Browse files Browse the repository at this point in the history
Fedora dist-git FMF test plans have to specify a git repo
and fixed ref for where to find the tests to run. This is bad, and at
some point it should instead just discover the tests from the upstream
source tarball instead. Until teemtee/tmt#585
gets fixed, we need to bump `ref:` in dist-git's plans/upstream.fmf.

Cockpituous had a hack for this [1], which we need to transplant to
packit now. Unfortunately this reintroduces `files_to_sync:`, but all of
this will go away when the follow-up issue
teemtee/tmt#978 gets addressed.

Create the file in tmp/ instead of plans/ (from where it would be easier
to sync) as packit refuses operation on an unclean tree. tmp/ is in
.gitignore.

[1] cockpit-project/cockpituous@2ef3f6c9991
  • Loading branch information
martinpitt authored and mvollmer committed May 24, 2022
1 parent 2b76cee commit 8f48c47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@ actions:
# HACK: packit's "fix spec file" stage does not kick in here, and it does not take the spec from the tarball
# https://github.com/packit/packit-service/issues/1515
- sh -exc 'tools/create-spec --version $(git describe | tr - .) --build-all -o cockpit.spec tools/cockpit.spec.in'
# HACK: until FMF uses tests from dist-git source tarball: https://github.com/teemtee/tmt/issues/585
- sh -exc 'mkdir -p tmp; curl --silent --fail https://src.fedoraproject.org/rpms/cockpit/raw/rawhide/f/plans/upstream.fmf | sed -r "/ref:/ s/[0-9.]+/$(git describe --abbrev=0)/" > tmp/upstream.fmf'

create-archive:
# The sandcastle doesn't have enough ram to run webpack, so wait
# until the webpack-jumpstart workflow has run and grab the result.
- tools/webpack-jumpstart --wait --rebase
- tools/make-dist

# HACK: packit.yml and spec get synced by default; drop this when the plans/upstream.fmf HACK above gets dropped
files_to_sync:
- packit.yaml
- cockpit.spec
- src: tmp/upstream.fmf
dest: plans/upstream.fmf

srpm_build_deps:
- automake
- gcc
Expand Down

0 comments on commit 8f48c47

Please sign in to comment.