summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-05-30 13:42:49 +0000
committerRoy Marples <uberlord@gentoo.org>2006-05-30 13:42:49 +0000
commitd0d33206cfc98fc27c3ad5a316339d5a3e474677 (patch)
tree3f1c3d85c9caaf99e1248c3e148c1d89dafdd427 /sys-apps/netplug
parentSnapshot bump (diff)
downloadgentoo-2-d0d33206cfc98fc27c3ad5a316339d5a3e474677.tar.gz
gentoo-2-d0d33206cfc98fc27c3ad5a316339d5a3e474677.tar.bz2
gentoo-2-d0d33206cfc98fc27c3ad5a316339d5a3e474677.zip
Add a patch to ignore silly wireless messages
(Portage version: 2.1_rc3-r2)
Diffstat (limited to 'sys-apps/netplug')
-rw-r--r--sys-apps/netplug/ChangeLog9
-rw-r--r--sys-apps/netplug/files/digest-netplug-1.2.9-r33
-rw-r--r--sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch37
-rw-r--r--sys-apps/netplug/netplug-1.2.9-r3.ebuild60
4 files changed, 108 insertions, 1 deletions
diff --git a/sys-apps/netplug/ChangeLog b/sys-apps/netplug/ChangeLog
index 9c19793de507..a4ad76ae230b 100644
--- a/sys-apps/netplug/ChangeLog
+++ b/sys-apps/netplug/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/netplug
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.8 2006/04/30 13:26:23 blubb Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.9 2006/05/30 13:42:49 uberlord Exp $
+
+*netplug-1.2.9-r3 (30 May 2006)
+
+ 30 May 2006; Roy Marples <uberlord@gentoo.org>
+ +files/netplug-1.2.9-ignore-wireless.patch, +netplug-1.2.9-r3.ebuild:
+ Add a patch to ignore silly wireless messages that don't have an interface
+ name and yet claim they are a newlink.
30 Apr 2006; Simon Stelling <blubb@gentoo.org> netplug-1.2.9-r2.ebuild:
stable on amd64
diff --git a/sys-apps/netplug/files/digest-netplug-1.2.9-r3 b/sys-apps/netplug/files/digest-netplug-1.2.9-r3
new file mode 100644
index 000000000000..ee92ca9b897a
--- /dev/null
+++ b/sys-apps/netplug/files/digest-netplug-1.2.9-r3
@@ -0,0 +1,3 @@
+MD5 3bc8062d8033e3f897b015f2889ce5a9 netplug-1.2.9.tar.bz2 21786
+RMD160 e3e1f9cd62062fd6bca6ab86059d6eb1b4c986f2 netplug-1.2.9.tar.bz2 21786
+SHA256 15e7928c819c72108432b0d573110630ff6eb2f7be05e5a6dc1dc04fa05f63b1 netplug-1.2.9.tar.bz2 21786
diff --git a/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch b/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch
new file mode 100644
index 000000000000..de5cba2cb08d
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-1.2.9-ignore-wireless.patch
@@ -0,0 +1,37 @@
+--- netplug-1.2.9/main.c
++++ netplug-1.2.9/main.c
+@@ -36,6 +36,10 @@
+
+ #include "netplug.h"
+
++/* Support old kernels without wireless */
++#ifndef IFLA_WIRELESS
++#define IFLA_WIRELESS (IFLA_MASTER + 1)
++#endif /* IFLA_WIRELESS */
+
+ int use_syslog;
+ static char *pid_file;
+@@ -63,6 +67,14 @@
+
+ parse_rtattrs(attrs, IFLA_MAX, IFLA_RTA(info), len);
+
++ /* Ignore wireless messages */
++ if (attrs[IFLA_WIRELESS] != NULL
++ && hdr->nlmsg_type == RTM_NEWLINK
++ && info->ifi_change == 0) {
++ do_log(LOG_DEBUG, "Ignoring wireless netlink message");
++ return 0;
++ }
++
+ if (attrs[IFLA_IFNAME] == NULL) {
+ do_log(LOG_ERR, "No interface name");
+ return -1;
+@@ -71,7 +83,7 @@
+ char *name = RTA_DATA(attrs[IFLA_IFNAME]);
+
+ if (!if_match(name)) {
+- do_log(LOG_INFO, "%s: ignoring event", name);
++ do_log(LOG_DEBUG, "%s: ignoring event", name);
+ return 0;
+ }
+
diff --git a/sys-apps/netplug/netplug-1.2.9-r3.ebuild b/sys-apps/netplug/netplug-1.2.9-r3.ebuild
new file mode 100644
index 000000000000..14401f81f3eb
--- /dev/null
+++ b/sys-apps/netplug/netplug-1.2.9-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/netplug-1.2.9-r3.ebuild,v 1.1 2006/05/30 13:42:49 uberlord Exp $
+
+inherit eutils
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.red-bean.com/~bos/"
+SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+hax_bitkeeper() {
+ # the makefiles have support for bk ...
+ # basically we have to do this or bk will try to write
+ # to files in /opt/bitkeeper causing sandbox violations ;(
+ mkdir "${T}/fakebin"
+ echo "#!/bin/sh"$'\n'"exit 1" > "${T}/fakebin/bk"
+ chmod a+x "${T}/fakebin/bk"
+ export PATH="${T}/fakebin:${PATH}"
+}
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+
+ # Remove debugging from Makefile
+ # Remove -O3 if we have -O[0-9] in our CFLAGS
+ local remove=" -ggdb3 "
+ [[ " ${CFLAGS} " == *" -O"[0-9]" "* ]] && remove="${remove}-O3 "
+ sed -i -e "s/${remove}/ /" Makefile
+
+ # Use correct structure for getsockname arg 3
+ epatch "${FILESDIR}/${P}-gcc4.patch"
+
+ # Remove nested functions, #116140
+ epatch "${FILESDIR}/${P}-remove-nest.patch"
+
+ # Ignore wireless events
+ epatch "${FILESDIR}/${P}-ignore-wireless.patch"
+}
+
+src_compile() {
+ hax_bitkeeper
+ make || die "emake failed"
+}
+
+src_install() {
+ into /
+ dosbin netplugd
+ doman man/man8/netplugd.8
+
+ dodir /etc/netplug.d
+ exeinto /etc/netplug.d
+ doexe "${FILESDIR}/netplug"
+
+ dodir /etc/netplug
+ echo "eth*" > "${D}"/etc/netplug/netplugd.conf
+}