[BusyBox] using dpkg with busybox

Simon Block sblock at computer.org
Wed Jul 20 23:31:13 MDT 2005


Hi Kim,

Thanks for the info. Sometimes its just smallest detail you need, such as
the correct filename! I looked at all the docs I could and nothing would
specifically tell me the format for the "DEBIAN" directory (well it wasn't
obvious to me anyway).

The dpkg appears to work ok now and will probably do for our embedded
environment. Some points though:

Your changes are not merged into the latest release of busybox. I used this
patch to dpkg.c:
http://bugs.busybox.net/file_download.php?file_id=74&type=bug
Is this all that is required? 

I was able to install an older version of a package over a newer one with no
complaints (without forcing). Is this expected? I expect the Depends field
is for dependencies on other packages. How can I stop an install going to an
older version?

Can I set the permissions and ownership of the install files from the
control file(s). For example; I want to install some files as root. I can do
this by chown on the file before I create the deb package. Can I get the
client on the target do this without having to change the ownership of the
file before I make the package?

Finally, the dpkg database appears to be in /var/lib/dpkg. As we mount a
ramdisk on /var we will loose this database on a powercycle. It appears that
this path is hardcoded in dpkg.c. Do you foresee any issues with us changing
this? P.S. I would suggestthe use of a #define for this path as it is
referenced 13 times in the source code.

Cheers and thanks again for your help!

 
Regards
Simon Block
sblock at computer.org

-----Original Message-----
From: Kim B. Heino [mailto:Kim.Heino at bluegiga.com] 
Sent: Wednesday, 20 July 2005 11:16 PM
To: sblock at computer.org
Cc: busybox at codepoet.org
Subject: Re: [BusyBox] using dpkg with busybox

Hi Simon,

> I added your patch to our src tree and that solved the looping problem.
Dpkg
> will install the files ok but it does not run the <pkgname>.preinst or
> <pkgname>.postinst scripts that I include in the DEBIAN directory in the

Scripts should be named "preinst", not "pkgname.preinst".

> correctly. Does the control file have to reference the scripts or is there
> existence and filename enough?

Existence is enough.

> Does BB dpkg support the prerm and postrm scripts too?

It should, but I haven't checked. Let me know if not and I'll fix it.

> Any ideas? It would be handy if you had a small, dependency free package
> file I could examine that includes a script. :)

I'll email you some test packages.



More information about the busybox mailing list