DEB build scripts: updated to use extra dependency repository on TGW.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/18/head
Michele Calgaro 4 years ago
parent fc4b7b4fed
commit fc2fae6cf2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -28,19 +28,22 @@ A) Environment preparation
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 (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
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
git submodule init -- scripts
git submodule update -- scripts
./scripts/switch_all_submodules_to_head_and_clean anonymous
- 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
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.
@ -71,41 +74,29 @@ A) Environment preparation
* 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.
These modules can be built locally or alternatively Slavek Banko's pre-built binaries can be used.
9.1) Using pre-built extra dependencies (recommended option)
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
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 ---
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).
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.
# --- LOCAL TDE REPOSITORY ---
@ -164,13 +155,16 @@ 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
Options:

@ -54,29 +54,9 @@ function recreate_folder()
}
#----------------------------
# Set module related path variables
# Parameters:
# $1 - module name
function set_module_paths()
{
local LOC_MOD_NAME=$1
if [ "$bool_EXTRADEP_MOD" != "y" ]; then
# Standard module
MOD_GIT_PATH="$REPO_TDE_MAIN/$LOC_MOD_NAME"
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$LOC_MOD_NAME/debian"
else
# Extra dependency module
MOD_GIT_PATH="$REPO_DIR/$LOC_MOD_NAME"
fi
export MOD_BUILD_PATH="$TDE_BUILD_DIR/$LOC_MOD_NAME"
MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
}
#----------------------------
# Look for a module in the git repository or in the extra dependency folder.
# Set the new module name if found.
# Set the module name and paths if found.
# Parameters:
# $1 - module name
function search_module()
@ -85,6 +65,7 @@ function search_module()
IFS="*"
local LOC_MOD_NAME=$1
local LOC_MATCH
MODULE_FOUND="n"
# Search in GIT repository
@ -93,18 +74,23 @@ function search_module()
# Unique module found in GIT
MODULE_FOUND="y"
MOD_NAME=$LOC_MATCH
set_module_paths $MOD_NAME
MOD_GIT_PATH="$REPO_TDE_MAIN/$MOD_NAME"
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME"
else
# Search in extra dependency folder
LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES" | grep "^$LOC_MOD_NAME$"`
LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"`
LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME"`
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
# Unique module found in extra dependency folder
MODULE_FOUND="y"
bool_EXTRADEP_MOD="y"
MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH"
set_module_paths $MOD_NAME
MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME"
MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME"
fi
fi
MOD_BUILD_PKGING_PATH="$MOD_BUILD_PATH/debian"
IFS=$OLDIFS
}
@ -204,18 +190,16 @@ if [[ $MOD_NAME =~ ^$CFG_EXTRA_DEPS_DIR/ ]]; then
bool_EXTRADEP_MOD="y"
fi
set_module_paths $MOD_NAME
if [ "$bool_BUILD_FROM_GIT" = "y" ]; then
echo -e "${CYellow}> Building from GIT repo${CNone}"
# source files
if [ ! -d "$MOD_GIT_PATH" ]; then
MODULE_FOUND="n"
# Make sure the module exists
search_module $MOD_NAME
if [ "$MODULE_FOUND" != "y" -o ! -d "$MOD_GIT_PATH" ]; then
if [ "$MODULE_FOUND" != "y" ]; then
echo "Module \"$MOD_NAME\" not found in GIT"
do_exit 5
fi
fi
if [ "$bool_BUILD_FROM_GIT" = "y" ]; then
echo -e "${CYellow}> Building from GIT repo${CNone}"
# source files
bool_COPY_MOD_SRC="y"
# packaging scripts
@ -229,19 +213,9 @@ else
echo -e "${CYellow}> Building from BUILD folder${CNone}"
# source files
bool_COPY_MOD_SRC="n"
if [ ! -d "$MOD_BUILD_PATH" ]; then
if [ ! -d "$MOD_GIT_PATH" ]; then
MODULE_FOUND="n"
search_module $MOD_NAME
if [ "$MODULE_FOUND" != "y" -o ! -d "$MOD_GIT_PATH" ]; then
echo "Module \"$MOD_NAME\" not found neither in BUILD nor in GIT"
do_exit 7
fi
fi
if [ ! -d "$MOD_BUILD_PATH" ]; then
bool_COPY_MOD_SRC="y"
fi
fi
# packaging scripts
bool_COPY_PKGING_FILES="n"
@ -283,19 +257,20 @@ if [ "$bool_COPY_MOD_SRC" = "y" ]; then
echo "Revision: $MOD_BRANCH-$COMMIT_HASH" >> "$MOD_BUILD_PATH/.tdescminfo"
git log -1 --pretty=format:"DateTime: %cd%n" --date=format:"%m/%d/%Y %H:%M" >> "$MOD_BUILD_PATH/.tdescminfo"
else
# Extra dependency module
if [ `find "$MOD_GIT_PATH" -name '*.dsc' | wc -l` == 1 ]; then
if [ -d "$MOD_BUILD_PATH" ]; then
$SUDO_CMD rm -R "$MOD_BUILD_PATH"
fi
eval dpkg-source --no-copy --no-check -x `find "$MOD_GIT_PATH" -name '*.dsc'` \
\"$MOD_BUILD_PATH\" $OPT_SHOW_LOGS/dev/null
# Extra dependency module: copy and apply patches
# -- move to the correct folder
cd "$MOD_GIT_PATH"
if [ `ls -d */ | wc -l` == 1 ]; then
cd `ls -d */`
cp -R "." "$MOD_BUILD_PATH"
cd $MOD_BUILD_PATH
QUILT_PATCHES="debian/patches" quilt push -a >/dev/null
# Make sure patches are not reapplied in future local builds. This could stop pdebuild from working.
if [ -f "$MOD_BUILD_PATH/debian/patches/series" ]; then
cp /dev/null "$MOD_BUILD_PATH/debian/patches/series"
fi
else
echo "There must be one and only one .dsc file in \"$MOD_GIT_PATH\""
echo "There must be one and only one module folder in \"$MOD_GIT_PATH\""
do_exit 9
fi
fi
@ -379,17 +354,19 @@ if [ -x "$HOOK_DIR/$MOD_NAME/pre_build.sh" ]; then
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/"`
REPO_DATE=`dpkg-parsechangelog -l "$MOD_BUILD_PATH/debian/changelog" | sed -n -e 's|^Date: ||p'`
REPO_DATE=`dpkg-parsechangelog -l "$MOD_BUILD_PKGING_PATH/changelog" | sed -n -e 's|^Date: ||p'`
tar cJf "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz" --exclude="debian" --exclude=".git*" \
--mtime "$REPO_DATE" --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime .
touch -d "$REPO_DATE" "../${MOD_BASENAME}_${MOD_UP_VER}.orig.tar.xz"

@ -210,6 +210,20 @@ fi
_LAST_BRANCH=""
if [[ "$flag_SWITCH_ONLY" != "y" ]]; then
# Update extra dependency repository
if [[ "$USE_PREBUILD_EXTRA_DEPS" != "y" ]]; then
echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y"
echo_and_tee "${CLightCyan} Fetching extra dependencies ${CNone}" "$LOG_UPDATE_REPO_FILENAME"
echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME"
# Fetch TDE extra dependency repository
_update_module "$REPO_EXTRA_DEPENDENCIES" "fetch"
_update_module "$REPO_EXTRA_DEPENDENCIES" "update" "master"
echo -e "\033[2K"
echo "" >> "$LOG_UPDATE_REPO_FILENAME"
fi
# Fetch all remotes first
echo_and_tee "${CLightCyan}---------------------------------------${CNone}" "$LOG_UPDATE_REPO_FILENAME" "y"
echo_and_tee "${CLightCyan} Fetching remotes ${CNone}" "$LOG_UPDATE_REPO_FILENAME"

Loading…
Cancel
Save