Bug 17383 - Build debian package failed
Summary: Build debian package failed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 16.05
Hardware: All Linux
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-30 14:37 UTC by martin.stastny
Modified: 2018-02-23 12:31 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin.stastny 2016-09-30 14:37:26 UTC
When trying to build a Debian package from git with build-git-snapshot, dependencies fail.

Unable to resolve dependencies!  Giving up...
The following NEW packages will be installed:
  ca-certificates{a} libalgorithm-checkdigits-perl{a}
  libanyevent-http-perl{a} libanyevent-perl{a} libarchive-zip-perl{a}
  libauthen-cas-client-perl{a} libbiblio-endnotestyle-perl{a}
  libbusiness-isbn-data-perl{a} libbusiness-isbn-perl{a}
  libcache-fastmmap-perl{a} libcache-memcached-fast-perl{a}
  libcache-perl{a} libcgi-session-driver-memcached-perl{a}
  libcgi-session-perl{a} libcgi-session-serialize-yaml-perl{a}
  libclass-accessor-perl{a} libclass-factory-util-perl{a}
  libcommon-sense-perl{a} libencode-locale-perl{a} libfile-listing-perl{a}
  libfile-nfslock-perl{a} libheap-perl{a} libhtml-parser-perl{a}
  libhtml-tagset-perl{a} libhtml-tree-perl{a} libhttp-cookies-perl{a}
  libhttp-date-perl{a} libhttp-message-perl{a} libhttp-negotiate-perl{a}
  libio-socket-ssl-perl{a} libio-string-perl{a} liblwp-mediatypes-perl{a}
  liblwp-protocol-https-perl{a} libnet-http-perl{a} libnet-ssleay-perl{a}
  libssl1.0.0{a} libsub-name-perl{a} liburi-perl{a} libwww-perl{a}
  libwww-robotrules-perl{a} libxml-libxml-perl{a}
  libxml-namespacesupport-perl{a} libxml-sax-base-perl{a}
  libxml-sax-perl{a} libxml2{a} libyaml-syck-perl{a} netbase{a} openssl{a}
  ucf{a}
0 packages upgraded, 49 newly installed, 0 to remove and 0 not upgraded.
Need to get 6299 kB of archives. After unpacking 16.0 MB will be used.
Abort.
E: pbuilder-satisfydepends failed.
I: Copying back the cached apt archive contents
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//24915 and its subdirectories
Command 'pdebuild  --buildresult /root/debian' returns an error (256)
Comment 1 Mirko Tietgen 2016-09-30 16:57:13 UTC
The nightly builds don't show errors. https://apt.abunchofthings.net/koha-nightly/

What are you trying to build? Master?
Comment 2 Josef Moravec 2016-10-03 08:46:12 UTC
Did you try to update pbuilder environment?

See https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
Comment 3 martin.stastny 2016-10-03 15:28:17 UTC
That was the problem - I skipped some pbuilder setup steps.
Thanks for helping.
Comment 4 David Cook 2017-09-20 03:43:30 UTC
I've just run into the same problem, so I re-visited https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way.

I did my initial pbuilder setup quite a long time ago, so after reading Josef's comment, I figured I'd look at it again.

So I re-ran the following:

sudo apt-get install devscripts pbuilder dh-make fakeroot debian-archive-keyring
sudo pbuilder --login --save-after-login
apt-get install wget gnupg2
wget -O- http://debian.koha-community.org/koha/gpg.asc | apt-key add -
apt-get update
exit

I picked up an upgrade for debian-archive-keyring, and it looks like maybe I'd missed gnupg2 the first time around as that prompted the installation of quite a few packages. 

Just trying to build a vanilla 17.05.03 again now...

Hmm still failing.
Comment 5 David Cook 2017-09-20 03:44:50 UTC
Here are some error highlights that I'm getting:

dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested:
 pbuilder-satisfydepends-dummy depends on libalgorithm-checkdigits-perl; however:
  Package libalgorithm-checkdigits-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libanyevent-http-perl; however:
  Package libanyevent-http-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libanyevent-perl; however:
  Package libanyevent-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libarchive-extract-perl; however:
  Package libarchive-extract-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libarchive-zip-perl; however:
  Package libarchive-zip-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libauthen-cas-client-perl; however:
  Package libauthen-cas-client-perl is not installed.
 pbuilder-satisfydepends-dummy depends on libbiblio-endnotestyle-perl; however:
  Package libbiblio-endnotestyle-perl is not installed.
 pbuilder-satisfydepends-dummy depen


Err http://mirror.linux.org.au/debian/ jessie/main libexpat1 amd64 2.1.0-6+deb8u3
  404  Not Found [IP: 150.203.164.37 80]
