Debian Developers - Updating dpkg-cross: file moving question

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > July 2005 > Updating dpkg-cross: file moving question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Updating dpkg-cross: file moving question
Nikita V. Youshchenko

2005-07-11, 5:54 pm

Goswin von Brederlow

2005-07-11, 5:54 pm

"Nikita V. Youshchenko" <yoush@cs.msu.su> writes:

> Hello.
>
> I'm going to update dpkg-cross package, to follow post-sarge changes in
> dpkg and company.
>
> Dpkg-cross is a tool to create cross-compile environment, useful to
> cross-compile debian packages and other software.
> One of dpkg-cross's functions is to process a native library or libdev
> package for some arch, and turn it into arch-all packages that install
> libraries info /usr/$DEB_TARGET_GNU_ARCH)/lib/, and headers
> info /usr/$(DEB_TARGET_GNU_ARCH)/include/. E.g. arm cross-compile
> environment was created under /usr/arm-linux/. This was consistent with
> cross-binutils and cross-gcc packages file placement.


That isn't where the multiarch proposals for Debian and FHS place
files and I think it is best if you follow their lead. Use

/usr/lib/$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_OS)/
/usr/include/$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_OS)/

> In newer dpkg tools, target names changed, e.g. arm-linux turned into
> arm-linux-gnu. So, to keep system consistent, dpkg-cross should now place
> things under /usr/arm-linux/gnu/.
>
> The question is - how to process existing cross-compile environment,
> created by earlier versions of dpkg-cross.
>
> I am thinking to make the following trick. In postinst of new dpkg-cross,
> it will check for /usr/arm-linux, /usr/powerpc-linux/, and other places
> where packages created by earlier versions could place files. If any of
> such directories is found:
> - a directory with the new name will be created if not exists yet,
> - complete file hierarchy from the old directory will be copied to the new
> directory,
> - old directory will be replaces with a sympink to the new one.
>
> Looks that this procedure is more or less safe. E.g. removals of packages
> which files have been moved in this way, would remove correct files.


The target directory would not be removed.

> Is it OK to go this way? Maybe, something better could be suggested?
>
> This is still not perfect: for example, it is never safe to remove created
> symlinks; also cross-compile environment will become broken if -arch-cross
> packages created with old and new dpkg-cross are mixed and dpkg-cross
> itself is either old or not installed. However, isn't it better than doing
> nothing (in which case any mixing of -arch-cross packages created by old
> and new dpkg-cross will be broken)?
>
> Nikita


MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Nikita V. Youshchenko

2005-07-12, 7:56 am

Goswin von Brederlow

2005-07-12, 7:56 am

"Nikita V. Youshchenko" <yoush@cs.msu.su> writes:

>
> Hmm...
>
> All cross toolchains I've seen up to today, both free and commercial, use
> include/ and lib/ subdirectories of some prefix.
>
> Cross-ld from binutils use ${prefix}/${target}/lib these are the path to
> search libraries.
>
> Cross-gcc also uses ${prefix}/${target}/include and
> ${prefix}/${target}/lib.
>
> This is how things used to work for years.
> There should be a very serious reason to change this.


The multiarch and FHS proposals say that ${prefix}/${target}/* would
pollute the / and /usr directories while the lib and include subdirs
already have tons of files/dirs and the extra dirs won't matter.

Matter of opinion probably.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Miles Bader

2005-07-12, 7:56 am

Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> writes:
> The multiarch and FHS proposals say that ${prefix}/${target}/* would
> pollute the / and /usr directories while the lib and include subdirs
> already have tons of files/dirs and the extra dirs won't matter.
>
> Matter of opinion probably.


Of course. It's unlikely to be very serious "pollution" though, as it
will almost always be only 1 or 2 extra dirs, not many -- and it _is_
long-standing practice, and has the additional benefit of encapsulating
arch-specific hierarchies.

[I've come to depend on the FHS always making the wrong choice though.]

-Miles
--
Run away! Run away!


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Nikita V. Youshchenko

2005-07-12, 7:56 am


> "Nikita V. Youshchenko" <yoush@cs.msu.su> writes:
>
> The multiarch and FHS proposals say that ${prefix}/${target}/* would
> pollute the / and /usr directories while the lib and include subdirs
> already have tons of files/dirs and the extra dirs won't matter.


I think that following years-old de-facto standard of cross-compilation
environment file placing outweights '/usr pollution' argument.

So I think I will keep this as is in dpkg-cross. However, this may change
if other arguments will appear in future.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2005-07-12, 7:56 am

"Nikita V. Youshchenko" <yoush@cs.msu.su> writes:

>
> I think that following years-old de-facto standard of cross-compilation
> environment file placing outweights '/usr pollution' argument.
>
> So I think I will keep this as is in dpkg-cross. However, this may change
> if other arguments will appear in future.


Please contact the FHS people about this. This is best fixed prior to
the FHS multiarch stuff getting used in say SuSe or RH.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Nikita V. Youshchenko

2005-07-12, 7:56 am

> >> The multiarch and FHS proposals say that ${prefix}/${target}/* would
>
> Please contact the FHS people about this. This is best fixed prior to
> the FHS multiarch stuff getting used in say SuSe or RH.


Could you please give some links - whom to contact, what better to read
before, etc ?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2005-07-12, 7:56 am

"Nikita V. Youshchenko" <yoush@cs.msu.su> writes:

>
> Could you please give some links - whom to contact, what better to read
> before, etc ?


Try

Mithrandir [Tollef Fog Heen] on irc

and

http://www.linuxbase.org/futures/ideas/multiarch/
Matt Taggart <taggart@fc.hp.com>

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Nikita V. Youshchenko

2005-07-15, 7:53 am

Nikita V. Youshchenko

2005-07-15, 7:53 am

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com