Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 453594 | Differences between
and this patch

Collapse All | Expand All

(-)lvm2-2.02.98.ebuild (-2 / +39 lines)
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 110-115 Link Here
110
			tools/Makefile.in || die "sed failed"
110
			tools/Makefile.in || die "sed failed"
111
	fi
111
	fi
112
112
113
	# gentoo has lvm installed in /sbin
114
	sed -i 's:/usr/sbin/lvm:/sbin/lvm:' \
115
	scripts/lvm2_activation_generator_systemd_red_hat.c || die "sed failed"
116
113
	eautoreconf
117
	eautoreconf
114
}
118
}
115
119
Lines 177-182 Link Here
177
		myconf="${myconf} --with-clvmd=none --with-cluster=none"
181
		myconf="${myconf} --with-clvmd=none --with-cluster=none"
178
	fi
182
	fi
179
183
184
	# better to just force the unit dir
185
	myconf="${myconf} --with-systemdsystemunitdir=$(systemd_get_unitdir)"
186
	# and also change the default pid directory to /run instead of /var/run
187
	myconf="${myconf} --with-default-pid-dir=/run"
188
180
	local udevdir="${EPREFIX}/lib/udev/rules.d"
189
	local udevdir="${EPREFIX}/lib/udev/rules.d"
181
	use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d"
190
	use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d"
182
191
Lines 207-217 Link Here
207
216
208
	einfo "Starting main build"
217
	einfo "Starting main build"
209
	emake AR="$(tc-getAR)" || die "compile fail"
218
	emake AR="$(tc-getAR)" || die "compile fail"
219
220
	# with systemd USE enabled but without lvmetad
221
	# a generator is needed for systemd to create /dev nodes
222
	# note: this should be already build, but I am not sure
223
	# if this is always, or just sometimes
224
	use lvmetad || use systemd && emake -C scripts lvm2_activation_generator_systemd_red_hat
210
}
225
}
211
226
212
src_install() {
227
src_install() {
213
	emake DESTDIR="${D}" install
228
	emake DESTDIR="${D}" install
214
229
230
	# install systemd files
231
	# install either the lvmetad and lvm units
232
	# or the lvm systemd unit generator
233
	use lvmetad && emake DESTDIR="${D}" install_systemd_units
234
	use lvmetad || emake DESTDIR="${D}" install_systemd_generators
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() {

Return to bug 453594