DEB build scripts: updated after testing on Devuan Chimaera

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/273/head
Michele Calgaro 5 months ago
parent 3e3beab0c7
commit ef8e0bd159
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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 It should work for other debian/ubuntu distros as well, but eventually you may run into small differences
here and there. here and there.
- you can change folder names below, as long as you update the "_config.sh" file accordingly. - 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. 1) Install following packages: bc, cdbs, git, pbuilder, rsync and required dependencies.
NOTE: sudo should already be installed. If not, install sudo as well. NOTE: sudo should already be installed. If not, install sudo as well.
@ -41,7 +48,7 @@ A) Environment preparation
cd tde cd tde
./scripts/switch_all_submodules_to_head_and_clean anonymous ./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" cd "$TDE_DIR/1_git"
git clone https://mirror.git.trinitydesktop.org/gitea/TDE/extra-dependencies.git edeps 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" 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 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" 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 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. 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) 5) Add your user to the sudo group (not required if you are root). Mind the stand alone "-"!
su -c "adduser <username> sudo" su - -c "adduser <username> sudo"
Logout and login again to make sure the new settings are applied. 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 * 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). (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 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 sudo pbuilder create
If you wish to build for a different distro or architecture, use the command: If you wish to build for a different distro or architecture, use the command:
sudo DISTRO_NAME=<target distro> ARCHITECTURE=<target architecture> pbuilder create 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: 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 and make sure all shell scripts are executable
- cd "TDE_DIR/buildscripts" - cd "TDE_DIR/buildscripts"
- cp ./internals/_config_template.sh _config.sh - 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. * 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. * 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. 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 Slavek Banko's pre-built binaries can be used. 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 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) - 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 - create the file /etc/apt/sources.list.d/tde.list add the following lines to it. This will setup the
installing the extra dependency packages when TDE is installed. correct repository in apt for installing the required extra dependency packages.
* For R14.1.x series (repository branch "master") * For R14.2.x series (repository branch "master")
# --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY --- # --- TDE EXTRA DEPENDENCIES REPOSITORY ---
deb http://mirror.ppa.trinitydesktop.org/trinity-testing <YOUR DISTRO> deps deb http://mirror.ppa.trinitydesktop.org/trinity-testing <YOUR DISTRO> deps
* For R14.0.x series (repository branch "r14.0.x") * For R14.1.x series (repository branch "r14.1.x")
# --- SLAVEK BANKO'S EXTRA DEPENDENCIES REPOSITORY --- # --- TDE EXTRA DEPENDENCIES REPOSITORY ---
deb http://mirror.ppa.trinitydesktop.org/trinity-sb <YOUR DISTRO> deps-r14 deb http://mirror.ppa.trinitydesktop.org/trinity-sb <YOUR DISTRO> deps-r14
For example: For example:
deb http://mirror.ppa.trinitydesktop.org/trinity-sb buster deps-r14 deb http://mirror.ppa.trinitydesktop.org/trinity-sb buster deps-r14
- install package dirmngr if required - install package dirmngr if required
- import TDE Archive Signing key into your apt keyring - import the TDE archive signing key into your apt keyring
sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key C93AF1698685AD8B 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) 9.2) Building extra dependencies locally (recommended option)
- open "_config.sh" and set the variables USE_PREBUILD_EXTRA_DEPS to "n" and - open "_config.sh" and set the variables USE_PREBUILD_EXTRA_DEPS to "n" and
CFG_EXTRA_DEPS_DIR to "edeps" CFG_EXTRA_DEPS_DIR to "edeps"
- build the extra dependency as any other normal module - 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 --- # --- 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: For example:
deb [trusted=yes] file:/home/tde_src/3_repo buster main deb [trusted=yes] file:/home/tde_src/3_repo buster main

@ -79,7 +79,7 @@ case "$DISTRIBUTION" in
# devuan # devuan
ceres|daedalus|chimaera|beowulf) ceres|daedalus|chimaera|beowulf)
MIRRORSITE=http://auto.mirror.devuan.org/merged MIRRORSITE=http://pkgmaster.devuan.org/merged
;; ;;
# ubuntu # ubuntu

