DEB build scripts: improved support for pbuilder and fixed problem with apt-ftparchive in hook scripts.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 6 years ago
parent 4da401f0e8
commit 6821bf1de1

@ -10,13 +10,15 @@ C) How to use the scripts
------------------------------
0) * NOTE *: you can change folder names, as long as you update the "build_config.sh" file accordingly.
1) Install pbuilder and configure it (see https://wiki.ubuntu.com/PbuilderHowto for a detailed tutorial)
1) Install pbuilder and configure it
(see https://wiki.ubuntu.com/PbuilderHowto and https://wiki.debian.org/PbuilderTricks for a detailed tutorial)
- You can use the file ".pbuilderrc" from following point 2)
- Create the folder "/var/cache/pbuilder/repo"
- cd into "/var/cache/pbuilder/repo" and execute "touch Packages" to create an empty file "Packages"
2) Copy files from "additional files" folder to respectivily named folder.
"user_home_folder" refers to the user home folder.
- "user_home_folder" refers to the user home folder.
- make sure to make the files in "usr/lib/pbuilder/hooks" executable
3) Create base package with the command:
pbuilder --create

@ -30,11 +30,6 @@ CFG_GIT_TDE_MAIN="$CFG_GIT_DIR/tde/main"
CFG_GIT_TDE_PACKAGING="$CFG_GIT_DIR/tde-packaging/$DISTRO/$DISTRO_NAME"
CFG_GIT_EXTRA_DEPENDENCIES="$CFG_GIT_DIR/$CFG_EXTRA_DEPS_DIR"
CFG_HOOK_DIR="$CFG_GIT_DIR/$CFG_HOOKS_DIR"
#Absolute paths
PBUILDER_REPO="/var/cache/pbuilder/repo"
PBUILDER_HOOK_DIR="/usr/lib/pbuilder/hooks"
PBUILDER_SHELL_HOOK="$PBUILDER_HOOK_DIR/C10shell"
PBUILDER_SHELL_HOOK_TEMPLATE="$PBUILDER_HOOK_DIR/__template_C10shell"
#----------------------------
# Build output directories

@ -0,0 +1,59 @@
# this is your configuration file for pbuilder.
# the file in /usr/share/pbuilder/pbuilderrc is the default template.
# /etc/pbuilderrc is the one meant for editing.
#
# read pbuilderrc.5 document for notes on specific options.
BASETGZ=/var/cache/pbuilder/base.tgz
BUILDPLACE=/var/cache/pbuilder/build/
OTHERMIRROR="deb [trusted=yes] file:///var/cache/pbuilder/repo ./"
USEPROC=yes
USEDEVPTS=yes
USEDEVFS=no
BUILDRESULT=/var/cache/pbuilder/result/
HOOKDIR="/usr/lib/pbuilder/hooks"
# make debconf not interact with user
export DEBIAN_FRONTEND="noninteractive"
DEBEMAIL=""
# for pbuilder debuild (sudo -E keeps the environment as-is)
BUILDSOURCEROOTCMD="fakeroot"
PBUILDERROOTCMD="sudo -E"
# command to satisfy build-dependencies; the default is an internal shell
# implementation which is relatively slow; there are two alternate
# implementations, the "experimental" implementation,
# "pbuilder-satisfydepends-experimental", which might be useful to pull
# packages from experimental or from repositories with a low APT Pin Priority,
# and the "aptitude" implementation, which will resolve build-dependencies and
# build-conflicts with aptitude which helps dealing with complex cases but does
# not support unsigned APT repositories
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends"
#Command-line option passed on to dpkg-buildpackage.
DEBBUILDOPTS=""
#APT configuration files directory
APTCONFDIR=""
# the username and ID used by pbuilder, inside chroot. Needs fakeroot, really
BUILDUSERID=1234
BUILDUSERNAME=pbuilder
# BINDMOUNTS is a space separated list of things to mount
# inside the chroot.
BINDMOUNTS="/var/cache/pbuilder/repo"
# Set the debootstrap variant to 'buildd' type.
DEBOOTSTRAPOPTS[0]='--variant=buildd'
# Set the PATH I am going to use inside pbuilder: default is "/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
# SHELL variable is used inside pbuilder by commands like 'su'; and they need sane values
export SHELL=/bin/bash
# The name of debootstrap command.
DEBOOTSTRAP="debootstrap"
# default PKGNAME_LOGFILE
PKGNAME_LOGFILE="__build__.log"

@ -1,5 +1,8 @@
#!/bin/bash
#-- this is necessary for running 'apt-ftparchive' in a hook script if required
EXTRAPACKAGES="$EXTRAPACKAGES apt-utils"
#-- get desired distribution and architecture
if [ "$DIST" = "" ]; then
DIST=$(lsb_release -cs)

@ -98,6 +98,13 @@ if [ "bool_BUILD_LOCALLY" = "y" ]; then
bool_INTERNAL_PBUILDER="n"
fi
# pbuilder absolute paths
PBUILDER_REPO="/var/cache/pbuilder/repo"
PBUILDER_HOOK_DIR="/usr/lib/pbuilder/hooks"
PBUILDER_SHELL_HOOK="$PBUILDER_HOOK_DIR/C10shell"
PBUILDER_SHELL_HOOK_TEMPLATE="$PBUILDER_HOOK_DIR/__template_C10shell"
HOOKDIR="$PBUILDER_HOOK_DIR" # real pbuilder hook dir setting
# Local option variables
# - internal pbuilder
OPT_INTERNAL_PBUILDER=""

Loading…
Cancel
Save