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?

Frederick Nord
  • 549
  • 5
  • 9

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
  • 15,052
  • 3
  • 40
  • 48
  • looks promising. Can you provide a more complete example? – Frederick Nord May 28 '16 at 11:05
  • It is desirable that you read here: http://packaging.ubuntu.com/html/packaging-new-software.html and here https://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/ and here http://manpages.ubuntu.com/manpages/wily/man7/debhelper.7.html – kyodake May 28 '16 at 16:02
  • I don't consider your answer useful for now. Let me explain why. "First, you should extract the contents of the file.deb using dpkg -x and dpkg -e" is already good, but it wouldn't hurt to show a command line run of how exactly to use the dpkg tool. "Then you should create the file.udeb using debhelper." is a good start, but again, the reader is left alone with figuring out how to actually do it which is the actual question here. Also, "*the* file.udeb" sounds like a specific thing that I should know of, but you don't explain it. – Frederick Nord Jun 01 '16 at 10:16
  • @Frederick Nord: answer edited. – kyodake Jun 01 '16 at 23:27