From 0be5ae24930718d9248f22355aa058ce8950a657 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Thu, 11 Apr 2024 14:34:29 +0200 Subject: [PATCH 1/4] packit: minor style adjustments Use the upstream YML style (see .github/...) as well as the known directory layout. Signed-off-by: David Rheinsberg --- .packit.yml | 63 ++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/.packit.yml b/.packit.yml index e7509c15..47d7d9a5 100644 --- a/.packit.yml +++ b/.packit.yml @@ -1,54 +1,49 @@ ---- -# vi: set ts=2 sw=2 et: -# -# Docs: https://packit.dev/docs/ +downstream_package_name: "dbus-broker" +upstream_package_name: "dbus-broker" +upstream_tag_template: "v{version}" + +specfile_path: ".dist-git/dbus-broker.spec" -specfile_path: .packit_rpm/dbus-broker.spec files_to_sync: - - .packit.yml - - src: .packit_rpm/dbus-broker.spec - dest: dbus-broker.spec +- ".packit.yml" +- src: ".dist-git/dbus-broker.spec" + dest: "dbus-broker.spec" + srpm_build_deps: - - meson -upstream_package_name: dbus-broker -downstream_package_name: dbus-broker -upstream_tag_template: "v{version}" +- "meson" actions: post-upstream-clone: - # Download all subprojects in advance, as we won't have networking during RPM build + # Prepare sources for offline builds - meson subprojects download - # Use the Fedora Rawhide specfile - - git clone https://src.fedoraproject.org/rpms/dbus-broker .packit_rpm --depth=1 - # Drop the "sources" file so rebase-helper doesn't think we're a dist-git - - rm -fv .packit_rpm/sources - # Drop backported patches from the specfile - - sed -ri '/^Patch.*\\:.+\\.patch/d' .packit_rpm/dbus-broker.spec + # Use the downstream configuration + - git clone --depth=1 "https://src.fedoraproject.org/rpms/dbus-broker" ".dist-git" + # Drop "sources" so rebase-helper does not treat this as dist-git + - rm -fv ".dist-git/sources" + # Drop backported patches + - sed -ri '/^Patch.*\\:.+\\.patch/d' ".dist-git/dbus-broker.spec" create-archive: - # We have to override the default archive command (which is 'git archive'), since that ignores - # files in subprojects - - bash -c 'tar -pczf .packit_rpm/$PACKIT_PROJECT_NAME_VERSION.tar.gz --exclude="./.*" --transform="s/^\./$PACKIT_PROJECT_NAME_VERSION/" .' - - bash -c "echo .packit_rpm/$PACKIT_PROJECT_NAME_VERSION.tar.gz" + # Override `git archive`, since we use subprojects. + - bash -c 'tar -pczf .dist-git/$PACKIT_PROJECT_NAME_VERSION.tar.gz --exclude="./.*" --transform="s/^\./$PACKIT_PROJECT_NAME_VERSION/" .' + - bash -c "echo .dist-git/$PACKIT_PROJECT_NAME_VERSION.tar.gz" jobs: - job: copr_build trigger: pull_request targets: - - fedora-all-aarch64 - - fedora-all-i386 - - fedora-all-ppc64le - - fedora-all-s390x - - fedora-all-x86_64 + - fedora-all-aarch64 + - fedora-all-i386 + - fedora-all-ppc64le + - fedora-all-s390x + - fedora-all-x86_64 - job: tests trigger: pull_request fmf_path: test/integration/ tmt_plan: upstream_ci targets: - # Limit the Testing Farm jobs to the latest stable and rawhide releases to conserve resources - # See: https://packit.dev/docs/configuration#aliases - - fedora-latest-stable-aarch64 - - fedora-latest-stable-x86_64 - - fedora-rawhide-aarch64 - - fedora-rawhide-x86_64 + - fedora-latest-stable-aarch64 + - fedora-latest-stable-x86_64 + - fedora-rawhide-aarch64 + - fedora-rawhide-x86_64 From f56a021796cc844378766a4dea5fbb8f9ccf36ee Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Thu, 11 Apr 2024 14:40:53 +0200 Subject: [PATCH 2/4] packit: trigger builds/tests on commits Ensure that we always build and test the main-branch, since parallel PRs can lead to insufficient tests, or tests on outdated merges. Signed-off-by: David Rheinsberg --- .packit.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.packit.yml b/.packit.yml index 47d7d9a5..7134b8d1 100644 --- a/.packit.yml +++ b/.packit.yml @@ -29,6 +29,15 @@ actions: - bash -c "echo .dist-git/$PACKIT_PROJECT_NAME_VERSION.tar.gz" jobs: +- job: copr_build + trigger: commit + targets: + - fedora-all-aarch64 + - fedora-all-i386 + - fedora-all-ppc64le + - fedora-all-s390x + - fedora-all-x86_64 + - job: copr_build trigger: pull_request targets: @@ -38,6 +47,16 @@ jobs: - fedora-all-s390x - fedora-all-x86_64 +- job: tests + trigger: commit + fmf_path: test/integration/ + tmt_plan: upstream_ci + targets: + - fedora-latest-stable-aarch64 + - fedora-latest-stable-x86_64 + - fedora-rawhide-aarch64 + - fedora-rawhide-x86_64 + - job: tests trigger: pull_request fmf_path: test/integration/ From 5577ea1b45ed159c178dde8ad6500551d8ce3e80 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Thu, 11 Apr 2024 14:41:44 +0200 Subject: [PATCH 3/4] packit: propose downstream releases Propose downstream releases whenever upstream releases happen. Signed-off-by: David Rheinsberg --- .packit.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.packit.yml b/.packit.yml index 7134b8d1..542a2c98 100644 --- a/.packit.yml +++ b/.packit.yml @@ -66,3 +66,8 @@ jobs: - fedora-latest-stable-x86_64 - fedora-rawhide-aarch64 - fedora-rawhide-x86_64 + +- job: propose_downstream + trigger: release + dist_git_branches: + - main From 9fc291749bc191037c1fe99ba7a1b16873a25df4 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Thu, 11 Apr 2024 14:44:29 +0200 Subject: [PATCH 4/4] packit: do not hide the config file Ensure that the config file for packit is visible. We avoid hidden files whenever allowed by the tools. Signed-off-by: David Rheinsberg --- .packit.yml => packit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .packit.yml => packit.yml (99%) diff --git a/.packit.yml b/packit.yml similarity index 99% rename from .packit.yml rename to packit.yml index 542a2c98..7ded34ca 100644 --- a/.packit.yml +++ b/packit.yml @@ -5,7 +5,7 @@ upstream_tag_template: "v{version}" specfile_path: ".dist-git/dbus-broker.spec" files_to_sync: -- ".packit.yml" +- "packit.yml" - src: ".dist-git/dbus-broker.spec" dest: "dbus-broker.spec"