summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/scripts/internals/_pbuilder.sh
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-07-11 23:38:32 +0900
committerMichele Calgaro <[email protected]>2018-07-11 23:38:32 +0900
commiteeaccbeddbaa2974406eb20cbb7beca3fb4a59f0 (patch)
tree510e0eea682ebf69263b187287873956394b5e7b /debian/_buildscripts/local/scripts/internals/_pbuilder.sh
parent02dbbffa606c3c52833bbaf3dc5c5a050f295dbf (diff)
downloadtde-packaging-eeaccbeddbaa2974406eb20cbb7beca3fb4a59f0.tar.gz
tde-packaging-eeaccbeddbaa2974406eb20cbb7beca3fb4a59f0.zip
DEB build scripts: several enhancements as follow:
- major rework of update_repositories.sh script, which now supports multiple branches and provide better feedback to user. - added support for pre-built extra dependency packages. A user can now use Slavek Banko's binary packages instead of building the extra dependency locally. This removes a quite tedious process during the setup of the building environment. - bug fixes and more user friendly folder names. - improved README to cover the complete process until TDE installation. Special thanks to Gregory Guy <[email protected]> for testing and feedback done so far. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'debian/_buildscripts/local/scripts/internals/_pbuilder.sh')
-rwxr-xr-xdebian/_buildscripts/local/scripts/internals/_pbuilder.sh75
1 files changed, 0 insertions, 75 deletions
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