diff options
author | Pacho Ramos <pacho@gentoo.org> | 2014-04-13 08:42:21 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2014-04-13 08:42:21 +0000 |
commit | 98471fc1d1abb958f80cf8e6d172e3bfd45446c3 (patch) | |
tree | 52ab89d682e59bacbe33c5535ef3d3c5490bf0d7 /sys-fs | |
parent | Stable for x86, wrt bug #507526 (diff) | |
download | gentoo-2-98471fc1d1abb958f80cf8e6d172e3bfd45446c3.tar.gz gentoo-2-98471fc1d1abb958f80cf8e6d172e3bfd45446c3.tar.bz2 gentoo-2-98471fc1d1abb958f80cf8e6d172e3bfd45446c3.zip |
Fix unit file following policy and solving bug #507396 by Szymon Jaranowski
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/mdadm/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/mdadm/files/mdadm.service-r1 | 10 | ||||
-rw-r--r-- | sys-fs/mdadm/mdadm-3.3-r3.ebuild | 87 |
3 files changed, 104 insertions, 1 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog index 9d7e1fe2aa9d..c9545134de4d 100644 --- a/sys-fs/mdadm/ChangeLog +++ b/sys-fs/mdadm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/mdadm # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.175 2014/01/07 10:11:58 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.176 2014/04/13 08:42:21 pacho Exp $ + +*mdadm-3.3-r3 (13 Apr 2014) + + 13 Apr 2014; Pacho Ramos <pacho@gentoo.org> +files/mdadm.service-r1, + +mdadm-3.3-r3.ebuild: + Fix unit file following policy and solving bug #507396 by Szymon Jaranowski 07 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> -mdadm-3.1.4.ebuild, -mdadm-3.1.5.ebuild, -mdadm-3.2.3-r2.ebuild, -mdadm-3.2.5-r1.ebuild, diff --git a/sys-fs/mdadm/files/mdadm.service-r1 b/sys-fs/mdadm/files/mdadm.service-r1 new file mode 100644 index 000000000000..f8877cb83563 --- /dev/null +++ b/sys-fs/mdadm/files/mdadm.service-r1 @@ -0,0 +1,10 @@ +[Unit] +Description=Software RAID monitoring and management +ConditionPathExists=/etc/mdadm.conf + +[Service] +ExecStart=/sbin/mdadm --monitor --scan + +[Install] +WantedBy=multi-user.target + diff --git a/sys-fs/mdadm/mdadm-3.3-r3.ebuild b/sys-fs/mdadm/mdadm-3.3-r3.ebuild new file mode 100644 index 000000000000..65912965b8a6 --- /dev/null +++ b/sys-fs/mdadm/mdadm-3.3-r3.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.3-r3.ebuild,v 1.1 2014/04/13 08:42:21 pacho Exp $ + +EAPI="4" +inherit multilib flag-o-matic systemd toolchain-funcs + +DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools" +HOMEPAGE="http://neil.brown.name/blog/mdadm" +DEB_PR=2 +SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz + mirror://debian/pool/main/m/mdadm/${PN}_${PV}-${DEB_PR}.debian.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static" + +DEPEND="virtual/pkgconfig + app-arch/xz-utils" +RDEPEND=">=sys-apps/util-linux-2.16" + +# The tests edit values in /proc and run tests on software raid devices. +# Thus, they shouldn't be run on systems with active software RAID devices. +RESTRICT="test" + +mdadm_emake() { + emake \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + CC="$(tc-getCC)" \ + CWFLAGS="-Wall" \ + CXFLAGS="${CFLAGS}" \ + MAP_DIR=/run/mdadm \ + "$@" +} + +src_compile() { + use static && append-ldflags -static + mdadm_emake all mdassemble +} + +src_test() { + mdadm_emake test + + sh ./test || die +} + +src_install() { + emake \ + DESTDIR="${D}" \ + SYSTEMD_DIR=$(systemd_get_unitdir) \ + install install-systemd + into / + dosbin mdassemble + dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV} + + insinto /etc + newins mdadm.conf-example mdadm.conf + newinitd "${FILESDIR}"/mdadm.rc mdadm + newconfd "${FILESDIR}"/mdadm.confd mdadm + newinitd "${FILESDIR}"/mdraid.rc mdraid + newconfd "${FILESDIR}"/mdraid.confd mdraid + systemd_newunit "${FILESDIR}"/mdadm.service-r1 mdadm.service + + # From the Debian patchset + into /usr + dodoc "${WORKDIR}/debian/README.checkarray" + dosbin "${WORKDIR}/debian/checkarray" + + insinto /etc/cron.d + newins "${WORKDIR}"/debian/mdadm.cron.d mdadm + sed -i \ + -e 's:/usr/share/mdadm/checkarray:/usr/sbin/checkarray:g' \ + -e 's: root : :' \ + "${ED}"/etc/cron.d/mdadm || die +} + +pkg_postinst() { + if ! systemd_is_booted; then + if [[ -z ${REPLACING_VERSIONS} ]] ; then + # Only inform people the first time they install. + elog "If you're not relying on kernel auto-detect of your RAID" + elog "devices, you need to add 'mdraid' to your 'boot' runlevel:" + elog " rc-update add mdraid boot" + fi + fi +} |