Skip to content

Commit

Permalink
fix: update packit configuration
Browse files Browse the repository at this point in the history
Update packit configuration to produce centos and rhel
packages.

Add configuration to be able to propose downstream PR
for Fedora and CentOS dist-git.

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv committed Mar 15, 2024
1 parent 63eba4f commit 598d329
Showing 1 changed file with 45 additions and 24 deletions.
69 changes: 45 additions & 24 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,69 @@
---
# https://packit.dev/docs/configuration/

specfile_path: fido-device-onboard.spec
upstream_project_url: https://github.com/fdo-rs/fido-device-onboard-rs
upstream_package_name: fido-device-onboard-rs
upstream_tag_template: v{version}

files_to_sync:
- fido-device-onboard.spec
- .packit.yaml
issue_repository: https://github.com/fdo-rs/fido-device-onboard-rs

upstream_package_name: fido-device-onboard
downstream_package_name: fido-device-onboard

upstream_tag_template: v{version}
copy_upstream_release_description: true

specfile_path: fido-device-onboard.spec
files_to_sync:
- fido-device-onboard.spec
- .packit.yaml

srpm_build_deps:
- cargo

actions:
create-archive:
- bash -c "sed -i -r \"s/^Version:.*/Version:\ ${PACKIT_PROJECT_VERSION}/\" fido-device-onboard.spec"
- bash -c "sed -i '/Source1/d ; /^# See make-vendored-tarfile.sh in upstream repo/d ;' fido-device-onboard.spec"
- bash -c "cp ./patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch ."
- bash -c "git archive --prefix=fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}/ --format=tar HEAD > fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "tar -xvf fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "ls -1 ./fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
fix-spec-file:
- "cat fido-device-onboard.spec"
packages:
fido-device-onboard-fedora:
pkg_tool: fedpkg
actions:
# post-upstream-clone:
# - curl -sO https://src.fedoraproject.org/rpms/fido-device-onboard/raw/rawhide/f/fido-device-onboard.spec

fido-device-onboard-centos:
pkg_tool: centpkg
actions:
# post-upstream-clone:
# - curl -sO https://gitlab.com/redhat/centos-stream/rpms/fido-device-onboard/-/raw/c9s/fido-device-onboard.spec
jobs:
- job: copr_build
- &fdo_copr
job: copr_build
trigger: pull_request
targets:
- fedora-development-aarch64
- fedora-development
- fedora-development-aarch64
- fedora-latest
- fedora-latest-aarch64
- job: copr_build
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-9-powerpc64le
- centos-stream-9-s390x
- rhel-9-x86_64
- rhel-9-aarch64
- rhel-9-powerpc64le
- rhel-9-s390x

- <<: *fdo_copr
trigger: commit
branch: main
owner: "@fedora-iot" # copr repo namespace
project: fedora-iot # copr repo name so you can consume the builds
targets:
- fedora-development-aarch64
- fedora-development
- fedora-latest
- fedora-latest-aarch64

- job: propose_downstream
trigger: release
packages: [fido-device-onboard-fedora]
dist_git_branches:
- fedora

- job: propose_downstream
trigger: release
packages: [fido-device-onboard-centos]
dist_git_branches:
- cs9
...

0 comments on commit 598d329

Please sign in to comment.