summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'debian/_buildscripts/local/README.txt')
-rw-r--r--debian/_buildscripts/local/README.txt207
1 files changed, 114 insertions, 93 deletions
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