Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easy way to host a debian update repository

I have a project where I create a single .deb file, which should be installed by a linux client. For this I would like to use apt-get install mypackage.

Being quite new to this area, I am now looking for the most simple way of hosting my own debian update repository, which will only have to contain mypackage.deb.

I quickly looked at mini-dinstall which looked promising, but they seem to work with .changes, rather than .deb packages. So I am not sure if this is what I need.

So summarized the workflow should look something like this:

  1. I create the debian package mypackage.deb
  2. I tell some daemon to update the update repository: fancy-update-daemon add mypackage.deb
  3. The client is able to install or update using standard apt commands: apt-get install mypackage

Thanks for your help

like image 246
Besi Avatar asked Jul 19 '11 08:07

Besi


People also ask

Can Debian use PPA?

Important: Many Launchpad PPAs are not supported by Debian, as the packages include Ubuntu-specific dependencies. Other PPAs do work on Debian. So, before continuing, be aware that even with the successful installation of the PPA, it may not be possible to install the packages due to dependency problems.

How do I update DEB packages?

To update a single package on the system, use the apt-get command + the package name we want to update. Press "space" to scroll through the list of installed packages. See their version and of course obtain the exact package name in order to update it with the: apt-get update && apt-get upgrade packagename command.


2 Answers

The really simple way of creating a repository is to create a "trivial" repository instead of an "automatic" repository. You can do this with the "dpkg-scanpackages" command in the dpkg-dev package.

$ mkdir repository
$ cp foo.deb repository
$ dpkg-scanpackages repository /dev/null | gzip -9c > repository/Packages.gz

Then in your sources.list, instead of having something like:

deb http://wherever/repository suite component

You leave off the suite and component and just have:

deb http://wherever/repository

For more info (like the difference between a trivial and automatic repository) see The repository HOWTO (for something this simple, you can ignore the fact that this documentation calls itself "obsolete")

like image 54
stew Avatar answered Nov 10 '22 08:11

stew


Create Packages.gz:

@server> cd debian-repo
@server> dpkg-scanpackages ./ /dev/null | gzip > Packages.gz

Create new file /etc/apt/sources.list.d/my-server.list (at client)

deb http://my-server/debian-repo ./

Now get the list of available packages and install foo.

@client> apt-get update
@client> apt-get install foo
like image 3
guettli Avatar answered Nov 10 '22 09:11

guettli