Your message dated Mon, 03 Dec 2012 18:02:30 +0000
with message-id <[email protected]>
and subject line Bug#695007: fixed in netkit-ftp 0.17-28
has caused the Debian Bug report #695007,
regarding netkit-ftp: fails to cross-build: *FLAGS handling, incorrect
compiler, incorrect strip program
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
695007: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695007
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: netkit-ftp
Version: 0.17-27
Severity: normal
Tags: patch
User: [email protected]
Usertags: cross
netkit-ftp fails to cross-build as follows:
[...]
Generating MCONFIG...
sed: -e expression #2, char 63: unknown option to `s'
/usr/bin/make
make[1]: Entering directory `/«PKGBUILDDIR»'
(cd ftp && /usr/bin/make)
make[2]: Entering directory `/«PKGBUILDDIR»/ftp'
cc cmds.c -c
[...]
/usr/bin/make INSTALL_OPTS=-s INSTALLROOT=`pwd`/debian/ftp
MANDIR=/usr/share/man install
make[1]: Entering directory `/«PKGBUILDDIR»'
(cd ftp && /usr/bin/make install)
make[2]: Entering directory `/«PKGBUILDDIR»/ftp'
install -s -m ftp /«PKGBUILDDIR»/debian/ftp
install: missing destination file operand after `/«PKGBUILDDIR»/debian/ftp'
Try `install --help' for more information.
make[2]: *** [install] Error 1
There are multiple problems here:
* The seddery in debian/rules fails to handle the situation where
*FLAGS contains the '/' character. My cross-build setup sets LDFLAGS
to something that contains -L/usr/lib/arm-linux-gnueabihf (and
various other similar stuff) to work around for a toolchain bug; in
general '/' seems moderately likely to occur in linker flags.
I opted for the ';' separator instead, on the basis that that doesn't
tend to occur in compiler/linker flags very often, but you might
prefer to rewrite this in a more sophisticated way that can handle
any input.
* The native compiler is used rather than the appropriate
cross-compiler. While autoconf works this out automatically with a
bit of help from dh_auto_configure or manual use of --build/--host
options, simpler build systems tend to have to be told what to do in
a variety of ways.
* The install error is due to the earlier sed failure, but after fixing
that it still fails due to using 'install -s', which calls the native
strip program rather than the appropriate cross-strip. We could take
care to avoid -s when cross-building as dh_strip will already take
care of it; but why bother with -s at all? dh_strip always does at
least as good a job, so we might as well just let it get on with it
in all cases.
The following patch fixes all these problems and results in a successful
cross-build from amd64 to armhf.
* Tolerate '/' in CPPFLAGS, CFLAGS, or LDFLAGS. (This is at the expense
of not tolerating ';', but that at least seems less likely to occur.)
* Use correct compiler when cross-building.
* Never pass -s to install; dh_strip does a more accurate job of it
anyway, and knows how to use the correct strip command when
cross-building.
diff -Nru netkit-ftp-0.17/debian/rules netkit-ftp-0.17/debian/rules
--- netkit-ftp-0.17/debian/rules 2012-05-23 18:35:11.000000000 +0100
+++ netkit-ftp-0.17/debian/rules 2012-12-02 23:57:44.000000000 +0000
@@ -7,26 +7,30 @@
#export DH_VERBOSE=1
DEFS := -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_OPTS = -s
-endif
-
CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ CROSS :=
+else
+ CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
+endif
+
build: build-stamp
build-stamp:
dh_testdir
if [ ! -f MCONFIG ]; then \
./configure; \
- sed -e 's/^CFLAGS=\(.*\)$$/CFLAGS= -g $(DEFS)
-fno-strict-aliasing $(CFLAGS) $(CPPFLAGS) \1/' \
- -e 's/^LDFLAGS=\(.*\)$$/& $(LDFLAGS)/' \
+ sed -e 's;^CFLAGS=\(.*\)$$;CFLAGS= -g $(DEFS)
-fno-strict-aliasing $(CFLAGS) $(CPPFLAGS) \1;' \
+ -e 's;^LDFLAGS=\(.*\)$$;& $(LDFLAGS);' \
MCONFIG > MCONFIG.new; \
mv MCONFIG.new MCONFIG; \
fi
- $(MAKE)
+ $(MAKE) $(CROSS)
touch build-stamp
@@ -46,7 +50,7 @@
dh_prep
dh_installdirs
- $(MAKE) INSTALL_OPTS=$(INSTALL_OPTS) INSTALLROOT=`pwd`/debian/ftp
MANDIR=/usr/share/man install
+ $(MAKE) INSTALLROOT=`pwd`/debian/ftp MANDIR=/usr/share/man install
mv debian/ftp/usr/bin/ftp debian/ftp/usr/bin/netkit-ftp
ln -sf netkit-ftp debian/ftp/usr/bin/pftp
mv debian/ftp/usr/share/man/man1/ftp.1 \
Thanks,
--
Colin Watson [[email protected]]
--- End Message ---
--- Begin Message ---
Source: netkit-ftp
Source-Version: 0.17-28
We believe that the bug you reported is fixed in the latest version of
netkit-ftp, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Alberto Gonzalez Iniesta <[email protected]> (supplier of updated netkit-ftp
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 03 Dec 2012 18:53:56 +0100
Source: netkit-ftp
Binary: ftp
Architecture: source i386
Version: 0.17-28
Distribution: unstable
Urgency: low
Maintainer: Alberto Gonzalez Iniesta <[email protected]>
Changed-By: Alberto Gonzalez Iniesta <[email protected]>
Description:
ftp - classical file transfer client
Closes: 695007
Changes:
netkit-ftp (0.17-28) unstable; urgency=low
.
* Patch from Colin Watson to fix cross-building. (Closes: #695007)
Checksums-Sha1:
701e66a879e67e820e4789de5b08d930c3e5f23f 1130 netkit-ftp_0.17-28.dsc
77c8622897ab3f8d9f09ce82361d6abb16469c52 35269 netkit-ftp_0.17-28.debian.tar.gz
4388c2b655ce93dcfd450cc2868a6f11af573915 58110 ftp_0.17-28_i386.deb
Checksums-Sha256:
3c17e1c59d073c3d6a5f86ff152dab06d889de80369eea2176724cb2df7e2aec 1130
netkit-ftp_0.17-28.dsc
b145638ffdefa4cc786c678036f109ab7287f8a90c47ca48c6f2654c5dda7742 35269
netkit-ftp_0.17-28.debian.tar.gz
4748d725ef0a1e5c3f29205ced48ca20dddc6e77fd76574adf2814eb3173b4fe 58110
ftp_0.17-28_i386.deb
Files:
54a6974cdf3e5c93b0db7c3022f52c2a 1130 net standard netkit-ftp_0.17-28.dsc
8dbbb11a141fa9f5ad04b44567121dc8 35269 net standard
netkit-ftp_0.17-28.debian.tar.gz
25ccd72c55677f20fe841b9ccf406b15 58110 net standard ftp_0.17-28_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlC855sACgkQxRSvjkukAcNMhACgjRicauPElPdQHK/GijYFiwv1
cNwAmwd81ut1XQ7Lu6cXk4bLlEm3DCTW
=Q+Eq
-----END PGP SIGNATURE-----
--- End Message ---