Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for 4.0.0 #38

Merged
merged 10 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ You must have GnuPG installed and on your path as `gpg`.
Instructions on how to install required software on some OSes and prepare a gitian base environment can be found [here](https://github.com/devrandom/gitian-builder/blob/master/README.md).
You should follow the described steps until you have completed the "Sanity-testing" section successfully. Be sure to use the "bionic" suite for your base image.

If you want to build build executables for Mac you'll need to download MacOSX SDK 10.14.
It is contained in the Xcode 10.3 distribution, which is available at https://developer.apple.com/xcode/resources/ under "Command Line Tools & Older Versions of Xcode". .
If you want to build build executables for Mac you'll need to download MacOSX SDK 10.15.
It is contained in the Xcode 11.1 distribution, which is available at https://developer.apple.com/xcode/resources/ under "Command Line Tools & Older Versions of Xcode". .
After downloading Xcode, you can extract the SDK as described [here](https://github.com/tpoechtrager/osxcross#packaging-the-sdk).
The resulting file `MacOSX10.14.sdk.tar.xz` must be put in the `vendor/gitian-builder/inputs` subdirectory.
The resulting file `MacOSX10.15.sdk.tar.xz` must be put in the `vendor/gitian-builder/inputs` subdirectory.

### Example for Docker

Expand Down
6 changes: 3 additions & 3 deletions descriptors/bitshares-core-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ remotes:
dir: bitshares
files:
- supplement.tar.gz
- curl-7.65.3.tar.bz2
- curl-7.67.0.tar.bz2
- openssl-1.0.2t.tar.gz
script: |
set -e -o pipefail
Expand Down Expand Up @@ -80,8 +80,8 @@ script: |
popd

cd bitshares
cp libraries/wallet/wallet.cpp{,.orig}
sed -i '/__DATE__/d' libraries/wallet/wallet.cpp
cp libraries/wallet/wallet_api_impl.cpp{,.orig}
sed -i '/__DATE__/d' libraries/wallet/wallet_api_impl.cpp
# Workaround for #1791
sed -i '/target_link_lib/s=..Boost_LIBRARIES.==;/target_link_lib/s=ZLIB_LIBRARIES.=\0 ${Boost_LIBRARIES}=' \
libraries/fc/CMakeLists.txt
Expand Down
26 changes: 4 additions & 22 deletions descriptors/bitshares-core-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ remotes:
files:
- supplement.tar.gz
- zlib-1.2.11.tar.gz
- openssl-1.1.1c.tar.gz
- curl-7.65.0.tar.bz2
- openssl-1.1.1d.tar.gz
- curl-7.67.0.tar.bz2
- boost_1_69_0.tar.bz2
- MacOSX10.14.sdk.tar.xz
- MacOSX10.15.sdk.tar.xz
- e0a171828a72a0d7ad4409489033536590008ebf.tar.gz
script: |
set -e -o pipefail
Expand Down Expand Up @@ -126,8 +126,7 @@ script: |
popd

cd bitshares
sed -i '/__DATE__/d' libraries/wallet/wallet.cpp
sed -i '/hardfork.hpp/d' libraries/chain/CMakeLists.txt
sed -i '/__DATE__/d' libraries/wallet/wallet_api_impl.cpp
sed -i "/[ep].configure/s/$/ --host=${DARWIN%-} CC=${DARWIN}clang LD=${DARWIN}clang/" libraries/fc/CMakeLists.txt
sed -i '/CheckLib\(rary\|cxxAtomic\)/d' libraries/fc/CMakeLists.txt
sed -i '1ilist( APPEND PLATFORM_SPECIFIC_LIBS -Wl,-undefined -Wl,dynamic_lookup)' programs/witness_node/CMakeLists.txt
Expand All @@ -149,23 +148,6 @@ script: |
-D CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
..
rm "$LIBS/include/boost/context/all.hpp" # hack for cmake older than boost
mkdir -p libraries/chain/include/graphene/chain/
cat ../libraries/chain/hardfork.d/* >libraries/chain/include/graphene/chain/hardfork.hpp
make $MAKEOPTS embed_genesis
cp /bin/true libraries/egenesis/embed_genesis
CHAIN_ID="`sha256sum ../libraries/egenesis/genesis.json |cut -d\ -f 1`"
sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
> libraries/egenesis/egenesis_brief.cpp
( sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
| head -38
echo -n 'result = "'
sed 's=["\\]=\\\0=g' <../libraries/egenesis/genesis.json \
| tr '\n' '|' \
| sed 's=|=\\n=g'
echo '";'
sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
| tail -n +40
) >libraries/egenesis/egenesis_full.cpp
make $MAKEOPTS witness_node cli_wallet

rm -rf DIST
Expand Down
26 changes: 4 additions & 22 deletions descriptors/bitshares-core-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ remotes:
files:
- supplement.tar.gz
- zlib-1.2.11.tar.gz
- openssl-1.1.1c.tar.gz
- curl-7.65.0.tar.bz2
- openssl-1.1.1d.tar.gz
- curl-7.67.0.tar.bz2
- boost_1_69_0.tar.bz2
script: |
set -e -o pipefail
Expand Down Expand Up @@ -116,8 +116,7 @@ script: |
popd

cd bitshares
sed -i '/__DATE__/d' libraries/wallet/wallet.cpp
sed -i '/hardfork.hpp/d' libraries/chain/CMakeLists.txt
sed -i '/__DATE__/d' libraries/wallet/wallet_api_impl.cpp
sed -i "/add_executable/alist( APPEND PLATFORM_SPECIFIC_LIBS $LIBS/lib/libcurl.a -lws2_32 -lpthread -lcrypt32 )" \
programs/witness_node/CMakeLists.txt
sed -i '/fPIC/aadd_linker_flag( "--no-insert-timestamp" )' CMakeLists.txt
Expand All @@ -136,26 +135,9 @@ script: |
-D CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-D CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-D CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-D OPENSSL_CONF_SOURCE=$HOME/build/${OPENSSL%.tar.gz}/apps/openssl.cnf \
-D GRAPHENE_DISABLE_UNITY_BUILD=ON \
..
rm "$LIBS/include/boost/context/all.hpp" # hack for cmake older than boost
mkdir -p libraries/chain/include/graphene/chain/
cat ../libraries/chain/hardfork.d/* >libraries/chain/include/graphene/chain/hardfork.hpp
make $MAKEOPTS embed_genesis
ln -sf /bin/true libraries/egenesis/embed_genesis
CHAIN_ID="`sha256sum ../libraries/egenesis/genesis.json |cut -d\ -f 1`"
sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
> libraries/egenesis/egenesis_brief.cpp
( sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
| head -38
echo -n 'result = "'
sed 's=["\\]=\\\0=g' <../libraries/egenesis/genesis.json \
| tr '\n' '|' \
| sed 's=|=\\n=g'
echo '";'
sed "/generated_file_banner/d;s=\${.*}=$CHAIN_ID=" < ../libraries/egenesis/egenesis_brief.cpp.tmpl \
| tail -n +40
) >libraries/egenesis/egenesis_full.cpp
make $MAKEOPTS witness_node cli_wallet

rm -rf DIST
Expand Down
14 changes: 8 additions & 6 deletions run-gitian
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ mkdir -p inputs

if [ -n "$BUILD" ]; then
if [ "$OS" = "osx" ]; then
if [ ! -r inputs/MacOSX10.14.sdk.tar.xz ]; then
echo "Please download MacOSX10.14.sdk.tar.xz and place it in `pwd`/inputs." 1>&2
if [ ! -r inputs/MacOSX10.15.sdk.tar.xz ]; then
echo "Please download MacOSX10.15.sdk.tar.xz and place it in `pwd`/inputs." 1>&2
echo "Also be sure to read and understand Apple's licensing terms." 1>&2
exit 1
fi
Expand All @@ -106,17 +106,16 @@ if [ -n "$BUILD" ]; then
tar cfz inputs/supplement.tar.gz -C ../.. supplement

(
echo https://curl.haxx.se/download/curl-7.67.0.tar.bz2 dd5f6956821a548bf4b44f067a530ce9445cc8094fd3e7e3fc7854815858586c
if [ "$OS" = "win" -o "$OS" = "osx" ]; then
cat <<_EOL_
https://www.openssl.org/source/openssl-1.1.1c.tar.gz f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90
https://curl.haxx.se/download/curl-7.65.0.tar.bz2 ea47c08f630e88e413c85793476e7e5665647330b6db35f5c19d72b3e339df5c
https://www.openssl.org/source/openssl-1.1.1d.tar.gz 1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2 8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
https://zlib.net/zlib-1.2.11.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
_EOL_
else
# linux
cat <<_EOL_
https://curl.haxx.se/download/curl-7.65.3.tar.bz2 0a855e83be482d7bc9ea00e05bdb1551a44966076762f9650959179c89fce509
https://www.openssl.org/source/openssl-1.0.2t.tar.gz 14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
_EOL_
fi
Expand All @@ -137,7 +136,10 @@ _EOL_
done
fi

[ -z "$BUILD" ] || gbuild "../../descriptors/bitshares-core-$OS.yml" -c bitshares="$VERSION" "$@"
[ -z "$BUILD" ] || (
rm -rf inputs/bitshares
gbuild "../../descriptors/bitshares-core-$OS.yml" -c bitshares="$VERSION" "$@"
)
[ -z "$SIGN" ] || gsign --signer "$KEY_ID" --destination ../../signatures --release "$VERSION"-"$OS" \
"../../descriptors/bitshares-core-$OS.yml"
[ -z "$VERIFY" ] || gverify --destination ../../signatures --release "$VERSION"-"$OS" \
Expand Down
Loading