summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-02 22:24:35 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-02 22:24:35 +0000
commit9d160d76d80f5fb9b48865cb7eca853da4f23eec (patch)
tree8e069be8b1b09b1db3dac1eb5800382efd77479c /sys-apps
parentadd missing gdk-pixbuf and glib dependencies. Stable on amd64. Bug #391613 (diff)
downloadgentoo-2-9d160d76d80f5fb9b48865cb7eca853da4f23eec.tar.gz
gentoo-2-9d160d76d80f5fb9b48865cb7eca853da4f23eec.tar.bz2
gentoo-2-9d160d76d80f5fb9b48865cb7eca853da4f23eec.zip
Version bump.
(Portage version: 2.2.0_alpha75/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/iproute2/ChangeLog8
-rw-r--r--sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch48
-rw-r--r--sys-apps/iproute2/iproute2-3.1.0.ebuild98
-rw-r--r--sys-apps/iproute2/iproute2-9999.ebuild38
4 files changed, 172 insertions, 20 deletions
diff --git a/sys-apps/iproute2/ChangeLog b/sys-apps/iproute2/ChangeLog
index 63f70f3b5bc9..81a9b43689ab 100644
--- a/sys-apps/iproute2/ChangeLog
+++ b/sys-apps/iproute2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/iproute2
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.174 2011/10/18 21:41:55 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.175 2011/12/02 22:24:35 vapier Exp $
+
+*iproute2-3.1.0 (02 Dec 2011)
+
+ 02 Dec 2011; Mike Frysinger <vapier@gentoo.org> +iproute2-3.1.0.ebuild,
+ +files/iproute2-3.1.0-mtu.patch, iproute2-9999.ebuild:
+ Version bump.
18 Oct 2011; Mike Frysinger <vapier@gentoo.org> iproute2-2.6.38.ebuild,
+files/iproute2-2.6.38-parallel-build.patch:
diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
new file mode 100644
index 000000000000..fa12dad2d79e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
@@ -0,0 +1,48 @@
+http://bugs.gentoo.org/291907
+
+This patch was merged from two patches extracted from this thread:
+http://markmail.org/thread/qkd76gpdgefpjlfn
+
+tc_stab.c: small fixes to commandline help
+
+
+tc_core.c:
+As kernel part of things relies on cell align which is always set to -1,
+I also added it to userspace computation stage. This way if someone
+specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
+end with tsize supporting mtu 4096 suddenly, New default mtu is also set
+to 2048 (disregarding weirdness of setting mtu to such values).
+
+
+Unless I missed something, this is harmless and feels cleaner, but if it's
+not allowed, documentation will have to be changed back to 2047 + extra
+explanation as well.
+
+--- iproute2/tc/tc_core.c
++++ iproute2/tc/tc_core.c
+@@ -155,12 +155,12 @@
+ }
+
+ if (s->mtu == 0)
+- s->mtu = 2047;
++ s->mtu = 2048;
+ if (s->tsize == 0)
+ s->tsize = 512;
+
+ s->cell_log = 0;
+- while ((s->mtu >> s->cell_log) > s->tsize - 1)
++ while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
+ s->cell_log++;
+
+ *stab = malloc(s->tsize * sizeof(__u16));
+--- iproute2/tc/tc_stab.c
++++ iproute2/tc/tc_stab.c
+@@ -32,7 +32,7 @@
+ fprintf(stderr,
+ "Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
+ " [ overhead BYTES ] [ linklayer TYPE ] ...\n"
+- " mtu : max packet size we create rate map for {2047}\n"
++ " mtu : max packet size we create size table for {2048}\n"
+ " tsize : how many slots should size table have {512}\n"
+ " mpu : minimum packet size used in rate computations\n"
+ " overhead : per-packet size overhead used in rate computations\n"
diff --git a/sys-apps/iproute2/iproute2-3.1.0.ebuild b/sys-apps/iproute2/iproute2-3.1.0.ebuild
new file mode 100644
index 000000000000..ffef23a607ea
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-3.1.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.1.0.ebuild,v 1.1 2011/12/02 22:24:35 vapier Exp $
+
+EAPI=4
+
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+
+if [[ ${PV} == *.*.*.* ]] ; then
+ MY_PV=${PV%.*}-${PV##*.}
+else
+ MY_PV=${PV}
+fi
+MY_P="${PN}-${MY_PV}"
+
+inherit eutils toolchain-funcs flag-o-matic
+[[ ${PV} == "9999" ]] && inherit git-2
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
+[[ ${PV} == "9999" ]] || SRC_URI="mirror://kernel/linux/utils/networking/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ ${PV} == "9999" ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="atm berkdb minimal"
+
+RDEPEND="!net-misc/arpd
+ !minimal? ( berkdb? ( sys-libs/db ) )
+ atm? ( net-dialup/linux-atm )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6.27
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+
+ sed -i \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+ Makefile || die
+
+ # build against system headers
+ rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+
+ # don't build arpd if USE=-berkdb #81660
+ use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ echo 'main(){return setns();};' > test.c
+ ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ SBINDIR=/sbin \
+ DOCDIR=/usr/share/doc/${PF} \
+ MANDIR=/usr/share/man \
+ install
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/sbin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/sbin/
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
index 902063f5c7b7..a78a2d5ec4a2 100644
--- a/sys-apps/iproute2/iproute2-9999.ebuild
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -1,11 +1,10 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-9999.ebuild,v 1.16 2011/07/31 18:33:22 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-9999.ebuild,v 1.17 2011/12/02 22:24:35 vapier Exp $
EAPI=4
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-[[ ${PV} == "9999" ]] && SCM_ECLASS="git-2"
if [[ ${PV} == *.*.*.* ]] ; then
MY_PV=${PV%.*}-${PV##*.}
@@ -14,12 +13,12 @@ else
fi
MY_P="${PN}-${MY_PV}"
-inherit eutils toolchain-funcs flag-o-matic base ${SCM_ECLASS}
-unset SCM_ECLASS
+inherit eutils toolchain-funcs flag-o-matic
+[[ ${PV} == "9999" ]] && inherit git-2
DESCRIPTION="kernel routing and traffic control utilities"
HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
-[[ ${PV} == "9999" ]] || SRC_URI="http://developer.osdl.org/dev/iproute2/download/${MY_P}.tar.bz2"
+[[ ${PV} == "9999" ]] || SRC_URI="mirror://kernel/linux/utils/networking/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
@@ -37,12 +36,8 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${MY_P}
-PATCHES=(
- "${FILESDIR}/${PN}-2.6.29.1-hfsc.patch" #291907
-)
-
src_prepare() {
- base_src_prepare
+ epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
sed -i \
-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
@@ -59,16 +54,21 @@ src_prepare() {
}
src_configure() {
- echo "TC_CONFIG_ATM:=$(use atm && echo "y" || echo "n")" > Config
-
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null
+ echo 'main(){return setns();};' > test.c
+ ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ popd >/dev/null
+
+ cat <<-EOF > Config
+ TC_CONFIG_ATM := $(usex atm y n)
+ IP_CONFIG_SETNS := ${setns}
# Use correct iptables dir, #144265 #293709
- append-cppflags -DIPT_LIB_DIR=\\\"`$(tc-getPKG_CONFIG) xtables --variable=xtlibdir`\\\"
-}
-
-src_compile() {
- emake \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)"
+ IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
}
src_install() {