Skip to content
Browse files

Merge branch 'master' of git.funtoo.org:funtoo-overlay

  • Loading branch information...
2 parents bb4d825 + 146ce7a commit f6172a3a7a2f123aa72c552f84ae653fc3ca8132 @danielrobbins danielrobbins committed
Showing with 1,856 additions and 219 deletions.
  1. +1 −1 app-admin/eselect/eselect-1.3.3.1_rc1.ebuild
  2. +2 −1 app-admin/salt/Manifest
  3. +41 −0 app-admin/salt/salt-0.15.0.ebuild
  4. +0 −1 dev-libs/dee/Manifest
  5. +0 −57 dev-libs/dee/dee-1.0.14.ebuild
  6. +0 −30 dev-libs/dee/files/dee-1.0.10-gcc-4.5.patch
  7. +0 −16 dev-libs/dee/files/dee-1.0.10-vapigen.patch
  8. +0 −7 dev-libs/dee/metadata.xml
  9. +21 −0 dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
  10. +22 −2 dev-libs/openssl/openssl-1.0.1e.ebuild
  11. +4 −4 funtoo/scripts/merge.py
  12. +17 −14 funtoo/scripts/merge_utils.py
  13. +2 −0 net-libs/nodejs/Manifest
  14. +60 −0 net-libs/nodejs/nodejs-0.10.6.ebuild
  15. +77 −0 net-libs/nodejs/nodejs-0.11.2.ebuild
  16. +2 −0 net-misc/openvswitch/Manifest
  17. +19 −0 net-misc/openvswitch/files/openvswitch-kernel32.patch
  18. +17 −0 net-misc/openvswitch/files/ovs-brcompatd
  19. +1 −0 net-misc/openvswitch/files/ovs-brcompatd_conf
  20. +23 −0 net-misc/openvswitch/files/ovs-controller-r1
  21. +7 −0 net-misc/openvswitch/files/ovs-controller_conf
  22. +17 −0 net-misc/openvswitch/files/ovs-vswitchd
  23. +22 −0 net-misc/openvswitch/files/ovs-vswitchd-r1
  24. +6 −0 net-misc/openvswitch/files/ovs-vswitchd_conf
  25. +87 −0 net-misc/openvswitch/files/ovsdb-server
  26. +35 −0 net-misc/openvswitch/files/ovsdb-server-r1
  27. +16 −0 net-misc/openvswitch/files/ovsdb-server_conf
  28. +30 −0 net-misc/openvswitch/metadata.xml
  29. +155 −0 net-misc/openvswitch/openvswitch-1.10.0.ebuild
  30. +156 −0 net-misc/openvswitch/openvswitch-1.9.0.ebuild
  31. +1 −1 profiles/funtoo/1.0/linux-gnu/build/stable/package.mask/funtoo
  32. +1 −1 profiles/funtoo/1.0/linux-gnu/mix-ins/audio/make.defaults
  33. +5 −2 profiles/funtoo/1.0/linux-gnu/mix-ins/gnome/package.use
  34. +1 −0 profiles/funtoo/1.0/linux-gnu/mix-ins/mate/make.defaults
  35. +1 −0 profiles/funtoo/1.0/linux-gnu/mix-ins/mate/package.use
  36. +3 −0 profiles/package.unmask/funtoo-unmask
  37. +3 −0 profiles/package.use/funtoo-use
  38. +0 −1 profiles/profiles.desc
  39. +0 −1 sys-apps/kmod/Manifest
  40. +40 −0 sys-apps/kmod/files/kmod-13-dont-call-syscall.patch
  41. +104 −0 sys-apps/kmod/kmod-13-r1.ebuild
  42. +1 −0 sys-fs/mdev-bb/Manifest
  43. +701 −0 sys-fs/mdev-bb/files/busybox-1.21.0-mdev.patch
  44. +0 −43 sys-fs/mdev-bb/files/catch-all
  45. +18 −19 sys-fs/mdev-bb/files/mdev.conf
  46. +1 −1 sys-fs/mdev-bb/files/mdev.init
  47. +33 −0 sys-fs/mdev-bb/files/proc-bus-usb
  48. +6 −17 sys-fs/mdev-bb/files/storage-device
  49. +1 −0 sys-fs/mdev-bb/mdev-bb-1.20.2.ebuild
  50. +96 −0 sys-fs/mdev-bb/mdev-bb-1.21.0.ebuild
