Lines 3-9
Link Here
|
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.98.ebuild,v 1.3 2013/01/18 03:39:06 ssuominen Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.98.ebuild,v 1.3 2013/01/18 03:39:06 ssuominen Exp $ |
4 |
|
4 |
|
5 |
EAPI=5 |
5 |
EAPI=5 |
6 |
inherit eutils multilib toolchain-funcs autotools linux-info udev |
6 |
inherit eutils multilib toolchain-funcs autotools linux-info systemd udev |
7 |
|
7 |
|
8 |
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software." |
8 |
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software." |
9 |
HOMEPAGE="http://sources.redhat.com/lvm2/" |
9 |
HOMEPAGE="http://sources.redhat.com/lvm2/" |
Lines 14-20
Link Here
|
14 |
SLOT="0" |
14 |
SLOT="0" |
15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
16 |
|
16 |
|
17 |
IUSE="readline static static-libs clvm cman +lvm1 selinux +udev +thin" |
17 |
IUSE="readline static static-libs clvm cman +lvm1 lvmetad selinux systemd +udev +thin" |
18 |
|
18 |
|
19 |
DEPEND_COMMON="!!sys-fs/device-mapper |
19 |
DEPEND_COMMON="!!sys-fs/device-mapper |
20 |
readline? ( sys-libs/readline ) |
20 |
readline? ( sys-libs/readline ) |
Lines 177-182
Link Here
|
177 |
myconf="${myconf} --with-clvmd=none --with-cluster=none" |
177 |
myconf="${myconf} --with-clvmd=none --with-cluster=none" |
178 |
fi |
178 |
fi |
179 |
|
179 |
|
|
|
180 |
# better to just force the unit dir |
181 |
if use systemd; then |
182 |
myconf="${myconf} --with-systemdsystemunitdir=$(systemd_get_unitdir)" |
183 |
fi |
184 |
# and also change the default pid directory to /run instead of /var/run |
185 |
myconf="${myconf} --with-default-pid-dir=/run" |
186 |
|
180 |
local udevdir="${EPREFIX}/lib/udev/rules.d" |
187 |
local udevdir="${EPREFIX}/lib/udev/rules.d" |
181 |
use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d" |
188 |
use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d" |
182 |
|
189 |
|
Lines 207-217
Link Here
|
207 |
|
214 |
|
208 |
einfo "Starting main build" |
215 |
einfo "Starting main build" |
209 |
emake AR="$(tc-getAR)" || die "compile fail" |
216 |
emake AR="$(tc-getAR)" || die "compile fail" |
|
|
217 |
|
218 |
# with systemd USE enabled but without lvmetad |
219 |
# a generator is needed for systemd to create /dev nodes |
220 |
# note: this should be already build, but I am not sure |
221 |
# if this is always, or just sometimes |
222 |
use lvmetad || use systemd && emake -C scripts lvm2_activation_generator_systemd_red_hat |
210 |
} |
223 |
} |
211 |
|
224 |
|
212 |
src_install() { |
225 |
src_install() { |
213 |
emake DESTDIR="${D}" install |
226 |
emake DESTDIR="${D}" install |
214 |
|
227 |
|
|
|
228 |
# install systemd files |
229 |
if use systemd ; then |
230 |
# install either the lvmetad and lvm units |
231 |
# or the lvm systemd unit generator |
232 |
use lvmetad && emake DESTDIR="${D}" install_systemd_units |
233 |
use lvmetad || emake DESTDIR="${D}" install_systemd_generators |
234 |
fi |
235 |
|
236 |
# change the default to use lvmetad. Only for systemd for now |
237 |
# since lvmetad misses an openrc initscript |
238 |
# this is needed because with both USE flag set systemd generator |
239 |
# is not installed, hence systemd needs another way to have |
240 |
# /dev nodes created |
241 |
use lvmetad && use systemd && \ |
242 |
sed -i 's: use_lvmetad = 0: use_lvmetad = 1:' "${D}"/etc/lvm/lvm.conf |
243 |
|
215 |
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt} |
244 |
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt} |
216 |
newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm |
245 |
newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm |
217 |
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring |
246 |
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring |
Lines 270-275
Link Here
|
270 |
elog "baselayout-2 users. If you are using baselayout-2, be sure to" |
299 |
elog "baselayout-2 users. If you are using baselayout-2, be sure to" |
271 |
elog "run: # rc-update add lvm boot" |
300 |
elog "run: # rc-update add lvm boot" |
272 |
elog "Do NOT add it if you are still using baselayout-1." |
301 |
elog "Do NOT add it if you are still using baselayout-1." |
|
|
302 |
|
303 |
if use lvmetad && use systemd ; then |
304 |
ewarn "You enabled lvmetad and systemd USE flag" |
305 |
ewarn "Be sure to enabled use_lvmetad in /etc/lvm/lvm.conf" |
306 |
ewarn "Failure to do so will probably turn in systemd" |
307 |
ewarn "failing to boot, not finding a lvm /dev node" |
308 |
ewarn "More info can be found in lvmetad and lvm.conf man pages" |
309 |
fi |
273 |
} |
310 |
} |
274 |
|
311 |
|
275 |
src_test() { |
312 |
src_test() { |