:: [DNG] Creating .deb packages with j…
Página Inicial
Delete this message
Reply to this message
Autor: Tom
Data:  
Para: dng
Assunto: [DNG] Creating .deb packages with jenkins-debian-glue
Hi,

I'm trying to use dh_virtualenv and and jenkins-debian-glue to package
a python app into a .deb using jenkins.

I followed all the instructions on https://jenkins-debian-glue.org,
updating the steps where required for differences in the latest
Jenkins release, but I see errors when running the
jenkins-debian-glue-binaries job.

It looked like it was failing due to the output of 'lsb_release
--short --codename' returning "n/a" on Devuan Ascii, so I created
/etc/lsb-release with the relevant details. It's now showing a
different error.

I have the "jenkins-debian-glue-buildenv-devuan" package installed, if
that matters.

Are there any configuration files I need to change from default for
any packages associated with this? eg. /etc/git-buildpackage/gbp.conf

Are there any easier alternatives to create .deb packages? I have no
prior experience with this, so I used this as the jenkins-debian-glue
project was the first thing I discovered on google. I am not creating
packages to go into Devuan archive, just for private usage on a local
network.

--- ERROR LOG ---

Started by upstream project "deb-test/jenkins-debian-glue-binaries"
build number 6
originally caused by:
Started by upstream project "deb-test/jenkins-debian-glue-source"
build number 11
originally caused by:
Started by user Admin (admin)
Building on master in workspace
/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64
[WS-CLEANUP] Deleting project workspace...
Copied 5 artifacts from "deb-test » jenkins-debian-glue-source" build number 11
[amd64] $ /bin/sh -xe /tmp/jenkins6420083586795712532.sh
+ /usr/bin/build-and-provide-package
+ set -u
+ umask 022
+ PATH=/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
+ export QEMU_RESERVED_VA=0x0
+ QEMU_RESERVED_VA=0x0
++ date
+ echo '*** Starting /usr/bin/build-and-provide-package at Thu 31 May
17:24:30 AEST 2018 ***'
*** Starting /usr/bin/build-and-provide-package at Thu 31 May 17:24:30
AEST 2018 ***
++ sed -e 's/^\([0-9]*\).*/\1/'
+ start_seconds=1233774
++ dpkg --list jenkins-debian-glue
++ awk '/^ii/ {print $3}'
+ JENKINS_DEBIAN_GLUE_VERSION=0.18.4
+ '[' -n 0.18.4 ']'
+ echo '*** Running jenkins-debian-glue version 0.18.4 ***'
*** Running jenkins-debian-glue version 0.18.4 ***
++ dpkg --print-architecture
+ HOST_ARCH=amd64
+ '[' -n amd64 ']'
+ echo '*** Identified host architecture amd64 ***'
*** Identified host architecture amd64 ***
+ trap bailout SIGHUP SIGINT SIGQUIT SIGABRT SIGALRM SIGTERM
+ checks_and_defaults
+ '[' -z '' ']'
+ local repository_is_missing_in_env=true
+ '[' -r /etc/jenkins/debian_glue ']'
+ . /etc/jenkins/debian_glue
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -z deb-test/jenkins-debian-glue-binaries/architecture=amd64 ']'
+ '[' -z amd64 ']'
+ set_debootstrap
+ '[' -n '' ']'
+ '[' amd64 = amd64 ']'
+ DEBOOTSTRAP=debootstrap
+ return 0
+ '[' -z '' ']'
+ REPREPRO_OPTS='-v --waitforlock 1000'
+ echo '*** REPREPRO_OPTS is unset, using default: -v --waitforlock 1000 ***'
*** REPREPRO_OPTS is unset, using default: -v --waitforlock 1000 ***
+ REPREPRO_CMD=reprepro
+ '[' -z '' ']'
+ DEFAULT_REPOSITORY=/srv/repository
+ '[' -z '' ']'
+ REPOSITORY=/srv/repository
+ '[' -z '' ']'
+ PBUILDER_HOOKDIR=/usr/share/jenkins-debian-glue/pbuilder-hookdir/
+ '[' -z '' ']'
+ '[' -z '' ']'
+ FREIGHT_VARLIB=/var/lib/freight
+ FREIGHT_VARCACHE=/var/cache/freight
+ FREIGHT_CONF=/etc/freight.conf
+ clean_workspace
++ pwd
+ echo '*** The following files have been noticed in the workspace
[/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64]:
***'
*** The following files have been noticed in the workspace
[/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64]:
***
+ ls -la ./
total 56
drwxr-xr-x 2 jenkins jenkins 4096 May 31 17:24 .
drwxr-xr-x 3 jenkins jenkins 4096 May 31 17:24 ..
-rw-r--r-- 1 jenkins jenkins 15573 May 31 17:24
deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c.diff.gz
-rw-r--r-- 1 jenkins jenkins 992 May 31 17:24
deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc
-rw-r--r-- 1 jenkins jenkins 5543 May 31 17:24
deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c_source.buildinfo
-rw-r--r-- 1 jenkins jenkins 13031 May 31 17:24 deb-test_0.1.0.orig.tar.gz
-rw-r--r-- 1 jenkins jenkins 661 May 31 17:24 lintian.txt
+ identify_package_name
+ PACKAGE=deb-test/jenkins-debian-glue-binaries/architecture=amd64
+ PACKAGE=deb-test/jenkins-debian-glue
+ '[' -n deb-test/jenkins-debian-glue ']'
+ echo '*** Identified Debian package name deb-test/jenkins-debian-glue ***'
*** Identified Debian package name deb-test/jenkins-debian-glue ***
+ set_base_path
+ '[' -n '' ']'
+ BASE_PATH=/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64
+ echo '*** Using $WORKSPACE
[/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64]
as default for BASE_PATH ***'
*** Using $WORKSPACE
[/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64]
as default for BASE_PATH ***
+ build_info
+ '[' -n '' ']'
+ REPOS=deb-test/jenkins-debian-glue
+ REPOS=deb-test/jenkins-debian-glue
+ '[' -z '' ']'
+ echo '*** No repository supplied, using repository name
deb-test/jenkins-debian-glue ***'
*** No repository supplied, using repository name
deb-test/jenkins-debian-glue ***
+ identify_sourcefile
+ '[' -n '' ']'
+ echo '*** Identifying newest package version ***'
*** Identifying newest package version ***
+ newest_version=
+ for file in "${BASE_PATH}/"*.dsc
++ awk '/^Source: / {print $2}'
/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc
+ SOURCE_PACKAGE=deb-test
++ basename /var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc
.dsc
+ p=deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c
+ '[' deb-test_0.1.0-local+0~20180531072409.11~1.gbpf2793c = '*' ']'
+ cur_version=0.1.0-local+0~20180531072409.11~1.gbpf2793c
+ '[' -z '' ']'
+ newest_version=0.1.0-local+0~20180531072409.11~1.gbpf2793c
+ echo '*** Found package version
0.1.0-local+0~20180531072409.11~1.gbpf2793c ***'
*** Found package version 0.1.0-local+0~20180531072409.11~1.gbpf2793c ***
+ sourcefile='/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/deb-test_*0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc'
+ echo '*** Using
/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/deb-test_*0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc
(version: 0.1.0-local+0~20180531072409.11~1.gbpf2793c)'
*** Using /var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/deb-test_*0.1.0-local+0~20180531072409.11~1.gbpf2793c.dsc
(version: 0.1.0-local+0~20180531072409.11~1.gbpf2793c)
+ dist_and_arch_settings
+ '[' -z amd64 ']'
+ '[' amd64 = all ']'
+ arch=amd64
+ echo '*** architecture is set to amd64 ***'
*** architecture is set to amd64 ***
+ '[' -n '' ']'
++ lsb_release --short --codename
+ local distribution=ascii
+ '[' -n ascii ']'
+ local DIST=ascii
+ '[' -n '' ']'
+ echo '*** Using cowbuilder base for distribution ascii ***'
*** Using cowbuilder base for distribution ascii ***
+ COWBUILDER_DIST=ascii
+ '[' -n '' ']'
+ COWBUILDER_BASE=/var/cache/pbuilder/base-ascii-amd64.cow
+ echo '*** No COWBUILDER_BASE set, using
/var/cache/pbuilder/base-ascii-amd64.cow as cowbuilder base.cow ***'
*** No COWBUILDER_BASE set, using
/var/cache/pbuilder/base-ascii-amd64.cow as cowbuilder base.cow ***
+ local lockfiles=/var/run/lock/ascii-amd64
+ build_lockfile=/var/run/lock/ascii-amd64.building.7558
+ update_lockfile=/var/run/lock/ascii-amd64.update
+ update_lockfile_pid=/var/run/lock/ascii-amd64.update.7558
+ '[' -n '' ']'
+ cowbuilder_init
++ mktemp
+ pbuilderrc=/tmp/tmp.O85yPgnQOf
++ date
+ echo '# pbuilder config file generated by jenkins-debian-glue on Thu
31 May 17:24:30 AEST 2018'
+ '[' -n '' ']'
+ use_eatmydata
+ '[' '' = false ']'
+ '[' '' = true ']'
+ dpkg-query --show '--showformat=${Status}' eatmydata
+ grep -q '^install'
++ dpkg-query --show '--showformat=${Version}' eatmydata
+ dpkg --compare-versions 105-5 gt 26-2
+ echo '*** eatmydata is present on host system, now checking
distribution support ***'
*** eatmydata is present on host system, now checking distribution support ***
+ case "${COWBUILDER_DIST}" in
+ echo '*** Distribution ascii should provide recent eatmydata
support, enabling eatmydata ***'
*** Distribution ascii should provide recent eatmydata support,
enabling eatmydata ***
+ enable_eatmydata
+ echo 'EXTRAPACKAGES="$EXTRAPACKAGES eatmydata"'
+ echo 'export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"'
+ echo '# builtin support available with pbuilder >=0.225 (otherwise ignored):'
+ echo EATMYDATA=yes
+ use_ccache
+ '[' '' = true ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ echo '*** COMPONENTS is not set, checking whether we need to enable
Ubuntu workaround ***'
*** COMPONENTS is not set, checking whether we need to enable Ubuntu
workaround ***
+ '[' -n '' ']'
+ echo '*** PBUILDER_CONFIG is not set, continuing with checks for
Ubuntu workaround ***'
*** PBUILDER_CONFIG is not set, continuing with checks for Ubuntu workaround ***
+ '[' -r /usr/share/debootstrap/scripts/ascii ']'
++ readlink -f /usr/share/debootstrap/scripts/ascii
+ '[' /usr/share/debootstrap/scripts/ceres '!='
/usr/share/debootstrap/scripts/gutsy ']'
+ echo '*** Doesn'\''t look like we'\''re building for Ubuntu, not
considering Ubuntu workaround ***'
*** Doesn't look like we're building for Ubuntu, not considering
Ubuntu workaround ***
+ lsb_release --id
+ grep -q Ubuntu
+ echo '*** Listing pbuilder configuration file as reference: ***'
*** Listing pbuilder configuration file as reference: ***
+ cat /tmp/tmp.O85yPgnQOf
# pbuilder config file generated by jenkins-debian-glue on Thu 31 May
17:24:30 AEST 2018
EXTRAPACKAGES="$EXTRAPACKAGES eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
# builtin support available with pbuilder >=0.225 (otherwise ignored):
EATMYDATA=yes
+ ls '/var/cache/pbuilder/base-ascii-amd64.cow.building.*'
+ ls '/var/run/lock/ascii-amd64.update*'
+ flock --nonblock 9
+ touch /var/run/lock/ascii-amd64.update.7558
+ '[' '!' -d /var/cache/pbuilder/base-ascii-amd64.cow ']'
+ echo '*** Creating cowbuilder base
/var/cache/pbuilder/base-ascii-amd64.cow for arch amd64 and
distribution ascii ***'
*** Creating cowbuilder base /var/cache/pbuilder/base-ascii-amd64.cow
for arch amd64 and distribution ascii ***
+ sudo DIST= ARCH=amd64 cowbuilder --create --basepath
/var/cache/pbuilder/base-ascii-amd64.cow --distribution ascii
--debootstrap debootstrap --architecture amd64 --debootstrapopts
--arch --debootstrapopts amd64 --debootstrapopts --variant=buildd
--configfile=/tmp/tmp.O85yPgnQOf --hookdir
/usr/share/jenkins-debian-glue/pbuilder-hookdir/
mkdir: No such file or directory
+ '[' 1 -eq 0 ']'
+ exit 2
+ case "$?" in
+ echo '*** Something went wrong with the creation of the cowbuilder
environment. Cleaning up. ***'
*** Something went wrong with the creation of the cowbuilder
environment. Cleaning up. ***
+ rm -rf /var/cache/pbuilder/base-ascii-amd64.cow
+ bailout 1 'Error: Failed to create cowbuilder base
/var/cache/pbuilder/base-ascii-amd64.cow.'
+ '[' -n 1 ']'
+ EXIT=1
+ '[' -n 'Error: Failed to create cowbuilder base
/var/cache/pbuilder/base-ascii-amd64.cow.' ']'
+ echo 'Error: Failed to create cowbuilder base
/var/cache/pbuilder/base-ascii-amd64.cow.'
Error: Failed to create cowbuilder base
/var/cache/pbuilder/base-ascii-amd64.cow.
+ rm -f /var/run/lock/ascii-amd64.building.7558
+ '[' -r /var/run/lock/ascii-amd64.update.7558 ']'
+ rm -f /var/run/lock/ascii-amd64.update.7558
+ rm -f /var/run/lock/ascii-amd64.update
+ '[' '' = true ']'
+ echo '*** Getting rid of files in
/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/binaries/
to avoid problems in next run. ***'
*** Getting rid of files in
/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/binaries/
to avoid problems in next run. ***
+ rm -f '/var/lib/jenkins/workspace/deb-test/jenkins-debian-glue-binaries/architecture/amd64/binaries/*'
+ '[' -n /tmp/tmp.O85yPgnQOf ']'
+ rm -rf /tmp/tmp.O85yPgnQOf
+ '[' -n '' ']'
+ '[' -n 1233774 ']'
++ sed -e 's/^\([0-9]*\).*/\1/'
+ SECONDS=0
++ date
+ echo '*** Finished execution of /usr/bin/build-and-provide-package
at Thu 31 May 17:24:30 AEST 2018 [running 0 seconds] ***'
*** Finished execution of /usr/bin/build-and-provide-package at Thu 31
May 17:24:30 AEST 2018 [running 0 seconds] ***
+ exit 1
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE

--- END ERROR LOG ---


--Tom