summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-fs/devfsd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-fs/devfsd')
-rw-r--r--sys-fs/devfsd/Manifest1
-rw-r--r--sys-fs/devfsd/devfsd-1.3.25-r9.ebuild60
-rwxr-xr-xsys-fs/devfsd/files/devfs-start.sh28
-rwxr-xr-xsys-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.conf139
-rw-r--r--sys-fs/devfsd/metadata.xml5
9 files changed, 465 insertions, 0 deletions
diff --git a/sys-fs/devfsd/Manifest b/sys-fs/devfsd/Manifest
new file mode 100644
index 000000000000..6e107462e8dc
--- /dev/null
+++ b/sys-fs/devfsd/Manifest
@@ -0,0 +1 @@
+DIST devfsd-v1.3.25.tar.gz 42645 SHA256 d0b030fdc45b989fe8030dbb0c025fb7229228d88e5e4f056d9499f4056f6d08 SHA512 3bf18edb0fc823b96b938b22fc0f978823acfd37708d24d9fec8a25dfdaced165be6162fd5a20bdf30bfc615699faea8239fc77b99c30f035fd7c6b40e7c8c2c WHIRLPOOL a54cbc26c9591601e60a7468f89fd5d3c2dd633984d5787641ea63cba5ce2a566b08dd3dc0e3bc636b584ab6eb35bf7eec31c05a87e7f1c4cb8425fc848dfccd
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..66f6e6aee48a
--- /dev/null
+++ b/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 100755
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 100755
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..109ac87877c9
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd.conf
@@ -0,0 +1,139 @@
+# 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
+#
+# $Id$
+
+# 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..96a2d586367d
--- /dev/null
+++ b/sys-fs/devfsd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>