diff options
Diffstat (limited to 'sys-apps/mkinitrd/files')
-rw-r--r-- | sys-apps/mkinitrd/files/mdadm-ds-static.patch | 22 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2 | bin | 0 -> 21102 bytes | |||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff | 164 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch | 27 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-ds-raid.patch | 15 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-ds-vitalsunion.diff | 65 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-ds.patch | 42 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-lvm_statics.diff | 15 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2 | bin | 0 -> 21199 bytes | |||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-swsusp2.patch | 13 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/nash-ds-remount.patch | 85 |
11 files changed, 448 insertions, 0 deletions
diff --git a/sys-apps/mkinitrd/files/mdadm-ds-static.patch b/sys-apps/mkinitrd/files/mdadm-ds-static.patch new file mode 100644 index 0000000..bd6afb4 --- /dev/null +++ b/sys-apps/mkinitrd/files/mdadm-ds-static.patch @@ -0,0 +1,22 @@ +diff -dPNur mdadm-2.1/Makefile mdadm-2.1-new/Makefile +--- mdadm-2.1/Makefile 2005-09-05 00:54:55.000000000 +0000 ++++ mdadm-2.1-new/Makefile 2006-01-05 16:45:15.000000000 +0000 +@@ -39,15 +39,15 @@ + + CC = $(CROSS_COMPILE)gcc + CXFLAGS = -ggdb +-CWFLAGS = -Wall -Werror -Wstrict-prototypes ++CWFLAGS = -Wall -Wstrict-prototypes + SYSCONFDIR = /etc + CONFFILE = $(SYSCONFDIR)/mdadm.conf + MAILCMD =/usr/sbin/sendmail -t + CFLAGS = $(CWFLAGS) -DCONFFILE=\"$(CONFFILE)\" $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" + + # If you want a static binary, you might uncomment these +-# LDFLAGS = -static +-# STRIP = -s ++LDFLAGS = -static ++STRIP = -s + + INSTALL = /usr/bin/install + DESTDIR = diff --git a/sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2 b/sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2 Binary files differnew file mode 100644 index 0000000..2adced7 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2 diff --git a/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff b/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff new file mode 100644 index 0000000..a9fcd0a --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff @@ -0,0 +1,164 @@ +diff -dPNur mkinitrd-6.0.93-patched/functions mkinitrd-6.0.93-patched-ds/functions +--- mkinitrd-6.0.93-patched/functions 2012-11-19 23:57:17.000000000 +0100 ++++ mkinitrd-6.0.93-patched-ds/functions 2012-11-19 23:59:42.000000000 +0100 +@@ -347,6 +347,15 @@ + resolved="$items" + } + ++get_numeric_dev() { ++( ++ fmt="%d:%d" ++ if [ "$1" = "hex" ]; then ++ fmt="%x:%x" ++ fi ++ ls -lH "$2" | awk '{ sub(/,/, "", $5); printf("'"$fmt"'", $5, $6); }' ++) 2>/dev/null ++} + + + # vim:ts=8:sw=4:sts=4:et +diff -dPNur mkinitrd-6.0.93-patched/mkinitrd mkinitrd-6.0.93-patched-ds/mkinitrd +--- mkinitrd-6.0.93-patched/mkinitrd 2012-11-19 23:57:17.000000000 +0100 ++++ mkinitrd-6.0.93-patched-ds/mkinitrd 2012-11-20 00:05:55.000000000 +0100 +@@ -48,8 +48,6 @@ + PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH + export PATH + +-. /etc/rc.d/init.d/functions +- + # Set the umask. For iscsi, the initrd can contain plaintext + # password (chap secret), so only allow read by owner. + umask 077 +@@ -111,6 +109,7 @@ + fi + + $cmd "usage: `basename $0` [--version] [--help] [-v] [-f] [--preload <module>]" ++ $cmd " [--omit-ata-modules] [--busybox]" + $cmd " [--force-scsi-probe | --omit-scsi-modules]" + $cmd " [--omit-ide-modules]" + $cmd " [--image-version] [--force-raid-probe | --omit-raid-modules]" +@@ -315,6 +314,7 @@ + if echo $PWD | grep -q /virtio-pci/ ; then + findmodule virtio_pci + fi ++ + while [ "$PWD" != "/sys/devices" ]; do + deps= + if [ -f modalias ]; then +@@ -325,7 +325,8 @@ + moduledep $MODALIAS + unset MODALIAS + fi +- ++ ++ if [ -z "$noata" ] ; then + [ -z "$deps" -a -L driver/module ] && \ + deps=$(basename $(readlink driver/module)) + for driver in $deps ; do +@@ -335,6 +336,7 @@ + [ "$driver" = "ata_piix" ] && findmodule ahci + [ "$driver" = "ahci" ] && findmodule ata_piix + done ++ fi + cd .. + done + } +@@ -883,6 +885,12 @@ + fi + PREMODS="$PREMODS $modname" + ;; ++ --omit-ata-modules) ++ noata=1 ++ ;; ++ --busybox) ++ busybox=1 ++ ;; + --omit-scsi-modules) + PRESCSIMODS="" + noscsi=1 +@@ -1289,9 +1297,14 @@ + vecho "Building initrd in $MNTIMAGE" + inst /sbin/nash "$MNTIMAGE" /bin/nash + inst /sbin/modprobe "$MNTIMAGE" /bin/modprobe +-inst /sbin/rmmod "$MNTIMAGE" /bin/rmmod ++#inst /sbin/rmmod "$MNTIMAGE" /bin/rmmod + inst /bin/ln "$MNTIMAGE" + ++if [ -n "$busybox" ]; then ++ inst /bin/bb "$MNTIMAGE" ++ inst /bin/busybox "$MNTIMAGE" ++fi ++ + if [ -e /etc/fstab.sys ]; then + inst /etc/fstab.sys "$MNTIMAGE" + fi +@@ -1599,10 +1612,12 @@ + /bin/ln -s fb0 /dev/fb + EOF + ++if [ -x /bin/plymouthd ]; then + emit "/bin/plymouthd --attach-to-session" + + emit "echo Setting up hotplug." + emit "hotplug" ++fi + + # If we have drm loaded, include modesetting drivers + if [ "x$PROBE" == "xyes" ]; then +@@ -1622,9 +1637,13 @@ + EOF + fi + ++if [ -x /lib/udev/console_init ]; then + [ -n "$I18N" ] && emit "/lib/udev/console_init tty0" ++fi + ++if [ -x /bin/plymouthd ]; then + emit "plymouth --show-splash" ++fi + + if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then + /usr/libexec/plymouth/plymouth-populate-initrd $(get_verbose) -t "$MNTIMAGE" +@@ -1699,7 +1718,10 @@ + emit "echo waiting for encrypted device $1 to appear (timeout 1min)" + emit "waitdev --timeout=60000000 $1" + emit "mkblkdevs" ++ ++ if [ -x /bin/plymouthd ]; then + emit "plymouth ask-for-password --command \$LUKSUUID" ++ fi + } + + for cryptdev in ${!cryptopart@} ; do +@@ -1750,7 +1772,10 @@ + + emit "echo Mounting root filesystem." + emit "mount /sysroot" ++ ++if [ -x /bin/plymouthd ]; then + emit "cond -ne 0 plymouth --hide-splash" ++fi + + if [ -n "$loopfs" ]; then + emit "Cleaning up loop mount." +@@ -1766,7 +1791,9 @@ + fi + + emit "loadpolicy" ++if [ -x /bin/plymouthd ]; then + emit "plymouth --newroot=/sysroot" ++fi + emit "echo Switching to new root and running init." + + if [ ! -z "$BOOTCHART" ]; then +@@ -1792,6 +1819,10 @@ + emit "/bin/sleep 1s" + fi + ++if [ -n "$busybox" ]; then ++ emit "/bin/bb" ++fi ++ + emit "switchroot" + emit "echo Booting has failed." + emit "sleep -1" diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch b/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch new file mode 100644 index 0000000..c5502d8 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch @@ -0,0 +1,27 @@ +diff -dPNur mkinitrd-4.2.17/grubby/grubby.c mkinitrd-4.2.17-ds/grubby/grubby.c +--- mkinitrd-4.2.17/grubby/grubby.c 2005-04-05 17:39:21.000000000 +0200 ++++ mkinitrd-4.2.17-ds/grubby/grubby.c 2010-01-30 00:21:16.000000000 +0100 +@@ -239,7 +239,6 @@ + struct singleEntry * findEntryByPath(struct grubConfig * cfg, + const char * path, const char * prefix, + int * index); +-static char * strndup(char * from, int len); + static int readFile(int fd, char ** bufPtr); + static void lineInit(struct singleLine * line); + static void lineFree(struct singleLine * line); +@@ -249,15 +248,6 @@ + struct configFileInfo * cfi); + static char * getRootSpecifier(char * str); + +-static char * strndup(char * from, int len) { +- char * to; +- +- to = malloc(len + 1); +- strncpy(to, from, len); +- to[len] = '\0'; +- +- return to; +-} + + static char * sdupprintf(const char *format, ...) + #ifdef __GNUC__ diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds-raid.patch b/sys-apps/mkinitrd/files/mkinitrd-ds-raid.patch new file mode 100644 index 0000000..3eced0a --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-ds-raid.patch @@ -0,0 +1,15 @@ +diff -dPNur mkinitrd-4.2.17/mkinitrd mkinitrd-4.2.17-new/mkinitrd +--- mkinitrd-4.2.17/mkinitrd 2006-01-05 17:11:25.000000000 +0000 ++++ mkinitrd-4.2.17-new/mkinitrd 2006-01-05 16:54:20.000000000 +0000 +@@ -1015,8 +1015,11 @@ + if [ -x /sbin/mdassemble ]; then + cp $verbose -aL /sbin/mdassemble $MNTIMAGE/sbin + raidstart_command="mdassemble" ++ elif [ -x /sbin/mdadm.static ]; then ++ inst /sbin/mdadm.static $MNTIMAGE/sbin/mdadm ++ raidstart_command="mdadm -A -s" + elif [ -x /sbin/mdadm ]; then + inst /sbin/mdadm $MNTIMAGE/sbin + raidstart_command="mdadm -A -s" + else + raidstart_command="raidautorun /dev/md${md}" diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds-vitalsunion.diff b/sys-apps/mkinitrd/files/mkinitrd-ds-vitalsunion.diff new file mode 100644 index 0000000..994e1cc --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-ds-vitalsunion.diff @@ -0,0 +1,65 @@ +diff -dPNur mkinitrd-6.0.93/nash/vitals.h mkinitrd-6.0.93-new/nash/vitals.h +--- mkinitrd-6.0.93/nash/vitals.h 2009-09-02 10:41:45.000000000 +0200 ++++ mkinitrd-6.0.93-new/nash/vitals.h 2012-11-19 20:07:47.000000000 +0100 +@@ -39,41 +39,33 @@ + + union { + /* DEV_TYPE_DISK */ +- struct { +- char *unique_id; +- char *disk_device_node; +- char *disk_model; +- char *disk_vendor; +- char *disk_probe_module; +- char *disk_probe_name; +- }; + /* DEV_TYPE_DM_MPATH, DEV_TYPE_DM_RAID */ + struct { + char *dmname; + }; +- /* DEV_TYPE_LVM2_PV */ +- struct { +- char *unique_id; +- }; +- /* nothing for DEV_TYPE_PARTITION */ +- /* DEV_TYPE_LVM2_VG */ +- struct { +- char *unique_id; +- char *vg_name; +- }; +- /* DEV_TYPE_LVM2_LV */ +- struct { +- char *unique_id; +- char *lv_name; +- }; +- /* DEV_TYPE_FS */ + struct { + char *unique_id; +- char *fs_type; +- char *fs_label; +- char *fs_options; ++ union { ++ struct { ++ char *disk_device_node; ++ char *disk_model; ++ char *disk_vendor; ++ char *disk_probe_module; ++ char *disk_probe_name; ++ }; ++ struct { ++ char *vg_name; ++ }; ++ struct { ++ char *fs_type; ++ char *fs_label; ++ char *fs_options; ++ }; ++ struct { ++ char *lv_name; ++ }; ++ }; + }; +- /* XXX FIXME: DEV_TYPE_MD_RAID */ + }; + }; + diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds.patch b/sys-apps/mkinitrd/files/mkinitrd-ds.patch new file mode 100644 index 0000000..10d4871 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-ds.patch @@ -0,0 +1,42 @@ +diff -dPNur mkinitrd-4.2.17/mkinitrd mkinitrd-4.2.17-csa/mkinitrd +--- mkinitrd-4.2.17/mkinitrd 2005-10-28 07:35:15.000000000 +0000 ++++ mkinitrd-4.2.17-csa/mkinitrd 2005-10-28 07:40:56.000000000 +0000 +@@ -61,6 +61,8 @@ + + [ -f /etc/sysconfig/mkinitrd ] && source /etc/sysconfig/mkinitrd + ++mount /boot &> /dev/null ++ + usage () { + echo "usage: `basename $0` [--version] [-v] [-f] [--preload <module>]" >&2 + echo " [--with=<module>] [--omit-scsi-modules] [--omit-raid-modules]" >&2 +@@ -1134,6 +1136,8 @@ + echo "pivot_root /sysroot /sysroot/initrd" >> $RCFILE + [ -n "$kernel25" ] && echo "umount /initrd/sys" >> $RCFILE + echo "umount /initrd/proc" >> $RCFILE ++ echo "umount /initrd/dev" >> $RCFILE ++ echo "umount /initrd" >> $RCFILE + fi + else + [ -n "$readonly" ] && echo "umount /dev" >> $RCFILE +@@ -1154,7 +1158,7 @@ + + case $initrdfs in + ext2|ext3|minix) +- for i in `/bin/find $MNTIMAGE -printf '%k\n'`; do ++ for i in `find $MNTIMAGE -printf '%k\n'`; do + IMAGESIZE=$[IMAGESIZE + $i] + NB_INODES=$[NB_INODES + 1] + done +diff -dPNur mkinitrd-4.2.17/nash/nash.c mkinitrd-4.2.17-csa/nash/nash.c +--- mkinitrd-4.2.17/nash/nash.c 2005-10-28 07:35:15.000000000 +0000 ++++ mkinitrd-4.2.17-csa/nash/nash.c 2005-10-28 07:35:22.000000000 +0000 +@@ -1078,7 +1078,7 @@ + return 1; + } + +- if (umount(path)) { ++ if (umount2(path,MNT_DETACH)) { + printf("umount %s failed: %d\n", path, errno); + return 1; + } diff --git a/sys-apps/mkinitrd/files/mkinitrd-lvm_statics.diff b/sys-apps/mkinitrd/files/mkinitrd-lvm_statics.diff new file mode 100644 index 0000000..c690b9b --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-lvm_statics.diff @@ -0,0 +1,15 @@ +diff -urN mkinitrd-3.5.7.orig/mkinitrd mkinitrd-3.5.7/mkinitrd +--- mkinitrd-3.5.7.orig/mkinitrd 2003-07-09 18:26:02.000000000 -0500 ++++ mkinitrd-3.5.7/mkinitrd 2003-10-25 11:56:32.083678110 -0500 +@@ -534,9 +534,8 @@ + cp $verbose --parents -a $pv $MNTIMAGE/ + done + +- inst /sbin/vgwrapper "$MNTIMAGE/bin/vgwrapper" +- ln "$MNTIMAGE/bin/vgwrapper" "$MNTIMAGE/bin/vgscan" +- ln "$MNTIMAGE/bin/vgwrapper" "$MNTIMAGE/bin/vgchange" ++ inst /sbin/vgscan.static "$MNTIMAGE/bin/vgscan" ++ inst /sbin/vgchange.static "$MNTIMAGE/bin/vgchange" + + mknod $MNTIMAGE/dev/lvm b 109 0 + fi diff --git a/sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2 b/sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2 Binary files differnew file mode 100644 index 0000000..9bc6425 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2 diff --git a/sys-apps/mkinitrd/files/mkinitrd-swsusp2.patch b/sys-apps/mkinitrd/files/mkinitrd-swsusp2.patch new file mode 100644 index 0000000..b28be2b --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-swsusp2.patch @@ -0,0 +1,13 @@ +diff -dPNur mkinitrd-4.2.17/mkinitrd mkinitrd-4.2.17-new/mkinitrd +--- mkinitrd-4.2.17/mkinitrd 2006-05-20 05:49:28.000000000 +0500 ++++ mkinitrd-4.2.17-new/mkinitrd 2006-05-20 05:52:39.000000000 +0500 +@@ -975,6 +975,9 @@ + + echo "echo Mounting /proc filesystem" >> $RCFILE + echo "mount -t proc /proc /proc" >> $RCFILE ++echo "mount -n -o remount,ro /" >>$RCFILE ++echo "echo > /proc/suspend2/do_resume" >>$RCFILE ++echo "mount -n -o remount,rw /" >>$RCFILE + if [ -n "$kernel25" ];then + echo "echo Mounting sysfs" >> $RCFILE + echo "mount -t sysfs none /sys" >> $RCFILE diff --git a/sys-apps/mkinitrd/files/nash-ds-remount.patch b/sys-apps/mkinitrd/files/nash-ds-remount.patch new file mode 100644 index 0000000..c403535 --- /dev/null +++ b/sys-apps/mkinitrd/files/nash-ds-remount.patch @@ -0,0 +1,85 @@ +diff -dPNur nash/.cvsignore nash-new/.cvsignore +--- nash/.cvsignore 2002-06-24 04:33:33.000000000 +0500 ++++ nash-new/.cvsignore 1970-01-01 04:00:00.000000000 +0400 +@@ -1 +0,0 @@ +-nash +diff -dPNur nash/nash.c nash-new/nash.c +--- nash/nash.c 2005-06-24 20:41:11.000000000 +0500 ++++ nash-new/nash.c 2006-05-20 16:33:47.000000000 +0500 +@@ -44,6 +44,7 @@ + #include <sys/ioctl.h> + #include <sys/reboot.h> + #include <termios.h> ++#include <mntent.h> + + #include <asm/unistd.h> + +@@ -272,6 +273,8 @@ + int rc = 0; + int flags = MS_MGC_VAL; + char * newOpts; ++ char *fsTypeSpace; ++ char *deviceSpace; + + cmd = getArg(cmd, end, &device); + if (!cmd) { +@@ -307,15 +310,9 @@ + } + + if (!(cmd = getArg(cmd, end, &mntPoint))) { +- printf("mount: missing mount point\n"); +- return 1; +- } +- +- if (!fsType) { +- printf("mount: filesystem type expected\n"); +- return 1; +- } +- ++ mntPoint = device; ++ device = NULL; ++ } else + if (cmd < end) { + printf("mount: unexpected arguments\n"); + return 1; +@@ -382,6 +379,40 @@ + options = newOpts; + } + ++ if (((!device)||(!fsType))&&(flags&MS_REMOUNT)) { ++ FILE *mounts; ++ struct mntent *record; ++ ++ mounts = setmntent("/proc/mounts", "r"); ++ if (mounts) { ++ while ((record = getmntent(mounts)) != NULL) { ++ if (!strcmp(record->mnt_dir, mntPoint)) { ++ deviceSpace = alloca(strlen(record->mnt_fsname)+1); ++ fsTypeSpace = alloca(strlen(record->mnt_type)+1); ++ if ((!deviceSpace)||(!fsTypeSpace)) break; ++ strcpy(deviceSpace, record->mnt_fsname); ++ strcpy(fsTypeSpace, record->mnt_type); ++ device = deviceSpace; ++ fsType = fsTypeSpace; ++ break; ++ } ++ } ++ ++ endmntent(mounts); ++ } ++ } ++ ++ if (!device) { ++ printf("mount: missing mount point\n"); ++ return 1; ++ } ++ ++ if (!fsType) { ++ printf("mount: filesystem type expected\n"); ++ return 1; ++ } ++ ++ + if (!strncmp("LABEL=", device, 6)) { + int major, minor; + char * devName; |