Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63041 - initial ebuild for dmraid
Summary: initial ebuild for dmraid
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: EBUILD
: 66431 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-06 12:45 UTC by Martin Scherer
Modified: 2005-08-03 08:40 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dmraid ebuild (dmraid-1.0.0_rc3.ebuild,1.69 KB, text/plain)
2004-09-06 12:46 UTC, Martin Scherer
Details
dmraid 1.0.0_rc4 ebuild (dmraid-1.0.0_rc4.ebuild,1.64 KB, text/plain)
2004-09-13 17:37 UTC, Andrew Resch
Details
dmraid-1.0.0_rc5.ebuild (dmraid-1.0.0_rc5.ebuild,1.65 KB, application/octet-stream)
2004-12-01 15:33 UTC, Richard Westwell
Details
dmraid-1.0.0_rc6.ebuild (dmraid-1.0.0_rc6.ebuild,1.65 KB, text/plain)
2005-03-02 16:36 UTC, Richard Westwell
Details
dmraid rc-script (dmraid,342 bytes, text/plain)
2005-03-06 06:54 UTC, Martin Scherer
Details
installscript dmraid-rc (install-dmraidrc.sh,422 bytes, text/plain)
2005-03-07 11:03 UTC, Martin Scherer
Details
Ebuild for dmraid / 1.0.0_rc6-r1.ebuild (dmraid-1.0.0_rc6-r1.ebuild,1.55 KB, text/plain)
2005-03-14 16:25 UTC, Gerte Hoogewerf
Details
Dmraid 1.0.0-rc7 please include into portage (dmraid-1.0.0_rc7.ebuild,1.55 KB, text/plain)
2005-04-13 00:50 UTC, Gerte Hoogewerf
Details
dmraid-1.0.0_rc7.ebuild (dmraid-1.0.0_rc7.ebuild,1.52 KB, text/plain)
2005-04-23 02:32 UTC, Stefan Schweizer (RETIRED)
Details
dmraid-1.0.0_rc8.ebuild (dmraid-1.0.0_rc8.ebuild,1.62 KB, text/plain)
2005-05-23 16:54 UTC, Gerte Hoogewerf
Details
dmraid-1.0.0_rc8-r1.ebuild (dmraid-1.0.0_rc8-r1.ebuild,1.69 KB, text/plain)
2005-06-19 06:59 UTC, Richard Westwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Scherer 2004-09-06 12:45:20 UTC
dmraid is not yet present it portage, so i wrote a little ebuild for it.

Reproducible: Couldn't Reproduce
Steps to Reproduce:




# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: dmraid-1.0.0_rc3.ebuild,v 1.0 2004/09/06 20:00:00 assl0r Exp $

inherit flag-o-matic

IUSE=""

DESCRIPTION="dmraid (Device-mapper RAID tool and library)"

SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-1.0.0-rc3.tar.bz2"

HOMEPAGE="http://people.redhat.com/~heinzm/"

LICENSE="GPL-1"

DEPEND="~sys-libs/device-mapper-1.00.17-r1"

RDEPEND=${DEPEND}

SLOT=0

KEYWORDS="x86"


pkg_setup() {
	if [ ! `echo ${KV} | grep 2\.[56]\.` ]; then
		eerror "You are using kernel version ${KV}"
		eerror "This makes only sense for the 2.6.* kernel-branch"
		eerror "so stopping the merge!"
		die
	fi
}

src_compile() {
	#inlining doesnt seem to work for dmraid
	ewarn "******************************************"
	ewarn "*  dmraid does not support -fno-inlining *"
	ewarn "*  so removing the flag!                 *"
	ewarn "******************************************"
	filter-flags -fno-inline
	cd ${WORKDIR}/dmraid/1.0.0-rc3
	econf || die "can not configure"
	make -s || die "make failed"
}

