Commits

braindamaged committed e4916db

Initial commit

Comments (0)

Files changed (8)

sys-apps/kmod/Manifest

+AUX kmod-8-gc-sections.patch 3167 SHA256 d0f9a28f01b3ab7a00f53a97f8d1596977c945f9125e884e9eaa850e1f433281 SHA512 da6f05d784028536e5861c84add81b54f4e6338672aa576c92b95555dc75d18bdd5d6d689d7cc9ba0526866c23913e9bfbbccf3888e376fbaabd9053021e6a36 WHIRLPOOL ef143dd901a8b2dd46cbd45bfd030fb44ae67b7c333ae10dd7761ec5b12e3c7e93cc4e343c9c9642b410eef67051fe2a6542bab20418c805f526e9465ee5dfcf
+DIST kmod-9.tar.xz 1122668 SHA256 0607267cb62dbc9009d0719f442a56f97f64d9983e20dbcaedfff9073abdcecf SHA512 912404830d46ab27f9472a4ce0272c03b16b36291069f9cf1a51bc533429fe8f46d7a749edc399fb1631a435dea4077728d0a5b16961603fdde339d3e2b14f1f WHIRLPOOL 1f769b640b97aa248dcf8b0360f6733ce498bdac571b8710154c455d9971367c1d16204fd4acf1d898d4e0af93892c0f4c6e23ff62d50d96b75b69d5668ffb9b
+EBUILD kmod-9-r4.ebuild 2079 SHA256 b88ae6d85b92240927ec61f88d37cd01cdf96cfadaedb0384b4f8e594a7d896e SHA512 65c997bda546252694529e83ef28f01725c49016a8a9f6fb0e0d2663ecabff7200506bcea894e618f0c38877790eee30d34bbce103fd399057a6f9782b3506ce WHIRLPOOL 4a3a7d6fdf642dcde321560920e9a2fb1fab50dc1c0f73b3e25b9872f2064de5714b503f3c99e2b20baf5e3aeb6e0c5370a3440274571b63850ba2020c8a89f0
+MISC metadata.xml 248 SHA256 fecdc22a14c4c672b4f850d5e40c1c75142975f667739f7c1128258718f5eaa2 SHA512 14411e00a3240d5478c5b1390cd2f74d42ea938fa11044cac56e30e2f66377484303672334db0a8cd77567d3dc4436141ca5a90ac574cb126bce8544c040aa1c WHIRLPOOL 56eb33b5a9855a3a1fbdef25aa29dd519f51fdf766222c4f26b5b7a962be6cfd2cf68ab264d7c43f1a2147f4c7e2c2958629a154cf80937993580fc9a630be7e

sys-apps/kmod/files/kmod-8-gc-sections.patch

