Last active
September 2, 2015 16:15
-
-
Save toabctl/466f66b035ca5f8b4716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
zypper="zypper -n" | |
$zypper ar -f 'http://smt-internal.opensuse.org/repo/$RCE/SUSE/Products/SLE-SERVER/12/x86_64/product' product | |
$zypper ar -f 'http://smt-internal.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SERVER/12/x86_64/update/' updates | |
$zypper ar -f 'http://smt-internal.opensuse.org/repo/$RCE/SUSE/Products/SLE-SDK/12/x86_64/product/' SDK | |
$zypper ar -f 'http://smt-internal.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SDK/12/x86_64/update/' SDK-update | |
$zypper ar -f http://download.opensuse.org/repositories/home:/tbechtold:/contrail/SLE_12/home:tbechtold:contrail.repo | |
$zypper ar -f http://download.opensuse.org/repositories/devel:/tools:/building/SLE_12/devel:tools:building.repo # for google's protobuf | |
$zypper ref | |
$zypper in git-core screen | |
# NOTE(toabctl): kernel-default-devel must be the version from the currently running kernel | |
$zypper in scons python-lxml wget gcc patch make unzip flex bison gcc-c++ openssl-devel autoconf automake vim python-devel python-setuptools net-snmp-python boost-devel \ | |
bzip2 tbb-devel libcurl-devel libxml2-devel zlib-devel log4cplus-devel protobuf-devel kernel-default-devel | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
chmod a+x ~/bin/repo | |
# manual libs needed | |
mkdir ~/tmp | |
cd ~/tmp | |
wget http://sourceforge.net/projects/libipfix/files/libipfix/libipfix_110209.tgz | |
tar xfz libipfix_110209.tgz | |
cd libipfix_110209 | |
./configure --prefix=/usr && make && make install | |
cd .. | |
wget https://github.com/edenhill/librdkafka/archive/0.8.5.tar.gz | |
tar xfz 0.8.5.tar.gz | |
cd librdkafka-0.8.5/ | |
./configure --prefix=/usr && make && make install | |
cd .. | |
SANDBOX_DIR=~/sandbox | |
mkdir $SANDBOX_DIR; cd $SANDBOX_DIR | |
# NOTE(toabctl): you need a pub sshkey on github | |
# git config --global user.email "you@example.com" | |
# git config --global user.name "Your Name" | |
repo init -b R2.20 -u git@github.com:Juniper/contrail-vnc | |
# manually add to .repo/manifest.xml | |
#<project name="contrail-packaging" remote="github" path="tools/packaging"/> | |
#<project name="contrail-provisioning" remote="github" path="tools/provisioning"/> | |
repo sync | |
python third_party/fetch_packages.py | |
# you may want to run "scons" in a screen session. takes some time | |
scons | |
# now build packages | |
$zypper ar -f http://download.opensuse.org/repositories/Cloud:/OpenStack:/Juno/SLE_12/ juno | |
$zypper ar -f http://download.opensuse.org/repositories/devel:/tools:/building/SLE_12/devel:tools:building.repo | |
$zypper in createrepo rpm-build python-Sphinx | |
mkdir -p /cs-shared/builder/cache | |
export SKIP_CREATE_GIT_IDS=1 | |
cd tools/packaging/build | |
./packager.py --sku juno |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment