diff --git a/.gitmodules b/.gitmodules index 7a94275a8560ec51429d9dcd1eaab9a15c72410b..c0066fb398a742a16c582dabb8f99a25e9b3b062 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,3 +9,6 @@ path = cellframe-sdk url = ../../cellframe/cellframe-sdk.git branch = master +[submodule "prod_build"] + path = prod_build + url = ../prod_build_dapcash-node diff --git a/CMakeLists.txt b/CMakeLists.txt index b77e78498929b1eb984fc795786291252f00d619..d174b744984507524f57c2f38abf5b9b9c79d5b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,9 @@ if(UNIX) SET( CPACK_SYSTEM_TYPE "Debian") SET( CPACK_SYSTEM_VERSION "${DEBIAN_OS_VERSION}") - SET( CPACK_SYSTEM_ARCH "${OS_ARCH}") + SET( CPACK_SYSTEM_ARCH "amd64") SET( CPACK_SYSTEM_CODENAME "${DEBIAN_OS_NAME}") - SET( CPACK_SYSTEM_NAME "${CPACK_SYSTEM_TYPE}-${CPACK_SYSTEM_CODENAME}-${CPACK_SYSTEM_ARCH}") + SET( CPACK_SYSTEM_NAME "${CPACK_SYSTEM_TYPE}-${CPACK_SYSTEM_VERSION}-${CPACK_SYSTEM_ARCH}-${CPACK_SYSTEM_CODENAME}") SET( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${CPACK_PACKAGE_VERSION_PATCH}") SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Dmitriy Gerasimov <naeper@demlabs.net>" ) SET( CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY "DapCash Node software https://dapcash.org" ) diff --git a/dist/etc/network/dapcash-testnet/bronze.cfg b/dist/etc/network/dapcash-testnet/bronze.cfg index 07d027a4e574046b275494660c475037fd6d28cf..34b629c8fc9ec0782a7e0c72f07c1a1fc8f51b89 100644 --- a/dist/etc/network/dapcash-testnet/bronze.cfg +++ b/dist/etc/network/dapcash-testnet/bronze.cfg @@ -13,7 +13,7 @@ is_celled=true is_add_directly=true datum_add_hashes_count=1 is_static_genesis_event=true -static_genesis_event=0xE0CCC6C94FEC3BCA0776DD3F37F287DA3F437887D6AFB61EE1320403F96D0B73 +static_genesis_event=0xB1DF3177A0E764B5B7BF1675AC2D98FFF703BC704E06601A4F401C6F80895DCC # Proof-of-State consensus config [dag-pos] diff --git a/dist/etc/network/dapcash-testnet/chain-0.cfg b/dist/etc/network/dapcash-testnet/chain-0.cfg index a14fb14f702f6ea04e2e009a8c74854d02d136db..f199696ba2d82fa253d5b9d09ba96fcb0c2b39b6 100644 --- a/dist/etc/network/dapcash-testnet/chain-0.cfg +++ b/dist/etc/network/dapcash-testnet/chain-0.cfg @@ -19,7 +19,8 @@ datum_add_hashes_count=1 # Switched off to false because hash symbols below are not well recognized is_static_genesis_event=true -static_genesis_event=0x3893F021FF4AC718D46ABA6BD66EB143948E1F7E85F332E45DB03F8CE4951DA4 +static_genesis_event=0x1984CF8CF92F626E11D39369183F97A08AA13233E8E1FADB105F455737A21A85 + [dag-poa] auth_certs_prefix=dapcash.testnet.master.cell diff --git a/prod_build b/prod_build new file mode 160000 index 0000000000000000000000000000000000000000..6f13de4a78e4e5aa05c55887dc78d5c07fe8ba10 --- /dev/null +++ b/prod_build @@ -0,0 +1 @@ +Subproject commit 6f13de4a78e4e5aa05c55887dc78d5c07fe8ba10 diff --git a/prod_build/android/conf/environment b/prod_build/android/conf/environment deleted file mode 100644 index 5099a4a0c7d0306add40a0605f018d29e64b99e0..0000000000000000000000000000000000000000 --- a/prod_build/android/conf/environment +++ /dev/null @@ -1,7 +0,0 @@ -ANDROID_NDK_HOME="/opt/android-ndk-r16b" -SDKROOT="/opt/android-sdk/bin" -NDKHOST="linux-x86_64" -JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" -ANDRQT_HOME="/usr/lib/crossdev" -HOST_DISTR_VERSIONS="stretch" -HOST_ARCH_VERSIONS="amd64" diff --git a/prod_build/android/conf/project_props b/prod_build/android/conf/project_props deleted file mode 100644 index d1d7d505920fc5f649f646c6768bb48f988914a5..0000000000000000000000000000000000000000 --- a/prod_build/android/conf/project_props +++ /dev/null @@ -1,3 +0,0 @@ -RES_PATH=SapNetGui/resources/UltraPad/platforms/android -WORK_PATH=../sapnet-client-build -BRAND=UltraPad diff --git a/prod_build/android/conf/publish b/prod_build/android/conf/publish deleted file mode 100644 index 896aa108d0c9382c7fb69bc5b559af8229e7d977..0000000000000000000000000000000000000000 --- a/prod_build/android/conf/publish +++ /dev/null @@ -1,2 +0,0 @@ -ARCH_VERSIONS="arm64-v8a armv7 x86 x86_64 arm" -PACKAGE_PATH=builds/apk/ diff --git a/prod_build/android/conf/version_info b/prod_build/android/conf/version_info deleted file mode 100644 index 288cd5c8353e7f97d2afb4e5eb15779621861c7a..0000000000000000000000000000000000000000 --- a/prod_build/android/conf/version_info +++ /dev/null @@ -1,3 +0,0 @@ -VERSION_FILE=config.pri -VERSION_ENTRIES="VER_MAJ VER_MIN VER_PAT VER_CODE" -VERSION_FORMAT="VER_MAJ.VER_MIN-VER_PAT" diff --git a/prod_build/android/scripts/compile.sh b/prod_build/android/scripts/compile.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/android/scripts/deploy.sh b/prod_build/android/scripts/deploy.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/android/scripts/pack.sh b/prod_build/android/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/android/scripts/pre-build.sh b/prod_build/android/scripts/pre-build.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/android/scripts/test.sh b/prod_build/android/scripts/test.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/general/chroot_wrap.sh b/prod_build/general/chroot_wrap.sh deleted file mode 100755 index 90514488f302b854401e996df3c23e99d22f6756..0000000000000000000000000000000000000000 --- a/prod_build/general/chroot_wrap.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -PLATFORM_CANDIDATES=$2 -CHROOT_PREFIX="builder" -CHROOTS_PATH=$1 -PLATFORMS="" -PKG_FORMAT=$3 -JOB=$4 - -cd $SRC_PATH -echo "workdir is $(pwd)" -. prod_build/general/pre-build.sh -export_variables "./prod_build/general/conf/*" - -IFS=' ' -echo "$PLATFORM_CANDIDATES" -echo $IMPLEMENTED -for platform in $PLATFORM_CANDIDATES; do - [[ $(echo $IMPLEMENTED | grep $platform) != "" ]] && PLATFORMS="$PLATFORMS$platform " || echo "Platform $platform is not implemented in this project yet. Sorry" -done -echo "Platforms are $PLATFORMS" - -for platform in $PLATFORMS; do - echo "Working with $platform now" - export_variables "./prod_build/$platform/conf/*" - IFS=' ' - PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1) - #Check if chroots are present - echo $HOST_DISTR_VERSIONS - echo $HOST_ARCH_VERSIONS - [ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh $CHROOT_PREFIX || exit $? #For actions before build not in chroot and in chroot (version update, install missing dependencies(under schroot)) - for distr in $HOST_DISTR_VERSIONS; do - for arch in $HOST_ARCH_VERSIONS; do - if [ -e $CHROOTS_PATH/$CHROOT_PREFIX-$distr-$arch ]; then - schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh $PKG_TYPE || { errcode=$? && unexport_variables "./prod_build/$platform/conf/*"; exit $errcode; } -# echo "schroot stub $PKG_TYPE" - else - echo "chroot $CHROOT_PREFIX-$distr-$arch not found. You should install it first" - fi - done - done - echo "workdir before postinstall is $(pwd)" - [ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh errcode=$? #For post-build actions not in chroot (global publish) - PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-) - unexport_variables "./prod_build/$platform/conf/*" -done -#[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds. - -cd $wd - -exit $errcode diff --git a/prod_build/general/conf/status b/prod_build/general/conf/status deleted file mode 100644 index 5082e1d8aae5d8afc0df90903a6ad9e1bddd14a1..0000000000000000000000000000000000000000 --- a/prod_build/general/conf/status +++ /dev/null @@ -1 +0,0 @@ -IMPLEMENTED="linux/debian linux/ubuntu" diff --git a/prod_build/general/conf/version_info b/prod_build/general/conf/version_info deleted file mode 100644 index d33ee15a16d60350c7cf60dd9136afcd3ad4ebca..0000000000000000000000000000000000000000 --- a/prod_build/general/conf/version_info +++ /dev/null @@ -1,3 +0,0 @@ -VERSION_FILE=CMakeLists.txt -VERSION_ENTRIES="CPACK_PACKAGE_VERSION_MAJOR CPACK_PACKAGE_VERSION_MINOR CPACK_PACKAGE_VERSION_PATCH" -VERSION_FORMAT="CPACK_PACKAGE_VERSION_MAJOR.CPACK_PACKAGE_VERSION_MINOR-CPACK_PACKAGE_VERSION_PATCH" diff --git a/prod_build/general/pre-build.sh b/prod_build/general/pre-build.sh deleted file mode 100755 index b37204ee6d04dbdc7eca0cd613adc8f37a58d6d5..0000000000000000000000000000000000000000 --- a/prod_build/general/pre-build.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -extract_version_number() { - -IFS=" " -local VERSION_STRING=$VERSION_FORMAT -for entry in $VERSION_ENTRIES; do - VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | grep [0-9] | rev | cut -d ' ' -f1 | cut -d ")" -f2 | rev )/") #Replacing templates with numbers -done -echo -e "$VERSION_STRING" - -} - -extract_gitlog_text() { - -borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1) -upb=$(echo $borders | cut -d $'\n' -f1) -dwnb=$(echo $borders | cut -d $'\n' -f2) -text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) ) -echo $text - -} - -export_variables() { - -IFS=$'\n' -for variable in $(cat $1); do - echo "$variable" - export $(echo "$variable" | sed 's/\"//g') -done - -} - -unexport_variables() { - -IFS=$'\n' -for variable in $(cat $1); do - echo "$variable" - export -n $(echo $variable | cut -d '=' -f1) -done - -} diff --git a/prod_build/ios/scripts/compile.sh b/prod_build/ios/scripts/compile.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/ios/scripts/deploy.sh b/prod_build/ios/scripts/deploy.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/ios/scripts/pack.sh b/prod_build/ios/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/ios/scripts/pre-build.sh b/prod_build/ios/scripts/pre-build.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/ios/scripts/test.sh b/prod_build/ios/scripts/test.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/debian/conf/dependencies b/prod_build/linux/debian/conf/dependencies deleted file mode 100644 index dc39e2983ae0614c23d0ec0f308fd64f3bedde02..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/conf/dependencies +++ /dev/null @@ -1 +0,0 @@ -PKG_DEPS="libjson-c-dev libsqlite3-dev libmemcached-dev libev-dev libmagic-dev libcurl4-gnutls-dev libldb-dev libtalloc-dev libtevent-dev" diff --git a/prod_build/linux/debian/conf/publish b/prod_build/linux/debian/conf/publish deleted file mode 100644 index 93c64d60c9b9c266c62e8d34e3bf6b46d555c660..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/conf/publish +++ /dev/null @@ -1,8 +0,0 @@ -HOST_DISTR_VERSIONS="stretch buster" -HOST_ARCH_VERSIONS="amd64" -PACKAGE_PATH=builds/deb/ -REPO_DIR_SRC=/var/tmp/repository -DISTR_CODENAME="stretch buster" -REPO_ADDR=debian.pub.demlabs.net -REPO_DIR=/var/www/html/debian.pub.demlabs.net -DISTR_COMPONENT=main diff --git a/prod_build/linux/debian/essentials/config b/prod_build/linux/debian/essentials/config deleted file mode 100755 index 44391219bcd2f04335dc3627214a88f054b6fd8e..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/config +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -e -. /usr/share/debconf/confmodule - -case "$1" in -reconfigure|configure) - - db_input critical dapcash-node/auto_online || true - db_go || true - - db_input critical dapcash-node/debug_mode || true - db_go || true - - db_input critical dapcash-node/debug_stream_headers || true - db_go || true - - db_input critical dapcash-node/server_enabled || true - db_go || true - - db_input critical dapcash-node/server_addr || true - db_go || true - - db_input critical dapcash-node/server_port || true - db_go || true - - db_input critical dapcash-node/dapcash_testnet_enabled || true - db_go || true - - db_input critical dapcash-node/dapcash_testnet_node_type || true - db_go || true -;; -*) - echo "config called with unknown argument \`$1'" >&2 - exit 1 -;; -esac - - diff --git a/prod_build/linux/debian/essentials/postinst b/prod_build/linux/debian/essentials/postinst deleted file mode 100755 index 353bf73cf682a54ecc9c0c81256f00932901b4ed..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/postinst +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -e -. /usr/share/debconf/confmodule - -DAP_CHAINS_NAME="dapcash" -DAP_APP_NAME="$DAP_CHAINS_NAME-node" -DAP_PREFIX="/opt/$DAP_APP_NAME" - -DAP_CFG_TPL="$DAP_PREFIX/share/configs/$DAP_APP_NAME.cfg.tpl" - -# Store write config to new if present smth -DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg" - - - -# Check profile.d symlink - -[ -e "/etc/profile.d/$DAP_APP_NAME.sh" ] && ln -sf $DAP_PREFIX/share/profile.d/$DAP_APP_NAME.sh /etc/profile.d/$DAP_APP_NAME.sh - -# Init node config -if [ -e "$DAP_CFG" ]; then - DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg.dpkg-new" -else - DAP_CFG="$DAP_PREFIX/etc/$DAP_APP_NAME.cfg" -fi - -cat $DAP_CFG_TPL > $DAP_CFG || true - -db_get dapcash-node/debug_mode || true -sed -i "s/{DEBUG_MODE}/$RET/" $DAP_CFG || true - -db_get dapcash-node/auto_online || true -sed -i "s/{AUTO_ONLINE}/$RET/" $DAP_CFG || true - -db_get dapcash-node/debug_stream_headers || true -sed -i "s/{DEBUG_STREAM_HEADERS}/$RET/" $DAP_CFG || true - -db_get dapcash-node/server_enabled || true -sed -i "s/{SERVER_ENABLED}/$RET/" $DAP_CFG || true - -db_get dapcash-node/server_port || true -sed -i "s/{SERVER_PORT}/$RET/" $DAP_CFG || true - -db_get dapcash-node/server_addr || true -sed -i "s/{SERVER_ADDR}/$RET/" $DAP_CFG || true - - - -# Init dapcash-testnet -NET_NAME="dapcash-testnet" - -db_get dapcash-node/dapcash_testnet_enable || true -if [ "$RET"="true" ]; then - DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" - DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" - DAP_NET_CFG="" - if [ -e "$DAP_CFG_NET" ]; then - DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" - else - DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" - fi - - cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true - db_get dapcash-node/dapcash_testnet_node_type || true - NODE_TYPE=$RET - sed -i "s/{NODE_TYPE}/$NODE_TYPE/" $DAP_NET_CFG || true -fi - -mkdir -p $DAP_PREFIX/var/log || true - - -cat /etc/passwd| grep dapcash-node || adduser --system --no-create-home --group --home /opt/dapcash-node dapcash-node - -echo "[*] Check /etc/systemd/system/$DAP_APP_NAME.service file..." -if [ -h /etc/systemd/system/$DAP_APP_NAME.service ]; then - echo "[*] Restarting $DAP_APP_NAME to implement changes" - systemctl --system stop $DAP_APP_NAME >> /dev/null|| true - systemctl daemon-reload || true - systemctl --system start $DAP_APP_NAME || true -else - echo "[!] Installing $DAP_APP_NAME as systemd service (haven't found /etc/systemd/system/$DAP_APP_NAME.service)" - ln -sf $DAP_PREFIX/share/$DAP_APP_NAME.service /etc/systemd/system/$DAP_APP_NAME.service || true - systemctl --system enable $DAP_PREFIX/share/$DAP_APP_NAME.service || true -# systemctl --system start $DAP_APP_NAME - echo "[ ] Execute 'systemctl start $DAP_APP_NAME' to start $DAP_APP_NAME service" - - #USERMAN=`users | awk '{print $1}'` - adduser --system --no-create-home --group --home /opt/dapcash-node dapcash-node || true - #usermod -aG $DAP_CHAINS_NAME `users | awk '{print $1}'` - for username in $(cat /etc/passwd | grep "/home" | cut -d ':' -f1); do - usermod -aG dapcash-node $username - done - mkdir -p $DAP_PREFIX/var/{run,lib/ca,lib/wallet,lib/global_db} - touch $DAP_PREFIX/var/run/dapcash-node.pid - #chown -R $USERMAN:$USERMAN $DAP_PREFIX - for filename in $(find $DAP_PREFIX); do - if [ -d $filename ]; then - chmod 0775 $filename - else - chmod 0664 $filename - fi - done - chmod 0774 $DAP_PREFIX/bin/* - chmod 0777 $DAP_PREFIX/bin/$DAP_APP_NAME-cli - systemctl --system start $DAP_APP_NAME || true - echo "[*] Done" -fi diff --git a/prod_build/linux/debian/essentials/postrm b/prod_build/linux/debian/essentials/postrm deleted file mode 100755 index 3f397ef8faef598234b3c29c957fd69effe9f011..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/postrm +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/bash -e -if [ "$1" == "purge" ] && [ -e /usr/share/debconf/confmodule ] ; then -. /usr/share/debconf/confmodule -db_purge -fi -GROUP_RM="dapcash-node" - -systemctl stop dapcash-node || true -systemctl disable dapcash-node || true - -#for username in `cat /etc/passwd | grep "/home" | cut -d ':' -f1`; do -# gpasswd -d $username $GROUP_RM || true -#done -#rm -r /opt/dapcash-node || true -#groupdel dapcash-node || true -#userdel dapcash-node || true - diff --git a/prod_build/linux/debian/essentials/rules b/prod_build/linux/debian/essentials/rules deleted file mode 100755 index d44004f1045d3b659941f9e1b058bc7982229040..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/rules +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/make -f - -override_dh_fixperms: - dh_fixperms -X/opt/dapcash-node - chmod 777 /opt/dapcash-node/bin/dapcash-node-cli -override_dh_auto_install: - dh_auto_install -- prefix=/opt/dapcash-node -%: -# dh $@ --with=systemd - dh $@ diff --git a/prod_build/linux/debian/essentials/templates b/prod_build/linux/debian/essentials/templates deleted file mode 100755 index fccc437c618e1f1b0a3609293de080cdeaf66c76..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/templates +++ /dev/null @@ -1,59 +0,0 @@ -Template: dapcash-node/auto_online -Default: false -Choices: true, false -Type: select -Description: Auto online - Bring up links automaticly and go to the ONLINE network state - -Template: dapcash-node/debug_mode -Default: false -Choices: true, false -Type: select -Description: Debug mode - Debug mode for logs - -Template: dapcash-node/debug_stream_headers -Default: false -Choices: true, false -Type: select -Description: Debug stream headers - Dump stream headers in log file - -Template: dapcash-node/server_enabled -Default: false -Choices: true, false -Type: select -Description: Accept connections - Accept connections - -Template: dapcash-node/server_port -Default: 8089 -Type: string -Description: Server port - Server port to listen on, recomended 8089 - -Template: dapcash-node/server_addr -Default: 0.0.0.0 -Type: string -Description: Server address - Server address to listen on - -Template: dapcash-node/dapcash_testnet_enabled -Default: true -Choices: true, false -Type: select -Description: dapcash Testnet: Enable network - dapcash Testnet: Enable network auto load on start - -Template: dapcash-node/dapcash_testnet_node_type -Type: select -Default: full -Choices: full, light, master, archive, root -Description: Dapcash Testnet: Node type - Select node type:. - Light - syncronize only local wallets - full - sync all its cell - master - allow to store values in chains and take comission, sync all shards that will need to be synced - archive - Sync all the network - root - Special predefined root nodes, usualy produces zerochain and act like archive as well - diff --git a/prod_build/linux/debian/scripts/build.sh b/prod_build/linux/debian/scripts/build.sh deleted file mode 100755 index 6a156b3b3ae06b9cb98032162298209aa911e077..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -WORKDIR="resources/dapcash/dapcash-node" -SCRIPTDIR="prod_build/linux/debian/scripts" - -#cd $WORKDIR - $SCRIPTDIR/compile_and_pack.sh || exit 2 && \ - $SCRIPTDIR/test.sh || exit 3 && \ - $SCRIPTDIR/install_test.sh || exit 4 && \ - $SCRIPTDIR/cleanup.sh || exit 5 -#cd $wd diff --git a/prod_build/linux/debian/scripts/chroot/post-build.sh b/prod_build/linux/debian/scripts/chroot/post-build.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/debian/scripts/chroot/pre-build.sh b/prod_build/linux/debian/scripts/chroot/pre-build.sh deleted file mode 100755 index 304315a793f0e40c8ed3633e9fb7104dac8c43c6..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/chroot/pre-build.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -check_packages() { - - IFS=" " - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - for element in "$PKG_DEPPIES"; do - echo "[DEBUGGA] Checking if $element is installed" - if ! dpkg-query -s $element; then - echo "[WRN] Package $element is not installed. Starting installation" - return 1 - fi - done - return 0 - -} - -install_dependencies() { - - echo "Checking out the dependencies" - if check_packages >> /dev/null; then - echo "[INF] All required packages are installed" - else - echo "" - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - echo "[DEBUGGA] Attempting to install $PKG_DEPPIES" - if sudo apt-get install $PKG_DEPPIES -y ; then - echo "" - echo "[INF] Packages were installed successfully" - else - echo "[ERR] can\'t install required packages. Please, check your package manager" - echo "Aborting" - exit 1 - fi - fi - return 0 - -} -PKG_DEPS=$1 -install_dependencies -exit 0 -#for variable in $(cat ./prod_build/general/conf/brands | sed 's/\"//g'); do -# echo $variable -# export "$variable" -#done diff --git a/prod_build/linux/debian/scripts/cleanup.sh b/prod_build/linux/debian/scripts/cleanup.sh deleted file mode 100755 index 61180be06fa59a839e3286e66e34ab2b10606103..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/cleanup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -[ -d build ] && rm -r build -#[ -d packages ] && rm -r packages -exit 0 diff --git a/prod_build/linux/debian/scripts/compile_and_pack.sh b/prod_build/linux/debian/scripts/compile_and_pack.sh deleted file mode 100755 index d39bf2929e4224adab309ffba3e5fdaa2eb41724..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/compile_and_pack.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -#if [ "$1" == "--static" ]; then -# export $QT_SELECT="qtstatic" #For static builds we'll have a special qt instance, which should be installed manually for now, unfortunately. -#fi - -# error_explainer() { - -# case "$1" in -# "1" ) echo "Error in pre-config happened. Please, review logs";; -# "2" ) echo "Error in compilation happened. Please, review logs";; -# * ) echo "Unandled error $1 happened. Please, review logs";; -# esac -# exit $1 - -# } - - -substitute_pkgname_postfix() { - - #CODENAME=$(lsb_release -a | grep Codename | cut -f2) - #VERSION=$(lsb_release -a | grep Version | cut -f2) - #DISTRO_TYPE=$(lsb_release -a | grep Distributor | cut -f2) - for variable in $(lsb_release -a 2>/dev/null | sed 's/\t//g' | sed 's/ //g' | sed 's/\:/\=/g'); do - echo "variable is $variable" - export $variable - done - sed -i "/ CPACK_SYSTEM_TYPE/s/\".*\"/\"$DistributorID\"/" CMakeLists.txt - sed -i "/ CPACK_SYSTEM_VERSION/s/\".*\"/\"$Release\"/" CMakeLists.txt - sed -i "/ CPACK_SYSTEM_CODENAME/s/\".*\"/\"$Codename\"/" CMakeLists.txt -# sed -i "/ CPACK_SYSTEM_ARCH/s/\".*\"/\"$Codename\"/" CMakeLists.txt No need to replace anything while we're on amd64 arch only. - export -n "DistributorID" - export -n "Release" - export -n "Codename" - export -n "Description" -} - -repack() { - -DEBNAME=$1 -DISTR_CODENAME="$Codename" -echo "Renaming controlde on $DEBNAME" -mkdir tmp && cd tmp - -#ПроÑматриваем архив и ищем Ñтроку Ñ control.tar -#Результат заноÑим в переменную -CONTROL=$(ar t ../${DEBNAME} | grep control.tar) - -ar x ../$DEBNAME $CONTROL -tar xf $CONTROL -VERSION=$(cat control | grep Version | cut -d ':' -f2) -echo "Version is $VERSION" -sed -i "s/$VERSION/${VERSION}-${DISTR_CODENAME}/" control -rm $CONTROL && tar cf $CONTROL * -ar r ../$DEBNAME $CONTROL -cd .. -rm -rf tmp - -} - -pwd -error=0 -mkdir -p packages -substitute_pkgname_postfix && mkdir -p build && cd build && cmake ../ && make -j$(nproc) && cpack && repack *.deb && mv -v *.deb ../packages/ && cd .. && rm -r build || error=$? -exit $error - -### touch /etc/apt/sources.list.d/demlabs.list deb https://debian.pub.demlabs.net/ bionic main universe multiverse - -### wget https://debian.pub.demlabs.net/debian.pub.demlabs.net.gpg -### apt-key add demlabskey.asc - -### apt-get update -### apt-get install cellframe-node - - - diff --git a/prod_build/linux/debian/scripts/deploy.sh b/prod_build/linux/debian/scripts/deploy.sh deleted file mode 100755 index f051be9a00550ddb20c24cce67a467303f994b3e..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/deploy.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -echo "Deploying to $PACKAGE_PATH" -echo $wd - -DAPCASH_REPO_CREDS="admin@debian.pub.demlabs.net" -DAPCASH_REPO_KEY="~/.ssh/demlabs_publish" -DAPCASH_REPO_PATH="~/web/debian.pub.demlabs.net/public_html" -DAPCASH_FILESERVER_CREDS="admin@pub.dapcash.org" -DAPCASH_FILESERVER_PATH="~/web/pub.dapcash.org/public_html/linux" -pwd - -cd packages -PKGFILES=$(ls . | grep .deb) -#cd .. -[ $MOD != "" ] && MOD="-$MOD" -#echo "We have $DISTR_CODENAME there" -#echo "On path $REPO_DIR_SRC we have debian files." -#[[ $ONBUILDSERVER == 0 ]] && scp -i $DAPCASH_REPO_KEY ../prod_build/linux/debian/scripts/publish_remote/reprepro.sh "$DAPCASH_REPO_CREDS:~/tmp/" -for pkgfile in $PKGFILES; do - pkgname=$(echo $pkgfile | sed 's/.deb$//') - mv $pkgfile $wd/$PACKAGE_PATH/$pkgname$MOD.deb || { echo "[ERR] Something went wrong in publishing the package. Now aborting."; exit -4; } - CODENAME=$(echo $pkgname | rev | cut -d '-' -f1 | rev) - if [[ $ONBUILDSERVER == 0 ]]; then - #REPREPRO and file_cellframe_services - scp -i $DAPCASH_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$DAPCASH_REPO_CREDS:~/aptly/repo_update/$pkgname$MOD.deb" - ssh -i $DAPCASH_REPO_KEY "$DAPCASH_REPO_CREDS" -- "~/aptly/repo_update.sh" - scp -i $DAPCASH_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$DAPCASH_FILESERVER_CREDS:$DAPCASH_FILESERVER_PATH/" - ssh -i $DAPCASH_REPO_KEY "$DAPCASH_FILESERVER_CREDS" "ln -sf $DAPCASH_FILESERVER_PATH/$pkgname$MOD.deb $DAPCASH_FILESERVER_PATH/$pkgname$MOD-latest.deb" - fi -done -#[[ $ONBUILDSERVER == 0 ]] && ssh -i $DAPCASH_REPO_KEY "$DAPCASH_REPO_CREDS" "rm -v ~/tmp/reprepro.sh" - - export -n "UPDVER" -cd .. - - -# ERROR CODE OVERRIDEN! -exit 0 -#symlink name-actual to the latest version. -#build/deb/versions - for all files -#build/deb/${PROJECT}-latest - for symlinks. diff --git a/prod_build/linux/debian/scripts/install_test.sh b/prod_build/linux/debian/scripts/install_test.sh deleted file mode 100755 index 21c44cd384c412e9541e83e443b74a7bf49543f2..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/install_test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "stub for installation testing" diff --git a/prod_build/linux/debian/scripts/pack.sh b/prod_build/linux/debian/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/debian/scripts/post-build.sh b/prod_build/linux/debian/scripts/post-build.sh deleted file mode 100755 index c18d6f6bd5cd4bf57d1624c95768cde49bf70f37..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/post-build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -#echo "Stub for post-build actions" -echo "Entering post-build deployment and cleanup" -SCRIPTDIR="prod_build/linux/debian/scripts" - -$SCRIPTDIR/deploy.sh || exit 10 && \ -$SCRIPTDIR/cleanup.sh || exit 11 diff --git a/prod_build/linux/debian/scripts/pre-build.sh b/prod_build/linux/debian/scripts/pre-build.sh deleted file mode 100755 index f55152fcdf6f4176efd9b8538d638fb28a4000ad..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/pre-build.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash - -#export_variables() { - -#IFS=$'\n' -#for variable in $(cat prod_build/linux/debian/conf/*); do -# echo "$variable" -# export $(echo "$variable" | sed 's/\"//g') -#done - -#} - - -#installing required dependencies - -check_packages() { - - IFS=" " - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - for element in "$PKG_DEPPIES"; do - echo "[DEBUGGA] Checking if $element is installed" - if ! dpkg-query -s $element; then - echo "[WRN] Package $element is not installed. Starting installation" - return 1 - fi - done - return 0 - -} - -install_dependencies() { - - if check_packages >> /dev/null; then - echo "[INF] All required packages are installed" - else - echo "" - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - echo "[DEBUGGA] Attempting to install $PKG_DEPPIES" - if sudo /usr/bin/apt-get install -y $PKG_DEPPIES ; then - echo "" - echo "[INF] Packages were installed successfully" - else - echo "[ERR] can\'t install required packages. Please, check your package manager" - echo "Aborting" - exit 1 - fi - fi - return 0 - -} - -#extract_version_number() { - -#IFS=" " -#for entry in $VERSION_ENTRIES; do -# VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | sed 's/ //g' | cut -d '=' -f2 )/") #Replacing templates with numbers -#done -#echo -e "project version is $VERSION_STRING" -# -#} - -#extract_gitlog_text() { -# -#borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1) -#upb=$(echo $borders | cut -d $'\n' -f1) -#dwnb=$(echo $borders | cut -d $'\n' -f2) -#text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) ) -#echo $text -# -#} - -#. prod_build/general/install_dependencies -. prod_build/general/pre-build.sh #VERSIONS and git -export_variables "prod_build/general/conf/*" -export_variables "prod_build/linux/debian/conf/*" -VERSION_STRING=$(echo $VERSION_FORMAT | sed "s/\"//g" ) #Removing quotes -VERSION_ENTRIES=$(echo $VERSION_ENTRIES | sed "s/\"//g" ) -extract_version_number -[ -e prod_build/linux/debian/essentials/changelog ] && last_version_string=$(cat prod_build/linux/debian/essentials/changelog | head -n 1 | cut -d '(' -f2 | cut -d ')' -f1) - - -#if [ -z "$last_version_string"]; then -# echo "Changelog won't be modified" -# exit 1; -#fi - -### ideally, we need to ask whether changelog needs to be updated or not -### is it correct? And if not, we just need to exit from this conditional construction -### not quite. See, there is always a changelog in git. (git log). We need to maintain debian/changelog on projects not built with cmake, -### cause information from this changelog (version) is used to write package metadata. And we had messed up for a long time because of desyncing. -### This is a solution. We modify the changelog only if there are updates and not on build servers. And of course if it's not cmake-based build project. -### let's keep those comments here for a while - -if [[ $ONBUILDSERVER == 0 ]]; then - echo "[WRN] on build platform. Version won't be changed" # okay, so this echo wont be outputted as the condition is not true - -elif [ ! -e debian/changelog ]; then ### I guess this what's supposed to be added in order to solve the issue with the changelog?+ - echo "[INF] Debian changelog does not exist. Nothing to be done there." #I supposed it should look somehow like that. -#makes sense -elif [ "$last_version_string" == "$VERSION_STRING" ]; then - echo "[INF] Version $last_version_string is equal to $VERSION_STRING. Nothing to change" -else - echo "[INF] editing the changelog" - text=$(extract_gitlog_text) - IFS=$'\n' - for textline in $text; do - dch -v $VERSION_STRING $textline - done - branch=$(git branch | grep "*" | cut -c 3- ) - case branch in - "master" ) branch="stable";; - "develop" ) branch="testing";; - esac - dch -r --distribution "$branch" --force-distribution ignored - controlfile_version=$(cat prod_build/linux/debian/essentials/control | grep "Standards" | cut -d ' ' -f2) #Add to control info. - sed -i "s/$controlfile_version/$VERSION_STRING/" prod_build/linux/debian/essentials/control - export UPDVER=1 -fi - -IFS=" " -CHROOT_PREFIX=$1 - -errcode=0 -for distr in $HOST_DISTR_VERSIONS; do #we need to install required dependencies under schroot. - for arch in $HOST_ARCH_VERSIONS; do - echo "$CHROOT_PREFIX-$distr-$arch" - schroot -c $CHROOT_PREFIX-$distr-$arch -- prod_build/linux/debian/scripts/chroot/pre-build.sh "$PKG_DEPS" || errcode=$? - [[ $errcode != 0 ]] && echo "Problems with $CHROOT_PREFIX-$distr-$arch occured. You had installed it, right?" - done -done -exit 0 - -## Maybe we do have the version required? Then we don't need to build it again. CHECK IT THERE! diff --git a/prod_build/linux/debian/scripts/publish_remote/reprepro.sh b/prod_build/linux/debian/scripts/publish_remote/reprepro.sh deleted file mode 100644 index f88300cf405e843ebea2c33c496982bb82c29539..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/publish_remote/reprepro.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -x -DISTR_COMPONENT=$1 -DISTR_CODENAME=$2 -PKGNAME=$3 -PATH=$4 - -workdir=$(pwd) -error=0 -cd $PATH - -/usr/bin/reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" "$PKGNAME" && /usr/bin/reprepro export "$DISTR_CODENAME" || error=$? -cd $workdir -exit $error -set +x diff --git a/prod_build/linux/debian/scripts/test.sh b/prod_build/linux/debian/scripts/test.sh deleted file mode 100755 index 2b1c7f0624520f549a447f7088f021aba7bc55de..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/scripts/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Stub for functionality testing" - diff --git a/prod_build/linux/ubuntu/conf/dependencies b/prod_build/linux/ubuntu/conf/dependencies deleted file mode 100644 index 7282350d9f849e221884d7a1ab95a6b732e051e3..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/conf/dependencies +++ /dev/null @@ -1 +0,0 @@ -PKG_DEPS="cmake libjson-c-dev libsqlite3-dev libmemcached-dev libev-dev libmagic-dev libcurl4-gnutls-dev libldb-dev libtalloc-dev libtevent-dev traceroute" diff --git a/prod_build/linux/ubuntu/conf/publish b/prod_build/linux/ubuntu/conf/publish deleted file mode 100644 index 6e09e69a70fe5128bf8e666642054bef7528c14e..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/conf/publish +++ /dev/null @@ -1,8 +0,0 @@ -HOST_DISTR_VERSIONS="bionic" -HOST_ARCH_VERSIONS="amd64" -PACKAGE_PATH=builds/deb/ -REPO_DIR_SRC=/var/tmp/repository -DISTR_CODENAME="bionic" -REPO_ADDR=debian.pub.demlabs.net -REPO_DIR=/var/www/html/debian.pub.demlabs.net -DISTR_COMPONENT=main diff --git a/prod_build/linux/ubuntu/essentials b/prod_build/linux/ubuntu/essentials deleted file mode 120000 index ff903c9ce392d694f2b5d496193d6bb591a7941e..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/essentials +++ /dev/null @@ -1 +0,0 @@ -../debian/essentials \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/build.sh b/prod_build/linux/ubuntu/scripts/build.sh deleted file mode 120000 index 53fcd46b251845f60ef6a231ff52574efafdcf55..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/build.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/build.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/chroot b/prod_build/linux/ubuntu/scripts/chroot deleted file mode 120000 index 688a8bfe7ca32505af15fdaa047a41cbe86f7689..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/chroot +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/chroot \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/cleanup.sh b/prod_build/linux/ubuntu/scripts/cleanup.sh deleted file mode 120000 index 93a84bf65220e23f445d63411f57a3e969028b09..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/cleanup.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/cleanup.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/compile_and_pack.sh b/prod_build/linux/ubuntu/scripts/compile_and_pack.sh deleted file mode 120000 index ef456c37bf9f514218eeb757410ef6908a266cc5..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/compile_and_pack.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/compile_and_pack.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/deploy.sh b/prod_build/linux/ubuntu/scripts/deploy.sh deleted file mode 120000 index bbb85a115dde05f9829bbaa9941e767b1890521f..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/deploy.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/deploy.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/install_test.sh b/prod_build/linux/ubuntu/scripts/install_test.sh deleted file mode 120000 index 70188470343dbbc9278c66b95259c759c0257fc8..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/install_test.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/install_test.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/pack.sh b/prod_build/linux/ubuntu/scripts/pack.sh deleted file mode 120000 index 92454e5f5c8f22e1feae9dd7b2cf340acfa42779..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/pack.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/pack.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/post-build.sh b/prod_build/linux/ubuntu/scripts/post-build.sh deleted file mode 120000 index bd51497fa602bf52011607b7d339edabc4f9dd73..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/post-build.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/post-build.sh \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/pre-build.sh b/prod_build/linux/ubuntu/scripts/pre-build.sh deleted file mode 100755 index 583f3c963a6075d7d78bfd55e143b674df0ec804..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/pre-build.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash - -#export_variables() { - -#IFS=$'\n' -#for variable in $(cat prod_build/linux/ubuntu/conf/*); do -# echo "$variable" -# export $(echo "$variable" | sed 's/\"//g') -#done - -#} - - -#installing required dependencies - -check_packages() { - - IFS=" " - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - for element in "$PKG_DEPPIES"; do - echo "[DEBUGGA] Checking if $element is installed" - if ! dpkg-query -s $element; then - echo "[WRN] Package $element is not installed. Starting installation" - return 1 - fi - done - return 0 - -} - -install_dependencies() { - - if check_packages >> /dev/null; then - echo "[INF] All required packages are installed" - else - echo "" - local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g') - echo "[DEBUGGA] Attempting to install $PKG_DEPPIES" - if sudo /usr/bin/apt-get install -y $PKG_DEPPIES ; then - echo "" - echo "[INF] Packages were installed successfully" - else - echo "[ERR] can\'t install required packages. Please, check your package manager" - echo "Aborting" - exit 1 - fi - fi - return 0 - -} - -#extract_version_number() { - -#IFS=" " -#for entry in $VERSION_ENTRIES; do -# VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | sed 's/ //g' | cut -d '=' -f2 )/") #Replacing templates with numbers -#done -#echo -e "project version is $VERSION_STRING" -# -#} - -#extract_gitlog_text() { -# -#borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1) -#upb=$(echo $borders | cut -d $'\n' -f1) -#dwnb=$(echo $borders | cut -d $'\n' -f2) -#text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) ) -#echo $text -# -#} - -#. prod_build/general/install_dependencies -. prod_build/general/pre-build.sh #VERSIONS and git -export_variables "prod_build/general/conf/*" -export_variables "prod_build/linux/ubuntu/conf/*" - -VERSION_STRING=$(echo $VERSION_FORMAT | sed "s/\"//g" ) #Removing quotes -VERSION_ENTRIES=$(echo $VERSION_ENTRIES | sed "s/\"//g" ) -extract_version_number -[ -e prod_build/linux/ubuntu/essentials/changelog ] && last_version_string=$(cat prod_build/linux/ubuntu/essentials/changelog | head -n 1 | cut -d '(' -f2 | cut -d ')' -f1) - - - -#if [ -z "$last_version_string"]; then -# echo "Changelog won't be modified" -# exit 1; -#fi - -### ideally, we need to ask whether changelog needs to be updated or not -### is it correct? And if not, we just need to exit from this conditional construction -### not quite. See, there is always a changelog in git. (git log). We need to maintain ubuntu/changelog on projects not built with cmake, -### cause information from this changelog (version) is used to write package metadata. And we had messed up for a long time because of desyncing. -### This is a solution. We modify the changelog only if there are updates and not on build servers. And of course if it's not cmake-based build project. -### let's keep those comments here for a while -if [ $ONBUILDSERVER == 0 ]; then - echo "[WRN] on build platform. Version won't be changed" # okay, so this echo wont be outputted as the condition is not true - -elif [ ! -e ubuntu/changelog ]; then ### I guess this what's supposed to be added in order to solve the issue with the changelog?+ - echo "[INF] Ubuntu changelog does not exist. Nothing to be done there." #I supposed it should look somehow like that. -#makes sense -elif [ "$last_version_string" == "$VERSION_STRING" ]; then - echo "[INF] Version $last_version_string is equal to $VERSION_STRING. Nothing to change" -else - echo "[INF] editing the changelog" - text=$(extract_gitlog_text) - IFS=$'\n' - for textline in $text; do - dch -v $VERSION_STRING $textline - done - branch=$(git branch | grep "*" | cut -c 3- ) - case branch in - "master" ) branch="stable";; - "develop" ) branch="testing";; - esac - dch -r --distribution "$branch" --force-distribution ignored - controlfile_version=$(cat prod_build/linux/ubuntu/essentials/control | grep "Standards" | cut -d ' ' -f2) #Add to control info. - sed -i "s/$controlfile_version/$VERSION_STRING/" prod_build/linux/ubuntu/essentials/control - export UPDVER=1 -fi - -IFS=" " -CHROOT_PREFIX=$1 -for distr in $HOST_DISTR_VERSIONS; do #we need to install required dependencies under schroot. - for arch in $HOST_ARCH_VERSIONS; do - echo "$CHROOT_PREFIX-$distr-$arch" - schroot -c $CHROOT_PREFIX-$distr-$arch -- prod_build/linux/ubuntu/scripts/chroot/pre-build.sh "$PKG_DEPS" || errcode=$? - [[ $errcode != 0 ]] && echo "Problems with $CHROOT_PREFIX-$distr-$arch occured. You had installed it, right?" - done -done -exit 0 - -## Maybe we do have the version required? Then we don't need to build it again. CHECK IT THERE! diff --git a/prod_build/linux/ubuntu/scripts/test.sh b/prod_build/linux/ubuntu/scripts/test.sh deleted file mode 120000 index ebcc2fa64c269136a9e029db80b38fce615216b5..0000000000000000000000000000000000000000 --- a/prod_build/linux/ubuntu/scripts/test.sh +++ /dev/null @@ -1 +0,0 @@ -../../debian/scripts/test.sh \ No newline at end of file diff --git a/prod_build/mac/scripts/compile.sh b/prod_build/mac/scripts/compile.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/mac/scripts/deploy.sh b/prod_build/mac/scripts/deploy.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/mac/scripts/pack.sh b/prod_build/mac/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/mac/scripts/pre-build.sh b/prod_build/mac/scripts/pre-build.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/mac/scripts/test.sh b/prod_build/mac/scripts/test.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/windows/scripts/compile.sh b/prod_build/windows/scripts/compile.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/windows/scripts/deploy.sh b/prod_build/windows/scripts/deploy.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/windows/scripts/pack.sh b/prod_build/windows/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/windows/scripts/pre-build.sh b/prod_build/windows/scripts/pre-build.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/windows/scripts/test.sh b/prod_build/windows/scripts/test.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000