Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 72129
Collapse All | Expand All

(-)genkernel-3.1.0a/gen_compile.sh (+72 lines)
Lines 277-282 Link Here
277
	fi
277
	fi
278
}
278
}
279
279
280
compile_lvm2() {
281
	compile_device_mapper
282
	if [ ! -f "${LVM2_BINCACHE}" ]
283
	then
284
		[ -f "${LVM2_SRCTAR}" ] ||
285
			gen_die "Could not find lvm2 source tarball: ${LVM2_SRCTAR}!"
286
		cd "${TEMP}"
287
		rm -rf ${LVM2_DIR} > /dev/null
288
		tar -zxpf ${LVM2_SRCTAR} ||
289
			gen_die 'Could not extract lvm2 source tarball!'
290
		[ -d "${LVM2_DIR}" ] ||
291
			gen_die 'Lvm2 directory ${LVM2_DIR} is invalid!'
292
		rm -rf "${TEMP}/device-mapper" > /dev/null
293
		tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
294
			                gen_die "Could not extract device-mapper binary cache!"; 
295
		
296
		cd "${LVM2_DIR}"
297
		print_info 1 'lvm2: >> Configuring...'
298
			LDFLAGS="-L${TEMP}/device-mapper/lib" \
299
			CFLAGS="-I${TEMP}/device-mapper/include" \
300
			CPPFLAGS="-I${TEMP}/device-mapper/include" \
301
			./configure --enable-static_link --prefix=${TEMP}/lvm2 >> ${DEBUGFILE} 2>&1 ||
302
				gen_die 'Configure of lvm2 failed!'
303
		print_info 1 'lvm2: >> Compiling...'
304
			compile_generic '' utils
305
			compile_generic 'install' utils
306
307
		cd "${TEMP}/lvm2"
308
		print_info 1 '      >> Copying to bincache...'
309
		strip "sbin/lvm.static" ||
310
			gen_die 'Could not strip lvm.static!'
311
		tar -cjf "${LVM2_BINCACHE}" sbin/lvm.static ||
312
			gen_die 'Could not create binary cache'
313
314
		cd "${TEMP}"
315
		rm -rf "${TEMP}/device-mapper" > /dev/null
316
		rm -rf "${LVM2_DIR}" lvm2
317
	fi
318
}
319
280
compile_modutils() {
320
compile_modutils() {
281
	# I've disabled dietlibc support for the time being since the
321
	# I've disabled dietlibc support for the time being since the
282
	# version we use misses a few needed system calls.
322
	# version we use misses a few needed system calls.
Lines 438-443 Link Here
438
	fi
478
	fi
439
}
479
}
440
480
481
compile_device_mapper() {
482
	if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ]
483
	then
484
		[ ! -f "${DEVICE_MAPPER_SRCTAR}" ] &&
485
			gen_die "Could not find device-mapper source tarball: ${DEVICE_MAPPER_SRCTAR}"
486
		cd "${TEMP}"
487
		rm -rf "${DEVICE_MAPPER_DIR}"
488
		tar -zxpf "${DEVICE_MAPPER_SRCTAR}"
489
		[ ! -d "${DEVICE_MAPPER_DIR}" ] &&
490
			gen_die "device-mapper directory ${DEVICE_MAPPER_DIR} invalid"
491
		cd "${DEVICE_MAPPER_DIR}"
492
		./configure  --prefix=${TEMP}/device-mapper --enable-static_link >> ${DEBUGFILE} 2>&1 ||
493
			gen_die 'Configuring device-mapper failed!'
494
		print_info 1 'device-mapper: >> Compiling...'
495
		compile_generic '' utils
496
		compile_generic 'install' utils
497
		print_info 1 '        >> Copying to cache...'
498
		cd "${TEMP}"
499
		rm -r "${TEMP}/device-mapper/man" ||
500
			gen_die 'Could not remove manual pages!'
501
		strip "${TEMP}/device-mapper/sbin/dmsetup" ||
502
			gen_die 'Could not strip dmsetup binary!'
503
		tar -jcpf "${DEVICE_MAPPER_BINCACHE}" device-mapper ||
504
			gen_die 'Could not tar up the device-mapper binary!'
505
		[ -f "${DEVICE_MAPPER_BINCACHE}" ] ||
506
			gen_die 'device-mapper cache not created!'
507
		cd "${TEMP}"
508
		rm -rf "${DEVICE_MAPPER_DIR}" > /dev/null
509
		rm -rf "${TEMP}/device-mapper" > /dev/null
510
	fi
