Table of Contents

(Re)building De{bi,vu}an packages from source

This is nothing new; there are plenty of notes out on the Internet about how to build Debian packages from source.

This page is just brief notes on what you need to have installed before it will work.

They are based on Devuan Beowulf 3 (ie: Debian Buster 10).

Notes on specific packages

Installing packages after building them

If you build something simple, it may result in a single .deb binary package which you can install using dpkg -i package.deb

If you build something complicated, it may result in quite a few .deb binary packages (for example, FreeSwitch creates about 350!), which contain dependencies between them, and dpkg has no clue about dependencies.

Therefore you need to create a Debian Repository on your local machine, and point sources.list at it.

It's not entirely trivial (for example, a directory containing the files), but it's not overly-complicated either. Whatever you do, don't start reading the Debian documentation on Repositories and what they need to contain - that is vastly over-complex.

If you do want official Debian documentation on how to set up a local repository, this list of tools is a better place to start.

Someone wrote a short article in 2018 which looks encouraging, but when you try this out, aptitude complains that The repository does not have a Release file.

There's also a tool named aptly which looks promising, but so far hasn't created what I need.

Solution

It's not complicated after all.

  1. Create the directory where you want your .deb files to be fetched from
  2. Copy the newly-built .deb files into this directory
  3. Change into this directory
  4. Create the Packages file
  5. Create the Release file
  6. Add the repository to sources.list
  7. Update the available packages
mkdir -p /usr/local/repo/FreeSwitch
rsync -Pav *.deb /usr/local/repo/FreeSwitch
cd /usr/local/repo/FreeSwitch
dpkg-scanpackages . >Packages
apt-ftparchive release . >Release
echo 'deb     [trusted=yes] file:/usr/local/repo/FreeSwitch/ /' >/etc/apt/sources.list.d/local.FreeSwitch.list
aptitude update

If you'd like to have the repository available over the network, I can think of two obvious ways of achieving this:

  1. Set up an NFS share containing a directory as described above, and point sources.list at that share on any machine which needs to use it
  2. Copy the directory to a web server which is accessible either on a LAN or over the Internet and then point sources.list at that in the usual way:
    deb     [trusted=yes] http://my.web.server/repo/FreeSwitch/ /

Go up
Return to main index.