Compare commits
No commits in common. "c8" and "c9" have entirely different histories.
|
@ -1,3 +0,0 @@
|
|||
# Run system wide raid-check once a week on Sunday at 1am by default
|
||||
0 1 * * Sun root /usr/sbin/raid-check
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# extract configuration from /etc/sysconfig/mdadm and write
|
||||
# environment to /run/sysconfig/mdadm to be used by
|
||||
# systemd unit files.
|
||||
|
||||
MDADM_SCAN="yes"
|
||||
|
||||
# Following adapted from /etc/init.d/mdadmd on openSUSE
|
||||
|
||||
mdadmd_CONFIG=/etc/sysconfig/mdadm
|
||||
if test -r $mdadmd_CONFIG; then
|
||||
. $mdadmd_CONFIG
|
||||
fi
|
||||
|
||||
if [ x$MDADM_DELAY != x"" ]; then
|
||||
MDADM_DELAY="-d "$MDADM_DELAY;
|
||||
fi
|
||||
|
||||
if [ x$MDADM_MAIL != x"" ]; then
|
||||
MDADM_MAIL="-m \"$MDADM_MAIL\""
|
||||
fi
|
||||
|
||||
if [ x$MDADM_PROGRAM != x"" ]; then
|
||||
MDADM_PROGRAM="-p \"$MDADM_PROGRAM\""
|
||||
fi
|
||||
|
||||
if [ x$MDADM_SCAN = x"yes" ]; then
|
||||
MDADM_SCAN="--scan"
|
||||
else
|
||||
MDADM_SCAN=""
|
||||
fi
|
||||
|
||||
if [ x$MDADM_SEND_MAIL_ON_START = x"yes" ]; then
|
||||
MDADM_SEND_MAIL="-t"
|
||||
else
|
||||
MDADM_SEND_MAIL=""
|
||||
fi
|
||||
|
||||
if [ x$MDADM_CONFIG != x"" ]; then
|
||||
MDADM_CONFIG="-c \"$MDADM_CONFIG\""
|
||||
fi
|
||||
|
||||
mkdir -p /run/sysconfig
|
||||
echo "MDADM_MONITOR_ARGS=$MDADM_RAIDDEVICES $MDADM_DELAY $MDADM_MAIL $MDADM_PROGRAM $MDADM_SCAN $MDADM_SEND_MAIL $MDADM_CONFIG" > /run/sysconfig/mdadm
|
||||
if [ -n "$MDADM_CHECK_DURATION" ]; then
|
||||
echo "MDADM_CHECK_DURATION=$MDADM_CHECK_DURATION" >> /run/sysconfig/mdadm
|
||||
fi
|
164
SOURCES/mdcheck
164
SOURCES/mdcheck
|
@ -1,164 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2014-2017 Neil Brown <neilb@suse.de>
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# Author: Neil Brown
|
||||
# Email: <neilb@suse.com>
|
||||
|
||||
# This script should be run periodically to automatically
|
||||
# perform a 'check' on any md arrays.
|
||||
#
|
||||
# It supports a 'time budget' such that any incomplete 'check'
|
||||
# will be checkpointed when that time has expired.
|
||||
# A subsequent invocation can allow the 'check' to continue.
|
||||
#
|
||||
# Options are:
|
||||
# --continue Don't start new checks, only continue old ones.
|
||||
# --duration This is passed to "date --date=$duration" to find out
|
||||
# when to finish
|
||||
#
|
||||
# To support '--continue', arrays are identified by UUID and the 'sync_completed'
|
||||
# value is stored in /var/lib/mdcheck/$UUID
|
||||
|
||||
# convert a /dev/md name into /sys/.../md equivalent
|
||||
sysname() {
|
||||
set `ls -lLd $1`
|
||||
maj=${5%,}
|
||||
min=$6
|
||||
readlink -f /sys/dev/block/$maj:$min
|
||||
}
|
||||
|
||||
args=$(getopt -o hcd: -l help,continue,duration: -n mdcheck -- "$@")
|
||||
rv=$?
|
||||
if [ $rv -ne 0 ]; then exit $rv; fi
|
||||
|
||||
eval set -- $args
|
||||
|
||||
cont=
|
||||
endtime=
|
||||
while [ " $1" != " --" ]
|
||||
do
|
||||
case $1 in
|
||||
--help )
|
||||
echo >&2 'Usage: mdcheck [--continue] [--duration time-offset]'
|
||||
echo >&2 ' time-offset must be understood by "date --date"'
|
||||
exit 0
|
||||
;;
|
||||
--continue ) cont=yes ;;
|
||||
--duration ) shift; dur=$1
|
||||
endtime=$(date --date "$dur" "+%s")
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
# We need a temp file occasionally...
|
||||
tmp=/var/lib/mdcheck/.md-check-$$
|
||||
trap 'rm -f "$tmp"' 0 2 3 15
|
||||
|
||||
|
||||
# firstly, clean out really old state files
|
||||
mkdir -p /var/lib/mdcheck
|
||||
find /var/lib/mdcheck -name "MD_UUID*" -type f -mtime +180 -exec rm {} \;
|
||||
|
||||
# Now look at each md device.
|
||||
cnt=0
|
||||
for dev in /dev/md?*
|
||||
do
|
||||
[ -e "$dev" ] || continue
|
||||
sys=`sysname $dev`
|
||||
if [ ! -f "$sys/md/sync_action" ]
|
||||
then # cannot check this array
|
||||
continue
|
||||
fi
|
||||
if [ "`cat $sys/md/sync_action`" != 'idle' ]
|
||||
then # This array is busy
|
||||
continue
|
||||
fi
|
||||
|
||||
mdadm --detail --export "$dev" | grep '^MD_UUID=' > $tmp || continue
|
||||
source $tmp
|
||||
fl="/var/lib/mdcheck/MD_UUID_$MD_UUID"
|
||||
if [ -z "$cont" ]
|
||||
then
|
||||
start=0
|
||||
logger -p daemon.info mdcheck start checking $dev
|
||||
elif [ -z "$MD_UUID" -o ! -f "$fl" ]
|
||||
then
|
||||
# Nothing to continue here
|
||||
continue
|
||||
else
|
||||
start=`cat "$fl"`
|
||||
logger -p daemon.info mdcheck continue checking $dev from $start
|
||||
fi
|
||||
|
||||
cnt=$[cnt+1]
|
||||
eval MD_${cnt}_fl=\$fl
|
||||
eval MD_${cnt}_sys=\$sys
|
||||
eval MD_${cnt}_dev=\$dev
|
||||
echo $start > $fl
|
||||
echo $start > $sys/md/sync_min
|
||||
echo check > $sys/md/sync_action
|
||||
done
|
||||
|
||||
if [ -z "$endtime" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while [ `date +%s` -lt $endtime ]
|
||||
do
|
||||
any=
|
||||
for i in `eval echo {1..$cnt}`
|
||||
do
|
||||
eval fl=\$MD_${i}_fl
|
||||
eval sys=\$MD_${i}_sys
|
||||
|
||||
if [ -z "$fl" ]; then continue; fi
|
||||
|
||||
if [ "`cat $sys/md/sync_action`" != 'check' ]
|
||||
then
|
||||
eval MD_${i}_fl=
|
||||
rm -f $fl
|
||||
continue;
|
||||
fi
|
||||
read a rest < $sys/md/sync_completed
|
||||
echo $a > $fl
|
||||
any=yes
|
||||
done
|
||||
if [ -z "$any" ]; then exit 0; fi
|
||||
sleep 120
|
||||
done
|
||||
|
||||
# We've waited, and there are still checks running.
|
||||
# Time to stop them.
|
||||
for i in `eval echo {1..$cnt}`
|
||||
do
|
||||
eval fl=\$MD_${i}_fl
|
||||
eval sys=\$MD_${i}_sys
|
||||
eval dev=\$MD_${i}_dev
|
||||
|
||||
if [ -z "$fl" ]; then continue; fi
|
||||
|
||||
if [ "`cat $sys/md/sync_action`" != 'check' ]
|
||||
then
|
||||
eval MD_${i}_fl=
|
||||
rm -f $fl
|
||||
continue;
|
||||
fi
|
||||
echo idle > $sys/md/sync_action
|
||||
cat $sys/md/sync_min > $fl
|
||||
logger -p daemon.info pause checking $dev at `cat $fl`
|
||||
done
|
|
@ -1,118 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# mdmonitor This starts, stops, and reloads the mdadm-based
|
||||
# software RAID monitoring and management facility
|
||||
#
|
||||
# chkconfig: 2345 15 85
|
||||
# description: software RAID monitoring and management
|
||||
# config: /etc/mdadm.conf
|
||||
#
|
||||
# Copyright 2002 Red Hat, Inc.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start and stop the MD software RAID monitor
|
||||
# Description: The mdmonitor service checks the status of all software
|
||||
# RAID arrays on the system. In the event that any of the arrays
|
||||
# transition into a degraded state, it notifies the system
|
||||
# administrator. Other options are available, see the mdadm.conf
|
||||
# and mdadm man pages for possible ways to configure this service.
|
||||
### END INIT INFO
|
||||
|
||||
PIDPATH=/var/run/mdadm
|
||||
PIDFILE=/var/run/mdadm/mdadm.pid
|
||||
PATH=/sbin:/usr/sbin:$PATH
|
||||
RETVAL=0
|
||||
OPTIONS="--monitor --scan -f --pid-file=$PIDFILE"
|
||||
|
||||
prog=mdmonitor
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: service $prog {start|stop|status|restart|try-restart|force-reload}"
|
||||
RETVAL=1
|
||||
}
|
||||
|
||||
|
||||
start ()
|
||||
{
|
||||
# (Re)start mdmon to take over monitoring of mdmon started from the initrd
|
||||
for i in /dev/md/*.pid; do
|
||||
if [ -r $i ]; then
|
||||
origprog="$prog"; prog="mdmon"
|
||||
action $"Starting $prog: " /sbin/mdmon --takeover --all
|
||||
prog="$origprog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# Make sure configuration file exists and has information we can use
|
||||
# MAILADDR or PROGRAM or both must be set in order to run mdadm --monitor
|
||||
[ -f /etc/mdadm.conf ] || return 6
|
||||
grep '^\(MAILADDR\|PROGRAM\) .' /etc/mdadm.conf >/dev/null 2>&1 || return 6
|
||||
# Create our directory if it isn't there yet
|
||||
if [ ! -d $PIDPATH ]; then
|
||||
mkdir -m 0700 $PIDPATH >&/dev/null
|
||||
RC=$?
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon $PIDPATH
|
||||
if [ $RC -ne 0 ]; then
|
||||
echo -n "Failed to create /var/run/mdadm"
|
||||
failure
|
||||
echo
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
checkpid `cat $PIDFILE` && return 0
|
||||
fi
|
||||
echo -n $"Starting $prog: "
|
||||
cd /
|
||||
daemon --user=root mdadm ${OPTIONS}
|
||||
ret=$?
|
||||
[ $ret -eq "0" ] && touch /var/lock/subsys/$prog
|
||||
echo
|
||||
return $ret
|
||||
}
|
||||
|
||||
stop ()
|
||||
{
|
||||
[ -f /var/lock/subsys/$prog ] || return 0
|
||||
echo -n "Killing $prog: "
|
||||
killproc mdadm
|
||||
echo
|
||||
rm -f $PIDFILE
|
||||
rm -f /var/lock/subsys/$prog
|
||||
}
|
||||
|
||||
restart ()
|
||||
{
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
condrestart ()
|
||||
{
|
||||
[ -e /var/lock/subsys/$prog ] && restart || return 0
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|condrestart|try-restart|force-reload)
|
||||
[ `id -u` != "0" ] && exit 4 ;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
start) start; RETVAL=$? ;;
|
||||
stop) stop; RETVAL=$? ;;
|
||||
status) status -p $PIDFILE $prog ; RETVAL=$? ;;
|
||||
restart) restart; RETVAL=$? ;;
|
||||
reload) RETVAL=3 ;;
|
||||
condrestart|try-restart|force-reload) condrestart; RETVAL=$? ;;
|
||||
*) usage ; RETVAL=2 ;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
|
@ -4,9 +4,9 @@ ConditionPathExists=/etc/mdadm.conf
|
|||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/run/mdadm/mdadm.pid
|
||||
PIDFile=/run/mdadm/mdadm.pid
|
||||
EnvironmentFile=-/etc/sysconfig/mdmonitor
|
||||
ExecStart=/sbin/mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
|
||||
ExecStart=/sbin/mdadm --monitor --scan --syslog -f --pid-file=/run/mdadm/mdadm.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=RAID setup health check
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/raid-check
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Weekly RAID setup health check
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Sun *-*-* 01:00:00
|
||||
Persistent=true
|
||||
AccuracySec=24h
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
356
SPECS/mdadm.spec
356
SPECS/mdadm.spec
|
@ -1,19 +1,20 @@
|
|||
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
||||
Name: mdadm
|
||||
Version: 4.2
|
||||
# extraversion is used to define rhel internal version
|
||||
%define extraversion 7
|
||||
%define extraversion 8
|
||||
Release: %{extraversion}%{?dist}
|
||||
Summary: The mdadm program controls Linux md devices (software RAID arrays)
|
||||
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
||||
License: GPLv2+
|
||||
|
||||
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}%{?subversion:-%{subversion}}.tar.xz
|
||||
Source1: mdmonitor.init
|
||||
Source2: raid-check
|
||||
Source3: mdadm-raid-check-sysconfig
|
||||
Source4: mdadm-cron
|
||||
Source5: mdmonitor.service
|
||||
Source6: mdadm.conf
|
||||
Source7: mdadm_event.conf
|
||||
Source8: mdcheck
|
||||
Source9: mdadm_env.sh
|
||||
Source1: raid-check
|
||||
Source2: mdadm-raid-check-sysconfig
|
||||
Source3: mdmonitor.service
|
||||
Source4: mdadm.conf
|
||||
Source5: mdadm_event.conf
|
||||
Source6: raid-check.timer
|
||||
Source7: raid-check.service
|
||||
|
||||
Patch000: 0001-Unify-error-message.patch
|
||||
Patch001: 0002-mdadm-Fix-double-free.patch
|
||||
|
@ -99,25 +100,19 @@ Patch079: 0081-incremental-manage-do-not-verify-if-remove-is-safe.patch
|
|||
Patch080: 0082-super-intel-make-freesize-not-required-for-chunk-siz.patch
|
||||
Patch081: 0083-manage-move-comment-with-function-description.patch
|
||||
|
||||
# RHEL customization patches
|
||||
# Fedora customization patches
|
||||
|
||||
Patch200: mdadm-udev.patch
|
||||
Patch201: mdadm-2.5.2-static.patch
|
||||
# Build without -Werror.
|
||||
Patch202: disable-Werror.patch
|
||||
|
||||
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Obsoletes: mdctl,raidtools
|
||||
Obsoletes: mdadm-sysvinit
|
||||
Conflicts: dracut < 034-1
|
||||
Requires(post): systemd-units chkconfig coreutils
|
||||
BuildRequires: systemd-units binutils-devel systemd-devel
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units coreutils
|
||||
BuildRequires: make
|
||||
BuildRequires: systemd-rpm-macros binutils-devel gcc systemd-devel
|
||||
Requires: libreport-filesystem
|
||||
|
||||
%define _hardened_build 1
|
||||
Requires(post): systemd coreutils
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd coreutils
|
||||
|
||||
%description
|
||||
The mdadm program is used to create, manage, and monitor Linux MD (software
|
||||
|
@ -127,284 +122,173 @@ almost all functions without a configuration file, though a configuration
|
|||
file can be used to help with some common tasks.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?subversion:_%{subversion}}
|
||||
|
||||
%patch000 -p1 -b .0001
|
||||
%patch001 -p1 -b .0002
|
||||
%patch002 -p1 -b .0003
|
||||
%patch003 -p1 -b .0004
|
||||
%patch004 -p1 -b .0005
|
||||
%patch005 -p1 -b .0006
|
||||
%patch006 -p1 -b .0007
|
||||
%patch007 -p1 -b .0008
|
||||
%patch008 -p1 -b .0009
|
||||
%patch009 -p1 -b .0010
|
||||
%patch010 -p1 -b .0011
|
||||
%patch011 -p1 -b .0013
|
||||
%patch012 -p1 -b .0014
|
||||
%patch013 -p1 -b .0015
|
||||
%patch014 -p1 -b .0016
|
||||
%patch015 -p1 -b .0017
|
||||
%patch016 -p1 -b .0018
|
||||
%patch017 -p1 -b .0019
|
||||
%patch018 -p1 -b .0020
|
||||
%patch019 -p1 -b .0021
|
||||
%patch020 -p1 -b .0022
|
||||
%patch021 -p1 -b .0023
|
||||
%patch022 -p1 -b .0024
|
||||
%patch023 -p1 -b .0025
|
||||
%patch024 -p1 -b .0026
|
||||
%patch025 -p1 -b .0027
|
||||
%patch026 -p1 -b .0028
|
||||
%patch027 -p1 -b .0029
|
||||
%patch028 -p1 -b .0030
|
||||
%patch029 -p1 -b .0031
|
||||
%patch030 -p1 -b .0032
|
||||
%patch031 -p1 -b .0033
|
||||
%patch032 -p1 -b .0034
|
||||
%patch033 -p1 -b .0035
|
||||
%patch034 -p1 -b .0036
|
||||
%patch035 -p1 -b .0037
|
||||
%patch036 -p1 -b .0038
|
||||
%patch037 -p1 -b .0039
|
||||
%patch038 -p1 -b .0040
|
||||
%patch039 -p1 -b .0041
|
||||
%patch040 -p1 -b .0042
|
||||
%patch041 -p1 -b .0043
|
||||
%patch042 -p1 -b .0044
|
||||
%patch043 -p1 -b .0045
|
||||
%patch044 -p1 -b .0046
|
||||
%patch045 -p1 -b .0047
|
||||
%patch046 -p1 -b .0048
|
||||
%patch047 -p1 -b .0049
|
||||
%patch048 -p1 -b .0050
|
||||
%patch049 -p1 -b .0051
|
||||
%patch050 -p1 -b .0052
|
||||
%patch051 -p1 -b .0053
|
||||
%patch052 -p1 -b .0054
|
||||
%patch053 -p1 -b .0055
|
||||
%patch054 -p1 -b .0056
|
||||
%patch055 -p1 -b .0057
|
||||
%patch056 -p1 -b .0058
|
||||
%patch057 -p1 -b .0059
|
||||
%patch058 -p1 -b .0060
|
||||
%patch059 -p1 -b .0061
|
||||
%patch060 -p1 -b .0062
|
||||
%patch061 -p1 -b .0063
|
||||
%patch062 -p1 -b .0064
|
||||
%patch063 -p1 -b .0065
|
||||
%patch064 -p1 -b .0066
|
||||
%patch065 -p1 -b .0067
|
||||
%patch066 -p1 -b .0068
|
||||
%patch067 -p1 -b .0069
|
||||
%patch068 -p1 -b .0070
|
||||
%patch069 -p1 -b .0071
|
||||
%patch070 -p1 -b .0072
|
||||
%patch071 -p1 -b .0073
|
||||
%patch072 -p1 -b .0074
|
||||
%patch073 -p1 -b .0075
|
||||
%patch074 -p1 -b .0076
|
||||
%patch075 -p1 -b .0077
|
||||
%patch076 -p1 -b .0078
|
||||
%patch077 -p1 -b .0079
|
||||
%patch078 -p1 -b .0080
|
||||
%patch079 -p1 -b .0081
|
||||
%patch080 -p1 -b .0082
|
||||
%patch081 -p1 -b .0083
|
||||
|
||||
# RHEL customization patches
|
||||
%patch200 -p1 -b .udev
|
||||
%patch201 -p1 -b .static
|
||||
%patch202 -p1 -b .disable
|
||||
%autosetup -p1 -n %{name}-%{version}%{?subversion:_%{subversion}}
|
||||
|
||||
%build
|
||||
#If extraversion is defined, add EXTRAVERSION="%{extraversion}"
|
||||
make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" SYSCONFDIR="%{_sysconfdir}" EXTRAVERSION="%{extraversion}" mdadm mdmon
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} install install-systemd
|
||||
install -Dp -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/raid-check
|
||||
install -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/raid-check
|
||||
install -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/cron.d/raid-check
|
||||
mkdir -p -m 710 %{buildroot}/var/run/mdadm
|
||||
mkdir -p -m 700 %{buildroot}/usr/share/mdadm
|
||||
mkdir -p -m 700 %{buildroot}/usr/lib/mdadm
|
||||
install -Dp -m 755 %{SOURCE8} %{buildroot}/usr/share/mdadm/mdcheck
|
||||
install -Dp -m 755 %{SOURCE9} %{buildroot}/usr/lib/mdadm/mdadm_env.sh
|
||||
make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} UDEVDIR=/usr/lib/udev/ install install-systemd
|
||||
install -Dp -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/raid-check
|
||||
install -Dp -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/raid-check
|
||||
mkdir -p -m 710 %{buildroot}/run/mdadm
|
||||
|
||||
# systemd
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE5} %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE6} %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE7} %{buildroot}%{_unitdir}
|
||||
|
||||
# tmpfile
|
||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
install -m 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
mkdir -p %{buildroot}%{_localstatedir}/run/
|
||||
install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
|
||||
install -d -m 0710 %{buildroot}/run/%{name}/
|
||||
|
||||
# abrt
|
||||
mkdir -p %{buildroot}/etc/libreport/events.d
|
||||
install -m644 %{SOURCE7} %{buildroot}/etc/libreport/events.d
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d
|
||||
|
||||
%post
|
||||
%systemd_post mdmonitor.service
|
||||
/usr/bin/systemctl disable mdmonitor-takeover.service >/dev/null 2>&1 || :
|
||||
%systemd_post mdmonitor.service raid-check.timer
|
||||
%{_bindir}/systemctl disable mdmonitor-takeover.service >/dev/null 2>&1 || :
|
||||
|
||||
%preun
|
||||
%systemd_preun mdmonitor.service
|
||||
%systemd_preun mdmonitor.service raid-check.timer
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart mdmonitor.service
|
||||
|
||||
%triggerun -- %{name} < 3.2.2-3
|
||||
%{_bindir}/systemd-sysv-convert --save mdmonitor >/dev/null 2>&1 || :
|
||||
/bin/systemctl --no-reload enable mdmonitor.service >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del mdmonitor >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart mdmonitor.service >/dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc TODO ChangeLog mdadm.conf-example COPYING misc/*
|
||||
%license COPYING
|
||||
%doc mdadm.conf-example misc/*
|
||||
%{_udevrulesdir}/*
|
||||
%{_sbindir}/*
|
||||
%{_unitdir}/*
|
||||
%{_mandir}/man*/md*
|
||||
/usr/lib/systemd/system-shutdown/*
|
||||
%config(noreplace) %{_sysconfdir}/cron.d/*
|
||||
%{_prefix}/lib/systemd/system-shutdown/*
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/*
|
||||
%dir %{_localstatedir}/run/%{name}/
|
||||
%dir /run/%{name}/
|
||||
%config(noreplace) %{_tmpfilesdir}/%{name}.conf
|
||||
/etc/libreport/events.d/*
|
||||
/usr/share/mdadm/mdcheck
|
||||
/usr/lib/mdadm/mdadm_env.sh
|
||||
|
||||
%changelog
|
||||
* Fri Jan 6 2023 Xiao Ni <xni@redhat.com> - 4.2-7
|
||||
- Update to latest to upstream to fix some bugs
|
||||
- Resolves rhbz#2149307, rhbz#2149473, rhbz#2151208, rhbz#2127096
|
||||
* Fri Jan 6 2023 Xiao Ni <xni@redhat.com> - 4.2-8
|
||||
- Update to latest upstream
|
||||
- Resolves rhbz#2127101, rhbz#2139789, rhbz#2149292, rhbz#2151209, rhbz#2148945
|
||||
|
||||
* Thu Sep 8 2022 Xiao Ni <xni@redhat.com> - 4.2-6
|
||||
- Keep udev rule close to upstream and update to latest upstream
|
||||
- Resolves rhbz#1991596, rhbz#2129088, rhbz#2107150
|
||||
* Tue Nov 15 2022 Xiao Ni <xni@redhat.com> - 4.2-7
|
||||
- Update to latest upstream and keep udev rule close to upstream
|
||||
- Resolves rhbz#2107147, rhbz#2129087, rhbz#2126428
|
||||
|
||||
* Mon Sep 5 2022 Xiao Ni <xni@redhat.com> - 4.2-6
|
||||
- Add ddf auto-assemble in mdadm udev rule
|
||||
- Resolves rhbz#2120690
|
||||
|
||||
* Thu Aug 25 2022 Xiao Ni <xni@redhat.com> - 4.2-5
|
||||
- Update mdadm to latest upstream
|
||||
- Resolves rhbz#2092326
|
||||
- Update to latest upstream
|
||||
- Resolves rhbz#2092330
|
||||
|
||||
* Sun Aug 07 2022 Xiao Ni <xni@redhat.com> - 4.2-4
|
||||
- Add KillMode=none to mdmon systemd service again
|
||||
- Resolves rhbz#2109397
|
||||
* Wed Aug 10 2022 Xiao Ni <xni@redhat.com> - 4.2-4
|
||||
- Add Killmode=none for mdmon systemd service again
|
||||
- Resolves rhbz#2109042
|
||||
|
||||
* Mon May 30 2022 Xiao Ni <xni@redhat.com> - 4.2-3
|
||||
- Update mdadm to latest upstream
|
||||
- Resolves rhbz#2052563, rhbz#1991596
|
||||
- Resolves rhbz#2052029, rhbz#1974184
|
||||
|
||||
* Thu Feb 24 2022 Xiao Ni <xni@redhat.com> - 4.2-2
|
||||
- mdadm re-add fault/removed disk failed
|
||||
- Resolves rhbz#2046323
|
||||
- Resolves rhbz#2047567
|
||||
|
||||
* Fri Feb 18 2022 Xiao Ni <xni@redhat.com> - 4.2
|
||||
- Update to 4.2
|
||||
- Resolves rhbz#2034809
|
||||
* Fri Dec 31 2021 Xiao Ni <xni@redhat.com> - 4.2
|
||||
- Update to upstream 4.2
|
||||
- Resolves rhbz#2026723, rhbz#2026532, rhbz#1995587
|
||||
|
||||
* Mon Nov 08 2021 Xiao Ni <xni@redhat.com> - 4.2-rc3
|
||||
- Update to 4.2-rc3
|
||||
- Resolves rhbz#1983019, rhbz#1995582, rhbz#1972032, rhbz#1885665
|
||||
* Fri Aug 13 2021 Xiao Ni <xni@redhat.com> - 4.2-rc2_1.2
|
||||
- Fix gating test error and rpminspect error
|
||||
- Resolves rhbz#1870487, rhbz#1880529
|
||||
|
||||
* Thu Aug 05 2021 Xiao Ni <xni@redhat.com> - 4.2-rc2
|
||||
- Update to 4.2-rc2
|
||||
- Resolves rhbz#1989844
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.2-rc2_1.1
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Jul 23 2021 Xiao Ni <xni@redhat.com> - 4.2-rc1-4
|
||||
- Fix gating test failure
|
||||
- Resolves rhbz#1984335
|
||||
* Mon Aug 09 2021 Xiao Ni <xni@redhat.com> - 4.2-rc2_1
|
||||
- Update to mdadm-4.2-rc2
|
||||
- Resolves rhbz#1870487, rhbz#1880529
|
||||
|
||||
* Tue Jul 20 2021 Xiao Ni <xni@redhat.com> - 4.2-rc1-3
|
||||
- Fix super1.0 offset problem and super imsm bugs
|
||||
- Resolves rhbz#1966712 and rhbz#1975449
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.1-8
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Thu Jun 10 2021 Xiao Ni <xni@redhat.com> - 4.2-rc1-2
|
||||
- Fix udev rule syntax error
|
||||
- Resolves rhbz#1945780
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri May 07 2021 Xiao Ni <xni@redhat.com> - 4.2-rc1
|
||||
- Update to upstream 4.2-rc1
|
||||
- Resovles rhbz#1920384
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jan 11 2021 Xiao Ni <xni@redhat.com> - 4.1.15
|
||||
- Update to latest upstream
|
||||
- Resolves rhbz#1838005
|
||||
* Wed May 27 2020 Xiao Ni <xni@redhat.com> - 4.1-5
|
||||
- Don't enable raid-check.service to avoid raid check after every boot
|
||||
- Resolves bz1838409
|
||||
|
||||
* Fri Jun 05 2020 Xiao Ni <xni@redhat.com> - 4.1.14
|
||||
- Update to latest upstream
|
||||
- Resolves rhbz#1780501
|
||||
* Sun Mar 08 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 4.1-4
|
||||
- Fix install location of udev rules (rhbz 1809117)
|
||||
|
||||
* Fri Feb 28 2020 Xiao Ni <xni@redhat.com> - 4.1.13
|
||||
- Remove the unnecessary whitespace in .service file
|
||||
- Resolves rhbz#1803470
|
||||
* Fri Feb 07 2020 Alejandro Domínguez Muñoz <adomu@net-c.com> - 4.1-3
|
||||
- Replace raid-check cron job with systemd timer
|
||||
|
||||
* Tue Feb 11 2020 Xiao Ni <xni@redhat.com> - 4.1.12
|
||||
- Update mdadm to latest upstream && change tmpfiles directory && correct changelog date
|
||||
- Resolves rhbz#1800521 and rhbz#1657265
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sun Feb 09 2020 Xiao Ni <xni@redhat.com> - 4.1.11
|
||||
- mdcheck start service can't start
|
||||
- Resolves rhbz#1769823
|
||||
* Mon Jan 13 2020 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-1
|
||||
- Update to 4.1 GA
|
||||
- Spec cleanups and updates
|
||||
- Update mdadm.pid location (rhbz 1701114, rhbz 1557623, rhbz 1557623)
|
||||
|
||||
* Fri Nov 15 2019 Xiao Ni <xni@redhat.com> - 4.1.10
|
||||
- Update mdadm to latest upstream
|
||||
- Resolves rhbz#1721937
|
||||
* Sun Dec 15 2019 Julian Sikorski <belegdol@fedoraproject.org> - 4.1-rc2.0.5.2
|
||||
- Fix invalid substitution type error
|
||||
- Resolves bz1740662, bz1749859
|
||||
|
||||
* Wed Jul 10 2019 Xiao Ni <xni@redhat.com> - 4.1.9
|
||||
- Add --incremental for ddf member disk in udev rule
|
||||
- Resolves rhbz#1693583
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-rc2.0.5.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jun 13 2019 Xiao Ni <xni@redhat.com> - 4.1.8
|
||||
- Update to latest upstream
|
||||
- Resolves rhbz#1661203
|
||||
* Tue Jun 04 2019 Xiao Ni <xni@redhat.com> - 4.1-rc2.0.5
|
||||
- Update tmpfiles directory to non-legacy location
|
||||
- Resolves bz1704517
|
||||
|
||||
* Wed Jun 12 2019 Xiao Ni <xni@redhat.com> - 4.1.7
|
||||
- Fix gating test error
|
||||
- Resolves rhbz#1682396
|
||||
* Wed Apr 17 2019 Xiao Ni <xni@redhat.com> - 4.1-rc2.0.4
|
||||
- Change tmpfiles directory to /run/mdadm
|
||||
- Resovles bz1701821
|
||||
|
||||
* Thu May 23 2019 Xiao Ni <xni@redhat.com> - 4.1.6
|
||||
- Enable raid5 journal
|
||||
- Resolves rhbz#1691202
|
||||
* Sat Mar 16 2019 Björn Esser <besser82@fedoraproject.org> - 4.1-rc2.0.3
|
||||
- Add patch to build without -Werror, fixes FTBFS (#1675363)
|
||||
|
||||
* Fri Apr 12 2019 Xiao Ni <xni@redhat.com> - 4.1.5
|
||||
- add gating tests
|
||||
- Resolves rhbz#1682396
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-rc2.0.2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jan 11 2019 Xiao Ni <xni@redhat.com> - 4.1.4
|
||||
- Disable raid5 journal
|
||||
- Resolves rhbz#1664961
|
||||
* Thu Sep 13 2018 Adam Williamson <awilliam@redhat.com> - 4.1-rc2.0.2
|
||||
- Fix multipath check in udev rule, broke array init in F29
|
||||
- Resolves bz1628192
|
||||
|
||||
* Fri Dec 21 2018 Xiao Ni <xni@redhat.com> - 4.1.3
|
||||
- Recovery isn't noticed while raid10 double degradation
|
||||
- Resolves rhbz#1654482
|
||||
* Sun Aug 26 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-rc2.0.1
|
||||
- Update to 4.1 rc2
|
||||
|
||||
* Wed Dec 12 2018 Xiao Ni <xni@redhat.com> - 4.1.2
|
||||
- Add warning message for using raid1 cluster
|
||||
- Resolves rhbz#1654482
|
||||
* Fri Jul 20 2018 Xiao Ni <xni@redhat.com> - 4.1-rc1_1.2
|
||||
- Add gcc into BuildRequires
|
||||
- Resolves bz1604811
|
||||
|
||||
* Fri Oct 26 2018 Xiao Ni <xni@redhat.com> - 4.1.1
|
||||
- Update to upstream 4.1
|
||||
- Resolves rhbz#1642206
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-rc1_1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Oct 24 2018 Xiao Ni <xni@redhat.com> - 4.1-rc1-3
|
||||
- Can't find md device when install rhel8
|
||||
- Resolves rhbz#1628774
|
||||
* Mon Jul 09 2018 Xiao Ni <xni@redhat.com> 4.1-rc1-1
|
||||
- Update to latest upstream version 4.1-rc1
|
||||
- Resolves bz1556591
|
||||
|
||||
* Wed Jul 4 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.0-7
|
||||
- Cleanup spec, use %%licenece, drop old sys-v migration bits
|
||||
|
||||
* Thu Aug 16 2018 Xiao Ni <xni@redhat.com> - 4.1-rc1-2
|
||||
- Fix two IMSM bugs
|
||||
- Resolves rhbz#1602420 and rhbz#1602422
|
||||
|
||||
* Fri Jun 22 2018 Xiao Ni <xni@redhat.com> - 4.1-rc1-1
|
||||
- Upgrade to upstream mdadm-4.1-rc1
|
||||
- Resolves rhbz#1493605 and rhbz#1494477 and rhbz#1502118
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
|
Loading…
Reference in New Issue