Skip to content

Commit

Permalink
update packit config, enable downstream tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 authored and haircommander committed Jan 26, 2024
1 parent 43b6cba commit f2be46f
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 18 deletions.
60 changes: 42 additions & 18 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -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
86 changes: 86 additions & 0 deletions rpm/conmon.spec
Original file line number Diff line number Diff line change
@@ -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 <rhcontainerbot@fedoraproject.org>
- Placeholder changelog for envs that are not autochangelog-ready
%endif

0 comments on commit f2be46f

Please sign in to comment.