From 85b4c896bd2d76b862417eaa5297a2568992b30c Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 25 May 2023 09:11:21 -0400 Subject: [PATCH] [CI:BUILD] Packit: set propose-downstream action type to pre-sync Also address review concerns in pr#18675. [NO NEW TESTS NEEDED] Co-authored-by: Chris Evich Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 8 +++----- rpm/Makefile | 2 +- rpm/podman.spec | 2 -- rpm/update-spec-provides.sh | 2 ++ rpm/update-spec-version.sh | 2 ++ 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 08c065bf75..d635431248 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -33,11 +33,9 @@ jobs: update_release: false dist_git_branches: - fedora-all - #TODO use the right action to update the goimports - # For whatever reason, none of the actions seem to work - #actions: - # create-patches: - # - "cd rpm && bash update-spec-provides.sh" + actions: + pre-sync: + - "cd rpm && bash update-spec-provides.sh" - job: koji_build trigger: commit diff --git a/rpm/Makefile b/rpm/Makefile index 2ed4fadca2..62fa0c075f 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -1,7 +1,7 @@ +.PHONY: rpm rpm: $(shell /usr/bin/bash ./update-spec-version.sh) spectool -g podman.spec - sudo dnf -y builddep podman.spec rpmbuild -ba \ --define '_sourcedir $(shell pwd)' \ --define '_rpmdir %{_sourcedir}/RPMS' \ diff --git a/rpm/podman.spec b/rpm/podman.spec index 661cac3cc5..bf76488c12 100644 --- a/rpm/podman.spec +++ b/rpm/podman.spec @@ -154,8 +154,6 @@ Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release} Provides: %{name}-quadlet Obsoletes: %{name}-quadlet <= 5:4.4.0-1 Provides: %{name}-quadlet = %{epoch}:%{version}-%{release} -# TODO: need to find the right action in packit propose-downstream to update -# the goimports here. None of the actions seem to work so far. # DO NOT DELETE BELOW LINE - used for updating downstream goimports # vendored libraries diff --git a/rpm/update-spec-provides.sh b/rpm/update-spec-provides.sh index 94a6048d4e..2dd8594676 100644 --- a/rpm/update-spec-provides.sh +++ b/rpm/update-spec-provides.sh @@ -4,6 +4,8 @@ # packaging, via the `propose-downstream` packit action. # The goimports don't need to be present upstream. +set -e + SPEC_FILE=$(pwd)/podman.spec sed -i '/Provides: bundled(golang.*/d' $SPEC_FILE diff --git a/rpm/update-spec-version.sh b/rpm/update-spec-version.sh index 43b7408c7f..8d43f27a42 100644 --- a/rpm/update-spec-version.sh +++ b/rpm/update-spec-version.sh @@ -4,6 +4,8 @@ # default. Useful for local manual rpm builds where the Version needs to be set # correctly. +set -e + SPEC_FILE=$(pwd)/podman.spec LATEST_TAG=$(git tag --sort=creatordate | tail -1) LATEST_VERSION=$(echo $LATEST_TAG | sed -e 's/^v//')