diff options
Diffstat (limited to 'debian/_buildscripts/local/scripts')
34 files changed, 0 insertions, 1995 deletions
diff --git a/debian/_buildscripts/local/scripts/00_extradeps.sh b/debian/_buildscripts/local/scripts/00_extradeps.sh deleted file mode 100755 index 4764dbc4c..000000000 --- a/debian/_buildscripts/local/scripts/00_extradeps.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "dependencies/libr" -build_module "edeps/gettext-kde" -build_module "dependencies/akode" -build_module "edeps/fireflies" -build_module "edeps/imlib" -build_module "edeps/opensync" -build_module "edeps/libbeagle" -build_module "edeps/pcsc-lite-nodbus" -build_module "edeps/lcms" -build_module "edeps/wv2" -build_module "edeps/jasper" -build_module "edeps/openslp-dfsg" - -set_log_end diff --git a/debian/_buildscripts/local/scripts/01_base_01.sh b/debian/_buildscripts/local/scripts/01_base_01.sh deleted file mode 100755 index d9611d13d..000000000 --- a/debian/_buildscripts/local/scripts/01_base_01.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -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-tls" -build_module "dependencies/libart-lgpl" -build_module "dependencies/avahi-tqt" -build_module "dependencies/libcaldav" -build_module "dependencies/libcarddav" -build_module "tdelibs" -build_module "libraries/libtdeldap" -build_module "tdebase" - -set_log_end diff --git a/debian/_buildscripts/local/scripts/02_base_02.sh b/debian/_buildscripts/local/scripts/02_base_02.sh deleted file mode 100755 index f92cb7f17..000000000 --- a/debian/_buildscripts/local/scripts/02_base_02.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "dependencies/sip4-tqt" -build_module "dependencies/tqscintilla" -build_module "dependencies/python-tqt" -build_module "libraries/python-trinity" -build_module "libraries/pytdeextensions" -build_module "tdebindings" -build_module "tdeutils" -build_module "tdemultimedia" -build_module "tdeaccessibility" -build_module "tdenetwork" -build_module "tdeadmin" - -set_log_end diff --git a/debian/_buildscripts/local/scripts/03_base_03.sh b/debian/_buildscripts/local/scripts/03_base_03.sh deleted file mode 100755 index 11209ff55..000000000 --- a/debian/_buildscripts/local/scripts/03_base_03.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -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" - -set_log_end diff --git a/debian/_buildscripts/local/scripts/04_applications_01.sh b/debian/_buildscripts/local/scripts/04_applications_01.sh deleted file mode 100755 index 4901f3d9e..000000000 --- a/debian/_buildscripts/local/scripts/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/scripts/05_applications_02.sh b/debian/_buildscripts/local/scripts/05_applications_02.sh deleted file mode 100755 index 489f832d4..000000000 --- a/debian/_buildscripts/local/scripts/05_applications_02.sh +++ /dev/null @@ -1,29 +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 "libraries/libtdeldap" -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/scripts/06_applications_03.sh b/debian/_buildscripts/local/scripts/06_applications_03.sh deleted file mode 100755 index 75a8a7e15..000000000 --- a/debian/_buildscripts/local/scripts/06_applications_03.sh +++ /dev/null @@ -1,29 +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/kmplayer" -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/scripts/07_applications_04.sh b/debian/_buildscripts/local/scripts/07_applications_04.sh deleted file mode 100755 index f21a6e24f..000000000 --- a/debian/_buildscripts/local/scripts/07_applications_04.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "applications/koffice" -build_module "applications/koffice-i18n" -build_module "applications/keximdb" -build_module "applications/konversation" -build_module "applications/kooldock" -build_module "applications/kopete-otr" -build_module "applications/kpicosim" -build_module "applications/kpilot" -build_module "applications/kplayer" -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/kuickshow" -build_module "applications/kvirc" -build_module "applications/kvkbd" -build_module "applications/kvpnc" -build_module "applications/kxmleditor" - -set_log_end - diff --git a/debian/_buildscripts/local/scripts/08_applications_05.sh b/debian/_buildscripts/local/scripts/08_applications_05.sh deleted file mode 100755 index 2d7622b15..000000000 --- a/debian/_buildscripts/local/scripts/08_applications_05.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -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/tde-guidance" -build_module "applications/tdeio-apt" -build_module "applications/tdeio-ftps" -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-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/scripts/09_others_01.sh b/debian/_buildscripts/local/scripts/09_others_01.sh deleted file mode 100755 index 0d43fe983..000000000 --- a/debian/_buildscripts/local/scripts/09_others_01.sh +++ /dev/null @@ -1,28 +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/kerry" -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/scripts/10_others_02.sh b/debian/_buildscripts/local/scripts/10_others_02.sh deleted file mode 100755 index aa21f8dd1..000000000 --- a/debian/_buildscripts/local/scripts/10_others_02.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -. ./internals/_build_set_common.sh - -#---------------------------- -set_log_start - -build_module "tde-i18n" -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 "applications/compizconfig-backend-tdeconfig" - -set_log_end diff --git a/debian/_buildscripts/local/scripts/91_build_base.sh b/debian/_buildscripts/local/scripts/91_build_base.sh deleted file mode 100755 index a631a814f..000000000 --- a/debian/_buildscripts/local/scripts/91_build_base.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -./00_extradeps.sh -./01_base_01.sh -./02_base_02.sh -./03_base_03.sh diff --git a/debian/_buildscripts/local/scripts/92_build_applications.sh b/debian/_buildscripts/local/scripts/92_build_applications.sh deleted file mode 100755 index 174464c41..000000000 --- a/debian/_buildscripts/local/scripts/92_build_applications.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -./04_applications_01.sh -./05_applications_02.sh -./06_applications_03.sh -./07_applications_04.sh -./08_applications_05.sh - diff --git a/debian/_buildscripts/local/scripts/93_build_others.sh b/debian/_buildscripts/local/scripts/93_build_others.sh deleted file mode 100755 index c1222f8b0..000000000 --- a/debian/_buildscripts/local/scripts/93_build_others.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./09_others_01.sh -./10_others_02.sh
\ No newline at end of file diff --git a/debian/_buildscripts/local/scripts/99_build_TDE.sh b/debian/_buildscripts/local/scripts/99_build_TDE.sh deleted file mode 100755 index 32d4e4375..000000000 --- a/debian/_buildscripts/local/scripts/99_build_TDE.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -# Load common code and initialization -. ./internals/_build_common.sh -init_common - -_BUILDALL_TIMER=2 -_BUILDALL_TIME="--/--:--:--:---" - -parm_SKIP_FETCH="n" # if "y" skips N packages from the list -parm_SKIP_N=0 # this argument represents the number of packages to skip -SKIP_cnt=0 - - -#---------------------------- -# do_exit for set building -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGray}#### Building process for TDE completed ####${CNone}" - else - echo -e "${CGray}#### Building process for TDE interrupted ($1) ####${CNone}" - fi - exit $1 -} - - -#---------------------------- -function set_log_start() -{ - echo -e "${CGray}#### Starting building process for TDE ####${CNone}" - echo - echo "********** TDE **********" >>"$LOG_RESULT_FILENAME" - exec_time_start $_BUILDALL_TIMER -} - - -#---------------------------- -function set_log_end() -{ - exec_time_stop $_BUILDALL_TIMER "_BUILDALL_TIME" - echo " [$_BUILDALL_TIME] All TDE " >>"$LOG_RESULT_FILENAME" - echo >>"$LOG_RESULT_FILENAME" - do_exit 0 -} - - -#---------------------------- -function build_set() -{ - if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then - SKIP_cnt=$((SKIP_cnt+1)) - else - ./build_module.sh -g -lr "$@" - echo - fi -} - - -#---------------------------- -# Check command line arguments -#---------------------------- -for arg in $@; do - if [ "$parm_SKIP_FETCH" = "y" ]; then - parm_SKIP_N=$arg - parm_SKIP_FETCH="n" - elif [ "$arg" = "-s" ]; then # skip first N packages - parm_SKIP_FETCH="y" - fi -done -if [ "$parm_SKIP_FETCH" = "y" ]; then - echo "Invalid command line arguments ($@)" - do_exit 3 -fi - - -#---------------------------- -# Build TDE -#---------------------------- -set_log_start -for setname in `find . -maxdepth 1 -type f -iname '[01]*' | sort`; do - if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then - SKIP_cnt=$((SKIP_cnt+1)) - else - $setname - fi -done -set_log_end diff --git a/debian/_buildscripts/local/scripts/README.txt b/debian/_buildscripts/local/scripts/README.txt deleted file mode 100644 index 8d8a248c7..000000000 --- a/debian/_buildscripts/local/scripts/README.txt +++ /dev/null @@ -1,207 +0,0 @@ ------ -Index ------ -A) Environment preparation -B) Notes about scripts -C) How to use the scripts - - --------------------------- -A) Environment preparation --------------------------- -0) Initial notes - - this guide has been prepared based on a clean debian testing netinstall system without any other DE. - It should work for other debian/ubuntu distros as well, but eventually you may run into small differences - here and there. - - you can change folder names below, as long as you update the "_config.sh" file accordingly. - -1) Install following packages: bc, cdbs, git, links2, pbuilder, rsync and required dependencies. - NOTE: sudo should already be installed. If not, install sudo as well. - -2) Create a base folder for TDE, hereafter referred to as TDE_DIR (for example $HOME/tde_src) - -3) Create the following folders [ see NOTE at point 0) about folder names ] - - in TDE_DIR: 0_logs : contains log files for repo update and global builds (more on this later) - 1_git : contains the git repo clones and build hook scripts - 2_build: folder used for build preparation and for local builds - 3_repo : local repo for package installation (to be configured in /etc/apt/sources.list) - buildscripts: contains a local copy of the build scripts, which can be modified as required - - in TDE_DIR/1_git: - edeps : contains extra dependency modules necessary to build TDE - 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 and extra dependency modules: - - 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 - - TDE packaging repo - cd "TDE_DIR/1_git" - git clone https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging - - extra dependency packages - using a browser, download the source code for 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). - -5) Add your user to the sudo group (not required if you are root) - su -c "adduser <username> sudo" - 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). - Logout and login again to make sure the setting is applied. - -6) Copy the files from "TDE_DIR/1_git/tde-packaging/debian/_buildscripts/local/buildscripts/additional files" folder - to the respectivily named folders. - -7) Create pbuilder base package with the command: - sudo pbuilder --create - If you wish to build for a different distro or architecture, use the command: - sudo DIST=<target distro> ARCH=<target architecture> pbuilder --create - -8) Setup the build scripts locally: - - copy build scripts from "TDE_DIR/1_git/tde-packaging/debian/_buildscripts/local/buildscripts" to "TDE_DIR/buildscripts" - and make sure all shell scripts are executable - - cd "TDE_DIR/buildscripts" - - cp ./internals/_config_template.sh _config.sh - - edit "_config.sh" to set your preferences and check that the various folder names match the structure on your disk. - Make sure to set the variable TDE_DIR to the correct path and the variables DISTRO, DISTRO_NAME and ARCHITECTURE to - match the distro and architecture you want to build for. - - - ----------------------- -B) Notes about scripts ----------------------- -1) * Notes * -Modules are built using the build_module.sh script. After the build is completed, the installation .deb files are located in TDE_DIR/2_build/debs/<MODULE NAME>/ and the source code and build reports in TDE_DIR/2_build/debs/<MODULE NAME>/src/ - -The source code can be either the git repo or a local copy in TDE_DIR/2_build/build/<MODULE NAME>. -A module can be built in a clean chroot environment using pbuilder (default option) or locally using dpkg-buildpackage (useful for quick debugging/developing). -When using pbuilder, a hook can be used to invoke a shell when the build fails. - -Build logs are automatically stored to files, but can also be displayed during the build process. -The default location of a module build log is TDE_DIR/2_build/debs/<MODULE NAME>/src/__build__.log - -When building sets of modules or the whole TDE, a global build summary is automatically stored to TDE_DIR/0_logs/build_result.log to quickly check what built and what failed. It is recommended to delete that file before starting a new TDE build (if not, build results will be appended at the end of the file). - - -2) * Scripts description * -- scripts in 'internals' folder - Scripts used intenally by other scripts. No need for invoking these directly. - -- update_git_repository.sh: - Scripts used to update the local clone of the git repositories. - Usage: - update_git_repository.sh - -- build_module.sh - Build a single module. - Usage: - build_module.sh [options] module_name - Options: - -g (Git) : build from git repo sources. If missing, build from the local copy in build folder. - -l (Local) : build the module locally. If missing, build in a clean chroot environment - -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) - -- <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 - TDE_DIR/0_logs/build_result.log. - Usage: - <dd>_<set_name>.sh [options] set_name - 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 - 08_application_05.sh : application modules - 09_others_01.sh - 10_others_02.sh : other modules that either fail to build/install or that are somehow less used - 91_build_base.sh : whole TDE base system - 92_build_applications.sh : all TDE applications in 04_application_01.sh - 08_application_05.sh - 93_build_others.sh : all modules in 09_others_01.sh - 10_others_02.sh - -- 99_build_TDE.sh - Script used to build the whole TDE at once. Calls the dd_setname.sh set scripts in order. - Usage: - build_TDE.sh [options] - Options: - -s N: if specified, skip first N sets from the list of sets - -- create_repo.sh - Creates a local repository from the .deb files currently stored in TDE_DIR/2_build/debs. - Usage: - create_repo.sh [options] - Options: - -b (Backup) : create a backup of the existing repository in TDE_DIR/CFG_REPO_DIR.backup - - -3) * Building hooks * -Hooks are available to execute ad-hoc code before and after the build process. For example this is very useful to automatically apply patches. -There are two type of hooks: -- pre_build : applied before switching the module to quilt format and build -- post_build: applied after the build (dpkg-buildpackage or pbuilder) has terminated -To use a hook, create an executable script (pre_build.sh and/or post_build.sh) in the TDE_DIR/1_git/hooks/<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. - - - -------------------------- -C) How to use the scripts -------------------------- -1) Follow the steps in section "A) Environment preparation" (only required the first time). -2) cd "TDE_DIR/buildscripts" -3) Update to latest git repository using - ./update_repositories.sh - Wait until "Update completed" is printed out. Check log in TDE_DIR/0_logs/ if you wish. -4) Run "sudo pbuilder update" at the beginning of the day to update the base package to the latest version. This will speed up - the process when building several modules in sequence. -5) Build modules as per your needs. You don't need to use "sudo" directly since the scripts will do that automatically if - required. Just type your sudo password when prompted to do so. -6) Create a local repository from the packages you have just built, to be used as installation repository. - Add the following lines to /etc/apt/sources.list and follow the usual way to install TDE. - # --- LOCAL TDE REPOSITORY --- - deb [arch=<YOUR ARCH> trusted=yes] file:TDE_DIR/3_repo <YOUR DISTRO> main - For example: - deb [arch=amd64 trusted=yes] file:/home/tde_src/3_repo buster main - - -Examples of real usage: - -1) build a single module - - ./build_module.sh -g -sl "dependencies/libr" -> build libr package. This is a good test to check - whether everything is working fine - - ./build_module.sh -g "tdelibs" -> build "tdelibs" from git sources in a clean chroot environment - - ./build_module.sh -g -l -sl "applications/amarok" -> build "amarok" locally from git sources and - display building logs during building - - ./build_module.sh -sh -lr "tdebase" -> build "tdebase" from the local sources (in TDE_DIR/2_build/build/tdebase) - in a clean chroot environment and launch a shell in case of building failure. - Append the build result (OK, FAILED) to TDE_DIR/scripts/logs/build_result.log - - ./build_module.sh -g -po "tdelibs" -> prepare "tdelibs" for building from git sources. Source code will be available - in TDE_DIR/2_build/build/tdelibs. After you have made changes to the source and - want to build the modified package, run './build_module.sh "tdelibs"' - -2) build a single set - (optional) delete the TDE_DIR/0_logs/build_result.log file - ./01_base_01.sh : build this set. - ./03_base_03.sh -s 3 : build this set but skip the first 3 modules of the set. - -3) build all TDE - ./99_build_TDE.sh : build all TDE - ./99_build_TDE.sh -s 4 : build all TDE, but skip the first 4 sets diff --git a/debian/_buildscripts/local/scripts/additional files/etc/pbuilderrc b/debian/_buildscripts/local/scripts/additional files/etc/pbuilderrc deleted file mode 100644 index 81e7894c4..000000000 --- a/debian/_buildscripts/local/scripts/additional files/etc/pbuilderrc +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/bash - -# general options -BUILDPLACE="/var/cache/pbuilder/build/" -USEPROC=yes -USEDEVPTS=yes -USEDEVFS=no - -# the username and ID used by pbuilder, inside chroot. Needs fakeroot, really -BUILDUSERID=1234 -BUILDUSERNAME=pbuilder - -# make debconf not interact with user -export DEBIAN_FRONTEND="noninteractive" -DEBEMAIL="" - -# for pbuilder debuild (sudo -E keeps the environment as-is) -BUILDSOURCEROOTCMD="fakeroot" -PBUILDERROOTCMD="sudo -E" - -# this is necessary for running 'apt-ftparchive' in a hook script if required -EXTRAPACKAGES="$EXTRAPACKAGES apt-utils" - -#APT configuration files directory -APTCONFDIR="" - -# Set the PATH to be used inside pbuilder -export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" -# Shell to be used inside pbuilder by commands like 'su' -export SHELL=/bin/bash - -# default PKGNAME_LOGFILE -PKGNAME_LOGFILE="__build__.log" - -#-- get desired distribution and architecture -if [ "$DIST" = "" ]; then - DIST=$(lsb_release -cs) -fi -DISTRIBUTION=$DIST -if [ "$ARCH" = "" ]; then - ARCH=$(dpkg --print-architecture) -fi -ARCHITECTURE=$ARCH - -if [ -n "$T" ]; then - if [ "${T##*-}" = "vm" ]; then - BUILD_VM="qemu" - T=${T%-vm} - fi - if [ "${T#*@}" = "$T" ]; then - DISTRIBUTION=${T%-*} - ARCHITECTURE=${T##*-} - else - DISTRIBUTION=${T%@*} - ARCHITECTURE=${T##*@} - fi - if [ "${DISTRIBUTION##*-}" = "backports" ]; then - BACKPORTS="yes" - DISTRIBUTION=${DISTRIBUTION%-backports} - fi -fi - -BASETGZ="/var/cache/pbuilder/base-$DIST@$ARCH.tgz" - -#-- select apt components -case "$DISTRIBUTION" in - sid|buster|stretch|jessie|wheezy|squeeze|lenny|etch|sarge) - COMPONENTS="main contrib non-free" - ;; - - ceres|beowulf|ascii) - COMPONENTS="main" - DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg) - EXTRAPACKAGES="$EXTRAPACKAGES devuan-keyring" - ;; - - bionic|artful|zesty|yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick|lucid) - COMPONENTS="main restricted universe multiverse" - DEBOOTSTRAPOPTS=(--variant=buildd) - ;; - - raspbian-jessie|raspbian-wheezy) - COMPONENTS="main contrib non-free" - DEBOOTSTRAPOPTS=(--variant=buildd --no-check-gpg) - ;; -esac -EXTRAPACKAGES="$EXTRAPACKAGES fakeroot apt-transport-https ca-certificates" - -#-- select base apt sources -case "$DISTRIBUTION" in - sid|buster|stretch|jessie|wheezy) - MIRRORSITE=http://deb.debian.org/debian - ;; - - squeeze|lenny|etch|sarge) - MIRRORSITE=http://archive.debian.org/debian - OTHERMIRROR="#deb http://archive.debian.org/backports.org $DISTRIBUTION-backports main contrib non-free" - ;; - - ceres|beowulf|ascii) - MIRRORSITE=http://auto.mirror.devuan.org/merged - ;; - - bionic|artful|zesty|yakkety|wily|vivid|trusty|precise) - if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then - MIRRORSITE=http://archive.ubuntu.com/ubuntu - else - MIRRORSITE=http://ports.ubuntu.com - fi - ;; - - xenial) - if [ "$ARCHITECTURE" = "amd64" ] || [ "$ARCHITECTURE" = "i386" ]; then - MIRRORSITE=http://archive.ubuntu.com/ubuntu - else - MIRRORSITE=http://ports.ubuntu.com - fi - OTHERMIRROR="deb $MIRRORSITE $DISTRIBUTION-updates $COMPONENTS" - ;; - - utopic|saucy|raring|quantal|oneiric|natty|maverick|lucid) - MIRRORSITE=http://old-releases.ubuntu.com/ubuntu - ;; - - raspbian-jessie|raspbian-wheezy) - MIRRORSITE=http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian - ;; -esac - -if [ -n "${ARCH}" ]; then - NAME="$NAME-$ARCH" - DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}") -fi - -BUILDRESULT="/var/cache/pbuilder/$DISTRIBUTION/result/" - -APTCACHE="/var/cache/pbuilder/aptcache/$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 - -# default PKGNAME_LOGFILE -PKGNAME_LOGFILE="__build__.log" - -#-- extra options -DEBBUILDOPTS="-B" -if [ "$ARCHITECTURE" == "amd64" ]; then - DEBBUILDOPTS="-b" -fi -if [ "${DISTRIBUTION#raspbian}" != "$DISTRIBUTION" ] && [ "$ARCHITECTURE" == "armhf" ]; then - DEBBUILDOPTS="-b" - DISTRIBUTION=${DISTRIBUTION#raspbian-} -fi -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|buster|stretch|\ - ceres|beowulf|ascii|\ - bionic|artful|zesty) - PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt" - ;; - - jessie|wheezy|squeeze|lenny|etch|sarge|\ - raspbian-jessie|raspbian-wheezy|\ - yakkety|xenial|wily|vivid|utopic|trusty|saucy|raring|quantal|precise|oneiric|natty|maverick|lucid) - PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-aptitude" - ;; -esac diff --git a/debian/_buildscripts/local/scripts/build_module.sh b/debian/_buildscripts/local/scripts/build_module.sh deleted file mode 100755 index adfc4172e..000000000 --- a/debian/_buildscripts/local/scripts/build_module.sh +++ /dev/null @@ -1,455 +0,0 @@ -#!/bin/bash -# -# Build a single TDE module -# - -# Load common code and initialization -. ./internals/_build_common.sh -init_common - - -# Timer settings -_BUILDMOD_TIMER_NUM=0 -_BUILDMOD_TIME="--/--:--:--:---" -exec_time_start $_BUILDMOD_TIMER_NUM - - -# Need sudo for non-root users -SUDO_CMD="" -if [ "`whoami`" != "root" ]; then - SUDO_CMD="sudo -E" -fi - - -#---------------------------- -# Parameters: -# $1 - error code -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGreen}#### Processing module ${CLightGreen}\"$MOD_NAME\"${CGreen} succeeded ####${CNone}" - if [ "$bool_LOG_RESULT" = "y" ]; then - echo "[ OK ] [$_BUILDMOD_TIME] \"$MOD_NAME\"" >>"$LOG_RESULT_FILENAME" - fi - else - echo -e "${CRed}#### Processing module ${CLightRed}\"$MOD_NAME\"${CRed} failed ($1) ####${CNone}" - if [ "$bool_LOG_RESULT" = "y" ]; then - echo "[FAILED] [$_BUILDMOD_TIME] \"$MOD_NAME\"" >>"$LOG_RESULT_FILENAME" - fi - fi - exit $1 -} - - -#---------------------------- -# Parameters: -# $1 - folder name -function recreate_folder() -{ - if [ -d "$1" ]; then - $SUDO_CMD rm -R "$1" - fi - mkdir -p "$1" -} - - -#---------------------------- -# Check command line arguments and set options -#---------------------------- -MOD_NAME="" # the module to be built -bool_BUILD_FROM_GIT="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_NAME" = "" ]; then # module to be built - MOD_NAME="$arg" - fi -done - -if [ "$MOD_NAME" = "" ]; then - echo "Please specify the module to build" - do_exit 3 -fi - -# Check if module is an extra dependency -if [[ $MOD_NAME =~ ^$CFG_EXTRA_DEPS_DIR/ ]]; then - bool_EXTRADEP_MOD="y" -fi - -# Shell hook is only valid if not building locally -# Internal pbuilder option has no meaning if we are 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 -OPT_SIGN_PKG_LOCAL="-uc -us" -# - show logs -OPT_SHOW_LOGS="&>" -if [ "$bool_SHOW_BUILD_LOGS" = "y" ]; then - OPT_SHOW_LOGS=" | tee " -fi -export OPT_SHOW_LOGS - -# Log start -echo -e "${CLightCyan}#### Processing module \"$MOD_NAME\" ####${CNone}" - - -#---------------------------- -# Base directories -#---------------------------- -GIT_DIR="$TDE_DIR/$CFG_GIT_DIR" -BUILD_DIR="$TDE_DIR/$CFG_BUILD_DIR" -GIT_TDE_MAIN="$TDE_DIR/$CFG_GIT_TDE_MAIN" -GIT_TDE_PACKAGING="$TDE_DIR/$CFG_GIT_TDE_PACKAGING" -GIT_EXTRA_DEPENDENCIES="$TDE_DIR/$CFG_GIT_EXTRA_DEPENDENCIES" -HOOK_DIR="$TDE_DIR/$CFG_HOOK_DIR" - -# This folders must exists -BASE_DIRS=("GIT_DIR" "BUILD_DIR" "SCRIPT_DIR" "GIT_TDE_MAIN" "GIT_TDE_PACKAGING" "GIT_EXTRA_DEPENDENCIES" "HOOK_DIR") - -for var_name in ${BASE_DIRS[@]}; do - if [ ! -d "${!var_name}" ]; then - echo -e "$var_name directory missing. Value is \"${!var_name}\". Check your config or create it." - do_exit 4 - fi -done - - -#---------------------------- -# Build output directories -#---------------------------- -TDE_BUILD_DIR="$TDE_DIR/$CFG_TDE_BUILD_DIR" -export TDE_DEBS_DIR="$TDE_DIR/$CFG_TDE_DEBS_DIR" - -BUILD_DIRS=("TDE_BUILD_DIR" "TDE_DEBS_DIR") - -for var_name in ${BUILD_DIRS[@]}; do - if [ ! -d "${!var_name}" ]; then - mkdir "${!var_name}" - fi -done - - -#---------------------------- -# Check module name validity -#---------------------------- -if [ "$bool_EXTRADEP_MOD" != "y" ]; then - # Standard module - MOD_GIT_PATH="$GIT_TDE_MAIN/$MOD_NAME" - MOD_GIT_PKGING_PATH="$GIT_TDE_PACKAGING/$MOD_NAME/debian" -else - # Extra dependency module - MOD_GIT_PATH="$GIT_DIR/$MOD_NAME" -fi -MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME" -MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian" - -if [ "$bool_BUILD_FROM_GIT" = "y" ]; then - echo -e "${CYellow}> Building from GIT repo${CNone}" - # source files - if [ ! -d "$MOD_GIT_PATH" ]; then - echo "Module \"$MOD_NAME\" not found in GIT" - do_exit 5 - fi - bool_COPY_MOD_SRC="y" - - # packaging scripts - if [ "$bool_EXTRADEP_MOD" != "y" -a ! -d "$MOD_GIT_PKGING_PATH" ]; then - echo "Packaging for \"$MOD_NAME\" not found in GIT" - do_exit 6 - fi - 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 - echo "Module \"$MOD_NAME\" not found neither in BUILD nor in GIT" - do_exit 7 - fi - bool_COPY_MOD_SRC="y" - fi - - # packaging scripts - 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 - -#---------------------------- -# Prepare source files -#---------------------------- -# remove output from previous build -if [ -d "$MOD_BUILD_PATH" ]; then - cd "$MOD_BUILD_PATH/.." - $SUDO_CMD rm *.deb *.dsc *.changes *.tar.bz2 *.tar.gz *.tar.xz *.log *.buildinfo &>/dev/null -fi - -# copy main repo source files, if needed -if [ "$bool_COPY_MOD_SRC" = "y" ]; then - bool_COPY_PKGING_FILES="y" - recreate_folder "$MOD_BUILD_PATH" - if [ "$bool_EXTRADEP_MOD" != "y" ]; then - # Normal module - cp -R "$MOD_GIT_PATH" "$MOD_BUILD_PATH/.." - # Add SCM information for crash test report - [ -f "$MOD_BUILD_PATH/.tdescmmodule" ] && rm "$MOD_BUILD_PATH/.tdescmmodule" - [ -f "$MOD_BUILD_PATH/.tdescmrevision" ] && rm "$MOD_BUILD_PATH/.tdescmrevision" - # --> Module name - echo "$MOD_NAME" >"$MOD_BUILD_PATH/.tdescmmodule" - # --> SCM info - cd "$MOD_GIT_PATH" - MOD_BRANCH=`git branch --contains HEAD | grep -v "no branch" | head -n1 | cut -c 3-` - COMMIT_HASH=`git rev-parse HEAD` - echo "$MOD_BRANCH-$COMMIT_HASH" >"$MOD_BUILD_PATH/.tdescmrevision" - 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 - # Make sure patches are not reapplied in future local builds. This could stop pdebuild from working. - if [ -f "$MOD_BUILD_PATH/debian/patches/series" ]; then - cp /dev/null "$MOD_BUILD_PATH/debian/patches/series" - fi - else - echo "There must be one and only one .dsc file in \"$MOD_GIT_PATH\"" - do_exit 9 - fi - fi -fi - -# copying packaging scripts, if needed -if [ "$bool_EXTRADEP_MOD" != "y" -a "$bool_COPY_PKGING_FILES" = "y" ]; then - if [ -d "$MOD_BUILD_PKGING_PATH" ]; then - $SUDO_CMD rm -R $MOD_BUILD_PKGING_PATH - fi - cp -R "$MOD_GIT_PKGING_PATH" "$MOD_BUILD_PKGING_PATH" - - # TODO metapackage support - - if [ "$USE_LOCAL_BUILD_NUMBER" != "y" ]; then - # Default package name (Slavek's repo style) - # Calculate package version - cd $MOD_GIT_PATH - branch=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-` - 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 "$GIT_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 "$GIT_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 - - DATE=$(date -R) - 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 $DATE\n" >> "$MOD_BUILD_PKGING_PATH/changelog" - cat "$GIT_TDE_PACKAGING/$MOD_NAME/debian/changelog" >> "$MOD_BUILD_PKGING_PATH/changelog" - else - # Local build version - if [ "$BUILD_DATE" = "" ]; then - BUILD_DATE=`date +%Y%m%d+%H%M` - fi - BUILDISTRO_NAME="4:$TDE_RELEASE-${BUILD_NUMBER}+$BUILD_DATE" # Module build version number (quilt format) - dch -b -v "$BUILDISTRO_NAME" -D "$DISTRO_NAME" -c "$MOD_BUILD_PKGING_PATH/changelog" "Autogenerated by building script" &>/dev/null - fi -fi - -# prepare destination directory for building -export MOD_DEB_PATH="$TDE_DEBS_DIR/$MOD_NAME" -MOD_DEBSRC_PATH="$MOD_DEB_PATH/src" -recreate_folder "$MOD_DEB_PATH" -recreate_folder "$MOD_DEBSRC_PATH" - - -#---------------------------- -# Apply pre-build hooks if present -#---------------------------- -if [ -x "$HOOK_DIR/$MOD_NAME/pre_build.sh" ]; then - echo -e "${CYellow}> Applying pre-build hook${CNone}" - . "$HOOK_DIR/$MOD_NAME/pre_build.sh" - if [ $? -eq 0 ]; then - echo -e "> ${CBrown}Pre-build hook applied successfully${CNone}" - else - echo -e "> ${CLightBlue}Pre-build hook failed${CNone}" - fi -fi - - -#---------------------------- -# Switch to 3.0(quilt) format -#---------------------------- -# create orig tarball -cd "$MOD_BUILD_PATH" -MOD_BASENAME=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^([^ ]+).*/\1/"` -MOD_MAJOR_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \(([^:]+:)?.*/\1/"` -MOD_UP_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \(([^:]+:)?([^-]+).*/\2/"` -MOD_DEB_VER=`head -n 1 "$MOD_BUILD_PKGING_PATH/changelog" | sed -r "s/^[^ ]+ \([^-]+-([^\)]+).*/\1/"` - -tar cJf "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz" --exclude="debian" --exclude=".git*" . - -# switch to quilt format -if [ -f "$MOD_BUILD_PKGING_PATH/source/format" ]; then - grep -q "(native)" "$MOD_BUILD_PKGING_PATH/source/format" && \ - sed -i "s/(native)/(quilt)/" "$MOD_BUILD_PKGING_PATH/source/format" -else - [ -d "$MOD_BUILD_PKGING_PATH/source" ] || mkdir -p "$MOD_BUILD_PKGING_PATH/source" - echo "3.0 (quilt)" >"$MOD_BUILD_PKGING_PATH/source/format" -fi - -# remove quilt references from rules file -grep -q "^include.*/usr/share/cdbs/1/rules/patchsys-quilt\.mk" "$MOD_BUILD_PKGING_PATH/rules" && \ -sed -i "s/^\(include.*\/usr\/share\/cdbs\/1\/rules\/patchsys-quilt\.mk\)/#\1/" "$MOD_BUILD_PKGING_PATH/rules" - -if [ "$bool_PREPARE_ONLY" = "y" ]; then - echo -e "${CBrown}Source code prepared for building${CNone}" - do_exit 0 -fi - - -#---------------------------- -# Enable debug mode if required -#---------------------------- -if [ "$bool_DEBUG_MODE" = "y" ]; then - echo -e "${CBrown}Enable debug mode${CNone}" - sed -i "s/RelWithDebInfo/Debug/" "$MOD_BUILD_PKGING_PATH/rules" -fi - - -#---------------------------- -# Build -#---------------------------- -export BUILDING_LOG_FILE="$MOD_DEBSRC_PATH/__build__.log" -cd "$MOD_BUILD_PATH" - -if [ "$bool_BUILD_LOCALLY" = "y" ]; then - ## Build module locally - echo -e "${CYellow}> Building locally${CNone}" - eval dpkg-buildpackage $OPT_SIGN_PKG_LOCAL $OPT_SHOW_LOGS\"$BUILDING_LOG_FILE\" - 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 -fi - -if [ $build_retval -eq 0 ]; then - echo -e "${CLightGreen}> Building completed SUCCESSFULLY${CNone}" -else - echo -e "${CLightRed}> Building completed WITH ERRORS${CNone}" -fi - - -#---------------------------- -# Apply post-build hooks if present -#---------------------------- -if [ -x "$HOOK_DIR/$MOD_NAME/post_build.sh" ]; then - echo -e "${CYellow}> Applying post-build hook${CNone}" - . "$HOOK_DIR/$MOD_NAME/post_build.sh" - if [ $? -eq 0 ]; then - echo -e "${CBrown}Post-build hook applied successfully${CNone}" - else - echo -e "${CLightBlue}Post-build hook failed${CNone}" - fi -fi - -#---------------------------- -# Move compiled module files to destination folders -#---------------------------- -if [ "$bool_BUILD_LOCALLY" = "y" ]; then - cd "$MOD_BUILD_PATH/.." - mv *.deb "$MOD_DEB_PATH" &>/dev/null - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null -else - cd "$MOD_DEB_PATH" - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null - cd "$MOD_BUILD_PATH/.." - mv *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.buildinfo "$MOD_DEBSRC_PATH" &>/dev/null -fi - - -#---------------------------- -# Removing leftover files -#---------------------------- -cd "$MOD_BUILD_PATH/.." -rm *.deb *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.log *.buildinfo &>/dev/null -cd "$MOD_DEB_PATH" -rm *.dsc *.changes *.tar.xz *.tar.bz2 *.tar.gz *.log *.buildinfo &>/dev/null - - -#---------------------------- -# Building completed -#---------------------------- -exec_time_stop $_BUILDMOD_TIMER_NUM "_BUILDMOD_TIME" -do_exit $build_retval diff --git a/debian/_buildscripts/local/scripts/create_repo.sh b/debian/_buildscripts/local/scripts/create_repo.sh deleted file mode 100755 index 1f1e1cb0f..000000000 --- a/debian/_buildscripts/local/scripts/create_repo.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# -# Create/update TDE local debian repository -# - -# Load common code and initialization -. ./internals/_build_common.sh -init_common - -#---------------------------- -# Check command line arguments -parm_MAKE_BACKUP="n" -for arg in $@; do - if [ "$arg" = "-b" ]; then # backup old repository - parm_MAKE_BACKUP="y" - fi -done - - -#---------------------------- -# Create/update TDE local debian repository -echo -e "${CLightCyan}#### TDE local repository creation begin ####${CNone}" -ARCH_PATH="dists/$DISTRO_NAME/main/binary-$ARCHITECTURE" -REPO_DIR="$TDE_DIR/$CFG_REPO_DIR" -REPO_DIR_BACKUP="$REPO_DIR.backup" -REPO_PKG_DIR="$REPO_DIR/$ARCH_PATH" -TDE_DEBS_DIR="$TDE_DIR/$CFG_TDE_DEBS_DIR" - -# Backup -if [ "$parm_MAKE_BACKUP" = "y" ] && [ -d "$REPO_DIR" ]; then - echo -e "${CYellow}> Backing up old repository${CNone}" - rm -R "$REPO_DIR_BACKUP" &>/dev/null - mv "$REPO_DIR" "$REPO_DIR_BACKUP" &>/dev/null - echo "Copy of the old repository available at \"$REPO_DIR_BACKUP\"" -fi - -# Create repository -echo -e "${CYellow}> Creating new repository${CNone}" -if [ -d "$REPO_DIR" ]; then - rm -R "$REPO_DIR" &>/dev/null -fi -mkdir -p "$REPO_PKG_DIR" -rsync -aHS --exclude="*/src/*.xz" --exclude="*/src/*.dsc" --exclude="*/src/*.changes" --exclude="*/src/*.buildinfo" --exclude="Packages*" "$TDE_DEBS_DIR/" "$REPO_PKG_DIR/" - -# Create package index file -echo -e "${CYellow}> Creating package index file${CNone}" -cd "$REPO_DIR" -dpkg-scanpackages "./$ARCH_PATH" | gzip -9c > "./$ARCH_PATH/Packages.gz" - - -#---------------------------- -# Repository created -echo -e "${CLightGreen}#### TDE local repository created ####${CNone}" -cd "$SCRIPT_DIR" -exit 0 diff --git a/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/kaffeine-wizard.diff b/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/kaffeine-wizard.diff deleted file mode 100644 index c35ba6516..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/kaffeine-wizard.diff +++ /dev/null @@ -1,65 +0,0 @@ -diff -urN kaffeine/kaffeine/src/kaffeine.cpp kaffeine.new/kaffeine/src/kaffeine.cpp ---- kaffeine/kaffeine/src/kaffeine.cpp 2013-03-02 15:47:14.000000000 -0600 -+++ kaffeine.new/kaffeine/src/kaffeine.cpp 2013-11-24 11:39:09.809430631 -0600 -@@ -683,7 +683,9 @@ - m_autoResizeTriple = new TDEToggleAction(i18n("Triple Size"), 0, ALT|Key_3, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeTriple()), actionCollection(), "view_auto_resize_triple"); - - m_playersMenu = new TDEActionMenu(i18n("&Player Engine"), actionCollection(), "options_player"); -- KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); -+ m_instWizard = new TDEAction(i18n("Installation &Wizard"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstWizard()), actionCollection(), "inst_wizard"); -+ -+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection(), "options_preferences"); - -@@ -1619,6 +1621,18 @@ - mute(); - } - -+void Kaffeine::slotInstWizard() -+{ -+ TQString stamp = locateLocal("appdata", "wizard_stamp_v0.7.1"); -+ InstWizard::showWizard(); -+ -+ TDEProcess process; -+ process << "touch" << stamp; -+ process.start(TDEProcess::Block, TDEProcess::Stderr); -+ process.clearArguments(); -+} -+ -+ - /********* DCOP INTERFACE *********/ - - void Kaffeine::openURL(TQString url) -diff -urN kaffeine/kaffeine/src/kaffeine.h kaffeine.new/kaffeine/src/kaffeine.h ---- kaffeine/kaffeine/src/kaffeine.h 2013-03-02 15:47:14.000000000 -0600 -+++ kaffeine.new/kaffeine/src/kaffeine.h 2013-11-24 11:09:17.455756279 -0600 -@@ -193,6 +193,7 @@ - void slotDvbClient(bool,const TQString&,int,int,const TQString&); - void slotNumKeyInput( int ); - void slotDVBNextBack( int ); -+ void slotInstWizard(); - - private: - void autoresize(); -@@ -258,7 +259,8 @@ - TDEToggleAction* m_autoResizeTriple; - TDEToggleAction* m_originalAspect; - TDEToggleAction* m_toggleLayout; -- TDEActionMenu* m_playersMenu; -+ TDEActionMenu* m_playersMenu; -+ TDEAction* m_instWizard; - TDEToggleAction* m_sleepAfterPlay; - TDEToggleAction* m_quitAfterPlay; - TDEToggleAction* m_quitAfterPlaylist; -diff -urN kaffeine/kaffeine/src/kaffeineui.rc kaffeine.new/kaffeine/src/kaffeineui.rc ---- kaffeine/kaffeine/src/kaffeineui.rc 2012-09-14 17:39:52.000000000 -0500 -+++ kaffeine.new/kaffeine/src/kaffeineui.rc 2013-11-24 11:10:15.335565312 -0600 -@@ -34,6 +34,7 @@ - <Merge/> - <Menu noMerge="1" name="settings"><text>&Settings</text> - <Action name="options_player"/> -+ <Action name="inst_wizard"/> - <Separator/> - <Merge name="StandardToolBarMenuHandler"/> - <Action name="options_show_statusbar"/> diff --git a/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/pre_build.sh b/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/pre_build.sh deleted file mode 100755 index 96400d6e9..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/applications/kaffeine/pre_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying Kaffeine wizard patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/kaffeine-wizard.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/scripts/hook examples/tdebase/018_kate_save_all.diff b/debian/_buildscripts/local/scripts/hook examples/tdebase/018_kate_save_all.diff deleted file mode 100644 index 16ac7c7dc..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/tdebase/018_kate_save_all.diff +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nur ori/tdebase/kate/app/katedocmanager.cpp new/tdebase/kate/app/katedocmanager.cpp ---- ori/tdebase/kate/app/katedocmanager.cpp 2013-07-27 02:36:57.000000000 +0900 -+++ new/tdebase/kate/app/katedocmanager.cpp 2013-12-05 15:56:20.311928016 +0900 -@@ -381,7 +381,6 @@ - return modified; - } - -- - bool KateDocManager::queryCloseDocuments(KateMainWindow *w) - { - uint docCount = m_docList.count(); -@@ -436,12 +435,22 @@ - return true; - } - -- - void KateDocManager::saveAll() - { - for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) -- if ( it.current()->isModified() && it.current()->views().count() ) -- ((Kate::View*)it.current()->views().first())->save(); -+ { -+ if (it.current()->views().count()) -+ { -+ if (it.current()->url().isEmpty()) -+ { -+ ((Kate::View*)it.current()->views().first())->saveAs(); -+ } -+ else if (it.current()->isModified()) -+ { -+ ((Kate::View*)it.current()->views().first())->save(); -+ } -+ } -+ } - } - - void KateDocManager::saveDocumentList (TDEConfig* config) diff --git a/debian/_buildscripts/local/scripts/hook examples/tdebase/pre_build.sh b/debian/_buildscripts/local/scripts/hook examples/tdebase/pre_build.sh deleted file mode 100755 index e764c29ad..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/tdebase/pre_build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying Kate save all patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/018_kate_save_all.diff" - - echo -e "${CLightPurple}Applying SAK patch${CNone}" - patch -p1 < "$HOOK_DIR/$PKG_NAME/tdebase-usesak.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/scripts/hook examples/tdebase/tdebase-usesak.diff b/debian/_buildscripts/local/scripts/hook examples/tdebase/tdebase-usesak.diff deleted file mode 100644 index e85ca1047..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/tdebase/tdebase-usesak.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff -urNa tdebase/tdm/config.def tdebase.new/tdm/config.def ---- tdebase/tdm/config.def 2013-09-12 11:51:29.000000000 -0500 -+++ tdebase.new/tdm/config.def 2014-02-10 06:29:38.537806886 -0600 -@@ -2010,9 +2010,9 @@ - - Key: UseSAK - Type: bool --Default: true -+Default: false - User: greeter --Instance: #*/! -+Instance: #:*/false - Comment: - SAK - Description: diff --git a/debian/_buildscripts/local/scripts/hook examples/tdelibs/038_placeholder.diff b/debian/_buildscripts/local/scripts/hook examples/tdelibs/038_placeholder.diff deleted file mode 100644 index 65d64cc72..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/tdelibs/038_placeholder.diff +++ /dev/null @@ -1,64 +0,0 @@ -diff -Nur ori/tdelibs/tdeutils/kfinddialog.cpp new/tdelibs/tdeutils/kfinddialog.cpp ---- ori/tdelibs/tdeutils/kfinddialog.cpp 2014-02-05 16:54:13.852605699 +0900 -+++ new/tdelibs/tdeutils/kfinddialog.cpp 2014-02-11 18:16:55.292214876 +0900 -@@ -149,8 +149,9 @@ - m_replace->setMaxCount(10); - m_replace->setDuplicatesEnabled(false); - m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_replaceGrp); -+ m_backRef->setEnabled(m_regExp->isChecked()); - m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_replaceGrp); -- m_backRefItem->setEnabled(false); -+ m_backRefItem->setEnabled(m_regExp->isChecked() && m_backRef->isChecked()); - - m_replaceLayout->addWidget(m_replaceLabel, 0, 0); - m_replaceLayout->addMultiCellWidget(m_replace, 1, 1, 0, 1); -@@ -193,8 +194,8 @@ - - // signals and slots connections - connect(m_selectedText, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectedTextToggled(bool))); -- connect(m_regExp, TQT_SIGNAL(toggled(bool)), m_regExpItem, TQT_SLOT(setEnabled(bool))); -- connect(m_backRef, TQT_SIGNAL(toggled(bool)), m_backRefItem, TQT_SLOT(setEnabled(bool))); -+ connect(m_regExp, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotRegexCheckBoxToggled(bool))); -+ connect(m_backRef, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPlaceholdersCheckBoxToggled(bool))); - connect(m_regExpItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPatterns())); - connect(m_backRefItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPlaceholders())); - -@@ -276,11 +277,23 @@ - "Ask before replacing each match found.") ); - } - --void KFindDialog::textSearchChanged( const TQString & text) -+void KFindDialog::textSearchChanged(const TQString & text) - { - enableButtonOK( !text.isEmpty() ); - } - -+void KFindDialog::slotRegexCheckBoxToggled(bool checked) -+{ -+ m_regExpItem->setEnabled(checked); -+ m_backRef->setEnabled(checked); -+ m_backRefItem->setEnabled(checked && m_backRef->isChecked()); -+} -+ -+void KFindDialog::slotPlaceholdersCheckBoxToggled(bool checked) -+{ -+ m_backRefItem->setEnabled(checked && m_regExp->isChecked()); -+} -+ - void KFindDialog::showEvent( TQShowEvent *e ) - { - if ( !d->m_initialShowDone ) -diff -Nur ori/tdelibs/tdeutils/kfinddialog.h new/tdelibs/tdeutils/kfinddialog.h ---- ori/tdelibs/tdeutils/kfinddialog.h 2014-02-05 16:54:13.852605699 +0900 -+++ new/tdelibs/tdeutils/kfinddialog.h 2014-02-11 18:16:57.876214916 +0900 -@@ -250,7 +250,9 @@ - void slotSelectedTextToggled(bool); - void showPatterns(); - void showPlaceholders(); -- void textSearchChanged( const TQString &); -+ void textSearchChanged(const TQString &); -+ void slotRegexCheckBoxToggled(bool checked); -+ void slotPlaceholdersCheckBoxToggled(bool checked); - - protected: - virtual void showEvent ( TQShowEvent * ); diff --git a/debian/_buildscripts/local/scripts/hook examples/tdelibs/pre_build.sh b/debian/_buildscripts/local/scripts/hook examples/tdelibs/pre_build.sh deleted file mode 100755 index 35bfc3c1b..000000000 --- a/debian/_buildscripts/local/scripts/hook examples/tdelibs/pre_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -CURR_DIR=$PWD -cd "$PKG_BUILD_PATH" - -# Apply patches -if [ "$bool_COPY_PKG_SRC" = "y" ]; then - echo -e "${CLightPurple}Applying kfinddialog placeholder patch${CNone}" - patch -p2 < "$HOOK_DIR/$PKG_NAME/038_placeholder.diff" -fi - -cd "$CURR_DIR" -return 0 diff --git a/debian/_buildscripts/local/scripts/internals/C10shell b/debian/_buildscripts/local/scripts/internals/C10shell deleted file mode 100755 index 7c6a8761b..000000000 --- a/debian/_buildscripts/local/scripts/internals/C10shell +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Color table -CPurple='\e[0;35m' -CWhite='\e[1;37m' -CNone='\e[0m' - -# Invoke shell if build fails. -apt-get install -y --force-yes vim less bash mc -cd /tmp/buildd/*/debian/.. -echo "${CPurple}---------------------------------------------------------${CNone}" >/dev/tty -echo "${CPurple} !!! Build FAILED !!! ${CNone}" >/dev/tty -echo "${CPurple} You are now inside a shell in the building environment. ${CNone}" >/dev/tty -echo "${CPurple} ${CWhite}mc, vim, less${CPurple} are available for your convenience. ${CNone}" >/dev/tty -echo "${CPurple} Type ${CWhite}exit${CPurple} to leave the shell when you are done. ${CNone}" >/dev/tty -echo "${CPurple}---------------------------------------------------------${CNone}" >/dev/tty -/bin/bash </dev/tty >/dev/tty 2>/dev/tty - diff --git a/debian/_buildscripts/local/scripts/internals/_build_common.sh b/debian/_buildscripts/local/scripts/internals/_build_common.sh deleted file mode 100755 index c692ac26c..000000000 --- a/debian/_buildscripts/local/scripts/internals/_build_common.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/bash - - -#---------------------------- -#---------------------------- -# Color table -# Black 0;30 Dark Gray 1;30 -# Blue 0;34 Light Blue 1;34 -# Green 0;32 Light Green 1;32 -# Cyan 0;36 Light Cyan 1;36 -# Red 0;31 Light Red 1;31 -# Purple 0;35 Light Purple 1;35 -# Brown 0;33 Yellow 1;33 -# Light Gray 0;37 White 1;37 -# No Color 0 -set -a -CBlack='\e[0;30m' -CDarkGray='\e[1;30m' -CBlue='\e[0;34m' -CLightBlue='\e[1;34m' -CGreen='\e[0;32m' -CLightGreen='\e[1;32m' -CCyan='\e[0;36m' -CLightCyan='\e[1;36m' -CRed='\e[0;31m' -CLightRed='\e[1;31m' -CPurple='\e[0;35m' -CLightPurple='\e[1;35m' -CBrown='\e[0;33m' -CYellow='\e[1;33m' -CGray='\e[0;37m' -CWhite='\e[1;37m' -CNone='\e[0m' -set +a - -#---------------------------- -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 "${CYellow} --- 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" - else - echo -e "${CYellow} --- NOTE ---${CNone}" - echo "Creating TDE build configuration file from template as $CFG_FILE." - echo "Please check and modify as required, then rerun this script." - cp "$SCRIPT_DIR/internals/_config_template.sh" "$CFG_FILE" - exit 2 - fi - - # TDE root folder must exist - if [ ! -d "$TDE_DIR" ]; then - echo -e "${CYellow} --- ERROR ---${CNone}" - echo "A valid TDE root folder could not be located. Something is wrong with your configuration" - echo "in the config file $CFG_FILE" - echo "Please check and modify the TDE_DIR variable as required, then rerun this script." - exit 3 - fi - - # Search for main TDE repo - cd "$TDE_DIR/$CFG_GIT_TDE_MAIN" &>/dev/null - CURR_DIR=$(git rev-parse --show-toplevel 2>/dev/null) - if [ -z "$CURR_DIR" ]; then - echo -e "${CYellow} --- ERROR ---${CNone}" - echo "Main TDE repo could not be located. Something is wrong with your configuration" - echo "in the config file $CFG_FILE" - echo "Please check and modify the TDE_DIR variable as required, then rerun this script." - exit 4 - fi - - # Search for TDE packaging repo - cd "$TDE_DIR/$CFG_GIT_TDE_PACKAGING" &>/dev/null - CURR_DIR=$(git rev-parse --show-toplevel 2>/dev/null) - if [ -z "$CURR_DIR" ]; then - echo -e "${CYellow} --- ERROR ---${CNone}" - echo "TDE packaging repo could not be located. Something is wrong with your configuration" - echo "in the config file $CFG_FILE" - echo "Please check and modify the TDE_DIR variable as required, then rerun this script." - exit 5 - fi - - # Make sure we have selected a supported distribution - DISTS_FILE=$SCRIPT_DIR/internals/distro_list.txt - if [ ! -f "$DISTS_FILE" ]; then - echo -e "${CYellow} --- NOTE ---${CNone}" - echo "Could not find the list of supported distributions." - echo "Please check the file $DISTS_FILE exists, then rerun this script." - exit 6 - fi - export DISTRO_FOUND=${DISTRO_FOUND:-"n"} - if [ "$DISTRO_FOUND" != "y" ]; then - # 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. - while read l_distro l_version l_name l_rel_suffix; do - if [ "$l_distro" = "$DISTRO" -a "$l_name" = "$DISTRO_NAME" ]; then - export DISTRO_FOUND="y" - export DISTRO_VERSION="$l_version" - export REL_SUFFIX="$l_rel_suffix" - break - fi - done <<< $(cat $DISTS_FILE | grep -E "^(\s*[^#\s]+\s+[^\s]+.*)$") - fi - if [ "$DISTRO_FOUND" != "y" ]; then - echo -e "${CYellow} --- NOTE ---${CNone}" - echo "The specified distribution ($DISTRO $DISTRO_NAME) is not supported." - echo "Something is wrong with your configuration ($CFG_FILE)" - echo "or with the list of supported distributions ($DISTS_FILE)." - echo "Please check the DISTRO and DISTRO_NAME variables, then rerun this script." - exit 7 - fi - - export SCRIPT_LOG_DIR=$TDE_DIR/$CFG_SCRIPT_LOG_DIR - export LOG_RESULT_FILENAME="$SCRIPT_LOG_DIR/build_result.log" # Log result into the common build logfile - - cd "$SCRIPT_DIR" -} - - -#---------------------------- -# Save execution start time -# Parameters: -# $1 - timer number -function exec_time_start() -{ - _ET_start_var="_ET_start_$1" - eval "$_ET_start_var=`date +%s.%N`" -} - - -#---------------------------- -# Save execution stop time and set $2 to the execution time -# in the format: dd/hh:mm:ss.mmm -# Parameters: -# $1 - timer number -# $2 - result variable name -function exec_time_stop() -{ - _ET_start_var="_ET_start_$1" - _ET_stop_var="_ET_stop_$1" - eval "$_ET_stop_var=`date +%s.%N`" - _ET_diff=`echo "${!_ET_stop_var} - ${!_ET_start_var}" | bc` - _ET_days=`echo "$_ET_diff/86400" | bc` - _ET_diff_day=`echo "$_ET_diff-86400*$_ET_days" | bc` - _ET_hours=`echo "$_ET_diff_day/3600" | bc` - _ET_diff_hour=`echo "$_ET_diff_day-3600*$_ET_hours" | bc` - _ET_mins=`echo "$_ET_diff_hour/60" | bc` - _ET_secs=`echo "$_ET_diff_hour-60*$_ET_mins" | bc` - local _resultvar=$2 - eval "$_resultvar=`printf \"%02d/%02d:%02d:%06.3f\" $_ET_days $_ET_hours $_ET_mins $_ET_secs`" -} diff --git a/debian/_buildscripts/local/scripts/internals/_build_set_common.sh b/debian/_buildscripts/local/scripts/internals/_build_set_common.sh deleted file mode 100755 index 7d28736b0..000000000 --- a/debian/_buildscripts/local/scripts/internals/_build_set_common.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -# Load common code and initialization -. ./internals/_build_common.sh -init_common - -_BUILDSET_TIMER=1 -_BUILDSET_TIME="--/--:--:--:---" - -parm_SKIP_FETCH="n" # if "y" skips N packages from the list -parm_SKIP_N=0 # this argument represents the number of packages to skip -SKIP_cnt=0 - - -#---------------------------- -# do_exit for set building -function do_exit() -{ - cd "$SCRIPT_DIR" - if [ $1 -eq 0 ]; then - echo -e "${CGray}#### Building process for set \"${0##*/}\" completed ####${CNone}" - else - echo -e "${CGray}#### Building process for set \"${0##*/}\" interrupted ($1) ####${CNone}" - fi - exit $1 -} - - -#---------------------------- -function set_log_start() -{ - echo -e "${CGray}#### Starting building process for set \"${0##*/}\" ####${CNone}" - echo - echo "---------- ${0##*/} ----------" >>"$LOG_RESULT_FILENAME" - exec_time_start $_BUILDSET_TIMER -} - - -#---------------------------- -function set_log_end() -{ - exec_time_stop $_BUILDSET_TIMER "_BUILDSET_TIME" - echo " [$_BUILDSET_TIME] SET ${0##*/}" >>"$LOG_RESULT_FILENAME" - echo >>"$LOG_RESULT_FILENAME" - do_exit 0 -} - - -#---------------------------- -function build_module() -{ - if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then - SKIP_cnt=$((SKIP_cnt+1)) - else - ./build_module.sh "$BUILD_DEFAULT_OPTIONS $@" - echo - fi -} - - -#---------------------------- -# Check command line arguments -#---------------------------- -for arg in $@; do - if [ "$parm_SKIP_FETCH" = "y" ]; then - parm_SKIP_N=$arg - parm_SKIP_FETCH="n"BUILD_DEFAULT_OPTIONS - elif [ "$arg" = "-s" ]; then # skip first N packages - parm_SKIP_FETCH="y" - fi -done -if [ "$parm_SKIP_FETCH" = "y" ]; then - echo "Invalid command line arguments ($@)" - do_exit 3 -fi diff --git a/debian/_buildscripts/local/scripts/internals/_config_template.sh b/debian/_buildscripts/local/scripts/internals/_config_template.sh deleted file mode 100644 index ea8f438ba..000000000 --- a/debian/_buildscripts/local/scripts/internals/_config_template.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -set -a - -#---------------------------- -# Build information -#---------------------------- -TDE_RELEASE="14.1.0" # TDE release number -DISTRO="debian" # Distro family -DISTRO_NAME="buster" # Distro name of specific version -ARCHITECTURE="amd64" # Build for this architecture -USE_LOCAL_BUILD_NUMBER="n" # If == "y", use local build numbering for modules -BUILD_NUMBER="b001" # TDE build number -BUILD_DATE="" # Module build date (automatic if "" or fixed otherwise, ex 20171201) -BUILD_DEFAULT_OPTIONS="-g -lr" # Default building options (pbuilder) -GPG_SIGN_KEYID="" # Use this GPG key to sign packages. If null, packages will not be signed - -#---------------------------- -# Base directories -#---------------------------- -# TDE root folder -TDE_DIR="" -# Relative paths -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 -CFG_HOOKS_DIR="hooks" # Relative to CFG_GIT_DIR folder -# Composite paths -CFG_GIT_TDE_MAIN="$CFG_GIT_DIR/tde/main" -CFG_GIT_TDE_PACKAGING="$CFG_GIT_DIR/tde-packaging/$DISTRO/$DISTRO_NAME" -CFG_GIT_EXTRA_DEPENDENCIES="$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR" -CFG_HOOK_DIR="$CFG_GIT_DIR/$CFG_HOOKS_DIR" - -#---------------------------- -# Build output directories -#---------------------------- -CFG_TDE_BUILD_DIR="$CFG_BUILD_DIR/build" -CFG_TDE_DEBS_DIR="$CFG_BUILD_DIR/debs" - -#---------------------------- -set +a diff --git a/debian/_buildscripts/local/scripts/internals/_pbuilder.sh b/debian/_buildscripts/local/scripts/internals/_pbuilder.sh deleted file mode 100755 index 9b6ffb7b5..000000000 --- a/debian/_buildscripts/local/scripts/internals/_pbuilder.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -function run_pdebuild() -{ - # pbuilder absolute paths - PBUILDER_HOOK_DIR="/var/cache/pbuilder/hooks" - PBUILDER_SHELL_HOOK_TEMPLATE="$SCRIPT_DIR/internals/C10shell" - PBUILDER_SHELL_HOOK="$PBUILDER_HOOK_DIR/C10shell" - PBUILDER_DEPS_HOOK="$PBUILDER_HOOK_DIR/D05deps" - - # 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 > "$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 -apt-get update -END_D05 - chmod a+x "$PBUILDER_DEPS_HOOK" - # Build - eval pdebuild $OPT_INTERNAL_PBUILDER $OPT_SIGN_PKG_PBUILDER \ - --architecture $ARCHITECTURE \ - --buildresult \"$MOD_DEB_PATH\" \ - --pbuilderroot \"sudo DIST=$DISTRO_NAME ARCH=$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 diff --git a/debian/_buildscripts/local/scripts/internals/_update_repositories.sh b/debian/_buildscripts/local/scripts/internals/_update_repositories.sh deleted file mode 100755 index fa5a1bd74..000000000 --- a/debian/_buildscripts/local/scripts/internals/_update_repositories.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -#---------------------------- -# Update TDE main repository -echo -e "\n---- Updating main TDE GIT repo ----\n" - -cd "$TDE_DIR/$CFG_GIT_DIR/tde" -if [[ ! -e .git ]] || [[ -z "`git rev-parse --git-dir 2>/dev/null`" ]]; then - echo "Current directory does not contain a .git folder. Exiting..." - cd $SCRIPT_DIR - exit 1 -fi - -branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` -if [[ -z "$branch" ]] || [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then - echo "There is not active upstream branch. Exiting..." - cd $SCRIPT_DIR - exit 1 -fi - -touch /var/lock/update-tde-git-submodules - -PARENTDIR=$PWD -echo "---- Main repo ----" -git pull --rebase -if [[ ! -z "`git status --porcelain --ignore-submodules`" ]]; then - git reset --hard HEAD - git clean -dxff -fi - -exec 3< submodules -while read <&3 -do - cd $PARENTDIR - DIR2UPDATE=$REPLY - if [[ $DIR2UPDATE != "" ]]; then - echo -e "\n---- Submodule $DIR2UPDATE ----" - cd $PARENTDIR/$DIR2UPDATE/.. - cd `git rev-parse --show-toplevel` - if [[ -z "`grep \"^Updated: $PWD$\" /var/lock/update-tde-git-submodules`" ]]; then - echo "Updated: $PWD" >>/var/lock/update-tde-git-submodules - git submodule init - git submodule update - fi - cd $PARENTDIR/$DIR2UPDATE - if [[ ! -z "`git status --porcelain --ignore-submodules`" ]]; then - git reset --hard HEAD - git clean -dxff - fi - git checkout $branch - git pull --rebase - cd .. - cd `git rev-parse --show-toplevel` - fi -done -exec 3>&- - -rm /var/lock/update-tde-git-submodules - - -#------------------------------ -# Update TDE-packaging repository -echo -e "\n----------------------------------------" -echo -e "\n--- Updating TDE-packaging GIT repo ----\n" - -cd "$TDE_DIR/$CFG_GIT_DIR/tde-packaging" -git pull --rebase - - -#------------------------------ -# Done -cd $SCRIPT_DIR diff --git a/debian/_buildscripts/local/scripts/internals/distro_list.txt b/debian/_buildscripts/local/scripts/internals/distro_list.txt deleted file mode 100644 index 0ca037eb0..000000000 --- a/debian/_buildscripts/local/scripts/internals/distro_list.txt +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# List of supported distributions -DISTROS=" - debian 5.0 lenny - debian 6.0 squeeze - debian 7.0 wheezy - debian 8.0 jessie - debian 9.0 stretch - debian 10.0 buster ~a - debian 10.0 sid ~b - raspbian 7.0 raspbian-wheezy - raspbian 8.0 raspbian-jessie - ubuntu 10.04 lucid - ubuntu 10.10 maverick - ubuntu 11.04 natty - ubuntu 11.10 oneiric - ubuntu 12.04 precise - ubuntu 12.10 quantal - ubuntu 13.04 raring - ubuntu 13.10 saucy - ubuntu 14.04 trusty - ubuntu 14.10 utopic - ubuntu 15.04 vivid - ubuntu 15.10 wily - ubuntu 16.04 xenial - ubuntu 16.10 yakkety - ubuntu 17.04 zesty - ubuntu 17.10 artful - ubuntu 18.04 bionic ~a -" diff --git a/debian/_buildscripts/local/scripts/update_repositories.sh b/debian/_buildscripts/local/scripts/update_repositories.sh deleted file mode 100755 index efa739aa6..000000000 --- a/debian/_buildscripts/local/scripts/update_repositories.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Load common code -. ./internals/_build_common.sh -init_common - -#---------------------------- -# Run real update script -if [ ! -d "$SCRIPT_LOG_DIR" ]; then - echo -e "\"$SCRIPT_LOG_DIR\" folder is missing. Check your config or create it." - exit 1 -fi -echo "Update in progress..." -. ./internals/_update_repositories.sh &>"$SCRIPT_LOG_DIR/update-repos.log" -echo "Update completed." - |