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

dpkg-cross 1.99+2.0.0pre1 changes



(I had to omit some of the smaller changes - it should all be in the
ChangeLog but ask if you spot something major that I haven't mentioned
here.)

0. BREAKAGES!
The changes in dpkg-cross are so extensive that apt-cross and
emdebian-tools are broken. Current SVN for emdebian-tools builds 0.3.9
which works with pre1. There is a branch of apt-cross (apt-nc-cross)
that builds 0.2.9 which works with dpkg-cross pre1. HOWEVER apt-cross
0.2.9 has VERY limited functionality (even --get is incomplete) so
dpkg-cross pre1 should only be installed in a chroot or on a system
that does not need apt-cross or emdebian-tools.

There's little point adding a NEWS.Debian comment on this because it
would be too late but Conflicts: are in place:
Conflicts: apt-cross (<< 0.2.9), emdebian-tools (<< 0.3.9)
(The watchful will note that the previous Conflict on pkg-config has
been dropped because the conflicting version is no longer in
stable or oldstable.)

The dpkg-cross pre-releases will all go into experimental and no upload
will be made to unstable until apt-cross 0.2.9 is available as a
package in Emdebian and is also ready to go into Debian as v0.3.0.
emdebian-tools needs less changes, some of which can be done AFTER
dpkg-cross 2.0.0 reaches unstable.

I anticipate at least three pre-releases, maybe more.

1. REMOVED PERL FILE:
/usr/share/perl5/dpkg-cross.pl
Replaced by:
use Debian::DpkgCross;

There are some functions not universally exported but which can be
brought in manually:
gccross : use Debian::DpkgCross qw(simplify_path);
dpkg-shlibdeps : use Debian::DpkgCross qw(dpkgcross_application);
dpkg-buidpackage : use Debian::DpkgCross qw(setup_cross_env);

The universally exported functions are:
read_config setup get_architecture create_tmpdir convert_path
get_keepdeps get_removedeps get_config get_version detect_arch
convert_ld_library_path get_tool rewrite_pkg_name dump_debug_data
check_arch

2. Perl changes:
	use strict;
	use warnings;
All scripts and the new module are now fully strict and -w compliant.

3. MAKEFLAGS are no longer exported!
This is a big change and could affect a lot of packages but the honest
reason is this:
We should not be exporting MAKEFLAGS ourselves. Packages that were
buggy with MAKEFILES are now non-buggy and packages that relied on
MAKEFLAGS are now buggy.

CDBS packages have a single line fix in debian/rules:
DEB_CONFIGURE_SCRIPT_ENV = 

I'll be filing a bug in due course.

This allows packages like libx11-6 to build internal tools using
CC_FOR_BUILD (set to gcc) and run them to make certain generated source
files during the cross-build. I expect it to also work for fontconfig.

4. New function:
&read_config();
&setup();

$config = &get_config;

get_config is new because the configuration is now an internal variable
within the module and is not in scope for the scripts. It is a hash
table:
	$config{'crossbase'} = $crossbase;
	$config{'crossprefix'} = $crossprefix;
	$config{'crossdir'} = $crossdir;
	$config{'crossbin'} = $crossbin;
	$config{'crosslib'} = $crosslib;
	$config{'crosslib64'} = $crosslib64;
	$config{'crossinc'} = $crossinc;
	$config{'crossroot'} = $crossroot;

The values from the two config files:
$conffile = "/etc/dpkg-cross/cross-compile";
my $home = File::HomeDir->my_home;
$private_conffile = "${home}/.dpkg-cross/cross-compile";

are read in using Config::Auto which removes all the syntax problems of
the previous bespoke parser. Comments are ignored as before.

Everything you specify in either of the config files is now available
within the module but only "recognised" options are exported. Config
file values are merged - data from /etc/ is read first and data
from /home/ is overlaid so that any data not in /home/ comes from /etc/
and any data from /etc/ is overwritten if it also exists in /home/

@removedeps and @keepdeps need to be sorted out still.

5. REMOVED CONFFILES:
/etc/dpkg-cross/cross-config.common obsolete 
/etc/dpkg-cross/cross-config.gnu obsolete 
/etc/dpkg-cross/cross-config.linux obsolete 
/etc/dpkg-cross/cross-config.w32 obsolete 
/etc/dpkg-cross/crosstools obsolete

6. TESTING
Ah, yes, testing. So far, only two packages have been tested. I plan to
test more tomorrow. Please check for regressions and other brokenness
and report via the BTS. (I may forget if it's only done via this list.)
Please tag all pre1 issues 'experimental'. Ta.

7. Speaking of bugs - 6 closed so far, a few more possible. I would like
to close all but one of the current dpkg-cross bugs. (I'm not sure how
to fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285569 )

8. Debian::DpkgCross.3 manpage - horribly incomplete.

9. %pkgvars - currently disabled. I will merge scope: into the
existing %config which then leaves no place for %pkgvars or crosstools
but this is pending for pre2.

10. debug output. 
You now get two debug files in /tmp/:
gccross2.log : Details the environment, %config and check process of
the last call (the last failed call if the build breaks).

dpkg-cross2.log : Actually misnamed, this is a dpkg-buildpackage log
file that contains %config, PATH changes, $ENV{} changes and the
contents of the gccross temporary directory for the last build,
including variables set and modified via the module.

The debug output is meant for us, not other users. To this end, I'm
experimenting with debian/buscript which could go into /usr/share/bugs/
to prompt users reporting bugs for the content of these logs and other
configuration details, exactly as with apt. If this works, I'll ditch
the idea of turning --debug off and leave it enabled for all builds.

debian/bugscript is not enabled in pre1. There again, because the module
is a new package, pre1 will spend some time in the NEW queue. All
changes for pre1 are now in CVS so it should be easy for everyone to
build their own packages until pre1 clears NEW and enters experimental.
Just be careful where you install dpkg-cross_1.99+2.0.0pre1_all.deb !!!

(And remember: install libdebian-dpkgcross-perl_1.99+2.0.0pre1_all.deb)

OK, uploading to NEW now.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpd4DtLCOb0F.pgp
Description: PGP signature


Reply to: