Avoid libreport dependency on RHEL

Resolves: RHEL-45523

Signed-off-by: Michal Srb <michal@redhat.com>
This commit is contained in:
Michal Srb 2024-07-16 17:24:46 +02:00
parent d3f06f6bc6
commit 1d7bf968d3

View File

@ -1,8 +1,10 @@
%bcond abrt %{undefined rhel}
Name: mdadm Name: mdadm
Version: 4.3 Version: 4.3
# extraversion is used to define rhel internal version # extraversion is used to define rhel internal version
%define extraversion 2 %define extraversion 2
Release: %{extraversion}%{?dist}.1 Release: %{extraversion}%{?dist}.2
Summary: The mdadm program controls Linux md devices (software RAID arrays) Summary: The mdadm program controls Linux md devices (software RAID arrays)
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
License: GPLv2+ License: GPLv2+
@ -93,7 +95,9 @@ Patch198: mdadm-2.5.2-static.patch
BuildRequires: make BuildRequires: make
BuildRequires: systemd-rpm-macros binutils-devel gcc systemd-devel BuildRequires: systemd-rpm-macros binutils-devel gcc systemd-devel
%if %{with abrt}
Requires: libreport-filesystem Requires: libreport-filesystem
%endif
Requires(post): systemd coreutils Requires(post): systemd coreutils
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd coreutils Requires(postun): systemd coreutils
@ -135,8 +139,10 @@ mkdir -p %{buildroot}%{_localstatedir}/run/
install -d -m 0710 %{buildroot}/run/%{name}/ install -d -m 0710 %{buildroot}/run/%{name}/
# abrt # abrt
%if %{with abrt}
mkdir -p %{buildroot}/etc/libreport/events.d mkdir -p %{buildroot}/etc/libreport/events.d
install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d
%endif
%post %post
%systemd_post mdmonitor.service raid-check.timer %systemd_post mdmonitor.service raid-check.timer
@ -159,10 +165,16 @@ install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d
%config(noreplace) %{_sysconfdir}/sysconfig/* %config(noreplace) %{_sysconfdir}/sysconfig/*
%dir /run/%{name}/ %dir /run/%{name}/
%config(noreplace) %{_tmpfilesdir}/%{name}.conf %config(noreplace) %{_tmpfilesdir}/%{name}.conf
%if %{with abrt}
/etc/libreport/events.d/* /etc/libreport/events.d/*
%endif
/usr/share/mdadm/mdcheck /usr/share/mdadm/mdcheck
%changelog %changelog
* Tue Jul 16 2024 Michal Srb <michal@redhat.com> - 4.3-2.2
- Avoid libreport dependency on RHEL
- Resolves: RHEL-45523
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.3-2.1 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.3-2.1
- Bump release for June 2024 mass rebuild - Bump release for June 2024 mass rebuild