Merge pull request #174 from iovisor/bblanco_dev

Update tag to v0.1.6, include finall llvm 3.7.0 release
diff --git a/SPECS/Dockerfile.el6 b/SPECS/Dockerfile.el6
index 2d5eabd..8ada333 100644
--- a/SPECS/Dockerfile.el6
+++ b/SPECS/Dockerfile.el6
@@ -11,11 +11,11 @@
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
 RUN cd SOURCES && wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
 RUN cd SOURCES && wget https://ftp.gnu.org/gnu/gcc/gcc-5.1.0/gcc-5.1.0.tar.gz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.5.tar.gz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
+RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.6.tar.gz
 
-RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.5/SPECS/bcc.el6.spec
+RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.6/SPECS/bcc.el6.spec
 #COPY SPECS/bcc.el6.spec SPECS/
 
 RUN rpmbuild --define "_topdir `pwd`" -ba SPECS/bcc.el6.spec
diff --git a/SPECS/Dockerfile.el6.in b/SPECS/Dockerfile.el6.in
index 2d95127..8793320 100644
--- a/SPECS/Dockerfile.el6.in
+++ b/SPECS/Dockerfile.el6.in
@@ -11,8 +11,8 @@
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
 RUN cd SOURCES && wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
 RUN cd SOURCES && wget https://ftp.gnu.org/gnu/gcc/gcc-5.1.0/gcc-5.1.0.tar.gz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
 RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v@REVISION_LAST@.tar.gz
 
 RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v@REVISION_LAST@/SPECS/bcc.el6.spec
diff --git a/SPECS/Dockerfile.el7 b/SPECS/Dockerfile.el7
index 83c748d..253f522 100644
--- a/SPECS/Dockerfile.el7
+++ b/SPECS/Dockerfile.el7
@@ -9,11 +9,11 @@
 
 WORKDIR /root
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.5.tar.gz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
+RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.6.tar.gz
 
-RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.5/SPECS/bcc.el7.spec
+RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.6/SPECS/bcc.el7.spec
 #COPY SPECS/bcc.el7.spec SPECS/
 
 RUN rpmbuild --define "_topdir `pwd`" -ba SPECS/bcc.el7.spec
diff --git a/SPECS/Dockerfile.el7.in b/SPECS/Dockerfile.el7.in
index f1f6b8e..5a82058 100644
--- a/SPECS/Dockerfile.el7.in
+++ b/SPECS/Dockerfile.el7.in
@@ -9,8 +9,8 @@
 
 WORKDIR /root
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
 RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v@REVISION_LAST@.tar.gz
 
 RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v@REVISION_LAST@/SPECS/bcc.el7.spec
diff --git a/SPECS/Dockerfile.f22 b/SPECS/Dockerfile.f22
index efd293c..892c576 100644
--- a/SPECS/Dockerfile.f22
+++ b/SPECS/Dockerfile.f22
@@ -10,11 +10,11 @@
 WORKDIR /root
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
 
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.5.tar.gz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
+RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v0.1.6.tar.gz
 
-RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.5/SPECS/bcc.f22.spec
+RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v0.1.6/SPECS/bcc.f22.spec
 #COPY SPECS/bcc.f22.spec SPECS/
 
 RUN rpmbuild --define "_topdir `pwd`" -ba SPECS/bcc.f22.spec
diff --git a/SPECS/Dockerfile.f22.in b/SPECS/Dockerfile.f22.in
index 43916b0..5b32d4d 100644
--- a/SPECS/Dockerfile.f22.in
+++ b/SPECS/Dockerfile.f22.in
@@ -10,8 +10,8 @@
 WORKDIR /root
 RUN mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
 
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/llvm-3.7.0rc3.src.tar.xz
-RUN cd SOURCES && wget http://llvm.org/pre-releases/3.7.0/rc3/cfe-3.7.0rc3.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
+RUN cd SOURCES && wget http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
 RUN cd SOURCES && wget https://github.com/iovisor/bcc/archive/v@REVISION_LAST@.tar.gz
 
 RUN cd SPECS && wget https://raw.githubusercontent.com/iovisor/bcc/v@REVISION_LAST@/SPECS/bcc.f22.spec
