mdadm/mdadm.spec
miaoguanqin 3cf6abdb95 fix CVE-2023-28938 for mdadm
(cherry picked from commit 4e0b4fc83cec58447442daf0f8aa87325a33874b)
2023-09-11 10:53:41 +08:00

176 lines
5.6 KiB
RPMSpec

Name: mdadm
Version: 4.1
Release: rc2.0.15
Summary: The software RAID arrays user manage tools
License: GPLv2+
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
Source0: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-rc2.tar.xz
Source1: mdcheck-cron
Source2: mdmonitor.service
Source3: mdadm.conf
Patch6000: 6000-Assemble-free-resources-in-load_devices.patch
Patch6001: 6001-Assemble-set-devices-to-NULL-when-load_devices-can-t.patch
Patch6002: 6002-Document-PART-POLICY-lines.patch
Patch6003: 6003-Grow-avoid-overflow-in-compute_backup_blocks.patch
Patch6004: 6004-Grow-report-correct-new-chunk-size.patch
Patch6005: 6005-Fix-spelling-typos.patch
Patch6006: 6006-Detail.c-do-not-skip-first-character-when-calling-xs.patch
Patch6007: 6007-Fix-reshape-for-decreasing-data-offset.patch
Patch6008: 6008-mdmon-don-t-attempt-to-manage-new-arrays-when-termin.patch
Patch6009: 6009-mdmon-wait-for-previous-mdmon-to-exit-during-takeove.patch
Patch6010: 6010-Assemble-Fix-starting-array-with-initial-reshape-che.patch
Patch6011: 6011-add-missing-units-to-examine.patch
Patch6012: 6012-Create-Block-rounding-size-to-max.patch
Patch6013: 6013-mdadm-fix-coredump-of-mdadm-monitor-r.patch
Patch6014: 6014-mdadm-Fix-mdadm-r-remove-option-regresision.patch
Patch6015: 6015-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch
Patch6016: 6016-Fix-possible-NULL-ptr-dereferences-and-memory-leaks.patch
Patch6017: 6017-Monitor-use-devname-as-char-array-instead-of-pointer.patch
Patch6018: 6018-mdadm-block-creation-with-long-names.patch
Patch6019: 6019-mdadm-Don-t-open-md-device-for-CREATE-and-ASSEMBLE.patch
Patch6020: 6020-fix-NULL-dereference-in-super_by_fd.patch
Patch6021: 6021-Fix-memory-leak-after-mdadm-detail.patch
BuildRequires: systemd gcc binutils
Requires(post): systemd coreutils
Requires(preun): systemd
Requires(postun): systemd coreutils
%description
mdadm is a tool for managing Linux Software RAID arrays.
It can create, assemble, report on, and monitor arrays.
It can also move spares between raid arrays when needed.
%package help
Summary: Including man files for mdadm
Requires: man
BuildArch: noarch
%description help
This contains man files for the using of mdadm.
%prep
%autosetup -n %{name}-%{version}_rc2 -p1
%build
%make_build CXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon
%install
make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} install install-systemd
install -Dp -m 755 misc/mdcheck %{buildroot}%{_sbindir}/mdcheck
install -Dp -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.d/mdcheck
#install mdmonitor.service from local file
install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/mdadm.conf
install -d -m 710 %{buildroot}/var/run/mdadm/
%post
%systemd_post mdmonitor.service
/usr/bin/systemctl disable mdmonitor-takeover.service >/dev/null 2>&1 || :
%preun
%systemd_preun mdmonitor.service
%postun
%systemd_postun_with_restart mdmonitor.service
%files
%doc ChangeLog mdadm.conf-example
%license COPYING
%{_udevrulesdir}/*
%{_sbindir}/*
%{_unitdir}/*
/usr/lib/systemd/system-shutdown/mdadm.shutdown
%config(noreplace) %{_sysconfdir}/cron.d/mdcheck
%config(noreplace) %{_tmpfilesdir}/mdadm.conf
%dir %{_localstatedir}/run/mdadm/
%files help
%{_mandir}/man*/*
%changelog
* Thu Sep 7 2023 miaoguanqin <miaoguanqin@huawei.com> - 4.1-rc2.0.15
- fix CVE-2023-28938 for mdadm
* Mon Apr 24 2023 tangyuchen <tangyuchen5@huawei.com> - 4.1-rc2.0.14
- fix crond cannot find command mdadm
* Fri Jan 6 2023 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.13
- fix Null deference in super_by_fd
* Thu Dec 8 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.12
- backport four upstream bugfix patches
* Mon Nov 14 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.11
- backport upstream bugfix patch to fix segfault problem in monitor.c
* Mon Jun 27 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 4.1-rc2.0.10
- fix segfault of --monitor -r
* Mon Mar 9 2020 hy <eulerstoragemt@huawei.com> - 4.1-rc2.0.9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add a configuration file in /usr/lib/tmpfiles.d for creating the /run/mdadm directory during the boot process.
* Tue Mar 3 2020 hy <eulerstoragemt@huawei.com> - 4.1-rc2.0.8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add ConditionPathExists in mdmonitor.service for resolving service failure during system startup
* Sun Jan 19 2020 hy <eulerstoragemt@huawei.com> - 4.1-rc2.0.7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add the --syslog option while executing mdadm --scan command in mdmonitor.service
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.1-rc2.0.6
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESC:Repackage
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1-rc2.0.5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:use incremental assembly rules
* Wed Aug 28 2019 zhanghaibo <ted.zhang@huawei.com> - 4.1-rc2.0.4
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESCi:openEuler Debranding
* Wed Aug 21 2019 zhanghaibo <ted.zhang@huawei.com> - 4.1-rc2.0.3
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESCi:openEuler Debranding
* Thu Aug 8 2019 zhanghaibo <ted.zhang@huawei.com> - 4.1-rc2.0.2.h3
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESCi:openEuler Debranding
* Sat Jun 22 2019 zhangsaisai<zhangsaisai@huawei.com> - 4.1-rc2.0.2.h2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:backport patch from community
* Wed Apr 10 2019 wangjufeng<wangjufeng@huawei.com> - 4.1-rc2.0.2.h1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:backport patch from community
- Package Initialization