From 1028598a976efc5206b8bffacf547337928cc627 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 19 Jun 2023 13:48:40 +0900 Subject: DEB buildscripts: removed from R14.1.x branch. These scripts are kept up to date on master branch only, to avoid unnecessary repetition. Signed-off-by: Michele Calgaro --- debian/_buildscripts/local/00_extradeps.sh | 25 - debian/_buildscripts/local/01_base_01.sh | 30 -- debian/_buildscripts/local/02_base_02.sh | 21 - debian/_buildscripts/local/03_base_03.sh | 22 - debian/_buildscripts/local/04_base_04.sh | 10 - debian/_buildscripts/local/05_apps_system.sh | 30 -- debian/_buildscripts/local/06_apps_utilities.sh | 22 - debian/_buildscripts/local/07_apps_settings.sh | 20 - debian/_buildscripts/local/08_apps_graphics.sh | 20 - debian/_buildscripts/local/09_apps_development.sh | 17 - debian/_buildscripts/local/10_apps_games.sh | 11 - debian/_buildscripts/local/11_apps_internet.sh | 22 - debian/_buildscripts/local/12_apps_office.sh | 24 - debian/_buildscripts/local/13_apps_multimedia.sh | 22 - debian/_buildscripts/local/14_apps_tdeio.sh | 16 - debian/_buildscripts/local/15_apps_themes.sh | 23 - debian/_buildscripts/local/16_apps_misc.sh | 26 - debian/_buildscripts/local/17_meta_packages.sh | 26 - debian/_buildscripts/local/91_build_base.sh | 9 - .../_buildscripts/local/92_build_applications.sh | 14 - debian/_buildscripts/local/99_build_TDE.sh | 55 -- debian/_buildscripts/local/README.txt | 280 ----------- .../local/additional_files/etc/pbuilderrc | 135 ----- debian/_buildscripts/local/build_module.sh | 554 --------------------- debian/_buildscripts/local/create_repo.sh | 55 -- .../applications/kaffeine/kaffeine-wizard.diff | 65 --- .../applications/kaffeine/pre_build.sh | 13 - .../hook_examples/tdebase/018_kate_save_all.diff | 37 -- .../local/hook_examples/tdebase/pre_build.sh | 16 - .../hook_examples/tdebase/tdebase-usesak.diff | 15 - .../hook_examples/tdelibs/038_placeholder.diff | 64 --- .../local/hook_examples/tdelibs/pre_build.sh | 13 - debian/_buildscripts/local/internals/C10shell | 18 - .../_buildscripts/local/internals/_build_common.sh | 270 ---------- .../local/internals/_build_set_common.sh | 76 --- .../local/internals/_config_template.sh | 34 -- debian/_buildscripts/local/internals/_pbuilder.sh | 105 ---- .../_buildscripts/local/internals/distro_list.txt | 39 -- .../_buildscripts/local/internals/extra_deps.txt | 9 - debian/_buildscripts/local/update_repositories.sh | 513 ------------------- 40 files changed, 2776 deletions(-) delete mode 100755 debian/_buildscripts/local/00_extradeps.sh delete mode 100755 debian/_buildscripts/local/01_base_01.sh delete mode 100755 debian/_buildscripts/local/02_base_02.sh delete mode 100755 debian/_buildscripts/local/03_base_03.sh delete mode 100755 debian/_buildscripts/local/04_base_04.sh delete mode 100755 debian/_buildscripts/local/05_apps_system.sh delete mode 100755 debian/_buildscripts/local/06_apps_utilities.sh delete mode 100755 debian/_buildscripts/local/07_apps_settings.sh delete mode 100755 debian/_buildscripts/local/08_apps_graphics.sh delete mode 100755 debian/_buildscripts/local/09_apps_development.sh delete mode 100755 debian/_buildscripts/local/10_apps_games.sh delete mode 100755 debian/_buildscripts/local/11_apps_internet.sh delete mode 100755 debian/_buildscripts/local/12_apps_office.sh delete mode 100755 debian/_buildscripts/local/13_apps_multimedia.sh delete mode 100755 debian/_buildscripts/local/14_apps_tdeio.sh delete mode 100755 debian/_buildscripts/local/15_apps_themes.sh delete mode 100755 debian/_buildscripts/local/16_apps_misc.sh delete mode 100755 debian/_buildscripts/local/17_meta_packages.sh delete mode 100755 debian/_buildscripts/local/91_build_base.sh delete mode 100755 debian/_buildscripts/local/92_build_applications.sh delete mode 100755 debian/_buildscripts/local/99_build_TDE.sh delete mode 100644 debian/_buildscripts/local/README.txt delete mode 100644 debian/_buildscripts/local/additional_files/etc/pbuilderrc delete mode 100755 debian/_buildscripts/local/build_module.sh delete mode 100755 debian/_buildscripts/local/create_repo.sh delete mode 100644 debian/_buildscripts/local/hook_examples/applications/kaffeine/kaffeine-wizard.diff delete mode 100755 debian/_buildscripts/local/hook_examples/applications/kaffeine/pre_build.sh delete mode 100644 debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff delete mode 100755 debian/_buildscripts/local/hook_examples/tdebase/pre_build.sh delete mode 100644 debian/_buildscripts/local/hook_examples/tdebase/tdebase-usesak.diff delete mode 100644 debian/_buildscripts/local/hook_examples/tdelibs/038_placeholder.diff delete mode 100755 debian/_buildscripts/local/hook_examples/tdelibs/pre_build.sh delete mode 100755 debian/_buildscripts/local/internals/C10shell delete mode 100755 debian/_buildscripts/local/internals/_build_common.sh delete mode 100755 debian/_buildscripts/local/internals/_build_set_common.sh delete mode 100644 debian/_buildscripts/local/internals/_config_template.sh delete mode 100755 debian/_buildscripts/local/internals/_pbuilder.sh delete mode 100644 debian/_buildscripts/local/internals/distro_list.txt delete mode 100644 debian/_buildscripts/local/internals/extra_deps.txt delete mode 100755 debian/_buildscripts/local/update_repositories.sh diff --git a/debian/_buildscripts/local/00_extradeps.sh b/debian/_buildscripts/local/00_extradeps.sh deleted file mode 100755 index 82edb1404..000000000 --- a/debian/_buildscripts/local/00_extradeps.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -if [[ "$USE_PREBUILD_EXTRA_DEPS" = "y" ]]; then - echo -e "${CBrown}#### Use of pre-built extra dependency packages is currently configured. Nothing to do. ####\n${CNone}" - echo "Use of pre-built extra dependency packages is currently configured. Nothing to do." >>"$LOG_BUILD_RESULT_FILENAME" -else - build_module "$CFG_EXTRA_DEPS_DIR/uncrustify-trinity" - # - build_module "$CFG_EXTRA_DEPS_DIR/fireflies" - build_module "$CFG_EXTRA_DEPS_DIR/htdig" - build_module "$CFG_EXTRA_DEPS_DIR/imlib" - build_module "$CFG_EXTRA_DEPS_DIR/jasper" - build_module "$CFG_EXTRA_DEPS_DIR/lcms" - build_module "$CFG_EXTRA_DEPS_DIR/mp4v2" - build_module "$CFG_EXTRA_DEPS_DIR/openslp-dfsg" - build_module "$CFG_EXTRA_DEPS_DIR/transcode" - build_module "$CFG_EXTRA_DEPS_DIR/wv2" -fi - -set_log_end diff --git a/debian/_buildscripts/local/01_base_01.sh b/debian/_buildscripts/local/01_base_01.sh deleted file mode 100755 index 68ad3186a..000000000 --- a/debian/_buildscripts/local/01_base_01.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "dependencies/tde-cmake" -build_module "dependencies/libr" -build_module "dependencies/akode" -build_module "dependencies/tqt3" -build_module "dependencies/tqtinterface" -build_module "dependencies/arts" -build_module "dependencies/dbus-tqt" -build_module "dependencies/dbus-1-tqt" -build_module "dependencies/tqca" -build_module "dependencies/libart-lgpl" -build_module "dependencies/avahi-tqt" -build_module "dependencies/libcaldav" -build_module "dependencies/libcarddav" -build_module "dependencies/polkit-tqt" -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - # needs cmake-trinity so must be build after common/cmake module - build_module "$CFG_EXTRA_DEPS_DIR/pcsc-lite-nodbus" -fi -build_module "core/tdelibs" -build_module "libraries/libtdeldap" -build_module "core/tdebase" - -set_log_end diff --git a/debian/_buildscripts/local/02_base_02.sh b/debian/_buildscripts/local/02_base_02.sh deleted file mode 100755 index abe995014..000000000 --- a/debian/_buildscripts/local/02_base_02.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "dependencies/sip4-tqt" -build_module "dependencies/tqscintilla" -build_module "dependencies/pytqt" -build_module "libraries/pytde" -build_module "libraries/pytdeextensions" -build_module "core/tdebindings" -build_module "libraries/libtqt-perl" -build_module "core/tdeutils" -build_module "core/tdemultimedia" -build_module "core/tdeaccessibility" -build_module "core/tdenetwork" -build_module "core/tdeadmin" - -set_log_end diff --git a/debian/_buildscripts/local/03_base_03.sh b/debian/_buildscripts/local/03_base_03.sh deleted file mode 100755 index c9f7e4745..000000000 --- a/debian/_buildscripts/local/03_base_03.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "core/tdeartwork" -build_module "core/tdegames" -build_module "core/tdetoys" -build_module "core/tdeedu" -build_module "core/tdegraphics" -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - build_module "$CFG_EXTRA_DEPS_DIR/pinentry-tqt" -fi -build_module "core/tdepim" -build_module "core/tdeaddons" -build_module "core/tdesdk" -build_module "core/tdevelop" -build_module "core/tdewebdev" - -set_log_end diff --git a/debian/_buildscripts/local/04_base_04.sh b/debian/_buildscripts/local/04_base_04.sh deleted file mode 100755 index 5dddf0aa8..000000000 --- a/debian/_buildscripts/local/04_base_04.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "core/tde-i18n" - -set_log_end diff --git a/debian/_buildscripts/local/05_apps_system.sh b/debian/_buildscripts/local/05_apps_system.sh deleted file mode 100755 index a7fdb1c33..000000000 --- a/debian/_buildscripts/local/05_apps_system.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/system/dolphin" -build_module "applications/system/katapult" -build_module "applications/system/kbfx" -build_module "applications/system/kcmautostart" -build_module "applications/system/kdbusnotification" -build_module "applications/system/klamav" -build_module "applications/system/knemo" -build_module "applications/system/knetload" -build_module "applications/system/knetstats" -build_module "applications/system/kooldock" -build_module "applications/system/krusader" -build_module "applications/system/kshutdown" -build_module "applications/system/ksystemlog" -build_module "applications/system/kvkbd" -build_module "applications/system/polkit-agent-tde" -build_module "applications/system/smartcardauth" -build_module "applications/system/tastymenu" -build_module "applications/system/tdedocker" -build_module "applications/system/tdepowersave" -build_module "applications/system/tdesshaskpass" -build_module "applications/system/yakuake" - -set_log_end diff --git a/debian/_buildscripts/local/06_apps_utilities.sh b/debian/_buildscripts/local/06_apps_utilities.sh deleted file mode 100755 index c90ff66cc..000000000 --- a/debian/_buildscripts/local/06_apps_utilities.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/utilities/abakus" -build_module "applications/utilities/filelight" -build_module "applications/utilities/kbarcode" -build_module "applications/utilities/kchmviewer" -build_module "applications/utilities/kcpuload" -build_module "applications/utilities/kdirstat" -build_module "applications/utilities/keep" -build_module "applications/utilities/knutclient" -build_module "applications/utilities/kompose" -build_module "applications/utilities/krename" -build_module "applications/utilities/ksensors" -build_module "applications/utilities/mathemagics" -build_module "applications/utilities/qalculate-tde" - -set_log_end diff --git a/debian/_buildscripts/local/07_apps_settings.sh b/debian/_buildscripts/local/07_apps_settings.sh deleted file mode 100755 index a637949b9..000000000 --- a/debian/_buildscripts/local/07_apps_settings.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/settings/kdpkg" -build_module "applications/settings/kima" -build_module "applications/settings/kiosktool" -build_module "applications/settings/kkbswitch" -build_module "applications/settings/klcddimmer" -build_module "applications/settings/kmyfirewall" -build_module "applications/settings/tde-guidance" -build_module "applications/settings/tde-systemsettings" -build_module "applications/settings/tdenetworkmanager" -build_module "applications/settings/tdesudo" -build_module "applications/settings/wlassistant" - -set_log_end diff --git a/debian/_buildscripts/local/08_apps_graphics.sh b/debian/_buildscripts/local/08_apps_graphics.sh deleted file mode 100755 index 32c61d575..000000000 --- a/debian/_buildscripts/local/08_apps_graphics.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "libraries/libkipi" -build_module "libraries/libkdcraw" -build_module "libraries/libkexiv2" -build_module "libraries/kipi-plugins" -build_module "libraries/libksquirrel" - -build_module "applications/graphics/digikam" -build_module "applications/graphics/gwenview" -build_module "applications/graphics/gwenview-i18n" -build_module "applications/graphics/ksquirrel" -build_module "applications/graphics/potracegui" - -set_log_end diff --git a/debian/_buildscripts/local/09_apps_development.sh b/debian/_buildscripts/local/09_apps_development.sh deleted file mode 100755 index f5e41d1bf..000000000 --- a/debian/_buildscripts/local/09_apps_development.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/development/kdbg" -build_module "applications/development/kdiff3" -build_module "applications/development/kpicosim" -build_module "applications/development/kscope" -build_module "applications/development/ktechlab" -build_module "applications/development/kxmleditor" -build_module "applications/development/piklab" -build_module "applications/development/tdesvn" - -set_log_end diff --git a/debian/_buildscripts/local/10_apps_games.sh b/debian/_buildscripts/local/10_apps_games.sh deleted file mode 100755 index 09290d0c0..000000000 --- a/debian/_buildscripts/local/10_apps_games.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/games/knights" -build_module "applications/games/tdepacman" - -set_log_end diff --git a/debian/_buildscripts/local/11_apps_internet.sh b/debian/_buildscripts/local/11_apps_internet.sh deleted file mode 100755 index 79b6c681d..000000000 --- a/debian/_buildscripts/local/11_apps_internet.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/internet/kasablanca" -build_module "applications/internet/kbiff" -build_module "applications/internet/kftpgrabber" -build_module "applications/internet/knmap" -build_module "applications/internet/konversation" -build_module "applications/internet/kopete-otr" -build_module "applications/internet/kshowmail" -build_module "applications/internet/kstreamripper" -build_module "applications/internet/ktorrent" -build_module "applications/internet/kvirc" -build_module "applications/internet/kvpnc" -build_module "applications/internet/smb4k" -build_module "applications/internet/tork" - -set_log_end diff --git a/debian/_buildscripts/local/12_apps_office.sh b/debian/_buildscripts/local/12_apps_office.sh deleted file mode 100755 index c9baaecd1..000000000 --- a/debian/_buildscripts/local/12_apps_office.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/office/basket" -build_module "applications/office/kbibtex" -build_module "applications/office/kbookreader" -build_module "applications/office/kile" -build_module "applications/office/kmymoney" -build_module "applications/office/knowit" -build_module "applications/office/koffice" -build_module "applications/office/koffice-i18n" -build_module "applications/office/keximdb" -build_module "applications/office/tellico" - -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - build_module "$CFG_EXTRA_DEPS_DIR/pilot-link" -fi -build_module "applications/office/kpilot" - -set_log_end diff --git a/debian/_buildscripts/local/13_apps_multimedia.sh b/debian/_buildscripts/local/13_apps_multimedia.sh deleted file mode 100755 index 3c3dc30d4..000000000 --- a/debian/_buildscripts/local/13_apps_multimedia.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/multimedia/amarok" -build_module "applications/multimedia/codeine" -build_module "applications/multimedia/k3b" -build_module "applications/multimedia/k3b-i18n" -build_module "applications/multimedia/k9copy" -build_module "applications/multimedia/kaffeine" -build_module "applications/multimedia/kaffeine-mozilla" -build_module "applications/multimedia/kmplayer" # depends on koffice-trinity-dev -build_module "applications/multimedia/kplayer" -build_module "applications/multimedia/mplayerthumbs" -build_module "applications/multimedia/rosegarden" -build_module "applications/multimedia/soundkonverter" -build_module "applications/multimedia/tderadio" - -set_log_end diff --git a/debian/_buildscripts/local/14_apps_tdeio.sh b/debian/_buildscripts/local/14_apps_tdeio.sh deleted file mode 100755 index d50b03a5c..000000000 --- a/debian/_buildscripts/local/14_apps_tdeio.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/tdeio/tdeio-appinfo" -build_module "applications/tdeio/tdeio-apt" -build_module "applications/tdeio/tdeio-ftps" -build_module "applications/tdeio/tdeio-gopher" -build_module "applications/tdeio/tdeio-locate" -build_module "applications/tdeio/tdeio-sword" -build_module "applications/tdeio/tdeio-umountwrapper" - -set_log_end diff --git a/debian/_buildscripts/local/15_apps_themes.sh b/debian/_buildscripts/local/15_apps_themes.sh deleted file mode 100755 index 8bffc9ab8..000000000 --- a/debian/_buildscripts/local/15_apps_themes.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/themes/gtk3-tqt-engine" -build_module "applications/themes/gtk-qt-engine" -build_module "applications/themes/kgtk-qt3" -build_module "applications/themes/ksplash-engine-moodin" -# build_module "applications/themes/qt4-tqt-theme-engine" -build_module "applications/themes/tde-style-baghira" -build_module "applications/themes/tde-style-domino" -build_module "applications/themes/tde-style-ia-ora" -build_module "applications/themes/tde-style-lipstik" -build_module "applications/themes/tde-style-qtcurve" -build_module "applications/themes/tdmtheme" -build_module "applications/themes/twin-style-crystal" -build_module "applications/themes/twin-style-dekorator" -build_module "applications/themes/twin-style-suse2" - -set_log_end diff --git a/debian/_buildscripts/local/16_apps_misc.sh b/debian/_buildscripts/local/16_apps_misc.sh deleted file mode 100755 index ee6061311..000000000 --- a/debian/_buildscripts/local/16_apps_misc.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/misc/bibletime" -build_module "applications/misc/desktop-effects-tde" -build_module "applications/misc/kcmldap" -build_module "applications/misc/kcmldapcontroller" -build_module "applications/misc/kcmldapmanager" -build_module "applications/misc/kerberostray" -build_module "applications/misc/krecipes" - -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - build_module "$CFG_EXTRA_DEPS_DIR/compiz-trinity" - build_module "$CFG_EXTRA_DEPS_DIR/libcompizconfig-trinity" - build_module "$CFG_EXTRA_DEPS_DIR/compiz-fusion-bcop-trinity" - build_module "$CFG_EXTRA_DEPS_DIR/compiz-fusion-plugins-main-trinity" - build_module "$CFG_EXTRA_DEPS_DIR/compiz-fusion-plugins-extra-trinity" - build_module "$CFG_EXTRA_DEPS_DIR/compizconfig-python-trinity" -fi -build_module "applications/misc/compizconfig-backend-tdeconfig" - -set_log_end diff --git a/debian/_buildscripts/local/17_meta_packages.sh b/debian/_buildscripts/local/17_meta_packages.sh deleted file mode 100755 index 37d1a670c..000000000 --- a/debian/_buildscripts/local/17_meta_packages.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "metapackages/desktop-base" -build_module "metapackages/meta-tde" -build_module "metapackages/redmond-default-settings" -build_module "metapackages/redmond-default-settings-ii" -build_module "metapackages/sudo-trinity" -build_module "metapackages/synaptic-trinity" -build_module "metapackages/trinity-apt-archive" -build_module "metapackages/trinity-keyring" -build_module "metapackages/trinity-slax" - -# Ubuntu only - uncomment if necessary - untested -#build_module "metapackages/casper-trinity" -#build_module "metapackages/kubuntu-default-settings" -#build_module "metapackages/kubuntu-meta" -#build_module "metapackages/tde-ubuntu-integration" -#build_module "metapackages/trinity-livecd" -#build_module "metapackages/ubiquity-trinity" - -set_log_end diff --git a/debian/_buildscripts/local/91_build_base.sh b/debian/_buildscripts/local/91_build_base.sh deleted file mode 100755 index b53ba9048..000000000 --- a/debian/_buildscripts/local/91_build_base.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - ./00_extradeps.sh -fi -./01_base_01.sh -./02_base_02.sh -./03_base_03.sh -./04_base_04.sh diff --git a/debian/_buildscripts/local/92_build_applications.sh b/debian/_buildscripts/local/92_build_applications.sh deleted file mode 100755 index d16b5cc54..000000000 --- a/debian/_buildscripts/local/92_build_applications.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -./05_apps_system.sh -./06_apps_utilities.sh -./07_apps_settings.sh -./08_apps_graphics.sh -./09_apps_development.sh -./10_apps_games.sh -./11_apps_internet.sh -./12_apps_office.sh -./13_apps_multimedia.sh -./14_apps_tdeio.sh -./15_apps_themes.sh -./16_apps_misc.sh diff --git a/debian/_buildscripts/local/99_build_TDE.sh b/debian/_buildscripts/local/99_build_TDE.sh deleted file mode 100755 index 1a80862a6..000000000 --- a/debian/_buildscripts/local/99_build_TDE.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# Load common code and initialization -export SCRIPT_DIR=$(dirname $(readlink -f "$0")) -. ${SCRIPT_DIR}/internals/_build_common.sh -init_common - -_BUILDALL_TIMER=2 -_BUILDALL_TIME="--/--:--:--:---" - - -#---------------------------- -# do_exit for set building -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGray}#### Building process for TDE completed ####${CNone}" - else - echo -e "${CGray}#### Building process for TDE interrupted ($1) ####${CNone}" - fi - exit $1 -} - - -#---------------------------- -function set_log_start() -{ - echo -e "${CGray}#### Starting building process for TDE ####${CNone}" - echo - echo "********** TDE **********" >>"$LOG_BUILD_RESULT_FILENAME" - exec_time_start $_BUILDALL_TIMER -} - - -#---------------------------- -function set_log_end() -{ - exec_time_stop $_BUILDALL_TIMER "_BUILDALL_TIME" - echo " [$_BUILDALL_TIME] All TDE " >>"$LOG_BUILD_RESULT_FILENAME" - echo >>"$LOG_BUILD_RESULT_FILENAME" - do_exit 0 -} - - -#---------------------------- -# Build TDE -#---------------------------- -set_log_start - -./91_build_base.sh -./92_build_applications.sh -./17_meta_packages.sh - -set_log_end diff --git a/debian/_buildscripts/local/README.txt b/debian/_buildscripts/local/README.txt deleted file mode 100644 index 12044c7ae..000000000 --- a/debian/_buildscripts/local/README.txt +++ /dev/null @@ -1,280 +0,0 @@ ------ -Index ------ -A) Environment preparation -B) Notes about scripts -C) How to use the scripts - - --------------------------- -A) Environment preparation --------------------------- -0) Initial notes - - this guide has been prepared based on a clean debian testing netinstall system without any other DE. - It should work for other debian/ubuntu distros as well, but eventually you may run into small differences - here and there. - - you can change folder names below, as long as you update the "_config.sh" file accordingly. - -1) Install following packages: bc, cdbs, git, pbuilder, rsync and required dependencies. - NOTE: sudo should already be installed. If not, install sudo as well. - -2) Create a base folder for TDE, hereafter referred to as TDE_DIR (for example $HOME/tde_src) - -3) Create the following folders [ see NOTE at point 0) about folder names ] - - in TDE_DIR: 0_logs : contains log files for repo update and global builds (more on this later) - 1_git : contains the git repo clones and build hook scripts - 2_build: folder used for build preparation and for local builds - 3_repo : local repo for package installation (to be configured in /etc/apt/sources.list) - buildscripts: contains a local copy of the build scripts, which can be modified as required - - in TDE_DIR/1_git: - edeps : contains extra dependency modules necessary to build TDE (this folder is not necessary - if pre-built extra dependencies are used - see point 9 for more info) - hooks : contains build hook scripts to execute ad-hoc code before and after the building process. - Mainly used to apply patches automatically during the building process - -4) Clone TDE git repositories - A) without using git worktrees - A.1) Main repo: - cd "$TDE_DIR/1_git" - git clone https://mirror.git.trinitydesktop.org/gitea/TDE/tde.git - git clone https://mirror.git.trinitydesktop.org/gitea/TDE/scripts.git tde/scripts - cd tde - ./scripts/switch_all_submodules_to_head_and_clean anonymous - - A.2) If you are not using pre-built extra dependencies: - cd "$TDE_DIR/1_git" - git clone https://mirror.git.trinitydesktop.org/gitea/TDE/extra-dependencies.git edeps - - B) using git worktrees - B.1) Main repo - cd "$TDE_DIR/1_git" - git clone --bare --config "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*" https://mirror.git.trinitydesktop.org/gitea/TDE/tde.git repos/tde.git - - B.2) If you are not using pre-built extra dependencies: - cd "$TDE_DIR/1_git" - git clone --bare --config "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*" https://mirror.git.trinitydesktop.org/gitea/TDE/extra-dependencies.git repos/edeps.git - - B.3) run the script "update_repositories.sh" once you have completed the setup as described later in this document. - -5) Add your user to the sudo group (not required if you are root) - su -c "adduser sudo" - Logout and login again to make sure the new settings are applied. - * Optionally, consider extending your sudo timeout interval to avoid having to type your password too often - (this could be quite painful especially during long builds, which would not be able to complete if unattended). - To do this, type "sudo visudo" and then add "Defaults timestamp_timeout=", where the value is in - minutes. Use a value of -1 to set an infinite timeout. - -6) Copy the files from "TDE_DIR/1_git/tde/packaging/debian/_buildscripts/local/additional_files" folder - to the respectivily named folders. - -7) Create pbuilder base package with the command: - sudo pbuilder create - If you wish to build for a different distro or architecture, use the command: - sudo DISTRO_NAME= ARCHITECTURE= pbuilder create - -8) Setup the build scripts locally: - - copy build scripts from "TDE_DIR/1_git/tde/packaging/debian/_buildscripts/local" to "TDE_DIR/buildscripts" - and make sure all shell scripts are executable - - cd "TDE_DIR/buildscripts" - - cp ./internals/_config_template.sh _config.sh - - edit "_config.sh" to set your preferences and check that the various folder names match the structure on your disk. - Make sure to set the following variables: - * TDE_DIR to the correct path. - * DISTRO, DISTRO_NAME and ARCHITECTURE to match the distro and architecture you want to build for if different - from your current setup. Otherwise the variables can be left empty and auto detection will be performed. - * UPDATE_BRANCHES to the branches you want to keep updated from the main repositories. - * DEFAULT_REPO_BRANCH to the branch to check out at the end of the repositories update process. - -9) Some additional packages (referred to as extra dependencies) are required to build and install TDE in debian/ubuntu. - These modules can be built locally or alternatively Slavek Banko's pre-built binaries can be used. - - 9.1) Using pre-built extra dependencies - - open "_config.sh" and set the variable USE_PREBUILD_EXTRA_DEPS to "y" (this is the default initial setting) - - add the following lines to the /etc/apt/sources.list file. This will setup Slavek's repositories in apt for - installing the extra dependency packages when TDE is installed. - * For R14.1.x series (repository branch "master") - # --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY --- - deb http://mirror.ppa.trinitydesktop.org/trinity-testing deps - * For R14.0.x series (repository branch "r14.0.x") - # --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY --- - deb http://mirror.ppa.trinitydesktop.org/trinity-sb deps-r14 - For example: - deb http://mirror.ppa.trinitydesktop.org/trinity-sb buster deps-r14 - - - install package dirmngr if required - - import TDE Archive Signing key into your apt keyring - sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key C93AF1698685AD8B - - 9.2) Building extra dependencies locally (recommended option) - - open "_config.sh" and set the variables USE_PREBUILD_EXTRA_DEPS to "n" and - CFG_EXTRA_DEPS_DIR to "edeps" - - build the extra dependency as any other normal module - -10) Add the following lines to the /etc/apt/sources.list file. This will setup your local repo in apt. - # --- LOCAL TDE REPOSITORY --- - deb [trusted=yes] file:TDE_DIR/3_repo main - For example: - deb [trusted=yes] file:/home/tde_src/3_repo buster main - - - ----------------------- -B) Notes about scripts ----------------------- -1) * Notes * -Modules are built using the build_module.sh script. After the build is completed, the installation .deb files are located in TDE_DIR/2_build/debs// and the source code and build reports in TDE_DIR/2_build/debs//src/ - -The source code can be either the git repo or a local copy in TDE_DIR/2_build/build/. -A module can be built in a clean chroot environment using pbuilder (default option) or locally using dpkg-buildpackage (useful for quick debugging/developing). -When using pbuilder, a hook can be used to invoke a shell when the build fails. - -Build logs are automatically stored to files, but can also be displayed during the build process. -The default location of a module build log is TDE_DIR/2_build/debs//src/__build__.log - -When building sets of modules or the whole TDE, a global build summary is automatically stored to TDE_DIR/0_logs/build_result.log to quickly check what built and what failed. It is recommended to delete that file before starting a new TDE build (if not, build results will be appended at the end of the file). - - -2) * Scripts description * -- scripts in 'internals' folder - Scripts used intenally by other scripts. No need for invoking these directly. - -- update_repositories.sh: - Script used to update the local clone of the git repositories. - It is possible to update multiple branches as specified by the variable UPDATE_BRANCHES in the configuration - file. After the update is completed, the local repositories will be switched to the branch specified by the - DEFAULT_REPO_BRANCH variable. - The script can also be used to switch the local repositories to a particular branch, without performing any update. - Usage: - update_repositories.sh [options] - Options: - -i (Incremental) : in case the previous update was interrupted, continue from the last known updated module. - (useful on slow/unstable internet connections). If the previous update had completed, - this option is ignored. - -v (Verbose) : display and log more output. Useful for troubleshooting. - -ub "" (Update Branches) : allows to specify the branches to update. This override the variable - UPDATE_BRANCHES in the configuration file. If a single branch is specified and the - '-db'/'-sb' paraemters are not used, '-ub' can be used to update and switch a single branch. - -db (Default Branch) : allows to specify the default branch. This override the variable - DEFAULT_REPO_BRANCH in the configuration file. - This option is only used if the argument '-so' is not specified. - -so (Switch Only) : switch the local repositories to the specified branch, without doing any update. - If '-ub' is used, the '-so' branch name must be one of those specified in the 'ub' branches. - -- build_module.sh - Build a single module. The name of the module can be specified in two ways: - 1) by providing the full "folder/module name" location - Examples: - tdebase - applications/abakus - dependencies/libr - edeps/debian/imlib - 2) by providing only the module name and let the script look up for a unique match among the known modules. - Examples: - tdebase - abakus - libr - imlib - 3) for extra dependencies only, by providing the repository folder and the module name without the "debian" - subfolder - edeps/imlib - Usage: - build_module.sh [options] [module_name] - Options: - -g (Git) : build from git repo sources. If missing, build from the local copy in build folder. - -l (Local) : build the module locally. If missing, build in a clean chroot environment - -p (Path): build from the specified folder. This option cannot be used together with -g. - The path must be a module in the git repository or in the local build folder. - This option is mostly intended to be used when using branches with git worktrees. - -sl (Show Log) : output the building logs to terminal while the build is ongoing - -lr (Log Result) : log (append) build result (OK, FAILED) to TDE_DIR/0_logs/build_result.log file - -sh (Shell Hook) : use a shell hook for failing builds, only valid if building using pbuilder (clean chroot environment) - -po (Prepare Only): only prepare the source folder but do not build the module. Useful to prepare the source code before - doing local changes/development. The module can then be built from the modified local folder - -d (Debug) : enable debug symbols if possible (debian/rules file must contain "RelWithDebInfo" for this to work) - module_name : the module to build. If '-p ' is used, this parameter must not be specified since the module - is derived from the parameter. - --
_.sh - A number of scripts used to build sets of modules. Each script builds an individual set. - Modules are built from the git sources and the build result is automatically appended to - TDE_DIR/0_logs/build_result.log. - Usage: -
_.sh [options] - Options: - -s N: if specified, skip first N modules from the set of modules - - The sets are logically grouped as "base system", "applications" and "meta packages". - 00_extradeps.sh : extra dependencies modules - 01_base_01.sh - 04_base_04.sh : base system - 05_apps_system.sh - 16_apps_misc.sh : application modules - 17_meta_packages.sh : meta package modules - 91_build_base.sh : whole TDE base system in 00_extradeps.sh - 04_base_04.sh - 92_build_applications.sh : all TDE applications in 05_apps_system.sh - 16_apps_misc.sh - -- 99_build_TDE.sh - Script used to build the complete TDE at once. - Usage: - 99_build_TDE.sh - -- create_repo.sh - Creates a local repository from the .deb files currently stored in TDE_DIR/2_build/debs. - Usage: - [sudo] create_repo.sh [options] - Options: - -b (Backup) : create a backup of the existing repository in TDE_DIR/CFG_REPO_DIR.backup - - -3) * Building hooks * -Hooks are available to execute ad-hoc code before and after the build process. For example this is very useful to automatically apply patches. -There are two type of hooks: -- pre_build : applied before switching the module to quilt format and build -- post_build: applied after the build (dpkg-buildpackage or pbuilder) has terminated -To use a hook, create an executable script (pre_build.sh and/or post_build.sh) in the TDE_DIR/1_git/hooks/ folder. The scripts are executed in the build_module.sh environment, so have access to all the variables defined in that file. See the files in the "hook examples" folder for real usage samples. - - - -------------------------- -C) How to use the scripts -------------------------- -1) Follow the steps in section "A) Environment preparation" (only required the first time). -2) cd "TDE_DIR/buildscripts" -3) Update to latest git repository using - ./update_repositories.sh -4) Run "sudo pbuilder update" at the beginning of the day to update the base package to the latest version. This will speed up - the process when building several modules in sequence. -5) Build modules as per your needs. You don't need to use "sudo" directly since the scripts will do that automatically if - required. Just type your sudo password when prompted to do so. -6) Create a local repository from the packages you have just built, to be used as installation repository. - [sudo] ./create_repo.sh -7) Install TDE as you usually do. For example as follow: - - sudo apt-get update - - sudo aptitude install tdebase-trinity (for a minimalistic TDE environment) - or - sudo aptitude install tde-trinity (for a standard TDE environment) - - - -Examples of real usage: - -1) build a single module - - ./build_module.sh -g -sl "dependencies/libr" -> build libr package. This is a good test to check - whether everything is working fine - - ./build_module.sh -g "tdelibs" -> build "tdelibs" from git sources in a clean chroot environment - - ./build_module.sh -g -l -sl "applications/amarok" -> build "amarok" locally from git sources and - display building logs during building - - ./build_module.sh -sh -lr "tdebase" -> build "tdebase" from the local sources (in TDE_DIR/2_build/build/tdebase) - in a clean chroot environment and launch a shell in case of building failure. - Append the build result (OK, FAILED) to TDE_DIR/scripts/logs/build_result.log - - ./build_module.sh -g -po "tdelibs" -> prepare "tdelibs" for building from git sources. Source code will be available - in TDE_DIR/2_build/build/tdelibs. After you have made changes to the source and - want to build the modified package, run './build_module.sh "tdelibs"' - -2) build a single set - (optional) delete the TDE_DIR/0_logs/build_result.log file - ./01_base_01.sh -> build this set. - ./03_base_03.sh -s 3 -> build this set but skip the first 3 modules of the set. - -3) build all TDE - ./99_build_TDE.sh -> build all TDE - -4) [sudo] ./create_repo.sh -> build or update your local TDE repository diff --git a/debian/_buildscripts/local/additional_files/etc/pbuilderrc b/debian/_buildscripts/local/additional_files/etc/pbuilderrc deleted file mode 100644 index 29a522b1e..000000000 --- a/debian/_buildscripts/local/additional_files/etc/pbuilderrc +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash - -# general options -BUILDPLACE="/var/cache/pbuilder/build/" -USEPROC=yes -USEDEVPTS=yes -USEDEVFS=no - -# the username and ID used by pbuilder, inside chroot. Needs fakeroot, really -BUILDSOURCEROOTCMD="" -BUILDUSERNAME="" -BUILDUSERID="" - - -# make debconf not interact with user -export DEBIAN_FRONTEND="noninteractive" -DEBEMAIL="" - -# for pbuilder debuild (sudo -E keeps the environment as-is) -BUILDSOURCEROOTCMD="fakeroot" -PBUILDERROOTCMD="sudo -E" - -# this is necessary for running 'apt-ftparchive' in a hook script if required -EXTRAPACKAGES="$EXTRAPACKAGES apt-utils" - -#APT configuration files directory -APTCONFDIR="" - -# Set the PATH to be used inside pbuilder -export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" -# Shell to be used inside pbuilder by commands like 'su' -export SHELL=/bin/bash - -# default PKGNAME_LOGFILE -PKGNAME_LOGFILE="__build__.log" - -#-- get desired distribution and architecture -DISTRIBUTION="$DISTRO_NAME" -[[ "$DISTRO" = "" ]] && DISTRO=$(lsb_release -is | sed -e 's/\(.*\)/\L\1/') -[[ "$DISTRIBUTION" = "" ]] && DISTRIBUTION=$(lsb_release -cs | sed -e 's/\(.*\)/\L\1/') -[[ "$ARCHITECTURE" = "" ]] && ARCHITECTURE=$(dpkg --print-architecture) - -BASETGZ="/var/cache/pbuilder/base-$DISTRIBUTION@$ARCHITECTURE.tgz" - -#-- select apt components -case "$DISTRIBUTION" in - # debian - sid|bookwork|bullseye|buster|stretch) - COMPONENTS="main contrib non-free" - ;; - - # devuan - ceres|daedalus|chimaera|beowulf|ascii) - COMPONENTS="main" - DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg) - EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring" - ;; - - # ubuntu - kinetic|jammy|impish|hirsute|focal|bionic|xenial) - COMPONENTS="main restricted universe multiverse" - DEBOOTSTRAPOPTS=(--variant=buildd) - ;; - - # raspbian - raspbian-bookworm|raspbian-bullseye|raspbian-buster|raspbian-stretch) - COMPONENTS="main contrib non-free" - DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg) - ;; -esac -EXTRAPACKAGES="$EXTRAPACKAGES fakeroot apt-transport-https ca-certificates" - -#-- select base apt sources -case "$DISTRIBUTION" in - # debian - sid|bookwork|bullseye|buster|stretch) - MIRRORSITE=http://deb.debian.org/debian - ;; - - # devuan - ceres|daedalus|chimaera|beowulf|ascii) - MIRRORSITE=http://auto.mirror.devuan.org/merged - ;; - - # ubuntu - kinetic|jammy|impish|hirsute|focal|bionic|xenial) - if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then - MIRRORSITE=http://archive.ubuntu.com/ubuntu - else - MIRRORSITE=http://ports.ubuntu.com - fi - ;; - - # raspbian - raspbian-bookworm|raspbian-bullseye|raspbian-buster|raspbian-stretch) - MIRRORSITE=http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian - ;; -esac - -if [ -n "${ARCHITECTURE}" ]; then - NAME="$NAME-$ARCHITECTURE" - DEBOOTSTRAPOPTS=("--arch" "$ARCHITECTURE" "${DEBOOTSTRAPOPTS[@]}") -fi - -BUILDRESULT="/var/cache/pbuilder/$DISTRO-$DISTRIBUTION/result/" - -APTCACHE="/var/cache/pbuilder/aptcache/$DISTRO-$DISTRIBUTION/" -if [ -n "$APTCACHE" ] && [ ! -d "$APTCACHE" ]; then - mkdir $APTCACHE -fi -APTCACHEHARDLINK=no - -#-- extra options -DEBBUILDOPTS="-b" - -if [ -z "$DEB_SIGN_KEYID" ]; then - AUTO_DEBSIGN=${AUTO_DEBSIGN:-no} -fi - -#-- choose dependency solver -#-- apt is better if target distribution contains apt >= 1.4~beta3 -#-- aptitude is better if target distribution contains apt < 1.4~beta3 -case "$DISTRIBUTION" in - sid|bookwork|bullseye|buster|stretch|\ - ceres|daedalus|chimaera|beowulf|ascii|\ - raspbian-bookworm|raspbian-bullseye|raspbian-buster|raspbian-stretch|\ - kinetic|jammy|impish|hirsute|focal|bionic) - PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt" - ;; - - xenial) - PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-aptitude" - ;; -esac - diff --git a/debian/_buildscripts/local/build_module.sh b/debian/_buildscripts/local/build_module.sh deleted file mode 100755 index 8a8457d87..000000000 --- a/debian/_buildscripts/local/build_module.sh +++ /dev/null @@ -1,554 +0,0 @@ -#!/bin/bash -# -# Build a single TDE module -# - -# Load common code and initialization -export SCRIPT_DIR=$(dirname $(readlink -f "$0")) -. ${SCRIPT_DIR}/internals/_build_common.sh -init_common - - -# Timer settings -_BUILDMOD_TIMER_NUM=0 -_BUILDMOD_TIME="--/--:--:--:---" -exec_time_start $_BUILDMOD_TIMER_NUM - - -# Need sudo for non-root users -SUDO_CMD="" -if [ "`whoami`" != "root" ]; then - SUDO_CMD="sudo -E" -fi - - -#---------------------------- -# Parameters: -# $1 - error code -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGreen}#### Processing module ${CLightGreen}\"$MOD_NAME\"${CGreen} succeeded ####${CNone}" - if [ "$bool_LOG_RESULT" = "y" ]; then - echo "[ OK ] [$_BUILDMOD_TIME] \"$MOD_NAME\"" >>"$LOG_BUILD_RESULT_FILENAME" - fi - else - echo -e "${CRed}#### Processing module ${CLightRed}\"$MOD_NAME\"${CRed} failed ($1) ####${CNone}" - if [ "$bool_LOG_RESULT" = "y" ]; then - echo "[FAILED] [$_BUILDMOD_TIME] \"$MOD_NAME\"" >>"$LOG_BUILD_RESULT_FILENAME" - fi - fi - exit $1 -} - - -#---------------------------- -# Parameters: -# $1 - folder name -function recreate_folder() -{ - if [ -d "$1" ]; then - $SUDO_CMD rm -R "$1" - fi - mkdir -p "$1" -} - - -#---------------------------- -# Look for a module in the git repository or in the extra dependency folder. -# Set the module name and paths if found. -# Parameters: -# $1 - module name -function search_module() -{ - OLDIFS=$IFS - IFS="*" - local LOC_MOD_NAME=$1 - local LOC_MATCH - - MODULE_FOUND="n" - - # Search in GIT repository - LOC_MATCH=`sed -n "s|^\[submodule \"main/\([^\"]*\)\"\]$|\1|p" <"$REPO_TDE/.gitmodules" | grep "$LOC_MOD_NAME$"` - if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then - # Unique module - MODULE_FOUND="y" - MOD_NAME=$LOC_MATCH - if [ "${bool_BUILD_FROM_PATH}" = "y" ]; then - MOD_GIT_PATH="$MOD_PATH" - else - MOD_GIT_PATH="$REPO_TDE_MAIN/$MOD_NAME" - fi - MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian" - MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME" - else - # Search for a unique folder with the same name - if [ -d "${REPO_TDE_MAIN}/$LOC_MOD_NAME" ]; then - # Folder found - MODULE_FOUND="y" - MOD_NAME=$LOC_MOD_NAME - MOD_GIT_PATH="$REPO_TDE_MAIN/$MOD_NAME" - MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian" - MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME" - else - # Search in extra dependency folder - LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"` - LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME\$"` - if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then - # Unique module found - MODULE_FOUND="y" - bool_EXTRADEP_MOD="y" - MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH" - MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME" - MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME" - else - # Search in metapackages folder - LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^(metapackages/)?||"` - LOC_MATCH=`ls "$REPO_TDE_MAIN/metapackages" | grep "^$LOC_BASENAME\$"` - if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then - # Unique module found - MODULE_FOUND="y" - MOD_NAME="metapackages/$LOC_MATCH" - MOD_GIT_PATH="$REPO_TDE_MAIN/metapackages/$LOC_BASENAME" - MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian" - MOD_BUILD_PATH="$TDE_BUILD_DIR/metapackages/$LOC_BASENAME" - fi - fi - fi - fi - MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian" - IFS=$OLDIFS -} - - -#---------------------------- -# Check command line arguments and set options -#---------------------------- -MOD_NAME="" # the name of the specified module -bool_BUILD_FROM_GIT="n" -bool_BUILD_FROM_PATH="n" -bool_BUILD_LOCALLY="n" -bool_EXTRADEP_MOD="n" -bool_SHOW_BUILD_LOGS="n" -bool_LOG_RESULT="n" -bool_SHELL_HOOK="n" -bool_PREPARE_ONLY="n" -bool_DEBUG_MODE="n" -bool_INVALID_PARAMETERS="n" -while [ $# -gt 0 ]; do - case "$1" in - -d) # build with Debug symbols (used in hook scripts) - bool_DEBUG_MODE="y" - ;; - -g) # select code to build from Git repo (-g) or from local build copy - bool_BUILD_FROM_GIT="y" - ;; - -l) # build module Locally instead of in a clean chroot environment - bool_BUILD_LOCALLY="y" - ;; - -lr) # Log build Result to file - bool_LOG_RESULT="y" - ;; - -p) # build from specific Path - if [ -z "$MOD_NAME" ]; then - shift - MOD_NAME="$1" - bool_BUILD_FROM_PATH="y" - else - bool_INVALID_PARAMETERS="y" - fi - ;; - -po) # Prepare build folder Only but do not build - bool_PREPARE_ONLY="y" - ;; - -sh) # install Shell Hook for failing builds (only valid if NOT building locally) - bool_SHELL_HOOK="y" - ;; - -sl) # output the building logs to terminal (ShowLog) - bool_SHOW_BUILD_LOGS="y" - ;; - *) # module to be built - if [ -z "$MOD_NAME" ]; then - MOD_NAME="$1" - else - bool_INVALID_PARAMETERS="y" - fi - esac - - shift -done -if [ "${bool_BUILD_FROM_GIT}" = "y" -a "${bool_BUILD_FROM_PATH}" = "y" ]; then - bool_INVALID_PARAMETERS="y" -fi -if [ "$bool_INVALID_PARAMETERS" != "n" ]; then - echo "Invalid arguments." - MOD_NAME="N/A" - do_exit 1 -fi - -# If building from a given path, look up the module name -if [ "${bool_BUILD_FROM_PATH}" = "y" ]; then - if [ -d "${MOD_NAME}" ]; then - cd "${MOD_NAME}" - MOD_PATH=`pwd` - if [ "${USE_GIT_WORKTREES}" = "y" ]; then - MOD_NAME=`git rev-parse --git-dir 2>/dev/null | sed "s|.*/\([^\/]\+\)\.git.*|\1|"` - else - MOD_NAME=`basename "${MOD_PATH}"` - fi -echo "${MOD_NAME}" - if [ "${MOD_NAME}" != "" -a "${MOD_NAME}" != "tde" -a "${MOD_NAME}" != ".git" ]; then - # Valid git module - if [[ "${MOD_PATH}" =~ ${TDE_BUILD_DIR} ]]; then - # Module from build folder - bool_BUILD_FROM_GIT="n" - else - # Module from git repo - bool_BUILD_FROM_GIT="y" - fi - else - MOD_NAME="" - fi - else - MOD_NAME="" - fi -fi - -echo -e "${CLightCyan}#### Processing module \"$MOD_NAME\" ####${CNone}" - -if [ "$MOD_NAME" = "" ]; then - echo "Please specify the module to build" - do_exit 3 -fi - -# Shell hooks are only valid if not building locally -if [ "bool_BUILD_LOCALLY" = "y" ]; then - bool_SHELL_HOOK="n" -fi -export bool_SHELL_HOOK - -# Local option variables -# - sign packages -OPT_SIGN_PKG_LOCAL="--no-sign" -# - show logs -OPT_SHOW_LOGS="&>" -if [ "$bool_SHOW_BUILD_LOGS" = "y" ]; then - OPT_SHOW_LOGS=" | tee " -fi -export OPT_SHOW_LOGS - -# This folders must exists -BASE_DIRS=("REPO_DIR" "BUILD_DIR" "SCRIPT_DIR" "REPO_TDE_MAIN" "REPO_TDE_PACKAGING" "HOOK_DIR") -if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - BASE_DIRS+=("REPO_EXTRA_DEPENDENCIES") -fi -for var_name in ${BASE_DIRS[@]}; do - if [ ! -d "${!var_name}" ]; then - echo -e "${CYellow}$var_name${CNone} folder missing (${CLightPurple}${!var_name}${CNone}). Check your config or create it." - do_exit 4 - fi -done - - -#---------------------------- -# Build output directories -#---------------------------- -BUILD_DIRS=("TDE_BUILD_DIR" "TDE_DEBS_DIR") - -for var_name in ${BUILD_DIRS[@]}; do - if [ ! -d "${!var_name}" ]; then - mkdir "${!var_name}" - fi -done - - -#---------------------------- -# Check for module existance -#---------------------------- -# Check if module is an extra dependency -if [[ $MOD_NAME =~ ^$CFG_EXTRA_DEPS_DIR/ ]]; then - bool_EXTRADEP_MOD="y" -fi - -# Make sure the module exists -search_module $MOD_NAME -if [ "$MODULE_FOUND" != "y" ]; then - echo "Module \"$MOD_NAME\" not found" - do_exit 5 -fi - -if [ "$bool_BUILD_FROM_GIT" = "y" ]; then - echo -e "${CYellow}> Building from GIT repo${CNone}" - - bool_COPY_MOD_SRC="y" - bool_COPY_PKGING_FILES="y" - - # packaging scripts - if [ "$bool_EXTRADEP_MOD" != "y" -a ! -d "$MOD_GIT_PKGING_PATH" ]; then - echo "Packaging for \"$MOD_NAME\" not found in GIT" - do_exit 6 - fi -else - echo -e "${CYellow}> Building from BUILD folder${CNone}" - - if [ ! -d "$MOD_BUILD_PATH" ]; then - echo "Build folder for \"$MOD_NAME\" not found" - do_exit 7 - fi - bool_COPY_MOD_SRC="n" - bool_COPY_PKGING_FILES="n" -fi - - -#---------------------------- -# Prepare source files -#---------------------------- -# remove output from previous build -if [ -d "$MOD_BUILD_PATH" ]; then - cd "$MOD_BUILD_PATH/.." - $SUDO_CMD rm *.deb *.dsc *.changes *.tar.bz2 *.tar.gz *.tar.xz *.log *.buildinfo &>/dev/null -fi - -# calculate package version, if needed -if [ "$bool_EXTRADEP_MOD" != "y" ]; then - cd $MOD_GIT_PATH - branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` - if [[ -z "$branch" ]]; then - branch=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-` - fi - target_tag=`git tag | grep -F "$TDE_RELEASE" | head -n1` - tag=`git tag | \ - sed "s|^\([^0-9]\)|\1.|" | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr -k 5,5nr | sed "s|^\([^0-9]\)\.|\1|" | \ - while read t; do \ - git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \ - echo "$t..HEAD" && break; done` - count=`git log $tag --pretty=oneline | wc -l` - pkgver=$TDE_RELEASE - if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then - pkgver=$pkgver~pre$count+$(git rev-parse HEAD | cut -c 1-8) - fi - MOD_BRANCH=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` - if [[ -z "$MOD_BRANCH" ]]; then - MOD_BRANCH=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-` - fi - COMMIT_HASH=`git rev-parse HEAD` -fi - -# copy main repo source files, if needed -if [ "$bool_COPY_MOD_SRC" = "y" ]; then - bool_COPY_PKGING_FILES="y" - recreate_folder "$MOD_BUILD_PATH" - if [ "$bool_EXTRADEP_MOD" != "y" ]; then - # Normal module - cp -R "$MOD_GIT_PATH/." "$MOD_BUILD_PATH" - # Add GIT information - echo "# TDE SCM module information" > "$MOD_BUILD_PATH/.tdescminfo" - echo "Name: $MOD_NAME" >> "$MOD_BUILD_PATH/.tdescminfo" - echo "Version: R$pkgver" >> "$MOD_BUILD_PATH/.tdescminfo" - echo "Revision: $MOD_BRANCH-$COMMIT_HASH" >> "$MOD_BUILD_PATH/.tdescminfo" - git log -1 --pretty=format:"DateTime: %cd%n" --date=format:"%m/%d/%Y %H:%M" >> "$MOD_BUILD_PATH/.tdescminfo" - else - # Extra dependency module: copy and apply patches - # -- move to the correct folder - cd "$MOD_GIT_PATH" - if [ `ls -d */ | wc -l` == 1 ]; then - cd `ls -d */` - cp -R "." "$MOD_BUILD_PATH" - cd $MOD_BUILD_PATH - QUILT_PATCHES="debian/patches" quilt push -a >/dev/null - # Make sure patches are not reapplied in future local builds. This could stop pdebuild from working. - if [ -f "$MOD_BUILD_PATH/debian/patches/series" ]; then - cp /dev/null "$MOD_BUILD_PATH/debian/patches/series" - fi - else - echo "There must be one and only one module folder in \"$MOD_GIT_PATH\"" - do_exit 9 - fi - fi -fi - -# copying packaging scripts, if needed -if [ "$bool_EXTRADEP_MOD" != "y" -a "$bool_COPY_PKGING_FILES" = "y" ]; then - if [ -d "$MOD_BUILD_PKGING_PATH" ]; then - $SUDO_CMD rm -R $MOD_BUILD_PKGING_PATH - fi - cp -R "$MOD_GIT_PKGING_PATH" "$MOD_BUILD_PKGING_PATH" - - # Default package name - package=$(basename $PWD)-trinity-$pkgver - REL=4:$TDE_RELEASE${package#*$TDE_RELEASE} - REL=${REL%+*} - REL=${REL/4:14.0.0/4:14.0.0-s} - # Get package name and packaging release - PKG_NAME=$(head -n1 $MOD_BUILD_PKGING_PATH/changelog) - PKG_NAME=${PKG_NAME%% *} - PKG_TAG=$(cd "$REPO_TDE_PACKAGING/$MOD_NAME" && - git tag | \ - sed "s|^\([^0-9]\)|\1.|" | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr -k 5,5nr | sed "s|^\([^0-9]\)\.|\1|" | \ - while read t; do \ - git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \ - echo "$t..HEAD" && break; done) - PKG_REL=$(cd "$REPO_TDE_PACKAGING/$MOD_NAME" && - git log $PKG_TAG --pretty=oneline . | wc -l) - if [ -n "$REL_SUFFIX" ]; then - PKG_REL="${PKG_REL}${REL_SUFFIX}" - fi - # TODO add relative patch count - ADD_REL=0 - - # Update changelog - REPO_DATE=`git log -1 --pretty=format:"%cd%n" --date=rfc` - GITUSER="$(git config --get user.name) <$(git config --get user.email)>" - echo "$PKG_NAME ($REL-0$DISTRO$DISTRO_VERSION.$ADD_REL+$PKG_REL) $DISTRO_NAME; urgency=low" > "$MOD_BUILD_PKGING_PATH/changelog" - echo -e "\n * Automated git build\n\n -- $GITUSER $REPO_DATE\n" >> "$MOD_BUILD_PKGING_PATH/changelog" - cat "$REPO_TDE_PACKAGING/$MOD_NAME/debian/changelog" >> "$MOD_BUILD_PKGING_PATH/changelog" - touch -d "$REPO_DATE" "$MOD_BUILD_PKGING_PATH/changelog" -fi - -# prepare destination directory for building -export MOD_DEB_PATH="$TDE_DEBS_DIR/$MOD_NAME" -MOD_DEBSRC_PATH="$MOD_DEB_PATH/src" -recreate_folder "$MOD_DEB_PATH" -recreate_folder "$MOD_DEBSRC_PATH" - - -#---------------------------- -# Apply pre-build hooks if present -#---------------------------- -if [ -x "$HOOK_DIR/$MOD_NAME/pre_build.sh" ]; then - echo -e "${CYellow}> Applying pre-build hook${CNone}" - . "$HOOK_DIR/$MOD_NAME/pre_build.sh" - if [ $? -eq 0 ]; then - echo -e "> ${CBrown}Pre-build hook applied successfully${CNone}" - else - echo -e "> ${CLightBlue}Pre-build hook failed${CNone}" - fi -fi - - -#---------------------------- -# Switch to 3.0(quilt) format -#---------------------------- -# create orig tarball -cd "$MOD_BUILD_PATH" - -MOD_BASENAME=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^([^ ]+).*/\1/"` -MOD_MAJOR_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \(([^:]+:)?.*/\1/"` -MOD_UP_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \(([^:]+:)?(.*+)-.*/\2/"` -MOD_DEB_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \(.*+-([^\)]+).*/\1/"` - -REPO_DATE=`dpkg-parsechangelog -l "$MOD_BUILD_PKGING_PATH/changelog" | sed -n -e 's|^Date: ||p'` -tar cJf "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz" --exclude="debian" --exclude .git --exclude .gitmodules \ - --mtime "$REPO_DATE" --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime . -touch -d "$REPO_DATE" "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz" - -# switch to quilt format -if [ -f "$MOD_BUILD_PKGING_PATH/source/format" ]; then - grep -q "(native)" "$MOD_BUILD_PKGING_PATH/source/format" && \ - sed -i "s/(native)/(quilt)/" "$MOD_BUILD_PKGING_PATH/source/format" -else - [ -d "$MOD_BUILD_PKGING_PATH/source" ] || mkdir -p "$MOD_BUILD_PKGING_PATH/source" - echo "3.0 (quilt)" >"$MOD_BUILD_PKGING_PATH/source/format" -fi - -# remove quilt references from rules file -grep -q "^include.*/usr/share/cdbs/1/rules/patchsys-quilt\.mk" "$MOD_BUILD_PKGING_PATH/rules" && \ -sed -i "s/^\(include.*\/usr\/share\/cdbs\/1\/rules\/patchsys-quilt\.mk\)/#\1/" "$MOD_BUILD_PKGING_PATH/rules" - -#---------------------------- -# Enable debug mode if required -#---------------------------- -if [ "$bool_DEBUG_MODE" = "y" ]; then - echo -e "${CBrown}Enable debug mode${CNone}" - sed -i "s/RelWithDebInfo/Debug/" "$MOD_BUILD_PKGING_PATH/rules" -fi - - -#---------------------------- -# Exit if only preparation was required -#---------------------------- -if [ "$bool_PREPARE_ONLY" = "y" ]; then - echo -e "${CBrown}Source code prepared for building${CNone}" - do_exit 0 -fi - - -#---------------------------- -# Build -#---------------------------- -export BUILDING_LOG_FILE="$MOD_DEBSRC_PATH/__build__.log" -cd "$MOD_BUILD_PATH" - -if [ "$bool_BUILD_LOCALLY" = "y" ]; then - ## Build module locally - echo -e "${CYellow}> Building locally${CNone}" - eval dpkg-buildpackage -S $OPT_SIGN_PKG_LOCAL $OPT_SHOW_LOGS\"$BUILDING_LOG_FILE\" - build_retval=$? - if [ $build_retval -eq 0 ]; then - eval dpkg-buildpackage -b $OPT_SIGN_PKG_LOCAL $OPT_SHOW_LOGS\"$BUILDING_LOG_FILE\" - build_retval=$? - fi -else - ## Build module in a clean chroot environment using pbuilder - $SUDO_CMD . "$SCRIPT_DIR/internals/_pbuilder.sh" - build_retval=$? - if [ "`whoami`" != "root" ]; then - cd "$MOD_DEB_PATH" - $SUDO_CMD chown -R `id -u -n`:`id -g -n` . &>/dev/null - cd "$MOD_BUILD_PATH/.." - $SUDO_CMD chown `id -u -n`:`id -g -n` *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo &>/dev/null - $SUDO_CMD chown `id -u -n`:`id -g -n` "$TDE_DEBS_DIR/Packages" &>/dev/null - cd "$MOD_BUILD_PATH" - fi -fi - -if [ $build_retval -eq 0 ]; then - echo -e "${CLightGreen}> Building completed SUCCESSFULLY${CNone}" -else - echo -e "${CLightRed}> Building completed WITH ERRORS${CNone}" -fi - - -#---------------------------- -# Apply post-build hooks if present -#---------------------------- -if [ -x "$HOOK_DIR/$MOD_NAME/post_build.sh" ]; then - echo -e "${CYellow}> Applying post-build hook${CNone}" - . "$HOOK_DIR/$MOD_NAME/post_build.sh" - if [ $? -eq 0 ]; then - echo -e "${CBrown}Post-build hook applied successfully${CNone}" - else - echo -e "${CLightBlue}Post-build hook failed${CNone}" - fi -fi - -#---------------------------- -# Move compiled module files to destination folders -#---------------------------- -if [ "$bool_BUILD_LOCALLY" = "y" ]; then - cd "$MOD_BUILD_PATH/.." - mv *.deb "$MOD_DEB_PATH" &>/dev/null - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null -else - cd "$MOD_DEB_PATH" - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null - cd "$MOD_BUILD_PATH/.." - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null -fi - - -#---------------------------- -# Removing leftover files -#---------------------------- -cd "$MOD_BUILD_PATH/.." -rm *.deb *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.log *.buildinfo &>/dev/null -cd "$MOD_DEB_PATH" -rm *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.log *.buildinfo &>/dev/null - - -#---------------------------- -# Building completed -#---------------------------- -exec_time_stop $_BUILDMOD_TIMER_NUM "_BUILDMOD_TIME" -do_exit $build_retval diff --git a/debian/_buildscripts/local/create_repo.sh b/debian/_buildscripts/local/create_repo.sh deleted file mode 100755 index 222cb7740..000000000 --- a/debian/_buildscripts/local/create_repo.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Create/update TDE local debian repository -# - -# Load common code and initialization -export SCRIPT_DIR=$(dirname $(readlink -f "$0")) -. ${SCRIPT_DIR}/internals/_build_common.sh -init_common - -#---------------------------- -# Check command line arguments -parm_MAKE_BACKUP="n" -for arg in $@; do - if [ "$arg" = "-b" ]; then # backup old repository - parm_MAKE_BACKUP="y" - fi -done - - -#---------------------------- -# Create/update TDE local debian repository -echo -e "${CLightCyan}#### TDE local repository creation begin ####${CNone}" -ARCH_PATH="dists/$DISTRO_NAME/main/binary-$ARCHITECTURE" -REPO_DIR="$TDE_DIR/$CFG_REPO_DIR" -REPO_DIR_BACKUP="$REPO_DIR.backup" -REPO_PKG_DIR="$REPO_DIR/$ARCH_PATH" - -# Backup -if [ "$parm_MAKE_BACKUP" = "y" ] && [ -d "$REPO_DIR" ]; then - echo -e "${CYellow}> Backing up old repository${CNone}" - rm -R "$REPO_DIR_BACKUP" &>/dev/null - mv "$REPO_DIR" "$REPO_DIR_BACKUP" &>/dev/null - echo "Copy of the old repository available at \"$REPO_DIR_BACKUP\"" -fi - -# Create repository -echo -e "${CYellow}> Creating new repository${CNone}" -if [ -d "$REPO_DIR" ]; then - rm -R "$REPO_DIR" &>/dev/null -fi -mkdir -p "$REPO_PKG_DIR" -rsync -aHS --exclude="*/src/*.xz" --exclude="*/src/*.dsc" --exclude="*/src/*.changes" --exclude="*/src/*.buildinfo" --exclude="Packages*" "$TDE_DEBS_DIR/" "$REPO_PKG_DIR/" - -# Create package index file -echo -e "${CYellow}> Creating package index file${CNone}" -cd "$REPO_DIR" -dpkg-scanpackages "./$ARCH_PATH" | gzip -9c > "./$ARCH_PATH/Packages.gz" - - -#---------------------------- -# Repository created -echo -e "${CLightGreen}#### TDE local repository created ####${CNone}" -cd "$SCRIPT_DIR" -exit 0 diff --git a/debian/_buildscripts/local/hook_examples/applications/kaffeine/kaffeine-wizard.diff b/debian/_buildscripts/local/hook_examples/applications/kaffeine/kaffeine-wizard.diff deleted file mode 100644 index c35ba6516..000000000 --- a/debian/_buildscripts/local/hook_examples/applications/kaffeine/kaffeine-wizard.diff +++ /dev/null @@ -1,65 +0,0 @@ -diff -urN kaffeine/kaffeine/src/kaffeine.cpp kaffeine.new/kaffeine/src/kaffeine.cpp ---- kaffeine/kaffeine/src/kaffeine.cpp 2013-03-02 15:47:14.000000000 -0600 -+++ kaffeine.new/kaffeine/src/kaffeine.cpp 2013-11-24 11:39:09.809430631 -0600 -@@ -683,7 +683,9 @@ - m_autoResizeTriple = new TDEToggleAction(i18n("Triple Size"), 0, ALT|Key_3, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeTriple()), actionCollection(), "view_auto_resize_triple"); - - m_playersMenu = new TDEActionMenu(i18n("&Player Engine"), actionCollection(), "options_player"); -- KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); -+ m_instWizard = new TDEAction(i18n("Installation &Wizard"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstWizard()), actionCollection(), "inst_wizard"); -+ -+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection(), "options_preferences"); - -@@ -1619,6 +1621,18 @@ - mute(); - } - -+void Kaffeine::slotInstWizard() -+{ -+ TQString stamp = locateLocal("appdata", "wizard_stamp_v0.7.1"); -+ InstWizard::showWizard(); -+ -+ TDEProcess process; -+ process << "touch" << stamp; -+ process.start(TDEProcess::Block, TDEProcess::Stderr); -+ process.clearArguments(); -+} -+ -+ - /********* DCOP INTERFACE *********/ - - void Kaffeine::openURL(TQString url) -diff -urN kaffeine/kaffeine/src/kaffeine.h kaffeine.new/kaffeine/src/kaffeine.h ---- kaffeine/kaffeine/src/kaffeine.h 2013-03-02 15:47:14.000000000 -0600 -+++ kaffeine.new/kaffeine/src/kaffeine.h 2013-11-24 11:09:17.455756279 -0600 -@@ -193,6 +193,7 @@ - void slotDvbClient(bool,const TQString&,int,int,const TQString&); - void slotNumKeyInput( int ); - void slotDVBNextBack( int ); -+ void slotInstWizard(); - - private: - void autoresize(); -@@ -258,7 +259,8 @@ - TDEToggleAction* m_autoResizeTriple; - TDEToggleAction* m_originalAspect; - TDEToggleAction* m_toggleLayout; -- TDEActionMenu* m_playersMenu; -+ TDEActionMenu* m_playersMenu; -+ TDEAction* m_instWizard; - TDEToggleAction* m_sleepAfterPlay; - TDEToggleAction* m_quitAfterPlay; - TDEToggleAction* m_quitAfterPlaylist; -diff -urN kaffeine/kaffeine/src/kaffeineui.rc kaffeine.new/kaffeine/src/kaffeineui.rc ---- kaffeine/kaffeine/src/kaffeineui.rc 2012-09-14 17:39:52.000000000 -0500 -+++ kaffeine.new/kaffeine/src/kaffeineui.rc 2013-11-24 11:10:15.335565312 -0600 -@@ -34,6 +34,7 @@ - - &Settings - -+ - - - diff --git a/debian/_buildscripts/local/hook_examples/applications/kaffeine/pre_build.sh b/debian/_buildscripts/local/hook_examples/applications/kaffeine/pre_build.sh deleted file mode 100755 index 96400d6e9..000000000 --- a/debian/_buildscripts/local/hook_examples/applications/kaffeine/pre_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying Kaffeine wizard patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/kaffeine-wizard.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff b/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff deleted file mode 100644 index 16ac7c7dc..000000000 --- a/debian/_buildscripts/local/hook_examples/tdebase/018_kate_save_all.diff +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nur ori/tdebase/kate/app/katedocmanager.cpp new/tdebase/kate/app/katedocmanager.cpp ---- ori/tdebase/kate/app/katedocmanager.cpp 2013-07-27 02:36:57.000000000 +0900 -+++ new/tdebase/kate/app/katedocmanager.cpp 2013-12-05 15:56:20.311928016 +0900 -@@ -381,7 +381,6 @@ - return modified; - } - -- - bool KateDocManager::queryCloseDocuments(KateMainWindow *w) - { - uint docCount = m_docList.count(); -@@ -436,12 +435,22 @@ - return true; - } - -- - void KateDocManager::saveAll() - { - for (TQPtrListIterator it(m_docList); it.current(); ++it) -- if ( it.current()->isModified() && it.current()->views().count() ) -- ((Kate::View*)it.current()->views().first())->save(); -+ { -+ if (it.current()->views().count()) -+ { -+ if (it.current()->url().isEmpty()) -+ { -+ ((Kate::View*)it.current()->views().first())->saveAs(); -+ } -+ else if (it.current()->isModified()) -+ { -+ ((Kate::View*)it.current()->views().first())->save(); -+ } -+ } -+ } - } - - void KateDocManager::saveDocumentList (TDEConfig* config) diff --git a/debian/_buildscripts/local/hook_examples/tdebase/pre_build.sh b/debian/_buildscripts/local/hook_examples/tdebase/pre_build.sh deleted file mode 100755 index e764c29ad..000000000 --- a/debian/_buildscripts/local/hook_examples/tdebase/pre_build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying Kate save all patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/018_kate_save_all.diff" - - echo -e "${CLightPurple}Applying SAK patch${CNone}" - patch -p1 < "$HOOK_DIR/$PKG_NAME/tdebase-usesak.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/hook_examples/tdebase/tdebase-usesak.diff b/debian/_buildscripts/local/hook_examples/tdebase/tdebase-usesak.diff deleted file mode 100644 index e85ca1047..000000000 --- a/debian/_buildscripts/local/hook_examples/tdebase/tdebase-usesak.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff -urNa tdebase/tdm/config.def tdebase.new/tdm/config.def ---- tdebase/tdm/config.def 2013-09-12 11:51:29.000000000 -0500 -+++ tdebase.new/tdm/config.def 2014-02-10 06:29:38.537806886 -0600 -@@ -2010,9 +2010,9 @@ - - Key: UseSAK - Type: bool --Default: true -+Default: false - User: greeter --Instance: #*/! -+Instance: #:*/false - Comment: - SAK - Description: diff --git a/debian/_buildscripts/local/hook_examples/tdelibs/038_placeholder.diff b/debian/_buildscripts/local/hook_examples/tdelibs/038_placeholder.diff deleted file mode 100644 index 65d64cc72..000000000 --- a/debian/_buildscripts/local/hook_examples/tdelibs/038_placeholder.diff +++ /dev/null @@ -1,64 +0,0 @@ -diff -Nur ori/tdelibs/tdeutils/kfinddialog.cpp new/tdelibs/tdeutils/kfinddialog.cpp ---- ori/tdelibs/tdeutils/kfinddialog.cpp 2014-02-05 16:54:13.852605699 +0900 -+++ new/tdelibs/tdeutils/kfinddialog.cpp 2014-02-11 18:16:55.292214876 +0900 -@@ -149,8 +149,9 @@ - m_replace->setMaxCount(10); - m_replace->setDuplicatesEnabled(false); - m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_replaceGrp); -+ m_backRef->setEnabled(m_regExp->isChecked()); - m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_replaceGrp); -- m_backRefItem->setEnabled(false); -+ m_backRefItem->setEnabled(m_regExp->isChecked() && m_backRef->isChecked()); - - m_replaceLayout->addWidget(m_replaceLabel, 0, 0); - m_replaceLayout->addMultiCellWidget(m_replace, 1, 1, 0, 1); -@@ -193,8 +194,8 @@ - - // signals and slots connections - connect(m_selectedText, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectedTextToggled(bool))); -- connect(m_regExp, TQT_SIGNAL(toggled(bool)), m_regExpItem, TQT_SLOT(setEnabled(bool))); -- connect(m_backRef, TQT_SIGNAL(toggled(bool)), m_backRefItem, TQT_SLOT(setEnabled(bool))); -+ connect(m_regExp, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotRegexCheckBoxToggled(bool))); -+ connect(m_backRef, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPlaceholdersCheckBoxToggled(bool))); - connect(m_regExpItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPatterns())); - connect(m_backRefItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPlaceholders())); - -@@ -276,11 +277,23 @@ - "Ask before replacing each match found.") ); - } - --void KFindDialog::textSearchChanged( const TQString & text) -+void KFindDialog::textSearchChanged(const TQString & text) - { - enableButtonOK( !text.isEmpty() ); - } - -+void KFindDialog::slotRegexCheckBoxToggled(bool checked) -+{ -+ m_regExpItem->setEnabled(checked); -+ m_backRef->setEnabled(checked); -+ m_backRefItem->setEnabled(checked && m_backRef->isChecked()); -+} -+ -+void KFindDialog::slotPlaceholdersCheckBoxToggled(bool checked) -+{ -+ m_backRefItem->setEnabled(checked && m_regExp->isChecked()); -+} -+ - void KFindDialog::showEvent( TQShowEvent *e ) - { - if ( !d->m_initialShowDone ) -diff -Nur ori/tdelibs/tdeutils/kfinddialog.h new/tdelibs/tdeutils/kfinddialog.h ---- ori/tdelibs/tdeutils/kfinddialog.h 2014-02-05 16:54:13.852605699 +0900 -+++ new/tdelibs/tdeutils/kfinddialog.h 2014-02-11 18:16:57.876214916 +0900 -@@ -250,7 +250,9 @@ - void slotSelectedTextToggled(bool); - void showPatterns(); - void showPlaceholders(); -- void textSearchChanged( const TQString &); -+ void textSearchChanged(const TQString &); -+ void slotRegexCheckBoxToggled(bool checked); -+ void slotPlaceholdersCheckBoxToggled(bool checked); - - protected: - virtual void showEvent ( TQShowEvent * ); diff --git a/debian/_buildscripts/local/hook_examples/tdelibs/pre_build.sh b/debian/_buildscripts/local/hook_examples/tdelibs/pre_build.sh deleted file mode 100755 index 35bfc3c1b..000000000 --- a/debian/_buildscripts/local/hook_examples/tdelibs/pre_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying kfinddialog placeholder patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/038_placeholder.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/internals/C10shell b/debian/_buildscripts/local/internals/C10shell deleted file mode 100755 index 01f5590f6..000000000 --- a/debian/_buildscripts/local/internals/C10shell +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Color table -CPurple='\e[0;35m' -CWhite='\e[1;37m' -CNone='\e[0m' - -# Invoke shell if build fails. -apt-get install -y --force-yes vim less bash mc ack -cd /tmp/buildd/*/debian/.. -echo "${CPurple}---------------------------------------------------------${CNone}" >/dev/tty -echo "${CPurple} !!! Build FAILED !!! ${CNone}" >/dev/tty -echo "${CPurple} You are now inside a shell in the building environment. ${CNone}" >/dev/tty -echo "${CWhite} mc, vim, less, ack${CPurple} are available for your convenience. ${CNone}" >/dev/tty -echo "${CPurple} Type ${CWhite}exit${CPurple} to leave the shell when you are done. ${CNone}" >/dev/tty -echo "${CPurple}---------------------------------------------------------${CNone}" >/dev/tty -/bin/bash /dev/tty 2>/dev/tty - diff --git a/debian/_buildscripts/local/internals/_build_common.sh b/debian/_buildscripts/local/internals/_build_common.sh deleted file mode 100755 index 0a17cb700..000000000 --- a/debian/_buildscripts/local/internals/_build_common.sh +++ /dev/null @@ -1,270 +0,0 @@ -#!/bin/bash - -set -a - -#---------------------------- -# Color table -# Black 0;30 Dark Gray 1;30 -# Blue 0;34 Light Blue 1;34 -# Green 0;32 Light Green 1;32 -# Cyan 0;36 Light Cyan 1;36 -# Red 0;31 Light Red 1;31 -# Purple 0;35 Light Purple 1;35 -# Brown 0;33 Yellow 1;33 -# Light Gray 0;37 White 1;37 -# No Color 0 -#---------------------------- -CBlack='\e[0;30m' -CDarkGray='\e[1;30m' -CBlue='\e[0;34m' -CLightBlue='\e[1;34m' -CGreen='\e[0;32m' -CLightGreen='\e[1;32m' -CCyan='\e[0;36m' -CLightCyan='\e[1;36m' -CRed='\e[0;31m' -CLightRed='\e[1;31m' -CPurple='\e[0;35m' -CLightPurple='\e[1;35m' -CBrown='\e[0;33m' -CYellow='\e[1;33m' -CGray='\e[0;37m' -CWhite='\e[1;37m' -CNone='\e[0m' - -set +a - -#---------------------------- -# Echo a colored string to tty and tee-append it to a file without color codes -# Parameters: -# $1 - string to echo -# $2 - log filename -# $3 - if "y" create a new file. -function echo_and_tee() -{ - if [ "$3" = "y" ]; then - echo -e "$1" | tee /dev/tty | sed -r "s|\x1b\[[0-9]+(;[0-9]+)?m||g" >"$2" - else - echo -e "$1" | tee /dev/tty | sed -r "s|\x1b\[[0-9]+(;[0-9]+)?m||g" >>"$2" - fi -} - -#---------------------------- -function _set_path_variables() -{ - # Set useful path variables - set -a - - #-- get desired distribution and architecture - [[ "$DISTRO" = "" ]] && DISTRO=$(lsb_release -is | sed -e 's/\(.*\)/\L\1/') - [[ "$DISTRO_NAME" = "" ]] && DISTRO_NAME=$(lsb_release -cs | sed -e 's/\(.*\)/\L\1/') - [[ "$ARCHITECTURE" = "" ]] && ARCHITECTURE=$(dpkg --print-architecture) - - REPO_DIR="$TDE_DIR/$CFG_GIT_DIR" - if [ "${USE_GIT_WORKTREES}" = "y" ]; then - REPOS_DIR="$TDE_DIR/$CFG_GIT_DIR/repos" - WORKTREES_DIR="$TDE_DIR/$CFG_GIT_DIR/worktrees" - REPO_TDE="$WORKTREES_DIR/master/tde" - REPO_EXTRA_DEPENDENCIES="$WORKTREES_DIR/master/$CFG_EXTRA_DEPS_DIR" - else - REPO_TDE="$TDE_DIR/$CFG_GIT_DIR/tde" - REPO_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR" - fi - REPO_TDE_MAIN="$REPO_TDE/main" - REPO_TDE_PACKAGING="$REPO_TDE/packaging/$DISTRO/$DISTRO_NAME" - - BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR" - TDE_BUILD_DIR="$BUILD_DIR/build" - TDE_DEBS_DIR="$BUILD_DIR/debs" - - HOOK_DIR="$TDE_DIR/$CFG_GIT_DIR/$CFG_HOOKS_DIR" - - SCRIPT_LOG_DIR="$TDE_DIR/$CFG_SCRIPT_LOG_DIR" - LOG_BUILD_RESULT_FILENAME="$SCRIPT_LOG_DIR/build_result.log" # Common build logfile - LOG_UPDATE_REPO_FILENAME="$SCRIPT_LOG_DIR/update_repo.log" # Update repository logfile - - set +a -} - -#---------------------------- -function init_common() -{ - local CURR_DIR=`pwd` - - # Check script folder - export SCRIPT_DIR=$(dirname $(readlink -f "$0")) - - # Prevent the script to be run from TDE packaging repo - REPO_URL=$(git config --get remote.origin.url 2>/dev/null) - if [ ! -z "$REPO_URL" ] && [ -z "${REPO_URL##*tde/packaging}" ]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo "This script cannot be run from the TDE packaging repository." - echo "Please follow the instructions provided, then rerun this script." - exit 1 - fi - - # Read config settings - CFG_FILE=$SCRIPT_DIR/_config.sh - if [ -f "$CFG_FILE" ]; then - . "$CFG_FILE" - _set_path_variables - else - echo -e "${CLightRed} --- NOTE ---${CNone}" - echo -e "Creating TDE build configuration file from template as ${CLightPurple}$CFG_FILE${CNone}." - echo "Please check and modify as required, then rerun this script." - cp "$SCRIPT_DIR/internals/_config_template.sh" "$CFG_FILE" - exit 2 - fi - - # Make sure we have selected a supported distribution - DISTROS_FILE="$SCRIPT_DIR/internals/distro_list.txt" - if [ ! -f "$DISTROS_FILE" ]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo "Could not find the list of supported distributions." - echo -e "Please check the file ${CLightPurple}$DISTROS_FILE${CNone} exists, then rerun this script." - exit 3 - fi - # -- Need to use a "here string" otherwise if the DISTRO_FOUND value is modified - # -- inside the while loop, this would not remember after the loop. - DISTRO_FOUND="n" - OLD_IFS=$IFS && IFS=$' \t' - while read l_distro l_version l_name l_rel_suffix l_packaging_path; do - if [ "$l_distro" = "$DISTRO" -a "$l_name" = "$DISTRO_NAME" ]; then - DISTRO_FOUND="y" - l_rel_suffix=`echo "$l_rel_suffix" | perl -pe "s|^[\"-]?(.*?)[\"]?$|\1|g"` - l_packaging_path=`echo "$l_packaging_path" | perl -pe "s|^[\"-]?(.*?)[\"]?$|\1|g"` - export DISTRO_VERSION="$l_version" - export REL_SUFFIX="$l_rel_suffix" - if [[ ! -z "$l_packaging_path" ]]; then - REPO_TDE_PACKAGING="$TDE_DIR/$CFG_GIT_DIR/tde/packaging/$l_packaging_path" - fi - break - fi - done <<< $(sed -n "s|\(^[\s]*[^#\s]\+.*$\)|\1|p" < $DISTROS_FILE) - IFS=$OLD_IFS - if [ "$DISTRO_FOUND" != "y" ]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo -e "The specified distribution (${CYellow}$DISTRO $DISTRO_NAME${CNone}) is not supported." - echo -e "Something is wrong with your configuration (${CLightPurple}$CFG_FILE${CNone})" - echo -e "or with the list of supported distributions (${CLightPurple}$DISTROS_FILE${CNone})." - echo -e "Please check the ${CLightCyan}DISTRO${CNone} and ${CLightCyan}DISTRO_NAME${CNone} variables, then rerun this script." - exit 4 - fi - - # TDE root folder must exist - if [ ! -d "$TDE_DIR" ]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo "A valid TDE root folder could not be located. Something is wrong with your configuration" - echo -e "in the config file ${CLightPurple}$CFG_FILE${CNone}" - echo -e "Please check and modify the ${CLightCyan}TDE_DIR${CNone} variable as required, then rerun this script." - exit 5 - fi - - # Search for TDE repo - found=0 - tde_config_file="" - if [ "${USE_GIT_WORKTREES}" = "y" ]; then - tde_config_file="$REPOS_DIR/tde.git/config" - else - tde_config_file="${REPO_TDE}/.git/config" - fi - [ -f "${tde_config_file}" ] && [ "`grep \"\\[core\\]\" ${tde_config_file}`" = "[core]" ] && found=1 - if [[ found -ne 1 ]]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo "The main TDE repo could not be located. Something is wrong with your configuration" - echo -e "in the config file ${CLightPurple}$CFG_FILE${CNone}" - echo -e "Please check and modify the ${CLightCyan}TDE_DIR${CNone} and ${CLightCyan}USE_GIT_WORKTREES${CNone} variables as required." - echo -e "Then rerun this script." - exit 6 - fi - - # Check branch configuration - # - branch existance - UPDATE_BRANCHES="${OVERRIDE_UPDATE_BRANCHES:-$UPDATE_BRANCHES}" - if [ "${USE_GIT_WORKTREES}" = "y" ]; then - cd "$REPOS_DIR/tde.git" - else - cd "$REPO_TDE" - fi - BRANCHES=() - local REMOTE_BRANCHES=(`git branch --remote | grep -v "HEAD" | sed "s|origin/||g"`) - for br in $UPDATE_BRANCHES; do - branch=`echo "$br" | sed -e "s|^[[:space:]]*||" -e "s|[[:space:]]*$||"` - found=0 - for rem_br in "${REMOTE_BRANCHES[@]}"; do - if [[ "$rem_br" == "$branch" ]]; then - found=1 - break - fi - done - if [[ found -eq 1 ]]; then - BRANCHES+=($branch) - else - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo -e "Invalid branch specified (${CYellow}$branch${CNone}). Something is wrong with your configuration" - echo -e "in the config file ${CLightPurple}$CFG_FILE${CNone}" - echo -e "Please check and modify the ${CLightCyan}UPDATE_BRANCHES${CNone} variable as required, then rerun this script." - exit 8 - fi - done - if [ ${#BRANCHES[@]} -eq 0 ]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo -e "No valid branch was specified. Something is wrong with your configuration" - echo -e "in the config file ${CLightPurple}$CFG_FILE${CNone}" - echo -e "Please check and modify the ${CLightCyan}UPDATE_BRANCHES${CNone} variable as required, then rerun this script." - exit 9 - fi - export BRANCHES - # - default branch - DEFAULT_REPO_BRANCH=${OVERRIDE_DEFAULT_REPO_BRANCH:-"$DEFAULT_REPO_BRANCH"} - found=0 - for branch in "${BRANCHES[@]}"; do - if [[ "$DEFAULT_REPO_BRANCH" == "$branch" ]]; then - found=1 - break - fi - done - if [[ found -ne 1 ]]; then - echo -e "${CLightRed} --- ERROR ---${CNone}" - echo -e "Invalid default repo branch specified (${CYellow}$DEFAULT_REPO_BRANCH${CNone}). Something is wrong with your configuration" - echo -e "in the config file ${CLightPurple}$CFG_FILE${CNone}" - echo -e "Please check and modify the ${CLightCyan}DEFAULT_REPO_BRANCH${CNone} variable as required, then rerun this script." - exit 10 - fi - - cd "${CURR_DIR}" -} - - -#---------------------------- -# Save execution start time -# Parameters: -# $1 - timer number -function exec_time_start() -{ - _ET_start_var="_ET_start_$1" - eval "$_ET_start_var=`date +%s.%N`" -} - - -#---------------------------- -# Save execution stop time and set $2 to the execution time -# in the format: dd/hh:mm:ss.mmm -# Parameters: -# $1 - timer number -# $2 - result variable name -function exec_time_stop() -{ - _ET_start_var="_ET_start_$1" - _ET_stop_var="_ET_stop_$1" - eval "$_ET_stop_var=`date +%s.%N`" - _ET_diff=`echo "${!_ET_stop_var} - ${!_ET_start_var}" | bc` - _ET_days=`echo "$_ET_diff/86400" | bc` - _ET_diff_day=`echo "$_ET_diff-86400*$_ET_days" | bc` - _ET_hours=`echo "$_ET_diff_day/3600" | bc` - _ET_diff_hour=`echo "$_ET_diff_day-3600*$_ET_hours" | bc` - _ET_mins=`echo "$_ET_diff_hour/60" | bc` - _ET_secs=`echo "$_ET_diff_hour-60*$_ET_mins" | bc` - local _resultvar=$2 - eval "$_resultvar=`printf \"%02d/%02d:%02d:%06.3f\" $_ET_days $_ET_hours $_ET_mins $_ET_secs`" -} diff --git a/debian/_buildscripts/local/internals/_build_set_common.sh b/debian/_buildscripts/local/internals/_build_set_common.sh deleted file mode 100755 index 82e7e8bba..000000000 --- a/debian/_buildscripts/local/internals/_build_set_common.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -# Load common code and initialization -export SCRIPT_DIR=$(dirname $(readlink -f "$0")) -. ${SCRIPT_DIR}/internals/_build_common.sh -init_common - -_BUILDSET_TIMER=1 -_BUILDSET_TIME="--/--:--:--:---" - -parm_SKIP_FETCH="n" # if "y" skips N packages from the list -parm_SKIP_N=0 # this argument represents the number of packages to skip -SKIP_cnt=0 - - -#---------------------------- -# do_exit for set building -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGray}#### Building process for set \"${0##*/}\" completed ####${CNone}" - else - echo -e "${CGray}#### Building process for set \"${0##*/}\" interrupted ($1) ####${CNone}" - fi - exit $1 -} - - -#---------------------------- -function set_log_start() -{ - echo -e "${CGray}#### Starting building process for set \"${0##*/}\" ####${CNone}" - echo - echo "---------- ${0##*/} ----------" >>"$LOG_BUILD_RESULT_FILENAME" - exec_time_start $_BUILDSET_TIMER -} - - -#---------------------------- -function set_log_end() -{ - exec_time_stop $_BUILDSET_TIMER "_BUILDSET_TIME" - echo " [$_BUILDSET_TIME] SET ${0##*/}" >>"$LOG_BUILD_RESULT_FILENAME" - echo >>"$LOG_BUILD_RESULT_FILENAME" - do_exit 0 -} - - -#---------------------------- -function build_module() -{ - if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then - SKIP_cnt=$((SKIP_cnt+1)) - else - ./build_module.sh ${BUILD_DEFAULT_OPTIONS} "$@" - echo - fi -} - - -#---------------------------- -# Check command line arguments -#---------------------------- -for arg in $@; do - if [ "$parm_SKIP_FETCH" = "y" ]; then - parm_SKIP_N=$arg - parm_SKIP_FETCH="n"BUILD_DEFAULT_OPTIONS - elif [ "$arg" = "-s" ]; then # skip first N packages - parm_SKIP_FETCH="y" - fi -done -if [ "$parm_SKIP_FETCH" = "y" ]; then - echo "Invalid command line arguments ($@)" - do_exit 3 -fi diff --git a/debian/_buildscripts/local/internals/_config_template.sh b/debian/_buildscripts/local/internals/_config_template.sh deleted file mode 100644 index 232d99799..000000000 --- a/debian/_buildscripts/local/internals/_config_template.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -a - -#---------------------------- -# Repo information -#---------------------------- -TDE_DIR="" # TDE root folder -UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.0.x -DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to this branch. Must be - # one of the branches specified in UPDATE_BRANCHES - -#---------------------------- -# Build information -#---------------------------- -TDE_RELEASE="14.1.0" # TDE release number -DISTRO="" # Distro family (leave empty for auto-detection). For ex. debian -DISTRO_NAME="" # Distro name of specific version (leave empty for auto-detection). For ex. buster -ARCHITECTURE="" # Build for this architecture (leave empty for auto-detection). For ex. amd64 -USE_PREBUILD_EXTRA_DEPS="y" # If == "y", use pre-built extra dependency packages -BUILD_DEFAULT_OPTIONS="-g -lr" # Default building options (pbuilder) -GPG_SIGN_KEYID="" # Use this GPG key to sign packages. If null, packages will not be signed - -#---------------------------- -# Base directories -#---------------------------- -CFG_SCRIPT_LOG_DIR="0_logs" -CFG_GIT_DIR="1_git" -CFG_BUILD_DIR="2_build" -CFG_REPO_DIR="3_repo" -CFG_EXTRA_DEPS_DIR="edeps" # Relative to CFG_GIT_DIR folder. Only required if USE_PREBUILD_EXTRA_DEPS != "y" -CFG_HOOKS_DIR="hooks" # Relative to CFG_GIT_DIR folder - -set +a diff --git a/debian/_buildscripts/local/internals/_pbuilder.sh b/debian/_buildscripts/local/internals/_pbuilder.sh deleted file mode 100755 index 5f00e718a..000000000 --- a/debian/_buildscripts/local/internals/_pbuilder.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash - -function run_pdebuild() -{ - # pbuilder absolute paths - PBUILDER_HOOK_DIR="/var/cache/pbuilder/hooks" - PBUILDER_SHELL_HOOK_TEMPLATE="$SCRIPT_DIR/internals/C10shell" - PBUILDER_SHELL_HOOK="$PBUILDER_HOOK_DIR/C10shell" - PBUILDER_DEPS_HOOK="$PBUILDER_HOOK_DIR/D05deps" - - # Sign packages optino - OPT_SIGN_PKG_PBUILDER="" - if [ ! -z "$GPG_SIGN_KEYID" ]; then - OPT_SIGN_PKG_LOCAL="-k$GPG_SIGN_KEYID" - OPT_SIGN_PKG_PBUILDER="--auto-debsign --debsign-k $GPG_SIGN_KEYID" - fi - - ## Build module in a clean chroot environment using pbuilder - # Install/remove shell hook - if [ ! -d "$PBUILDER_HOOK_DIR" ]; then - mkdir -p "$PBUILDER_HOOK_DIR" - fi - if [ "$bool_SHELL_HOOK" = "y" ]; then - cp "$PBUILDER_SHELL_HOOK_TEMPLATE" "$PBUILDER_SHELL_HOOK" - chmod a+x "$PBUILDER_SHELL_HOOK" - else - if [ -x "$PBUILDER_SHELL_HOOK" ]; then - rm "$PBUILDER_SHELL_HOOK" - fi - fi - # Build using pbuilder - echo -e "${CYellow}> Building using pbuilder${CNone}" - # Create pbuilder hook to make sure all available packages are scanned - # Store any existing D05 hook as a temporary file, this will be reinstated at the end - cat < "$PBUILDER_DEPS_HOOK" -#!/bin/sh -(cd "$TDE_DEBS_DIR"; apt-ftparchive packages . > Packages) -echo "deb [trusted=yes] file:$TDE_DEBS_DIR ./" >> /etc/apt/sources.list -END_D05_01 - if [[ "$USE_PREBUILD_EXTRA_DEPS" = "y" ]]; then - # Get building branch from .tdescminfo file - if [[ -f "$MOD_BUILD_PATH/.tdescminfo" ]]; then - BUILD_BRANCH=`sed -n -r "s/^Revision: ([^-]+)-.*/\1/p" "$MOD_BUILD_PATH/.tdescminfo"` - bool_EDEPS_FOUND="n" - OLD_IFS=$IFS && IFS=$' \t' - while read l_branch l_repo l_component; do - if [ "$l_branch" = "$BUILD_BRANCH" ]; then - bool_EDEPS_FOUND="y" - cat <> "$PBUILDER_DEPS_HOOK" -echo "deb [trusted=yes] $l_repo $DISTRO_NAME $l_component" >> /etc/apt/sources.list -END_D05_02 - break - fi - done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$") - if [ "$bool_EDEPS_FOUND" != "y" ]; then - # EDEPS repository not found, use default. This could happen when building from sub branches of the main package repo - while read l_branch l_repo l_component; do - if [ "$l_branch" = "default" ]; then - bool_EDEPS_FOUND="y" - cat <> "$PBUILDER_DEPS_HOOK" -echo "deb [trusted=yes] $l_repo $DISTRO_NAME $l_component" >> /etc/apt/sources.list -END_D05_02 - break - fi - done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$") - fi - IFS=$OLD_IFS - fi - fi - cat <> "$PBUILDER_DEPS_HOOK" -apt-get update -END_D05_03 - chmod a+x "$PBUILDER_DEPS_HOOK" - # Build - OPT_BUILD_PARALLEL="" - if [ ${DEB_BUILD_PARALLEL+x} ]; then - OPT_BUILD_PARALLEL="DEB_BUILD_PARALLEL=$DEB_BUILD_PARALLEL" - fi - eval pdebuild $OPT_SIGN_PKG_PBUILDER \ - --architecture $ARCHITECTURE \ - --buildresult \"$MOD_DEB_PATH\" \ - --pbuilderroot \"sudo $OPT_BUILD_PARALLEL DISTRO_NAME=$DISTRO_NAME ARCHITECTURE=$ARCHITECTURE\" \ - --logfile \"$BUILDING_LOG_FILE\" \ - -- \ - --bindmounts \"$TDE_DEBS_DIR\" \ - --hookdir \"$PBUILDER_HOOK_DIR\" \ - $OPT_SHOW_LOGS\"$BUILDING_LOG_FILE\" - PBUILDER_RETVAL=$? - # Remove shell hook if it was installed before the build - if [ -x "$PBUILDER_SHELL_HOOK" ]; then - rm "$PBUILDER_SHELL_HOOK" - fi - # Remove deps hook - if [ -x "$PBUILDER_DEPS_HOOK" ]; then - rm "$PBUILDER_DEPS_HOOK" - fi - # Return pdebuild return value to calling function - return $PBUILDER_RETVAL -} - - -#---------------------------- -# The actual code is inside a function to allow the pdebuild return value to be -# correctly passed back to the calling script in all cases (root and non root users) -run_pdebuild diff --git a/debian/_buildscripts/local/internals/distro_list.txt b/debian/_buildscripts/local/internals/distro_list.txt deleted file mode 100644 index 0bcb3fe81..000000000 --- a/debian/_buildscripts/local/internals/distro_list.txt +++ /dev/null @@ -1,39 +0,0 @@ -# -# List of supported distributions -# -# Format: -# distro name -# distro version number -# distro version name -# package suffix if required -# tde/packaging corresponding path if required -# - -# debian -debian 9.0 stretch - - -debian 10.0 buster - - -debian 11.0 bullseye - - -debian 12.0 bookworm ~a - -debian 13.0 sid ~b - - -# devuan -devuan 2.0 ascii - debian/stretch -devuan 3.0 beowulf - debian/buster -devuan 4.0 chimaera - debian/bullseye -devuan 5.0 daedalus ~a debian/bookwork -devuan 6.0 ceres ~b debian/sid - -# raspbian -raspbian 9.0 raspbian-stretch - - -raspbian 10.0 raspbian-buster - - -raspbian 11.0 raspbian-bullseye - - -raspbian 12.0 raspbian-bookworm ~a - - -# ubuntu -ubuntu 16.04 xenial - - -ubuntu 18.04 bionic - - -ubuntu 20.04 focal - - -ubuntu 20.10 groovy - - -ubuntu 21.04 hirsute - - -ubuntu 21.10 impish - - -ubuntu 22.04 jammy ~a - diff --git a/debian/_buildscripts/local/internals/extra_deps.txt b/debian/_buildscripts/local/internals/extra_deps.txt deleted file mode 100644 index b19514d84..000000000 --- a/debian/_buildscripts/local/internals/extra_deps.txt +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# List of repositories for extra dependency packages. -# The "default" repo will be used in case a match can't be found. -EDEPS_REPO=" - default http://mirror.ppa.trinitydesktop.org/trinity-testing deps - master http://mirror.ppa.trinitydesktop.org/trinity-testing deps - r14.0.x http://mirror.ppa.trinitydesktop.org/trinity-sb deps-r14 -" diff --git a/debian/_buildscripts/local/update_repositories.sh b/debian/_buildscripts/local/update_repositories.sh deleted file mode 100755 index 57305c59d..000000000 --- a/debian/_buildscripts/local/update_repositories.sh +++ /dev/null @@ -1,513 +0,0 @@ -#!/bin/bash - -# Check command line arguments and set options -# Run before loading configuration, to allow branch overriding -flag_INCREMENTAL="n" -flag_VERBOSE_LOG="n" -flag_SWITCH_ONLY="n" -flag_SKIP_TAGS="n" -OVERRIDE_DEFAULT_REPO_BRANCH="" -for ((idx=1; idx<=$#; idx++)); do - arg="${!idx}" - if [ "$arg" = "-i" ]; then # continue from last updated module (Incremental) - flag_INCREMENTAL="y" - elif [ "$arg" = "-v" ]; then # display and log git command output (Verbose) - flag_VERBOSE_LOG="y" - elif [ "$arg" = "-ub" ]; then # branches to update (Update Branches) - ((idx++)) - OVERRIDE_UPDATE_BRANCHES="${!idx}" - [[ -z "$OVERRIDE_DEFAULT_REPO_BRANCH" ]] && OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}" - elif [ "$arg" = "-db" ]; then # default branch after update (Default Branch) - ((idx++)) - if [[ "$flag_SWITCH_ONLY" != 'y' ]]; then - # '-db' is only used if no '-so' argument is specified. If '-so ' - # is given, '-db is ignored - OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}" - fi - elif [ "$arg" = "-so" ]; then # switch branch only (Switch Only) - flag_SWITCH_ONLY="y" && ((idx++)) - if ! [[ "${!idx}" =~ ^- ]]; then - OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}" - else - ((idx--)) - fi - fi -done - -# Load common code -export SCRIPT_DIR=$(dirname $(readlink -f "$0")) -. ${SCRIPT_DIR}/internals/_build_common.sh -init_common - -UPDATE_LOCK_FILENAME="/var/lock/TDE_update_repo_lock" # Lock file for incremental update - -declare -A RESULT_STRINGS=( -[OK]="[ OK ]" -[FAIL]="[ FAIL ]" -[UPDATE]="[ UPDATE ]" -[SKIP]="[ SKIP ]" -[INV-OP]="[ INV-OP ]" -) -declare -A COLOR_STRINGS=( -[OK]="${CNone}" -[FAIL]="${CLightRed}" -[UPDATE]="${CLightGreen}" -[SKIP]="${CBrown}" -[INV-OP]="${CLightPurple}" -) - -#---------------------------- -# Update a given module from the upstream repo -# Parameters: -# $1 - module folder -# $2 - operation type -# $3 - branch to update -function _do_update() -{ - local MOD_PATH=$1 - local OP_TYPE=$2 - local BRANCH=$3 - local RESULT="" - local LINE_CTRL_SUFFIX="" - - case "$OP_TYPE" in - "fetch") - if [[ -z `grep "^$BRANCH - $MOD_PATH$" "$UPDATE_LOCK_FILENAME"` ]]; then - cd "$MOD_PATH" &>/dev/null - eval git fetch --all --prune $GIT_NO_RECURSE_SUBMODULES $OPT_VERBOSE_LOG - if [ $? -eq 0 ]; then - RESULT="OK" - else - RESULT="FAIL" - fi - echo "$BRANCH - $MOD_PATH" >> "$UPDATE_LOCK_FILENAME" - else - RESULT="SKIP" - fi - ;; - - "update") - cd "$MOD_PATH" &>/dev/null - if [ $? -eq 0 ]; then - # Clean up any possible uncommitted changes - if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then - git reset --hard HEAD &>/dev/null - git clean -dxff &>/dev/null - fi - # Make sure the local branch exists - if [[ -z `git branch | grep -E "\b$BRANCH\b"` ]]; then - eval git checkout -b \"$BRANCH\" \"origin/$BRANCH\" $OPT_VERBOSE_LOG - else - eval git checkout \"$BRANCH\" $OPT_VERBOSE_LOG - fi - # Make sure the local branch is a tracking branch - if [[ -z `git config branch."$BRANCH".remote` ]]; then - git branch -u "origin/$BRANCH" &>/dev/null #$ - git reset --hard "origin/$BRANCH" &>/dev/null - fi - # Update - eval git reset --hard HEAD $OPT_VERBOSE_LOG - eval git clean -dxff $OPT_VERBOSE_LOG - if [[ $(git rev-parse HEAD) != $(git rev-parse "origin/$BRANCH") ]]; then - eval git rebase $OPT_VERBOSE_LOG - if [[ `git rev-parse HEAD` == `git rev-parse "origin/$BRANCH"` ]]; then - RESULT="UPDATE" - else - RESULT="FAIL" - fi - else - RESULT="OK" - fi - else - RESULT="FAIL" - fi - ;; - - "switch-to") - cd "$MOD_PATH" &>/dev/null - eval git checkout \"$BRANCH\" $OPT_VERBOSE_LOG - eval git reset --hard HEAD $OPT_VERBOSE_LOG - eval git clean -dxff $OPT_VERBOSE_LOG - if [[ ! -z `git branch -v | grep -E "^\*\s+$BRANCH"` ]]; then - RESULT="OK" - else - RESULT="FAIL" - fi - ;; - - *) - RESULT="INV-OP" - ;; - esac - - if [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ]; then - LINE_CTRL_SUFFIX="\n" - fi - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} $MOD_PATH${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} $MOD_PATH" >> "$LOG_UPDATE_REPO_FILENAME" -} - -#---------------------------- -# Update a given module from the upstream repo -# Parameters: -# $1 - module folder and name -# $2 - operation type -# $3 - module url (for "add_repo") -# branch name (for other operations) -# $4 - parent module path (only for check_module operation) -# $5 - module string (only for check_module operation) -function _do_worktree_update() -{ - local MOD_FULLPATH=$1 - local MOD_NAME=`echo ${MOD_FULLPATH} | sed "s|^.*/\([^/]\+\)$|\1|"` - local OP_TYPE=$2 - local MOD_REPO_PATH="${REPOS_DIR}/${MOD_NAME}.git" - local RESULT="" - local LINE_CTRL_SUFFIX="" - local LOCAL_BRANCHES - local REMOTE_BRANCHES - - case "$OP_TYPE" in - "add_repo") - if [ -z "`grep \"^${MOD_REPO_PATH} - ADD REPO$\" \"${UPDATE_LOCK_FILENAME}\"`" ]; then - RESULT="OK" - if [ ! -d "${MOD_REPO_PATH}" ]; then - RESULT="UPDATE" - local MOD_URLNAME="$3" - [ -n "${MOD_URLNAME}" ] || MOD_URLNAME="${MOD_NAME}" - eval git clone --bare --config "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*" \ - "${ORIGIN_PATH}/${MOD_URLNAME}.git" "${MOD_REPO_PATH}" $OPT_VERBOSE_LOG || RESULT="FAIL" - fi - if [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ]; then - LINE_CTRL_SUFFIX="\n" - fi - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - repo added${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - repo added" >> "$LOG_UPDATE_REPO_FILENAME" - # - echo "${MOD_REPO_PATH} - ADD REPO" >> "${UPDATE_LOCK_FILENAME}" - fi - ;; - - "fetch") - if [[ -z `grep "^${MOD_REPO_PATH} - FETCH$" "${UPDATE_LOCK_FILENAME}"` ]]; then - cd "${MOD_REPO_PATH}" &>/dev/null - RESULT="FAIL" - eval git fetch --all --prune $GIT_NO_RECURSE_SUBMODULES $OPT_VERBOSE_LOG && - eval git worktree prune $OPT_VERBOSE_LOG && RESULT="OK" - if [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ]; then - LINE_CTRL_SUFFIX="\n" - fi - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - fetched${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - fetched" >> "$LOG_UPDATE_REPO_FILENAME" - # - echo "${MOD_REPO_PATH} - FETCH" >> "${UPDATE_LOCK_FILENAME}" - fi - ;; - - "check_worktree") - # Check/add worktrees - LOCAL_BRANCHES=$3 - cd "${MOD_REPO_PATH}" &>/dev/null - REMOTE_BRANCHES=(`git branch --remote | sed "s|origin/||g"`) - for LCL_BR in $LOCAL_BRANCHES; do - CURR_BR=`echo "$LCL_BR" | sed -e "s|^[[:space:]]*||" -e "s|[[:space:]]*$||"` - local WORK_PATH="${WORKTREES_DIR}/${CURR_BR}/${MOD_FULLPATH}" - for REM_BR in "${REMOTE_BRANCHES[@]}"; do - if [ "${REM_BR}" = "${CURR_BR}" -a -z "`grep \"^${MOD_FULLPATH} - ${CURR_BR} - ADD WORKTREE$\" \"${UPDATE_LOCK_FILENAME}\"`" ]; then - cd "${MOD_REPO_PATH}" &>/dev/null - if [[ -z `git worktree list | grep "\[${CURR_BR}\]"` ]]; then - RESULT="FAIL" - eval git worktree add "${WORK_PATH}" "origin/${CURR_BR}" $OPT_VERBOSE_LOG && - cd "${WORK_PATH}" &>/dev/null && - eval git checkout ${CURR_BR} $OPT_VERBOSE_LOG && - eval git branch --set-upstream-to=origin/${CURR_BR} $OPT_VERBOSE_LOG && RESULT="UPDATE" - LINE_CTRL_SUFFIX="" - [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ] && LINE_CTRL_SUFFIX="\n" - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - branch ${CURR_BR} - worktree added${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - branch ${CURR_BR} - worktree added" >> "$LOG_UPDATE_REPO_FILENAME" - fi - # - echo "${MOD_FULLPATH} - ${CURR_BR} - ADD WORKTREE" >> "${UPDATE_LOCK_FILENAME}" - break - fi - done - done - ;; - - "check_module") - # Make sure submodules are initialized and up to date if necessary - if [ -z "`grep \"^${MOD_FULLPATH} - ${CURR_BR} - CHECK MODULE$\" \"${UPDATE_LOCK_FILENAME}\"`" ]; then - local PARENT_PATH=$4 - local SUBMOD_STR=$5 - if [ -n "$PARENT_PATH" -a -n "$SUBMOD_STR" ]; then - # Only do this on a real submodule - RESULT="OK" - cd "$PARENT_PATH" &>/dev/null - git config submodule.$SUBMOD_STR.url "$MOD_REPO_PATH" &>/dev/null - if [[ -n "`git submodule status -- ${SUBMOD_STR} | grep "^-.*"`" ]]; then - RESULT="UPDATE" - eval git submodule init -- ${SUBMOD_STR} $OPT_VERBOSE_LOG || RESULT="FAIL" - fi - if [ "$RESULT" != "FAIL" -a ! -e "${SUBMOD_STR}/.git" ]; then - RESULT="UPDATE" - eval git submodule update -- ${SUBMOD_STR} $OPT_VERBOSE_LOG || RESULT="FAIL" - fi - LINE_CTRL_SUFFIX="" - [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ] && LINE_CTRL_SUFFIX="\n" - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - module checked${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - module checked" >> "$LOG_UPDATE_REPO_FILENAME" - fi - # - echo "${MOD_FULLPATH} - ${CURR_BR} - CHECK MODULE" >> "${UPDATE_LOCK_FILENAME}" - fi - ;; - - "update") - LOCAL_BRANCHES=$3 - REMOTE_BRANCHES=(`git branch --remote | sed "s|origin/||g"`) - for LCL_BR in $LOCAL_BRANCHES; do - CURR_BR=`echo "$LCL_BR" | sed -e "s|^[[:space:]]*||" -e "s|[[:space:]]*$||"` - for REM_BR in "${REMOTE_BRANCHES[@]}"; do - if [ "${REM_BR}" = "${CURR_BR}" -a -z "`grep \"^${MOD_FULLPATH} - ${CURR_BR} - WORKTREE UPDATED$\" \"${UPDATE_LOCK_FILENAME}\"`" ]; then - local WORK_PATH="${WORKTREES_DIR}/${CURR_BR}/${MOD_FULLPATH}" - RESULT="FAIL" - if [ -d ${WORK_PATH} ]; then - cd "${WORK_PATH}" &>/dev/null && - # Clean up any possible uncommitted changes - if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then - git reset --hard HEAD &>/dev/null - git clean -dxff &>/dev/null - fi - # Make sure the local branch is a tracking branch - if [[ -z `git config branch."${CURR_BR}".remote` ]]; then - git branch -u "origin/${CURR_BR}" &>/dev/null #$ - git reset --hard "origin/${CURR_BR}" &>/dev/null - fi - # If this is a clone of a local repository, make sure to do a fetch - # operation first, otherwise this clone won't see the latest changes - if [ "`git config --get remote.origin.url`" = "${MOD_REPO_PATH}" ]; then - eval git fetch --all --prune $GIT_NO_RECURSE_SUBMODULES $OPT_VERBOSE_LOG - eval git worktree prune $OPT_VERBOSE_LOG - fi - # Update - eval git reset --hard HEAD $OPT_VERBOSE_LOG - eval git clean -dxff $OPT_VERBOSE_LOG - eval git checkout "${CURR_BR}" $OPT_VERBOSE_LOG - if [[ $(git rev-parse HEAD) != $(git rev-parse "origin/${CURR_BR}") ]]; then - eval git rebase $OPT_VERBOSE_LOG - if [[ `git rev-parse HEAD` == `git rev-parse "origin/${CURR_BR}"` ]]; then - RESULT="UPDATE" - fi - else - RESULT="OK" - fi - fi - LINE_CTRL_SUFFIX="" - [ "$RESULT" != "OK" -o "$flag_VERBOSE_LOG" = "y" ] && LINE_CTRL_SUFFIX="\n" - echo -ne "\033[2K\r${COLOR_STRINGS[$RESULT]}${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - branch ${CURR_BR} - worktree updated${CNone}$LINE_CTRL_SUFFIX" - echo "${RESULT_STRINGS[$RESULT]} ${MOD_NAME} - branch ${CURR_BR} - worktree updated" >> "$LOG_UPDATE_REPO_FILENAME" - echo "${MOD_FULLPATH} - ${CURR_BR} - WORKTREE UPDATED" >> "${UPDATE_LOCK_FILENAME}" - break - fi - done - done - ;; - - *) - RESULT="INV-OP" - ;; - esac -} - -#---------------------------- -# Update a given module and all submodules from the upstream repo -# Parameters: -# $1 - module folder -# $2 - operation type -# $3 - branch to update -function _update_module() -{ - local MOD_PATH=$1 - local OP_TYPE=$2 - local BRANCH=$3 - - # Current module - _do_update "$@" - # Submodules - local SUBMOD_LIST="$MOD_PATH/.gitmodules" - if [[ -e "$SUBMOD_LIST" ]]; then - sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <$SUBMOD_LIST |\ - while read -r SUBMOD_STRING; do - cd "$MOD_PATH" &>/dev/null - if [[ -z "`git config --get submodule.$SUBMOD_STRING.url`" ]]; then - eval git submodule init -- \"$SUBMOD_STRING\" $OPT_VERBOSE_LOG - fi - if [[ ! -e "$MOD_PATH/$SUBMOD_STRING/.git" ]]; then - eval git submodule update -- \"$SUBMOD_STRING\" $OPT_VERBOSE_LOG - fi - _update_module "$MOD_PATH/$SUBMOD_STRING" "$OP_TYPE" "$BRANCH" - done - fi -} - -#---------------------------- -# Update a given module and all submodules from the upstream repo -# Parameters: -# $1 - module folder and name (excluding base repo part) -# $2 - list of branches to update -# $3 - parent module path -# $4 - module substring relative to parent -function _update_worktree_module() -{ - local MOD_FULLPATH=$1 - local MOD_NAME=`echo ${MOD_FULLPATH} | sed "s|^.*/\([^/]\+\)$|\1|"` - if [ -n "${MOD_FULLPATH}" -a -n "${MOD_NAME}" ]; then - local BRANCH_LIST=$2 - [ -n "${BRANCH_LIST}" ] || BRANCH_LIST="${UPDATE_BRANCHES}" - - # Current module - _do_worktree_update "${MOD_FULLPATH}" "fetch" - _do_worktree_update "${MOD_FULLPATH}" "check_worktree" "${BRANCH_LIST[@]}" - _do_worktree_update "${MOD_FULLPATH}" "check_module" "dummy arg" "$3" "$4" - _do_worktree_update "${MOD_FULLPATH}" "update" "${BRANCH_LIST[@]}" - - # Submodules - for LCL_BR in ${BRANCH_LIST}; do - local WORK_PATH="${WORKTREES_DIR}/${LCL_BR}/${MOD_FULLPATH}" - if [ -d ${WORK_PATH} ]; then - local SUBMOD_LIST="${WORK_PATH}/.gitmodules" - if [ -e "${SUBMOD_LIST}" ]; then - sed -n "s|^\[submodule \"\([^\"]*\)\"\]$|\1|p" <${SUBMOD_LIST} |\ - while read -r SUBMOD_STRING; do - cd "${WORK_PATH}" &>/dev/null - SUBMOD_NAME=`echo ${SUBMOD_STRING} | sed "s|.*/\([^/]\+\)$|\1|"` - SUBMOD_URLNAME=`git config --file .gitmodules --get submodule.${SUBMOD_STRING}.url | \ - sed "s|.*/\([^/]\+\)$|\1|"` - _do_worktree_update "${MOD_FULLPATH}/${SUBMOD_STRING}" "add_repo" "${SUBMOD_URLNAME}" - _update_worktree_module "${MOD_FULLPATH}/${SUBMOD_STRING}" "${LCL_BR}" "${WORK_PATH}" "${SUBMOD_STRING}" - done - fi - fi - done - else - echo -ne "\033[2K\r${COLOR_STRINGS["FAIL"]}${RESULT_STRINGS["FAIL"]} Invalid module $1 passed to _update_worktree_module()${CNone}\n" - echo "${RESULT_STRINGS["FAIL"]} Invalid module $1 passed to _update_worktree_module()" >> "$LOG_UPDATE_REPO_FILENAME" - fi -} - -#---------------------------- -if [ "$flag_INCREMENTAL" = "y" ]; then - [ ! -f "$UPDATE_LOCK_FILENAME" ] && flag_INCREMENTAL="n" -else - [ -f "$UPDATE_LOCK_FILENAME" ] && rm "$UPDATE_LOCK_FILENAME" -fi - -OPT_VERBOSE_LOG="&>/dev/null" -if [[ "$flag_VERBOSE_LOG" = "y" ]]; then - OPT_VERBOSE_LOG=" |& tee -a \"$LOG_UPDATE_REPO_FILENAME\"" -fi - -#---------------------------- -# Check git abilities -GIT_IGNORE_SUBMODULES="" -if [[ -n "`git status --help 2>/dev/null|grep -- '--ignore-submodules'`" ]]; then - GIT_IGNORE_SUBMODULES="--ignore-submodules" -fi -GIT_NO_RECURSE_SUBMODULES="" -if [[ -n "`git pull --help |grep -- '--\[no-\]recurse-submodules'`" ]]; then - GIT_NO_RECURSE_SUBMODULES="--no-recurse-submodules" -fi - -# Start update -if [ "$flag_INCREMENTAL" != "y" ]; then - echo "TDE repositories update started" > "$UPDATE_LOCK_FILENAME" -fi - -if [ "${USE_GIT_WORKTREES}" != "y" ]; then - # Not using git worktree - _LAST_BRANCH="" - if [[ "$flag_SWITCH_ONLY" != "y" ]]; then - # Update extra dependency repository - if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y" - echo_and_tee "${CLightCyan} Fetching extra dependencies ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - - # Fetch TDE extra dependency repository - _update_module "$REPO_EXTRA_DEPENDENCIES" "fetch" - _update_module "$REPO_EXTRA_DEPENDENCIES" "update" "master" - - echo -e "\033[2K" - echo "" >> "$LOG_UPDATE_REPO_FILENAME" - fi - - # Fetch all remotes first - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y" - echo_and_tee "${CLightCyan} Fetching repos ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - - # Fetch TDE main repository - _update_module "$REPO_TDE" "fetch" - - echo -e "\033[2K" - echo "" >> "$LOG_UPDATE_REPO_FILENAME" - - # Branch update - for branch in "${BRANCHES[@]}"; do - _LAST_BRANCH="$branch" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan} Updating branch ${CYellow}$branch ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - - # Update TDE main repository - _update_module "$REPO_TDE" "update" "$branch" - - echo -e "\033[2K" - echo "" >> "$LOG_UPDATE_REPO_FILENAME" - done - fi - - # Switch to specified branch if necessary - if [[ "$DEFAULT_REPO_BRANCH" != "$_LAST_BRANCH" ]]; then - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "$flag_SWITCH_ONLY" - echo_and_tee "${CLightCyan} Switching to branch ${CYellow}$DEFAULT_REPO_BRANCH ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - - # Switch TDE main repository - _update_module "$REPO_TDE" "switch-to" "$DEFAULT_REPO_BRANCH" - fi -else - # Using git worktree - - # Get TDE origin url - cd "${REPOS_DIR}/tde.git" &>/dev/null - ORIGIN_PATH=`git config --get remote.origin.url | sed "s|\(.*\)/tde.git$|\1|"` - - if [ ! -z "{ORIGIN_PATH}" ]; then - # Update extra dependency repository - if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y" - echo_and_tee "${CLightCyan} Updating extra dependencies ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y" - - _update_worktree_module "edeps" - - echo -e "\033[2K" - echo "" >> "$LOG_UPDATE_REPO_FILENAME" - fi - - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y" - echo_and_tee "${CLightCyan} Updating TDE repos ${CNone}" "$LOG_UPDATE_REPO_FILENAME" - echo_and_tee "${CLightCyan}-------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" - - # Main repo - _update_worktree_module "tde" - fi -fi - -echo -e "\033[2K" -echo "" >> "$LOG_UPDATE_REPO_FILENAME" - -# Update completed -[ -f "$UPDATE_LOCK_FILENAME" ] && rm "$UPDATE_LOCK_FILENAME" -cd $SCRIPT_DIR -- cgit v1.2.1