Feedback

type to search

How do I rebuild a Debian package with custom configuration options?

Asked by [ Editor ] , Edited by Fernando C. Estrada [ Admin ]

Can the changes be automated so that the package gets rebuilt with my custom options on each upgrade?

or Cancel

4 answers

2

paulcarroty [ Editor ]

Easy way

Unpack data:

dpkg -x ~./tmp/some-prog-123.deb ./someprog


Unpack control information:
mkdir ~/tmp/someprog/DEBIAN
dpkg -e ~/tmp/some-prog-123.deb ./someprog/DEBIAN


Change file or settings …

Build the package with new file/option:
dpkg -b ./someprog ~/tmp/some-prog-123-new.deb

NN comments
nomeata
-

This is not about rebuilding from source but rather about modifying an existing binary package. If this is really what you want to do, you can script it to some extend using the “customdeb” package.

It still does not do something automatically upon upgrade, though.

or Cancel
3

rhonda [ Editor ]

Not in an easy way that I’m aware of, unfortunately. You should store away the debdiff output from your changes so you can easily apply them on the next update. Packages that use git to store the versions are especially useful, you can create a branch for your changes and merge from master.

One thing you have to make sure though is that you put the package on hold so you don’t lose your changes during regular upgrade process of your system.

or Cancel
0

ari@debian.org [ Editor ]

apt-src is probably the best tool for this job:


 apt-src is a command line interface for downloading, installing, upgrading,
 and tracking Debian source packages. It makes source package management
 feel a lot like using apt to manage binary packages, and is being used as
 a testbed to work on adding source dependencies to Debian.
 .
 It can be run as a normal user, or as root. If you want a convenient way to
 track updates to packages while preserving your local modifications, this is
 a way to do that.

or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.