.deb files are ar archives, but ...
Just to express my frustration of the day a bit. I want the left column to be higher than the right one here. ;-)
From time to time you hear people boasting that they can use standard tools to handle .deb archives. "ar x blablah_0.123-4_z80.deb" and you get two standard tar.gz files to play with. That's indeed convenient, more convenient than rpm2cpio.
However, just try, on a Linux system, to convert those two tarballs (and the debian-binary file, of course) back to a .deb. "ar cr blablah_0.123-4.1_z80.deb debian-binary control.tar.gz data.tar.gz" will do, right? Try to install it using dpkg... Yes, it works! But then, try to put it in your apt repository!
Turns out that there are multiple ar formats and that Debian uses a very simple format and doesn't (fully) support the ar files produced by GNU ar. It's quite confusing that dpkg does support these files while apt does not. Some consistency (or at least packaging a version of ar that is compatible with apt) would be nice, guys.
Anyway, to not be too negative in this post: debian-installer is pretty cool, once you understand the internals a little bit. I just spent a couple of days now on customizing an USB stick installation image, and I think I understand the system at least for a few percents by now. ;-) Have to find the limits of what can be done with preseeding files now. Having fun!
... What ... if anyone reads this? Dunno. :-P
(See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=161593)
From time to time you hear people boasting that they can use standard tools to handle .deb archives. "ar x blablah_0.123-4_z80.deb" and you get two standard tar.gz files to play with. That's indeed convenient, more convenient than rpm2cpio.
However, just try, on a Linux system, to convert those two tarballs (and the debian-binary file, of course) back to a .deb. "ar cr blablah_0.123-4.1_z80.deb debian-binary control.tar.gz data.tar.gz" will do, right? Try to install it using dpkg... Yes, it works! But then, try to put it in your apt repository!
QUOTE:
pool/main:
E: This is not a valid DEB archive, missing 'debian-binary' member
E: Errors apply to file 'iso/pool/main/b/base-installer/base-installer_1.42ubuntu12_amd64.udeb'
E: This is not a valid DEB archive, missing 'debian-binary' member
E: Errors apply to file 'iso/pool/main/b/base-installer/base-installer_1.42ubuntu12_amd64.udeb'
Turns out that there are multiple ar formats and that Debian uses a very simple format and doesn't (fully) support the ar files produced by GNU ar. It's quite confusing that dpkg does support these files while apt does not. Some consistency (or at least packaging a version of ar that is compatible with apt) would be nice, guys.
Anyway, to not be too negative in this post: debian-installer is pretty cool, once you understand the internals a little bit. I just spent a couple of days now on customizing an USB stick installation image, and I think I understand the system at least for a few percents by now. ;-) Have to find the limits of what can be done with preseeding files now. Having fun!
... What ... if anyone reads this? Dunno. :-P
(See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=161593)
Comments
Display comments as Linear | Threaded
isaac on :
Wilmer on :
You mean that it used to work BTW?
bernie on :
Justin on :
Wilmer on :
Justin on :
ar -x original.deb
mkdir -p tmp/DEBIAN
cd tmp
tar -xzvpf ../data.tar.gz
cd DEBIAN
tar -xzvpf ../../control.tar.gz
cp ../../debian-binary ./
# Make some tweak to preinst/postinst/etc...
cd ../../
dpkg-deb -b tmp new.deb
# new.deb should not cause the same complaints
Ikem on :
The order is important!
Wilmer on :
Have to keep in mind that this post is nearly six years old, so things might have changed.
But thanks for the hint, definitely!
Ikem on :
I'm running Debian Wheezy.
And I checked it, it's gnu ar.
So this info is up-to-date. :)