src_install () {
	#make install doesnt work! (fucked up makefile or whatever
	cd ${WORKDIR}/dmraid/1.0.0-rc3
	dosbin tools/dmraid
	dolib.a lib/*.a
	#dolib.so lib/*.so
	dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
	doman man/*.8
}

pkg_postinst() {
	ewarn "*******************************************************************"
	ewarn "This is Alpha software and it can destroy your data!"
	ewarn "So please take backups and start accessing your data in dmraid"
	ewarn "activated ATARAID sets READ-ONLY first before you try to write it!"
	ewarn "*******************************************************************"
}
Comment 1 Martin Scherer 2004-09-06 12:46:36 UTC
Created attachment 39087 [details]
dmraid ebuild
Comment 2 Andrew Resch 2004-09-13 17:37:57 UTC
Created attachment 39546 [details]
dmraid 1.0.0_rc4 ebuild

bumped the version and made a few small changes to the ebuild.
Comment 3 Richard Westwell 2004-12-01 15:33:12 UTC
Created attachment 45094 [details]
dmraid-1.0.0_rc5.ebuild

New version now available rc5f
I think this now works with the VIA VT8237 (tried with Raid 0 so far)
Comment 4 Daniel Webert 2005-02-03 16:17:03 UTC
*** Bug 66431 has been marked as a duplicate of this bug. ***
Comment 5 Richard Westwell 2005-03-02 16:36:47 UTC
Created attachment 52513 [details]
dmraid-1.0.0_rc6.ebuild

I was wrong about the rc5 version picking up the VIA chipset (it was instead
picking up metadata written from a second pdc chipset on the same motherboard
which was weird)

but the rc6 version does now appear to properly support VIA
Comment 6 Martin Scherer 2005-03-06 06:52:09 UTC
Hi folks,

i were trying to write a runscript which activates the raid sets _before_ localmount gets started (i have entered my raid partitions in fstab). But i didn't get the clue..

depend() {
   before localmount
}

this doesnt seem to work.. dmraid comes up very late..


i was searching for this behavior in the rc-script depency generation methods..
the one who is searching for something will find something *thumbs up*

there exists a CRITICAL_SERVICES variable in /sbin/rc which stores servicenames which are
critical during the init process.

now i know why it seems to be impossible to get dmraid started before the critical service "localmount"

but the gentoo init developers are masterminds ;))
they have included an configuration interface /etc/runlevels/$BOOTLEVEL/.critical

so i put the services which gets declared as critical by default if the .critical file doesnt exits and put my dmraid initscript before localmount

the file looks now like this:
root@area51 root # cat /etc/runlevels/boot/.critical
checkroot dmraid hostname modules checkfs localmount

see the atttachment for my init-script

ive tested it.. booted into single user mode and dmraid cames up before localmount

i want to thank the init-script "framework" =) developers for their config interface of critical services (its a little bit hidden, but easy to find if u know where to look for it)
Comment 7 Martin Scherer 2005-03-06 06:54:51 UTC
Created attachment 52785 [details]
dmraid rc-script

This is a little dmraid run-script helping to get raid-partitions mounted with
localmount (from /etc/fstab) at boot time 

Finally there is no need to hack the localmount script ;-)

Please read my comment too.. there a needed informations about getting this to
work!

Enjoy!
Comment 8 Martin Scherer 2005-03-07 11:03:33 UTC
Created attachment 52862 [details]
installscript dmraid-rc

for the lazy people.. plz give me feedback per mail or as comment for the
folks!
Comment 9 Gerte Hoogewerf 2005-03-14 16:25:13 UTC
Created attachment 53472 [details]
Ebuild for dmraid / 1.0.0_rc6-r1.ebuild

This patch can be used to build dmraid and libdmraid. Feel free to
include/enhance.
Comment 10 Gerte Hoogewerf 2005-03-14 16:28:10 UTC
Comment on attachment 53472 [details]
Ebuild for dmraid / 1.0.0_rc6-r1.ebuild

This is an ebuild to install (lib)dmraid. Feel free to include /enhance.
Comment 11 Eugene Gluzberg 2005-04-03 21:01:43 UTC
These init script will not be enough, we need to get something to support dmraid in udev as well...

When I mount my root fs from dmraid it compaints about /dev/mapper/sil devices not being there...

To get my whole config to boot I had to change /sbin/rc in populate_udev function i had to:

mount -t devfs none /devfs
ln -snf /devfs/mapper/sil* /dev/mapper

Comment 12 Richard Westwell 2005-04-07 16:30:38 UTC
It's not a dmraid issue, it's due to udev not mapping out device-mapper nodes correctly
I had a similar problem when using evms with udev as this uses device-mapper as well
the fix is just to use an additional rule / script within udev
see here: http://forums.gentoo.org/viewtopic-t-263996-highlight-.html
Comment 13 Gerte Hoogewerf 2005-04-13 00:50:01 UTC
Created attachment 56148 [details]
Dmraid 1.0.0-rc7 please include into portage 

Here is an ebuild to be used to install dmraid on gentoo. Please include dmraid
into portage.
Comment 14 Eugene Gluzberg 2005-04-14 21:13:00 UTC
Richard, these udev mappings, would this be something we can include in the ebuild for dmraid, or would we nee to put these into the udev ebuild?
Comment 15 Dick Marinus 2005-04-22 12:56:21 UTC
the udev rules are already present in /etc/udev/rules.d/40-multipath.rules (from sys-fs/multipath-tools)
Comment 16 Eugene Gluzberg 2005-04-22 18:37:42 UTC
installing multipath-tools still did not fix the problem for me. The /dev/mappper/sil devices still do not appear in udev. Do i need to compile device mapper as modules? I have them compiled into the kernel. Do I need any other packages? 
Comment 17 Dick Marinus 2005-04-23 01:11:07 UTC
Eugene have you looked for /dev/sil_* ?
Comment 18 Richard Westwell 2005-04-23 02:04:45 UTC
In order for udev to map out device-mapper properly you first need a program that gives the name of the map based on the major / minor number
devmap_name within multipath-tools was one way of doing this in combination with a custom script and rule within udev
(i'd guess the script and rule is what your missing as the 40-multipath.rules doesn't have this)

but recently I've spotted that a newer version of dmsetup (1.00.21) can also do the same thing, it's a masked version but at least a masked ebuild is better than an unoffical ebuild
you'll still need to add in the /etc/udev/scripts/dmmapper.sh script and a rule into udev as well, the above link I posted before has details (scroll to the second post which is more recent)
Comment 19 Stefan Schweizer (RETIRED) gentoo-dev 2005-04-23 02:32:25 UTC
Created attachment 56976 [details]
dmraid-1.0.0_rc7.ebuild

Does this ebuild work? What is needed to support udev with it?
Comment 20 Dick Marinus 2005-04-23 02:55:22 UTC
Stefan Schweizer, sys-fs/multipath-tools gives me the udev devices, but dmraid creates them as well (when enabling the raid device)
Comment 21 Eugene Gluzberg 2005-05-18 20:50:37 UTC
(In reply to comment #17)
> Eugene have you looked for /dev/sil_* ?

Ah, they get there... this works, i don't need devfs now.

what about on boot, initrd seems to put them in /dev/mapper/
very confusing... multipath tools don't exist on boot.
Comment 22 Gerte Hoogewerf 2005-05-23 16:54:01 UTC
Created attachment 59666 [details]
dmraid-1.0.0_rc8.ebuild

Bumped previous dmraid ebuild. Included small buildfix. Now please include into
portage! There is really no reason to wait any longer!
Comment 23 Sebastian Steinmetz 2005-06-11 14:50:51 UTC
your ebuild doesn't work for me :-(
in the install phase it always breaks like this:

make[1]: Entering directory
`/var/tmp/portage/dmraid-1.0.0_rc8/work/dmraid/1.0.0.rc8/lib'
../lib/libdmraid.a ../lib/libdmraid.so  ../lib/libdmraid.so
Installing  ../lib/libdmraid.so in /var/tmp/portage/dmraid-1.0.0_rc8/image/usr/lib64
/bin/install: regul
Comment 24 Sebastian Steinmetz 2005-06-11 14:50:51 UTC
your ebuild doesn't work for me :-(
in the install phase it always breaks like this:

make[1]: Entering directory
`/var/tmp/portage/dmraid-1.0.0_rc8/work/dmraid/1.0.0.rc8/lib'
../lib/libdmraid.a ../lib/libdmraid.so  ../lib/libdmraid.so
Installing  ../lib/libdmraid.so in /var/tmp/portage/dmraid-1.0.0_rc8/image/usr/lib64
/bin/install: reguläre Datei
,,/var/tmp/portage/dmraid-1.0.0_rc8/image/usr/lib64/../lib/libdmraid.so.1.0.0.rc8"
kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
ln: Erzeugen der symbolischen Verknüpfung
,,/var/tmp/portage/dmraid-1.0.0_rc8/image/usr/lib64/../lib/libdmraid.so" zu
,,../lib/libdmraid.so.1.0.0.rc8": Datei oder Verzeichnis nicht gefunden
make[1]: *** [install_dmraid_libs] Fehler 1
make[1]: Leaving directory
`/var/tmp/portage/dmraid-1.0.0_rc8/work/dmraid/1.0.0.rc8/lib'
make: *** [lib.install] Fehler 2

i'm running gentoo on amd64 it seems that it has a problem with the different
lib directorys for 32 and 64 bits.
Comment 25 Richard Westwell 2005-06-19 06:59:57 UTC
Created attachment 61495 [details]
dmraid-1.0.0_rc8-r1.ebuild

this version should work with amd64
I had to replace econf with configure 
this way the installation directory is specified at the install stage instead
of the config stage, which seems to work
Comment 26 solar (RETIRED) gentoo-dev 2005-07-27 19:25:03 UTC
dmraid-1.0.0_rc8-r1.ebuild added to the tree with minor changes.
Comment 27 solar (RETIRED) gentoo-dev 2005-07-27 19:25:29 UTC
changing resolution to TEST-REQUEST
Comment 28 Bob Ketterhagen (RETIRED) gentoo-dev 2005-07-29 10:20:22 UTC
Works totally excellent on my promise PDC20378.
Please confirm other bios raid HW.
Comment 29 Martin Schlemmer (RETIRED) gentoo-dev 2005-08-03 08:40:14 UTC
If a rc-script is really needed, id rather have you guys do a dmraid addon
(emerge device-mapper, and look at /lib/rcscripts/addons/dm-start.sh) .. might
call it dmraid-start.sh and dmraid-stop.sh.  Then you just have to add it to
RC_VOLUME_ORDER in /etc/conf.d/rc ...