Unable to build packages
**The first command builds fine**, as far as I can tell:
**$ docker build . -t koha/koha-dpkg:18.05 --build-arg BRANCH=18.05**
Sending build context to Docker daemon 123.9kB
Step 1/12 : FROM debian:stretch-slim
---> e9e49a465deb
Step 2/12 : LABEL maintainer="tomascohen@theke.io"
---> Running in 99dececd8fe3
Removing intermediate container 99dececd8fe3
---> 6e62448c9815
Step 3/12 : ARG BRANCH
---> Running in 88536e95f709
Removing intermediate container 88536e95f709
---> 0752c3d34000
Step 4/12 : ENV PATH /usr/bin:/bin:/usr/sbin:/sbin
---> Running in ee43709dbbff
Removing intermediate container ee43709dbbff
---> f62ed6046e72
Step 5/12 : ENV DEBIAN_FRONTEND noninteractive
---> Running in c7a5329ab14d
Removing intermediate container c7a5329ab14d
---> 1a0c6f1f7f79
Step 6/12 : RUN apt-get -y update && apt-get -y --allow-unauthenticated install devscripts pbuilder dh-make fakeroot debian-archive-keyring gnupg2 build-essential wget git libmodern-perl-perl && rm -rf /var/cache/apt/archives/* && rm -rf /var/lib/api/lists/*
---> Running in f0e06e3e67af
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
[SNIP]
Processing triggers for sgml-base (1.29) ...
Processing triggers for ca-certificates (20161130+nmu1+deb9u1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Removing intermediate container f0e06e3e67af
---> ac899ae9e0d5
Step 7/12 : RUN wget https://theke-space-one.nyc3.digitaloceanspaces.com/base_${BRANCH}.tgz -O /base.tgz
---> Running in 17537275dfba
--2018-11-22 14:38:46-- https://theke-space-one.nyc3.digitaloceanspaces.com/base_18.05.tgz
Resolving theke-space-one.nyc3.digitaloceanspaces.com (theke-space-one.nyc3.digitaloceanspaces.com)... 162.243.189.2
Connecting to theke-space-one.nyc3.digitaloceanspaces.com (theke-space-one.nyc3.digitaloceanspaces.com)|162.243.189.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 204074942 (195M) [application/x-compressed-tar]
Saving to: '/base.tgz'
0K .......... .......... .......... .......... .......... 0% 597K 5m34s
[SNIP]
199250K .......... .......... .......... .......... . 100% 1.31M=3m51s
2018-11-22 14:42:37 (863 KB/s) - '/base.tgz' saved [204074942/204074942]
Removing intermediate container 17537275dfba
---> 9be74c6fbd3f
Step 8/12 : VOLUME /koha
---> Running in f2d6348de5e0
Removing intermediate container f2d6348de5e0
---> aaa0e5066003
Step 9/12 : VOLUME /debs
---> Running in 4a2aa6240315
Removing intermediate container 4a2aa6240315
---> 618ae8025b04
Step 10/12 : ENV PERL5LIB=/koha
---> Running in b941fac8caa0
Removing intermediate container b941fac8caa0
---> 5b09a61bda81
Step 11/12 : ADD build.sh /build.sh
---> aed536a300cb
Step 12/12 : CMD /build.sh
---> Running in 86d03d99b0ea
Removing intermediate container 86d03d99b0ea
---> 94937f077262
Successfully built 94937f077262
Successfully tagged koha/koha-dpkg:18.05
**The second command fails:
$ docker run --volume=/home/mtompset/kohaclone:/koha --volume=/tmp:/debs --privileged --env VERSION=18.05~patch koha/koha-dpkg:18.05**
git status --porcelain -unormal
dch --force-distribution -D "squeeze-dev" -v "18.05~patch-1" "Building git snapshot."
dch warning: Recognised distributions are:
experimental, unstable, testing, stable, oldstable, oldoldstable,
{bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
{testing,stable,oldstable,oldoldstable}-proposed-updates,
{bullseye,buster,stretch,jessie,wheezy}-security,
{testing,stable,oldstable,oldoldstable}}-security, jessie-backports, stretch-backports and UNRELEASED.
Using your request anyway.
dch: warning: debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: koha (unknown) squeeze-dev; urgency=medium
dch: fatal error at line 1083:
New version specified (18.05~patch-1) is less than
the current version number (unknown)! Use -b to force.
dch -r "Building git snapshot."
dch: warning: debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: koha (unknown) squeeze-dev; urgency=medium
git archive --format=tar --prefix="koha-18.05~patch/" HEAD | gzip -9 > "../koha_18.05~patch.orig.tar.gz"
pdebuild -- --basetgz /var/cache/pbuilder/base.tgz --buildresult /debs
W: /root/.pbuilderrc does not exist
dpkg-parsechangelog: warning: debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: koha (unknown) squeeze-dev; urgency=medium
dpkg-parsechangelog: warning: debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: koha (unknown) squeeze-dev; urgency=medium
dpkg-checkbuilddeps: error: Unmet build dependencies: libalgorithm-checkdigits-perl libanyevent-http-perl libanyevent-perl libarchive-extract-perl libauthen-cas-client-perl libbiblio-endnotestyle-perl libbusiness-isbn-perl libbusiness-issn-perl libbytes-random-secure-perl libcache-fastmmap-perl libcache-memcached-fast-perl libcache-memcached-perl libcache-perl libcgi-compile-perl libcgi-emulate-psgi-perl libcgi-session-driver-memcached-perl libcgi-session-perl libcgi-session-serialize-yaml-perl libclass-factory-util-perl libcrypt-eksblowfish-perl libdata-ical-perl libdate-calc-perl libdate-manip-perl libdatetime-event-ical-perl libdatetime-format-ical-perl libdatetime-format-mysql-perl libdatetime-perl libdatetime-set-perl libdatetime-timezone-perl libdbd-mock-perl libdbd-mysql-perl libdbd-sqlite2-perl libdbi-perl libdbix-class-schema-loader-perl libdbix-runsql-perl libdevel-cover-perl libemail-date-perl libexception-class-perl libfile-slurp-perl libfont-ttf-perl libgd-barcode-perl libgd-perl libgraphics-magick-perl libgravatar-url-perl libhtml-scrubber-perl libhttp-oai-perl (>= 3.2) | libhttp-oai-3.27-perl libhttp-oai-perl (<< 4.0) | libhttp-oai-3.27-perl libintl-perl libjson-perl libjson-validator-perl liblibrary-callnumber-lc-perl liblingua-ispell-perl liblingua-stem-perl liblingua-stem-snowball-perl liblocale-currency-format-perl liblocale-po-perl liblog-log4perl-perl libmarc-charset-perl libmarc-record-perl libmarc-xml-perl libmime-lite-perl libmodule-bundled-files-perl libmodule-pluggable-perl libmojolicious-perl (>= 6.0) libmojolicious-plugin-openapi-perl libnet-ldap-perl libnet-oauth2-authorizationserver-perl libnet-server-perl libnet-sftp-foreign-perl libnet-z3950-zoom-perl libnumber-format-perl libopenoffice-oodoc-perl libparallel-forkmanager-perl libpdf-api2-perl libpdf-api2-simple-perl libpdf-fromhtml-perl libpdf-reuse-barcode-perl libpdf-reuse-perl libpdf-table-perl libplack-middleware-reverseproxy-perl libppi-perl libreadonly-perl libreadonly-xs-perl libschedule-at-perl libsearch-elasticsearch-perl libsereal-decoder-perl libsereal-encoder-perl libsms-send-perl libstring-random-perl libsys-cpu-perl libtemplate-perl libtemplate-plugin-htmltotext-perl libtemplate-plugin-json-escape-perl libtemplate-plugin-stash-perl libtest-deep-perl libtest-exception-perl libtest-mockmodule-perl libtest-mockobject-perl libtest-mocktime-perl libtest-strict-perl libtest-warn-perl libtest-www-mechanize-perl libtest-yaml-valid-perl libtext-bidi-perl libtext-csv-encoded-perl libtext-csv-perl libtext-csv-xs-perl libtext-iconv-perl libtext-pdf-perl libtext-unaccent-perl libtext-unidecode-perl libtime-fake-perl libuniversal-can-perl libuniversal-require-perl libuuid-perl libwebservice-ils-perl libwww-csrf-perl libwww-youtube-download-perl libxml-dumper-perl libxml-libxml-perl libxml-libxslt-perl libxml-rss-perl libxml-sax-perl libxml-sax-writer-perl libxml-simple-perl libxml-writer-perl libyaml-perl libyaml-syck-perl xsltproc docbook-xsl ttf-dejavu libxml2-utils perl-modules-5.26 | libtest-simple-perl (>= 1.302073)
W: Unmet build-dependency in source
dpkg-source: warning: koha/debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: koha (unknown) squeeze-dev; urgency=medium
dpkg-source: error: version number does not start with digit
Command 'pdebuild -- --basetgz /var/cache/pbuilder/base.tgz --buildresult /debs' returns an error (512)
Edited by Tomas Cohen Arazi