Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6b7f6de
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,112 @@
+#
+#    Copyright (c) 2010-2011 Nest, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#      This file is the make file for iproute2, a collection of
+#      utilities for controlling TCP / IP networking and traffic
+#      control in Linux.
+#
+
+BuildConfigSpecialized	:= No
+BuildProductSpecialized	:= No
+
+include pre.mak
+
+PackageName		:= iproute2
+
+PackageExtension	:= tar.bz2
+PackageSeparator	:= -
+
+PackagePatchArgs	:= -p1
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+LicenseSourceFile	:= $(PackageSourceDir)/COPYING
+
+CleanPaths		+= $(PackageLicenseFile)
+
+IptablesDir		:= sw/tps/iptables
+IptablesIncDir		:= $(call GenerateResultPaths,$(IptablesDir),usr/include)
+IptablesLibDir		:= $(call GenerateResultPaths,$(IptablesDir),usr/lib)
+
+LinuxDir		:= sw/tps/linux
+LinuxIncDir		:= $(call GenerateResultPaths,$(LinuxDir),include)
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(LicenseSourceFile): source
+
+$(PackageLicenseFile): $(LicenseSourceFile)
+	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Generate the package build makefile.
+
+$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+
+# Configure the source for building.
+
+.PHONY: configure
+configure: source $(PackageBuildMakefile)
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+.PHONY: build
+build: configure | $(BuildDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	CC="$(CC)" CXX="$(CXX)" AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) STRIP=$(STRIP) \
+	IPTC="$(call ToolGenerateIncludeArgument,$(IptablesIncDir))" \
+	IPTL="-L$(IptablesLibDir)" \
+	KERNEL_INCLUDE="$(LinuxIncDir)" \
+	all
+
+# Stage the build to a temporary installation area.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+.PHONY: stage
+stage: build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	DESTDIR=$(ResultDirectory) \
+	install
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/iproute2.patches/iproute2-50.description b/iproute2.patches/iproute2-50.description
new file mode 100644
index 0000000..879b1bb
--- /dev/null
+++ b/iproute2.patches/iproute2-50.description
@@ -0,0 +1 @@
+This patch ensures that not only files but links to files, particularly when building from a shadow symbolic link tree, are correctly found and installed.
diff --git a/iproute2.patches/iproute2-50.patch b/iproute2.patches/iproute2-50.patch
new file mode 100644
index 0000000..1da5216
--- /dev/null
+++ b/iproute2.patches/iproute2-50.patch
@@ -0,0 +1,28 @@
+diff -aruN iproute2-3.18.0/Makefile iproute2-3.18.0.N/Makefile
+--- iproute2-3.18.0/Makefile	2015-01-09 19:01:53.842464400 -0800
++++ iproute2-3.18.0.N/Makefile	2015-01-09 19:55:26.738606151 -0800
+@@ -8,6 +8,8 @@
+ MANDIR=$(DATADIR)/man
+ ARPDDIR=/var/lib/arpd
+ 
++findfiles = $(shell find $(1) -maxdepth 1 \( -type f -o -type l \))
++ 
+ # Path to db_185.h include
+ DBM_INCLUDE:=$(ROOTDIR)/usr/include
+ 
+@@ -55,12 +57,12 @@
+ 	install -m 0755 -d $(DESTDIR)$(ARPDDIR)
+ 	install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
+ 	install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
+-	install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
++	install -m 0644 README.iproute2+tc $(call findfiles,examples) \
+ 		$(DESTDIR)$(DOCDIR)/examples
+-	install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
++	install -m 0644 $(call findfiles,examples/diffserv) \
+ 		$(DESTDIR)$(DOCDIR)/examples/diffserv
+ 	@for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
+-	install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
++	install -m 0644 $(call findfiles) $(DESTDIR)$(CONFDIR)
+ 
+ snapshot:
+ 	echo "static const char SNAPSHOT[] = \""`date +%y%m%d`"\";" \
diff --git a/iproute2.patches/iproute2-51.description b/iproute2.patches/iproute2-51.description
new file mode 100644
index 0000000..96928ee
--- /dev/null
+++ b/iproute2.patches/iproute2-51.description
@@ -0,0 +1 @@
+This patch disables building arpd by default.
diff --git a/iproute2.patches/iproute2-51.patch b/iproute2.patches/iproute2-51.patch
new file mode 100644
index 0000000..24ca9fd
--- /dev/null
+++ b/iproute2.patches/iproute2-51.patch
@@ -0,0 +1,12 @@
+diff -aruN a/misc/Makefile b/misc/Makefile
+--- a/misc/Makefile	2010-08-04 10:45:59.000000000 -0700
++++ b/misc/Makefile	2010-11-19 13:27:32.533169604 -0800
+@@ -1,7 +1,7 @@
+ SSOBJ=ss.o ssfilter.o
+ LNSTATOBJ=lnstat.o lnstat_util.o
+ 
+-TARGETS=ss nstat ifstat rtacct arpd lnstat
++TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../Config
+ 
diff --git a/iproute2.patches/iproute2-52.description b/iproute2.patches/iproute2-52.description
new file mode 100644
index 0000000..1824a73
--- /dev/null
+++ b/iproute2.patches/iproute2-52.description
@@ -0,0 +1,3 @@
+This patch enables the correct autodetection of iptables in a 
+cross-compiled environment and then uses the detected iptables 
+installation to correctly compile and link against iptables.
diff --git a/iproute2.patches/iproute2-52.patch b/iproute2.patches/iproute2-52.patch
new file mode 100644
index 0000000..ef95783
--- /dev/null
+++ b/iproute2.patches/iproute2-52.patch
@@ -0,0 +1,24 @@
+diff -aruN a/tc/Makefile b/tc/Makefile
+--- a/tc/Makefile	2010-08-04 10:45:59.000000000 -0700
++++ b/tc/Makefile	2011-02-24 14:50:20.602868604 -0800
+@@ -71,12 +71,20 @@
+ LDFLAGS += -Wl,-export-dynamic
+ endif
+ 
++ifneq ($(IPTL),)
++LDFLAGS += $(IPTL)
++endif
++
+ TCLIB := tc_core.o
+ TCLIB += tc_red.o
+ TCLIB += tc_cbq.o
+ TCLIB += tc_estimator.o
+ TCLIB += tc_stab.o
+ 
++ifneq ($(IPTC),)
++CFLAGS += $(IPTC)
++endif
++
+ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB
+ ifneq ($(IPT_LIB_DIR),)
+ 	CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
diff --git a/iproute2.patches/iproute2-53.description b/iproute2.patches/iproute2-53.description
new file mode 100644
index 0000000..e589b5a
--- /dev/null
+++ b/iproute2.patches/iproute2-53.description
@@ -0,0 +1,2 @@
+This patch addresses an issue in which, on Ubuntu 11 and later, sh is not an alias of bash. Consequently, bashisms do not work correctly. Because configure is already setup to run bash as the interpreter, 
+just execute configure directly.
diff --git a/iproute2.patches/iproute2-53.patch b/iproute2.patches/iproute2-53.patch
new file mode 100644
index 0000000..cee042d
--- /dev/null
+++ b/iproute2.patches/iproute2-53.patch
@@ -0,0 +1,12 @@
+diff -aruN a/Makefile b/Makefile
+--- a/Makefile	2012-09-10 15:22:16.131425319 -0700
++++ b/Makefile	2012-09-10 15:21:39.202030688 -0700
+@@ -47,7 +47,7 @@
+ 	do $(MAKE) $(MFLAGS) -C $$i; done
+ 
+ Config:
+-	sh configure $(KERNEL_INCLUDE)
++	./configure $(KERNEL_INCLUDE)
+ 
+ install: all
+ 	install -m 0755 -d $(DESTDIR)$(SBINDIR)
diff --git a/iproute2.patches/iproute2-54.description b/iproute2.patches/iproute2-54.description
new file mode 100644
index 0000000..18b99f3
--- /dev/null
+++ b/iproute2.patches/iproute2-54.description
@@ -0,0 +1,2 @@
+Patch taken from upstream. Add a define for __aligned_u64 to fix error when compiling with gcc 4.8.2
+
diff --git a/iproute2.patches/iproute2-54.patch b/iproute2.patches/iproute2-54.patch
new file mode 100644
index 0000000..a5fbec8
--- /dev/null
+++ b/iproute2.patches/iproute2-54.patch
@@ -0,0 +1,20 @@
+--- a/include/linux/types.h	2010-08-04 10:45:59.000000000 -0700
++++ b/include/linux/types.h	2014-06-06 15:11:42.439540137 -0700
+@@ -33,6 +33,17 @@
+ 
+ typedef __u16 __bitwise __sum16;
+ typedef __u32 __bitwise __wsum;
++/*
++ * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
++ * common 32/64-bit compat problems.
++ * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
++ * architectures) and to 8-byte boundaries on 64-bit architectures.  The new
++ * aligned_64 type enforces 8-byte alignment so that structs containing
++ * aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
++ * No conversions are necessary between 32-bit user-space and a 64-bit kernel.
++ */
++#define __aligned_u64 __u64 __attribute__((aligned(8)))
++
+ 
+ #endif /*  __ASSEMBLY__ */
+ #endif /* _LINUX_TYPES_H */
diff --git a/iproute2.tar.bz2 b/iproute2.tar.bz2
new file mode 100644
index 0000000..b45953c
--- /dev/null
+++ b/iproute2.tar.bz2
Binary files differ
diff --git a/iproute2.url b/iproute2.url
new file mode 100644
index 0000000..003b73c
--- /dev/null
+++ b/iproute2.url
@@ -0,0 +1 @@
+http://devresources.linuxfoundation.org/dev/iproute2/download/iproute2-2.6.35.tar.bz2
diff --git a/iproute2.version b/iproute2.version
new file mode 100644
index 0000000..c5b45eb
--- /dev/null
+++ b/iproute2.version
@@ -0,0 +1 @@
+3.18.0