View
2 app-admin/eselect/eselect-1.3.3.1_rc1.ebuild
@@ -10,7 +10,7 @@ SRC_URI="mirror://gentoo/eselect-1.3.3.tar.xz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~*"
+KEYWORDS="*"
IUSE="doc"
S=$WORKDIR/eselect-1.3.3
View
3 app-admin/salt/Manifest
@@ -1,3 +1,4 @@
DIST salt-0.12.1.tar.gz 940994 SHA256 54ef4c4ce4c002a94e3f5f530f3115d09a1e8f28a3a11c18db5c7f70d5eeba23 SHA512 3b77472d131641df2ad228c424b3f445ecf6e5f91f44f5f928a1e375ad1a97811856bef4f181e14ccd4ff70a4e3f37175b260969317d471bf6853549aa21fb97 WHIRLPOOL 24d6dac1af88f9e9577fc0088557a65f1a49801042d115849e921098ce9163dd9c02becc41371039ad60e4631d19253e3051603b1c9b05f604c1d0fa917dfef4
DIST salt-0.13.1.tar.gz 1016399 SHA256 944caedffef0d3d4ecdb34e3cf32749e32cdddf5b78fee759f43f63a3fd0430c SHA512 7fc4e63683f25b323e9717fe71e5bf397c60484f0cc65dec9f8a1a0b2f978d231a7a4f847abd523a5406d7afc80a7e38525fe480feeced28b6ed753c84931e4d WHIRLPOOL 21e590bb0f0ccaadeb27fbbeadb6029e68d1b62849e11c0dbc5b128d5339f2c50b924f2c61ee466126cf0cb295bbdcb79067ade0939710f233a644e561f65893
-DIST salt-0.9.9.1.tar.gz 1760361 SHA256 8b06bb19a65882b8dd3f8dcbeb27e3b4016825e8943b22ac8b6a77c5453b1340
+DIST salt-0.15.0.tar.gz 3411308 SHA256 7d7d8c372571e0d3f36eea8e04a692ac566197030dffeb145e5b7282e56bd3d5 SHA512 08805f10e0101090f8fa67c9dfa3190ed81ff5754f29235e0b8aae45ba55233c0a80559d5975bf0a16880820b349dbe6e2136b3469690b7b691fd153aaa26b29 WHIRLPOOL a2c7037d703546efe3f39b8b293152180d63634a4a190e4c1de3d5f7f9d3ece804b59827567c2f423240fd953b774d5772f152b98a640384e2c4deb0c05b3034
+DIST salt-0.9.9.1.tar.gz 1760361 SHA256 8b06bb19a65882b8dd3f8dcbeb27e3b4016825e8943b22ac8b6a77c5453b1340 SHA512 243daf0cac178269f4ded234b5de784c4208285a6da7ac40e514eb57e229a6ee872362fc7ebe49c428e95db916ae68ea3086544ba8c6995a9da5088918594f52 WHIRLPOOL 00be58633a82ce154cff4a887631db20e8269d0816e7a33f4c8ce82fbddd5adbdfd013427afdc587d87ef25e983644fa2c7a570da22ab3c0621171f988887dc3
View
41 app-admin/salt/salt-0.15.0.ebuild
@@ -0,0 +1,41 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5-progress
+PYTHON_MULTIPLE_ABIS=1
+PYTHON_RESTRICTED_ABIS="3.* *-jython *-pypy-*"
+
+inherit distutils eutils
+
+DESCRIPTION="Salt is a remote execution and configuration manager."
+HOMEPAGE="http://saltstack.org/"
+SRC_URI="mirror://github/saltstack/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="*"
+IUSE="+jinja ldap libvirt mongodb mysql openssl redis"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/pyzmq-2.1.9 $(python_abi_depend dev-python/pyyaml) dev-python/msgpack
+ $(python_abi_depend dev-python/m2crypto dev-python/pycrypto)
+ jinja? ( $(python_abi_depend dev-python/jinja ) )
+ ldap? ( $(python_abi_depend dev-python/python-ldap ) )
+ libvirt? ( app-emulation/libvirt[python] )
+ mongodb? ( $(python_abi_depend dev-python/pymongo ) )
+ mysql? ( $(python_abi_depend dev-python/mysql-python ) )
+ openssl? ( $(python_abi_depend dev-python/pyopenssl ) )
+ redis? ( $(python_abi_depend dev-python/redis-py ) )"
+
+src_install() {
+ distutils_src_install
+ for s in minion master syndic; do
+ newinitd "${FILESDIR}"/${s}-initd-1 salt-${s}
+ newconfd "${FILESDIR}"/${s}-confd-1 salt-${s}
+ done
+ dodoc README.rst AUTHORS
+}
+
+python_test() {
+ ./setup.py test || die
+}
View
1 dev-libs/dee/Manifest
@@ -1 +0,0 @@
-DIST dee-1.0.14.tar.gz 681061 SHA256 1173187eb7d4ef6cbbe8b87d16b4d451ef023bf4151c9759d99bdedaaca3020c SHA512 f18e2ff262fa346c53747e236b13dbab3e379f8479b8af5453ee6a2f26ff9b0f9c0252c65163818b21b56a8c0284bf51f563f0148f17b348ff5a596d25e60d3e WHIRLPOOL eddda43c63f4fb6724ddec788836b6b5770a6822f81947a045644e29fa9b59b5f5e149d62dbcae3c960c8ff6f6b15e4ae898fa3d24e9ccb5148e191492935e9e
View
57 dev-libs/dee/dee-1.0.14.ebuild
@@ -1,57 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-AUTOTOOLS_AUTORECONF=y
-
-inherit autotools-utils
-
-DESCRIPTION="Provide objects allowing to create Model-View-Controller type programs across DBus"
-HOMEPAGE="https://launchpad.net/dee/"
-SRC_URI="https://launchpad.net/dee/1.0/${PV}/+download/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-3"
-KEYWORDS="~*"
-IUSE="doc debug examples +icu static-libs test"
-
-RDEPEND="
- dev-libs/glib:2
- dev-libs/icu"
-DEPEND="${RDEPEND}
- dev-libs/gobject-introspection
- doc? ( dev-util/gtk-doc )
- test? (
- dev-libs/gtx
- dev-util/dbus-test-runner
- )"
-
-src_prepare() {
- sed \
- -e '/GCC_FLAGS/s:-g::' \
- -e 's:vapigen:vapigen-0.14:g' \
- -i configure.ac || die
- echo true > py-compile || die
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-silent-rules
- $(use_enable debug trace-log)
- $(use_enable test tests)
-# $(use_enable test extended-tests)
- $(use_enable icu)
- $(use_enable doc gtk-doc)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
-
- if use examples; then
- insinto /usr/share/doc/${PN}/
- doins -r examples
- fi
-}
View
30 dev-libs/dee/files/dee-1.0.10-gcc-4.5.patch
@@ -1,30 +0,0 @@
- src/dee-filter.h | 2 +-
- src/dee-model-reader.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/dee-filter.h b/src/dee-filter.h
-index de8d252..327f512 100644
---- a/src/dee-filter.h
-+++ b/src/dee-filter.h
-@@ -30,7 +30,7 @@
-
- G_BEGIN_DECLS
-
--typedef struct _DeeFilter DeeFilter;
-+//typedef struct _DeeFilter DeeFilter;
-
- /**
- * DeeFilterMapFunc:
-diff --git a/src/dee-model-reader.h b/src/dee-model-reader.h
-index a249149..dd23de6 100644
---- a/src/dee-model-reader.h
-+++ b/src/dee-model-reader.h
-@@ -30,7 +30,7 @@
-
- G_BEGIN_DECLS
-
--typedef struct _DeeFilter DeeFilter;
-+//typedef struct _DeeFilter DeeFilter;
-
- /**
- * DeeModelReaderFunc:
View
16 dev-libs/dee/files/dee-1.0.10-vapigen.patch
@@ -1,16 +0,0 @@
- vapi/Makefile.am | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/vapi/Makefile.am b/vapi/Makefile.am
-index c384ecd..413a96a 100644
---- a/vapi/Makefile.am
-+++ b/vapi/Makefile.am
-@@ -6,7 +6,7 @@ if HAVE_INTROSPECTION
- if HAVE_VAPIGEN
-
- dee-1.0.vapi: $(top_builddir)/src/Dee-$(DEE_MAJOR_VERSION).$(DEE_MINOR_VERSION).gir $(srcdir)/Dee-1.0-custom.vala $(srcdir)/Dee-1.0.metadata
-- $(AM_V_GEN)$(VALA_API_GEN) --library dee-1.0 --metadatadir=$(srcdir) $(filter %.gir %.vala,$^)
-+ $(AM_V_GEN)$(VALA_API_GEN) --library dee-1.0 --metadatadir=$(srcdir) $(filter %.gir %.vala,$^) --pkg gtk+-3.0
- @touch $@
-
- endif
View
7 dev-libs/dee/metadata.xml
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer>
- <email>jlec@gentoo.org</email>
- </maintainer>
-</pkgmetadata>
View
21 dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
@@ -0,0 +1,21 @@
+diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c
+index 483e04b..fb2c884 100644
+--- a/crypto/evp/e_aes_cbc_hmac_sha1.c
++++ b/crypto/evp/e_aes_cbc_hmac_sha1.c
+@@ -328,10 +328,11 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+
+ if (res!=SHA_CBLOCK) continue;
+
+- mask = 0-((inp_len+8-j)>>(sizeof(j)*8-1));
++ /* j is not incremented yet */
++ mask = 0-((inp_len+7-j)>>(sizeof(j)*8-1));
+ data->u[SHA_LBLOCK-1] |= bitlen&mask;
+ sha1_block_data_order(&key->md,data,1);
+- mask &= 0-((j-inp_len-73)>>(sizeof(j)*8-1));
++ mask &= 0-((j-inp_len-72)>>(sizeof(j)*8-1));
+ pmac->u[0] |= key->md.h0 & mask;
+ pmac->u[1] |= key->md.h1 & mask;
+ pmac->u[2] |= key->md.h2 & mask;
+--
+1.8.2.1
+
View
24 dev-libs/openssl/openssl-1.0.1e.ebuild
@@ -56,6 +56,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.0.1-x32.patch
epatch "${FILESDIR}"/${PN}-1.0.1e-ipv6.patch
epatch "${FILESDIR}"/${PN}-clang-compat.patch
+ epatch "${FILESDIR}"/${P}-bad-mac-aes-ni.patch
epatch_user #332661
fi
@@ -79,7 +80,10 @@ src_prepare() {
chmod a+rx gentoo.config
append-flags -fno-strict-aliasing
- append-flags $(test-flags-CC -Wa,--noexecstack)
+ # Don't do this step if clang is being used
+ if [ "${CC}" != "clang" ] ; then
+ append-flags $(test-flags-CC -Wa,--noexecstack)
+ fi
sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
./config --test-sanity || die "I AM NOT SANE"
@@ -104,6 +108,16 @@ src_configure() {
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
+ # See if our toolchain supports __uint128_t. If so, it's 64bit
+ # friendly and can use the nicely optimized code paths. #460790
+ local ec_nistp_64_gcc_128
+ if ! use bindist ; then
+ echo "__uint128_t i;" > "${T}"/128.c
+ if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
+ ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
+ fi
+ fi
+
local sslout=$(./gentoo.config)
einfo "Use configuration ${sslout:-(openssl knows best)}"
local config="Configure"
@@ -114,6 +128,7 @@ src_configure() {
$(use sse2 || echo "no-sse2") \
enable-camellia \
$(use_ssl !bindist ec) \
+ ${ec_nistp_64_gcc_128} \
enable-idea \
enable-mdc2 \
$(use_ssl !bindist rc5) \
@@ -137,12 +152,17 @@ src_configure() {
-e 's:-mcpu=[-a-z0-9]* ::g' \
-e 's:-m[a-z0-9]* ::g' \
)
+ sed -i \
+ -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
+ -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
+ Makefile || die
+
}
src_compile() {
# depend is needed to use $confopts; it also doesn't matter
# that it's -j1 as the code itself serializes subdirs
- emake depend
+ emake -j1 depend
emake all
# rehash is needed to prep the certs/ dir; do this
# separately to avoid parallel build issues.
View
8 funtoo/scripts/merge.py
@@ -13,7 +13,7 @@
bar_overlay = Tree("bar-overlay", "master", "git://github.com/adessemond/bar-overlay.git", pull=True)
flora_overlay = Tree("flora", "master", "repos@git.funtoo.org:flora.git", pull=True)
progress_overlay = SvnTree("progress", "https://gentoo-progress.googlecode.com/svn/overlays/progress")
-sabayon_for_gentoo = Tree("for-gentoo", "master", "git://git.sabayon.org/projects/overlays/for-gentoo.git", pull=True)
+sabayon_for_gentoo = Tree("sabayon-for-gentoo", "master", "git://github.com/Sabayon/for-gentoo.git", pull=True)
mate_overlay = Tree("mate", "master", "git://github.com/Sabayon/mate-overlay.git", pull=True)
steps = [
@@ -43,10 +43,10 @@
InsertEbuilds(bar_overlay, select="all", skip=["app-emulation/qemu"], replace=False),
InsertEbuilds(flora_overlay, select="all", skip=["sys-fs/spl", "sys-fs/zfs"], replace=False),
InsertEbuilds(mate_overlay, select="all", skip=None, replace=False),
- SyncFiles(mate_overlay.root, "eclass"),
+ SyncDir(mate_overlay.root, "eclass"),
SyncFiles(mate_overlay.root, {
- "profiles/package.mask":"profiles/package.mask/mate",
- "profiles/use.mask":"profiles/funtoo/1.0/linux-gnu/mix-ins/mate/use.mask"
+ "profiles/package.mask":"profiles/funtoo/1.0/linux-gnu/mix-ins/mate/package.mask/01-mate",
+ "profiles/use.mask":"profiles/funtoo/1.0/linux-gnu/mix-ins/mate/use.mask/01-mate"
}),
InsertEbuilds(sabayon_for_gentoo, select=["app-admin/equo", "app-admin/matter", "sys-apps/entropy", "sys-apps/entropy-server", "sys-apps/entropy-client-services","app-admin/rigo", "sys-apps/rigo-daemon", "sys-apps/magneto-core", "x11-misc/magneto-gtk", "x11-misc/magneto-gtk3", "kde-misc/magneto-kde", "app-misc/magneto-loader"], replace=True),
SyncDir(progress_overlay.root, "eclass"),
View
31 funtoo/scripts/merge_utils.py
@@ -306,32 +306,31 @@ def __init__(self,srctree,select="all",skip=None,replace=False,merge=None,catego
def run(self,desttree):
desttree.logTree(self.srctree)
# Figure out what categories to process:
- catpath = os.path.join(self.srctree.root,"profiles/categories")
+ src_cat_path = os.path.join(self.srctree.root, "profiles/categories")
+ dest_cat_path = os.path.join(desttree.root, "profiles/categories")
if self.categories != None:
# categories specified in __init__:
- a = self.categories
+ src_cat_set = set(self.categories)
else:
- a = []
- if os.path.exists(catpath):
+ src_cat_set = set()
+ if os.path.exists(src_cat_path):
# categories defined in profile:
- f = open(os.path.join(self.srctree.root,"profiles/categories"),"r")
- for cat in f.readlines():
- cat = cat.strip()
- if cat not in a:
- a.append(cat)
- f.close()
+ with open(src_cat_path, "r") as f:
+ src_cat_set.update(f.read().splitlines())
# auto-detect additional categories:
cats = os.listdir(self.srctree.root)
for cat in cats:
# All categories have a "-" in them and are directories:
if os.path.isdir(os.path.join(self.srctree.root,cat)):
- if (cat.find("-") != -1) or cat == "virtuals":
- if cat not in a:
- a.append(cat)
+ if "-" in cat or cat == "virtuals":
+ src_cat_set.add(cat)
+
+ with open(dest_cat_path, "r") as f:
+ dest_cat_set = set(f.read().splitlines())
# Our main loop:
print "# Merging in ebuilds from %s" % self.srctree.root
- for cat in a:
+ for cat in src_cat_set:
catdir = os.path.join(self.srctree.root,cat)
if not os.path.isdir(catdir):
# not a valid category in source overlay, so skip it
@@ -349,6 +348,7 @@ def run(self,desttree):
if type(self.skip) == types.ListType and catpkg in self.skip:
# we have a list of pkgs to skip, and this catpkg is on the list, so skip:
continue
+ dest_cat_set.add(cat)
tcatdir = os.path.join(desttree.root,cat)
tpkgdir = os.path.join(tcatdir,pkg)
copy = False
@@ -394,6 +394,9 @@ def run(self,desttree):
cpv = "/".join(tpkgdir.split("/")[-2:])
mergeLog.write("%s\n" % cpv)
+ with open(dest_cat_path, "w") as f:
+ f.write("\n".join(sorted(dest_cat_set)))
+
class ProfileDepFix(MergeStep):
def run(self,tree):
View
2 net-libs/nodejs/Manifest
@@ -1,6 +1,8 @@
DIST node-v0.10.2.tar.gz 12813547 SHA256 4eb642897fdb945b49720f2604afc493587aec7a9ff1537e882df659e4dd8aa2 SHA512 88615b4450ff10e70f4f53ec159518c1385da747e44dfb6c42dcf386c41b62048a9b77838036cf620202da1812c60893809f6aca2202e90b20158eb0f00aa60a WHIRLPOOL d46c2b11d98b32872fe40e748cdabba365afa754e5108b1ee9fecc0990e9f3878a47558a66e4b909e10792e162fcbb7ddff9a380042eb49b93f8a18534df9f35
DIST node-v0.10.5.tar.gz 13250913 SHA256 1c22bd15cb13b1109610ee256699300ec6999b335f3bc85dc3c0312ec9312cfd SHA512 bc79dec6f0a139062490b18adf0985f4e70f8d6f6476c53443ef9e312a7aef4ded679680f6d33d1aecda23e7802d2fa2fd8130b62e4889c70ff4f46a34909ceb WHIRLPOOL ebf78cbb2497ff355a5d2b7f18292c2cbd2c04baa00f81c48294254369f8b33f08095d91745a037e6fcba5353eb8d5781f37863f7bfc9488e98aab44355812ab
+DIST node-v0.10.6.tar.gz 13260795 SHA256 7e2079394efe82f62798178f617888c9d6a39150c76122c432ae9ea73ce28e79 SHA512 08e196948448fce089c583419f3e9c08cb666305fcb0dd929c41d25a6342892cf82c670449cd1b245d6aee689e8f7a5ce7515dd7f132d7ee1470e4513b6fb5cf WHIRLPOOL 18e13d2719fce63f589c82d3b95bb72d84659ec5d7a3a63d71db867e1d8213ff0be4f128fb563b29cdc65e89ef01fe2e073b105fe05f4951ac3eedcf127217f1
DIST node-v0.11.1.tar.gz 13405287 SHA256 1042853f6f288185e9dda60eaf57de50768aec5d32df7c7f462b713c56bd096f SHA512 bc7aab5e68f63e105238f6cbda6576b0608971421bd16fc5c52ec094e92452fc38ba6de72d7802066d86eba0b238185bd658435ead7ab229de54485e03598807 WHIRLPOOL fec17d2c45ee83fdecd9ef5789dc0760f22ba23ca70cdf8114f119e6f2ae9043f24fc52b8f837acf86023ba482807370cdbb1adb1303ef50b843132d81895972
+DIST node-v0.11.2.tar.gz 13564314 SHA256 d115f01fea0b2c5a4c4ca489d0cc8cec70300f0212f08905d881ac55f642554a SHA512 67c834eb7509428d3ecb3cf808a66153941e4f484c879eae5b271b6b010dcf0cd3338f06e241b2ed423e5ba5062ae23be37c2e67bc1379b4b5f0823df3697dcc WHIRLPOOL 79634567de2d730f23b16ec2d3b4488b2423227d92fc522abf72359923d01e6180620f87eb46c8bb666defa63f87b4cdba2be9109f4042c512b81b2d3e0b0fd8
DIST node-v0.6.12.tar.gz 10452498 SHA256 a16392fb83b288bd40cb64593253756a44f8111478edf5e8cc439a64622281c4
DIST node-v0.6.13.tar.gz 10757157 SHA256 fc4f3ceacfd2cfc4ec75fc59d97f1f2d04947efd5e191efaddeb552df486245b
DIST node-v0.6.14.tar.gz 10742747 SHA256 e41922308155c5197c2d048948ca9cd76ea5f9a51f977e1591bd93fe17d4cf1f
View
60 net-libs/nodejs/nodejs-0.10.6.ebuild
@@ -0,0 +1,60 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5-progress
+
+RESTRICT="test"
+PYTHON_MULTIPLE_ABIS="1"
+PYTHON_RESTRICTED_ABIS="3.* *-jython *-pypy-*"
+inherit python pax-utils
+
+DESCRIPTION="Evented IO for V8 Javascript"
+HOMEPAGE="http://nodejs.org/"
+SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~*"
+IUSE=""
+
+RDEPEND="dev-libs/openssl"
+DEPEND="${RDEPEND}
+ $(python_abi_depend virtual/python-json)"
+
+S=${WORKDIR}/node-v${PV}
+
+src_prepare() {
+ # fix compilation on Darwin
+ # http://code.google.com/p/gyp/issues/detail?id=260
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+ # make sure we use python2.* while using gyp
+ sed -i -e "s/python/python2/" deps/npm/node_modules/node-gyp/gyp/gyp || die
+
+ # less verbose install output (stating the same as portage, basically)
+ sed -i -e "/print/d" tools/install.py || die
+}
+
+src_configure() {
+ ./configure --prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die
+}
+
+src_compile() {
+ emake out/Makefile
+ emake -C out mksnapshot
+ pax-mark m out/Release/mksnapshot
+ emake
+}
+
+src_install() {
+ ./tools/install.py install "${ED}"
+
+ dohtml -r "${ED}"/usr/lib/node_modules/npm/html/*
+ rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html
+ rm -rf "${ED}"/usr/lib/dtrace
+
+ pax-mark -m "${ED}"/usr/bin/node
+}
+
+src_test() {
+ ./tools/test.py --mode=release simple message || die
+}
View
77 net-libs/nodejs/nodejs-0.11.2.ebuild
@@ -0,0 +1,77 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5-progress
+
+RESTRICT="test"
+PYTHON_MULTIPLE_ABIS="1"
+PYTHON_RESTRICTED_ABIS="3.* *-jython *-pypy-*"
+inherit python pax-utils
+
+DESCRIPTION="Evented IO for V8 Javascript"
+HOMEPAGE="http://nodejs.org/"
+SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~*"
+IUSE="v8"
+
+RDEPEND="dev-libs/openssl
+ v8? ( >=dev-lang/v8-3.18.5.1 )"
+DEPEND="${RDEPEND}
+ $(python_abi_depend virtual/python-json)"
+
+S=${WORKDIR}/node-v${PV}
+
+src_prepare() {
+ # fix compilation on Darwin
+ # http://code.google.com/p/gyp/issues/detail?id=260
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+ # make sure we use python2.* while using gyp
+ sed -i -e "s/python/python2/" deps/npm/node_modules/node-gyp/gyp/gyp || die
+
+ # less verbose install output (stating the same as portage, basically)
+ sed -i -e "/print/d" tools/install.py || die
+ sed -i -e "s~/usr/local~/usr~" tools/install.py || die
+}
+
+src_configure() {
+ if use v8 ; then
+ ./configure --shared-v8 --shared-v8-libpath="${EPREFIX}"/usr/lib --shared-v8-includes="${EPREFIX}"/usr/include \
+ --prefix="${EPREFIX}"/usr --shared-openssl --shared-zlib || die
+ else
+ ./configure --prefix="${EPREFIX}"/usr --shared-openssl --shared-zlib || die
+ fi
+ sed -i -e "s~/usr/local~/usr~g" out/Makefile || die
+ sed -i -e "s~/usr/local~/usr~g" Makefile || die
+}
+
+src_compile() {
+ emake out/Makefile
+ # emake -C out mksnapshot
+ # pax-mark m out/Release/mksnapshot
+ emake || die
+}
+
+src_install() {
+ ./tools/install.py install "${ED}"
+
+ dohtml -r "${ED}"/usr/lib/node_modules/npm/html/*
+ rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html
+ rm -rf "${ED}"/usr/lib/dtrace
+
+ pax-mark -m "${ED}"/usr/bin/node
+}
+
+src_test() {
+ ./tools/test.py --mode=release simple message || die
+}
+
+pkg_postinst() {
+ if ! use v8 ; then
+ elog "${PN} has been compiled against internal v8"
+ elog "to use system v8 you will need to emerge a"
+ elog "version >=dev-lag/v8-3.18"
+ fi
+}
View
2 net-misc/openvswitch/Manifest
@@ -0,0 +1,2 @@
+DIST openvswitch-1.10.0.tar.gz 2415602 SHA256 803966c89d6a5de6d710a2cb4ed73ac8d8111a2c44b12b846dcef8e91ffab167 SHA512 5ae810d6bb4a26254205b7d7087cc45a1a04946196e3ccd625bb9557f41052cc2dddccc9322968a5f066c7c0527c55633265f54420deeebf98b183fd57645573 WHIRLPOOL 661d27288151fd6b94c115ccb6d1f741903e922dbde798e02b804c4ae16417399601a96b33ae5af01aeeb9d3a174bd9b7704fc21147df495968fb29cab82881f
+DIST openvswitch-1.9.0.tar.gz 2351740 SHA256 825730db82c7b46a142f057a43345590c299e66704ef7a88d9ed4ffd0c3d6b64 SHA512 6368852aafa81f003a09108e973a37281a938ad36948aef96b0699c85a754c33fdb274e998ca804c8102a8cf0839e023633510d43a975cf355b10575bc024587 WHIRLPOOL d4c88aadfe8676d5aef24673051c34864dcc9b6bbc624e6396389fae7ffbb0518f213334ede034fe1c4894187fb001b8e389a11cd8d0bc253f5237696ab0b405
View
19 net-misc/openvswitch/files/openvswitch-kernel32.patch
@@ -0,0 +1,19 @@
+---
+ datapath/linux/compat/include/linux/etherdevice.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/datapath/linux/compat/include/linux/etherdevice.h b/datapath/linux/
+index 7f04c96..3a1400a 100644
+--- a/datapath/linux/compat/include/linux/etherdevice.h
++++ b/datapath/linux/compat/include/linux/etherdevice.h
+@@ -9,7 +9,7 @@ static inline void eth_hw_addr_random(struct net_device *dev)
+ {
+ random_ether_addr(dev->dev_addr);
+ }
+-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)
+ static inline void eth_hw_addr_random(struct net_device *dev)
+ {
+ dev_hw_addr_random(dev, dev->dev_addr);
+--
+1.7.10.4
View
17 net-misc/openvswitch/files/ovs-brcompatd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need ovs-vswitchd
+}
+
+start() {
+ ebegin "Starting Open vSwitch Linux Bridge daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ovs-brcompatd -- --pidfile --detach ${DB_SOCKET}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch Linux Bridge daemon"
+ start-stop-daemon --stop --quiet --name ovs-brcompatd
+ eend ${?}
+}
View
1 net-misc/openvswitch/files/ovs-brcompatd_conf
@@ -0,0 +1 @@
+DB_SOCKET="unix:/var/run/openvswitch/db.sock"
View
23 net-misc/openvswitch/files/ovs-controller-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-controller-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
+
+description="Open vSwitch OpenFlow controller"
+
+command="/usr/bin/ovs-controller"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${OPTIONS} ${METHODS}"
+pidfile="/var/run/openvswitch/ovs-controller.pid"
+
+depend() {
+ need net
+ use logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
View
7 net-misc/openvswitch/files/ovs-controller_conf
@@ -0,0 +1,7 @@
+
+# Space separated list of methods to listen for OpenFlow connections from switches
+# The default ist "ptcp:" which starts ovs-controller listening on port 6633 on all interfaces.
+METHODS="ptcp:"
+
+# Additional options
+# OPTIONS=""
View
17 net-misc/openvswitch/files/ovs-vswitchd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need ovsdb-server
+}
+
+start() {
+ ebegin "Starting Open vSwitch daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ovs-vswitchd -- --pidfile --detach ${DB_SOCKET}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch daemon"
+ start-stop-daemon --stop --quiet --name ovs-vswitchd
+ eend ${?}
+}
View
22 net-misc/openvswitch/files/ovs-vswitchd-r1
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-vswitchd-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
+
+description="Open vSwitch virtual switch"
+
+command="/usr/sbin/ovs-vswitchd"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${OPTIONS} ${DATABASE}"
+pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
+
+depend() {
+ use ovsdb-server logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
View
6 net-misc/openvswitch/files/ovs-vswitchd_conf
@@ -0,0 +1,6 @@
+
+# Connection string for the configuration database (usually a unix socket)
+DATABASE="unix:/var/run/openvswitch/db.sock"
+
+# Additional options
+OPTIONS="--mlockall"
View
87 net-misc/openvswitch/files/ovsdb-server
@@ -0,0 +1,87 @@
+#!/sbin/runscript
+
+depend() {
+ need localmount
+}
+
+#% ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
+# --remote=db:Open_vSwitch,manager_options \
+# --private-key=db:SSL,private_key \
+# --certificate=db:SSL,certificate \
+# --bootstrap-ca-cert=db:SSL,ca_cert \
+# --pidfile --detach
+local_start() {
+ local remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+ local remote_db=${REMOTE_DB:+"--remote=db:${REMOTE_DB}"}
+ local private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+ local certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+ local bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+ ebegin "Starting Open vSwitch DB server"
+ checkpath ${DB_SOCKET%/*}
+ start-stop-daemon --start --quiet --exec /usr/sbin/ovsdb-server -- ${remote_punix} ${remote_db} ${private_key} ${certificate} ${bootstrap_ca_cert} --pidfile --detach
+ eend ${?}
+}
+
+start() {
+ if check; then
+ local_start
+ else
+ init
+ local_start
+ ebegin "Initing Open vSwitch"
+ ewaitfile 30 ${DB_SOCKET}
+ if [[ ${?} -eq 0 ]]; then
+ /usr/bin/ovs-vsctl --no-wait --db="unix:${DB_SOCKET}" init
+ eend ${?}
+ else
+ eend 1
+ stop
+ rm "${OVS_CONF_DIR}/conf.db"
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch DB server"
+ start-stop-daemon --stop --quiet --name ovsdb-server
+ eend ${?}
+}
+
+check() {
+ ebegin "Checking for Open vSwitch configuration directory \"${OVS_CONF_DIR}\""
+ if [ -d "${OVS_CONF_DIR}" ]; then
+ eend 0
+ ebegin "Checking for Open vSwitch configuration database \"${OVS_CONF_DIR}/conf.db\""
+ if [ -e "${OVS_CONF_DIR}/conf.db" ]; then
+ eend 0
+ return 0
+ else
+ eend 1
+ return 1
+ fi
+ else
+ eend 1
+ return 1
+ fi
+}
+
+init() {
+ ebegin "Checking for Open vSwitch configuration directory \"${OVS_CONF_DIR}\""
+ if [ -d "${OVS_CONF_DIR}" ]; then
+ eend 0
+ else
+ ebegin "Creating Open vSwitch configuration directory \"${OVS_CONF_DIR}\""
+ mkdir -p "${OVS_CONF_DIR}"
+ eend 0
+ fi
+
+ ebegin "Checking for Open vSwitch configuration database \"${OVS_CONF_DIR}/conf.db\""
+ if [ -e "${OVS_CONF_DIR}/conf.db" ]; then
+ eend 0
+ else
+ ebegin "Creating Open vSwitch configuration database \"${OVS_CONF_DIR}/conf.db\""
+ ovsdb-tool create "${OVS_CONF_DIR}/conf.db" /usr/share/openvswitch/vswitch.ovsschema
+ eend 0
+ fi
+}
View
35 net-misc/openvswitch/files/ovsdb-server-r1
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovsdb-server-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
+
+description="Open vSwitch database server"
+
+remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
+private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+command="/usr/sbin/ovsdb-server"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${remote_punix}
+ ${remote_db}
+ ${private_key}
+ ${certificate}
+ ${bootstrap_ca_cert}
+ ${DATABASE}
+ ${OPTIONS}"
+pidfile="/var/run/openvswitch/ovsdb-server.pid"
+
+depend() {
+ need localmount
+ use logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
View
16 net-misc/openvswitch/files/ovsdb-server_conf
@@ -0,0 +1,16 @@
+# Socket for bringing the server up
+DB_SOCKET="/var/run/openvswitch/db.sock"
+
+# Remote sockets are defined in the database by default
+REMOTE_DB="db:Open_vSwitch,manager_options"
+
+# All certificates and keys are stored in the database (if any)
+PRIVATE_KEY="db:SSL,private_key"
+CERTIFICATE="db:SSL,certificate"
+BOOTSTRAP_CA_CERT="db:SSL,ca_cert"
+
+# Alternative path for the database (default is /etc/openvswitch/conf.db)
+# DATABASE="/etc/openvswitch/conf.db"
+
+# Additional options
+# OPTIONS=""
View
30 net-misc/openvswitch/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>funtoo</herd>
+ <maintainer>
+ <email>golodhrim@funtoo.org</email>
+ <name>Martin 'golodhrim' Scholz</name>
+ </maintainer>
+ <maintainer>
+ <email>graytshirt@funtoo.org</email>
+ <name>Dan Molik</name>
+ </maintainer>
+ <use>
+ <flag name='debug'>Turns on debugging options</flag>
+ <flag name='modules'>Build kernel modules</flag>
+ <flag name='monitor'>Build zope monitor interface</flag>
+ <flag name='pyside'>Include PySide Support</flag>
+ <flag name='ssl'>Build with SSL support</flag>
+ </use>
+ <longdescription lang="en">
+ Open vSwitch is a production quality, multilayer virtual switch
+ licensed under the open source Apache 2.0 license. It is designed
+ to enable massive network automation through programmatic extension,
+ while still supporting standard management interfaces and protocols
+ (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In addition,
+ it is designed to support distribution across multiple physical
+ servers similar to VMware's vNetwork distributed vswitch or Cisco's
+ Nexus 1000V.
+ </longdescription>
+</pkgmetadata>
View
155 net-misc/openvswitch/openvswitch-1.10.0.ebuild
@@ -0,0 +1,155 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1
+
+DESCRIPTION="Production quality, multilayer virtual switch."
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug modules monitor +pyside +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.2
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ pyside? ( dev-python/pyside[${PYTHON_USEDEP}] )
+ !pyside? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ net-zope/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+
+ if kernel_is -lt 3 9 ; then
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ linux-mod_pkg_setup
+ fi
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ epatch "${FILESDIR}"/"${PN}"-kernel32.patch
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ use pyside || export ovs_cv_pyuic4="no"
+
+ local linux_config
+ if kernel_is -lt 3 9 ; then
+ use modules && linux_config="--with-linux=${KERNEL_DIR}"
+ fi
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool \
+ ovsdb/ovsdbmonitor/ovsdbmonitor
+
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newconfd "${FILESDIR}/ovs-controller_conf" ovs-controller
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+ newinitd "${FILESDIR}/ovs-controller-r1" ovs-controller
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_src_install
+ fi
+}
+
+pkg_postinst() {
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_pkg_postinst
+ fi
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "${PN} built against kernels 3.9 and greater must have kernel built modules"
+ elog " instead of portage built kernel modules"
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
View
156 net-misc/openvswitch/openvswitch-1.9.0.ebuild
@@ -0,0 +1,156 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1
+
+DESCRIPTION="Production quality, multilayer virtual switch."
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug modules monitor +pyside +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.2
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ pyside? ( dev-python/pyside[${PYTHON_USEDEP}] )
+ !pyside? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ net-zope/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="brcompat(net:${S}/datapath/linux) openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+
+ if kernel_is -lt 3 9 ; then
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ linux-mod_pkg_setup
+ fi
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ epatch "${FILESDIR}"/"${PN}"-kernel32.patch
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ use pyside || export ovs_cv_pyuic4="no"
+
+ local linux_config
+ if kernel_is -lt 3 9 ; then
+ use modules && linux_config="--with-linux=${KERNEL_DIR}"
+ fi
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool \
+ ovsdb/ovsdbmonitor/ovsdbmonitor
+
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newconfd "${FILESDIR}/ovs-controller_conf" ovs-controller
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+ newinitd "${FILESDIR}/ovs-controller-r1" ovs-controller
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_src_install
+ fi
+}
+
+pkg_postinst() {
+ if kernel_is -lt 3 9 ; then
+ use modules && linux-mod_pkg_postinst
+ fi
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
View
2 profiles/funtoo/1.0/linux-gnu/build/stable/package.mask/funtoo
@@ -1,4 +1,4 @@
# Ryan Harris <rh1@funtoo.org> (3 Jun 2012)
# >=libreoffice-3.5.4.2 needs >=gcc-4.5
->=app-office/libreoffice-3.6.4.4
+>app-office/libreoffice-3.6.6.2
View
2 profiles/funtoo/1.0/linux-gnu/mix-ins/audio/make.defaults
@@ -1,5 +1,5 @@
# Audio settings
USE="alsa"
-ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
+ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
View
7 profiles/funtoo/1.0/linux-gnu/mix-ins/gnome/package.use
@@ -62,12 +62,15 @@ net-libs/opal sip
net-libs/ptlib wav
# For net-misc/vinagre-3.4 and gnome-boxes
-net-misc/spice-gtk gtk3
+# FL-545, gnome mix-in forsing pulseaudio and gstreamer flags, when only one required for spice-gtk
+# changing default to pulseaudio
+net-misc/spice-gtk gtk3 -gstreamer
# liboauth (required by evolution-data-server[gnome-online-accounts] and
# gnome-documents in gnome-3.2) has +nss in IUSE, pulls in curl[-gnutls,nss]
# In >=curl-7.25.0-r1, need CURL_SSL="-gnutls nss -openssl"
-net-misc/curl -curl_ssl_gnutls curl_ssl_nss -curl_ssl_openssl -gnutls nss
+# FL-545, new curl ebuild reuqire curl_ssl_openssl as default, changing
+net-misc/curl -curl_ssl_gnutls -curl_ssl_nss curl_ssl_openssl -gnutls nss
# Required by net-print/cups
app-text/ghostscript-gpl cups
View
1 profiles/funtoo/1.0/linux-gnu/mix-ins/mate/make.defaults
@@ -0,0 +1 @@
+USE="cairo consolekit introspection gtk policykit"
View
1 profiles/funtoo/1.0/linux-gnu/mix-ins/mate/package.use
@@ -0,0 +1 @@
+media-libs/libcanberra gtk3
View
3 profiles/package.unmask/funtoo-unmask
@@ -1,3 +1,6 @@
+## FL-525
+net-libs/nodejs
+
## F-447
~sys-fs/udev-171
~virtual/udev-171
View
3 profiles/package.use/funtoo-use
@@ -1,3 +1,6 @@
+# FL-548 alpine need c-client built with chappa use flag, fixing it for painless install
+net-libs/c-client chappa
+
# FL-520 set upcall USE flag, required for clean cifs-utils emerge
net-fs/cifs-utils upcall
View
1 profiles/profiles.desc
View
1 sys-apps/kmod/Manifest
@@ -1,2 +1 @@
-DIST kmod-12.tar.xz 1275028 SHA256 c6189dd8c5a1e8d9224e8506bd188c0cd5dfa119fd6b7e5869b3640cbe8bf92f SHA512 f24bb25812b1902736f875bd3d7f995fa42a50cb7208b0d79a82fb5915223cf78e41018d5bc2cd1088acad5dc8e3dd737876262f4acde6479936c4e04223b629 WHIRLPOOL cde992a543945670992813ce142aa96bd94cc719f539b4734a7c2251b2918622e60a027531d5b430c872e58f28a153d3d2b4b90babe3e4b0f3c262afb09b7116
DIST kmod-13.tar.xz 1435864 SHA256 6c36d3abba2f98c84973ae275951c866f8bf304e7356c2fe60633800239d7956 SHA512 6182a043c32944c2dc336101e4d8a9be9ccd0106677f9f7a2e76b83a09ec2fc1333aed9b82773abe09f8adb1771e796690f1610c64b337e21bdabffe76fed434 WHIRLPOOL 95196f4c65fec778727a9b8d0209dcb08e64280b4b5d6e88b5343acb3a360b62c13a0dcf510d3c2080fad4ef1562c5e9fa11f84979d0acee03dab3fac8b3eaac
View
40 sys-apps/kmod/files/kmod-13-dont-call-syscall.patch
@@ -0,0 +1,40 @@
+From 38829712e5c411bc250aeae142fc6bf06e794d58 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.de.marchi@gmail.com>
+Date: Thu, 02 May 2013 16:22:57 +0000
+Subject: missing: Don't call syscall() with syscallno == -1
+
+Reported-by: Jean-Francis Roy <jeanfrancis@funtoo.org>
+Reported-by: Jan Luebbe <jlu@pengutronix.de>
+---
+diff --git a/libkmod/missing.h b/libkmod/missing.h
+index edb88b9..b31af84 100644
+--- a/libkmod/missing.h
++++ b/libkmod/missing.h
+@@ -1,5 +1,6 @@
+ #pragma once
+
++#include <errno.h>
+ #include <unistd.h>
+ #include <sys/syscall.h>
+
+@@ -15,13 +16,14 @@
+ # define MODULE_INIT_IGNORE_VERMAGIC 2
+ #endif
+
+-#ifndef __NR_finit_module
+-# define __NR_finit_module -1
+-#endif
+-
+ #ifndef HAVE_FINIT_MODULE
+ static inline int finit_module(int fd, const char *uargs, int flags)
+ {
++#ifndef __NR_finit_module
++ errno = ENOSYS;
++ return -1;
++#else
+ return syscall(__NR_finit_module, fd, uargs, flags);
++#endif
+ }
+ #endif
+--
+cgit v0.9.1
View
104 sys-apps/kmod/kmod-13-r1.ebuild
@@ -0,0 +1,104 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+VIRTUAL_MODUTILS=1
+
+inherit autotools eutils libtool multilib linux-mod
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
+ KEYWORDS="*"
+fi
+
+DESCRIPTION="library and tools for managing linux kernel modules"
+HOMEPAGE="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc lzma static-libs +tools zlib"
+
+# Upstream does not support running the test suite with custom configure flags.
+# I was also told that the test suite is intended for kmod developers.
+# So we have to restrict it.
+# See bug #408915.
+RESTRICT="test"
+
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/modutils
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
+ zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
+DEPEND="${RDEPEND}
+ dev-libs/libxslt
+ doc? ( dev-util/gtk-doc )
+ lzma? ( virtual/pkgconfig )
+ zlib? ( virtual/pkgconfig )"
+
+pkg_setup() {
+ CONFIG_CHECK="~MODULES ~MODULE_UNLOAD"
+
+ linux-info_pkg_setup
+}
+
+src_prepare()
+{
+ epatch ${FILESDIR}/${P}-dont-call-syscall.patch
+
+ if [ ! -e configure ]; then
+ if use doc; then
+ gtkdocize --copy --docdir libkmod/docs || die
+ else
+ touch libkmod/docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+src_configure()
+{
+ econf \
+ --bindir=/sbin \
+ --with-rootlibdir=/$(get_libdir) \
+ $(use_enable static-libs static) \
+ $(use_enable tools) \
+ $(use_enable debug) \
+ $(use_enable doc gtk-doc) \
+ $(use_with lzma xz) \
+ $(use_with zlib)
+}
+
+src_install()
+{
+ default
+ prune_libtool_files
+
+ if use tools; then
+ local sbincmd
+ for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
+ dosym /sbin/kmod /sbin/${sbincmd}
+ done
+
+ fi
+
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf
+ softdep uhci_hcd pre: ehci_hcd
+ softdep ohci_hcd pre: ehci_hcd
+ EOF
+
+ insinto /lib/modprobe.d
+ doins "${T}"/usb-load-ehci-first.conf #260139
+}
+
+pkg_postinst() {
+ # Upgrade path from sys-apps/module-init-tools
+ if [[ -d ${ROOT}/lib/modules/${KV_FULL} ]]; then
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ update_depmod
+ fi
+ fi
+}
View
1 sys-fs/mdev-bb/Manifest
@@ -1 +1,2 @@
DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882
+DIST busybox-1.21.0.tar.bz2 2200841 SHA256 eb9d268627783297f5f459cb9bd61a94e395dc7cb3647e10ec186e0159aa36ed SHA512 ddafded24881f03db550d9793585bb5442c70f2a60a5d9770126f50981dadfe95fc0b280f83d5b8a8ce21c86bb7ce64e9f1a606cea140fb2f2599a21de55ba31 WHIRLPOOL d50378bb823dd59e8a607ed6a72d4890f4e5ad3304f1ddba9f7f3d49b5ab820acc9daa2b3c4619f8b147dec085c53c3c6f4b4ebe4c60b431299031d2af00a4d3
View
701 sys-fs/mdev-bb/files/busybox-1.21.0-mdev.patch
@@ -0,0 +1,701 @@
+--- busybox-1.21.0/util-linux/mdev.c
++++ busybox-1.21.0-mdev/util-linux/mdev.c
+@@ -80,7 +80,7 @@
+ //usage: IF_FEATURE_MDEV_CONF(
+ //usage: "\n"
+ //usage: "It uses /etc/mdev.conf with lines\n"
+-//usage: " [-]DEVNAME UID:GID PERM"
++//usage: " [-][ENV=regex;]...DEVNAME UID:GID PERM"
+ //usage: IF_FEATURE_MDEV_RENAME(" [>|=PATH]|[!]")
+ //usage: IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]")
+ //usage: "\n"
+@@ -230,9 +230,34 @@
+ * SUBSYSTEM=block
+ */
+
+-static const char keywords[] ALIGN1 = "add\0remove\0change\0";
++#define DEBUG_LVL 2
++
++#if DEBUG_LVL >= 1
++# define dbg1(...) do { if (G.verbose) bb_error_msg(__VA_ARGS__); } while(0)
++#else
++# define dbg1(...) ((void)0)
++#endif
++#if DEBUG_LVL >= 2
++# define dbg2(...) do { if (G.verbose >= 2) bb_error_msg(__VA_ARGS__); } while(0)
++#else
++# define dbg2(...) ((void)0)
++#endif
++#if DEBUG_LVL >= 3
++# define dbg3(...) do { if (G.verbose >= 3) bb_error_msg(__VA_ARGS__); } while(0)
++#else
++# define dbg3(...) ((void)0)
++#endif
++
++
++static const char keywords[] ALIGN1 = "add\0remove\0"; // "change\0"
+ enum { OP_add, OP_remove };
+
++struct envmatch {
++ struct envmatch *next;
++ char *envname;
++ regex_t match;
++};
++
+ struct rule {
+ bool keep_matching;
+ bool regex_compiled;
+@@ -243,12 +268,14 @@ struct rule {
+ char *ren_mov;
+ IF_FEATURE_MDEV_EXEC(char *r_cmd;)
+ regex_t match;
++ struct envmatch *envmatch;
+ };
+
+ struct globals {
+ int root_major, root_minor;
+ smallint verbose;
+ char *subsystem;
++ char *subsys_env; /* for putenv("SUBSYSTEM=subsystem") */
+ #if ENABLE_FEATURE_MDEV_CONF
+ const char *filename;
+ parser_t *parser;
+@@ -256,6 +283,7 @@ struct globals {
+ unsigned rule_idx;
+ #endif
+ struct rule cur_rule;
++ char timestr[sizeof("60.123456")];
+ } FIX_ALIASING;
+ #define G (*(struct globals*)&bb_common_bufsiz1)
+ #define INIT_G() do { \
+@@ -267,15 +295,8 @@ struct globals {
+ /* Prevent infinite loops in /sys symlinks */
+ #define MAX_SYSFS_DEPTH 3
+
+-/* We use additional 64+ bytes in make_device() */
+-#define SCRATCH_SIZE 80
+-
+-#if 0
+-# define dbg(...) bb_error_msg(__VA_ARGS__)
+-#else
+-# define dbg(...) ((void)0)
+-#endif
+-
++/* We use additional bytes in make_device() */
++#define SCRATCH_SIZE 128
+
+ #if ENABLE_FEATURE_MDEV_CONF
+
+@@ -288,14 +309,65 @@ static void make_default_cur_rule(void)
+
+ static void clean_up_cur_rule(void)
+ {
++ struct envmatch *e;
++
+ free(G.cur_rule.envvar);
++ free(G.cur_rule.ren_mov);
+ if (G.cur_rule.regex_compiled)
+ regfree(&G.cur_rule.match);
+- free(G.cur_rule.ren_mov);
+ IF_FEATURE_MDEV_EXEC(free(G.cur_rule.r_cmd);)
++ e = G.cur_rule.envmatch;
++ while (e) {
++ free(e->envname);
++ regfree(&e->match);
++ e = e->next;
++ }
+ make_default_cur_rule();
+ }
+
++/* In later versions, endofname is in libbb */
++#define endofname mdev_endofname
++static
++const char* FAST_FUNC
++endofname(const char *name)
++{
++#define is_name(c) ((c) == '_' || isalpha((unsigned char)(c)))
++#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
++ if (!is_name(*name))
++ return name;
++ while (*++name) {
++ if (!is_in_name(*name))
++ break;
++ }
++ return name;
++}
++
++static char *parse_envmatch_pfx(char *val)
++{
++ struct envmatch **nextp = &G.cur_rule.envmatch;
++
++ for (;;) {
++ struct envmatch *e;
++ char *semicolon;
++ char *eq = strchr(val, '=');
++ if (!eq /* || eq == val? */)
++ return val;
++ if (endofname(val) != eq)
++ return val;
++ semicolon = strchr(eq, ';');
++ if (!semicolon)
++ return val;
++ /* ENVVAR=regex;... */
++ *nextp = e = xzalloc(sizeof(*e));
++ nextp = &e->next;
++ e->envname = xstrndup(val, eq - val);
++ *semicolon = '\0';
++ xregcomp(&e->match, eq + 1, REG_EXTENDED);
++ *semicolon = ';';
++ val = semicolon + 1;
++ }
++}
++
+ static void parse_next_rule(void)
+ {
+ /* Note: on entry, G.cur_rule is set to default */
+@@ -308,12 +380,13 @@ static void parse_next_rule(void)
+ break;
+
+ /* Fields: [-]regex uid:gid mode [alias] [cmd] */
+- dbg("token1:'%s'", tokens[1]);
++ dbg3("token1:'%s'", tokens[1]);
+
+ /* 1st field */
+ val = tokens[0];
+ G.cur_rule.keep_matching = ('-' == val[0]);
+ val += G.cur_rule.keep_matching; /* swallow leading dash */
++ val = parse_envmatch_pfx(val);
+ if (val[0] == '@') {
+ /* @major,minor[-minor2] */
+ /* (useful when name is ambiguous:
+@@ -328,8 +401,10 @@ static void parse_next_rule(void)
+ if (sc == 2)
+ G.cur_rule.min1 = G.cur_rule.min0;
+ } else {
++ char *eq = strchr(val, '=');
+ if (val[0] == '$') {
+- char *eq = strchr(++val, '=');
++ /* $ENVVAR=regex ... */
++ val++;
+ if (!eq) {
+ bb_error_msg("bad $envvar=regex on line %d", G.parser->lineno);
+ goto next_rule;
+@@ -373,7 +448,7 @@ static void parse_next_rule(void)
+ clean_up_cur_rule();
+ } /* while (config_read) */
+
+- dbg("config_close(G.parser)");
++ dbg3("config_close(G.parser)");
+ config_close(G.parser);
+ G.parser = NULL;
+
+@@ -390,7 +465,7 @@ static const struct rule *next_rule(void
+
+ /* Open conf file if we didn't do it yet */
+ if (!G.parser && G.filename) {
+- dbg("config_open('%s')", G.filename);
++ dbg3("config_open('%s')", G.filename);
+ G.parser = config_open2(G.filename, fopen_for_read);
+ G.filename = NULL;
+ }
+@@ -399,7 +474,7 @@ static const struct rule *next_rule(void
+ /* mdev -s */
+ /* Do we have rule parsed already? */
+ if (G.rule_vec[G.rule_idx]) {
+- dbg("< G.rule_vec[G.rule_idx:%d]=%p", G.rule_idx, G.rule_vec[G.rule_idx]);
++ dbg3("< G.rule_vec[G.rule_idx:%d]=%p", G.rule_idx, G.rule_vec[G.rule_idx]);
+ return G.rule_vec[G.rule_idx++];
+ }
+ make_default_cur_rule();
+@@ -416,13 +491,28 @@ static const struct rule *next_rule(void
+ rule = memcpy(xmalloc(sizeof(G.cur_rule)), &G.cur_rule, sizeof(G.cur_rule));
+ G.rule_vec = xrealloc_vector(G.rule_vec, 4, G.rule_idx);
+ G.rule_vec[G.rule_idx++] = rule;
+- dbg("> G.rule_vec[G.rule_idx:%d]=%p", G.rule_idx, G.rule_vec[G.rule_idx]);
++ dbg3("> G.rule_vec[G.rule_idx:%d]=%p", G.rule_idx, G.rule_vec[G.rule_idx]);
+ }
+ }
+
+ return rule;
+ }
+
++static int env_matches(struct envmatch *e)
++{
++ while (e) {
++ int r;
++ char *val = getenv(e->envname);
++ if (!val)
++ return 0;
++ r = regexec(&e->match, val, /*size*/ 0, /*range[]*/ NULL, /*eflags*/ 0);
++ if (r != 0) /* no match */
++ return 0;
++ e = e->next;
++ }
++ return 1;
++}
++
+ #else
+
+ # define next_rule() (&G.cur_rule)
+@@ -468,7 +558,7 @@ static char *build_alias(char *alias, co
+
+ /* mknod in /dev based on a path like "/sys/block/hda/hda1"
+ * NB1: path parameter needs to have SCRATCH_SIZE scratch bytes
+- * after NUL, but we promise to not mangle (IOW: to restore if needed)
++ * after NUL, but we promise to not mangle (IOW: to restore NUL if needed)
+ * path string.
+ * NB2: "mdev -s" may call us many times, do not leak memory/fds!
+ *
+@@ -478,9 +568,7 @@ static char *build_alias(char *alias, co
+ static void make_device(char *device_name, char *path, int operation)
+ {
+ int major, minor, type, len;
+-
+- if (G.verbose)
+- bb_error_msg("device: %s, %s", device_name, path);
++ char *path_end = path + strlen(path);
+
+ /* Try to read major/minor string. Note that the kernel puts \n after
+ * the data, so we don't need to worry about null terminating the string
+@@ -489,29 +577,51 @@ static void make_device(char *device_nam
+ */
+ major = -1;
+ if (operation == OP_add) {
+- char *dev_maj_min = path + strlen(path);
+-
+- strcpy(dev_maj_min, "/dev");
+- len = open_read_close(path, dev_maj_min + 1, 64);
+- *dev_maj_min = '\0';
++ strcpy(path_end, "/dev");
++ len = open_read_close(path, path_end + 1, SCRATCH_SIZE - 1);
++ *path_end = '\0';
+ if (len < 1) {
+ if (!ENABLE_FEATURE_MDEV_EXEC)
+ return;
+ /* no "dev" file, but we can still run scripts
+ * based on device name */
+- } else if (sscanf(++dev_maj_min, "%u:%u", &major, &minor) == 2) {
+- if (G.verbose)
+- bb_error_msg("maj,min: %u,%u", major, minor);
++ } else if (sscanf(path_end + 1, "%u:%u", &major, &minor) == 2) {
++ dbg1("dev %u,%u", major, minor);
+ } else {
+ major = -1;
+ }
+ }
+ /* else: for delete, -1 still deletes the node, but < -1 suppresses that */
+
+- /* Determine device name, type, major and minor */
+- if (!device_name)
+- device_name = (char*) bb_basename(path);
+- /* http://kernel.org/doc/pending/hotplug.txt says that only
++ /* Determine device name */
++ if (!device_name) {
++ /*
++ * There was no $DEVNAME envvar (for example, mdev -s never has).
++ * But it is very useful: it contains the *path*, not only basename,
++ * Thankfully, uevent file has it.
++ * Example of .../sound/card0/controlC0/uevent file on Linux-3.7.7:
++ * MAJOR=116
++ * MINOR=7
++ * DEVNAME=snd/controlC0
++ */
++ strcpy(path_end, "/uevent");
++ len = open_read_close(path, path_end + 1, SCRATCH_SIZE - 1);
++ if (len < 0)
++ len = 0;
++ *path_end = '\0';
++ path_end[1 + len] = '\0';
++ device_name = strstr(path_end + 1, "\nDEVNAME=");
++ if (device_name) {
++ device_name += sizeof("\nDEVNAME=")-1;
++ strchrnul(device_name, '\n')[0] = '\0';
++ } else {
++ /* Fall back to just basename */
++ device_name = (char*) bb_basename(path);
++ }
++ }
++ /* Determine device type */
++ /*
++ * http://kernel.org/doc/pending/hotplug.txt says that only
+ * "/sys/block/..." is for block devices. "/sys/bus" etc is not.
+ * But since 2.6.25 block devices are also in /sys/class/block.
+ * We use strstr("/block/") to forestall future surprises.
+@@ -537,6 +647,8 @@ static void make_device(char *device_nam
+ rule = next_rule();
+
+ #if ENABLE_FEATURE_MDEV_CONF
++ if (!env_matches(rule->envmatch))
++ continue;
+ if (rule->maj >= 0) { /* @maj,min rule */
+ if (major != rule->maj)
+ continue;
+@@ -547,7 +659,7 @@ static void make_device(char *device_nam
+ }
+ if (rule->envvar) { /* $envvar=regex rule */
+ str_to_match = getenv(rule->envvar);
+- dbg("getenv('%s'):'%s'", rule->envvar, str_to_match);
++ dbg3("getenv('%s'):'%s'", rule->envvar, str_to_match);
+ if (!str_to_match)
+ continue;
+ }
+@@ -555,7 +667,7 @@ static void make_device(char *device_nam
+
+ if (rule->regex_compiled) {
+ int regex_match = regexec(&rule->match, str_to_match, ARRAY_SIZE(off), off, 0);
+- dbg("regex_match for '%s':%d", str_to_match, regex_match);
++ dbg3("regex_match for '%s':%d", str_to_match, regex_match);
+ //bb_error_msg("matches:");
+ //for (int i = 0; i < ARRAY_SIZE(off); i++) {
+ // if (off[i].rm_so < 0) continue;
+@@ -574,9 +686,8 @@ static void make_device(char *device_nam
+ }
+ /* else: it's final implicit "match-all" rule */
+ rule_matches:
++ dbg2("rule matched, line %d", G.parser ? G.parser->lineno : -1);
+ #endif
+- dbg("rule matched");
+-
+ /* Build alias name */
+ alias = NULL;
+ if (ENABLE_FEATURE_MDEV_RENAME && rule->ren_mov) {
+@@ -619,34 +730,30 @@ static void make_device(char *device_nam
+ }
+ }
+ }
+- dbg("alias:'%s'", alias);
++ dbg3("alias:'%s'", alias);
+
+ command = NULL;
+ IF_FEATURE_MDEV_EXEC(command = rule->r_cmd;)
+ if (command) {
+- const char *s = "$@*";
+- const char *s2 = strchr(s, command[0]);
+-
+ /* Are we running this command now?
+- * Run $cmd on delete, @cmd on create, *cmd on both
++ * Run @cmd on create, $cmd on delete, *cmd on any
+ */
+- if (s2 - s != (operation == OP_remove) || *s2 == '*') {
+- /* We are here if: '*',
+- * or: '@' and delete = 0,
+- * or: '$' and delete = 1
+- */
++ if ((command[0] == '@' && operation == OP_add)
++ || (command[0] == '$' && operation == OP_remove)
++ || (command[0] == '*')
++ ) {
+ command++;
+ } else {
+ command = NULL;
+ }
+ }
+- dbg("command:'%s'", command);
++ dbg3("command:'%s'", command);
+
+ /* "Execute" the line we found */
+ node_name = device_name;
+ if (ENABLE_FEATURE_MDEV_RENAME && alias) {
+ node_name = alias = build_alias(alias, device_name);
+- dbg("alias2:'%s'", alias);
++ dbg3("alias2:'%s'", alias);
+ }
+
+ if (operation == OP_add && major >= 0) {
+@@ -656,8 +763,17 @@ static void make_device(char *device_nam
+ mkdir_recursive(node_name);
+ *slash = '/';
+ }
+- if (G.verbose)
+- bb_error_msg("mknod: %s (%d,%d) %o", node_name, major, minor, rule->mode | type);
++ if (ENABLE_FEATURE_MDEV_CONF) {
++ dbg1("mknod %s (%d,%d) %o"
++ " %u:%u",
++ node_name, major, minor, rule->mode | type,
++ rule->ugid.uid, rule->ugid.gid
++ );
++ } else {
++ dbg1("mknod %s (%d,%d) %o",
++ node_name, major, minor, rule->mode | type
++ );
++ }
+ if (mknod(node_name, rule->mode | type, makedev(major, minor)) && errno != EEXIST)
+ bb_perror_msg("can't create '%s'", node_name);
+ if (ENABLE_FEATURE_MDEV_CONF) {
+@@ -671,8 +787,7 @@ static void make_device(char *device_nam
+ //TODO: on devtmpfs, device_name already exists and symlink() fails.
+ //End result is that instead of symlink, we have two nodes.
+ //What should be done?
+- if (G.verbose)
+- bb_error_msg("symlink: %s", device_name);
++ dbg1("symlink: %s", device_name);
+ symlink(node_name, device_name);
+ }
+ }
+@@ -681,27 +796,21 @@ static void make_device(char *device_nam
+ if (ENABLE_FEATURE_MDEV_EXEC && command) {
+ /* setenv will leak memory, use putenv/unsetenv/free */
+ char *s = xasprintf("%s=%s", "MDEV", node_name);
+- char *s1 = xasprintf("%s=%s", "SUBSYSTEM", G.subsystem);
+ putenv(s);
+- putenv(s1);
+- if (G.verbose)
+- bb_error_msg("running: %s", command);
++ dbg1("running: %s", command);
+ if (system(command) == -1)
+ bb_perror_msg("can't run '%s'", command);
+- bb_unsetenv_and_free(s1);
+ bb_unsetenv_and_free(s);
+ }
+
+ if (operation == OP_remove && major >= -1) {
+ if (ENABLE_FEATURE_MDEV_RENAME && alias) {
+ if (aliaslink == '>') {
+- if (G.verbose)
+- bb_error_msg("unlink: %s", device_name);
++ dbg1("unlink: %s", device_name);
+ unlink(device_name);
+ }
+ }
+- if (G.verbose)
+- bb_error_msg("unlink: %s", node_name);
++ dbg1("unlink: %s", node_name);
+ unlink(node_name);
+ }
+
+@@ -746,9 +855,16 @@ static int FAST_FUNC dirAction(const cha
+ * under /sys/class/ */
+ if (1 == depth) {
+ free(G.subsystem);
++ if (G.subsys_env) {
++ bb_unsetenv_and_free(G.subsys_env);
++ G.subsys_env = NULL;
++ }
+ G.subsystem = strrchr(fileName, '/');
+- if (G.subsystem)
++ if (G.subsystem) {
+ G.subsystem = xstrdup(G.subsystem + 1);
++ G.subsys_env = xasprintf("%s=%s", "SUBSYSTEM", G.subsystem);
++ putenv(G.subsys_env);
++ }
+ }
+
+ return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE);
+@@ -813,12 +929,107 @@ static void load_firmware(const char *fi
+ full_write(loading_fd, "-1", 2);
+
+ out:
++ xchdir("/dev");
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ close(firmware_fd);
+ close(loading_fd);
+ }
+ }
+
++static char *curtime(void)
++{
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ sprintf(G.timestr, "%u.%06u", (unsigned)tv.tv_sec % 60, (unsigned)tv.tv_usec);
++ return G.timestr;
++}
++
++static void open_mdev_log(const char *seq, unsigned my_pid)
++{
++ int logfd = open("mdev.log", O_WRONLY | O_APPEND);
++ if (logfd >= 0) {
++ xmove_fd(logfd, STDERR_FILENO);
++ G.verbose = 2;
++ applet_name = xasprintf("%s[%s]", applet_name, seq ? seq : utoa(my_pid));
++ }
++}
++
++/* If it exists, does /dev/mdev.seq match $SEQNUM?
++ * If it does not match, earlier mdev is running
++ * in parallel, and we need to wait.
++ * Active mdev pokes us with SIGCHLD to check the new file.
++ */
++static int
++wait_for_seqfile(const char *seq)
++{
++ /* We time out after 2 sec */
++ static const struct timespec ts = { 0, 32*1000*1000 };
++ int timeout = 2000 / 32;
++ int seq_fd = -1;
++ int do_once = 1;
++ sigset_t set_CHLD;
++
++ sigemptyset(&set_CHLD);
++ sigaddset(&set_CHLD, SIGCHLD);
++ sigprocmask(SIG_BLOCK, &set_CHLD, NULL);
++
++ for (;;) {
++ int seqlen;
++ char seqbuf[sizeof(int)*3 + 2];
++
++ if (seq_fd < 0) {
++ seq_fd = open("mdev.seq", O_RDWR);
++ if (seq_fd < 0)
++ break;
++ }
++ seqlen = pread(seq_fd, seqbuf, sizeof(seqbuf) - 1, 0);
++ if (seqlen < 0) {
++ close(seq_fd);
++ seq_fd = -1;
++ break;
++ }
++ seqbuf[seqlen] = '\0';
++ if (seqbuf[0] == '\n') {
++ /* seed file: write out seq ASAP */
++ xwrite_str(seq_fd, seq);
++ xlseek(seq_fd, 0, SEEK_SET);
++ dbg2("first seq written");
++ break;
++ }
++ if (strcmp(seq, seqbuf) == 0) {
++ /* correct idx */
++ break;
++ }
++ if (do_once) {
++ dbg2("%s waiting for '%s'", curtime(), seqbuf);
++ do_once = 0;
++ }
++ if (sigtimedwait(&set_CHLD, NULL, &ts) >= 0) {
++ dbg3("woken up");
++ continue; /* don't decrement timeout! */
++ }
++ if (--timeout == 0) {
++ dbg1("%s waiting for '%s'", "timed out", seqbuf);
++ break;
++ }
++ }
++ sigprocmask(SIG_UNBLOCK, &set_CHLD, NULL);
++ return seq_fd;
++}
++
++static void signal_mdevs(unsigned my_pid)
++{
++ procps_status_t* p = NULL;
++ while ((p = procps_scan(p, PSSCAN_ARGV0)) != NULL) {
++ if (p->pid != my_pid
++ && p->argv0
++ && strcmp(bb_basename(p->argv0), "mdev") == 0
++ ) {
++ kill(p->pid, SIGCHLD);
++ }
++ }
++}
++
+ int mdev_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int mdev_main(int argc UNUSED_PARAM, char **argv)
+ {
+@@ -840,8 +1051,8 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ xchdir("/dev");
+
+ if (argv[1] && strcmp(argv[1], "-s") == 0) {
+- /* Scan:
+- * mdev -s
++ /*
++ * Scan: mdev -s
+ */
+ struct stat st;
+
+@@ -853,6 +1064,8 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ G.root_major = major(st.st_dev);
+ G.root_minor = minor(st.st_dev);
+
++ putenv((char*)"ACTION=add");
++
+ /* ACTION_FOLLOWLINKS is needed since in newer kernels
+ * /sys/block/loop* (for example) are symlinks to dirs,
+ * not real directories.
+@@ -878,11 +1091,13 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ char *action;
+ char *env_devname;
+ char *env_devpath;
++ unsigned my_pid;
++ int seq_fd;
+ smalluint op;
+
+ /* Hotplug:
+ * env ACTION=... DEVPATH=... SUBSYSTEM=... [SEQNUM=...] mdev
+- * ACTION can be "add" or "remove"
++ * ACTION can be "add", "remove", "change"
+ * DEVPATH is like "/block/sda" or "/class/input/mice"
+ */
+ action = getenv("ACTION");
+@@ -893,39 +1108,20 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ if (!action || !env_devpath /*|| !G.subsystem*/)
+ bb_show_usage();
+ fw = getenv("FIRMWARE");
+- /* If it exists, does /dev/mdev.seq match $SEQNUM?
+- * If it does not match, earlier mdev is running
+- * in parallel, and we need to wait */
+ seq = getenv("SEQNUM");
+- if (seq) {
+- int timeout = 2000 / 32; /* 2000 msec */
+- do {
+- int seqlen;
+- char seqbuf[sizeof(int)*3 + 2];
+-
+- seqlen = open_read_close("mdev.seq", seqbuf, sizeof(seqbuf) - 1);
+- if (seqlen < 0) {
+- seq = NULL;
+- break;
+- }
+- seqbuf[seqlen] = '\0';
+- if (seqbuf[0] == '\n' /* seed file? */
+- || strcmp(seq, seqbuf) == 0 /* correct idx? */
+- ) {
+- break;
+- }
+- usleep(32*1000);
+- } while (--timeout);
+- }
+
+- {
+- int logfd = open("/dev/mdev.log", O_WRONLY | O_APPEND);
+- if (logfd >= 0) {
+- xmove_fd(logfd, STDERR_FILENO);
+- G.verbose = 1;
+- bb_error_msg("seq: %s action: %s", seq, action);
+- }
+- }
++ my_pid = getpid();
++ open_mdev_log(seq, my_pid);
++
++ seq_fd = seq ? wait_for_seqfile(seq) : -1;
++
++ dbg1("%s "
++ "ACTION:%s SUBSYSTEM:%s DEVNAME:%s DEVPATH:%s"
++ "%s%s",
++ curtime(),
++ action, G.subsystem, env_devname, env_devpath,
++ fw ? " FW:" : "", fw ? fw : ""
++ );
+
+ snprintf(temp, PATH_MAX, "/sys%s", env_devpath);
+ if (op == OP_remove) {
+@@ -935,16 +1131,18 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ if (!fw)
+ make_device(env_devname, temp, op);
+ }
+- else if (op == OP_add) {
++ else {
+ make_device(env_devname, temp, op);
+ if (ENABLE_FEATURE_MDEV_LOAD_FIRMWARE) {
+- if (fw)
++ if (op == OP_add && fw)
+ load_firmware(fw, temp);
+ }
+ }
+
+- if (seq) {
+- xopen_xwrite_close("mdev.seq", utoa(xatou(seq) + 1));
++ dbg1("%s exiting", curtime());
++ if (seq_fd >= 0) {
++ xwrite_str(seq_fd, utoa(xatou(seq) + 1));
++ signal_mdevs(my_pid);
+ }
+ }
+
View
43 sys-fs/mdev-bb/files/catch-all
@@ -3,49 +3,6 @@
umask 022
-usb_device() {
- case "${MDEV}" in
- # Our devices are like 2-1.5, 1-1, 2-2 etc.
- [0-9]*-[0-9]*)
- case "${ACTION}" in
- 'add')
- [ "${BUSNUM}" ] || return 1
- [ "${DEVNUM}" ] || return 1
- [ "${MAJOR}" ] || return 1
- [ "${MINOR}" ] || return 1
- mkdir -p "/dev/bus/usb/${BUSNUM}"
- mv "/dev/${MDEV}" "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
-
- # Catch most of the Android Phones.
- [ "${DEVPATH}" ] || return 1
- if [ -f "/sys/${DEVPATH}/product" ]; then
- idVendor="$(cat /sys/${DEVPATH}/idVendor)"
- case "${idVendor}" in
- '0bb4'|'18d1'|'22b8'|'0fce'|'19d2'|'04e8')
- chgrp 'plugdev' "/dev/bus/usb/${BUSNUM}/${DEVNUM}" 2>/dev/null && chmod 660 "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
- ;;
- esac
- fi
- ;;
- 'remove')
- [ "${BUSNUM}" ] || return 1
- [ "${DEVNUM}" ] || return 1
- [ "${MAJOR}" ] || return 1
- [ "${MINOR}" ] || return 1
- rm "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
- rmdir "/dev/bus/usb/${BUSNUM}" 2>/dev/null
- rmdir "/dev/bus/usb" 2>/dev/null
- ;;
- esac
- ;;
- esac
-}
-
-if [ "${SUBSYSTEM}" = 'usb' ] && [ "${DEVTYPE}" = 'usb_device' ]; then
- usb_device
- exit
-fi
-
# Log unknown event so we can debug it later.
# We hit this part of script if nothing above matched.
exit
View
37 sys-fs/mdev-bb/files/mdev.conf
@@ -1,10 +1,14 @@
# mdev-like-a-boss
# Syntax:
-# [-]devicename_regex user:group mode [>|=path] [@|$|*cmd args...]
+# [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
+# [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
+# [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
#
+# [-]: do not stop on this match, continue reading mdev.conf
# =: move, >: move and create a symlink
-# @|$|*: run $cmd on delete, @cmd on create, *cmd on both
+# !: do not create device node
+# @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
# support module loading on hotplug
$MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
@@ -19,7 +23,7 @@ hwrandom root:root 444
grsec root:root 660
# Kernel-based Virtual Machine.
-#kvm root:kvm 660
+kvm root:kvm 660
kmem root:root 640
mem root:root 640
@@ -50,16 +54,13 @@ fd[0-9]* root:floppy 660
# Run settle-nics every time new NIC appear.
# If you don't want to auto-populate /etc/mactab with NICs, run 'settle-nis' without '--write-mactab' param.
--net/.* root:root 600 @/etc/mdev/settle-nics --write-mactab
-tun[0-9]* root:kvm 660 =net/
-tap[0-9]* root:root 600 =net/
+-SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/etc/mdev/settle-nics --write-mactab
+
+net/tun[0-9]* root:kvm 660
+net/tap[0-9]* root:root 600
# alsa sound devices and audio stuff
-pcm.* root:audio 660 =snd/
-control.* root:audio 660 =snd/
-midi.* root:audio 660 =snd/
-seq root:audio 660 =snd/
-timer root:audio 660 =snd/
+SUBSYSTEM=sound;.* root:audio 660
adsp root:audio 660 >sound/
audio root:audio 660 >sound/
@@ -83,10 +84,7 @@ psaux root:root 660 >misc/
rtc root:root 664 >misc/
# input stuff
-event[0-9]+ root:root 640 =input/
-mice root:root 640 =input/
-mouse[0-9] root:root 640 =input/
-ts[0-9] root:root 600 =input/
+#SUBSYSTEM=input;.* root:root 600
# v4l stuff
vbi[0-9] root:video 660 >v4l/
@@ -101,12 +99,13 @@ usbdev[0-9].[0-9]* root:root 660 !
# Stop creating x:x:x:x which looks like /dev/dm-*
[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 !
-
# /dev/cpu support.
microcode root:root 600 =cpu/
cpu([0-9]+) root:root 600 =cpu/%1/cpuid
msr([0-9]+) root:root 600 =cpu/%1/msr
-# Catch-all other devices, the script will
-# populate /dev/bus/usb etc...
-.* root:root 660 */etc/mdev/catch-all
+# Populate /proc/bus/usb.
+SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */etc/mdev/proc-bus-usb
+
+# Catch-all other devices, Right now useful only for debuging.
+#.* root:root 660 */opt/mdev/helpers/catch-all
View
2 sys-fs/mdev-bb/files/mdev.init
@@ -50,7 +50,7 @@ start()
fi
ebegin "Loading kernel modules for detected hardware"
- /sbin/mdev -s
+ env -i /sbin/mdev -s
# mdev -s does not poke network interfaces or usb devices so we need to do it here.
for i in /sys/class/net/*/uevent; do printf 'add' > "$i"; done 2>/dev/null; unset i
for i in /sys/bus/usb/devices/*; do
View
33 sys-fs/mdev-bb/files/proc-bus-usb
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+umask 022
+
+case "${ACTION}" in
+ 'add')
+ [ "${BUSNUM}" ] || return 1
+ [ "${DEVNUM}" ] || return 1
+ [ "${MAJOR}" ] || return 1
+ [ "${MINOR}" ] || return 1
+ mkdir -p "/dev/bus/usb/${BUSNUM}"
+ [ "/dev/${MDEV}" != "/dev/bus/usb/${BUSNUM}/${DEVNUM}" ] && mv "/dev/${MDEV}" "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
+ [ "${DEVPATH}" ] || return 1
+ # Catch most of the Android Phones.
+ if [ -f "/sys/${DEVPATH}/product" ]; then
+ idVendor="$(cat /sys/${DEVPATH}/idVendor)"
+ case "${idVendor}" in
+ '0bb4'|'18d1'|'22b8'|'0fce'|'19d2'|'04e8')
+ chgrp 'plugdev' "/dev/bus/usb/${BUSNUM}/${DEVNUM}" 2>/dev/null && chmod 660 "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
+ ;;
+ esac
+ fi
+ ;;
+ 'remove')
+ [ "${BUSNUM}" ] || return 1
+ [ "${DEVNUM}" ] || return 1
+ [ "${MAJOR}" ] || return 1
+ [ "${MINOR}" ] || return 1
+ rm "/dev/bus/usb/${BUSNUM}/${DEVNUM}"
+ rmdir "/dev/bus/usb/${BUSNUM}" 2>/dev/null
+ rmdir "/dev/bus/usb" 2>/dev/null
+ ;;
+esac
View
23 sys-fs/mdev-bb/files/storage-device
@@ -54,23 +54,12 @@ create_uuid_label_symlink() {
add_symlinks() {
if command -v blkid >/dev/null 2>&1; then
- local field name value
- for field in $(blkid "/dev/${MDEV}"); do
- case