[Buildbot-devel] Problem with buildbot configuration for building debian packages
joguerrero at cnti.gob.ve
joguerrero at cnti.gob.ve
Fri Jul 3 00:30:17 UTC 2015
Hello everyone, my name is Francisco and I am new here =)
I'm setting a buildbot for building debian packages from a git
repository.
So far I have configured the master and everything seems fine until I
reach the steps for doing the real build. I build the packages by hand
using this "recipe":
# export this variables to get the package name and its version
export PKGNAME=$(dpkg-parsechangelog | grep-dctrl -esSource . | awk -F'
' '{print $2}')
export VERSION=$(dpkg-parsechangelog | grep-dctrl -esVersion . | awk -F'
' '{print $2}' | sed 's/-.*//g')
# then i create the tar.gz using the variables above
tar --anchored --exclude-vcs --exclude "./debian" -cvzf ../$(echo
$PKGNAME"_"$VERSION).orig.tar.gz --directory=$(pwd) ./
# and finally build the package
gbp buildpackage -tc --git-tag --git-retag -uc -us
Then I tried to "translate" the recipe to the steps in the configuration
file of the master, like this:
...
f.addStep(SetPropertyFromCommand(command = "dpkg-parsechangelog |
grep-dctrl -esSource . | awk -F' ' '{print $2}'", property =
'packagename'))
f.addStep(SetPropertyFromCommand(command = "dpkg-parsechangelog |
grep-dctrl -esVersion . | awk -F' ' '{print $2}' | sed 's/-.*//g'",
property = 'origver'))
f.addStep(ShellCommand(command = WithProperties("tar --anchored
--exclude-vcs --exclude './debian' -cvzf
../%(packagename)s_%(origver)s.orig.tar.gz --directory=$(pwd) ./")))
...
the last step (generate the tar.gz) fails and it's the main reason why
i'm stucked with this. I tried with this variants:
#f.addStep(ShellCommand(command = ['tar', '--anchored', '--exclude-vcs',
'--exclude', "'./debian'", "-cvzf",
# WithProperties("../%(packagename)s_%(origver)s.orig.tar.gz"),
'--directory=$(pwd)', './"']))
#f.addStep(ShellCommand(command = ['gbp', 'buildpackage', '-us', '-uc',
'-tc', '--git-tag', '--git-retag'], workdir='build/'+package,
env={'DIST': 'jessie', 'ARCH': a}))
but none of them worked for me. You can see the traceback here:
http://200.11.148.221:8010/builders/canaima-curiara-amd64/builds/21/steps/shell_3/logs/stdio
I used 'SetPropertyFromCommand' because I thought it could be a
convenient way to capture and store the name and version variables for
later use with the 'WithProperties' method, but now I think something is
failing there. I am not sure if the variables are actually being stored.
Is there a way to verify this?
Maybe there are more things that I am doing wrong?
I hope you could give me some insights about the correct configuration
of buildbot for the tasks mentioned or point me in the right direction
to get this working.
The full configuration file can be seen here:
https://gist.github.com/joseguerrero/f93ed54c2d999b6785e3
Regards!
More information about the devel
mailing list