initramfs-tools: new revision with multiple changes.

- Remove mkinitramfs-kpkg(8), it's useless.
- Use busybox shell and create some symlinks through init.
- Add missing busybox-initramfs dep.

Bump revision.

--HG--
extra : convert_revision : 51d34ca135eba53bb07fb4859f54b200a0932061
This commit is contained in:
Juan RP 2009-10-08 16:00:51 +02:00
parent 2dab8d45e3
commit 9823bb2efd
2 changed files with 88 additions and 73 deletions

View file

@ -1,74 +1,3 @@
--- init.orig 2009-05-02 02:17:42.338577448 +0200
+++ init 2009-05-02 02:18:01.671572443 +0200
@@ -8,8 +8,8 @@ echo "Loading, please wait..."
[ -d /proc ] || mkdir /proc
[ -d /tmp ] || mkdir /tmp
mkdir -p /var/lock
-mount -t sysfs -o nodev,noexec,nosuid none /sys
-mount -t proc -o nodev,noexec,nosuid none /proc
+mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
+mount -t proc -o nodev,noexec,nosuid proc /proc
# Note that this only becomes /dev on the real filesystem if udev's scripts
# are used; which they will be, but it's worth pointing out
--- mkinitramfs.orig 2009-04-02 12:25:45.000000000 +0200
+++ mkinitramfs 2009-06-19 15:36:48.635447999 +0200
@@ -8,8 +8,7 @@ keep="n"
CONFDIR="/etc/initramfs-tools"
verbose="n"
errors_to="2>/dev/null"
-# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
-BUSYBOXDIR="/bin"
+BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
OPTIONS=`getopt -o d:ko:r:v -n "$0" -- "$@"`
@@ -141,7 +140,7 @@ fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
-DPKG_ARCH=`dpkg --print-installation-architecture`
+DPKG_ARCH=`uname -m`
# Export environment for hook scripts.
#
@@ -238,7 +237,6 @@ fi
# Busybox
if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
- mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
# those root need busybox
eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
@@ -252,17 +250,19 @@ else
fi
# Modutils
-copy_exec /sbin/modprobe /sbin
-copy_exec /sbin/depmod /sbin
-copy_exec /sbin/rmmod /sbin
-mkdir -p "${DESTDIR}/etc/modprobe.d"
-cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
-
-# workaround: libgcc always needed on old-abi arm
-if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then
- cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/"
+copy_exec /sbin/modprobe /sbin
+copy_exec /sbin/depmod /sbin
+#
+copy_exec /sbin/rmmod /sbin
+#
+if [ -d /etc/modprobe.d ]; then
+ mkdir -p "${DESTDIR}/etc/modprobe.d"
+ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
fi
+# libblkid
+copy_exec /sbin/blkid /sbin
+
run_scripts /usr/share/initramfs-tools/hooks
run_scripts "${CONFDIR}"/hooks
--- scripts/init-top/keymap.orig 2009-08-27 07:25:39.071099923 +0200
+++ scripts/init-top/keymap 2009-08-27 07:25:57.336100046 +0200
@@ -16,12 +16,12 @@ esac
@ -247,3 +176,88 @@
# Don't wait for a root device that doesn't have a corresponding
# device in /dev (ie, mtd0)
if [ "${ROOT#/dev}" = "${ROOT}" ]; then
--- mkinitramfs.orig 2009-04-02 12:25:45.000000000 +0200
+++ mkinitramfs 2009-10-08 15:52:24.676373911 +0200
@@ -8,8 +8,7 @@ keep="n"
CONFDIR="/etc/initramfs-tools"
verbose="n"
errors_to="2>/dev/null"
-# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
-BUSYBOXDIR="/bin"
+BUSYBOXDIR="/usr/lib/busybox-initramfs/bin"
OPTIONS=`getopt -o d:ko:r:v -n "$0" -- "$@"`
@@ -141,7 +140,7 @@ fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
-DPKG_ARCH=`dpkg --print-installation-architecture`
+DPKG_ARCH=`uname -m`
# Export environment for hook scripts.
#
@@ -238,7 +237,6 @@ fi
# Busybox
if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
- mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
# those root need busybox
eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
@@ -251,16 +249,14 @@ else
ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
fi
-# Modutils
+# Module-init-tools
copy_exec /sbin/modprobe /sbin
copy_exec /sbin/depmod /sbin
copy_exec /sbin/rmmod /sbin
-mkdir -p "${DESTDIR}/etc/modprobe.d"
-cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
-# workaround: libgcc always needed on old-abi arm
-if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then
- cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/"
+if [ -d /etc/modprobe.d ]; then
+ mkdir -p "${DESTDIR}/etc/modprobe.d"
+ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/"
fi
run_scripts /usr/share/initramfs-tools/hooks
--- init.orig 2009-03-20 10:10:13.000000000 +0100
+++ init 2009-10-08 15:44:38.768984346 +0200
@@ -2,14 +2,30 @@
echo "Loading, please wait..."
+# Create some required busybox symlinks.
+if [ -x /bin/busybox ]; then
+ busybox ln -s /bin/busybox /bin/cut
+ busybox ln -s /bin/busybox /bin/touch
+ busybox ln -s /bin/busybox /bin/tr
+ busybox ln -s /bin/busybox /bin/grep
+ busybox ln -s /bin/busybox /bin/awk
+ busybox ln -s /bin/busybox /bin/tail
+ busybox ln -s /bin/busybox /bin/basename
+ busybox ln -s /bin/busybox /bin/ls
+ busybox ln -s /bin/busybox /bin/cp
+ busybox ln -s /bin/busybox /sbin/blkid
+ busybox ln -s /bin/busybox /bin/rm
+ busybox ln -s /bin/busybox /sbin/pkill
+fi
+
[ -d /dev ] || mkdir -m 0755 /dev
[ -d /root ] || mkdir -m 0700 /root
[ -d /sys ] || mkdir /sys
[ -d /proc ] || mkdir /proc
[ -d /tmp ] || mkdir /tmp
mkdir -p /var/lock
-mount -t sysfs -o nodev,noexec,nosuid none /sys
-mount -t proc -o nodev,noexec,nosuid none /proc
+mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
+mount -t proc -o nodev,noexec,nosuid proc /proc
# Note that this only becomes /dev on the real filesystem if udev's scripts
# are used; which they will be, but it's worth pointing out

View file

@ -1,7 +1,7 @@
# Template file for 'initramfs-tools'
pkgname=initramfs-tools
version=0.93.2
revision=7
revision=8
wrksrc=$pkgname
patch_files="$pkgname-xbps.diff"
distfiles="${DEBIAN_SITE}/main/i/${pkgname}/${pkgname}_${version}.tar.gz"
@ -35,6 +35,7 @@ Add_dependency full udev
Add_dependency full module-init-tools
Add_dependency build klibc
Add_dependency run klibc-utils
Add_dependency full busybox-initramfs
Add_dependency run xbps
do_install()
@ -93,10 +94,10 @@ do_install()
# Manpages
install -m 644 $wrksrc/*.5 $DESTDIR/usr/share/man/man5
install -m 644 $wrksrc/*.8 $DESTDIR/usr/share/man/man8
rm -f ${DESTDIR}/usr/share/man/man8/mkinitramfs-kpkg.8
# Scripts
install -m 755 $wrksrc/mkinitramfs $DESTDIR/usr/sbin
install -m 755 $wrksrc/mkinitramfs-kpkg $DESTDIR/usr/sbin
install -m 755 $wrksrc/update-initramfs $DESTDIR/usr/sbin
# Remove unneeded stuff.