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/cleanup.sh b/prod_build/android/scripts/cleanup.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 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 bcd7b624b306d99ea2832cb587748624bcdddfc3..0000000000000000000000000000000000000000 --- a/prod_build/android/scripts/deploy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -echo "Deploying to $PACKAGE_PATH" -cd build/apk -PKGFILES=$(ls . | grep .apk) - -[ ! $MOD = "" ] && MOD="-$MOD" -echo $PKGFILES -for pkgfile in $PKGFILES; do - pkgname=$(echo $pkgfile | sed "s/.apk$//") - mv $pkgfile $wd/$PACKAGE_PATH/$pkgname$MOD.apk || echo "[ERR] Something went wrong in publishing the package. Now aborting." -if [ ! -z $UPDVER ]; then -# for pkgfile in $PKGFILES; do - ln -sf $wd/$PACKAGE_PATH/$pkgname$MOD.apk $wd/$PACKAGE_PATH/$pkgname$MOD-latest.apk -# done - #Need to create latest symlink to the project. -fi -done - export -n "UPDVER" - -cd ../.. -#symlink name-actual to the latest version. -#build/deb/versions - for all files -#build/deb/${PROJECT}-latest - for symlinks. 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/post-build.sh b/prod_build/android/scripts/post-build.sh deleted file mode 100755 index f75bc441bda808f9bf011eaa0fe1e25242c76527..0000000000000000000000000000000000000000 --- a/prod_build/android/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/android/scripts" - -$SCRIPTDIR/deploy.sh || exit 10 && \ -$SCRIPTDIR/cleanup.sh || exit 11 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 index b0b57472ade60cb7a9c6e0ae02471bee67b5063d..53c50422cc2d45858971398748915a6dee1b2bd3 100755 --- a/prod_build/general/chroot_wrap.sh +++ b/prod_build/general/chroot_wrap.sh @@ -14,6 +14,9 @@ cd $SRC_PATH echo "workdir is $(pwd)" . prod_build/general/pre-build.sh export_variables "./prod_build/general/conf/*" +VERSION_STRING=$(echo "$VERSION_FORMAT" | sed "s/\"//g" ) #Removing quotes +VERSION_ENTRIES=$(echo "$VERSION_ENTRIES" | sed "s/\"//g" ) +export VERSION_STRING=$(extract_version_number) IFS=' ' echo "$PLATFORM_CANDIDATES" @@ -25,6 +28,7 @@ echo "Platforms are $PLATFORMS" for platform in $PLATFORMS; do echo "Working with $platform now" + export platform export_variables "./prod_build/$platform/conf/*" IFS=' ' PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1) @@ -35,7 +39,7 @@ for platform in $PLATFORMS; do 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=$? + schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh $PKG_TYPE $platform || errcode=$? # echo "schroot stub $PKG_TYPE" else echo "chroot $CHROOT_PREFIX-$distr-$arch not found. You should install it first" @@ -43,7 +47,7 @@ for platform in $PLATFORMS; do done done echo "workdir before postinstall is $(pwd)" - [ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (global publish) + [ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh #For post-build actions not in chroot (global publish) PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-) unexport_variables "./prod_build/$platform/conf/*" done diff --git a/prod_build/general/conf/status b/prod_build/general/conf/status index ec51dbab4d9aec34b4975de26716109730b30df6..5082e1d8aae5d8afc0df90903a6ad9e1bddd14a1 100644 --- a/prod_build/general/conf/status +++ b/prod_build/general/conf/status @@ -1 +1 @@ -IMPLEMENTED="linux/debian" +IMPLEMENTED="linux/debian linux/ubuntu" diff --git a/prod_build/general/pre-build.sh b/prod_build/general/pre-build.sh index e0eef1df76e3beff94ca40ad6a7c92247dc2d03a..aaae8235e033413eff8d1f0552d2a96b01571f76 100755 --- a/prod_build/general/pre-build.sh +++ b/prod_build/general/pre-build.sh @@ -3,11 +3,9 @@ extract_version_number() { IFS=" " - -local VERSION_STRING=$VERSION_FORMAT +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" @@ -16,17 +14,17 @@ 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) +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" +echo $text } export_variables() { IFS=$'\n' -for variable in $(cat $1); do +for variable in $(cat $*); do echo "$variable" export $(echo "$variable" | sed 's/\"//g') done diff --git a/prod_build/linux/debian/conf/publish b/prod_build/linux/debian/conf/publish index 61b38fc197a89dcaf0cfec02be0b88837adc9c0d..69eb34591dc4cc264cd9ff8cb7564f06a46f3b4c 100644 --- a/prod_build/linux/debian/conf/publish +++ b/prod_build/linux/debian/conf/publish @@ -1,3 +1,8 @@ HOST_DISTR_VERSIONS="stretch buster" HOST_ARCH_VERSIONS="amd64" PACKAGE_PATH=builds/deb/ +DIVE_REPO_CREDS="admin@debian.pub.demlabs.net" +DIVE_REPO_KEY="~/.ssh/demlabs_publish" +DIVE_REPO_PATH="~/web/debian.pub.demlabs.net/public_html" +DIVE_FILESERVER_CREDS="admin@pub.cellframe.net" +DIVE_FILESERVER_PATH="~/web/pub.cellframe.net/public_html" diff --git a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-build-ids b/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-build-ids deleted file mode 100644 index 01a7ba119813a650fb12092db32297a75728ef71..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-build-ids +++ /dev/null @@ -1 +0,0 @@ -2450b2940f91269d64d505508b2244b4e00a0d86 diff --git a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/control b/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/control deleted file mode 100644 index 754a54ae4ae417780a2c737b871f4a1105370c16..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/control +++ /dev/null @@ -1,13 +0,0 @@ -Package: cellframe-dashboard-dbgsym -Source: cellframe-dashboard -Version: 1.6-4 -Auto-Built-Package: debug-symbols -Architecture: amd64 -Maintainer: Demlabs Support <support@demlabs.net> -Installed-Size: 5458 -Depends: cellframe-dashboard (= 1.6-4) -Section: debug -Priority: extra -Homepage: https://demlabs.net -Description: Debug symbols for cellframe-dashboard -Build-Ids: 2450b2940f91269d64d505508b2244b4e00a0d86 diff --git a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/md5sums b/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/md5sums deleted file mode 100644 index 6119d90cb7d82e36868aa364a3811940f0fb319d..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/DEBIAN/md5sums +++ /dev/null @@ -1 +0,0 @@ -86240b97f7b364af3c764cafd8eaffaa usr/lib/debug/.build-id/24/50b2940f91269d64d505508b2244b4e00a0d86.debug diff --git a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/lib/debug/.build-id/24/50b2940f91269d64d505508b2244b4e00a0d86.debug b/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/lib/debug/.build-id/24/50b2940f91269d64d505508b2244b4e00a0d86.debug deleted file mode 100644 index 02f9f93dd4935c47e9ccf55b5558a4fc049c025d..0000000000000000000000000000000000000000 Binary files a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/lib/debug/.build-id/24/50b2940f91269d64d505508b2244b4e00a0d86.debug and /dev/null differ diff --git a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/share/doc/cellframe-dashboard-dbgsym b/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/share/doc/cellframe-dashboard-dbgsym deleted file mode 120000 index fe4935c6c9c6ae6293fce55e1166c53778de9b65..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/.debhelper/cellframe-dashboard/dbgsym-root/usr/share/doc/cellframe-dashboard-dbgsym +++ /dev/null @@ -1 +0,0 @@ -cellframe-dashboard \ No newline at end of file diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard.debhelper.log b/prod_build/linux/debian/essentials/cellframe-dashboard.debhelper.log deleted file mode 100644 index 837e2b8104448bffec345b3696acd3ae339b9d6c..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard.debhelper.log +++ /dev/null @@ -1,38 +0,0 @@ -dh_prep -dh_installdirs -dh_installdirs -dh_installdocs -dh_installexamples -dh_installman -dh_installinfo -dh_installmenu -dh_installcron -dh_systemd_enable -dh_installinit -dh_installdebconf -dh_installemacsen -dh_installcatalogs -dh_installpam -dh_installlogrotate -dh_installlogcheck -dh_installchangelogs -dh_installudev -dh_lintian -dh_bugfiles -dh_install -dh_systemd_start -dh_link -dh_installmime -dh_installgsettings -dh_strip -dh_strip_nondeterminism -dh_compress -dh_fixperms -dh_makeshlibs -dh_installdeb -dh_perl -dh_shlibdeps -dh_gencontrol -dh_md5sums -dh_builddeb -dh_builddeb diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard.substvars b/prod_build/linux/debian/essentials/cellframe-dashboard.substvars deleted file mode 100644 index c59f67b7a151c8c14cee3cdddc04c40456fe7b7d..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard.substvars +++ /dev/null @@ -1,3 +0,0 @@ -shlibs:Depends=libc6 (>= 2.14), libgcc1 (>= 1:3.0), libgl1-mesa-glx | libgl1, libqt5core5a (>= 5.7.0), libqt5gui5 (>= 5.0.2), libqt5network5 (>= 5.0.2), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.0.2), libqt5quickwidgets5 (>= 5.3.0), libqt5widgets5 (>= 5.0.2), libqt5xml5 (>= 5.0.2), libstdc++6 (>= 5.2) -misc:Depends= -misc:Pre-Depends= diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/control b/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/control deleted file mode 100644 index aadff7f994ad1da1c7a8800fc889601b1231fe31..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/control +++ /dev/null @@ -1,11 +0,0 @@ -Package: cellframe-dashboard -Version: 2.0-1 -Architecture: amd64 -Maintainer: Demlabs Support <support@demlabs.net> -Installed-Size: 57308 -Depends: psmisc, menu, libc6 (>= 2.14), libfontconfig1 (>= 2.11), libfreetype6 (>= 2.6), libgcc1 (>= 1:3.4), libgl1, libglib2.0-0 (>= 2.22.0), libharfbuzz0b (>= 1.2.6), libice6 (>= 1:1.0.0), libicu57 (>= 57.1-1~), libsm6, libstdc++6 (>= 5.2), libx11-6, libx11-xcb1, libxcb-glx0, libxcb-icccm4 (>= 0.4.1), libxcb-image0 (>= 0.2.1), libxcb-keysyms1 (>= 0.4.0), libxcb-randr0 (>= 1.3), libxcb-render-util0, libxcb-render0, libxcb-shape0, libxcb-shm0, libxcb-sync1, libxcb-xfixes0, libxcb-xinerama0, libxcb-xkb1, libxcb1 (>= 1.8), libxext6, libxi6 (>= 2:1.5.99.2) -Section: unknown -Priority: optional -Homepage: https://demlabs.net -Description: CellFrame Dashboard - CelLFrame Dashboard diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/md5sums b/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/md5sums deleted file mode 100644 index caba2d64a0634712f2673c4d4789a8d3c543ed71..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/md5sums +++ /dev/null @@ -1,6 +0,0 @@ -1d04263cd110af2805a5eb2200d83b58 opt/cellframe-dashboard/bin/CellFrameDashboard -c5a2eb2f6e7871b8038fde5089024738 opt/cellframe-dashboard/bin/CellFrameDashboardService -40ce94c2c802b42f98ec952f1aa782fd opt/cellframe-dashboard/share/CellFrameDashboard.desktop -2d68c5b02416956687c0c77f321cc575 opt/cellframe-dashboard/share/CellFrameDashboard.ico -28623bf3c8f2ef7b41b16a1f9670ba31 opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service -af57671d69fd51da5871241b728c6568 usr/share/doc/cellframe-dashboard/changelog.Debian.gz diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/postinst b/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/postinst deleted file mode 100755 index aa961ad3c2685d9b78b6a9c3252038288b7e6d60..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/postinst +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - - -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/CellFrameDashboard /usr/local/bin/CellFrameDashboard - chmod +X /usr/local/bin/CellFrameDashboard - cp -f /opt/cellframe-dashboard/share/CellFrameDashboard.desktop /usr/share/applications/CellFrameDashboard.desktop - cp -f /opt/cellframe-dashboard/share/CellFrameDashboard.ico /usr/share/pixmaps/CellFrameFashboard.ico - update-menus - 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 - - diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/prerm b/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/prerm deleted file mode 100755 index 42891dac2c13ccdccb208c83820c6d326c85d191..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/DEBIAN/prerm +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -case "$1" in - purge|remove|abort-upgrade|failed-upgrade|upgrade) - [ -f /etc/init.d/cellframe-dashboard ] && service cellframe-dashboard stop - [ -d /opt/cellframe-dashboard ] && rm -rf /opt/cellframe-dashboard/ - [ -f /usr/local/bin/CellFrameDashboard ] && rm /usr/local/bin/CellFrameDashboard - [ -f /etc/init.d/cellframe-dashboard ] && 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 diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboard b/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboard deleted file mode 100755 index e1fa53d6a7285e3f3e898843d8904b7c7edf2c7f..0000000000000000000000000000000000000000 Binary files a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboard and /dev/null differ diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboardService b/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboardService deleted file mode 100755 index 24ae6dc96ae03e552830b40af4256eabcafdd178..0000000000000000000000000000000000000000 Binary files a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/bin/CellFrameDashboardService and /dev/null differ diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.desktop b/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.desktop deleted file mode 100644 index ba2a6153aa2ed7737079b867750e1cc429f16af2..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=CellFrame Dashboard -Exec=/opt/cellframe-dashboard/bin/CellFrameDashboard -Icon=/opt/cellframe-dashboard/share/CellFrameDashboard.ico -Terminal=false -Type=Application -Encoding=UTF-8 -Categories=Network;Application; -Name[en_US]=CellFrame Dashboard diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.ico b/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.ico deleted file mode 100644 index 22beaf23e9b4e1c6d9cfbb4ffc69f835223bb052..0000000000000000000000000000000000000000 Binary files a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/CellFrameDashboard.ico and /dev/null differ diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service b/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service deleted file mode 100644 index 00da6e14b1bf225c24171fc86bcc6fe097d7670f..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/cellframe-dashboard/opt/cellframe-dashboard/share/init.d/cellframe-dashboard.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=CellFrame Dashboard Service -After=network.target - -[Service] -Type=forking -OOMScoreAdjust=-1000 -#PIDFile=/opt/cellframe-dashboard/CellFrameDashboardService.pid -WorkingDirectory=/opt/cellframe-dashboard/ -ExecStart=/opt/cellframe-dashboard/bin/CellFrameDashboardService -D -ExecStop=/opt/cellframe-dashboard/bin/CellFrameDashboardService --stop -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/prod_build/linux/debian/essentials/cellframe-dashboard/usr/share/doc/cellframe-dashboard/changelog.Debian.gz b/prod_build/linux/debian/essentials/cellframe-dashboard/usr/share/doc/cellframe-dashboard/changelog.Debian.gz deleted file mode 100644 index b945f64cd32a780bfa4c18103c224f9e7f2f0e1d..0000000000000000000000000000000000000000 Binary files a/prod_build/linux/debian/essentials/cellframe-dashboard/usr/share/doc/cellframe-dashboard/changelog.Debian.gz and /dev/null differ diff --git a/prod_build/linux/debian/essentials/changelog b/prod_build/linux/debian/essentials/changelog index 5e15ada8a1c9ab289f6064eebcc61ad4170a5c41..6675b604f242851032ec8710484d48ab4aee7cf7 100644 --- a/prod_build/linux/debian/essentials/changelog +++ b/prod_build/linux/debian/essentials/changelog @@ -1,3 +1,13 @@ +cellframe-dashboard (2.0-3) stable; urgency=medium + + * Merge branch 'develop' into 'master' + * + * Develop + * + * See merge request cellframe/cellframe-dashboard!158 + + -- xapuyc <xapuyc@workspace> Tue, 21 Apr 2020 21:16:45 +0500 + cellframe-dashboard (2.0-1) testing; urgency=medium * Application update diff --git a/prod_build/linux/debian/essentials/control b/prod_build/linux/debian/essentials/control index c70e4b80599757e133b9950015a05e26a9601b60..0e7250b90e52b0774235630a0a95642cc7f4669d 100644 --- a/prod_build/linux/debian/essentials/control +++ b/prod_build/linux/debian/essentials/control @@ -3,7 +3,7 @@ Section: unknown Priority: optional Maintainer: Demlabs Support <support@demlabs.net> Build-Depends: debhelper (>= 9) -Standards-Version: 2.0-1 +Standards-Version: 2.0-3 Homepage: https://demlabs.net Package: cellframe-dashboard diff --git a/prod_build/linux/debian/essentials/files b/prod_build/linux/debian/essentials/files deleted file mode 100644 index bf225c50f2fb57a8791ddc1bfc807eb719b88990..0000000000000000000000000000000000000000 --- a/prod_build/linux/debian/essentials/files +++ /dev/null @@ -1,3 +0,0 @@ -cellframe-dashboard-dbgsym_1.6-4_amd64.deb debug extra -cellframe-dashboard_1.6-4_amd64.buildinfo unknown optional -cellframe-dashboard_1.6-4_amd64.deb unknown optional diff --git a/prod_build/linux/debian/essentials/stamp-makefile-build b/prod_build/linux/debian/essentials/stamp-makefile-build deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/debian/essentials/stamp-makefile-install b/prod_build/linux/debian/essentials/stamp-makefile-install deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/debian/scripts/build.sh b/prod_build/linux/debian/scripts/build.sh index 0e6bcda89a3fbbbaeebf8a3c9b7d8dec34bb2b44..205134e4349268431776c4f98bc4aa6eef0bc633 100755 --- a/prod_build/linux/debian/scripts/build.sh +++ b/prod_build/linux/debian/scripts/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -WORKDIR="resources/sap.support/sapnet-client" +WORKDIR="resources/cellframe/cellframe-dashboard" SCRIPTDIR="prod_build/linux/debian/scripts" #cd $WORKDIR diff --git a/prod_build/linux/debian/scripts/chroot/post-build.sh b/prod_build/linux/debian/scripts/chroot/post-build.sh old mode 100644 new mode 100755 diff --git a/prod_build/linux/debian/scripts/chroot/pre-build.sh b/prod_build/linux/debian/scripts/chroot/pre-build.sh index fff890473efe0d72fcc5c16592c39ad31b9a69c5..3b371430f385649b4056cbdd82133590376084da 100755 --- a/prod_build/linux/debian/scripts/chroot/pre-build.sh +++ b/prod_build/linux/debian/scripts/chroot/pre-build.sh @@ -38,3 +38,8 @@ install_dependencies() { } PKG_DEPS=$1 install_dependencies + +#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/compile_and_pack.sh b/prod_build/linux/debian/scripts/compile_and_pack.sh index d6afabae67cc983797528748f28edd579d9dfe6b..83c96b3ab0e090ba5f744d2a11632d9a90fb6e01 100755 --- a/prod_build/linux/debian/scripts/compile_and_pack.sh +++ b/prod_build/linux/debian/scripts/compile_and_pack.sh @@ -14,8 +14,44 @@ error_explainer() { esac } -cleanup () { +repack() { + +DEBNAME=$1 +DISTR_CODENAME=$2 +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 czf $CONTROL * +ar r ../$DEBNAME $CONTROL +cd .. +rm -rf tmp + +} + +add_postfix() { + +sed "s/$VERSION/${VERSION}-${DISTR_CODENAME}/" debian/control +sed "s/$VERSION/${VERSION}-${DISTR_CODENAME}/" debian/changelog + +} + + + + +cleanup() { + +cp /tmp/control_tmp/control debian/control +cp /tmp/control_tmp/changelog debian/changelog make distclean if [ "$1" == "--static" ]; then @@ -25,14 +61,19 @@ fi } error=0 +codename=$(lsb_release -a | grep Codename | cut -f2) #2DO: add trap command to clean the sources on exit. trap cleanup SIGINT -codename=$(lsb_release -a | grep Codename | cut -f2) -dpkg-buildpackage -J -us --changes-option=--build=any -uc && mkdir -p build && rm ../*dbgsym*.deb && \ -for filepkg in $(ls .. | grep .deb | grep -v $codename); do - filename=$(echo $filepkg | sed 's/.deb//') - mv ../$filepkg build/$filename\_$codename.deb -done || error=$? -cleanup + mkdir -p /tmp/control_tmp + cp debian/control /tmp/control_tmp/ + cp debian/changelog /tmp/control_tmp/ + add_postfix + dpkg-buildpackage -J -us --changes-option=--build=any -uc && mkdir -p build && \ + for filepkg in $(ls .. | grep .deb | grep -v $codename | grep -v dbgsym); do + filename=$(echo $filepkg | sed 's/.deb$//') + mv ../$filepkg build/$filename\_$codename.deb +# cd build && repack $filename\_$codename.deb $codename && cd .. + done || error=$? + cleanup error_explainer $error exit $error #2DO: Learn how to sign up the package. diff --git a/prod_build/linux/debian/scripts/deploy.sh b/prod_build/linux/debian/scripts/deploy.sh index 8330583649d772d5e85e21a4bc778b24812829fb..42b3a4932b6f8adbab62311c2080b8046dc1dbdd 100755 --- a/prod_build/linux/debian/scripts/deploy.sh +++ b/prod_build/linux/debian/scripts/deploy.sh @@ -3,23 +3,44 @@ echo "Deploying to $PACKAGE_PATH" pwd cd build -PKGFILES=$(ls . | grep .deb) + +PKGFILES=$(ls . | grep .deb | grep -v dbgsym) [ ! $MOD = "" ] && MOD="-$MOD" echo $PKGFILES + +[[ $CI_COMMIT_REF_NAME == "master" ]] && scp -i $CELLFRAME_REPO_KEY ../prod_build/linux/$distro/scripts/publish_remote/reprepro.sh "$CELLFRAME_REPO_CREDS:~/tmp/" && scp -i $CELLFRAME_REPO_KEY ../prod_build/linux/$distro/scripts/publish_remote/reprepro.sh "$CELLFRAME_REPO_CREDS:~/tmp/" + + for pkgfile in $PKGFILES; do pkgname=$(echo $pkgfile | sed "s/.deb$//") + lnkname=$(echo $pkgname | sed "s/_${VERSION_STRING}//") + echo "Symlink name is $lnkname" mv $pkgfile $wd/$PACKAGE_PATH/$pkgname$MOD.deb || echo "[ERR] Something went wrong in publishing the package. Now aborting." -if [ ! -z $UPDVER ]; then + if [[ $CI_COMMIT_REF_NAME == "master" ]]; then #TMP restriction for master only. + CODENAME=$(echo $pkgname | rev | cut -d '_' -f1 | rev) + case "$distro" in + "debian") section="non-free" ;; + "ubuntu") section="multiverse" ;; + *) ;; + esac + echo "attempting to publish cellframe-dashboard" + scp -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$CELLFRAME_REPO_CREDS:~/tmp/apt/" + ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" "chmod +x ~/tmp/reprepro.sh && ~/tmp/reprepro.sh $section $CODENAME ~/tmp/apt/$pkgname$MOD.deb $CELLFRAME_REPO_PATH" +# ssh "$CELLFRAME_REPO_CREDS" -- sudo reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" ##REPREPRO actions. + scp -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$CELLFRAME_FILESERVER_CREDS:~/web/pub.cellframe.net/public_html/linux/" + ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "ln -sf ~/web/pub.cellframe.net/public_html/linux/$pkgname$MOD.deb ~/web/pub.cellframe.net/public_html/linux/$lnkname$MOD-latest.deb" + fi +#if [ ! -z $UPDVER ]; then # for pkgfile in $PKGFILES; do - ln -sf $wd/$PACKAGE_PATH/$pkgname$MOD.deb $wd/$PACKAGE_PATH/$pkgname$MOD-latest.deb + ln -sf $wd/$PACKAGE_PATH/$pkgname$MOD.deb $wd/$PACKAGE_PATH/$lnkname$MOD-latest.deb # done #Need to create latest symlink to the project. -fi +#fi done - export -n "UPDVER" - +[[ $CI_COMMIT_REF_NAME == "master" ]] && ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" "rm -v ~/tmp/reprepro.sh" && ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" "rm -v ~/tmp/reprepro.sh" cd .. #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/post-build.sh b/prod_build/linux/debian/scripts/post-build.sh index c18d6f6bd5cd4bf57d1624c95768cde49bf70f37..9a56be9c1fadc1bffff422d14dfac78c51b4ef6b 100755 --- a/prod_build/linux/debian/scripts/post-build.sh +++ b/prod_build/linux/debian/scripts/post-build.sh @@ -2,7 +2,8 @@ #echo "Stub for post-build actions" echo "Entering post-build deployment and cleanup" -SCRIPTDIR="prod_build/linux/debian/scripts" +export distro=$(lsb_release -a 2>/dev/null | grep Distributor | cut -d $'\t' -f2 | tr '[:upper:]' '[:lower:]') +SCRIPTDIR="prod_build/linux/$distro/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 index cf9b041a8f17e206ccebac1e5630e21fdad27fcf..85e1f10b0b80b1a325dd3307573e776699ae6c13 100755 --- a/prod_build/linux/debian/scripts/pre-build.sh +++ b/prod_build/linux/debian/scripts/pre-build.sh @@ -73,18 +73,18 @@ install_dependencies() { #. 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" ) -VERSION_STRING=$(extract_version_number) -last_version_string=$(cat prod_build/linux/debian/essentials/changelog | head -n 1 | cut -d '(' -f2 | cut -d ')' -f1) +export_variables "prod_build/$platform/conf/*" +echo "Obtained version is $VERSION_STRING" +IFS=" " +#NOTONBUILDSERVER=0 +#gitlab-runner -v 2&>>/dev/null || NOTONBUILDSERVER=$? +last_version_string=$(cat debian/changelog | head -n 1 | cut -d '(' -f2 | cut -d ')' -f1) -if [ $( gitlab-runner -v 2> /dev/null ; echo $? ) == 0 ]; then - echo "[WRN] on build platform. Version won't be changed" +#if [[ $ONBUILDSERVER == 0 ]]; then +# echo "[WRN] on build platform. Version won't be changed" -elif [ "$last_version_string" == "$VERSION_STRING" ]; then +if [ "$last_version_string" == "$VERSION_STRING" ]; then echo "[INF] Version $last_version_string is equal to $VERSION_STRING. Nothing to change" elif [ ! -e debian/changelog ]; then echo "[INF] debian/changelog does not exist. No need to change anything" @@ -92,26 +92,23 @@ else echo "[INF] $VERSION_STRING is greater than $last_version_string" echo "[INF] editing the changelog" text=$(extract_gitlog_text) - echo "text entry" - echo "$text" - echo "End of text entry" IFS=$'\n' echo "VERSION_STRING = $VERSION_STRING" - for textline in $text; do dch -v $VERSION_STRING $textline done - branch=$(git branch | grep "*" | cut -c 3- ) - case branch in + echo "CI Commit is $CI_COMMIT_REF_NAME" + [[ $ONBUILDSERVER == 0 ]] && branch=$CI_COMMIT_REF_NAME || 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 + controlfile_version=$(cat debian/control | grep "Standards" | cut -d ' ' -f2) #Add to control info. + sed -i "s/$controlfile_version/$VERSION_STRING/" debian/control fi +IFS=" " #Chrooted_environment tuning BEFORE building echo "workdir is $(pwd)" @@ -121,7 +118,7 @@ for distr in $HOST_DISTR_VERSIONS; do #we need to install required dependencies 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 "There are problems with $CHROOT_PREFIX-$distr-$arch. You had installed it, right?" + [[ $errcode != 0 ]] && echo "There are problems with $CHROOT_PREFIX-$distr-$arch. You have installed it, right?" done done exit 0 diff --git a/prod_build/linux/debian/scripts/publish_remote/reprepro.sh b/prod_build/linux/debian/scripts/publish_remote/reprepro.sh new file mode 100644 index 0000000000000000000000000000000000000000..a373bc7062c8f723a2eaadb1cd02a63b2842edc8 --- /dev/null +++ b/prod_build/linux/debian/scripts/publish_remote/reprepro.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +DISTR_COMPONENT=$1 +DISTR_CODENAME=$2 +PKGNAME=$3 +PATH=$4 + +workdir=$(pwd) +error=0 +cd $PATH +reprepro -C "$DISTR_COMPONENT" --ask-passphrase includedeb "$DISTR_CODENAME" "$PKGNAME" && reprepro export "$DISTR_CODENAME" || error=$? +cd $workdir +exit $error diff --git a/prod_build/linux/ubuntu/conf/dependencies b/prod_build/linux/ubuntu/conf/dependencies new file mode 100644 index 0000000000000000000000000000000000000000..8e0dad7575d52550f26e4ed7ad92bd9c0f99ce85 --- /dev/null +++ b/prod_build/linux/ubuntu/conf/dependencies @@ -0,0 +1 @@ +PKG_DEPS="qt5-qmake cdbs debhelper qt5-default lsb-release qtdeclarative5-dev" diff --git a/prod_build/linux/ubuntu/conf/publish b/prod_build/linux/ubuntu/conf/publish new file mode 100644 index 0000000000000000000000000000000000000000..70b73c5d44642b10fdff74e940a437fc9b6fcd91 --- /dev/null +++ b/prod_build/linux/ubuntu/conf/publish @@ -0,0 +1,3 @@ +HOST_DISTR_VERSIONS="bionic" +HOST_ARCH_VERSIONS="amd64" +PACKAGE_PATH=builds/deb/ diff --git a/prod_build/linux/ubuntu/essentials/DiveVPN b/prod_build/linux/ubuntu/essentials/DiveVPN new file mode 120000 index 0000000000000000000000000000000000000000..de3da24eeb77ab92b3a724af734aa9c383fcfbb6 --- /dev/null +++ b/prod_build/linux/ubuntu/essentials/DiveVPN @@ -0,0 +1 @@ +../../../../brand/DiveVPN/os/debian \ No newline at end of file diff --git a/prod_build/linux/ubuntu/essentials/KelvinVPN b/prod_build/linux/ubuntu/essentials/KelvinVPN new file mode 120000 index 0000000000000000000000000000000000000000..a0f42873c60ae872edb8913e99798532b6cfee4b --- /dev/null +++ b/prod_build/linux/ubuntu/essentials/KelvinVPN @@ -0,0 +1 @@ +../../../../brand/KelvinVPN/os/debian \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts b/prod_build/linux/ubuntu/scripts new file mode 120000 index 0000000000000000000000000000000000000000..5346e94d9de35648b89eec646b6ef09ff2c0cb57 --- /dev/null +++ b/prod_build/linux/ubuntu/scripts @@ -0,0 +1 @@ +../debian/scripts/ \ No newline at end of file diff --git a/prod_build/linux/ubuntu/scripts/compile.sh b/prod_build/linux/ubuntu/scripts/compile.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/ubuntu/scripts/deploy.sh b/prod_build/linux/ubuntu/scripts/deploy.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/ubuntu/scripts/pack.sh b/prod_build/linux/ubuntu/scripts/pack.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/linux/ubuntu/scripts/test.sh b/prod_build/linux/ubuntu/scripts/test.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/prod_build/mac/conf/PATHS b/prod_build/mac/conf/PATHS new file mode 100644 index 0000000000000000000000000000000000000000..55768f157bb2b1e5e742fee52a6544114c92f12c --- /dev/null +++ b/prod_build/mac/conf/PATHS @@ -0,0 +1,5 @@ +APP_PATH=DapChainVpnGui/BRAND.app +BUILD_PATH=build/BRAND/ROOT +APP_NAME=BRAND +APP_SERVICE_NAME=BRANDService +PKGSCRIPT_PATH=prod_build/mac/essentials/BRAND-pkginstall diff --git a/prod_build/mac/conf/publish b/prod_build/mac/conf/publish new file mode 100644 index 0000000000000000000000000000000000000000..7715ce5ef2346ae795edda5dbeb3e192e502f4dd --- /dev/null +++ b/prod_build/mac/conf/publish @@ -0,0 +1,8 @@ +DIVE_REPO_CREDS="admin@debian.pub.demlabs.net" +DIVE_REPO_KEY="~/.ssh/demlabs_publish" +DIVE_REPO_PATH="~/web/debian.pub.demlabs.net/public_html" +DIVE_FILESERVER_CREDS="admin@pub.divevpn.com" +KLVN_REPO_CREDS=$DIVE_REPO_CREDS +KLVN_REPO_KEY=$DIVE_REPO_KEY +KLVN_REPO_PATH=$DIVE_REPO_PATH +KLVN_FILESERVER_CREDS="admin@pub.klvn.io" diff --git a/prod_build/mac/conf/sign b/prod_build/mac/conf/sign new file mode 100644 index 0000000000000000000000000000000000000000..cedc8ac2f507ab9061ac26c2d7951610936fc2a5 --- /dev/null +++ b/prod_build/mac/conf/sign @@ -0,0 +1 @@ +DEVELOPER_ID="Demlabs Signing Certificate" diff --git a/prod_build/mac/scripts/addqt.sh b/prod_build/mac/scripts/addqt.sh new file mode 100755 index 0000000000000000000000000000000000000000..bcff8a6c9231c18acc0df017a8d7a6d51966fa5e --- /dev/null +++ b/prod_build/mac/scripts/addqt.sh @@ -0,0 +1,4 @@ +#!/bin/bash +echo "Deploying the mac app" +pwd +$QT_MAC_PATH/macdeployqt DapChainVpnGui/$brand.app -verbose=3 -always-overwrite diff --git a/prod_build/mac/scripts/build-remote.sh b/prod_build/mac/scripts/build-remote.sh new file mode 100755 index 0000000000000000000000000000000000000000..2b6c64782381521a87a42517597f51a3fa9567f4 --- /dev/null +++ b/prod_build/mac/scripts/build-remote.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +KEY="~/.ssh/prod_build" +HOST="CloudXMAC@185.17.26.239" +srcpath=$(pwd) + +tar czpf $wd/dapchainvpn-client.tar.gz ./ +# Will pack an archive and then moving on. +ssh -i $KEY $HOST 'rm -rf demlabs/production/resources/dap.support && mkdir -p demlabs/production/resources/dap.support/dapchainvpn-client' && \ +scp -i $KEY "$wd/dapchainvpn-client.tar.gz" "$HOST:~/demlabs/production/resources/dap.support/dapchainvpn-client" && \ +ssh -i $KEY $HOST 'cd demlabs/production/resources/dap.support/dapchainvpn-client && tar -xzpf dapchainvpn-client.tar.gz' && \ +ssh -i $KEY $HOST "cd demlabs/production && ./prob $brand mac build" && \ +scp -i $KEY $HOST:~/demlabs/production/build/$brand/ROOT/*.pkg $wd/builds/pkg/ && \ +ssh -i $KEY $HOST rm -rf demlabs/production/build/* && rm -rf demlabs/production/resources/dap.support || errcode=$? + +exit $errcode diff --git a/prod_build/mac/scripts/build.sh b/prod_build/mac/scripts/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..697aeae411a429f2499b55df5edc8f553385e520 --- /dev/null +++ b/prod_build/mac/scripts/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +#if [ -z "$1" ]; then +# echo "[ERR] Script needs argument - package name. Use one of next :" +# for i in `ls configs/build_dmg.pkg/| sed 's/\.cfg//'`; do +# echo " $i" +# done +# exit 1 +#fi + + +./prod_build/mac/scripts/compile.sh $1 || exit 3 +./prod_build/mac/scripts/addqt.sh $1 || exit 4 +./prod_build/mac/scripts/reloc.sh $1 || exit 5 +#./prod_build/mac/scripts/sign.sh $1 || exit 6 +./prod_build/mac/scripts/pack.sh $1 || exit 7 + diff --git a/prod_build/mac/scripts/compile.sh b/prod_build/mac/scripts/compile.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..780a9fbdca25b246461324db4cb0fc952ca13259 100755 --- a/prod_build/mac/scripts/compile.sh +++ b/prod_build/mac/scripts/compile.sh @@ -0,0 +1,12 @@ +#!/bin/bash +#set up config + +echo "[!] Build source as application $APP_NAME ( $BUILD_PATH )" + +echo "Qt path is on $QT_MAC_PATH with BRAND=$brand" +echo "j$(sysctl -a | egrep -i 'ncpu' | cut -d ' ' -f2)" + +$QT_MAC_PATH/qmake *.pro -r -spec macx-clang CONFIG+=x86_64 BRAND=$brand BRAND_TARGET=$brand +make -j$(sysctl -a | egrep -i 'ncpu' | cut -d ' ' -f2) + +exit 0 diff --git a/prod_build/mac/scripts/deploy.sh b/prod_build/mac/scripts/deploy.sh old mode 100755 new mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7a693aac0b811bba987bf059b06862706d07fd7c --- a/prod_build/mac/scripts/deploy.sh +++ b/prod_build/mac/scripts/deploy.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + diff --git a/prod_build/mac/scripts/init_sources.sh b/prod_build/mac/scripts/init_sources.sh new file mode 100755 index 0000000000000000000000000000000000000000..6d79eb98052e4c527edee045d01cb4a79aff96ec --- /dev/null +++ b/prod_build/mac/scripts/init_sources.sh @@ -0,0 +1,7 @@ +#!/bin/sh +mkdir -p sources + +ln -s $PATH_TO_SOURCES/sapnet-client sources/ + +exit 0 + diff --git a/prod_build/mac/scripts/pack.sh b/prod_build/mac/scripts/pack.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8d1f05aadc5ecce254cc8a865cf2abcbba4f4235 100755 --- a/prod_build/mac/scripts/pack.sh +++ b/prod_build/mac/scripts/pack.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +echo "packing things" + +mkdir -p $wd/$BUILD_PATH + +ls $wd +ls $wd/$BUILD_PATH +cp -r $APP_PATH $wd/$BUILD_PATH/ + +##### -- REMOVE AFTER VARIABLE SCOPE IS RIGHT -- ##### +cd $wd/$SRC_PATH +. "$wd/$SRC_PATH/prod_build/general/pre-build.sh" +VERSION_INFO=$(extract_version_number) +cd $wd +##### -- PATCH_END -- ##### + +pkgbuild --analyze --root $wd/$BUILD_PATH/ $wd/$BUILD_PATH/$APP_NAME.plist + +plutil -replace BundleIsRelocatable -bool NO $wd/$BUILD_PATH/$APP_NAME.plist + +pkgbuild --install-location /Applications --identifier com.demlabs.$APP_NAME --scripts $wd/$SRC_PATH/$PKGSCRIPT_PATH --component-plist $wd/$BUILD_PATH/$APP_NAME.plist --root $wd/$BUILD_PATH/ $wd/$BUILD_PATH/$APP_NAME-$VERSION_INFO.pkg + +#### For creating dmg +#macdeployqt $APP_PATH -verbose=2 -no-strip -no-plugins -dmg + +#if [ -e $BUILD_PATH/SapNetGUI/$APP_NAME.dmg ]; then +# mv -f $BUILD_PATH/SapNetGUI/$APP_NAME.dmg $BUILD_PATH +# echo "[*] Success" +#else +# echo "[ERR] Nothing was build examine build.log for details" +# exit 2 +#fi + +exit 0 diff --git a/prod_build/mac/scripts/post-build.sh b/prod_build/mac/scripts/post-build.sh new file mode 100755 index 0000000000000000000000000000000000000000..5d4dcdf9f127555240c410c928ba545ab98b740f --- /dev/null +++ b/prod_build/mac/scripts/post-build.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "VERSION_INFO" +export -n VERSION_INFO + +deploy.sh || exit $? +make distclean +mv prod_build/mac/conf/PATHS.bak prod_build/mac/conf/PATHS diff --git a/prod_build/mac/scripts/pre-build.sh b/prod_build/mac/scripts/pre-build.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c71d2a575903c47d46a0fbaf9e6b37d3bb85952f 100755 --- a/prod_build/mac/scripts/pre-build.sh +++ b/prod_build/mac/scripts/pre-build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +#cp prod_build/mac/conf/PATHS prod_build/mac/conf/PATHS_TEMPLATE +sed -i.bak "s/BRAND/$brand/g" prod_build/mac/conf/PATHS +ls prod_build/mac/conf +cat prod_build/mac/conf/PATHS diff --git a/prod_build/mac/scripts/prepare.sh b/prod_build/mac/scripts/prepare.sh new file mode 100755 index 0000000000000000000000000000000000000000..0cb58ad4b754d27291745e638a3d64b83db049ca --- /dev/null +++ b/prod_build/mac/scripts/prepare.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#set up config + +echo "[*] Pack with $DEPLOY_OPTS" +macdeployqt $APP_PATH $DEPLOY_OPTS +#find $BUILD_PATH_FRAMEWORKS/GStreamer.framework -path *.a -exec rm -rf {} \; +#find $BUILD_PATH_FRAMEWORKS/GStreamer.framework -path *.la -exec rm -rf {} \; +#fdupes -r -dN $BUILD_PATH_FRAMEWORKS/GStreamer.framework/ + +exit 0 diff --git a/prod_build/mac/scripts/reloc.sh b/prod_build/mac/scripts/reloc.sh new file mode 100755 index 0000000000000000000000000000000000000000..7e60a872c25e833c3582f7a826552fa3aa8d1162 --- /dev/null +++ b/prod_build/mac/scripts/reloc.sh @@ -0,0 +1,42 @@ +#!/bin/bash +#set up config + +mkdir -p "$APP_PATH/Contents/MacOS" +if [ -e $wd/$SRC_PATH/DapChainVpnService/$APP_SERVICE_NAME ]; then + mv -f $wd/$SRC_PATH/DapChainVpnService/$APP_SERVICE_NAME $wd/$SRC_PATH/$APP_PATH/Contents/MacOS + fi + +echo "It is a $brand" +if [ -e $wd/$SRC_PATH/prod_build/mac/essentials/com.*.${brand}Service.plist ]; then + cp -f $wd/$SRC_PATH/prod_build/mac/essentials/com.*.${brand}Service.plist $wd/$SRC_PATH/$APP_PATH/Contents/Resources/ +fi + +if [ -e $wd/$SRC_PATH/prod_build/mac/essentials/cleanup ]; then + cp -rf $wd/$SRC_PATH/prod_build/mac/essentials/cleanup $wd/$SRC_PATH/$APP_PATH/Contents/Resources/ +fi + +if [ -e $wd/$SRC_PATH/prod_build/mac/essentials/net.sf.tuntaposx.tun.plist ]; then + cp -f $wd/$SRC_PATH/prod_build/mac/essentials/net.sf.tuntaposx.tun.plist $wd/$SRC_PATH/$APP_PATH/Contents/Resources/ +fi + +if [ -e $wd/$SRC_PATH/prod_build/mac/essentials/tun.kext ]; then + cp -rf $wd/$SRC_PATH/prod_build/mac/essentials/tun.kext $wd/$SRC_PATH/$APP_PATH/Contents/Resources/ +fi + + + +echo "[*] Relocate frameworks" +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/Current/Libraries /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/Current/libexec /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/Current/bin /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/1.0/libexec /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/1.0/bin /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ + +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/MacOS /Library/Frameworks/GStreamer.framework/ @executable_path/../Frameworks/GStreamer.framework/ + +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/Frameworks @rpath @executable_path/../Frameworks +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/MacOS @rpath @executable_path/../Frameworks +/usr/local/bin/osxrelocator -r $wd/$SRC_PATH/$APP_PATH/Contents/PlugIns @rpath @executable_path/../Frameworks + +exit 0 diff --git a/prod_build/mac/scripts/sign.sh b/prod_build/mac/scripts/sign.sh new file mode 100755 index 0000000000000000000000000000000000000000..f2e1646851f82cfc579d9197892653eea83a7b80 --- /dev/null +++ b/prod_build/mac/scripts/sign.sh @@ -0,0 +1,33 @@ +#!/bin/bash +#set up config + +SIG_NAME="RM6P8427SY" + +echo "--sign frameworks --" +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/GStreamer.framework/Versions/1.0/GStreamer +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtCore.framework/Versions/5/QtCore +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtDBus.framework/Versions/5/QtDBus +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtGui.framework/Versions/5/QtGui +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtXml.framework/Versions/5/QtXml +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtQml.framework/Versions/5/QtQml +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtQuick.framework/Versions/5/QtQuick +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtQuickWidgets.framework/Versions/5/QtQuickWidgets +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Frameworks/QtSvg.framework/Versions/5/QtSvg + +echo "--sign plugins--" +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/bearer/libqcorewlanbearer.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/bearer/libqgenericbearer.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/platforms/libqcocoa.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/graphicssystems/libqtracegraphicssystem.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/imageformats/libqicns.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/imageformats/libqico.dylib +codesign --force --verify --verbose --sign "$SIG_NAME" $APP_PATH/Contents/Plugins/imageformats/libqjpeg.dylib + +echo "--sign app--" +codesign --force --verify --deep --continue --verbose --sign "$SIG_NAME" $APP_PATH/Contents/MacOS/$APP_NAME +codesign --force --verify --deep --continue --verbose --sign "$SIG_NAME" $APP_PATH +exit 0