summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/_buildscripts/local/README.txt48
-rw-r--r--debian/_buildscripts/local/additional_files/etc/pbuilderrc2
-rwxr-xr-xdebian/_buildscripts/local/build_module.sh4
-rw-r--r--debian/_buildscripts/local/internals/_config_template.sh16
-rwxr-xr-xdebian/_buildscripts/local/internals/_pbuilder.sh8
5 files changed, 45 insertions, 33 deletions
diff --git a/debian/_buildscripts/local/README.txt b/debian/_buildscripts/local/README.txt
index 12044c7ae..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.
@@ -41,7 +48,7 @@ A) Environment preparation
cd tde
./scripts/switch_all_submodules_to_head_and_clean anonymous
- A.2) If you are not using pre-built extra dependencies:
+ 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
@@ -50,15 +57,16 @@ A) Environment preparation
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:
+ B.2) If you are *not* using pre-built extra dependencies:
cd "$TDE_DIR/1_git"
git clone --bare --config "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*" https://mirror.git.trinitydesktop.org/gitea/TDE/extra-dependencies.git repos/edeps.git
B.3) run the script "update_repositories.sh" once you have completed the setup as described later in this document.
-5) Add your user to the sudo group (not required if you are root)
- su -c "adduser <username> sudo"
- Logout and login again to make sure the new settings are applied.
+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
@@ -71,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
@@ -85,34 +95,36 @@ A) Environment preparation
* UPDATE_BRANCHES to the branches you want to keep updated from the main repositories.
* DEFAULT_REPO_BRANCH to the branch to check out at the end of the repositories update process.
-9) Some additional packages (referred to as extra dependencies) are required to build and install TDE in debian/ubuntu.
- These modules can be built locally or alternatively Slavek Banko's pre-built binaries can be used.
+9) 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 ---
+ - 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.0.x series (repository branch "r14.0.x")
- # --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY ---
+ * 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 TDE Archive Signing key into your apt keyring
- sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key C93AF1698685AD8B
+ - 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) Add the following lines to the /etc/apt/sources.list file. This will setup your local repo in apt.
+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
+ deb [trusted=yes] file:$TDE_DIR/3_repo <YOUR DISTRO> main
For example:
deb [trusted=yes] file:/home/tde_src/3_repo buster main
diff --git a/debian/_buildscripts/local/additional_files/etc/pbuilderrc b/debian/_buildscripts/local/additional_files/etc/pbuilderrc
index cecf04991..52402895e 100644
--- a/debian/_buildscripts/local/additional_files/etc/pbuilderrc
+++ b/debian/_buildscripts/local/additional_files/etc/pbuilderrc
@@ -79,7 +79,7 @@ case "$DISTRIBUTION" in
# devuan
ceres|daedalus|chimaera|beowulf)
- MIRRORSITE=http://auto.mirror.devuan.org/merged
+ MIRRORSITE=http://pkgmaster.devuan.org/merged
;;
# ubuntu
diff --git a/debian/_buildscripts/local/build_module.sh b/debian/_buildscripts/local/build_module.sh
index 8a8457d87..e8ccec472 100755
--- a/debian/_buildscripts/local/build_module.sh
+++ b/debian/_buildscripts/local/build_module.sh
@@ -117,6 +117,7 @@ function search_module()
fi
fi
fi
+ export MOD_BUILD_PATH
MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
IFS=$OLDIFS
}
@@ -197,7 +198,6 @@ if [ "${bool_BUILD_FROM_PATH}" = "y" ]; then
else
MOD_NAME=`basename "${MOD_PATH}"`
fi
-echo "${MOD_NAME}"
if [ "${MOD_NAME}" != "" -a "${MOD_NAME}" != "tde" -a "${MOD_NAME}" != ".git" ]; then
# Valid git module
if [[ "${MOD_PATH}" =~ ${TDE_BUILD_DIR} ]]; then
@@ -491,7 +491,7 @@ if [ "$bool_BUILD_LOCALLY" = "y" ]; then
fi
else
## Build module in a clean chroot environment using pbuilder
- $SUDO_CMD . "$SCRIPT_DIR/internals/_pbuilder.sh"
+ $SUDO_CMD "$SCRIPT_DIR/internals/_pbuilder.sh"
build_retval=$?
if [ "`whoami`" != "root" ]; then
cd "$MOD_DEB_PATH"
diff --git a/debian/_buildscripts/local/internals/_config_template.sh b/debian/_buildscripts/local/internals/_config_template.sh
index 232d99799..7c1e929c6 100644
--- a/debian/_buildscripts/local/internals/_config_template.sh
+++ b/debian/_buildscripts/local/internals/_config_template.sh
@@ -5,8 +5,8 @@ set -a
#----------------------------
# Repo information
#----------------------------
-TDE_DIR="" # TDE root folder
-UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.0.x
+TDE_DIR="" # TDE root folder
+UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.1.x
DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to this branch. Must be
# one of the branches specified in UPDATE_BRANCHES
@@ -14,12 +14,12 @@ DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to th
# Build information
#----------------------------
TDE_RELEASE="14.1.0" # TDE release number
-DISTRO="" # Distro family (leave empty for auto-detection). For ex. debian
-DISTRO_NAME="" # Distro name of specific version (leave empty for auto-detection). For ex. buster
-ARCHITECTURE="" # Build for this architecture (leave empty for auto-detection). For ex. amd64
+DISTRO="" # Distro family (leave empty for auto-detection). For ex. debian
+DISTRO_NAME="" # Distro name of specific version (leave empty for auto-detection). For ex. buster
+ARCHITECTURE="" # Build for this architecture (leave empty for auto-detection). For ex. amd64
USE_PREBUILD_EXTRA_DEPS="y" # If == "y", use pre-built extra dependency packages
BUILD_DEFAULT_OPTIONS="-g -lr" # Default building options (pbuilder)
-GPG_SIGN_KEYID="" # Use this GPG key to sign packages. If null, packages will not be signed
+GPG_SIGN_KEYID="" # Use this GPG key to sign packages. If null, packages will not be signed
#----------------------------
# Base directories
@@ -28,7 +28,7 @@ CFG_SCRIPT_LOG_DIR="0_logs"
CFG_GIT_DIR="1_git"
CFG_BUILD_DIR="2_build"
CFG_REPO_DIR="3_repo"
-CFG_EXTRA_DEPS_DIR="edeps" # Relative to CFG_GIT_DIR folder. Only required if USE_PREBUILD_EXTRA_DEPS != "y"
-CFG_HOOKS_DIR="hooks" # Relative to CFG_GIT_DIR folder
+CFG_EXTRA_DEPS_DIR="edeps" # Relative to CFG_GIT_DIR folder. Only required if USE_PREBUILD_EXTRA_DEPS != "y"
+CFG_HOOKS_DIR="hooks" # Relative to CFG_GIT_DIR folder
set +a
diff --git a/debian/_buildscripts/local/internals/_pbuilder.sh b/debian/_buildscripts/local/internals/_pbuilder.sh
index 5f00e718a..b520a93af 100755
--- a/debian/_buildscripts/local/internals/_pbuilder.sh
+++ b/debian/_buildscripts/local/internals/_pbuilder.sh
@@ -57,9 +57,9 @@ END_D05_02
while read l_branch l_repo l_component; do
if [ "$l_branch" = "default" ]; then
bool_EDEPS_FOUND="y"
- cat <<END_D05_02 >> "$PBUILDER_DEPS_HOOK"
+ cat <<END_D05_03 >> "$PBUILDER_DEPS_HOOK"
echo "deb [trusted=yes] $l_repo $DISTRO_NAME $l_component" >> /etc/apt/sources.list
-END_D05_02
+END_D05_03
break
fi
done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$")
@@ -67,9 +67,9 @@ END_D05_02
IFS=$OLD_IFS
fi
fi
- cat <<END_D05_03 >> "$PBUILDER_DEPS_HOOK"
+ cat <<END_D05_04 >> "$PBUILDER_DEPS_HOOK"
apt-get update
-END_D05_03
+END_D05_04
chmod a+x "$PBUILDER_DEPS_HOOK"
# Build
OPT_BUILD_PARALLEL=""