Tuesday, February 18, 2014

Build latest of FloodLight's version from GitHub

FloodLight's documentation includes information about Virtual Network Filter v1.1:
http://docs.projectfloodlight.org/display/floodlightcontroller/VirtualNetworkFilter+%28Quantum+Plugin%29+%28Dev%29

FloodLight version which is included to Ubuntu is only supporting older Quantum Plugin 1.0. That why I wanted build latest version from GitHub to deb package and use it.

Reason for using deb package is that when some day newer version is included to Ubuntu's repository you can upgrade FloodLight using apt-get.

Here is short guide how you can build your own deb package:
# Installing pre-requirements
sudo apt-get install build-essential git default-jdk ant python-dev devscripts debhelper junit4 thrift-compiler libjs-twitter-bootstrap libjs-backbone libjs-jquery libjs-underscore yui-compressor

# Clone latest source code from GitHub
git clone git://github.com/floodlight/floodlight.git
mv floodlight floodlight-0.90+dfsg-9custom1
cd floodlight-0.90+dfsg-9custom1

GitHub contains only very basic version of deb packaging information. That why it is easier your remove debian folder cloned from GitHub and use Ubuntu's own version for template.
rm -rf debian
wget http://archive.ubuntu.com/ubuntu/pool/universe/f/floodlight/floodlight_0.90+dfsg-0ubuntu1.debian.tar.gz
tar -zxvf floodlight_0.90+dfsg-0ubuntu1.debian.tar.gz

You need add new version information. Other why apt-get upgrade will replace you package.
debchange -i
floodlight (0.90+dfsg-9custom1) raring; urgency=low

  * Latest version from GitHub

 -- Olli Janatuinen <olli.janatuinen@gmail.com>  Tue, 18 Feb 2014 18:18:06 +0000

Some modifications was also needed because them was requested by debian/rules script.
rm debian/source/format
cp README.md README.txt

Then we just need build new package and install it.
dpkg-buildpackage -b
cd ..
sudo dpkg -i floodlight_0.90+dfsg-9custom1_all.deb

No comments:

Post a Comment