[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-cross maintenance / development



> I made your (Nikita) dpkg-cross stuff work once and noticed it came
> back. So is the CROSSPREFIX exported correctly?

Something strange.
I just tested: CROSSPREFIX is *not* set here by dpkg-buildpackage wrapper 
from dpkg-cross 1.15, and by one from 1.14, and by one from 1.14.5
Test was: I created /tmp/debian/ subdirectory in an empty directiry, put 
there a rules file with the following lines:
#!/bin/sh
echo Command line: $0 $*
echo
echo MAKEFLAGS=$MAKEFLAGS
echo
echo CROSSPREFIX=$CROSSPREFIX
exit 1
and added a dummy /tmpdebian/changelog to make dpkg-parsechangelog happy.

Here is the output of (cd /tmp && dpkg-buildpackage -aarm):

1.15:
Command line: debian/rules clean

MAKEFLAGS=w -- CC=arm-linux-gcc GCC=arm-linux-gcc RANLIB=arm-linux-ranlib 
DEB_HOST_GNU_CPU=arm AS=arm-linux-as USRLIBDIR=/usr/arm-linux/lib 
LD=arm-linux-ld CXX=arm-linux-g++ DEB_HOST_ARCH=arm 
DEB_HOST_GNU_SYSTEM=linux DEB_HOST_GNU_TYPE=arm-linux 
STRIP=arm-linux-strip AR=arm-linux-ar 
CONFIG_SITE=/etc/dpkg/cross-config.arm ARCH=arm IMAKECPP=arm-linux-cpp

CROSSPREFIX=

1.14:
Command line: debian/rules clean

MAKEFLAGS=w -- CC=arm-linux-gcc GCC=arm-linux-gcc RANLIB=arm-linux-ranlib 
DEB_HOST_GNU_CPU=arm AS=arm-linux-as USRLIBDIR=/usr/arm-linux/lib 
LD=arm-linux-ld CXX=arm-linux-g++ DEB_HOST_ARCH=arm 
DEB_HOST_GNU_SYSTEM=linux DEB_HOST_GNU_TYPE=arm-linux 
STRIP=arm-linux-strip AR=arm-linux-ar 
PATH=/home/nikita/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/games:.:/usr/local/bin:/usr/arm-linux/bin 
CONFIG_SITE=/etc/dpkg/cross-config.arm ARCH=arm IMAKECPP=arm-linux-cpp

CROSSPREFIX=

1.14.5:
Command line: debian/rules clean

MAKEFLAGS=w -- CC=arm-linux-gcc GCC=arm-linux-gcc RANLIB=arm-linux-ranlib 
DEB_HOST_GNU_CPU=arm AS=arm-linux-as USRLIBDIR=/usr/arm-linux/lib 
LD=arm-linux-ld CXX=arm-linux-g++ DEB_HOST_ARCH=arm 
DEB_HOST_GNU_SYSTEM=linux DEB_HOST_GNU_TYPE=arm-linux 
STRIP=arm-linux-strip AR=arm-linux-ar 
CONFIG_SITE=/etc/dpkg/cross-config.arm ARCH=arm IMAKECPP=arm-linux-cpp

CROSSPREFIX=

You see, CROSSPREFIX is not set in environment or in MAKEFLAGS.

Maybe you had something in /etc/dpkg/cross-compile that is no longer there?
If not, could you please send me dpkg-buildpackage script that sets 
CROSSPREFIX, so I could find out what magic is happening there?

> > IMHO the correct fix should go to debhelper's dh_strip: it should
> > honour $STRIP environment variable. In general, it would be good (at
> > least for EmDebian people) if debhelper and dpkg-dev scripts would
> > honour a set of environment variables to locate executables and data
> > files. Currently EmDebian's stag-addons tries to replace debhelper
> > completely, which will cause out-of-sync problems in the long term.
>
> Well that is why I chose to make a parallel structure with all the
> _embed scripts. And that was easy enough by replacing debian by emdebian
> in the scripts. (But you noticed that already). But the fact stays it
> would get out of sync with debhelper once, but without breaking the
> emdebian debhelper system as it is completely seperate (not like the
> dpkg-cross package)

Well, this may be a solution for EmDebian, but not for cross-compiling 
debian packages.

With your *_embed approach, you may face the same situation as 
toolchain-source package a few months ago: bug fixes that go to "original" 
package will not propagate to your copy unless that is done by hands, and 
any requirement of hand-work sooner or later faces lack of developer time 
or other similar issues.

However, if dpkg-dev and debhelper maintaners refuce to make their tools 
more robust, there probably is no other way :(.

Nikita



Reply to: