Skip to content

Commit

Permalink
Shadowcoin v1.3.3.0, check release-notes.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
SDCDev committed Jul 19, 2015
1 parent dd9f034 commit 579b231
Show file tree
Hide file tree
Showing 122 changed files with 13,789 additions and 6,391 deletions.
194 changes: 194 additions & 0 deletions contrib/gitian-descriptors/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,196 @@
Download a 64bit debian netinstall iso from : http://cdimage.debian.org/debian-cd/
I used debian-8.1.0-amd64-netinst.iso


Follow this guide part way:
https://github.com/bitcoin/bitcoin/blob/master/doc/gitian-building.md#setting-up-debian-for-gitian-building
( up to cloning gitian-builder )
Or follow these text only instructions:
Create a new VirtualBox VM

Name: gitianbuild
Type: Linux (64bit)
Version: Debian

Memory: 1024Mb+ ( less than 1024 could cause major performance issues when compiling )
Hard Drive: Create a virtual hard drive now
Hard drive file type: VDI ( Virtualbox disk image )
Storage on physical hard drive : Dynamically allocated
File location and size: 40Gb

<CREATE>

After creating the VM, we need to configure it.

Click the Settings button, then go to the Network tab. Adapter 1 should be attached to NAT



Click Advanced, then Port Forwarding. We want to set up a port through which we can reach the VM to get files in and out.
Create a new rule by clicking the plus icon.

Set up the new rule the following way:
Name: SSH
Protocol: TCP
Leave Host IP empty
Host Port: 22222
Leave Guest IP empty
Guest Port: 22

Click Ok twice to save.

Then start the VM. On the first launch you will be asked for a CD or DVD image. Choose the downloaded iso.

