Bug#805991: alpine: FTBFS when built with dpkg-buildpackage -A (No such file or directory)

2015-11-24 Thread Asheesh Laroia
Thanks! I'll aim to look at this in the next 10 days or so.​


Bug#805991: alpine: FTBFS when built with dpkg-buildpackage -A (No such file or directory)

2015-11-24 Thread Santiago Vila
Package: src:alpine
Version: 2.20+dfsg1-1
User: sanv...@debian.org
Usertags: binary-indep
Severity: important

Dear maintainer:

I tried to build this package with "dpkg-buildpackage -A"
(i.e. only architecture-independent packages), and it failed:


[...]
 fakeroot debian/rules binary-indep
dh binary-indep --with autoreconf
   dh_testroot -i
   dh_prep -i
   dh_auto_install -i
make -j1 install DESTDIR=/<>/alpine-2.20\+dfsg1/debian/tmp 
AM_UPDATE_INFO_DIR=no
make[1]: Entering directory '/<>/alpine-2.20+dfsg1'
if test ! -L c-client ; then ln -s imap/c-client c-client ; fi
touch imap/ip6
cd imap && /usr/bin/make ldb EXTRACFLAGS=" -DTLSV1_2 -I/usr/include/openssl 
-D_FORTIFY_SOURCE=2 -I/usr/include -g -O2 -fstack-protector-strong -Wformat 
-Werror=format-security" EXTRALDFLAGS=" -L/usr/lib -Wl,-z,relro -Wl,--as-needed 
-L/usr/lib  -lgssapi_krb5 -lpam -lldap -lcrypto -lssl -ldl  -ltinfo -llber 
-lpam -lkrb5"  EXTRASPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib 
SSLDIR=/etc/ssl SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private 
EXTRAAUTHENTICATORS=gss "
make[2]: Entering directory '/<>/alpine-2.20+dfsg1/imap'
make build EXTRACFLAGS='-DTLSV1_2 -I/usr/include/openssl -D_FORTIFY_SOURCE=2 
-I/usr/include -g -O2 -fstack-protector-strong -Wformat 
-Werror=format-security' EXTRALDFLAGS='-L/usr/lib -Wl,-z,relro -Wl,--as-needed 
-L/usr/lib  -lgssapi_krb5 -lpam -lldap -lcrypto -lssl -ldl  -ltinfo -llber 
-lpam -lkrb5' EXTRADRIVERS='mbox' EXTRAAUTHENTICATORS='' PASSWDTYPE=std 
SSLTYPE=nopwd IP=4 EXTRASPECIALS='SSLINCLUDE=/usr/include/openssl 
SSLLIB=/usr/lib SSLDIR=/etc/ssl SSLCERTS=/etc/ssl/certs 
SSLKEYS=/etc/ssl/private EXTRAAUTHENTICATORS=gss ' BUILDTYPE=lnp IP=6 \
SPECIALS="GSSINCLUDE=/usr/include GSSLIB=/usr/lib MAILSPOOL=/var/mail"
make[3]: Entering directory '/<>/alpine-2.20+dfsg1/imap'
Rebuilding c-client for lnp...
cd c-client;make all CC=`cat CCTYPE` \
 CFLAGS="`cat CFLAGS`" `cat SPECIALS`
make[4]: Entering directory '/<>/alpine-2.20+dfsg1/imap/c-client'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/<>/alpine-2.20+dfsg1/imap/c-client'
sh -c 'rm -rf rebuild || true'
Building bundled tools...

[... snipped ...]

dh_install: usr/share/man/man1/pico.1 exists in debian/tmp but is not installed 
to anywhere
dh_install: usr/share/man/man1/pilot.1 exists in debian/tmp but is not 
installed to anywhere
dh_install: usr/share/man/man1/rpload.1 exists in debian/tmp but is not 
installed to anywhere
# Rename pico to pico.alpine.
# alpine-pico.install puts this in the alpine-pico package.
mv debian/alpine-pico/usr/bin/pico debian/alpine-pico/usr/bin/pico.alpine
mv: cannot stat 'debian/alpine-pico/usr/bin/pico': No such file or directory
debian/rules:25: recipe for target 'override_dh_install' failed
make[1]: *** [override_dh_install] Error 1
make[1]: Leaving directory '/<>/alpine-2.20+dfsg1'
debian/rules:49: recipe for target 'binary-indep' failed
make: *** [binary-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-indep gave error exit 
status 2


Sorry not to have a fix, as I am reporting many bugs similar to
this one, but I can give some general hints:

* If all the arch-independent packages are dummy transitional packages
released with jessie, the easy fix is to drop them now.
 
* If not, debian/rules should be modified so that the binary-indep
target works in all cases, even when binary-arch is not used (this is
what the "Architecture: all" autobuilder does). For that:

* If you are using debhelper, you might want to use options -a and -i
for dh_* commands so that they do not act on packages they do not
have to act.

* Also, if you are using dh, the (independently) optional targets
override_dh_foo-arch and override_dh_foo-indep (for several values
of "foo") may be useful to write a debian/rules which behaves exactly
as desired.


After checking that both "dpkg-buildpackage -A" and "dpkg-buildpackage -B"
work properly, this package will be suitable to be uploaded in
source-only form if you wish (you might want to try it).

Thanks.