summaryrefslogtreecommitdiffstats
path: root/sys-apps/mkinitrd
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /sys-apps/mkinitrd
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'sys-apps/mkinitrd')
-rw-r--r--sys-apps/mkinitrd/Manifest16
-rw-r--r--sys-apps/mkinitrd/files/mdadm-ds-static.patch22
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2bin0 -> 21102 bytes
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff164
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-ds-grubby_compile.patch27
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-ds-raid.patch15
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-ds-vitalsunion.diff65
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-ds.patch42
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-lvm_statics.diff15
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2bin0 -> 21199 bytes
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-swsusp2.patch13
-rw-r--r--sys-apps/mkinitrd/files/nash-ds-remount.patch85
-rw-r--r--sys-apps/mkinitrd/mkinitrd-4.2.17-r3.ebuild65
-rw-r--r--sys-apps/mkinitrd/mkinitrd-6.0.93-r1.ebuild46
14 files changed, 575 insertions, 0 deletions
diff --git a/sys-apps/mkinitrd/Manifest b/sys-apps/mkinitrd/Manifest
new file mode 100644
index 0000000..a9398c5
--- /dev/null
+++ b/sys-apps/mkinitrd/Manifest
@@ -0,0 +1,16 @@
+AUX mdadm-ds-static.patch 666 SHA256 6db05f1624496648747b9af99b9d408a123518e9b3f8b8fd67533e661fe1a516 SHA512 ac2c5cac8bb65a634c6b55d5338d1353e5979b18bd27d2147d13df565d3cf021b4cf4755bf9d548ead0a8e779fd5e06792bfa7247e62fdd06b270eb2db542c49 WHIRLPOOL 24592e6af5f7ef304a124122ed9b7eaf68eb9df60bd88f94adbc93e9f9f49178f5d433f5e4f6640a9a529491fc167b931095738590ddba6846af1b4ad4ac2d02
+AUX mkinitrd-4.2.17-mdk.patch.bz2 21102 SHA256 984c6753e555225c6a7cc96f03d5d2d7671cea59d2a9e7cb35c60d3d70b979fa SHA512 659bbe3d2e15f3f59e3bb21d73b420c35c29c3e63e56c97faa15deeb6c3615005c3cc0e7577f7b8b44924499f8e8cb45492dd212422516ba6e52457feea13b73 WHIRLPOOL fa6e81996e450535d15d22e54433f3322d2ccddd17a7e6be5b2ee794bf6ed98f8b590ecfa872bfce1d9cf4e14341f3295a1827b6834c52a2c9b16ded05501db5
+AUX mkinitrd-6.0.93-ds.diff 4274 SHA256 1acd2d1b01074190915cff3e25a6a93cd787e0dc7e606949f13dcaf5958f77ca SHA512 dd9880bf594bfd131f0df94ebb904605cfdc4632ee19e552b051956bd4eefe3f7f2189234e03e49db3fcfe041ed6e8859173e71801cf411732a334b4394e8491 WHIRLPOOL f6de3273e95f5e45ce29c9e70f853634d41c213c718be35f323112d60ac21f6b94139187ce81794843910779101d00bbb13edb9dfd5e3a23d0302671c3f30e49
+AUX mkinitrd-ds-grubby_compile.patch 915 SHA256 5397da77b350a3976013cac5df4c8b82eafb684830266f3840532c73f9b08b22 SHA512 1349b7774b92ef954ea3a3421f67261ccc4f660cfb1a9d7d51e6026feb9f551f8e4f315af59c55ea88c2effda0baa4cd21976e89c51fb9ef8e42f29324d62576 WHIRLPOOL 73baafe4e863e0bae6d250a990e43a4ba7ad53d1760809544775a0a2f9895b3b4e4301242dfded244486e14e3912923a0a35cf17a90ea1ed69af802a4b2fc604
+AUX mkinitrd-ds-raid.patch 627 SHA256 d6bff22ef23a6f489d89cce2a8bb120698256890953077f5fbd87039c03c3bd9 SHA512 742fac5f4e6ec84a1b65a429235c73997cf4eb9438ab7cce31027616b8a488a702e50004ad752de9404a6ff57528c72eaa4ad21e07bfce1deae812558db96d74 WHIRLPOOL 16784b8b4cf92e3cbe536288e289dde49503827c7ba3d35b52cb0bd6ad9619fd50c025c6f78b3308d37a57a0a1c87fd52cbd395001a54a0d2201680d747efb87
+AUX mkinitrd-ds-vitalsunion.diff 1724 SHA256 2767e5d0b800a789e061d1742a0a46bf8841339db6656647089845e72c79d1fe SHA512 f212f5dfe69eaefaa0c1d2d9294203d64572a6bb8dce7f88ad2380f10b4141985a2acdee62301a1867cf24ac6eedf479adaf79790f0eb41e5335ff6af9f16e5c WHIRLPOOL 887bd54939b5e428dbb4a6759e7580908c6782cb84b8fb06e9fa9406b97a510179f943a9b6bac214a07be7b5986068f6e0119a297b0e2b8e0300f7c2510f4d6b
+AUX mkinitrd-ds.patch 1440 SHA256 d322997e986cfd4d7510611dfada8a14f934da277aeac9a0af5334d9490557ac SHA512 9945e9e129234becbc93431e6777e3af14cef7afd1cd88d1bbe00040070f91bace43770baf9656c1bc92d0fd8c7143d92d76d4c33567baf8f9844205313ab504 WHIRLPOOL 14ede0b767dfec82653e05a0f9f7a0a2c551345cbab8a9ef2c68045ba4f797d513be799b7d744f303cfe929e4cc7ae34f532e1d64d8a6e0af5ab85bb9e78ff1a
+AUX mkinitrd-lvm_statics.diff 591 SHA256 27112716e4d4be34681341c5c1ef72466f236de8b1042685fad6dd33ed365c24 SHA512 197e54d049a7ffa7202bb88838fd70b7cf68653fcfe0d9da0e723783dd7798f3637ed9b3ab40aaf09fcd9ea6d6d6a82b6b9c4e46776f1c28564f5300da9fcb17 WHIRLPOOL c4f261d40fd544bd6a0341aa4130e80c155a83b907ee2c05964e8112f29c24e7cba69e53f089505aa0562bb0259d7d5fcb2d9c2e644c21ecbbfc4da1dfeade47
+AUX mkinitrd-mdk-patches-6.0.93.tar.bz2 21199 SHA256 77ba2883898df0bd941f570f3159d7c1bc7196deeadd83ebaef4fcb50654bfaf SHA512 9c2035ebccd2502414b71809e1c63951cbcf25aaf8341e84e87798dbf50231b60c742d9c1b569c3e854e6ba09946bb56824b367a09be7fc4b19281e2a084c406 WHIRLPOOL 9c4c5f414dc101a2c6411ed99e472913e6a491b0b1b9bf6431bc47588d5b3723b717bbfb57ae1dd02c3280dc32a0317d06bdb42fb5d4b5774cf3d83520143200
+AUX mkinitrd-swsusp2.patch 572 SHA256 ff4ba1a38616f5a30895b1eb8c7f80a0fcee021a17a07fdf1048bd1f5dc503ea SHA512 6a28d0d6558e6f5dc0faad850b8a090084fbfad00e68b7224fa4ad11aeaf9f374a35e8b702eeded1c78595f07c8ac730258fb1f765c36d1bdd256afb513018bc WHIRLPOOL e924736bfe8d510508b0ae3b68a9a728797a3064a660e833eef8697b56511a8ef0bf8408a6d28a08e5e5baa16b7bb46f193d1a71a1d8ac5ff74b174a9f188d67
+AUX nash-ds-remount.patch 1970 SHA256 9352e187e1cc4e2244e7e81389794f2d9c7c6b35f34d9c9b5001b8ca69b96c91 SHA512 bc06519abe9563895c5a54ad51ab9dfc117ef1c5b429649bdc94ee936c7cd021cfd1708dd2193e8edec972868e22bd917fe37d267ab821285f316efdc372ff06 WHIRLPOOL aac4dec3a51dd3f8135f8c38332d0c7cd6a1d078739962b9718077066780a46e4defb582765b85be1524ac656c6256a19da82b56ad7bff69e1fbc1fb51eff2d2
+DIST mdadm-2.1.tar.bz2 103201 SHA256 4a963abf294ca18eee47940c14a01101694f1653112f19c90dc332e9fe24ee2e SHA512 adb1d460ebfe22caaa3aefa7686df4b468c65bd08323edd0bf1728736859df2d369b0f4fd1e13ff2905c9d6d7181a38e99b61fec442e930efcc2d0b7e776eb4a WHIRLPOOL 7400d7b5d304a849ceba762b91bd5f6a628cb5ac111dd7ed7e018ab71363dc8c8b5e330a98ef3f7d450896c8991b39e3c0c67aa30b9e782ead69355204973d76
+DIST mkinitrd-4.2.17.tar.bz2 65568 SHA256 998dd8f89d6ff6d8ea31b922045574d2d5b344590ef39e7ed4fe277cd96811f5 SHA512 8bf3b65543cf167d8c5e74b058003322b3d0e23620a98714a7b819ebbab56e03d9213611fc1bf56a5063d10e3ef341f79e89e0af987db2ea80e71e5355febf49 WHIRLPOOL 460b290ef10ccaedfed5af283c1eab1f804e533e4914ba06c914c768fb94daf3dac734edb769b6204546360499140872c2812c97d2d793469a676afa3b7fd59e
+DIST mkinitrd-6.0.93.tar.bz2 124410 SHA256 7aeaf2e9ab1f78070173e2666dd2b6501cf7d39d9617611b3dc6b38fe083b68d SHA512 080019cffd561e00ca055528265fd30dd475e6fc82e0676ca153ab388aa2f731cd8929822d06fc6fec2f770eb1577e592e99b247e64985c4df6f3b8d4167b9e7 WHIRLPOOL 9fe945433124155b4d0b98ab275030dbbfa831c7a50f26e824821fb2fa5d62cd44ac566a3708ea0ae3e66b7a7ac6d9d243d178f18594eb27b891f12c2a172efd
+EBUILD mkinitrd-4.2.17-r3.ebuild 1871 SHA256 19dd0003e48065cfab52fb61662e6b6d765a4fb9a5b95ed30b489b87a4d88391 SHA512 d53c4d200e56b902e158126be0bfb55f8365181aad5abb73f9bf9b149e2a18c4b045b65ed60bb513b7f8e7d510fe998c43a620035308832ea24ae0ee581986ca WHIRLPOOL fc6973c95f7c78903f43d07c2f954c81d18c9cb6160fc58319f2ce93a649becd6a1bb7f0b3f3805202498c62402c12a51c0cde04e6506c1301f0ccb11da9cd35
+EBUILD mkinitrd-6.0.93-r1.ebuild 1152 SHA256 099d59d9505e63ed9effe1fc2102352fc3b50e22d41138e5d242af236e2cdf67 SHA512 2f1c62e3e87c53d5029d64d98fcf8b944a294ca5d8e7b153e27cc9322fffdf1180abebea26b3635f57bbad8162e5fb7e4fa200c1bc2fda263e773c04dbd996d0 WHIRLPOOL 0da5bda7c1a1afd68201f81c45be363af0c4825d8f8bc2a1bce2f87f0619dc743b05c831305965f8829c1c62000ed7c2998a3150e11b0642c89c42dbe43f19ce
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
new file mode 100644
index 0000000..2adced7
--- /dev/null
+++ b/sys-apps/mkinitrd/files/mkinitrd-4.2.17-mdk.patch.bz2
Binary files differ
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
new file mode 100644
index 0000000..9bc6425
--- /dev/null
+++ b/sys-apps/mkinitrd/files/mkinitrd-mdk-patches-6.0.93.tar.bz2
Binary files differ
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;
diff --git a/sys-apps/mkinitrd/mkinitrd-4.2.17-r3.ebuild b/sys-apps/mkinitrd/mkinitrd-4.2.17-r3.ebuild
new file mode 100644
index 0000000..8fb632b
--- /dev/null
+++ b/sys-apps/mkinitrd/mkinitrd-4.2.17-r3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mkinitrd/mkinitrd-4.2.0.3.ebuild,v 1.2 2005/08/29 01:56:57 vapier Exp $
+
+inherit eutils flag-o-matic
+
+MDVER="2.1"
+
+DESCRIPTION="Tools for creating initrd images"
+HOMEPAGE="http://www.redhat.com/"
+SRC_URI="http://dside.dyndns.org/files/darklin/mkinitrd/${P}.tar.bz2
+ mirror://kernel/linux/utils/raid/mdadm/mdadm-${MDVER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="selinux"
+
+DEPEND="dev-libs/popt
+ virtual/os-headers"
+RDEPEND="app-shells/bash"
+PDEPEND="selinux? ( sys-apps/policycoreutils )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ cd "${S}"
+ unpack mdadm-${MDVER}.tar.bz2
+ tar xjf ${FILESDIR}/mkinitrd-insmod-3.5.24.tar.bz2
+ tar xjf ${FILESDIR}/mdadm-2.1.tar.bz2
+ epatch "${FILESDIR}"/mkinitrd-${PV}-mdk.patch.bz2 || die
+ epatch "${FILESDIR}"/mkinitrd-ds.patch || die
+ epatch "${FILESDIR}"/mkinitrd-ds-raid.patch || die
+ epatch "${FILESDIR}"/mkinitrd-swsusp2.patch || die
+#SDS
+ epatch "${FILESDIR}"/mkinitrd-ds-grubby_compile.patch || die
+#EDS
+ epatch "${FILESDIR}"/nash-ds-remount.patch || die
+
+ # bug 29694 -- Change vgwrapper to static vgscan and vgchange
+# epatch "${FILESDIR}"/mkinitrd-lvm_statics.diff
+ sed -i \
+ -e "/^CFLAGS/s: -Werror : ${CFLAGS} :" \
+ -e "/^LDFLAGS/s:$: ${LDFLAGS}:" \
+ grubby/Makefile nash/Makefile
+
+ cd mdadm-* || die
+ epatch "${FILESDIR}"/mdadm-ds-static.patch || die
+}
+
+src_compile() {
+ cd "${S}"/nash
+ emake || die "nash compile failed."
+ cd "${S}"/grubby
+ emake || die "grubby compile failed."
+ cd "${S}"/mdadm-*
+ emake || die "mdadm compile failed."
+
+}
+
+src_install() {
+ into /
+ dosbin grubby/grubby nash/nash mkinitrd || die
+ install -c -m 755 mdadm-*/mdadm ${D}/sbin/mdadm.static || die
+ doman grubby/grubby.8 nash/nash.8 mkinitrd.8
+}
diff --git a/sys-apps/mkinitrd/mkinitrd-6.0.93-r1.ebuild b/sys-apps/mkinitrd/mkinitrd-6.0.93-r1.ebuild
new file mode 100644
index 0000000..418a001
--- /dev/null
+++ b/sys-apps/mkinitrd/mkinitrd-6.0.93-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mkinitrd/mkinitrd-4.2.0.3.ebuild,v 1.2 2005/08/29 01:56:57 vapier Exp $
+
+EAPI=4
+inherit eutils flag-o-matic
+
+MDVER="2.1"
+
+DESCRIPTION="Tools for creating initrd images"
+HOMEPAGE="http://www.redhat.com/"
+SRC_URI="http://dside.dyndns.org/files/darklin/mkinitrd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="selinux"
+
+DEPEND="dev-libs/popt
+ virtual/os-headers"
+RDEPEND="app-shells/bash"
+PDEPEND="selinux? ( sys-apps/policycoreutils )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ cd "${S}"
+ tar xjf "${FILESDIR}"/mkinitrd-mdk-patches-6.0.93.tar.bz2
+ for name in patches/*; do
+ epatch $name || die
+ done
+ epatch "${FILESDIR}"/mkinitrd-ds-vitalsunion.diff || die
+ epatch "${FILESDIR}"/mkinitrd-6.0.93-ds.diff || die
+ find . -name "Makefile*" -exec sed -i 's|-Werror||g' {} \;
+ sed -i -e 's|CFLAGS\s*[\?]=|CFLAGS +=|g' -e 's|LDFLAGS\s*[\?]=|LDFLAGS +=|g' Makefile.inc
+}
+
+src_compile() {
+ emake || die "compile failed."
+
+}
+
+src_install() {
+ into /
+ emake DESTDIR="${D}" install
+}
+