diff --git a/SPECS/bcc.el6.spec b/SPECS/bcc.el6.spec
index 7768aa9..79dec94 100644
--- a/SPECS/bcc.el6.spec
+++ b/SPECS/bcc.el6.spec
@@ -2,12 +2,12 @@
 # Licensed under the Apache License, Version 2.0 (the "License")
 
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 %define gccver 5.1.0
 %define pythonver 2.7.10
 
 Name:           bcc
-Version:        0.1.5
+Version:        0.1.6
 Release:        1%{?dist}
 Summary:        BPF Compiler Collection (BCC)
 
@@ -17,8 +17,8 @@
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
 Source1:        https://ftp.gnu.org/gnu/gcc/gcc-%{gccver}/gcc-%{gccver}.tar.gz
 Source2:        https://www.python.org/ftp/python/%{pythonver}/Python-%{pythonver}.tgz
-Source3:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source4:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source3:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source4:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, bzip2, cmake >= 2.8.7, file, flex, gcc, gcc-c++, git, glibc-devel, glibc-utils, python2-devel, rpm-build, svn, tar, texinfo-tex, wget, zip, zlib-devel
diff --git a/SPECS/bcc.el6.spec.in b/SPECS/bcc.el6.spec.in
index 02da2d5..f37a57b 100644
--- a/SPECS/bcc.el6.spec.in
+++ b/SPECS/bcc.el6.spec.in
@@ -2,7 +2,7 @@
 # Licensed under the Apache License, Version 2.0 (the "License")
 
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 %define gccver 5.1.0
 %define pythonver 2.7.10
 
@@ -17,8 +17,8 @@
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
 Source1:        https://ftp.gnu.org/gnu/gcc/gcc-%{gccver}/gcc-%{gccver}.tar.gz
 Source2:        https://www.python.org/ftp/python/%{pythonver}/Python-%{pythonver}.tgz
-Source3:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source4:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source3:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source4:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, bzip2, cmake >= 2.8.7, file, flex, gcc, gcc-c++, git, glibc-devel, glibc-utils, python2-devel, rpm-build, svn, tar, texinfo-tex, wget, zip, zlib-devel
diff --git a/SPECS/bcc.el7.spec b/SPECS/bcc.el7.spec
index e7ba518..7991649 100644
--- a/SPECS/bcc.el7.spec
+++ b/SPECS/bcc.el7.spec
@@ -1,8 +1,8 @@
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 
 Name:           bcc
-Version:        0.1.5
+Version:        0.1.6
 Release:        1%{?dist}
 Summary:        BPF Compiler Collection (BCC)
 
@@ -10,8 +10,8 @@
 License:        ASL 2.0
 URL:            https://github.com/iovisor/bcc
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
-Source1:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source2:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source1:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source2:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel
diff --git a/SPECS/bcc.el7.spec.in b/SPECS/bcc.el7.spec.in
index 0a30da2..fa173d4 100644
--- a/SPECS/bcc.el7.spec.in
+++ b/SPECS/bcc.el7.spec.in
@@ -1,5 +1,5 @@
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 
 Name:           bcc
 Version:        @REVISION_LAST@
@@ -10,8 +10,8 @@
 License:        ASL 2.0
 URL:            https://github.com/iovisor/bcc
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
-Source1:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source2:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source1:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source2:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel
diff --git a/SPECS/bcc.f22.spec b/SPECS/bcc.f22.spec
index e7ba518..7991649 100644
--- a/SPECS/bcc.f22.spec
+++ b/SPECS/bcc.f22.spec
@@ -1,8 +1,8 @@
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 
 Name:           bcc
-Version:        0.1.5
+Version:        0.1.6
 Release:        1%{?dist}
 Summary:        BPF Compiler Collection (BCC)
 
