Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/prod_build_cellframe-dashboard
1 result
Show changes
Showing
with 0 additions and 589 deletions
echo "workdir before postinstall is $(pwd)"
platform=$1
errstring=""
errcode=0
. prod_build/general/pre-build.sh
for conffile in $(find "./prod_build/$platform/conf" | grep conf/ | grep -v .bak); do
export_variables $conffile
echo "export variables from $conffile"
done
export_variables "prod_build/general/conf/*"
echo $platform
echo $PACKAGE_PATH
echo "Mod handler"
if [[ $CI_COMMIT_REF_NAME != "" ]] && [[ $CI_COMMIT_REF_NAME != "master" ]]; then
export MOD="-${CI_COMMIT_REF_NAME}"
fi
echo $MOD
[[ -e prod_build/$platform/scripts/post-build.sh ]] && prod_build/$platform/scripts/post-build.sh $platform || { errcode=$? && errstring="$errstring ${platform}_postbuild errcode $errcode"; } #For post-build actions not in chroot (global publish)
[[ $errstring != "" ]] && echo "$brand done with errors:" && echo "$errstring" >> ~/prod_log && errstring="" && errcode=5 ## General failure error
unexport_variables $(find "./prod_build/$platform/conf" -maxdepth 1 -type f)
exit $errcode
#!/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 | sed 's/ //g' | cut -d '=' -f2 )/") #Replacing templates with numbers
# echo $VERSION_STRING
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 ' ' -f1)
dwnb=$(echo $borders | cut -d ' ' -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
}
PKG_DEPS="qt5-qmake qt5-default cdbs debhelper qtdeclarative5-dev"
PKG_STATIC_DEPS="cdbs debhelper libxi-dev libfontconfig1-dev libfreetype6-dev libinput-dev libudev-dev libegl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libxrandr-dev"
PACKAGE_PATH=/home/gitlab-runner/production-docker/builds/deb/
cellframe-dashboard (2.0-16) develop; urgency=medium
* fixed changelog
-- kema <kema@kema> Tue, 14 Sep 2021 18:48:46 +0300
cellframe-dashboard (2.0-4) develop; urgency=medium
* Added static build support
-- xapuyc <xapuyc@workspace> Wed, 19 Aug 2020 15:24:23 +0500
cellframe-dashboard (2.0-3) develop; urgency=medium
* Merge branch 'features-3098' into 'develop'
*
* Features 3098
*
* See merge request cellframe/cellframe-dashboard!159
-- xapuyc <xapuyc@workspace> Tue, 14 Apr 2020 19:28:34 +0500
cellframe-dashboard (2.0-1) testing; urgency=medium
* Application update
*
-- Andrey Daragan <daragan.andrey@demlabs.net> Mon, 18 Feb 2020 20:59:14 +0300
cellframe-dashboard (2.0-0) testing; urgency=medium
* Application update
*
-- Andrey Daragan <daragan.andrey@demlabs.net> Mon, 17 Feb 2020 12:26:14 +0300
cellframe-dashboard (1.6-4) support-2649; urgency=medium
* Merge branch 'features-2959' into 'develop'
*
* Features 2959
*
* See merge request cellframe/cellframe-dashboard!102
-- xapuyc <xapuyc@workspace> Sat, 01 Feb 2020 12:16:14 +0500
cellframe-dashboard (1.2-3) development; urgency=high
[ Naeper ]
* New functions summary build
*
-- xapuyc <xapuyc@workspace> Sat, 01 Feb 2020 12:07:33 +0500
cellframe-dashboard (1.2-0) development; urgency=medium
* Refactored the package
-- Dmitriy Gerasimov <dmitriy.gerasimov@demlabs.net> Fri, 02 Aug 2019 16:07:38 +0700
9
#!/bin/bash -e
. /usr/share/debconf/confmodule
case "$1" in
reconfigure|configure)
db_input critical cellframe-node/auto_online || true
db_go || true
db_input critical cellframe-node/debug_mode || true
db_go || true
db_input critical cellframe-node/server_enabled || true
db_go || true
db_input critical cellframe-node/server_addr || true
db_go || true
db_input critical cellframe-node/server_port || true
db_go || true
db_input critical cellframe-node/notify_srv_addr || true
db_go || true
db_input critical cellframe-node/notify_srv_port || true
db_go || true
# db_input critical cellframe-node/core_t_enabled || true
# db_go || true
# db_get cellframe-node/core_t_enabled
# if [ "$RET" = "true" ]; then
# db_input critical cellframe-node/core_t_node_type || true
# db_go || true
# fi
# db_input critical cellframe-node/kelvin_testnet_enabled || true
# db_go || true
#
# db_get cellframe-node/kelvin_testnet_enabled
# if [ "$RET" = "true" ]; then
# db_input critical cellframe-node/kelvin_testnet_node_type || true
# db_go || true
# fi
db_input critical cellframe-node/subzero_enabled || true
db_go || true
db_get cellframe-node/subzero_enabled
if [ "$RET" = "true" ]; then
db_input critical cellframe-node/subzero_node_type || true
db_go || true
fi
# db_input critical cellframe-node/kelvpn_minkowski_enabled || true
# db_go || true
#
# db_get cellframe-node/kelvpn_minkowski_enabled
# if [ "$RET" = "true" ]; then
# db_input critical cellframe-node/kelvpn_minkowski_node_type || true
# db_go || true
# fi
db_input critical cellframe-node/backbone_enabled || true
db_go || true
db_get cellframe-node/backbone_enabled
if [ "$RET" = "true" ]; then
db_input critical cellframe-node/backbone_node_type || true
db_go || true
fi
db_input critical cellframe-node/mileena_enabled || true
db_go || true
db_get cellframe-node/mileena_enabled
if [ "$RET" = "true" ]; then
db_input critical cellframe-node/mileena_node_type || true
db_go || true
fi
;;
*)
echo "config called with unknown argument \`$1'" >&2
exit 1
;;
esac
Source: cellframe-dashboard
Section: unknown
Priority: optional
Maintainer: Demlabs Support <support@demlabs.net>
Build-Depends: debhelper (>= 9)
Standards-Version: 2.0-16
Homepage: https://cellframe.net
Package: cellframe-dashboard
Architecture: any
Depends: psmisc, menu, ${shlibs:Depends}, ${misc:Depends}, debconf (>=1.5), dpkg (>=1.17), bash (>=4), debconf-utils, dconf-cli, less, psmisc, logrotate, irqbalance, qml-module-qtquick-controls, qml-module-qtquick-controls2, qml-module-qtqml-models2
Description: CellFrame Dashboard
CellFrame Dashboard
#!/bin/bash -
. /usr/share/debconf/confmodule
DAP_CHAINS_NAME="cellframe"
DAP_APP_NAME="$DAP_CHAINS_NAME-node"
DAP_DASHBOARD_NAME="$DAP_CHAINS_NAME-dashboard"
DAP_PREFIX="/opt/$DAP_APP_NAME"
DAP_DASHBOARD_PREFIX="/opt/$DAP_DASHBOARD_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"
FLAG_CHAIN_DB_CLEAR="true"
if [ "$FLAG_CHAIN_DB_CLEAR" = "true" ]; then
rm -r "$DAP_PREFIX/var/lib/network"
rm -r "$DAP_PREFIX/var/lib/global_db"
fi
# 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
sed -i "s/{PREFIX}/\/opt\/$DAP_APP_NAME/g" $DAP_CFG || true
db_get cellframe-node/debug_mode || true
sed -i "s/{DEBUG_MODE}/$RET/g" $DAP_CFG || true
db_get cellframe-node/auto_online || true
sed -i "s/{AUTO_ONLINE}/$RET/g" $DAP_CFG || true
db_get cellframe-node/server_enabled || true
sed -i "s/{SERVER_ENABLED}/$RET/g" $DAP_CFG || true
db_get cellframe-node/server_port || true
sed -i "s/{SERVER_PORT}/$RET/g" $DAP_CFG || true
db_get cellframe-node/server_addr || true
sed -i "s/{SERVER_ADDR}/$RET/g" $DAP_CFG || true
db_get cellframe-node/notify_srv_addr || true
sed -i "s/{NOTIFY_SRV_ADDR}/$RET/g" $DAP_CFG || true
db_get cellframe-node/notify_srv_port || true
sed -i "s/{NOTIFY_SRV_PORT}/$RET/g" $DAP_CFG || true
# Init core testnet
#NET_NAME="core-t"
#
#db_get cellframe-node/core_t_enabled || 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 cellframe-node/core_t_node_type || true
# NODE_TYPE=$RET
# sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
# echo "[*] Enabled core testnet"
#fi
# Init kelvin-testnet
#NET_NAME="kelvin-testnet"
#
#db_get cellframe-node/kelvin_testnet_enabled || 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 cellframe-node/kelvin_testnet_node_type || true
# NODE_TYPE=$RET
# sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
# echo "[*] Enabled kelvin testnet"
#fi
# Init subzero
NET_NAME="subzero"
db_get cellframe-node/subzero_enabled || 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 cellframe-node/subzero_node_type || true
NODE_TYPE=$RET
sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
echo "[*] Enabled subzero"
fi
# Init minkowski
NET_NAME="kelvpn-minkowski"
#
db_get cellframe-node/kelvpn_minkowski_enabled || 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 cellframe-node/kelvpn_minkowski_node_type || true
NODE_TYPE=$RET
sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
echo "[*] Enabled kelvpn-minkowski"
fi
# Init Backbone
NET_NAME="Backbone"
db_get cellframe-node/backbone_enabled || 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 cellframe-node/backbone_node_type || true
NODE_TYPE=$RET
sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
echo "[*] Enabled Backbone"
fi
# Init mileena
NET_NAME="mileena"
db_get cellframe-node/mileena_enabled || 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 cellframe-node/mileena_node_type || true
NODE_TYPE=$RET
sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true
echo "[*] Enabled mileena"
fi
mkdir -p $DAP_PREFIX/var/log || true
mkdir -p $DAP_PREFIX/var/plugins || true
cat /etc/passwd| grep cellframe-node || adduser --system --no-create-home --group --home /opt/cellframe-node cellframe-node || true
echo "[*] Check /etc/systemd/system/$DAP_APP_NAME.service file..."
if [ -e /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
echo "[*] Stopped $DAP_APP_NAME"
systemctl daemon-reload || true
systemctl --system start $DAP_APP_NAME || true
echo "[*] Started $DAP_APP_NAME"
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}'`
echo "[ ] Enabling logrotate"
ln -sf $DAP_PREFIX/share/logrotate/$DAP_APP_NAME /etc/logrotate.d/$DAP_APP_NAME || true
adduser --system --no-create-home --group --home /opt/cellframe-node cellframe-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 cellframe-node $username || true
done
#mkdir -p $DAP_PREFIX/var/{run,lib/wallet,lib/global_db,var/plugins} || true
mkdir -p $DAP_DASHBOARD_PREFIX/log || true
mkdir -p $DAP_PREFIX/var/{run,lib/ca,lib/wallet,lib/global_db,var/plugins} || true
touch $DAP_PREFIX/var/run/cellframe-node.pid || true
#chown -R $USERMAN:$USERMAN $DAP_PREFIX
for filename in $(find $DAP_PREFIX | grep -v bugreport); do
if [ -d $filename ]; then
chmod 0775 $filename || true
else
chmod 0664 $filename || true
fi
done
chmod 0777 $DAP_DASHBOARD_PREFIX/log/
chmod 0777 $DAP_PREFIX/var/lib/ca/
chmod 0666 $DAP_CFG
chmod 0666 $DAP_CFG_TPL
chmod 0774 $DAP_PREFIX/bin/* || true
chmod 0777 $DAP_PREFIX/bin/$DAP_APP_NAME-cli || true
#rm -r $DAP_PREFIX/var/lib/global_db/gdb-cdb/
service cellframe-node start || true
systemctl restart cellframe-node || true
echo "[!] Done"
fi
APP_NAME=Cellframe-Dashboard
case "$1" in
configure)
ln -sf /opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service /etc/systemd/user/cellframe-dashboard.service
systemctl --system enable /opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service
ln -sf /opt/cellframe-dashboard/bin/$APP_NAME /usr/local/bin/$APP_NAME
chmod +X /usr/local/bin/$APP_NAME
cp -f /opt/cellframe-dashboard/share/CellFrameDashboard.desktop /usr/share/applications/CellFrameDashboard.desktop
cp -f /opt/cellframe-dashboard/share/CellFrameDashboard.ico /usr/share/pixmaps/CellFrameDashboard.ico
update-menus
service cellframe-dashboard restart
# echo "For start CellFrame Dashboard Service - run 'systemctl start cellframe-dashboard'"
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 2
;;
esac
exit 0
#! /bin/bash -e
if [ "$1" == "purge" ] && [ -e /usr/share/debconf/confmodule ] ; then
. /usr/share/debconf/confmodule
db_purge
fi
GROUP_RM="cellframe-dashboard"
systemctl stop cellframe-node || true
systemctl disable cellframe-node || true
#for username in `cat /etc/passwd | grep "/home" | cut -d ':' -f1`; do
# gpasswd -d $username $GROUP_RM || true
#done
#rm -r /opt/cellframe-node || true
#groupdel cellframe-node || true
#userdel cellframe-node || true
#!/bin/sh
# preinst script for dapvpngui
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/bash
case "$1" in
purge|remove|abort-upgrade|failed-upgrade|upgrade)
[ -f /etc/systemd/user/cellframe-dashboard.service ] && service cellframe-dashboard stop
[ -d /opt/cellframe-dashboard ] && rm -rf /opt/cellframe-dashboard/
[ -f /usr/local/bin/Cellframe-Dashboard ] && rm /usr/local/bin/Cellframe-Dashboard
[ -f /etc/systemd/user/cellframe-dashboard.service ] && rm /etc/init.d/cellframe-dashboard
systemctl daemon-reload
[ -f /usr/share/applications/CellFrameDashboard.desktop ] && rm /usr/share/applications/CellFrameDashboard.desktop
[ -f /usr/share/pixmaps/CellFrameDdashboard.ico ] && rm /usr/share/pixmaps/CellFrameDashboard.ico
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk
[Desktop Entry]
Name=CellFrame Dashboard
Exec=/opt/cellframe-dashboard/bin/Cellframe-Dashboard
Icon=/opt/cellframe-dashboard/share/CellFrameDashboard.ico
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
Name[en_US]=CellFrame Dashboard
oldscripts/linux/debian/essentials/share/CellFrameDashboard.ico

37.2 KiB