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

Re: How to create a i386 deb from rpm on an amd64 system



Johann Spies wrote:
> I want to convert iscan rpm (an Epson scanner driver) to a deb.  This
> driver only works on i386 systems.
> 
> I have installed multiarch on my system but it seems that there is no alien
> that can do the job on my system.
> 
> Alternatively, I have an old deb of this package but dpkg complains there
> is a duplicate 'Architecture' line in the control file.  Using mc I could
> copy the control file from the package to /tmp/ and edit it, but I could
> not put it back.  How can I correct the control file in the debian package?

Since you have good suggestions on rebuilding the deb I would do
that.  But as for building 32-bit rpms on 64-bit debian I would use a
32-bit chroot.  Here is the boiled down instructions.

  # mkdir -p /srv/chroot
  # cd /srv/chroot
  # debootstrap --arch i386 wheezy wheezy-rpm http://ftp.us.debian.org/debian
  # chroot /srv/chroot/wheezy-rpm su -
  # cat > ./usr/sbin/policy-rc.d <<-EOF
	#!/bin/sh
	exit 101
	EOF
  # chmod a+x ./usr/sbin/policy-rc.d
  # apt-get update
  # apt-get install build-essential
  # apt-get install rpm

With that you will be sitting in a 32-bit chroot with rpm installed
and a basic build environment.  Install what you need for your
purposes.  You should be able to build your 32-bit rpm there.  I would
set up my own user uid:gid in the chroot and then be non-root me to
build the rpm.

  $ sudo chroot /srv/chroot/wheezy-rpm su - rwp

More details are available here:

  http://wiki.debian.org/chroot

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: