diff options
author | maximilian attems <maks@debian.org> | 2005-10-21 18:24:58 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2005-10-21 18:24:58 +0200 |
commit | 347d6ecf62c2b0ce237deb38e7e80988b90fc078 (patch) | |
tree | 251b046f922f0aca6000cf415a04fc2e7d1dce55 | |
parent | 60417290f1be20067c64431a5249cafe8a9bbc51 (diff) | |
download | initramfs-tools-347d6ecf62c2b0ce237deb38e7e80988b90fc078.tar.gz initramfs-tools-347d6ecf62c2b0ce237deb38e7e80988b90fc078.zip |
waldi fixes for newer busybox
-rw-r--r-- | debian/changelog | 13 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | hook-functions | 30 | ||||
-rwxr-xr-x | hooks/evms | 4 | ||||
-rwxr-xr-x | mkinitramfs | 39 |
5 files changed, 37 insertions, 51 deletions
diff --git a/debian/changelog b/debian/changelog index a44d9a6..600d835 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +initramfs-tools (0.31) UNRELEASED; urgency=low + + [ Bastian Blank ] + * debian/control: Add mklibs-copy as dependency. + * hook-functions use mklibs-copy: Remove copy_exec. + * hooks/evms: Use cp instead of copy_exec. + * mkinitramfs + - Use cp instead of copy_exec. + - Call mklibs-copy to collect necessary libs. + + + -- Bastian Blank <waldi@debian.org> Mon, 10 Oct 2005 18:27:12 +0000 + initramfs-tools (0.31) unstable; urgency=low Quick fix for sluggish dep diff --git a/debian/control b/debian/control index 6dcbbec..68874cf 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev, mklibs-copy Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged 2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel diff --git a/hook-functions b/hook-functions index bc21b5f..24be12c 100644 --- a/hook-functions +++ b/hook-functions @@ -51,36 +51,6 @@ manual_add_modules() done } -# $1 is source -# $2 is relative destination -copy_exec() { - ln -s ${1} ${DESTDIR}/${2} - - # Copy the dependant libraries - for x in $(ldd ${1} 2>/dev/null | sed -e ' - /\//!d; - /linux-gate/d; - /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; - s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do - - # Try to use non-optimised libraries where possible. - # We assume that all HWCAP libraries will be in tls. - nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') - - if [ -e ${nonoptlib} ]; then - x=${nonoptlib} - fi - - libname=$(basename ${x}) - dirname=$(dirname ${x}) - - mkdir -p ${DESTDIR}/${dirname} - if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then - ln -s ${x} ${DESTDIR}/${dirname} - fi - done -} - # Copy entire subtrees to the initramfs copy_modules_dir() { @@ -20,12 +20,12 @@ if [ ! -x /sbin/evms_activate ]; then exit 0 fi -copy_exec /sbin/evms_activate /sbin +cp /sbin/evms_activate ${DESTDIR}/sbin EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} for x in disk lvm2 dos multipath; do - copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION} + cp /lib/evms/${EVMS_VERSION}/${x}* ${DESTDIR}/lib/evms/${EVMS_VERSION} done diff --git a/mkinitramfs b/mkinitramfs index 3866a76..7e9481a 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -117,9 +117,7 @@ fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin -ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib -copy_exec /usr/share/initramfs-tools/init /init +cp /usr/share/initramfs-tools/init ${DESTDIR}/init cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts for f in $(cd /etc/mkinitramfs/scripts && \ find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ @@ -127,39 +125,44 @@ for f in $(cd /etc/mkinitramfs/scripts && \ mkdir --parents ${DESTDIR}/scripts/$(dirname ${f}) cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f}) done -copy_exec ${CONFDIR}/initramfs.conf /conf +cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf cp -a /etc/udev ${DESTDIR}/etc # Hack until udev is built with klibc -copy_exec /sbin/udev /sbin -copy_exec /sbin/udevstart /sbin +cp /sbin/udev ${DESTDIR}/sbin +cp /sbin/udevstart ${DESTDIR}/sbin # Busybox -rm ${DESTDIR}/bin/sh -ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh -# This is ugly, but needed atm to make the builtins work =( -ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox +cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox # Modutils -copy_exec /sbin/modprobe /sbin -copy_exec /sbin/depmod /sbin -copy_exec /sbin/rmmod /sbin +cp /sbin/modprobe ${DESTDIR}/sbin +cp /sbin/depmod ${DESTDIR}/sbin +cp /sbin/rmmod ${DESTDIR}/sbin mkdir -p ${DESTDIR}/etc/modprobe.d -copy_exec /etc/modprobe.d/aliases /etc/modprobe.d +cp /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d # Raid -copy_exec /sbin/mdadm /sbin -copy_exec /sbin/mdrun /sbin +cp /sbin/mdadm ${DESTDIR}/sbin +cp /sbin/mdrun ${DESTDIR}/sbin # LVM -copy_exec /lib/lvm-200/vgchange /sbin +cp /lib/lvm-200/vgchange ${DESTDIR}/sbin + +mklibs-small -d ${DESTDIR}/lib --root=${DESTDIR} $(find ${DESTDIR} -type f -perm +0111 -o -name '*.so') + +ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin +ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib + +rm ${DESTDIR}/bin/sh +ln -s busybox ${DESTDIR}/bin/sh run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks # Apply DSDT to initramfs if [ -e ${CONFDIR}/DSDT.aml ]; then - copy_exec ${CONFDIR}/DSDT.aml / + cp ${CONFDIR}/DSDT.aml ${DESTDIR} fi (cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) |