From f2be46fefb8bf8524bb24adb47da75c9fffa78c5 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Fri, 26 Jan 2024 16:03:27 +0530 Subject: [PATCH] update packit config, enable downstream tasks Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 60 +++++++++++++++++++++++----------- rpm/conmon.spec | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 18 deletions(-) create mode 100644 rpm/conmon.spec diff --git a/.packit.yaml b/.packit.yaml index c6003983..3ce3df72 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,26 +1,50 @@ +--- # See the documentation for more information: # https://packit.dev/docs/configuration/ -upstream_package_name: conmon -downstream_package_name: conmon +specfile_path: rpm/conmon.spec +upstream_tag_template: v{version} jobs: - job: copr_build - # build in new Copr projects - # workaround for https://github.com/packit/packit-service/issues/1854 - identifier: rawhide - # Run on every PR trigger: pull_request - # Disable i386 as it's no longer supported. - # Disable ppc64le and s390x as they take too long on copr. + notifications: + failure_comment: + message: "Ephemeral COPR build failed. @containers/packit-build please check." + enable_net: true targets: - - fedora-rawhide-aarch64 - - fedora-rawhide-x86_64 - - fedora-38-aarch64 - - fedora-38-x86_64 - - fedora-37-aarch64 - - fedora-37-x86_64 - actions: - # Rawhide spec file should also build for the released versions of Fedora. - post-upstream-clone: - - "curl -O https://src.fedoraproject.org/rpms/conmon/raw/rawhide/f/conmon.spec" + - fedora-all-aarch64 + - fedora-all-x86_64 + - fedora-eln-aarch64 + - fedora-eln-x86_64 + - epel-9-aarch64 + - epel-9-x86_64 + - epel-8-aarch64 + - epel-8-x86_64 + + # Run on commit to main branch + - job: copr_build + trigger: commit + notifications: + failure_comment: + message: "podman-next COPR build failed. @containers/packit-build please check." + branch: main + owner: rhcontainerbot + project: podman-next + enable_net: true + + - job: propose_downstream + trigger: release + update_release: false + dist_git_branches: + - fedora-all + + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched # rawhide updates are created automatically diff --git a/rpm/conmon.spec b/rpm/conmon.spec new file mode 100644 index 00000000..633e6b32 --- /dev/null +++ b/rpm/conmon.spec @@ -0,0 +1,86 @@ +%global with_debug 1 + +%if 0%{?with_debug} +%global _find_debuginfo_dwz_opts %{nil} +%global _dwz_low_mem_die_limit 0 +%else +%global debug_package %{nil} +%endif + +%if %{defined rhel} +%bcond_with docs +%else +%bcond_without docs +%endif + +Name: conmon +%if %{defined rhel} +Epoch: 3 +%else +Epoch: 2 +%endif +Version: 2.1.10 +License: Apache-2.0 +Release: %autorelease +Summary: OCI container runtime monitor +URL: https://github.com/containers/%{name} +# Tarball fetched from upstream +Source0: %{url}/archive/v%{version}.tar.gz +%if %{with docs} +ExclusiveArch: %{golang_arches_future} +BuildRequires: go-md2man +%endif +BuildRequires: gcc +BuildRequires: git-core +BuildRequires: glib2-devel +BuildRequires: libseccomp-devel +BuildRequires: systemd-devel +BuildRequires: systemd-libs +BuildRequires: make +Requires: glib2 +Requires: systemd-libs +Requires: libseccomp + +%description +%{summary}. + +%prep +%autosetup -Sgit %{name}-%{version} +sed -i 's/install.bin: bin\/conmon/install.bin:/' Makefile +sed -i 's/install.crio: bin\/conmon/install.crio:/' Makefile + +%build +%{__make} DEBUGFLAG="-g" bin/conmon + +%if %{with docs} +%{__make} GOMD2MAN=go-md2man -C docs +%endif + +%install +%{__make} PREFIX=%{buildroot}%{_prefix} install.bin install.crio + +%if %{with docs} +%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install +%endif + +#define license tag if not already defined +%{!?_licensedir:%global license %doc} + +%files +%license LICENSE +%doc README.md +%{_bindir}/%{name} +%{_libexecdir}/crio/%{name} +%dir %{_libexecdir}/crio + +%if %{with docs} +%{_mandir}/man8/%{name}.8.gz +%endif + +%changelog +%if %{defined autochangelog} +%autochangelog +%else +* Fri Jan 26 2024 RH Container Bot +- Placeholder changelog for envs that are not autochangelog-ready +%endif