Added a patch from Alan Hourihane <alanh@fairlite.demon.co.uk> for mdadm support in busybox from bug #172128. This is genkernel 3.4.9_pre4 for testing.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@549 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 17 years ago
parent 76b0593f47
commit c239493fcd

@ -2,6 +2,20 @@
# Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
30 Oct 2007; Chris Gianelloni <wolf31o2@gentoo.org>
-pkg/suspend-0.5-Makefile.patch, -pkg/busybox-1.1.3+gentoo.tar.bz2,
-pkg/devfsd-1.3.25-dietlibc.patch,
-pkg/devfsd-1.3.25-dietlibc-kernel25.tar.bz2, alpha/busy-config,
gen_cmdline.sh, gen_compile.sh, gen_determineargs.sh, gen_initramfs.sh,
generic/initrd.defaults, generic/initrd.scripts, generic/linuxrc,
genkernel, ia64/busy-config, mips/busy-config, parisc/busy-config,
parisc64/busy-config, ppc/busy-config, ppc64/busy-config,
sparc/busy-config, sparc64/busy-config, um/busy-config, x86/busy-config,
x86/modules_load, x86_64/busy-config, xen0/busy-config, xenU/busy-config:
Added a patch from Alan Hourihane <alanh@fairlite.demon.co.uk> for mdadm
support in busybox from bug #172128. This is genkernel 3.4.9_pre4 for
testing.
30 Oct 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_initramfs.sh,
generic/initrd.scripts, generic/linuxrc:
Made a few minor cleanups here and there.

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -81,6 +81,7 @@ longusage() {
echo " first"
echo " --lvm Include LVM support"
echo " --lvm2 Include LVM support"
echo " --mdadm Copy /etc/mdadm.conf to initramfs"
echo " --dmraid Include DMRAID support"
echo " --slowusb Enables extra pauses for slow USB CD boots"
echo " --bootloader=grub Add new kernel to GRUB configuration"
@ -229,6 +230,10 @@ parse_cmdline() {
echo
print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
;;
--mdadm)
CMD_MDADM=1
print_info 2 "CMD_MDADM: $CMD_MDADM"
;;
--no-busybox)
CMD_NO_BUSYBOX=1
print_info 2 "CMD_NO_BUSYBOX: ${CMD_NO_BUSYBOX}"

@ -440,6 +440,7 @@ compile_busybox() {
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
sed -i ${BUSYBOX_DIR}/.config -e 's/#\? \?CONFIG_FEATURE_INSTALLER[ =].*/CONFIG_FEATURE_INSTALLER=y/g'
cd "${BUSYBOX_DIR}"
patch -p1 < "${GK_SHARE}/pkg/busybox-1.1.3+gentoo-mdadm.patch"
print_info 1 'busybox: >> Configuring...'
yes '' 2>/dev/null | compile_generic oldconfig utils

@ -412,6 +412,13 @@ determine_real_args() {
DMRAID=0
fi
if isTrue "${CMD_MDADM}"
then
MDADM=1
else
MDADM=0
fi
get_KV
UNIONFS_MODULES_BINCACHE=`kv_replace "${UNIONFS_MODULES_BINCACHE}"`
}

@ -226,6 +226,23 @@ append_evms(){
rm -r "${TEMP}/initramfs-evms-temp/"
}
append_mdadm(){
if [ -d "${TEMP}/initramfs-mdadm-temp" ]
then
rm -r "${TEMP}/initramfs-mdadm-temp/"
fi
cd ${TEMP}
mkdir -p "${TEMP}/initramfs-mdadm-temp/etc/"
if [ "${MDADM}" -eq '1' ]
then
cp -a /etc/mdadm.conf "${TEMP}/initramfs-udev-temp/etc" \
|| gen_die "Could not copy mdadm.conf!"; }
fi
cd "${TEMP}/initramfs-mdadm-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -rf "${TEMP}/initramfs-mdadm-temp" > /dev/null
}
append_splash(){
if [ -x /usr/bin/splash_geninitramfs ] || [ -x /sbin/splash_geninitramfs ]
then
@ -430,6 +447,7 @@ create_initramfs() {
append_data 'lvm' "${LVM}"
append_data 'dmraid' "${DMRAID}"
append_data 'evms' "${EVMS}"
append_data 'mdadm' "${MDADM}"
if [ "${NOINITRDMODULES}" = '' ]
then

@ -78,5 +78,5 @@ CONSOLE="/dev/console"
# Only sections that are in by default or those that
# are not module groups need to be defined here...
HWOPTS='usb firewire keymap cache pata sata evms lvm dmraid mdraid slowusb fs'
MY_HWOPTS='usb firewire pata sata dmraid mdraid fs net'
HWOPTS='usb firewire keymap cache pata sata evms lvm dmraid mdadm slowusb fs'
MY_HWOPTS='usb firewire pata sata dmraid mdadm fs net'

@ -602,6 +602,15 @@ startVolumes() {
ln -sf /dev/device-mapper /dev/mapper/control
fi
if [ "${USE_MDADM}" -eq '1' ]
then
if [ ! -e '/etc/mdadm.conf' ]
then
/sbin/mdadm --examine > /etc/mdadm.conf
fi
/sbin/mdadm --assemble
fi
if [ "${USE_DMRAID_NORMAL}" -eq '1' ]
then
if [ -e '/sbin/dmraid' ]

@ -108,6 +108,9 @@ do
dolvm)
USE_LVM_NORMAL=1
;;
domdadm)
USE_MDADM=1
;;
dodmraid)
USE_DMRAID_NORMAL=1
;;