Err http://mirror.linux.org.au/debian/ jessie/main libtiff5 amd64 4.0.3-12.3+deb8u2
  404  Not Found [IP: 150.203.164.37 80]
Err http://debian.koha-community.org/koha/ stable/main libcgi-session-driver-memcached-perl all 0.04-1koha2
  404  Not Found
Err http://debian.koha-community.org/koha/ stable/main libconvert-basen-perl all 0.01-1koha1
  404  Not Found
Err http://debian.koha-community.org/koha/ stable/main libmarc-record-perl all 2.0.6-1koha1
  404  Not Found
Err http://debian.koha-community.org/koha/ stable/main libtemplate-plugin-json-escape-perl all 0.2-1koha1
  404  Not Found
E: Failed to fetch http://mirror.linux.org.au/debian/pool/main/e/expat/libexpat1_2.1.0-6+deb8u3_amd64.deb: 404  Not Found [IP: 150.203.164.37 80]
E: Unable to correct for unavailable packages
Reading package lists...
Building dependency tree...
Reading state information...
Reading extended state information...
Initializing package states...
Writing extended state information...
Building tag database...
E: pbuilder-satisfydepends failed.
I: Copying back the cached apt archive contents
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env 
I: removing directory /var/cache/pbuilder/build//9441 and its subdirectories
Command 'pdebuild  --buildresult /home/dcook/debian' returns an error (256)
Comment 6 David Cook 2017-09-20 04:00:48 UTC
(In reply to David Cook from comment #5)
> Err http://mirror.linux.org.au/debian/ jessie/main libexpat1 amd64
> 2.1.0-6+deb8u3
>   404  Not Found [IP: 150.203.164.37 80]
> Err http://mirror.linux.org.au/debian/ jessie/main libtiff5 amd64
> 4.0.3-12.3+deb8u2
>   404  Not Found [IP: 150.203.164.37 80]
> Err http://debian.koha-community.org/koha/ stable/main
> libcgi-session-driver-memcached-perl all 0.04-1koha2
>   404  Not Found
> Err http://debian.koha-community.org/koha/ stable/main libconvert-basen-perl
> all 0.01-1koha1
>   404  Not Found
> Err http://debian.koha-community.org/koha/ stable/main libmarc-record-perl
> all 2.0.6-1koha1
>   404  Not Found
> Err http://debian.koha-community.org/koha/ stable/main
> libtemplate-plugin-json-escape-perl all 0.2-1koha1
>   404  Not Found

Looking at http://debian.koha-community.org:

1) I can see libcgi-session-driver-memcached-perl in http://debian.koha-community.org/koha/pool/main/libc/, but I see libcgi-session-driver-memcached-perl_0.04-1kohadev2_all.deb which looks like the wrong release

2) I can't find libconvert-basen-perl in http://debian.koha-community.org/koha/pool/main/libc/

3) I don't see libmarc-record-perl in http://debian.koha-community.org/koha/pool/main/libm/

4) I don't see libtemplate-plugin-json-escape-perl in http://debian.koha-community.org/koha/pool/main/libt/

Yet apt-cache seems to have info about these packages. For instance:

root@debian-jessie-dcook:/# apt-cache show libconvert-basen-perl
Package: libconvert-basen-perl
Version: 0.01-1koha1
Filename: pool/main/libc/libconvert-basen-perl/libconvert-basen-perl_0.01-1_all.deb

Looking at http://mirror.linux.org.au/debian/:

1) libexpat1 
pool/main/e/expat/libexpat1_2.1.0-6+deb8u3_amd64.deb

Instead of libexpat1_2.1.0-6+deb8u3_amd64.deb, I see libexpat1_2.1.0-6+deb8u4_amd64.deb

2) libtiff5 

Instead of libtiff5_4.0.3-12.3+deb8u2_amd64.deb, I see libtiff5_4.0.3-12.3+deb8u4_amd64.deb
Comment 7 David Cook 2017-09-20 04:02:04 UTC
Just did another apt-get update and it seems to have updated apt's cache again... so will try to build the Koha package yet again...
Comment 8 David Cook 2017-09-20 04:10:08 UTC
T(In reply to David Cook from comment #7)
> Just did another apt-get update and it seems to have updated apt's cache
> again... so will try to build the Koha package yet again...

That last apt-get update seems to have helped a lot. Still in the process of building but getting farther this time...

I don't know why an apt-get update 5 minutes later would make a difference when it looks like Koha's apt repository hasn't really changed much in months. Weird. But ok.
Comment 9 David Cook 2017-09-20 05:15:34 UTC
Huzzah! I was able to build the Debian packages in the end! 

I had already run "apt-get update" several times before getting the errors, but that final "apt-get update" seems to have done the trick. Don't know if it had to do with some finer points of apt caching or what, but... all good now it seems.