Choose the non-graphical installer. We do not need the graphical environment; it will only increase installation time and disk usage.
Choose locale and keyboard settings (doesn't matter, you can just go with the defaults or select your own information)
The VM will detect network settings using DHCP, this should all proceed automatically
Configure the network:
System name debian.
Leave domain name empty.

Choose a root password and enter it twice (remember it for later)

Name the new user debian (the full name doesn't matter, you can leave it empty)
Choose a user password and enter it twice (remember it for later)

The installer will set up the clock using a time server; this process should be automatic
Set up the clock: choose a time zone (depends on the locale settings that you picked earlier; specifics don't matter)

Disk setup
Partitioning method: Guided - Use the entire disk

Select disk to partition: SCSI1 (0,0,0)
Partitioning scheme: All files in one partition
Finish partitioning and write changes to disk -> Yes


The base system will be installed, this will take a minute or so
Choose a mirror (any will do - preferably one that is close to you and you should get the best download speeds)

Enter proxy information (unless you are on an intranet, you can leave this empty)


Wait a bit while 'Select and install software' runs
Participate in popularity contest -> No
Choose software to install. We need just the base system. Make sure only 'SSH server' and 'Standard System Utilities' are checked. Uncheck 'Debian Desktop Environment' and 'Print Server'


Install the GRUB boot loader to the master boot record? -> Yes


Installation Complete -> Continue
After installation, the VM will reboot and you will have a working Debian VM.

Congratulations!


On your debian virtual machine log in as root and run the following commands to get the show on the road.

Install base packages:
# apt-get install git ruby sudo apt-cacher-ng qemu-utils debootstrap lxc python-cheetah parted kpartx bridge-utils
Add the debian user to the superusers list:
# adduser debian sudo

When you get a colorful screen with a question about the 'LXC directory', just go with the default (/var/lib/lxc).
Then set up LXC and the rest with the following, which is a complex jumble of settings and workarounds:

Add the following to a script and execute it:

# make sure the build script can exectute it without providing a password
echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc
# add cgroup for LXC
echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
# make /etc/rc.local script that sets up bridge between guest and host
echo '#!/bin/sh -e' > /etc/rc.local
echo 'brctl addbr br0' >> /etc/rc.local
echo 'ifconfig br0 10.0.3.2/24 up' >> /etc/rc.local
echo 'exit 0' >> /etc/rc.local
# make sure that USE_LXC is always set when logging in as debian,
# and configure LXC IP addresses
echo 'export USE_LXC=1' >> /home/debian/.profile
echo 'export GITIAN_HOST_IP=10.0.3.2' >> /home/debian/.profile
echo 'export LXC_GUEST_IP=10.0.3.5' >> /home/debian/.profile


reboot

The debian box will be rebooted and our setup should be complete

************************ THIS IS WHERE YOU CAN STOP USING THE LINKED GUIDE *******************************


ssh debian@localhost -p 22222

git clone https://github.com/devrandom/gitian-builder.git
git clone https://github.com/SDCDev/shadowcoin

cd gitian-builder

May be necessary to edit bin/make-base-vm - add sudo before mkfs.

./bin/make-base-vm --lxc --arch amd64 --suite trusty
./bin/make-base-vm --lxc --arch i386 --suite trusty

mkdir inputs;
cd inputs;
wget http://liquidtelecom.dl.sourceforge.net/project/flex/flex-2.5.38.tar.gz;
wget http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.tgz;
wget http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch;
wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz -Ominiupnpc-1.9.tar.gz;
wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz;
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz;
wget http://liquidtelecom.dl.sourceforge.net/project/libpng/libpng16/older-releases/1.6.10/libpng-1.6.10.tar.gz;
wget http://zlib.net/zlib-1.2.8.tar.gz;
wget http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz;
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download -Oboost_1_55_0.tar.bz2;

Mirror - http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch


$ cd ..;
$ LXC_EXECUTE=lxc-execute; PATH="$(pwd)/libexec/:$PATH";

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/boost-linux.yml
$ mv build/out/boost-*.zip inputs/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/deps-linux.yml
$ mv build/out/shadow-deps-*.zip inputs/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/gitian-linux.yml
$ mkdir -p ../compiled/linux
$ mv build/out/* ../compiled/linux/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/boost-win.yml
$ mv build/out/boost-*.zip inputs/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/deps-win.yml
$ mv build/out/shadow-deps-*.zip inputs/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/qt-win.yml
$ mv build/out/qt-win*.zip inputs/

$ ./bin/gbuild --commit shadowcoin=HEAD ../shadowcoin/contrib/gitian-descriptors/gitian-win.yml
$ mkdir -p ../compiled/win
$ mv build/out/* ../compiled/win/




Notes:
To check the progress of the script:
login to the vm on a new terminal (ssh debian@localhost -p 22222)
cd gitian-builder
tail -f var/install.log
or
tail -f var/build.log








Gavin's notes on getting gitian builds up and running:

You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization.
Expand Down Expand Up @@ -29,3 +222,4 @@ Once you've got the right hardware and software:
cd ../gitian-builder
git pull
./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian.yml

59 changes: 59 additions & 0 deletions contrib/gitian-descriptors/boost-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: "shadow"
suites:
- "trusty"
architectures:
- "i386"
- "amd64"
packages:
- "g++"
- "unzip"
- "pkg-config"
- "libtool"
- "faketime"
- "bsdmainutils"
- "zip"
- "libz-dev"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "boost_1_55_0.tar.bz2"
script: |
STAGING="$HOME/install"
TEMPDIR="$HOME/tmp"
export LIBRARY_PATH="$STAGING/lib"
if [ "$GBUILD_BITS" == "32" ]; then
export LD_PRELOAD=/usr/lib/i386-linux-gnu/faketime/libfaketime.so.1;
else
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1;
fi
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
# Input Integrity Check
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
mkdir -p "$STAGING"
tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
cd boost_1_55_0
GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
# note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
echo "using gcc : $GCCVERSION : g++
:
<cxxflags>\"-frandom-seed=boost1 -fPIC\"
;" > user-config.jam
./bootstrap.sh --without-icu
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS -d+2 install
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $STAGING -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd "$STAGING"
find | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
86 changes: 86 additions & 0 deletions contrib/gitian-descriptors/boost-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: "shadow"
suites:
- "trusty"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "faketime"
- "zip"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "boost_1_55_0.tar.bz2"
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
script: |
# Defines
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
INDIR=$HOME/build
TEMPDIR=$HOME/tmp
# Input Integrity Check
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c
for BITS in 32 64; do # for architectures
#
INSTALLPREFIX=$HOME/staging${BITS}
BUILDDIR=$HOME/build${BITS}
if [ "$BITS" == "32" ]; then
HOST=i686-w64-mingw32
else
HOST=x86_64-w64-mingw32
fi
#
mkdir -p $INSTALLPREFIX $BUILDDIR
cd $BUILDDIR
#
tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2
cd boost_1_55_0
GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
echo "using gcc : $GCCVERSION : $HOST-g++
:
<rc>$HOST-windres
<archiver>$HOST-ar
<cxxflags>-frandom-seed=boost1
<ranlib>$HOST-ranlib
;" > user-config.jam
./bootstrap.sh --without-icu
# Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work
# This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost.
# Please obtain the exact patch that matches the above sha256sum from one of the following mirrors.
#
# Read History: https://svn.boost.org/trac/boost/ticket/7262
# History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html
#
# Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
# Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch
# Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch
# Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch
patch -p0 < $INDIR/boost-mingw-gas-cross-compile-2013-03-03.patch
# Bug Workaround: boost-1.54.0 broke the ability to disable zlib, still broken in 1.55
# https://svn.boost.org/trac/boost/ticket/9156
sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2
sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2
# http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $INSTALLPREFIX -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
$HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
$HOST-ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd "$INSTALLPREFIX"
find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip
done # for BITS in
38 changes: 0 additions & 38 deletions contrib/gitian-descriptors/boost-win32.yml

This file was deleted.

Loading

0 comments on commit 579b231

Please sign in to comment.