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

Re: dpkg-cross



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > Maybe it's better to create a more general solution? What comes to
> > mind:
> >
> > - - allow /etc/dpkg/cross-compile to define ANY environment variables
> > directly in /etc/dpkg/cross-compile;
> >
> > - - or even more general: dpkg-buildpackage wrapper will get a "mode"
> > parameter (e.g. -m MODE); /etc/dpkg/cross-compile will have "mode
> > sections", that define, which environment variables should be set in
> > which mode; so one mode will be used for emdebian, other mode for
> > debian packages cross-compiling, others for something else ...
> >
> > Isn't that a better solution that your changes? This may be
> > implemented in half-an-our, and won't require a rewrite when tomorrow
> > you will need some more environment variables.
>
> My approach gradually grew by trail and error, so it got implemented the
> way it looks now. Well there are certainly some very good things about
> your approach.

I've implemented that, and uploaded dpkg-cross 1.14.6 to 
http://zigzag.lvk.cs.msu.su/~nikita/debian/

Changelog is 

dpkg-cross (1.14.6) unstable; urgency=low

 * debian/rules: move commands from binary-arch to binary-indep (everything
   built is architecture-independent)
 * debian/rules: don't run dh_strip and dh_shlibdeps - both are useless for
   this package
 * Implemented enhanced addition variable setting control, after some
   discussion with EmDebian people. See cross-compile(5) for more
   information. Note that the new format of this file is completely
   backward-compatable.
   Example of usage for EmDebian added as a comment to the default
   /etc/dpkg/cross-compile file.
 * Removed zlib1g-arm-cross.deb that was forgotten in the build directory
   of 1.14.5 version.

- -- Nikita V. Youshchenko <yoush@cs.msu.su>  Thu,  3 Jun 2004 01:19:28 +0400

- From the manpage:

  Second  part  of  the file is started by a line that ends with a colon.
  In this part additional variables may be defined for  dpkg-buildpackage
  wrapper.   This  feature  is  meant  for your convenience: Packages can
  refer to unusual Makefile variables for the tools to use,  and  with  a
  package-specific  section  you  can  tell dpkg-buildpackage about those
  variables, so that you don't need to set them manually each time.

  Variables may be defined in two scopes  -  makeflags  and  environment.
  Variables defined in makeflags scope are put into MAKEFLAGS environment
  variable. Variables defined in environment scope become separate  envi-
  ronment variables.

  Default scope is makeflags. Scope is changed to environment after
              mode environment:
  line, and restored to makeflags after
              mode makeflags:
  line. Note colons at the end of those lines.

  Variables  may  be defined both globally and on per-package basis. This
  is controled by
              package NAME:
  lines. If NAME is all, subsequent definitions will be global, otherwise
  - local for package NAME.
  For cpmpatability with older format of cross-compile file, package key-
  word may be ommited. Also note colon at the end of the line.

  It is possible to define several sets of variables  for  different  use
  cases.   For  example,  one  set may be used for emdebian-style package
  builds, another for normal package cross-compiling. This is implemented
  using mode concept.

  Any definitions after a
              mode NAME:
  line  are  valid  only  for mode NAME. To choose mode, use -M switch of
  dpkg-buildpackage wrapper. Only variables defined for the  chosen  mode
  will  be  set,  others  will be ignored. If no -M switch is given, mode
  default is assumed.

  There is a special mode named all. Variables defined for this mode  are
  set always, in addition to mode-specific settings. This is the mode for
  the variables defined before the first "mode NAME:" line.


I believe that's enough for emdebian needs.

Unfortunately, implementation took a bit longer than I expected, so I did 
just simple testing. Seems to work, but probably something is broken. Let 
me know if you find anything. I decided not to update Packages.gz and 
Sources.gz in my repository for now - they still point to 1.14.5. 


I'll answer all questions in your mails later.

Nikita
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAvkgzsTbPknTfAB4RAq6vAKCjiTXWsfl1S8IrZCxd4GGjYUbTTACgkDHX
71jdVXIzFaBj3bfm/dPQ0Dg=
=GJ9D
-----END PGP SIGNATURE-----



Reply to: