summaryrefslogtreecommitdiff
path: root/sys-fs/devfsd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/devfsd
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/devfsd')
-rw-r--r--sys-fs/devfsd/Manifest11
-rw-r--r--sys-fs/devfsd/devfsd-1.3.25-r9.ebuild59
-rw-r--r--sys-fs/devfsd/files/devfs-start.sh28
-rw-r--r--sys-fs/devfsd/files/devfs-stop.sh16
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch131
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch69
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-pic.patch16
-rw-r--r--sys-fs/devfsd/files/devfsd.conf138
-rw-r--r--sys-fs/devfsd/metadata.xml8
9 files changed, 476 insertions, 0 deletions
diff --git a/sys-fs/devfsd/Manifest b/sys-fs/devfsd/Manifest
new file mode 100644
index 000000000000..a26c7c95f50e
--- /dev/null
+++ b/sys-fs/devfsd/Manifest
@@ -0,0 +1,11 @@
+AUX devfs-start.sh 622 SHA256 6bb438672192887752e3ab69fac6d47853a9c0b72755f924d0c9d3efe8a7cbc3 SHA512 9087c774a3fdabae1216c6a96e522d09efcc19c6739554d9ae4d7e14b231577bdad0904a3a9a177321c288ea572e252621b0be4bc4cd61962ff6a692531f8003 WHIRLPOOL 9de77a203d854b2b4fe6aa4198a7158c690490541bbfec068caf90d081882c46daca9ff3df41b294a5f65202939241df43b83f3bfa1443bd04b13fbb9a6f0abb
+AUX devfs-stop.sh 326 SHA256 a636a187a1f7193aa264a745e00c527c6532ed107ede743df46acdf5ef5a8fc8 SHA512 0f2784a83e49c39b574a8db137b9ab95947f2946c0f6d2a0d64b4ff6d6bd28fefc7a8049b58a7bf672bdaeea616d32dd3a0eff829f7fa67f715db97b06a2aa19 WHIRLPOOL 40e09b1658c93c12ae8e886368759e9ea370b62f0c61b45b713b5a4f7f5ad6a7e485f03161ef74a7bba220faf20a5431458bfebf901de1a31657f77c15136eef
+AUX devfsd-1.3.25-kernel-2.5.patch 3929 SHA256 1998b639ff9f1cf1be0c51ba69073f153b04d28dcbcc145e63c112187ba7d4b3 SHA512 fce2254b23be6bc85592874ad3c80582dcbc03b114a16eea86d1c087571c34db366c09fb04d0e1565ac4fd52fbcea411bad7965474f84e8b1df194db9cdff082 WHIRLPOOL 86c96d9a32adcca28670c774a9b7141b7dbf40f3bf90dc00b0a904ccd2edfaf25e8e4b2099044ff75ad2cb623570caa74ae3f3dda61b451d81cc1f8f97efe3f5
+AUX devfsd-1.3.25-no-nis.patch 2142 SHA256 9b119575c2de6860b195599f6da87f917495efc52ac80f08d70fc63d26472848 SHA512 17cce86a687e03abc310c8aa886758b26d5a9ddc183f07375d5d9282c303f9a1472af11c441345e49cd7341a2dbad4d87a1b032b340d8ea9d922a7b389513d42 WHIRLPOOL 69bfd5ac5763369d099bccefc4fb0159d4aa7407ef4a7d6540c1c870fd0d3c1969b6c3f2f062415e9eee965697bd341003a029379efecfb06b8433f36e6db9d1
+AUX devfsd-1.3.25-pic.patch 529 SHA256 b04fb0ea11eba34adbce237cf3a94a48c2643073c783576846442b15ac24cbc4 SHA512 1f40e3f043cd96a1055b96088cb523fcabb67ab4e9ceca3ea4c9f963964003c3fa67fa050b9189d295a7ffdecc68d2161c49d2e78fe38b51c9faeff94681cd39 WHIRLPOOL 6e4c11ada33f145b4a86e8bad2805488c6fbd2527f7d45b1f29e265400bf2b2d5566f663a9aff88c77c794b6927eb743440c9ef72000d0946273939a34e516c8
+AUX devfsd.conf 5886 SHA256 8bde233bf1981119bc8b6f0e79a6b090e2a57e875c3578681d9bcf9abcb8203d SHA512 95717275ffe39d9c99fbdf8b562278ec8756aba572aac1d789aa3a089f44138158c882399443ef42a97fd1a7a0500d2ab6e271323b52e4e25e83d2ac96408d15 WHIRLPOOL 006472bf8199315b2943c16fa969df8a3c1058f732e672dcbee28c65f99f3f8b495d1a87b60c23eb35c3709858528eb7b8050eb76e1b96f7ec03ef318292f8b3
+DIST devfsd-v1.3.25.tar.gz 42645 SHA256 d0b030fdc45b989fe8030dbb0c025fb7229228d88e5e4f056d9499f4056f6d08 SHA512 3bf18edb0fc823b96b938b22fc0f978823acfd37708d24d9fec8a25dfdaced165be6162fd5a20bdf30bfc615699faea8239fc77b99c30f035fd7c6b40e7c8c2c WHIRLPOOL a54cbc26c9591601e60a7468f89fd5d3c2dd633984d5787641ea63cba5ce2a566b08dd3dc0e3bc636b584ab6eb35bf7eec31c05a87e7f1c4cb8425fc848dfccd
+EBUILD devfsd-1.3.25-r9.ebuild 1447 SHA256 b9f93b3e20790bb3b8a41d6081190197e3b97f425601c9fc9c41d05c6f00f306 SHA512 874f858953089cea254a24c566437db5e6397d5cddd069752aa9552a17d0e55d4ca6e52a59c7d5b3a4dfc9c9a86e39c319b1f32f34bf8aa1ba273a72f6c1c7a5 WHIRLPOOL be59599a2fcf82ae2b2e69a97bc8cbf31c9c711abc15b869846cc7e9c64c3351074fb8c8f5f25d7100a5db43d8e2efccf5c4f40bcda373cb4b440e1d1d137a52
+MISC ChangeLog 3250 SHA256 cfbc3c181a44ef0630eb15538c879cbcf5f5beb3a31c934086942ecb91e0c0d2 SHA512 da7e9a52098061e09e89911a7f22e2c0e1e2f961eba1094c4ab1131f573ccb9326359feae47c205a1556417419400ed1e0223a9573d37940de7d5b780c78ce3e WHIRLPOOL fd276591765b62426a12a6762c30f5eedd0a7d1de9a89d9b2436566dbfeb2ab69e34ffcad24dff0eef758ff1a2d9e9f319dbe2929df3e3cf2628bf36aaec6f56
+MISC ChangeLog-2015 6743 SHA256 e439e62520719af577679fe2fd1bdd4f2e3307510dbffaab247cc05273b564e7 SHA512 95dc2c83806d693c371a66d6dd216b8a3d6d86d57b39f2c2cf2caa4ffc435166eaca0ce0f89cc1ddeed9777ae4f8c5339d3e437eec6974238274f524d94eb4d5 WHIRLPOOL 86ae64101617fbec515fc4ad334da53a7444dbb3c4acba24d1becb350be054a60bc3973f1c7119f8445d6e920dd2bda94ac5a47d8fb61d7b884fa834d3f7b1a1
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild b/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild
new file mode 100644
index 000000000000..16647cbdbf8b
--- /dev/null
+++ b/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Daemon for the Linux Device Filesystem"
+HOMEPAGE="http://www.atnf.csiro.au/~rgooch/linux/"
+SRC_URI="ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/daemons/devfsd/devfsd-v${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="<sys-kernel/linux-headers-2.6.18"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-kernel-2.5.patch
+ epatch "${FILESDIR}"/${P}-pic.patch
+ epatch "${FILESDIR}"/${P}-no-nis.patch
+
+ use elibc_uclibc || append-cppflags -DHAVE_NIS
+ sed -i \
+ -e "s:-O2:${CFLAGS}:g" \
+ -e 's:/usr/man:/usr/share/man:' \
+ -e 's:/usr/src/linux:.:' \
+ -e '32,34d;11,16d' -e '6c\' \
+ -e 'DEFINES := -DLIBNSL="\\"/lib/libnsl.so.1\\""' \
+ -e 's:install -s:install:' \
+ GNUmakefile
+ use elibc_uclibc && sed -e 's|libnsl.so.1|libnsl.so.0|' -i GNUmakefile
+ tc-export CC
+}
+
+src_install() {
+ dodir /sbin /usr/share/man /etc
+ emake PREFIX="${D}" install
+ dodoc devfsd.conf INSTALL
+
+ keepdir /etc/devfs.d
+ insinto /etc
+ doins "${FILESDIR}"/devfsd.conf
+
+ insinto /lib/rcscripts/addons
+ doins "${FILESDIR}"/devfs-{start,stop}.sh
+}
+
+pkg_postinst() {
+ echo
+ einfo "You may wish to read the Gentoo Linux Device Filesystem Guide,"
+ einfo "which can be found online at:"
+ einfo " https://wwwold.gentoo.org/doc/en/devfs-guide.xml"
+ echo
+}
diff --git a/sys-fs/devfsd/files/devfs-start.sh b/sys-fs/devfsd/files/devfs-start.sh
new file mode 100644
index 000000000000..b8d832494e95
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-start.sh
@@ -0,0 +1,28 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ local mymounts=$(awk '($2 == "devfs") { print "yes"; exit 0 }' /proc/filesystems)
+
+ # Is devfs support compiled in?
+ if [[ ${mymounts} == "yes" ]] ; then
+ if [[ ${devfs_automounted} == "no" ]] ; then
+ ebegin "Mounting devfs at /dev"
+ try mount -n -t devfs devfs /dev
+ eend $?
+ else
+ ebegin "Kernel automatically mounted devfs at /dev"
+ eend 0
+ fi
+ ebegin "Starting devfsd"
+ /sbin/devfsd /dev >/dev/null
+ eend $? "Could not start /sbin/devfsd"
+ else
+ devfs="no"
+ fi
+}
+
+main
+
+
+# vim:ts=4
diff --git a/sys-fs/devfsd/files/devfs-stop.sh b/sys-fs/devfsd/files/devfs-stop.sh
new file mode 100644
index 000000000000..0b4856bc82c7
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-stop.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ # We need to properly terminate devfsd to save the permissions
+ if [[ -n $(ps --no-heading -C 'devfsd') ]]; then
+ ebegin "Stopping devfsd"
+ killall -15 devfsd &>/dev/null
+ eend $?
+ fi
+}
+
+main
+
+
+# vim:ts=4
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/devfsd-1.3.25-no-nis.patch b/sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch
new file mode 100644
index 000000000000..c676b7e980c9
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch
@@ -0,0 +1,69 @@
+--- devfsd/devfsd.c.mps 2003-12-04 15:54:03.000000000 +0100
++++ devfsd/devfsd.c 2003-12-04 16:05:32.000000000 +0100
+@@ -283,8 +283,10 @@
+ #include <regex.h>
+ #include <errno.h>
+ #include <dlfcn.h>
++#ifdef HAVE_NIS
+ #include <rpcsvc/ypclnt.h>
+ #include <rpcsvc/yp_prot.h>
++#endif
+ #include <karma.h>
+ #include "devfsd.h"
+ #include "version.h"
+@@ -414,9 +416,11 @@
+ unsigned long *event_mask);
+ static void process_config_line (CONST char *line, unsigned long *event_mask);
+ static void *dlsym_nofail (const char *file, void *handle, char *symbol);
++#ifdef HAVE_NIS
+ static int process_yp_line (int instatus, char *inkey, int inkeylen,
+ char *inval, int invallen, char *indata);
+ static void load_libnsl (void);
++#endif
+ static flag do_servicing (int fd, unsigned long event_mask);
+ static void service_name (const struct devfsd_notify_struct *info);
+ static void action_permissions (const struct devfsd_notify_struct *info,
+@@ -486,9 +490,11 @@
+ {"fd/2", "stderr"},
+ {NULL, NULL},
+ };
++#ifdef HAVE_NIS
+ 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 */
+@@ -714,6 +720,7 @@
+ [RETURNS] Nothing.
+ */
+ {
++#ifdef HAVE_NIS
+ if (location[0] == '+')
+ {
+ /* It's a YP map */
+@@ -736,6 +743,7 @@
+ SYSLOG (LOG_ERR, "error reading map: \"%s\"\n", location + 1);
+ exit (1);
+ }
++#endif
+ read_config_file (location, optional, event_mask);
+ } /* End Function read_config */
+
+@@ -1006,6 +1014,7 @@
+ return (result);
+ } /* End Function dlsym_nofail */
+
++#ifdef HAVE_NIS
+ static void load_libnsl (void)
+ {
+ #ifdef LIBNSL /* It comes from a shared object */
+@@ -1034,6 +1043,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.
diff --git a/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch b/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch
new file mode 100644
index 000000000000..67e325333c07
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch
@@ -0,0 +1,16 @@
+--- check_kernel.c.orig 2004-02-06 16:41:32.000000000 -0500
++++ check_kernel.c 2004-02-06 16:41:55.000000000 -0500
+@@ -6,13 +6,8 @@
+
+ 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)
diff --git a/sys-fs/devfsd/files/devfsd.conf b/sys-fs/devfsd/files/devfsd.conf
new file mode 100644
index 000000000000..e3b7ee473d86
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd.conf
@@ -0,0 +1,138 @@
+# Sample /etc/devfsd.conf configuration file.
+# Richard Gooch <rgooch@atnf.csiro.au> 17-FEB-2002
+#
+# The Gentoo Linux Team - http://www.gentoo.org/
+# - Many fixes, etc
+#
+
+# Enable full compatibility mode for old device names. You may comment these
+# out if you don't use the old device names. Make sure you know what you're
+# doing!
+REGISTER .* MKOLDCOMPAT
+UNREGISTER .* RMOLDCOMPAT
+
+# You may comment out the above and uncomment the following if you've
+# configured your system to use the original "new" devfs names or the really
+# new names
+#REGISTER ^vc/.* MKOLDCOMPAT
+#UNREGISTER ^vc/.* RMOLDCOMPAT
+#REGISTER ^pty/.* MKOLDCOMPAT
+#UNREGISTER ^pty/.* RMOLDCOMPAT
+#REGISTER ^misc MKOLDCOMPAT
+#UNREGISTER ^misc RMOLDCOMPAT
+
+# You may comment these out if you don't use the original "new" names
+REGISTER .* MKNEWCOMPAT
+UNREGISTER .* RMNEWCOMPAT
+
+# Enable module autoloading. You may comment this out if you don't use
+# autoloading
+LOOKUP .* MODLOAD
+
+# Uncomment the following if you want to set the group to "tty" for the
+# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
+# enable/disable talk requests and wall(1) messages.
+REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
+REGISTER ^pts/.* PERMISSIONS -1.tty 0600
+
+# Uncomment this if you want permissions to be saved and restored
+# NB: Do NOT change the following!
+# Do not do this for pseudo-terminal devices
+REGISTER ^pt[sy]/.* IGNORE
+CHANGE ^pt[sy]/.* IGNORE
+CREATE ^pt[sy]/.* IGNORE
+DELETE ^pt[sy] IGNORE
+REGISTER ^log IGNORE
+CHANGE ^log IGNORE
+CREATE ^log IGNORE
+DELETE ^log IGNORE
+REGISTER .* COPY /lib/dev-state/$devname $devpath
+CHANGE .* COPY $devpath /lib/dev-state/$devname
+CREATE .* COPY $devpath /lib/dev-state/$devname
+DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
+RESTORE /lib/dev-state
+
+# You can force default like this :
+# PERMISSIONS owner_and_group access_mode
+
+# ALSA/OSS stuff
+# Comment/change these if you want to change the permissions on
+# the audio devices
+LOOKUP snd MODLOAD ACTION snd
+LOOKUP dsp MODLOAD
+LOOKUP mixer MODLOAD
+LOOKUP midi MODLOAD
+REGISTER sound/.* PERMISSIONS root.audio 660
+REGISTER snd/.* PERMISSIONS root.audio 660
+
+# Uncomment this to let PAM manage devfs
+#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
+
+# Autoload the sg module if generic scsi driver compiled as module.
+#LOOKUP ^sg$ MODLOAD ACTION sg
+
+# Give the cdrom group access to /dev/sg0
+REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrom 660
+
+# Give the cdrom group access to the cdrom devices
+REGISTER ^scsi/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
+REGISTER ^ide/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
+
+# Give the floppy group access to the floppy devices
+REGISTER ^floppy/.* PERMISSIONS root.floppy 660
+
+# Give the usb group access to the usb devices
+REGISTER ^usb/.* PERMISSIONS root.usb 660
+REGISTER ^tts/USB.* PERMISSIONS root.usb 660
+REGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL mksymlink $devname ttyUSB\1
+UNREGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL unlink ttyUSB\1
+
+# Video devices
+REGISTER ^v4l/.* PERMISSIONS root.video 660
+REGISTER ^dri/.* PERMISSIONS root.video 660
+REGISTER ^nvidia.* PERMISSIONS root.video 660
+
+# General note for the following auto creation of symlinks:
+#
+# If you change the device that the symlink points to,
+# you should also remove the symlink before restarting
+# devfsd
+
+# Create /dev/cdrom for the first cdrom drive
+LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
+REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
+UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
+
+# Create /dev/dvd for the second cdrom drive
+# (change 'cdroms/cdrom1' to suite your setup)
+# NOTE: We add the fully qualified path here, else some apps
+# have problems to resolve the true device (drip comes to mind)
+#LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
+#REGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL mksymlink ${devpath} dvd
+#UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd
+
+# Create /dev/cdrw for the first cdrom on the scsi bus
+# (change 'sr0' to suite your setup)
+#LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
+#REGISTER ^sr0$ CFUNCTION GLOBAL mksymlink $devname cdrw
+#UNREGISTER ^sr0$ CFUNCTION GLOBAL unlink cdrw
+
+# Create /dev/mouse
+LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux mouse
+REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname mouse
+UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
+
+# Manage USB mouse
+REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
+UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
+REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
+UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
+
+# Create compatibility link for broken misc/net/tun driver
+REGISTER ^misc/net/tun$ CFUNCTION GLOBAL unlink net/tun
+REGISTER ^misc/net/tun$ CFUNCTION GLOBAL symlink /dev/$devname net/tun
+
+# Support additional config installed by packages ...
+INCLUDE /etc/devfs.d
+
+# devfsd.conf ends here
diff --git a/sys-fs/devfsd/metadata.xml b/sys-fs/devfsd/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-fs/devfsd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>