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 |