+From d30319e4335bcf76101e28d81c9a7c2ec9187cb7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 15 May 2012 19:29:44 -0300
+Subject: [PATCH] libkmod: move function to the only file using it
+
+If we don't have --gc-sections support, linking kmod fails:
+libkmod/.libs/libkmod-util.a(libkmod-util.o): In function 'underscores':
+libkmod/libkmod-util.c:117: undefined reference to 'kmod_log'
+
+This is because libkmod-util.la uses kmod_log(), that is in libkmod.la.
+Move the function so we don't have a dependency loop while building the
+libraries and it works with compilers with no support for --gc-sections.
+---
+ libkmod/libkmod-config.c |   31 +++++++++++++++++++++++++++++++
+ libkmod/libkmod-util.c   |   31 -------------------------------
+ libkmod/libkmod-util.h   |    1 -
+ 3 files changed, 31 insertions(+), 32 deletions(-)
+
+diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
+index 586d3fa..d0f7848 100644
+--- a/libkmod/libkmod-config.c
++++ b/libkmod/libkmod-config.c
+@@ -108,6 +108,37 @@ const char * const *kmod_softdep_get_post(const struct kmod_list *l, unsigned in
+ 	return dep->post;
+ }
+ 
++/*
++ * Replace dashes with underscores.
++ * Dashes inside character range patterns (e.g. [0-9]) are left unchanged.
++ */
++static char *underscores(struct kmod_ctx *ctx, char *s)
++{
++	unsigned int i;
++
++	if (!s)
++		return NULL;
++
++	for (i = 0; s[i]; i++) {
++		switch (s[i]) {
++		case '-':
++			s[i] = '_';
++			break;
++
++		case ']':
++			INFO(ctx, "Unmatched bracket in %s\n", s);
++			break;
++
++		case '[':
++			i += strcspn(&s[i], "]");
++			if (!s[i])
++				INFO(ctx, "Unmatched bracket in %s\n", s);
++			break;
++		}
++	}
++	return s;
++}
++
+ static int kmod_config_add_command(struct kmod_config *config,
+ 						const char *modname,
+ 						const char *command,
+diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c
+index f499578..0fa90f9 100644
+--- a/libkmod/libkmod-util.c
++++ b/libkmod/libkmod-util.c
+@@ -90,37 +90,6 @@ char *getline_wrapped(FILE *fp, unsigned int *linenum)
+ 	}
+ }
+ 
+-/*
+- * Replace dashes with underscores.
+- * Dashes inside character range patterns (e.g. [0-9]) are left unchanged.
+- */
+-char *underscores(struct kmod_ctx *ctx, char *s)
+-{
+-	unsigned int i;
+-
+-	if (!s)
+-		return NULL;
+-
+-	for (i = 0; s[i]; i++) {
+-		switch (s[i]) {
+-		case '-':
+-			s[i] = '_';
+-			break;
+-
+-		case ']':
+-			INFO(ctx, "Unmatched bracket in %s\n", s);
+-			break;
+-
+-		case '[':
+-			i += strcspn(&s[i], "]");
+-			if (!s[i])
+-				INFO(ctx, "Unmatched bracket in %s\n", s);
+-			break;
+-		}
+-	}
+-	return s;
+-}
+-
+ inline int alias_normalize(const char *alias, char buf[PATH_MAX], size_t *len)
+ {
+ 	size_t s;
+diff --git a/libkmod/libkmod-util.h b/libkmod/libkmod-util.h
+index 317b2f7..163b187 100644
+--- a/libkmod/libkmod-util.h
++++ b/libkmod/libkmod-util.h
+@@ -9,7 +9,6 @@
+ 
+ 
+ char *getline_wrapped(FILE *fp, unsigned int *linenum) __attribute__((nonnull(1)));
+-char *underscores(struct kmod_ctx *ctx, char *s) __attribute__((nonnull(1, 2)));
+ #define streq(a, b) (strcmp((a), (b)) == 0)
+ #define strstartswith(a, b) (strncmp(a, b, strlen(b)) == 0)
+ void *memdup(const void *p, size_t n) __attribute__((nonnull(1)));
+-- 
+1.7.9.7
+

sys-apps/kmod/kmod-9-r4.ebuild

+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+
+[[ ${PV} == 9999 ]] && vcs=git-2
+inherit ${vcs} autotools eutils toolchain-funcs libtool
+unset vcs
+
+if [[ ${PV} != 9999 ]] ; then
+	SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+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"
+
+RDEPEND="!sys-apps/module-init-tools
+	!sys-apps/modutils
+	lzma? ( app-arch/xz-utils )
+	zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
+DEPEND="${RDEPEND}
+	doc? ( dev-util/gtk-doc )
+	lzma? ( virtual/pkgconfig )
+	zlib? ( virtual/pkgconfig )"
+
+# 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"
+
+src_prepare()
+{
+	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=${EPREFIX}/sbin \
+		--libdir=${EPREFIX}/usr/$(get_libdir) \
+		--libexecdir=${EPREFIX}/$(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
+
+	find "${D}" -name libkmod.la -exec rm -f {} +
+
+	if use tools; then
+		local cmd
+		for cmd in insmod lsmod modinfo rmmod; do
+			dosym kmod /sbin/${cmd}
+		done
+		# according to upstream, modprobe can be called directly by the kernel,
+		# so it cannot be moved to /usr/bin at this time.
+		dosym /sbin/kmod /sbin/modprobe
+		# another hardcoded path in the Linux source tree, bug #426698
+		dosym /sbin/kmod /sbin/depmod
+	fi
+}

sys-apps/kmod/metadata.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>base-system</herd>
+	<use>
+		<flag name='tools'>Install module loading/unloading tools.</flag>
+	</use>
+</pkgmetadata>

sys-fs/udev/Manifest

+AUX 40-gentoo.rules 349 SHA256 5d618b899475925ceccc330b6a738644aedd582d039f0cc404502637351347ea SHA512 b8d90037c08f30c9fb9e22a43c59a3627c218313b0421d4b70feba1731cda76ddc4ee6bdb99dca8df61e11f8d656a8769e172f0a584d7620213973dacfbbb4aa WHIRLPOOL a4086cd5f0e8849369389aa29ec42f5d906b00e3d650724d38ff8b4df4e36de7d3a37393b14f2f30a7102d6f2859b6847b5f4b7813be12d945ce1515494ce120
+EBUILD udev-9999.ebuild 3827 SHA256 a9866d0006fe00ce9a8d283f6ab3a949ed84a142826c5686592bb7ac1437d28d SHA512 e0c7757f7699824e153a0da2168a0e1db248aeb767156aac5cf8d4c811ea3c4b33dcfb34b2249e113489ed82945b2ae7e929790f194729f5ee0eb25708b2945b WHIRLPOOL cbf258a045a227b7bd0949ef7eb75cf8f5dbdc0b7109f6430777b1dab30ce4a8633bd5f881cc15a1bd7e05748d78303f111c44ed15010d418b1057534b01bb7f
+MISC metadata.xml 1154 SHA256 421586e9dd88977cd731cdf629be45aa0b8e73b73efb68006043dc9463109383 SHA512 965f33a373e83628bc62a0bcdee04db14f2c9f318b2124a4b18b194e34f63355458e7e459096e848ac4b43a68a11de59f474a4a09e752ec2b35058c916544359 WHIRLPOOL 109e8b2155f74f9f04624ff5b2b2587ca9204996cc2ac19f38e47962015d4008bd2e120e13caa6657654941e72aaef920f1d87f4bd9f1aff6a91d22638888592

sys-fs/udev/files/40-gentoo.rules

+# do not edit this file, it will be overwritten on update
+
+# setting permissions
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
+
+# dialout devices
+KERNEL=="ippp*|isdn*|dcbri*|rfcomm*|ttyACM[0-9]*|pilot", GROUP="uucp"
+
+# sound devices (oss)
+SUBSYSTEM=="snd",	GROUP="audio"
+
+# Sony Vaio Jogdial sonypi device
+KERNEL=="sonypi",	MODE="0666"
+

sys-fs/udev/metadata.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<use>
+  <flag name="action_modeswitch">switch Mobile Action cables into serial mode</flag>
+  <flag name="devfs-compat">Install rules for devfs compatible device names</flag>
+  <flag name="edd">create /dev/disk/by-id/edd-* links for BIOS EDD data</flag>
+  <flag name="extras">Compile udev-extras requiring external dependencies</flag>
+  <flag name="floppy">create historical floppy kernel device nodes (/dev/fd0h1440, ...)</flag>
+  <flag name="gudev">enable libudev gobject interface</flag>
+  <flag name="hwdb">read vendor/device string database and add it to udev database</flag>
+  <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
+  	for introspection</flag>
+  <flag name="keymap">map custom hardware's multimedia keys</flag>
+  <flag name="old-hd-rules">Install rules for /dev/hd* devices, removed upstream at udev-148</flag>
+  <flag name="rule_generator">enable persistent network and optical device rule generator</flag>
+  <flag name="openrc">install the OpenRC init scripts</flag>
+</use>
+</pkgmetadata>

sys-fs/udev/udev-9999.ebuild

+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+EGIT_REPO_URI="https://bitbucket.org/braindamaged/udev.git"
+EGIT_HAS_SUBMODULES="0"
+
+inherit autotools eutils linux-info git-2 toolchain-funcs
+
+DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
+HOMEPAGE="https://bitbucket.org/braindamaged/udev"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc debug gudev hwdb introspection keymap floppy +openrc selinux static-libs"
+
+RESTRICT="test"
+
+# Required kernel version
+KV_MIN="2.6.39"
+
+COMMON_DEPEND="gudev? ( dev-libs/glib:2 )
+	introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+	selinux? ( sys-libs/libselinux )
+	>=sys-apps/kmod-5
+	>=sys-apps/util-linux-2.20
+	!<sys-libs/glibc-2.12"
+
+DEPEND="${COMMON_DEPEND}
+	dev-util/gperf
+	>=dev-util/intltool-0.40.0
+	virtual/pkgconfig
+	virtual/os-headers
+	!<sys-kernel/linux-headers-${KV_MIN}
+	doc? ( dev-util/gtk-doc )
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt"
+
+RDEPEND="${COMMON_DEPEND}
+	hwdb? ( sys-apps/hwids )
+	openrc?
+	(
+		>=sys-fs/udev-init-scripts-16
+		!<sys-apps/openrc-0.9.9
+	)
+	!sys-apps/coldplug
+	!<sys-fs/lvm2-2.02.45
+	!sys-fs/device-mapper
+	!<sys-fs/udev-init-scripts-16
+	!<sys-kernel/dracut-017-r1
+	!<sys-kernel/genkernel-3.4.25
+	!<sys-apps/systemd-188"
+
+# Required kernel options
+CONFIG_CHECK="~DEVTMPFS ~HOTPLUG ~INOTIFY_USER ~NET ~PROC_FS ~SIGNALFD ~SYSFS
+	~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~BLK_DEV_BSG"
+
+## Checks current kernel version
+#
+# Return values:
+#	0 -- Kernel is new enough
+#	1 -- Kernel is too old
+#
+udev_check_kv() {
+	kernel_is -ge ${KV_MIN//./ }
+	return $?
+}
+
+pkg_setup() {
+	echo
+	get_version && udev_check_kv
+
+	case $? in
+		0)	einfo "Your current kernel version (${KV_FULL}) is new enough to run ${P}."
+			;;
+		1)	eerror "Your current kernel version (${KV_FULL}) is too old to run ${P}."
+			eerror "You need at least ${KV_MIN}."
+			;;
+	esac
+
+	KV_FULL_SRC=${KV_FULL}
+
+	echo
+	get_running_version && udev_check_kv
+
+	case $? in
+		0)	einfo "Your running kernel version (${KV_FULL}) is new enough to run ${P}."
+			;;
+		1)	eerror "Your running kernel version (${KV_FULL}) is too old!"
+			eerror "You need at least ${KV_MIN}."
+			;;
+	esac
+	
+	echo
+	check_extra_config
+}
+
+src_prepare() {
+	# Change rules back to group uucp instead of dialout for now
+	sed -e 's/GROUP="dialout"/GROUP="uucp"/g' \
+		-i rules/*.rules \
+		|| die "failed to change group dialout to uucp"
+	
+	if [[ ! -e configure ]]; then
+		if use doc; then
+			gtkdocize || die "gtkdocize failed"
+		else
+			rm -f gtk-doc.make
+			echo 'EXTRA_DIST =' > gtk-doc.make
+		fi
+		eautoreconf
+	else
+		check_default_rules
+		elibtoolize
+	fi
+}
+
+src_configure() {
+	econf \
+		--prefix="${EPREFIX}" \
+		--with-rootprefix="${EPREFIX}" \
+		--bindir="${EPREFIX}"/sbin \
+		--sysconfdir="${EPREFIX}"/etc \
+		--libexecdir="${EPREFIX}"/"$(get_libdir)" \
+		--libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+		--with-rootlibdir="${EPREFIX}"/"$(get_libdir)" \
+		--includedir="${EPREFIX}"/usr/include \
+		--datarootdir="${EPREFIX}"/usr/share \
+		--docdir="${EPREFIX}"/usr/share/doc/"${PF}" \
+		--with-html-dir="${EPREFIX}"/usr/share/doc/"${PF}"/html \
+		--with-pci-ids-path="${EPREFIX}"/usr/share/misc/pci.ids \
+		--with-usb-ids-path="${EPREFIX}"/usr/share/misc/usb.ids \
+		--enable-logging \
+		$(use_with selinux) \
+		$(use_enable debug) \
+		$(use_enable doc gtk-doc) \
+		$(use_enable static-libs static) \
+		$(use_enable keymap) \
+		$(use_enable floppy) \
+		$(use_enable gudev) \
+		$(use_enable introspection)
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+	
+	# Install documentation
+	dodoc COPYING README INSTALL 
+
+	# Install gentoo-specific rules
+	insinto /"$(get_libdir)"/udev/rules.d
+	doins "${FILESDIR}"/40-gentoo.rules
+}
+
+pkg_postinst() {
+	# Create rundir for udev
+	mkdir -p "${ROOT}"/run
+}