@ -1,7 +1,7 @@
#!/bin/bash
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
GK_V='3.4.9_pre3'
GK_V='3.4.9_pre4'
# Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option.

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -372,6 +372,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
# CONFIG_MKSWAP is not set

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

Binary file not shown.

@ -1,225 +0,0 @@
diff -ruN devfsd.old/DIETLIBC devfsd/DIETLIBC
--- devfsd.old/DIETLIBC 1969-12-31 19:00:00.000000000 -0500
+++ devfsd/DIETLIBC 2003-12-09 14:07:52.668863472 -0500
@@ -0,0 +1,8 @@
+To build using dietlibc, run like this:
+
+CC="diet gcc" make has_dlopen=0 has_rpcsvc=0
+
+It will strip out the stuff that dietlibc doesn't
+support.
+
+
diff -ruN devfsd.old/GNUmakefile devfsd/GNUmakefile
--- devfsd.old/GNUmakefile 2003-12-09 12:34:13.000000000 -0500
+++ devfsd/GNUmakefile 2003-12-09 14:04:14.728995368 -0500
@@ -8,22 +8,34 @@
KERNEL_DIR = /usr/src/linux
endif
+has_dlopen := 0
+has_rpcsvc := 0
+
nsl_libs := $(wildcard /lib/libnsl.so.*)
+
ifneq ($(nsl_libs),)
-LIBNSL = $(shell for file in /lib/libnsl.so.[0-9]* ; do echo $$file ; done | sort -t . -n -k 2 | head -1)
+LIBNSL = $(shell for file in /lib/libnsl.so.[0-9]* ; do echo $$file ; done | sort -t . -n -k 2 | head -n1)
DEFINES += -DLIBNSL="\"$(LIBNSL)\""
endif
+ifneq ($(has_dlopen),1)
+DEFINES += -DNO_DLOPEN
+else
+LIBS += -ldl
+endif
+
+ifneq ($(has_rpcsvc),1)
+DEFINES += -DNO_RPCSVC
+endif
all: devfsd rpm.spec
-
OBJECTS = devfsd.o expression.o compat_name.o check_kernel.o
CFLAGS = -O2 -I. -I$(KERNEL_DIR)/include -Wall $(CEXTRAS) $(DEFINES)
devfsd: $(OBJECTS)
- $(CC) -O2 -o devfsd $(OBJECTS) $(LDFLAGS) -export-dynamic -ldl
+ $(CC) -O2 -o devfsd $(OBJECTS) $(LDFLAGS) -export-dynamic $(LIBS)
check_kernel.o: check_kernel.c
$(CC) -fomit-frame-pointer -O2 -c $<
diff -ruN devfsd.old/devfsd.c devfsd/devfsd.c
--- devfsd.old/devfsd.c 2003-12-09 12:34:13.000000000 -0500
+++ devfsd/devfsd.c 2003-12-09 14:05:45.967125064 -0500
@@ -282,9 +282,13 @@
#include <signal.h>
#include <regex.h>
#include <errno.h>
+#ifndef NO_DLOPEN
#include <dlfcn.h>
+#endif
+#ifndef NO_RPCSVC
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>
+#endif
#include <karma.h>
#include "devfsd.h"
#include "version.h"
@@ -419,9 +423,15 @@
static void read_config_file (CONST char *path, flag optional,
unsigned long *event_mask);
static void process_config_line (CONST char *line, unsigned long *event_mask);
+
+#ifndef NO_DLOPEN
static void *dlsym_nofail (const char *file, void *handle, char *symbol);
+#endif
+
+#ifndef NO_RPCSVC
static int process_yp_line (int instatus, char *inkey, int inkeylen,
char *inval, int invallen, char *indata);
+#endif
static void load_libnsl (void);
static flag do_servicing (int fd, unsigned long event_mask);
static void service_name (const struct devfsd_notify_struct *info);
@@ -492,9 +502,11 @@
{"fd/2", "stderr"},
{NULL, NULL},
};
+#ifndef NO_RPCSVC
static int (*my_yp_all) (char *domain, char *map,
struct ypall_callback *callback); /* = NULL */
static int (*my_yp_get_default_domain) (char **domainptr); /* = NULL */
+#endif
static struct event_type
{
unsigned int type; /* The DEVFSD_NOTIFY_* value */
@@ -720,6 +732,7 @@
[RETURNS] Nothing.
*/
{
+#ifndef NO_RPCSVC
if (location[0] == '+')
{
/* It's a YP map */
@@ -742,7 +755,8 @@
SYSLOG (LOG_ERR, "error reading map: \"%s\"\n", location + 1);
exit (1);
}
- read_config_file (location, optional, event_mask);
+#endif
+ read_config_file (location, optional, event_mask);
} /* End Function read_config */
static void read_config_file (CONST char *path, flag optional,
@@ -919,6 +933,7 @@
}
new->u.execute.argv[num_args] = NULL;
}
+#ifndef NO_DLOPEN
else if ( (strcasecmp (what, "MFUNCTION") == 0) ||
(strcasecmp (what, "CFUNCTION") == 0) )
{
@@ -950,6 +965,7 @@
}
new->u.function.argv[num_args] = NULL;
}
+#endif
else if (strcasecmp (what, "COPY") == 0)
{
new->action.what = AC_COPY;
@@ -1001,6 +1017,7 @@
last_config = new;
} /* End Function process_config_line */
+#ifndef NO_DLOPEN
static void *dlsym_nofail (const char *file, void *handle, char *symbol)
{
void *result = dlsym (handle, symbol);
@@ -1011,9 +1028,11 @@
}
return (result);
} /* End Function dlsym_nofail */
+#endif
static void load_libnsl (void)
{
+#ifndef NO_RPCSVC
#ifdef LIBNSL /* It comes from a shared object */
void *libnsl_handle;
@@ -1031,8 +1050,10 @@
my_yp_all = yp_all;
my_yp_get_default_domain = yp_get_default_domain;
#endif
+#endif
} /* End Function load_libnsl */
+#ifndef NO_RPCSVC
static int process_yp_line (int instatus, char *inkey, int inkeylen,
char *inval, int invallen, char *indata)
{
@@ -1040,6 +1061,7 @@
if (invallen > 0) process_config_line (inval, (unsigned long *) indata);
return (0);
} /* End Function process_yp_line */
+#endif
static flag do_servicing (int fd, unsigned long event_mask)
/* [SUMMARY] Service devfs changes until a signal is received.
@@ -1232,6 +1254,7 @@
if (first_time)
{
+#ifndef NO_DLOPEN
void *lib;
first_time = FALSE;
@@ -1242,7 +1265,10 @@
}
else if (trace_level > 1)
fprintf (stderr, "/lib/modutils.so load failure: %s\n",dlerror() );
- }
+#else
+ fprintf(stderr, "dlopen() not supported in this build");
+#endif
+ }
argv[0] = "/sbin/modprobe";
argv[1] = "-k";
argv[2] = "-C";
@@ -1746,6 +1772,7 @@
}
first_config = NULL;
last_config = NULL;
+#ifndef NO_DLOPEN
for (so_entry = first_so; so_entry != NULL; so_entry = next)
{
next = so_entry->next;
@@ -1753,6 +1780,7 @@
if (so_entry->handle != RTLD_DEFAULT) dlclose (so_entry->handle);
free (so_entry);
}
+#endif
first_so = NULL;
} /* End Function free_config */
@@ -2055,6 +2083,7 @@
[RETURNS] A pointer to the object on success, else NULL.
*/
{
+#ifndef NO_DLOPEN
struct shared_object *so;
for (so = first_so; so != NULL; so = so->next)
@@ -2085,6 +2114,9 @@
so->next = first_so;
first_so = so;
return (so);
+#else
+ return(NULL);
+#endif
} /* End Function get_shared_object */
static flag expand_expression(char *output, unsigned int outsize,

@ -1,56 +0,0 @@
From: Daniel Drake <ddrake@brontes3d.com>
Index: suspend-0.5/Makefile
===================================================================
--- suspend-0.5.orig/Makefile
+++ suspend-0.5/Makefile
@@ -1,14 +1,14 @@
#CONFIG_COMPRESS=yes
#CONFIG_ENCRYPT=yes
#CONFIG_SPLASHY=yes
-#CONFIG_UDEV=yes
+CONFIG_UDEV=yes
ARCH:=$(shell uname -m)
-CC_FLAGS=-I/usr/local/include
-LD_FLAGS=-L/usr/local/lib
+CC_FLAGS?=-I/usr/local/include
+LD_FLAGS?=-L/usr/local/lib
-CFLAGS := -O2 -Wall
+CFLAGS ?= -O2 -Wall
ifdef CONFIG_COMPRESS
CC_FLAGS += -DCONFIG_COMPRESS
@@ -22,7 +22,7 @@ CC_FLAGS += $(GCRYPT_CC_FLAGS)
LD_FLAGS += $(GCRYPT_LD_FLAGS)
endif
-SUSPEND_DIR=/usr/local/sbin
+SUSPEND_DIR?=/usr/local/sbin
CONFIG_DIR=/etc
RESUME_DEVICE=<path_to_resume_device_file>
BOOT_DIR=/boot
@@ -31,7 +31,7 @@ S2BOTH=s2both
S2DISK=s2disk
CONFIGFILE=suspend.conf
-ifndef CONFIG_UDEV
+ifneq ($(CONFIG_UDEV), yes)
SNAPSHOT=$(DESTDIR)/dev/snapshot
endif
@@ -145,9 +145,9 @@ install-s2disk: $(S2DISK) swap-offset co
if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else install --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR); fi
install: $(S2DISK) $(S2BOTH) swap-offset conf/$(CONFIGFILE) $(SNAPSHOT)
- install --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)
+ install -D --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)/$(S2DISK)
install --mode=755 $(S2BOTH) $(DESTDIR)$(SUSPEND_DIR)
- if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else install --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR); fi
+ if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else install -D --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); fi
install --mode=755 s2ram $(DESTDIR)$(SUSPEND_DIR)
install --mode=755 resume $(DESTDIR)$(SUSPEND_DIR)
install --mode=755 swap-offset $(DESTDIR)$(SUSPEND_DIR)

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -373,6 +373,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_HEXDUMP is not set
# CONFIG_HWCLOCK is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
CONFIG_MDSTART=y
# CONFIG_MKSWAP is not set

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -6,7 +6,7 @@ MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10"
MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
MODULES_MDADM="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10"
# Hardware (IDE/SCSI/SATA)

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

@ -376,6 +376,7 @@ CONFIG_FREERAMDISK=y
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_MDADM=y
CONFIG_MDEV=y
# CONFIG_FEATURE_MDEV_CONF is not set
CONFIG_MDSTART=y

Loading…
Cancel
Save