Discussion:
.deb->.ipkg conversion
sean whalen
2001-10-15 20:57:00 UTC
Permalink
is there any way to use ipkg to install a .deb file, or to convert from .deb
to .ipkg? i've searched for info and all i found was that .deb support is
planned for ipkg, and they are similar formats.

i'd really like to install some packages which i can only find in .deb
format for strongarm, and which i can't seem to cross compile myself.

thanks,
-sean
Carl Worth
2001-10-16 13:55:22 UTC
Permalink
Post by sean whalen
is there any way to use ipkg to install a .deb file, or to convert from .deb
to .ipkg?
Installation: not yet
Conversion: yes (much of Familiar was constructed by converting binary .debs)

Except for the outer level of archiving, (tar vs. ar), .ipk and .deb
are identical. So, if you simply un-ar a .deb and then re-tar it as a
.ipk the conversion is complete. There are a couple of scripts to aid
in this process in handhelds.org CVS under
familiar/dist/ipkg/util. They are:

ipkg-deb-unbuild
ipkg-build

Between running those two scripts you'll probably want to trim things
down a bit. The Debian packages are very complete, but often more than
you really want on a system with limited storage.

I really need to add an option to ipkg to directly install .debs. It's
really just a one-line switch in the code:

if .ipk:
tar xzf
elif .deb:
ar -x

Of course, this does mean you'll need ar on your system as well, but
if you plan to install un-trimmed .debs, I hope you have plenty of
space available anyway.

-Carl
Carl Worth
2001-10-16 20:32:13 UTC
Permalink
Post by Carl Worth
I really need to add an option to ipkg to directly install .debs. It's
tar xzf
ar -x
OK, That was exactly as easy as I thought. ipkg 0.9.1 is available at:

src carlshacks http://scream.east.isi.edu/familiar/hacks

for anyone that wants to try this out.

It's quite fun to be able to install large pieces of Debian quite
easily. Basically, it's like Intimate but without the pivot_root and
no mandatory base system. So this could be useful for users with a
32MB CF card for example.

There are a couple of snags, but here's what I am doing so far:

0) First you'll need ar before you can install any .debs. So, using
the src line above, do:

ipkg -d hda install binutils

(This assumes you have a dest option in /etc/ipkg.conf named "hda"
pointing to something with plenty of storage on it. In my case I
have "dest hda /mnt/hda" and my 1GB microdrive is mounted on
/mnt/hda).

1) I added the following as the last src in my /etc/ipkg.conf:

src debian-sid ftp://ftp.us.debian.org/debian/dists/sid/main/binary-arm

2) SNAG: I tried to do an "ipkg update". This didn't go entirely
smoothly as sid's Packages file is about 4.8MB and ipkg tried to
download this to the flash. :(

WORKAROUND: But when the update failed, it did leave the file in
/tmp/ipkg/Packages so I just moved it to
/mnt/hda/usr/lib/ipkg/lists/debian-sid and made a
/usr/lib/ipkg/lists/debian-sid symlink.

PROPOSAL: Obviously ipkg should store the Packages file onto the
external storage. Maybe in ipkg.conf a src could be associated with
a default dest? That way the Packages file could be stored there,
and as a side benefit packages could be installed to the right dest
by default, (helping you to not fill the flash if you forget the
"-d hda" when you do "ipkg install kde").

3) SNAG: Next, the Packages file in Debian has a slight inconsistency
that ipkg isn't expecting, (namely that filenames in Debian
Packages files are not relative to the same directory from which
the Packages file was downloaded).

WORKAROUND: Fixing things up is as simple as running the
debian-unstable list through:

sed 's,Filename:[[:space:]]*,Filename: ../../../../,'

PROPOSAL: Perhaps we could make the Familiar repository consistent
with Debian so this would not be unnecessary. Something like:
dists/0.5/main/binary-armv4.

4) After that, you can just do lots of fun things like:

ipkg -d hda install perl
ipkg -d hda install libc6-dev

Oh, and you'll want to add /mnt/hda/bin:... to your PATH and put
/mnt/hda/lib:... in /etc/ld.so.conf.

There are still assorted problems with packages that insist on
absolute file path locations for particular files. The compiler can be
particularly annoying this way. I'm fiddling with stow now to see if
this will help. Other options include copying the flash base over to
the microdrive and doing a chroot. You could probably even install
dpkg if you wanted and use the above steps as a method of getting a
full-blown Debian installation up and running.

-Carl
--
Carl Worth
USC Information Sciences Institute ***@east.isi.edu
3811 N. Fairfax Dr. #200, Arlington VA 22203 703-812-3725
Sam Watkins
2001-10-24 08:13:13 UTC
Permalink
Post by Carl Worth
It's quite fun to be able to install large pieces of Debian quite
easily.
This is fantastic. Thank-you, Carl! gcc is working fine on my iPAQ
now, thanks to your most excellent ipkg and helpful email.

Sam

Loading...