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

Re: Compiling Debs on AMD vs. Intel and 32bit vs. 64bit

"Michael S. Peek" <peek@tiem.utk.edu> writes:

> Hi gurus,
> I'm looking to buy or build an install host -- one machine dedicated
> to building and serving a local repository for the purposes of
> installing/upgrading/maintaining other Debian hosts throughout our
> organization.  The problem is, I'm a little clueless when it comes to
> hardware, and I want to make sure that I'm not about to shoot myself
> in the foot.  Some of the packages in my local repository require
> compiling.  Do I need to worry about AMD vs. Intel and/or 32-bit
> vs. 64-bit when building my install host?  (A machine that generates
> *.deb files that are only good on *that* one machine is useless to me.)
> How do you guys deal with this in your organizations?
> Thanks for your input,
> Michael Peek

The short answere is: No, you don't have to worry.

Debian packages are (by default) always build for the architecture of
the port you have installed regardless of the actual system used to
build the package. In fact it is a serious bug for a source to probe
the used hardware and build different depending on the result. Every
debian package build for a port must work on all systems supported by
that port.

In english that means even if you build a package under debian i386 on
an i686 or even amd64/em64t (em64t is intels name for amd64) cpu that
package must still work on an i486 [note that i386 support was droped
a while back but the name i386 remains for historical reasons]. Also a
package build on debian amd64 will on every amd64 or em64t system. For
how to do this correctly in your own packages you can read about this
in the debian policy, packaging reference and maintainer guide. man
dpkg-architecture can also give you a hint.

So the only thing you need to worry is that you are able to install
the debian ports that you want to build packages for. Since Debian
i386 will run just fine on an amd64/em64t CPU but not the other way
around (and for a lot of other reasons) you want an 64bit cpu. With a
64bit cpu you can install debian i386 and have a debian amd64 chroot
or vice versa provided you run a 64bit kernel flavour.

My further recommendation is to install a minimal Debian amd64 system
with xen and then the actual systems for hosting the repository,
building and tetsing packages as seperate xen domains under that. That
way you can mess up big time in the testing domain without affecting
e.g. the repository and easily recover. Also being able to just "ssh
build-32" from anywhere in your network to get into the 32bit build
environment is fun.


Reply to: