diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-09-21 00:16:19 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-09-21 00:16:19 +0000 |
commit | 817d58b109d801f2432fb3c42afab98d15b84fca (patch) | |
tree | fb67e635cbcb364cf2fe27e4d1c3bcd5ff6fd194 /sys-fs/devfsd | |
parent | Some more kernel 2.[56] cleanups. (diff) | |
download | gentoo-2-817d58b109d801f2432fb3c42afab98d15b84fca.tar.gz gentoo-2-817d58b109d801f2432fb3c42afab98d15b84fca.tar.bz2 gentoo-2-817d58b109d801f2432fb3c42afab98d15b84fca.zip |
Some more kernel 2.[56] cleanups.
Diffstat (limited to 'sys-fs/devfsd')
-rw-r--r-- | sys-fs/devfsd/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/devfsd/Manifest | 7 | ||||
-rw-r--r-- | sys-fs/devfsd/devfsd-1.3.25-r5.ebuild | 49 | ||||
-rw-r--r-- | sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch | 131 | ||||
-rw-r--r-- | sys-fs/devfsd/files/digest-devfsd-1.3.25-r5 | 1 |
5 files changed, 192 insertions, 4 deletions
diff --git a/sys-fs/devfsd/ChangeLog b/sys-fs/devfsd/ChangeLog index 43899b78e40e..4d6c30700287 100644 --- a/sys-fs/devfsd/ChangeLog +++ b/sys-fs/devfsd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/devfsd # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/ChangeLog,v 1.1 2003/09/15 17:46:24 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/ChangeLog,v 1.2 2003/09/21 00:16:09 azarah Exp $ + +*devfsd-1.3.25-r5 (21 Sep 2003) + + 21 Sep 2003; Martin Schlemmer <azarah@gentoo.org> devfsd-1.3.25-r5.ebuild, + files/devfsd-1.3.25-kernel-2.5.patch: + Some more kernel 2.[56] cleanups. *devfsd-1.3.25-r4 (15 Sep 2003) diff --git a/sys-fs/devfsd/Manifest b/sys-fs/devfsd/Manifest index fd0336795b39..12a100a62132 100644 --- a/sys-fs/devfsd/Manifest +++ b/sys-fs/devfsd/Manifest @@ -1,13 +1,14 @@ MD5 31cb9c2bfe7cfa9604edbfba5539258d devfsd-1.3.24.ebuild 999 MD5 e0be193f061cfa8c6f412a8464b2cfa9 devfsd-1.3.25-r1.ebuild 1153 -MD5 640165ae91e36c882564401b376a7661 devfsd-1.3.25-r5.ebuild 1185 +MD5 cfc96cf0aa0ed1291972b23c0551d7ed devfsd-1.3.25-r5.ebuild 1186 MD5 c47c41f4edcc2d455c965e08cffb1d07 devfsd-1.3.25-r3.ebuild 1180 +MD5 bdf3706f345d31df0177131195d0a0c0 devfsd-1.3.25-r4.ebuild 1188 MD5 bd5bf15be3a4ba655c24dd8c137c3de5 devfsd-1.3.25-r2.ebuild 1157 -MD5 7b73562a0482df3807afd92330f0611d ChangeLog 3066 +MD5 05681398293f8bc1b90eb26276609490 ChangeLog 3252 MD5 2e362bf6cec7b894e29ce218c4215c91 devfsd-1.3.25.ebuild 1021 MD5 b8ec7858c1ac54c47302ca839a52188f files/digest-devfsd-1.3.25-r4 65 MD5 b8ec7858c1ac54c47302ca839a52188f files/digest-devfsd-1.3.25-r3 65 -MD5 b488fdc6bcd5a05316a59f140a9a8511 files/devfsd-1.3.25-kernel-2.5.patch.bz2 1563 +MD5 b64f47136c8298cec42e00df32c4276f files/devfsd-1.3.25-kernel-2.5.patch.bz2 1556 MD5 41a6be534a78f5a0ad994b10e4134e6e files/devfsd-1.3.25-kernel-2.5.patch 3929 MD5 b8ec7858c1ac54c47302ca839a52188f files/digest-devfsd-1.3.25-r1 65 MD5 f59c1fb784ac9e8f41530ecd2036e33e files/digest-devfsd-1.3.24 65 diff --git a/sys-fs/devfsd/devfsd-1.3.25-r5.ebuild b/sys-fs/devfsd/devfsd-1.3.25-r5.ebuild new file mode 100644 index 000000000000..31003555d9fe --- /dev/null +++ b/sys-fs/devfsd/devfsd-1.3.25-r5.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/devfsd-1.3.25-r5.ebuild,v 1.1 2003/09/21 00:16:09 azarah Exp $ + +IUSE="" + +inherit eutils + +S="${WORKDIR}/${PN}" +DESCRIPTION="Daemon for the Linux Device Filesystem" +SRC_URI="ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/daemons/devfsd/devfsd-v${PV}.tar.gz" +HOMEPAGE="http://www.atnf.csiro.au/~rgooch/linux/" + +KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ia64" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="virtual/glibc" + +src_unpack() { + unpack ${A} + + # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml + has_version 'sys-devel/hardened-gcc' && append-flags '-yet_exec' + + cd ${S} + epatch ${FILESDIR}/${P}-kernel-2.5.patch + + sed -e "s:-O2:${CFLAGS}:g" \ + -e 's:/usr/man:/usr/share/man:' \ + -e '32,34d;11,16d' -e '6c\' \ + -e 'DEFINES := -DLIBNSL="\\"/lib/libnsl.so.1\\""' \ + -i GNUmakefile +} + +src_compile() { + make || die +} + +src_install() { + dodir /sbin /usr/share/man /etc + make PREFIX=${D} install || die + + #config file is handled in baselayout + rm -f ${D}/etc/devfsd.conf + + dodoc devfsd.conf COPYING* INSTALL +} + diff --git a/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch b/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch new file mode 100644 index 000000000000..bafa600c31ce --- /dev/null +++ b/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch @@ -0,0 +1,131 @@ +diff -urpN devfsd/GNUmakefile devfsd.kernel25/GNUmakefile +--- devfsd/GNUmakefile 2003-09-21 02:09:45.082973960 +0200 ++++ devfsd.kernel25/GNUmakefile 2003-09-21 02:10:23.317161480 +0200 +@@ -12,13 +12,16 @@ endif + all: devfsd rpm.spec + + +-OBJECTS = devfsd.o expression.o compat_name.o ++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 + ++check_kernel.o: check_kernel.c ++ $(CC) -fomit-frame-pointer -O2 -c $< ++ + install: devfsd + if [ ! -e $(SBINDIR) ]; then mkdir -p $(SBINDIR); fi + rm -f $(SBINDIR)/devfsd +diff -urpN devfsd/check_kernel.c devfsd.kernel25/check_kernel.c +--- devfsd/check_kernel.c 1970-01-01 02:00:00.000000000 +0200 ++++ devfsd.kernel25/check_kernel.c 2003-09-21 01:59:56.645430064 +0200 +@@ -0,0 +1,44 @@ ++#include <sys/types.h> ++#include <stdio.h> ++#include <unistd.h> ++#include <errno.h> ++#include <asm/unistd.h> ++ ++extern char *modules_devfs; ++ ++/* copied over from module-init-tools backward_compat.c */ ++#ifndef __ia64 /* breaks ia64. */ ++static _syscall2(long, create_module, const char *, name, size_t, size); ++#else ++#define create_module(name, size) \ ++ syscall(__NR_create_module, (name), (size)) ++#endif ++ ++/* returns true if we have a 2.5.48+ kernel */ ++int check_kernel_version (int verbose) ++{ ++ int k25 = 1; ++ ++ errno = 0; ++ if (create_module(NULL, 0) >= 0 /* Uh oh, what have I just done? */ ++ || errno != ENOSYS) ++ k25 = 0; ++ ++ if (verbose) ++ fprintf (stderr, "devfsd: kernel %s detected\n", ++ k25 ? "2.5.48+" : "2.4"); ++ ++ return k25; ++} ++ ++void update_config_file (int verbose) ++{ ++ int k25 = check_kernel_version (verbose); ++ ++ if (k25) ++ modules_devfs = "/etc/modules.devfs"; ++ ++ if (verbose) ++ fprintf (stderr, "devfsd: using %s for MODLOAD\n", modules_devfs); ++} ++ +diff -urpN devfsd/devfsd.c devfsd.kernel25/devfsd.c +--- devfsd/devfsd.c 2003-09-21 02:06:10.763555464 +0200 ++++ devfsd.kernel25/devfsd.c 2003-09-21 02:12:17.482805664 +0200 +@@ -396,10 +396,16 @@ EXTERN_FUNCTION (flag st_expr_expand, + EXTERN_FUNCTION (const char *get_old_name, + (const char *devname, unsigned int namelen, + char *buffer, unsigned int major, unsigned int minor) ); +- ++EXTERN_FUNCTION (int check_kernel_version, ++ (int) ); ++EXTERN_FUNCTION (void update_config_file, ++ (int) ); + + /* Public data */ + flag syslog_is_open = FALSE; ++/* set to new style, runtime test will override it later */ ++char *modules_devfs = "/etc/modules.devfs"; ++ + + + /* Public functions */ +@@ -507,7 +513,6 @@ static struct event_type + {0xffffffff, NULL, NULL} + }; + +- + /* Public functions follow */ + + int main (int argc, char **argv) +@@ -651,6 +656,7 @@ int main (int argc, char **argv) + /* Set umask so that mknod(2), open(2) and mkdir(2) have complete control + over permissions */ + umask (0); ++ update_config_file (trace_level); + read_config (CONFIG_FILE, FALSE, &event_mask); + /* Do the scan before forking, so that boot scripts see the finished + product */ +@@ -1217,7 +1223,7 @@ static void action_modload (const struct + [RETURNS] Nothing. + */ + { +- char *argv[6]; ++ char *argv[7]; + char device[STRING_LENGTH]; + char *env[4] = {"HOME=/", "TERM=linux", /* Safe mode environment */ + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL}; +@@ -1240,9 +1246,13 @@ static void action_modload (const struct + argv[0] = "/sbin/modprobe"; + argv[1] = "-k"; + argv[2] = "-C"; +- argv[3] = "/etc/modules.devfs"; ++ argv[3] = modules_devfs; + argv[4] = device; +- argv[5] = NULL; ++ if (check_kernel_version (trace_level)) ++ argv[5] = "-q"; ++ else ++ argv[5] = NULL; ++ argv[6] = NULL; + snprintf (device, sizeof (device), "/dev/%s", info->devname); + if (trace_level > 1) + fprintf (stderr, "%s modprobe with name: \"%s\"\n", diff --git a/sys-fs/devfsd/files/digest-devfsd-1.3.25-r5 b/sys-fs/devfsd/files/digest-devfsd-1.3.25-r5 new file mode 100644 index 000000000000..afd58fffff28 --- /dev/null +++ b/sys-fs/devfsd/files/digest-devfsd-1.3.25-r5 @@ -0,0 +1 @@ +MD5 44c6394b8e2e8feaf453aeddc8a3ee69 devfsd-v1.3.25.tar.gz 42645 |