summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local
diff options
context:
space:
mode:
Diffstat (limited to 'debian/_buildscripts/local')
-rwxr-xr-xdebian/_buildscripts/local/00_extradeps.sh22
-rwxr-xr-xdebian/_buildscripts/local/01_base_01.sh16
-rwxr-xr-xdebian/_buildscripts/local/02_base_02.sh16
-rwxr-xr-xdebian/_buildscripts/local/03_base_03.sh23
-rwxr-xr-xdebian/_buildscripts/local/04_applications_01.sh23
-rwxr-xr-xdebian/_buildscripts/local/04_base_04.sh10
-rwxr-xr-xdebian/_buildscripts/local/05_applications_02.sh28
-rwxr-xr-xdebian/_buildscripts/local/05_apps_system.sh30
-rwxr-xr-xdebian/_buildscripts/local/06_applications_03.sh28
-rwxr-xr-xdebian/_buildscripts/local/06_apps_utilities.sh22
-rwxr-xr-xdebian/_buildscripts/local/07_applications_04.sh19
-rwxr-xr-xdebian/_buildscripts/local/07_apps_settings.sh20
-rwxr-xr-xdebian/_buildscripts/local/08_applications_05.sh32
-rwxr-xr-xdebian/_buildscripts/local/08_apps_graphics.sh20
-rwxr-xr-xdebian/_buildscripts/local/09_applications_06.sh29
-rwxr-xr-xdebian/_buildscripts/local/09_apps_development.sh17
-rwxr-xr-xdebian/_buildscripts/local/10_apps_games.sh11
-rwxr-xr-xdebian/_buildscripts/local/10_others_01.sh27
-rwxr-xr-xdebian/_buildscripts/local/11_apps_internet.sh22
-rwxr-xr-xdebian/_buildscripts/local/11_others_02.sh21
-rwxr-xr-xdebian/_buildscripts/local/12_apps_office.sh24
-rwxr-xr-xdebian/_buildscripts/local/13_apps_multimedia.sh22
-rwxr-xr-xdebian/_buildscripts/local/14_apps_tdeio.sh16
-rwxr-xr-xdebian/_buildscripts/local/15_apps_themes.sh23
-rwxr-xr-xdebian/_buildscripts/local/16_apps_misc.sh26
-rwxr-xr-xdebian/_buildscripts/local/17_meta_packages.sh (renamed from debian/_buildscripts/local/12_meta_packages.sh)11
-rwxr-xr-xdebian/_buildscripts/local/91_build_base.sh1
-rwxr-xr-xdebian/_buildscripts/local/92_build_applications.sh19
-rwxr-xr-xdebian/_buildscripts/local/93_build_others.sh5
-rwxr-xr-xdebian/_buildscripts/local/99_build_TDE.sh5
-rw-r--r--debian/_buildscripts/local/README.txt207
-rw-r--r--debian/_buildscripts/local/additional_files/etc/pbuilderrc72
-rwxr-xr-xdebian/_buildscripts/local/build_module.sh461
-rwxr-xr-xdebian/_buildscripts/local/create_repo.sh3
-rwxr-xr-xdebian/_buildscripts/local/internals/_build_common.sh330
-rwxr-xr-xdebian/_buildscripts/local/internals/_build_set_common.sh5
-rw-r--r--debian/_buildscripts/local/internals/_config_template.sh16
-rwxr-xr-xdebian/_buildscripts/local/internals/_pbuilder.sh180
-rw-r--r--debian/_buildscripts/local/internals/distro_list.txt40
-rw-r--r--debian/_buildscripts/local/internals/extra_deps.txt2
-rwxr-xr-xdebian/_buildscripts/local/update_repositories.sh594
41 files changed, 1437 insertions, 1061 deletions
diff --git a/debian/_buildscripts/local/00_extradeps.sh b/debian/_buildscripts/local/00_extradeps.sh
index f8bbf4a7b..82edb1404 100755
--- a/debian/_buildscripts/local/00_extradeps.sh
+++ b/debian/_buildscripts/local/00_extradeps.sh
@@ -7,17 +7,19 @@ 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"
+ echo "Use of pre-built extra dependency packages is currently configured. Nothing to do." >>"$LOG_BUILD_RESULT_FILENAME"
else
- build_module "edeps/fireflies"
- build_module "edeps/imlib"
-# build_module "edeps/opensync" # deprecated - no longer required in R14.1 series. To remove in R14.2.0
- build_module "edeps/pcsc-lite-nodbus"
- build_module "edeps/lcms"
- build_module "edeps/wv2"
- build_module "edeps/jasper"
- build_module "edeps/openslp-dfsg"
- build_module "edeps/mp4v2"
+ 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
index 7f89ebf00..46b04d832 100755
--- a/debian/_buildscripts/local/01_base_01.sh
+++ b/debian/_buildscripts/local/01_base_01.sh
@@ -5,21 +5,25 @@
#----------------------------
set_log_start
+build_module "dependencies/tde-cmake"
build_module "dependencies/libr"
build_module "dependencies/akode"
+build_module "dependencies/libart-lgpl"
+build_module "dependencies/libcaldav"
+build_module "dependencies/libcarddav"
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/tqca-tls"
-build_module "dependencies/libart-lgpl"
build_module "dependencies/avahi-tqt"
-build_module "dependencies/libcaldav"
-build_module "dependencies/libcarddav"
-build_module "tdelibs"
+build_module "dependencies/polkit-tqt"
+if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then
+ build_module "$CFG_EXTRA_DEPS_DIR/pcsc-lite-nodbus"
+fi
+build_module "core/tdelibs"
build_module "libraries/libtdeldap"
-build_module "tdebase"
+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
index 3bfbaa12c..abe995014 100755
--- a/debian/_buildscripts/local/02_base_02.sh
+++ b/debian/_buildscripts/local/02_base_02.sh
@@ -7,15 +7,15 @@ set_log_start
build_module "dependencies/sip4-tqt"
build_module "dependencies/tqscintilla"
-build_module "dependencies/python-tqt"
-build_module "libraries/python-trinity"
+build_module "dependencies/pytqt"
+build_module "libraries/pytde"
build_module "libraries/pytdeextensions"
-build_module "tdebindings"
+build_module "core/tdebindings"
build_module "libraries/libtqt-perl"
-build_module "tdeutils"
-build_module "tdemultimedia"
-build_module "tdeaccessibility"
-build_module "tdenetwork"
-build_module "tdeadmin"
+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
index 11209ff55..c9f7e4745 100755
--- a/debian/_buildscripts/local/03_base_03.sh
+++ b/debian/_buildscripts/local/03_base_03.sh
@@ -5,15 +5,18 @@
#----------------------------
set_log_start
-build_module "tdeartwork"
-build_module "tdegames"
-build_module "tdetoys"
-build_module "tdeedu"
-build_module "tdegraphics"
-build_module "tdepim"
-build_module "tdeaddons"
-build_module "tdesdk"
-build_module "tdevelop"
-build_module "tdewebdev"
+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_applications_01.sh b/debian/_buildscripts/local/04_applications_01.sh
deleted file mode 100755
index 4901f3d9e..000000000
--- a/debian/_buildscripts/local/04_applications_01.sh
+++ /dev/null
@@ -1,23 +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 "applications/abakus"
-build_module "applications/amarok"
-build_module "applications/basket"
-build_module "applications/digikam"
-build_module "applications/dolphin"
-build_module "applications/filelight"
-build_module "applications/gtk3-tqt-engine"
-build_module "applications/gtk-qt-engine"
-build_module "applications/gwenview"
-build_module "applications/gwenview-i18n"
-
-set_log_end
diff --git a/debian/_buildscripts/local/04_base_04.sh b/debian/_buildscripts/local/04_base_04.sh
new file mode 100755
index 000000000..5dddf0aa8
--- /dev/null
+++ b/debian/_buildscripts/local/04_base_04.sh
@@ -0,0 +1,10 @@
+#!/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_applications_02.sh b/debian/_buildscripts/local/05_applications_02.sh
deleted file mode 100755
index ae18cba5c..000000000
--- a/debian/_buildscripts/local/05_applications_02.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/k3b"
-build_module "applications/k3b-i18n"
-build_module "applications/k9copy"
-build_module "applications/kaffeine"
-build_module "applications/kaffeine-mozilla"
-build_module "applications/kasablanca"
-build_module "applications/katapult"
-build_module "applications/kbarcode"
-build_module "applications/kbfx"
-build_module "applications/kbibtex"
-build_module "applications/kbiff"
-build_module "applications/kbookreader"
-build_module "applications/kchmviewer"
-build_module "applications/kcmautostart"
-# LDAP packages
-build_module "applications/kcmldap"
-build_module "applications/kcmldapcontroller"
-build_module "applications/kcmldapmanager"
-build_module "applications/kerberostray"
-
-set_log_end
diff --git a/debian/_buildscripts/local/05_apps_system.sh b/debian/_buildscripts/local/05_apps_system.sh
new file mode 100755
index 000000000..a7fdb1c33
--- /dev/null
+++ b/debian/_buildscripts/local/05_apps_system.sh
@@ -0,0 +1,30 @@
+#!/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_applications_03.sh b/debian/_buildscripts/local/06_applications_03.sh
deleted file mode 100755
index 07a1f3e90..000000000
--- a/debian/_buildscripts/local/06_applications_03.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/kcpuload"
-build_module "applications/kdbg"
-build_module "applications/kdbusnotification"
-build_module "applications/kdiff3"
-build_module "applications/kdirstat"
-build_module "applications/keep"
-build_module "applications/kftpgrabber"
-build_module "applications/kile"
-build_module "applications/kima"
-build_module "applications/kkbswitch"
-build_module "applications/klcddimmer"
-build_module "applications/kmyfirewall"
-build_module "applications/kmymoney"
-build_module "applications/knemo"
-build_module "applications/knetload"
-build_module "applications/knetstats"
-build_module "applications/knmap"
-build_module "applications/knowit"
-build_module "applications/knutclient"
-
-set_log_end
diff --git a/debian/_buildscripts/local/06_apps_utilities.sh b/debian/_buildscripts/local/06_apps_utilities.sh
new file mode 100755
index 000000000..c90ff66cc
--- /dev/null
+++ b/debian/_buildscripts/local/06_apps_utilities.sh
@@ -0,0 +1,22 @@
+#!/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_applications_04.sh b/debian/_buildscripts/local/07_applications_04.sh
deleted file mode 100755
index e23b6226a..000000000
--- a/debian/_buildscripts/local/07_applications_04.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/koffice"
-build_module "applications/koffice-i18n"
-build_module "applications/kmplayer" # depends on koffice-trinity-dev
-build_module "applications/keximdb"
-build_module "applications/konversation"
-build_module "applications/kooldock"
-build_module "applications/kopete-otr"
-build_module "applications/kpicosim"
-build_module "applications/kplayer"
-
-set_log_end
-
diff --git a/debian/_buildscripts/local/07_apps_settings.sh b/debian/_buildscripts/local/07_apps_settings.sh
new file mode 100755
index 000000000..a637949b9
--- /dev/null
+++ b/debian/_buildscripts/local/07_apps_settings.sh
@@ -0,0 +1,20 @@
+#!/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_applications_05.sh b/debian/_buildscripts/local/08_applications_05.sh
deleted file mode 100755
index 3a783d828..000000000
--- a/debian/_buildscripts/local/08_applications_05.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/krecipes"
-build_module "applications/krename"
-build_module "applications/krusader"
-build_module "applications/kscope"
-build_module "applications/ksensors"
-build_module "applications/kshowmail"
-build_module "applications/kshutdown"
-build_module "applications/ksplash-engine-moodin"
-build_module "applications/kstreamripper"
-build_module "applications/ksystemlog"
-build_module "applications/ktechlab"
-build_module "applications/ktorrent"
-build_module "applications/kvirc"
-build_module "applications/kvkbd"
-build_module "applications/kvpnc"
-build_module "applications/kxmleditor"
-build_module "applications/mplayerthumbs"
-build_module "applications/qalculate-tde"
-build_module "applications/piklab"
-build_module "applications/potracegui"
-build_module "applications/soundkonverter"
-build_module "applications/tastymenu"
-build_module "applications/tdedocker"
-
-set_log_end
diff --git a/debian/_buildscripts/local/08_apps_graphics.sh b/debian/_buildscripts/local/08_apps_graphics.sh
new file mode 100755
index 000000000..32c61d575
--- /dev/null
+++ b/debian/_buildscripts/local/08_apps_graphics.sh
@@ -0,0 +1,20 @@
+#!/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_applications_06.sh b/debian/_buildscripts/local/09_applications_06.sh
deleted file mode 100755
index 92ee021a0..000000000
--- a/debian/_buildscripts/local/09_applications_06.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/tdeio-apt"
-build_module "applications/tdeio-ftps"
-build_module "applications/tdeio-gopher"
-build_module "applications/tdeio-locate"
-build_module "applications/tdeio-umountwrapper"
-build_module "applications/tdenetworkmanager"
-build_module "applications/tdepowersave"
-build_module "applications/tderadio"
-build_module "applications/tde-guidance"
-build_module "applications/tde-style-baghira"
-build_module "applications/tde-style-domino"
-build_module "applications/tde-style-ia-ora"
-build_module "applications/tde-style-lipstik"
-build_module "applications/tde-style-qtcurve"
-build_module "applications/tde-systemsettings"
-build_module "applications/tdmtheme"
-build_module "applications/tork"
-build_module "applications/twin-style-crystal"
-build_module "applications/wlassistant"
-build_module "applications/yakuake"
-
-set_log_end
diff --git a/debian/_buildscripts/local/09_apps_development.sh b/debian/_buildscripts/local/09_apps_development.sh
new file mode 100755
index 000000000..f5e41d1bf
--- /dev/null
+++ b/debian/_buildscripts/local/09_apps_development.sh
@@ -0,0 +1,17 @@
+#!/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
new file mode 100755
index 000000000..09290d0c0
--- /dev/null
+++ b/debian/_buildscripts/local/10_apps_games.sh
@@ -0,0 +1,11 @@
+#!/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/10_others_01.sh b/debian/_buildscripts/local/10_others_01.sh
deleted file mode 100755
index 5f1908833..000000000
--- a/debian/_buildscripts/local/10_others_01.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "applications/tdeio-sword"
-build_module "applications/bibletime"
-build_module "applications/desktop-effects-tde"
-build_module "applications/fusion-icon"
-build_module "metapackages/sudo-trinity"
-build_module "applications/kdpkg"
-build_module "applications/kgtk-qt3"
-build_module "applications/tdesudo"
-build_module "applications/kiosktool"
-build_module "applications/knights"
-build_module "libraries/libksquirrel"
-build_module "applications/ksquirrel"
-#build_module "applications/qt4-tqt-theme-engine"
-build_module "applications/rosegarden"
-build_module "applications/smartcardauth"
-build_module "applications/smb4k"
-build_module "applications/tdesvn"
-build_module "applications/tellico"
-
-set_log_end
diff --git a/debian/_buildscripts/local/11_apps_internet.sh b/debian/_buildscripts/local/11_apps_internet.sh
new file mode 100755
index 000000000..79b6c681d
--- /dev/null
+++ b/debian/_buildscripts/local/11_apps_internet.sh
@@ -0,0 +1,22 @@
+#!/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/11_others_02.sh b/debian/_buildscripts/local/11_others_02.sh
deleted file mode 100755
index d32da9a42..000000000
--- a/debian/_buildscripts/local/11_others_02.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-. ./internals/_build_set_common.sh
-
-#----------------------------
-set_log_start
-
-build_module "tde-i18n"
-if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then
- build_module "edeps/compiz-trinity"
- build_module "edeps/libcompizconfig-trinity"
- build_module "edeps/compiz-fusion-bcop-trinity"
- build_module "edeps/compiz-fusion-plugins-main-trinity"
- build_module "edeps/compiz-fusion-plugins-extra-trinity"
- build_module "edeps/compizconfig-python-trinity"
- build_module "edeps/pilot-link"
-fi
-build_module "applications/compizconfig-backend-tdeconfig"
-build_module "applications/kpilot"
-
-set_log_end
diff --git a/debian/_buildscripts/local/12_apps_office.sh b/debian/_buildscripts/local/12_apps_office.sh
new file mode 100755
index 000000000..c9baaecd1
--- /dev/null
+++ b/debian/_buildscripts/local/12_apps_office.sh
@@ -0,0 +1,24 @@
+#!/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
new file mode 100755
index 000000000..3c3dc30d4
--- /dev/null
+++ b/debian/_buildscripts/local/13_apps_multimedia.sh
@@ -0,0 +1,22 @@
+#!/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
new file mode 100755
index 000000000..d50b03a5c
--- /dev/null
+++ b/debian/_buildscripts/local/14_apps_tdeio.sh
@@ -0,0 +1,16 @@
+#!/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
new file mode 100755
index 000000000..8bffc9ab8
--- /dev/null
+++ b/debian/_buildscripts/local/15_apps_themes.sh
@@ -0,0 +1,23 @@
+#!/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
new file mode 100755
index 000000000..ee6061311
--- /dev/null
+++ b/debian/_buildscripts/local/16_apps_misc.sh
@@ -0,0 +1,26 @@
+#!/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/12_meta_packages.sh b/debian/_buildscripts/local/17_meta_packages.sh
index 637eb8b40..37d1a670c 100755
--- a/debian/_buildscripts/local/12_meta_packages.sh
+++ b/debian/_buildscripts/local/17_meta_packages.sh
@@ -5,20 +5,21 @@
#----------------------------
set_log_start
-build_module "defaultsettings/desktop-base"
-build_module "defaultsettings/kubuntu-default-settings"
-build_module "defaultsettings/redmond-default-settings"
-build_module "defaultsettings/redmond-default-settings-ii"
+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/tde-ubuntu-integration"
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"
diff --git a/debian/_buildscripts/local/91_build_base.sh b/debian/_buildscripts/local/91_build_base.sh
index 7dbec8316..b53ba9048 100755
--- a/debian/_buildscripts/local/91_build_base.sh
+++ b/debian/_buildscripts/local/91_build_base.sh
@@ -6,3 +6,4 @@ 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
index 45b26a5f1..d16b5cc54 100755
--- a/debian/_buildscripts/local/92_build_applications.sh
+++ b/debian/_buildscripts/local/92_build_applications.sh
@@ -1,9 +1,14 @@
#!/bin/bash
-./04_applications_01.sh
-./05_applications_02.sh
-./06_applications_03.sh
-./07_applications_04.sh
-./08_applications_05.sh
-./09_applications_06.sh
-
+./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/93_build_others.sh b/debian/_buildscripts/local/93_build_others.sh
deleted file mode 100755
index 0272604af..000000000
--- a/debian/_buildscripts/local/93_build_others.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-./10_others_01.sh
-./11_others_02.sh
-./12_meta_packages.sh \ No newline at end of file
diff --git a/debian/_buildscripts/local/99_build_TDE.sh b/debian/_buildscripts/local/99_build_TDE.sh
index 99b72ce05..1a80862a6 100755
--- a/debian/_buildscripts/local/99_build_TDE.sh
+++ b/debian/_buildscripts/local/99_build_TDE.sh
@@ -1,7 +1,8 @@
#!/bin/bash
# Load common code and initialization
-. ./internals/_build_common.sh
+export SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+. ${SCRIPT_DIR}/internals/_build_common.sh
init_common
_BUILDALL_TIMER=2
@@ -49,6 +50,6 @@ set_log_start
./91_build_base.sh
./92_build_applications.sh
-./93_build_others.sh
+./17_meta_packages.sh
set_log_end
diff --git a/debian/_buildscripts/local/README.txt b/debian/_buildscripts/local/README.txt
index c5daf21fb..d2ed9fc7e 100644
--- a/debian/_buildscripts/local/README.txt
+++ b/debian/_buildscripts/local/README.txt
@@ -14,6 +14,13 @@ A) Environment preparation
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.
+ - you need to choose whether to use standard git repository clones or use git worktrees.
+ Different instructions will be provided where necessary, based on the choice made.
+ - you need to choose whether to use standard git repository clones or use git worktrees.
+ Different instructions will be provided where necessary, based on the choice made.
+ - you need to choose whether to use pre built extra dependency packages or build them yourself.
+ Different instructions will be provided where necessary, based on the choice made.
+ More on this at point 9).
1) Install following packages: bc, cdbs, git, pbuilder, rsync and required dependencies.
NOTE: sudo should already be installed. If not, install sudo as well.
@@ -26,28 +33,44 @@ A) Environment preparation
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:
+ - in TDE_DIR/1_git:
edeps : contains extra dependency modules necessary to build TDE (this folder is not necessary
- is pre-built extra dependencies are used - see point 9 for more info)
+ 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
- - TDE main repo
- cd "$TDE_DIR/1_git"
- git clone https://mirror.git.trinitydesktop.org/gitea/TDE/tde
- cd tde
- git submodule init -- scripts
- git submodule update -- scripts
- ./scripts/switch_all_submodules_to_head_and_clean anonymous
-
-5) Add your user to the sudo group (not required if you are root)
- su -c "adduser <username> sudo"
- Logout and login again to make sure the new settings are applied.
+ 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). Mind the stand alone "-"!
+ su - -c "adduser <username> sudo"
+ Logout and login again to make sure the new settings are applied. If you forget this step, you will have build
+ errors when you first try to build a module.
* 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=<new timeout>", where the value is in
- minutes. Use a value of -1 to set an infinite timeout.
+ 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.
@@ -56,9 +79,11 @@ A) Environment preparation
sudo pbuilder create
If you wish to build for a different distro or architecture, use the command:
sudo DISTRO_NAME=<target distro> ARCHITECTURE=<target architecture> pbuilder create
-
+ If all goes well there should be no errors reported and a file named "base-<distro name>@<architecture>.tgz"
+ should be found at location "/var/cache/pbuilder/".
+
8) Setup the build scripts locally:
- - copy build scripts from "TDE_DIR/1_git/tde/packaging/debian/_buildscripts/local" to "TDE_DIR/buildscripts"
+ - copy the contents of "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
@@ -67,54 +92,44 @@ A) Environment preparation
* 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.
+ * 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, but the procedure is a bit cumbersome. Alternatively, Slavek Banko's
- pre-built binaries can be used.
-
- 9.1) Using pre-built extra dependencies (recommended option)
+9) Some additional packages (referred to as extra dependencies) are required to build and install TDE in debian/devuan/ubuntu.
+ These modules can be built locally or alternatively pre-built binaries from the TDE archive 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 ---
- # - temporarily disabled -
- # - http://mirror.ppa.trinitydesktop.org/trinity-testing/dists <YOUR DISTRO> deps
- deb http://mirror.ppa.trinitydesktop.org/trinity-sb <YOUR DISTRO> deps-r14
- * For R14.0.x series (repository branch "r14.0.x")
- # --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY ---
- deb http://mirror.ppa.trinitydesktop.org/trinity-sb <YOUR DISTRO> 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
- - open "_config.sh" and set the variable USE_PREBUILD_EXTRA_DEPS to "n"
- - install the following packages: links2 and required dependencies.
- - using links2 (or another browser), download the source code for the extra dependency modules from
- Slavek's PPA (usually more recently updated):
- https://quickbuild.pearsoncomputing.net/~slavek-banko/+archive/deps-r14/+packages
- or from the official PPA:
- https://quickbuild.pearsoncomputing.net/~trinity/+archive/trinity-nightly-build-dependencies/+packages
- NOTES:
- * Once the page open in your browser, select your distro in the combobox near the "Filter" button and click
- the button to update. You should get a list of 10-15 modules, depending on the distro.
- * Click on one module at a time, it will expand (or open another page) and show a list of .deb and other files.
- * Save those files (exclude .deb files. Only .orig.tar.xz, .dsc, .debian.tar.xz are required) and store
- them to TDE_DIR/1_git/edeps/<MODULE NAME> folder (one folder per 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 <YOUR DISTRO> main
- For example:
- deb [trusted=yes] file:/home/tde_src/3_repo buster main
-
-
-
+ - create the file /etc/apt/sources.list.d/tde.list add the following lines to it. This will setup the
+ correct repository in apt for installing the required extra dependency packages.
+ * For R14.2.x series (repository branch "master")
+ # --- TDE EXTRA DEPENDENCIES REPOSITORY ---
+ deb http://mirror.ppa.trinitydesktop.org/trinity-testing <YOUR DISTRO> deps
+ * For R14.1.x series (repository branch "r14.1.x")
+ # --- TDE EXTRA DEPENDENCIES REPOSITORY ---
+ deb http://mirror.ppa.trinitydesktop.org/trinity-sb <YOUR DISTRO> deps-r14
+ For example:
+ deb http://mirror.ppa.trinitydesktop.org/trinity-sb buster deps-r14
+
+ - install package dirmngr if required
+ - import the TDE archive signing key into your apt keyring
+ sudo wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.deb
+ sudo dpkg -i trinity-keyring.deb
+
+ 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) If needed, create the file /etc/apt/sources.list.d/tde.list. Then add the following lines to it.
+ This will setup your local repository in apt.
+ # --- LOCAL TDE REPOSITORY ---
+ deb [trusted=yes] file:$TDE_DIR/3_repo <YOUR DISTRO> main
+ For example:
+ deb [trusted=yes] file:/home/tde_src/3_repo buster main
+
+
+
----------------------
B) Notes about scripts
----------------------
@@ -135,17 +150,17 @@ When building sets of modules or the whole TDE, a global build summary is automa
- scripts in 'internals' folder
Scripts used intenally by other scripts. No need for invoking these directly.
-- update_git_repository.sh:
+- 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_git_repository.sh [options]
+ 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,
+ (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 "<branches>" (Update Branches) : allows to specify the branches to update. This override the variable
@@ -164,62 +179,68 @@ When building sets of modules or the whole TDE, a global build summary is automa
tdebase
applications/abakus
dependencies/libr
- edeps/imlib
+ 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
+ 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 <folder> (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)
- -ip (Internal Pbuilder): build using internal pbuilder mode (experimental)
-
+ module_name : the module to build. If '-p <folder>' is used, this parameter must not be specified since the module
+ is derived from the <folder> parameter.
+
- <dd>_<set_name>.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
+ Modules are built from the git sources and the build result is automatically appended to
TDE_DIR/0_logs/build_result.log.
Usage:
- <dd>_<set_name>.sh [options] set_name
+ <dd>_<set_name>.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 "others"
- 00_extradeps.sh : extra dependencies modules
- 01_base_01.sh - 03_base_03.sh : TDE base system
- 04_application_01.sh - 09_application_06.sh : application modules
- 10_others_01.sh - 11_others_02.sh : other modules that are somehow less used
- 91_build_base.sh : whole TDE base system in 00_extradeps.sh - 03_base_03.sh
- 92_build_applications.sh : all TDE applications in 04_application_01.sh - 09_application_06.sh
- 93_build_others.sh : all modules in 10_others_01.sh - 11_others_02.sh
+ 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. Calls the dd_setname.sh set scripts in order.
+ Script used to build the complete TDE at once.
Usage:
- build_TDE.sh
-
+ 99_build_TDE.sh
+
- create_repo.sh
- Creates a local repository from the .deb files currently stored in TDE_DIR/2_build/debs.
+ 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:
+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
+- 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/<MODULE NAME> 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.
@@ -235,7 +256,7 @@ C) How to use the scripts
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.
+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
@@ -243,15 +264,15 @@ C) How to use the scripts
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
+ - ./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.
@@ -259,13 +280,13 @@ Examples of real usage:
- ./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.
+ ./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 \ No newline at end of file
+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
index 599489272..52402895e 100644
--- a/debian/_buildscripts/local/additional_files/etc/pbuilderrc
+++ b/debian/_buildscripts/local/additional_files/etc/pbuilderrc
@@ -7,8 +7,10 @@ USEDEVPTS=yes
USEDEVFS=no
# the username and ID used by pbuilder, inside chroot. Needs fakeroot, really
-BUILDUSERID=1234
-BUILDUSERNAME=pbuilder
+BUILDSOURCEROOTCMD=""
+BUILDUSERNAME=""
+BUILDUSERID=""
+
# make debconf not interact with user
export DEBIAN_FRONTEND="noninteractive"
@@ -43,35 +45,25 @@ BASETGZ="/var/cache/pbuilder/base-$DISTRIBUTION@$ARCHITECTURE.tgz"
#-- select apt components
case "$DISTRIBUTION" in
# debian
- jessie)
- if [[ "$DISTRO" = "devuan" ]]; then
- COMPONENTS="main"
- DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
- EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring"
- else
- COMPONENTS="main contrib non-free"
- fi
- ;;
-
- sid|bullseye|buster|stretch|wheezy)
+ sid|trixie|bookwork|bullseye|buster)
COMPONENTS="main contrib non-free"
;;
# devuan
- ceres|chimaera|beowulf|ascii)
+ ceres|daedalus|chimaera|beowulf)
COMPONENTS="main"
DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring"
;;
# ubuntu
- groovy|focal|eoan|disco|bionic|xenial|trusty)
+ mantic|lunar|kinetic|jammy|focal|bionic)
COMPONENTS="main restricted universe multiverse"
DEBOOTSTRAPOPTS=(--variant=buildd)
;;
# raspbian
- raspbian-bullseye|raspbian-buster|raspbian-stretch|raspbian-jessie)
+ raspbian-bookworm|raspbian-bullseye|raspbian-buster)
COMPONENTS="main contrib non-free"
DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg)
;;
@@ -81,29 +73,17 @@ EXTRAPACKAGES="$EXTRAPACKAGES fakeroot apt-transport-https ca-certificates"
#-- select base apt sources
case "$DISTRIBUTION" in
# debian
- sid|bullseye|buster|stretch)
+ sid|trixie|bookwork|bullseye|buster)
MIRRORSITE=http://deb.debian.org/debian
;;
- jessie)
- if [[ "$DISTRO" = "devuan" ]]; then
- MIRRORSITE=http://auto.mirror.devuan.org/merged
- else
- MIRRORSITE=http://deb.debian.org/debian
- fi
- ;;
-
- wheezy)
- MIRRORSITE=http://archive.debian.org/debian
- ;;
-
# devuan
- ceres|chimaera|beowulf|ascii)
- MIRRORSITE=http://auto.mirror.devuan.org/merged
+ ceres|daedalus|chimaera|beowulf)
+ MIRRORSITE=http://pkgmaster.devuan.org/merged
;;
# ubuntu
- groovy|focal|eoan|disco|bionic|xenial|trusty)
+ mantic|lunar|kinetic|jammy|focal|bionic)
if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then
MIRRORSITE=http://archive.ubuntu.com/ubuntu
else
@@ -112,7 +92,7 @@ case "$DISTRIBUTION" in
;;
# raspbian
- raspbian-bullseye|raspbian-buster|raspbian-stretch|raspbian-jessie)
+ raspbian-bookworm|raspbian-bullseye|raspbian-buster)
MIRRORSITE=http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian
;;
esac
@@ -128,12 +108,7 @@ APTCACHE="/var/cache/pbuilder/aptcache/$DISTRO-$DISTRIBUTION/"
if [ -n "$APTCACHE" ] && [ ! -d "$APTCACHE" ]; then
mkdir $APTCACHE
fi
-if [ -z "$(stat -L --print "%d\n" $APTCACHE/. /var/cache/pbuilder/build/. | uniq -d)" ]; then
- # apt cache for build on tmpfs is managed by hook scripts
- BINDMOUNTS="${BINDMOUNTS} ${APTCACHE}"
- APTCACHEHARDLINK=no
- APTCACHE=""
-fi
+APTCACHEHARDLINK=no
#-- extra options
DEBBUILDOPTS="-b"
@@ -142,20 +117,5 @@ 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|bullseye|buster|stretch|\
- ceres|chimaera|beowulf|ascii|\
- raspbian-bullseye|raspbian-buster|raspbian-stretch|\
- groovy|focal|eoan|disco|bionic)
- PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"
- ;;
-
- jessie|wheezy|\
- raspbian-jessie|\
- xenial|trusty)
- PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-aptitude"
- ;;
-esac
+#-- dependency solver
+PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"
diff --git a/debian/_buildscripts/local/build_module.sh b/debian/_buildscripts/local/build_module.sh
index f999da0eb..e8ccec472 100755
--- a/debian/_buildscripts/local/build_module.sh
+++ b/debian/_buildscripts/local/build_module.sh
@@ -4,7 +4,8 @@
#
# Load common code and initialization
-. ./internals/_build_common.sh
+export SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+. ${SCRIPT_DIR}/internals/_build_common.sh
init_common
@@ -17,7 +18,7 @@ exec_time_start $_BUILDMOD_TIMER_NUM
# Need sudo for non-root users
SUDO_CMD=""
if [ "`whoami`" != "root" ]; then
- SUDO_CMD="sudo -E"
+ SUDO_CMD="sudo -E"
fi
@@ -26,19 +27,19 @@ fi
# $1 - error code
function do_exit()
{
- cd "$SCRIPT_DIR"
- if [ $1 -eq 0 ]; then
- echo -e "${CGreen}#### Processing module ${CLightGreen}\"$MOD_GIVEN\"${CGreen} succeeded ####${CNone}"
+ 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_GIVEN\"${CRed} failed ($1) ####${CNone}"
+ 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
+ fi
+ exit $1
}
@@ -48,35 +49,15 @@ function do_exit()
function recreate_folder()
{
if [ -d "$1" ]; then
- $SUDO_CMD rm -R "$1"
- fi
- mkdir -p "$1"
-}
-
-
-#----------------------------
-# Set module related path variables
-# Parameters:
-# $1 - module name
-function set_module_paths()
-{
- local LOC_MOD_NAME=$1
- if [ "$bool_EXTRADEP_MOD" != "y" ]; then
- # Standard module
- MOD_GIT_PATH="$REPO_TDE_MAIN/$LOC_MOD_NAME"
- MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$LOC_MOD_NAME/debian"
- else
- # Extra dependency module
- MOD_GIT_PATH="$REPO_DIR/$LOC_MOD_NAME"
- fi
- export MOD_BUILD_PATH="$TDE_BUILD_DIR/$LOC_MOD_NAME"
- MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
+ $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 new module name if found.
+# Set the module name and paths if found.
# Parameters:
# $1 - module name
function search_module()
@@ -85,26 +66,59 @@ function search_module()
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$"`
+ 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 found in GIT
+ # Unique module
MODULE_FOUND="y"
MOD_NAME=$LOC_MATCH
- set_module_paths $MOD_NAME
- else
- # Search in extra dependency folder
- LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES" | grep "^$LOC_MOD_NAME$"`
- if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
- # Unique module found in extra dependency folder
+ 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"
- bool_EXTRADEP_MOD="y"
- MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH"
- set_module_paths $MOD_NAME
+ 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
+ export MOD_BUILD_PATH
+ MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
IFS=$OLDIFS
}
@@ -112,54 +126,107 @@ function search_module()
#----------------------------
# Check command line arguments and set options
#----------------------------
-MOD_GIVEN="" # the name of the specified module
+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_BUILD_LOCALLY="n"
bool_LOG_RESULT="n"
bool_SHELL_HOOK="n"
bool_PREPARE_ONLY="n"
bool_DEBUG_MODE="n"
-bool_INTERNAL_PBUILDER="n"
-for arg in $@; do
- if [ "$arg" = "-g" ]; then # select code to build from Git repo (-g) or from local build copy
- bool_BUILD_FROM_GIT="y"
- elif [ "$arg" = "-l" ]; then # build module Locally instead of in a clean chroot environment
- bool_BUILD_LOCALLY="y"
- elif [ "$arg" = "-sl" ]; then # output the building logs to terminal (ShowLog)
- bool_SHOW_BUILD_LOGS="y"
- elif [ "$arg" = "-lr" ]; then # Log build Result to file
- bool_LOG_RESULT="y"
- elif [ "$arg" = "-sh" ]; then # install Shell Hook for failing builds (only valid if NOT building locally)
- bool_SHELL_HOOK="y"
- elif [ "$arg" = "-po" ]; then # Prepare build folder Only but do not build
- bool_PREPARE_ONLY="y"
- elif [ "$arg" = "-d" ]; then # build with Debug symbols (used in hook scripts)
- bool_DEBUG_MODE="y"
- elif [ "$arg" = "-ip" ]; then # build using Internal Pbuilder (experimental)
- bool_INTERNAL_PBUILDER="y"
- elif [ "$MOD_GIVEN" = "" ]; then # module to be built
- MOD_GIVEN="$arg"
- fi
+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
-MOD_NAME=$MOD_GIVEN # the actal module to be built
+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
+ 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_GIVEN\" ####${CNone}"
+echo -e "${CLightCyan}#### Processing module \"$MOD_NAME\" ####${CNone}"
if [ "$MOD_NAME" = "" ]; then
echo "Please specify the module to build"
do_exit 3
fi
-# Shell hook is only valid if not building locally
-# Internal pbuilder option has no meaning if we are building locally
+# Shell hooks are only valid if not building locally
if [ "bool_BUILD_LOCALLY" = "y" ]; then
bool_SHELL_HOOK="n"
- bool_INTERNAL_PBUILDER="n"
fi
export bool_SHELL_HOOK
-export bool_INTERNAL_PBUILDER
# Local option variables
# - sign packages
@@ -167,19 +234,19 @@ OPT_SIGN_PKG_LOCAL="--no-sign"
# - show logs
OPT_SHOW_LOGS="&>"
if [ "$bool_SHOW_BUILD_LOGS" = "y" ]; then
- OPT_SHOW_LOGS=" | tee "
+ 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")
+ 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
+ do_exit 4
fi
done
@@ -201,57 +268,36 @@ done
#----------------------------
# Check if module is an extra dependency
if [[ $MOD_NAME =~ ^$CFG_EXTRA_DEPS_DIR/ ]]; then
- bool_EXTRADEP_MOD="y"
+ 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
-set_module_paths $MOD_NAME
if [ "$bool_BUILD_FROM_GIT" = "y" ]; then
echo -e "${CYellow}> Building from GIT repo${CNone}"
- # source files
- if [ ! -d "$MOD_GIT_PATH" ]; then
- MODULE_FOUND="n"
- search_module $MOD_NAME
- if [ "$MODULE_FOUND" != "y" -o ! -d "$MOD_GIT_PATH" ]; then
- echo "Module \"$MOD_NAME\" not found in GIT"
- do_exit 5
- fi
- fi
+
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
+ do_exit 6
fi
- bool_COPY_PKGING_FILES="y"
- #
else
echo -e "${CYellow}> Building from BUILD folder${CNone}"
- # source files
- bool_COPY_MOD_SRC="n"
+
if [ ! -d "$MOD_BUILD_PATH" ]; then
- if [ ! -d "$MOD_GIT_PATH" ]; then
- MODULE_FOUND="n"
- search_module $MOD_NAME
- if [ "$MODULE_FOUND" != "y" -o ! -d "$MOD_GIT_PATH" ]; then
- echo "Module \"$MOD_NAME\" not found neither in BUILD nor in GIT"
- do_exit 7
- fi
- fi
- if [ ! -d "$MOD_BUILD_PATH" ]; then
- bool_COPY_MOD_SRC="y"
- fi
+ echo "Build folder for \"$MOD_NAME\" not found"
+ do_exit 7
fi
-
- # packaging scripts
+ bool_COPY_MOD_SRC="n"
bool_COPY_PKGING_FILES="n"
- if [ "$bool_EXTRADEP_MOD" != "y" -a ! -d "$MOD_BUILD_PKGING_PATH" ]; then
- if [ ! -d "$MOD_GIT_PKGING_PATH" ]; then
- echo "Packaging for \"$MOD_NAME\" not found neither in BUILD nor in GIT"
- do_exit 8
- fi
- bool_COPY_PKGING_FILES="y"
- fi
fi
@@ -264,38 +310,59 @@ if [ -d "$MOD_BUILD_PATH" ]; then
$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"
+ 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/.."
+ 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"
- cd "$MOD_GIT_PATH"
- 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`
+ 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
- if [ `find "$MOD_GIT_PATH" -name '*.dsc' | wc -l` == 1 ]; then
- if [ -d "$MOD_BUILD_PATH" ]; then
- $SUDO_CMD rm -R "$MOD_BUILD_PATH"
- fi
- eval dpkg-source --no-copy --no-check -x `find "$MOD_GIT_PATH" -name '*.dsc'` \
- \"$MOD_BUILD_PATH\" $OPT_SHOW_LOGS/dev/null
+ # 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"
+ cp /dev/null "$MOD_BUILD_PATH/debian/patches/series"
fi
else
- echo "There must be one and only one .dsc file in \"$MOD_GIT_PATH\""
+ echo "There must be one and only one module folder in \"$MOD_GIT_PATH\""
do_exit 9
fi
fi
@@ -304,59 +371,39 @@ 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"
-
- # TODO metapackage support
-
- # Default package name
- # Calculate package version
- 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`
- package=$(basename $PWD)-trinity-$TDE_RELEASE
- if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
- package=$package~pre$count+$(git rev-parse HEAD | cut -c 1-8)
- fi
- REL=4:$TDE_RELEASE${package#*$TDE_RELEASE}
- REL=${REL%+*}
- REL=${REL/4:14.0.0/4:14.0.0-s}
- REL=${REL/4:14.0.0-s~pre/4:14.0.0-s~}
- REL=${REL/.0~pre/.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"
+ $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
@@ -372,25 +419,27 @@ recreate_folder "$MOD_DEBSRC_PATH"
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
+ 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/"`
+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_PATH/debian/changelog" | sed -n -e 's|^Date: ||p'`
-tar cJf "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz" --exclude="debian" --exclude=".git*" \
+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"
@@ -438,20 +487,20 @@ if [ "$bool_BUILD_LOCALLY" = "y" ]; then
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
- build_retval=$?
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
+ 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
@@ -467,11 +516,11 @@ fi
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
+ if [ $? -eq 0 ]; then
+ echo -e "${CBrown}Post-build hook applied successfully${CNone}"
+ else
+ echo -e "${CLightBlue}Post-build hook failed${CNone}"
+ fi
fi
#----------------------------
diff --git a/debian/_buildscripts/local/create_repo.sh b/debian/_buildscripts/local/create_repo.sh
index f03f92e84..222cb7740 100755
--- a/debian/_buildscripts/local/create_repo.sh
+++ b/debian/_buildscripts/local/create_repo.sh
@@ -4,7 +4,8 @@
#
# Load common code and initialization
-. ./internals/_build_common.sh
+export SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+. ${SCRIPT_DIR}/internals/_build_common.sh
init_common
#----------------------------
diff --git a/debian/_buildscripts/local/internals/_build_common.sh b/debian/_buildscripts/local/internals/_build_common.sh
index 105134084..0a17cb700 100755
--- a/debian/_buildscripts/local/internals/_build_common.sh
+++ b/debian/_buildscripts/local/internals/_build_common.sh
@@ -42,177 +42,197 @@ set +a
# $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
+ 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"
- REPO_TDE="$TDE_DIR/$CFG_GIT_DIR/tde"
- REPO_TDE_MAIN="$REPO_TDE/main"
- REPO_TDE_PACKAGING="$TDE_DIR/$CFG_GIT_DIR/tde/packaging/$DISTRO/$DISTRO_NAME"
- REPO_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR"
-
- BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR"
- TDE_BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR/build"
- TDE_DEBS_DIR="$TDE_DIR/$CFG_BUILD_DIR/debs"
-
- HOOK_DIR="$TDE_DIR/$CFG_GIT_DIR/$CFG_HOOKS_DIR"
-
+ # 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
+ 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()
{
- # 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 main TDE repo
- CURR_DIR=""
- [ -d "$REPO_TDE_MAIN" ] && cd "$REPO_TDE_MAIN" &>/dev/null && \
- CURR_DIR=$(git rev-parse --show-toplevel 2>/dev/null)
- if [ -z "$CURR_DIR" ]; 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} variable as required, then rerun this script."
- exit 6
- fi
-
- # Check branch configuration
- # - branch existance
- UPDATE_BRANCHES="${OVERRIDE_UPDATE_BRANCHES:-$UPDATE_BRANCHES}"
- cd "$REPO_TDE"
- BRANCHES=()
- 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
+ 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 "$SCRIPT_DIR"
+ 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}"
}
diff --git a/debian/_buildscripts/local/internals/_build_set_common.sh b/debian/_buildscripts/local/internals/_build_set_common.sh
index 4bc1ea3e8..82e7e8bba 100755
--- a/debian/_buildscripts/local/internals/_build_set_common.sh
+++ b/debian/_buildscripts/local/internals/_build_set_common.sh
@@ -1,7 +1,8 @@
#!/bin/bash
# Load common code and initialization
-. ./internals/_build_common.sh
+export SCRIPT_DIR=$(dirname $(readlink -f "$0"))
+. ${SCRIPT_DIR}/internals/_build_common.sh
init_common
_BUILDSET_TIMER=1
@@ -52,7 +53,7 @@ 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 $@"
+ ./build_module.sh ${BUILD_DEFAULT_OPTIONS} "$@"
echo
fi
}
diff --git a/debian/_buildscripts/local/internals/_config_template.sh b/debian/_buildscripts/local/internals/_config_template.sh
index 232d99799..7c1e929c6 100644
--- a/debian/_buildscripts/local/internals/_config_template.sh
+++ b/debian/_buildscripts/local/internals/_config_template.sh
@@ -5,8 +5,8 @@ set -a
#----------------------------
# Repo information
#----------------------------
-TDE_DIR="" # TDE root folder
-UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.0.x
+TDE_DIR="" # TDE root folder
+UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.1.x
DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to this branch. Must be
# one of the branches specified in UPDATE_BRANCHES
@@ -14,12 +14,12 @@ DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to th
# 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
+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
+GPG_SIGN_KEYID="" # Use this GPG key to sign packages. If null, packages will not be signed
#----------------------------
# Base directories
@@ -28,7 +28,7 @@ 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
+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
index 870758df0..b520a93af 100755
--- a/debian/_buildscripts/local/internals/_pbuilder.sh
+++ b/debian/_buildscripts/local/internals/_pbuilder.sh
@@ -2,110 +2,104 @@
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"
-
- # Local option variables
- # - internal pbuilder
- OPT_INTERNAL_PBUILDER=""
- if [ "$bool_INTERNAL_PBUILDER" = "y" ]; then
- OPT_INTERNAL_PBUILDER="--use-pdebuild-internal"
- fi
- # 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 <<END_D05_01 > "$PBUILDER_DEPS_HOOK"
+ # 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 <<END_D05_01 > "$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 <<END_D05_02 >> "$PBUILDER_DEPS_HOOK"
+ 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 <<END_D05_02 >> "$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 <<END_D05_02 >> "$PBUILDER_DEPS_HOOK"
+ 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 <<END_D05_03 >> "$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 <<END_D05_03 >> "$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_INTERNAL_PBUILDER $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
+ break
+ fi
+ done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$")
+ fi
+ IFS=$OLD_IFS
+ fi
+ fi
+ cat <<END_D05_04 >> "$PBUILDER_DEPS_HOOK"
+apt-get update
+END_D05_04
+ 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 \ No newline at end of file
+run_pdebuild
diff --git a/debian/_buildscripts/local/internals/distro_list.txt b/debian/_buildscripts/local/internals/distro_list.txt
index 84184c1b0..ba1dab204 100644
--- a/debian/_buildscripts/local/internals/distro_list.txt
+++ b/debian/_buildscripts/local/internals/distro_list.txt
@@ -10,31 +10,27 @@
#
# debian
-debian 7.0 wheezy - -
-debian 8.0 jessie - -
-debian 9.0 stretch - -
-debian 10.0 buster - -
-debian 11.0 bullseye ~a -
-debian 12.0 sid ~b -
+debian 10.0 buster - -
+debian 11.0 bullseye - -
+debian 12.0 bookworm - -
+debian 13.0 trixie ~a -
+debian 14.0 sid ~b -
# devuan
-devuan 1.0 jessie - debian/jessie
-devuan 2.0 ascii - debian/stretch
-devuan 3.0 beowulf - debian/buster
-devuan 4.0 chimaera ~a debian/bullseye
-devuan 5.0 ceres ~b debian/sid
+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 8.0 raspbian-jessie - -
-raspbian 9.0 raspbian-stretch - -
-raspbian 10.0 raspbian-buster - -
-raspbian 11.0 raspbian-bullseye ~a -
+raspbian 10.0 raspbian-buster - -
+raspbian 11.0 raspbian-bullseye - -
+raspbian 12.0 raspbian-bookworm ~a -
# ubuntu
-ubuntu 14.04 trusty - -
-ubuntu 16.04 xenial - -
-ubuntu 18.04 bionic - -
-ubuntu 19.04 disco - -
-ubuntu 19.10 eoan - -
-ubuntu 20.04 focal - -
-ubuntu 20.10 groovy ~a -
+ubuntu 18.04 bionic - -
+ubuntu 20.04 focal - -
+ubuntu 22.04 jammy - -
+ubuntu 22.10 kinetic - -
+ubuntu 23.04 lunar - -
+ubuntu 23.10 mantic ~a -
diff --git a/debian/_buildscripts/local/internals/extra_deps.txt b/debian/_buildscripts/local/internals/extra_deps.txt
index b19514d84..521b16d0c 100644
--- a/debian/_buildscripts/local/internals/extra_deps.txt
+++ b/debian/_buildscripts/local/internals/extra_deps.txt
@@ -5,5 +5,5 @@
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
+ r14.1.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
index 91425f8a7..57305c59d 100755
--- a/debian/_buildscripts/local/update_repositories.sh
+++ b/debian/_buildscripts/local/update_repositories.sh
@@ -5,35 +5,41 @@
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 <branch>'
- # is given, '-db <branch> is ignored
- OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}"
- fi
- elif [ "$arg" = "-so" ]; then # switch branch only (Switch Only)
- flag_SWITCH_ONLY="y" && ((idx++))
- OVERRIDE_DEFAULT_REPO_BRANCH="${!idx}"
- fi
+ 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 <branch>'
+ # is given, '-db <branch> 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
-. ./internals/_build_common.sh
+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
+UPDATE_LOCK_FILENAME="/var/lock/TDE_update_repo_lock" # Lock file for incremental update
declare -A RESULT_STRINGS=(
[OK]="[ OK ]"
@@ -58,131 +64,347 @@ declare -A COLOR_STRINGS=(
# $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"
+ 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
+# $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 "$@"
+ 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_PATH; do
- cd "$MOD_PATH" &>/dev/null
- if [[ -z "`git config --get submodule.$SUBMOD_PATH.url`" ]]; then
- eval git submodule init -- \"$SUBMOD_PATH\" $OPT_VERBOSE_LOG
- fi
- if [[ ! -e "$MOD_PATH/$SUBMOD_PATH/.git" ]]; then
- eval git submodule update -- \"$SUBMOD_PATH\" $OPT_VERBOSE_LOG
- fi
- _update_module "$MOD_PATH/$SUBMOD_PATH" "$OP_TYPE" "$BRANCH"
- done
- fi
+ 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"
+ [ -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\""
+ OPT_VERBOSE_LOG=" |& tee -a \"$LOG_UPDATE_REPO_FILENAME\""
fi
#----------------------------
@@ -198,50 +420,94 @@ fi
# Start update
if [ "$flag_INCREMENTAL" != "y" ]; then
- echo "TDE repositories update started" > "$UPDATE_LOCK_FILENAME"
+ echo "TDE repositories update started" > "$UPDATE_LOCK_FILENAME"
fi
-_LAST_BRANCH=""
-if [[ "$flag_SWITCH_ONLY" != "y" ]]; then
- # Fetch all remotes first
- echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y"
- echo_and_tee "${CLightCyan} Fetching remotes ${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
+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"
-# 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"
-
- echo -e "\033[2K"
- echo "" >> "$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