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

Collapse All | Expand All

(-)genkernel-3.4.10.906.orig/defaults/initrd.scripts (-2 / +3 lines)
Lines 571-579 Link Here
571
	then
571
	then
572
		if [ ! -e '/etc/mdadm.conf' ]
572
		if [ ! -e '/etc/mdadm.conf' ]
573
		then
573
		then
574
			/sbin/mdadm --examine > /etc/mdadm.conf
574
			echo "DEVICE /dev/sd[a-z]* /dev/hd[a-z]*" >/etc/mdadm.conf
575
			/sbin/mdadm --examine --scan >>/etc/mdadm.conf
575
		fi
576
		fi
576
		/sbin/mdadm --assemble
577
		/sbin/mdadm -A --scan
577
	fi
578
	fi
578
579
579
	if [ "${USE_DMRAID_NORMAL}" = '1' ]
580
	if [ "${USE_DMRAID_NORMAL}" = '1' ]
(-)genkernel-3.4.10.906.orig/gen_compile.sh (+33 lines)
Lines 444-449 Link Here
444
	fi
444
	fi
445
}
445
}
446
446
447
compile_mdadm() {
448
	if [ ! -f "${MDADM_BINCACHE}" ]
449
	then
450
		[ -f "${MDADM_SRCTAR}" ] ||
451
			gen_die "Could not find MDADM source tarball: ${MDADM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
452
		cd "${TEMP}"
453
		rm -rf ${MDADM_DIR} > /dev/null
454
		/bin/tar -jxpf ${MDADM_SRCTAR} ||
455
			gen_die 'Could not extract MDADM source tarball!'
456
		[ -d "${MDADM_DIR}" ] ||
457
			gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
458
		
459
		cd "${MDADM_DIR}"
460
		print_info 1 'mdadm: >> Compiling...'
461
			LDFLAGS="-static" \
462
			CFLAGS="-Os" \
463
			CXFLAGS="${CFLAGS}" \
464
			compile_generic 'mdadm' utils
465
466
		mkdir -p "${TEMP}/mdadm/sbin"
467
		install -m 0755 -s mdadm "${TEMP}/mdadm/sbin/mdadm"
468
		print_info 1 '      >> Copying to bincache...'
469
		cd "${TEMP}/mdadm"
470
		strip "sbin/mdadm" ||
471
			gen_die 'Could not strip mdadm!'
472
		/bin/tar -cjf "${MDADM_BINCACHE}" sbin/mdadm ||
473
			gen_die 'Could not create binary cache'
474
475
		cd "${TEMP}"
476
		rm -rf "${MDADM_DIR}" mdadm
477
	fi
478
}
479
447
compile_dmraid() {
480
compile_dmraid() {
448
	compile_device_mapper
481
	compile_device_mapper
449
	if [ ! -f "${DMRAID_BINCACHE}" ]
482
	if [ ! -f "${DMRAID_BINCACHE}" ]
(-)genkernel-3.4.10.906.orig/gen_determineargs.sh (+2 lines)
Lines 127-132 Link Here
127
	BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
127
	BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
128
	DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
128
	DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
129
	LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
129
	LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
130
	MDADM_BINCACHE=`cache_replace "${MDADM_BINCACHE}"`
130
	DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
131
	DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
131
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
132
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
132
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
133
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
Lines 137-142 Link Here
137
	BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
138
	BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
138
	DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
139
	DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
139
	LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
140
	LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
141
	MDADM_BINCACHE=`arch_replace "${MDADM_BINCACHE}"`
140
	DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
142
	DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
141
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
143
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
142
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
144
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
(-)genkernel-3.4.10.906.orig/gen_initramfs.sh (+12 lines)
Lines 294-303 Link Here
294
	fi
294
	fi
295
	cd ${TEMP}
295
	cd ${TEMP}
296
	mkdir -p "${TEMP}/initramfs-mdadm-temp/etc/"
296
	mkdir -p "${TEMP}/initramfs-mdadm-temp/etc/"
297
	mkdir -p "${TEMP}/initramfs-mdadm-temp/sbin/"
297
	if [ "${MDADM}" -eq '1' ]
298
	if [ "${MDADM}" -eq '1' ]
298
	then
299
	then
299
		cp -a /etc/mdadm.conf "${TEMP}/initramfs-mdadm-temp/etc" \
300
		cp -a /etc/mdadm.conf "${TEMP}/initramfs-mdadm-temp/etc" \
300
			|| gen_die "Could not copy mdadm.conf!"
301
			|| gen_die "Could not copy mdadm.conf!"
302
		if [ -e '/sbin/mdadm' ] && LC_ALL="C" ldd /sbin/mdadm|grep -q 'not a dynamic executable'
303
		then
304
			print_info 1 '		MDADM: Adding support (using local static binaries)...'
305
			cp /sbin/mdadm "${TEMP}/initramfs-mdadm-temp/sbin/mdadm" ||
306
				gen_die 'Could not copy over mdadm!'
307
		else
308
			print_info 1 '		MDADM: Adding support (compiling binaries)...'
309
			compile_mdadm
310
			/bin/tar -jxpf "${MDADM_BINCACHE}" -C "${TEMP}/initramfs-mdadm-temp" ||
311
				gen_die "Could not extract mdadm binary cache!";
312
		fi
301
	fi
313
	fi
302
	cd "${TEMP}/initramfs-mdadm-temp/"
314
	cd "${TEMP}/initramfs-mdadm-temp/"
303
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
315
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
(-)genkernel-3.4.10.906.orig/genkernel.conf (+5 lines)
Lines 159-164 Link Here
159
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
159
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
160
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
160
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
161
161
162
MDADM_VER="VERSION_MDADM"
163
MDADM_DIR="mdadm-${MDADM_VER}"
164
MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
165
MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2"
166
162
DMRAID_VER="VERSION_DMRAID"
167
DMRAID_VER="VERSION_DMRAID"
163
DMRAID_DIR="dmraid/${DMRAID_VER}"
168
DMRAID_DIR="dmraid/${DMRAID_VER}"
164
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
169
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
(-)genkernel-3.4.10.906.orig/patches/busybox/1.7.4/1.7.4-mdadm.diff (-8 lines)
Lines 1-5882 Link Here
1
Forward-port the mdadm tool from the Gentoo Busybox-1.1.3.
2
Should handle all types of metadata 0.90, 1.0, 1.1, 1.2.
3
If /etc/mdadm.conf does not exist in the initrd, it is created first, by
4
scanning devices, and then it is used.
5
6
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
7
8
diff -Nuar --exclude '*.orig' busybox-1.7.4+gentoo/Config.in busybox-1.7.4+gentoo+mdadm/Config.in

Return to bug 282100