crossbuilding rpms with koji
Kedar Sovani
kedars at marvell.com
Thu Jul 9 05:24:14 UTC 2009
> -----Original Message-----
> Date: Tue, 07 Jul 2009 18:03:10 -0400
> From: Mark Salter <msalter at redhat.com>
> Subject: crossbuilding rpms with koji
> To: fedora-buildsys-list at redhat.com
> Message-ID: <1247004190.2512.14.camel at deneb.localdomain>
> Content-Type: text/plain
>
> I have been doing some experimenting with crossbuilds of rpms
> using
> koji. I realize that fedora policy requires supported arches to
> be
> native built, but my focus is towards infrastructure to
> crossbuild
> rpms for embedded systems where the fedora distribution is not
> well
> suited. So as a first stab at this, I started working with the
> F-10
> release packages with an armv5tel target. The reason for this
> was
> that the ongoing work with fedora arm secondary arch allowed me
> to
> focus on the crossbuild infrastructure without having to spend
> a lot
> of time working on arch-specific patches in the packages
> themselves.
>
> Anyway, I ended up crossbuilding around 400 F-10 packages.
> Enough to
> build up a rootfs which boots to a familiar looking gnome
> desktop on
> an omap-based beagleboard. Of those 400 packages, about 20%
> needed
> some amount of patching to support crossbuilding. Most were
> simple
> things like specfile tweaks (i.e. "s/gcc/%{__cc}/") or simple
> makefile
> patches to get around hard-coded tool names. And a handful
> needed more
> complicated patches (almost entirely autoconf/automake
> related).
Great! I had a similar attempt to build cross rpms for ARM. And
since I was cross-building I could built those against glibc as
well as uClibc. Although my package set is much smaller (~50).
I'll try to place the cross patches that I have somewhere,
probably most of them are already in your setup.
I didn't build these in koji though, but it would be cool to have
them in there.
>
> Now that I've gotten to this point, I'd like to solicit some
> comments
> on the approach taken and get some guidance on how to beat the
> kludgey
> first cut into shape so that it can be acceptable upstream. The
> infrastructure side consists of:
>
> * A yum plugin which allows yum to install non-native rpms
> into the build roots.
>
> * A mock plugin to handle the crossbuilding details.
>
> * A koji patch to support the crossbuild extensions to mock
>
> * A cross-toolchain package
>
> * A cross-rpm-config package which provides configuration
> for rpm in the mock chroot and configuration details for
> the mock plugin.
>
IIUC you have pkgname.armv5tel.rpm? If so, how did you make rpm
to build those? I had to modify /etc/rpm/platform to fool rpm in
thinking it is building for armv5tel. Is there a cleaner way for
doing this?
...snip...
>
> If anyone is interested and would like to take a look at the
> code and
> comment, I placed source rpms at:
>
> http://people.redhat.com/msalter/crossbuild/source/
>
> For convenience, here is the koji patch:
>
> http://people.redhat.com/msalter/crossbuild/koji/koji.patch
>
> And the yum plugin:
>
> http://people.redhat.com/msalter/crossbuild/yum/cross.py
>
> And the mock plugin:
>
> http://people.redhat.com/msalter/crossbuild/mock/cross.py
>
> and just for fun, a pic of F-10 running on a beagleboard:
>
> http://people.redhat.com/msalter/beagle-gnome.jpg
>
> --Mark
Kedar.
More information about the Fedora-buildsys-list
mailing list