@@ -10,8 +10,8 @@
 License:        ASL 2.0
 URL:            https://github.com/iovisor/bcc
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
-Source1:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source2:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source1:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source2:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel
diff --git a/SPECS/bcc.f22.spec.in b/SPECS/bcc.f22.spec.in
index 0a30da2..fa173d4 100644
--- a/SPECS/bcc.f22.spec.in
+++ b/SPECS/bcc.f22.spec.in
@@ -1,5 +1,5 @@
 %define debug_package %{nil}
-%define llvmver 3.7.0rc3
+%define llvmver 3.7.0
 
 Name:           bcc
 Version:        @REVISION_LAST@
@@ -10,8 +10,8 @@
 License:        ASL 2.0
 URL:            https://github.com/iovisor/bcc
 Source0:        https://github.com/iovisor/bcc/archive/v%{version}.tar.gz
-Source1:        http://llvm.org/pre-releases/3.7.0/rc3/llvm-%{llvmver}.src.tar.xz
-Source2:        http://llvm.org/pre-releases/3.7.0/rc3/cfe-%{llvmver}.src.tar.xz
+Source1:        http://llvm.org/releases/3.7.0/llvm-%{llvmver}.src.tar.xz
+Source2:        http://llvm.org/releases/3.7.0/cfe-%{llvmver}.src.tar.xz
 
 BuildArch:      x86_64
 BuildRequires:  bison, cmake >= 2.8.7, flex, gcc, gcc-c++, python2-devel
diff --git a/debian/changelog b/debian/changelog
index 6fd7fee..467d3c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+bcc (0.1.6-1) unstable; urgency=low
+
+  * Stability fixes
+  * Improvements to python API
+  * Tracing features
+  * Support for kernel 4.2 features
+
+ -- Brenden Blanco <bblanco@plumgrid.com>  Wed, 02 Sep 2015 16:23:19 +0000
+
 bcc (0.1.5-1) unstable; urgency=low
 
   * Initial release
diff --git a/scripts/build-deb.sh b/scripts/build-deb.sh
new file mode 100755
index 0000000..1c849fb
--- /dev/null
+++ b/scripts/build-deb.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -x
+set -e
+
+PARALLEL=${PARALLEL:-1}
+TMP=$(mktemp -d /tmp/debuild.XXXXXX)
+
+function cleanup() {
+  [[ -d $TMP ]] && rm -rf $TMP
+}
+trap cleanup EXIT
+
+mkdir $TMP/bcc
+cp -a * $TMP/bcc
+pushd $TMP
+tar zcf bcc_0.1.6.orig.tar.gz bcc/
+cd bcc
+DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc
+popd
+
+cp $TMP/*.deb .
diff --git a/scripts/build-deb.sh.in b/scripts/build-deb.sh.in
new file mode 100755
index 0000000..ec0cee9
--- /dev/null
+++ b/scripts/build-deb.sh.in
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -x
+set -e
+
+PARALLEL=${PARALLEL:-1}
+TMP=$(mktemp -d /tmp/debuild.XXXXXX)
+
+function cleanup() {
+  [[ -d $TMP ]] && rm -rf $TMP
+}
+trap cleanup EXIT
+
+mkdir $TMP/bcc
+cp -a * $TMP/bcc
+pushd $TMP
+tar zcf bcc_@REVISION_LAST@.orig.tar.gz bcc/
+cd bcc
+DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc
+popd
+
+cp $TMP/*.deb .
diff --git a/scripts/bump_version.cmake b/scripts/bump_version.cmake
index d788862..ac9dda3 100644
--- a/scripts/bump_version.cmake
+++ b/scripts/bump_version.cmake
@@ -7,3 +7,4 @@
 configure_file(SPECS/bcc.el6.spec.in SPECS/bcc.el6.spec @ONLY)
 configure_file(SPECS/bcc.el7.spec.in SPECS/bcc.el7.spec @ONLY)
 configure_file(SPECS/bcc.f22.spec.in SPECS/bcc.f22.spec @ONLY)
+configure_file(scripts/build-deb.sh.in scripts/build-deb.sh @ONLY)