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-ba9dfbe2cb84cleanup-cruft
parent
76b0593f47
commit
c239493fcd
Binary file not shown.
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)
|
Loading…
Reference in new issue