@ -117,6 +117,7 @@ function search_module()
fi fi
fi fi
fi fi
export MOD_BUILD_PATH
MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian" MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
IFS=$OLDIFS IFS=$OLDIFS
} }
@ -197,7 +198,6 @@ if [ "${bool_BUILD_FROM_PATH}" = "y" ]; then
else else
MOD_NAME=`basename "${MOD_PATH}"` MOD_NAME=`basename "${MOD_PATH}"`
fi fi
echo "${MOD_NAME}"
if [ "${MOD_NAME}" != "" -a "${MOD_NAME}" != "tde" -a "${MOD_NAME}" != ".git" ]; then if [ "${MOD_NAME}" != "" -a "${MOD_NAME}" != "tde" -a "${MOD_NAME}" != ".git" ]; then
# Valid git module # Valid git module
if [[ "${MOD_PATH}" =~ ${TDE_BUILD_DIR} ]]; then if [[ "${MOD_PATH}" =~ ${TDE_BUILD_DIR} ]]; then
@ -491,7 +491,7 @@ if [ "$bool_BUILD_LOCALLY" = "y" ]; then
fi fi
else else
## Build module in a clean chroot environment using pbuilder ## 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=$? build_retval=$?
if [ "`whoami`" != "root" ]; then if [ "`whoami`" != "root" ]; then
cd "$MOD_DEB_PATH" cd "$MOD_DEB_PATH"

@ -5,8 +5,8 @@ set -a
#---------------------------- #----------------------------
# Repo information # Repo information
#---------------------------- #----------------------------
TDE_DIR="" # TDE root folder TDE_DIR="" # TDE root folder
UPDATE_BRANCHES="master" # Space separated list. Available choices: master, r14.0.x 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 DEFAULT_REPO_BRANCH="master" # After update in completed, switch repo to this branch. Must be
# one of the branches specified in UPDATE_BRANCHES # 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 # Build information
#---------------------------- #----------------------------
TDE_RELEASE="14.1.0" # TDE release number TDE_RELEASE="14.1.0" # TDE release number
DISTRO="" # Distro family (leave empty for auto-detection). For ex. debian 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 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 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 USE_PREBUILD_EXTRA_DEPS="y" # If == "y", use pre-built extra dependency packages
BUILD_DEFAULT_OPTIONS="-g -lr" # Default building options (pbuilder) 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 # Base directories
@ -28,7 +28,7 @@ CFG_SCRIPT_LOG_DIR="0_logs"
CFG_GIT_DIR="1_git" CFG_GIT_DIR="1_git"
CFG_BUILD_DIR="2_build" CFG_BUILD_DIR="2_build"
CFG_REPO_DIR="3_repo" 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_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_HOOKS_DIR="hooks" # Relative to CFG_GIT_DIR folder
set +a set +a

@ -57,9 +57,9 @@ END_D05_02
while read l_branch l_repo l_component; do while read l_branch l_repo l_component; do
if [ "$l_branch" = "default" ]; then if [ "$l_branch" = "default" ]; then
bool_EDEPS_FOUND="y" 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 echo "deb [trusted=yes] $l_repo $DISTRO_NAME $l_component" >> /etc/apt/sources.list
END_D05_02 END_D05_03
break break
fi fi
done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$") done <<< $(cat "$SCRIPT_DIR/internals/extra_deps.txt" | grep -E "^[[:space:]]*[^#[:space:]]+[[:space:]]+[^[:space:]]+.*$")
@ -67,9 +67,9 @@ END_D05_02
IFS=$OLD_IFS IFS=$OLD_IFS
fi fi
fi fi
cat <<END_D05_03 >> "$PBUILDER_DEPS_HOOK" cat <<END_D05_04 >> "$PBUILDER_DEPS_HOOK"
apt-get update apt-get update
END_D05_03 END_D05_04
chmod a+x "$PBUILDER_DEPS_HOOK" chmod a+x "$PBUILDER_DEPS_HOOK"
# Build # Build
OPT_BUILD_PARALLEL="" OPT_BUILD_PARALLEL=""

Loading…
Cancel
Save