511
}
512
441
compile_dietlibc() {
513
compile_dietlibc() {
442
	local BUILD_DIETLIBC
514
	local BUILD_DIETLIBC
443
	local ORIGTEMP
515
	local ORIGTEMP
(-)genkernel-3.1.0a/gen_determineargs.sh (+4 lines)
Lines 92-97 Link Here
92
	DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"`
92
	DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"`
93
	DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"`
93
	DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"`
94
	UDEV_BINCACHE=`cache_replace "${UDEV_BINCACHE}"`
94
	UDEV_BINCACHE=`cache_replace "${UDEV_BINCACHE}"`
95
	DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
96
	LVM2_BINCACHE=`cache_replace "${LVM2_BINCACHE}"`
95
  
97
  
96
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
98
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
97
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
99
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
Lines 103-108 Link Here
103
	DEVFSD_BINCACHE=`arch_replace "${DEVFSD_BINCACHE}"`
105
	DEVFSD_BINCACHE=`arch_replace "${DEVFSD_BINCACHE}"`
104
	DEVFSD_CONF_BINCACHE=`arch_replace "${DEVFSD_CONF_BINCACHE}"`
106
	DEVFSD_CONF_BINCACHE=`arch_replace "${DEVFSD_CONF_BINCACHE}"`
105
	UDEV_BINCACHE=`arch_replace "${UDEV_BINCACHE}"`
107
	UDEV_BINCACHE=`arch_replace "${UDEV_BINCACHE}"`
108
	DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
109
	LVM2_BINCACHE=`arch_replace "${LVM2_BINCACHE}"`
106
	
110
	
107
	if [ "${CMD_BOOTSPLASH}" != '' ]
111
	if [ "${CMD_BOOTSPLASH}" != '' ]
108
	then
112
	then
(-)genkernel-3.1.0a/gen_initrd.sh (-12 / +9 lines)
Lines 91-109 Link Here
91
#		gen_die "could not uncompress devfsd.conf"
91
#		gen_die "could not uncompress devfsd.conf"
92
92
93
	# LVM2
93
	# LVM2
94
	if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable';
94
	if [ "${CMD_NOLVM2}" != '1' ]
95
	then
95
	then
96
		if [ "${CMD_NOLVM2}" != '1' ]
96
		tar -jxpf "${LVM2_BINCACHE}" -C "${TEMP}/initrd-temp" ||
97
		then
97
			gen_die "Could not extract lvm2 binary cache!";
98
			cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
98
		mv  ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm ||
99
				gen_die 'Could not copy over lvm!'
99
			gen_die "lvm2 error: could not move lvm.static to lvm!"
100
			ln -sf "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgscan" ||
100
		for i in vgchange vgscan; do
101
				gen_die 'Could not symlink lvm -> vgscan!'
101
			ln  ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i ||
102
			ln -sf "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgchange" ||
102
				gen_die "lvm2 error: could not link ${i}!"
103
				gen_die 'Could not symlink lvm -> vgchange!'
103
		done
104
		fi
105
#	else
106
#		print_warning 1 "initrd: No LVM2 static binaries found; skipping support..."
107
	fi
104
	fi
108
105
109
	for i in '[' ash basename cat chroot clear cp dirname echo env false find \
106
	for i in '[' ash basename cat chroot clear cp dirname echo env false find \
(-)genkernel-3.1.0a/genkernel (+6 lines)
Lines 265-270 Link Here
265
	fi
265
	fi
266
266
267
	compile_devfsd
267
	compile_devfsd
268
	
269
	if [ "${CMD_NOLVM2}" != '1' ]
270
	then
271
		compile_lvm2
272
	fi
273
268
	#UDEV=0
274
	#UDEV=0
269
	#[ "${VER}" -gt '2' ] || [ "${VER}" -eq '2' -a "${PAT}" -ge '6' -a "${NOUDEV}" -eq '0' ] && UDEV=1 && print_info 1 'udev: Target is a 2.6 kernel, support enabled.'
275
	#[ "${VER}" -gt '2' ] || [ "${VER}" -eq '2' -a "${PAT}" -ge '6' -a "${NOUDEV}" -eq '0' ] && UDEV=1 && print_info 1 'udev: Target is a 2.6 kernel, support enabled.'
270
	[ "${UDEV}" -eq '1' ] && compile_udev
276
	[ "${UDEV}" -eq '1' ] && compile_udev
(-)genkernel-3.1.0a/genkernel.conf (+10 lines)
Lines 94-96 Link Here
94
UDEV_DIR="udev-${UDEV_VER}"
94
UDEV_DIR="udev-${UDEV_VER}"
95
UDEV_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2"
95
UDEV_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2"
96
UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2"
96
UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2"
97
98
DEVICE_MAPPER_VER="1.00.17"
99
DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
100
DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz"
101
DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"
102
103
LVM2_VER="2.00.25"
104
LVM2_DIR="LVM2.${LVM2_VER}"
105
LVM2_SRCTAR="${GK_SHARE}/pkg/LVM2.${LVM2_VER}.tgz"
106
LVM2_BINCACHE="%%CACHE%%/LVM2.${LVM2_VER}-%%ARCH%%.tar.bz2"

Return to bug 72129