2

Following up on How to install squid-deb-proxy-client via preseed/early_command, I want to have a udeb of the squid-deb-proxy-client package. From reading the Debian wiki it seems it should be easy to convert a regular deb to a udeb. However, I couldn't find any tool that does it for me.

Because I assume I also need to convert the dependencies to udebs, I wouldn't want to do it manually, so my question is:

How to conveniently convert regular deb packages to udebs?

1 Answers1

2

First, you should extract the contents of the file.deb using dpkg -x and dpkg -e.

Then you should create the file.udeb using debhelper.

Debhelper knows the special properties of the file.udeb and will do the right thing by default at build time.

Edited June-01-2016:

Dpkg-deb is Debian package archive (.deb) manipulation tool.

dpkg-deb -x, --extract archive directory

Extracts the filesystem tree from a package archive into the specified directory.

Use dpkg-deb -x to extract the files from a foo.deb package as shown below:

dpkg-deb -x foo.deb /some-dir/debian
ls /some-dir/debian
foo

Debhelper is used to help you build a Debian package.

Provide a collection easily understood tools that are used in debian/rules to automate various common aspects of building a package.

A typical debian/rules file that uses debhelper will call several debhelper commands in sequence.

Examples of rules files that use debhelper are in: /usr/share/doc/debhelper/examples/

To create a new Debian package using debhelper, you can just copy one of the sample rules files and edit it by hand.

By default, all debhelper programs assume that the temporary directory used for assembling the tree of files in a package is /some-dir/debian/package.

To create a udeb with debhelper, add "Package-Type: udeb" to the package's stanza in debian/control.

Debhelper will try to create udebs that comply with debian-installer policy, by making the generated package files end in .udeb, not installing any documentation into a udeb, skipping over preinst, postrm, prerm, and config scripts, etc.

Source

kyodake
  • 17,808