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 / +43 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
	if use systemd; then
186
		myconf="${myconf} --with-systemdsystemunitdir=$(systemd_get_unitdir)"
187
	fi
188
	# and also change the default pid directory to /run instead of /var/run
189
	myconf="${myconf} --with-default-pid-dir=/run"
190
180
	local udevdir="${EPREFIX}/lib/udev/rules.d"
191
	local udevdir="${EPREFIX}/lib/udev/rules.d"
181
	use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d"
192
	use udev && udevdir="${EPREFIX}/$(udev_get_udevdir)/rules.d"
182
193
Lines 207-217 Link Here
207
218
208
	einfo "Starting main build"
219
	einfo "Starting main build"
209
	emake AR="$(tc-getAR)" || die "compile fail"
220
	emake AR="$(tc-getAR)" || die "compile fail"
221
222
	# with systemd USE enabled but without lvmetad
223
	# a generator is needed for systemd to create /dev nodes
224
	# note: this should be already build, but I am not sure
225
	# if this is always, or just sometimes
226
	use lvmetad || use systemd && emake -C scripts lvm2_activation_generator_systemd_red_hat
210
}
227
}
211
228
212
src_install() {
229
src_install() {
213
	emake DESTDIR="${D}" install
230
	emake DESTDIR="${D}" install
214
231
232
	# install systemd files
233
	if use systemd ; then
234
		# install either the lvmetad and lvm units
235
		# or the lvm systemd unit generator
236
		use lvmetad && emake DESTDIR="${D}" install_systemd_units
237
		use lvmetad || emake DESTDIR="${D}" install_systemd_generators
238
	fi
239
240
	# change the default to use lvmetad. Only for systemd for now
241
	# since lvmetad misses an openrc initscript
242
	# this is needed because with both USE flag set systemd generator
243
	# is not installed, hence systemd needs another way to have
244
	# /dev nodes created
245
	use lvmetad && use systemd && \
246
	sed -i 's:    use_lvmetad = 0:    use_lvmetad = 1:' "${D}"/etc/lvm/lvm.conf
247
215
	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt}
248
	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt}
216
	newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm
249
	newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm
217
	newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring
250
	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"
303
	elog "baselayout-2 users. If you are using baselayout-2, be sure to"
271
	elog "run: # rc-update add lvm boot"
304
	elog "run: # rc-update add lvm boot"
272
	elog "Do NOT add it if you are still using baselayout-1."
305
	elog "Do NOT add it if you are still using baselayout-1."
306
307
	if use lvmetad && use systemd ; then
308
		ewarn "You enabled lvmetad and systemd USE flag"
309
		ewarn "Be sure to enabled use_lvmetad in /etc/lvm/lvm.conf"
310
		ewarn "Failure to do so will probably turn in systemd"
311
		ewarn "failing to boot, not finding a lvm /dev node"
312
		ewarn "More info can be found in lvmetad and lvm.conf man pages"
313
	fi
273
}
314
}
274
315
275
src_test() {
316
src_test() {

Return to bug 453594