2007-01-10 17:49:57 +01:00
|
|
|
#
|
2011-02-18 12:25:57 +01:00
|
|
|
# spec file for package mdadm
|
2007-01-10 17:49:57 +01:00
|
|
|
#
|
2016-05-04 07:00:38 +02:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-10 17:49:57 +01:00
|
|
|
#
|
2008-08-18 00:16:04 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-04-20 10:01:08 +02:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
Name: mdadm
|
2016-05-04 07:00:38 +02:00
|
|
|
Version: 3.4
|
2011-12-22 13:42:21 +01:00
|
|
|
Release: 0
|
2012-05-18 09:23:54 +02:00
|
|
|
BuildRequires: binutils-devel
|
2013-06-13 06:16:10 +02:00
|
|
|
BuildRequires: groff
|
2012-11-04 03:24:36 +01:00
|
|
|
BuildRequires: pkgconfig
|
2007-10-25 02:35:29 +02:00
|
|
|
BuildRequires: sgmltool
|
2012-11-04 03:24:36 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
2015-07-13 11:20:46 +02:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2015-12-15 22:28:50 +01:00
|
|
|
PreReq: %fillup_prereq /sbin/mkinitrd coreutils
|
2012-06-21 09:26:19 +02:00
|
|
|
Recommends: cron
|
2012-06-25 14:07:01 +02:00
|
|
|
Recommends: smtp_daemon
|
2008-10-06 17:46:23 +02:00
|
|
|
Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
2007-01-10 17:49:57 +01:00
|
|
|
Summary: Utility for Configuring MD Setup
|
2013-02-27 23:27:08 +01:00
|
|
|
License: GPL-2.0
|
2011-12-22 13:42:21 +01:00
|
|
|
Group: System/Base
|
2007-01-10 17:49:57 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-06-10 06:08:57 +02:00
|
|
|
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz
|
2007-01-10 17:49:57 +01:00
|
|
|
Source1: Software-RAID.HOWTO.tar.bz2
|
|
|
|
Source2: sysconfig.mdadm
|
2014-09-16 03:06:21 +02:00
|
|
|
Source3: cron.d.mdadm
|
2012-05-22 07:18:08 +02:00
|
|
|
Source7: mdadm.cron
|
2016-05-04 07:00:38 +02:00
|
|
|
Patch1: 0001-super1-Clear-memory-allocated-for-superblock-bitmap-.patch
|
2016-07-15 03:40:06 +02:00
|
|
|
Patch2: 0002-The-mdcheck-script-now-adds-messages-to-the-system.patch
|
2013-09-03 07:46:59 +02:00
|
|
|
|
|
|
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
2013-06-13 06:16:10 +02:00
|
|
|
%define _systemdshutdowndir %{_unitdir}/../system-shutdown
|
2012-11-04 03:24:36 +01:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
%description
|
|
|
|
Mdadm is a program that can be used to control Linux md devices. It is
|
|
|
|
intended to provide all the functionality of the mdtools and raidtools
|
|
|
|
programs but with a very different interface.
|
|
|
|
|
|
|
|
%prep
|
2009-10-03 00:44:49 +02:00
|
|
|
%setup -q -a1
|
2016-05-04 07:00:38 +02:00
|
|
|
%patch1 -p1
|
2016-07-15 03:40:06 +02:00
|
|
|
%patch2 -p1
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%build
|
2014-01-22 05:59:00 +01:00
|
|
|
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes
|
2007-01-10 17:49:57 +01:00
|
|
|
cd Software-RAID.HOWTO
|
|
|
|
sgml2html Software-RAID.HOWTO.sgml
|
|
|
|
sgml2txt Software-RAID.HOWTO.sgml
|
|
|
|
|
|
|
|
%install
|
2014-01-22 05:59:00 +01:00
|
|
|
make install install-systemd install-udev DESTDIR=%{buildroot} SYSTEMD_DIR=%{_unitdir} UDEVDIR=%{_udevdir} SUSE=yes
|
2012-11-04 03:24:36 +01:00
|
|
|
rm -rf %{buildroot}/lib/udev
|
|
|
|
install -d %{buildroot}%{_var}/adm/fillup-templates
|
2014-09-16 03:06:21 +02:00
|
|
|
install -d %{buildroot}/usr/share/mdadm
|
|
|
|
install -m 755 misc/mdcheck %{buildroot}/usr/share/mdadm/mdcheck
|
2012-11-04 03:24:36 +01:00
|
|
|
install -d %{buildroot}/etc/cron.daily
|
2014-09-16 03:06:21 +02:00
|
|
|
install -d %{buildroot}/etc/cron.d
|
2012-11-04 03:24:36 +01:00
|
|
|
install -m 755 %{S:7} %{buildroot}/etc/cron.daily/mdadm
|
2014-09-16 03:06:21 +02:00
|
|
|
install -m 644 %{S:3} %{buildroot}/etc/cron.d/mdadm
|
2012-11-04 03:24:36 +01:00
|
|
|
install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/
|
|
|
|
install -d %{buildroot}%{_systemdshutdowndir}
|
2014-09-16 03:06:21 +02:00
|
|
|
install -d %{buildroot}%{_sbindir}
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcmdmonitor
|
|
|
|
|
2016-05-20 07:16:52 +02:00
|
|
|
%define services mdmonitor.service
|
2014-09-16 03:06:21 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %services
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%post
|
2014-09-16 03:06:21 +02:00
|
|
|
%service_add_post %services
|
2014-06-12 04:09:59 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2014-01-23 10:31:18 +01:00
|
|
|
%fillup_only
|
|
|
|
|
2014-09-16 03:06:21 +02:00
|
|
|
%preun
|
2016-05-23 17:21:59 +02:00
|
|
|
%service_del_preun %services mdmon@.service mdadm-last-resort@.service mdadm-grow-continue@.service
|
2014-09-16 03:06:21 +02:00
|
|
|
|
2007-01-10 17:49:57 +01:00
|
|
|
%postun
|
2014-09-16 03:06:21 +02:00
|
|
|
%service_del_postun %services
|
2014-06-12 04:09:59 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2007-01-10 17:49:57 +01:00
|
|
|
|
2014-06-12 04:09:59 +02:00
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
2007-01-10 17:49:57 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2008-09-24 17:12:07 +02:00
|
|
|
%doc COPYING ChangeLog README.initramfs TODO mdadm.conf-example mkinitramfs
|
2007-01-10 17:49:57 +01:00
|
|
|
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
|
|
|
|
%doc %{_mandir}/man?/*
|
|
|
|
/sbin/*
|
2014-09-16 03:06:21 +02:00
|
|
|
%{_sbindir}/rcmdmonitor
|
|
|
|
%dir /usr/share/mdadm
|
|
|
|
/usr/share/mdadm/*
|
2007-01-10 17:49:57 +01:00
|
|
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
2013-09-03 07:46:59 +02:00
|
|
|
%{_udevdir}/rules.d/63-md-raid-arrays.rules
|
|
|
|
%{_udevdir}/rules.d/64-md-raid-assembly.rules
|
2012-05-22 07:25:59 +02:00
|
|
|
%dir /etc/cron.daily
|
|
|
|
/etc/cron.daily/mdadm
|
2014-09-16 03:06:21 +02:00
|
|
|
%dir /etc/cron.d
|
|
|
|
%config /etc/cron.d/mdadm
|
2015-09-19 08:35:27 +02:00
|
|
|
# %%{_systemdshutdowndir}/ is not owned by all versions of systemd-mini.
|
|
|
|
# But we really do not want to pull in a full systemd, so we rather just own
|
|
|
|
# that directory by ourselves too. After all, this is allowed.
|
|
|
|
%dir %{_systemdshutdowndir}
|
2012-11-04 03:24:36 +01:00
|
|
|
%{_systemdshutdowndir}/mdadm.shutdown
|
2013-06-13 06:16:10 +02:00
|
|
|
%{_unitdir}/mdmon@.service
|
2014-01-22 05:59:00 +01:00
|
|
|
%{_unitdir}/mdmonitor.service
|
2013-12-03 04:13:54 +01:00
|
|
|
%{_unitdir}/mdadm-last-resort@.timer
|
|
|
|
%{_unitdir}/mdadm-last-resort@.service
|
2014-06-10 13:05:25 +02:00
|
|
|
%{_unitdir}/mdadm-grow-continue@.service
|
2014-01-22 05:59:00 +01:00
|
|
|
%dir %{_unitdir}/../scripts
|
|
|
|
%{_unitdir}/../scripts/mdadm_env.sh
|
2008-01-24 18:30:41 +01:00
|
|
|
|
2007-04-06 00:37:00 +02:00
|
|
|
%changelog
|