TIP DebianRepositoryPlugin is not installed on Foswiki.org.


automatically creates a Debian repository listing .deb attachments


Just attach .deb files to your topics, and you will get valid Debian repositories for them at %PUBURL%/TheWeb/debian.

You will get one repository per web.

If you put valid GnuPG data in the right place on your filesystem, then the repositories will be signed with GnuPG, and the public key used to sign the repository is exported at %PUBURL%/TheWeb/debian/signing-key.asc

To advertise your repository for others to use, you can use the following template:

To install packages from this repository, add the following line to your
=/etc/apt/sources.list= file:

deb %PUBURL%/%WEB%/debian ./

Then import the signing key by running the following command:

$ curl %PUBURL%/%WEB%/debian/signing-key.asc  | sudo apt-key add -

Then update your package lists with the following command:

$ sudo apt-get update

And then install PACKAGE:

$ sudo apt-get install PACKAGE

Restricting which packages go into the repository

If you want a fine-grained control of which packages go into your web's Debian repository, you can define the DEBIAN_REPOSITORY_TOPICS setting in your web's WebPreferences topic to a space separated list of topic names, like this:


In that case, DebianRepositoryPlugin will scan only Topic1's and Topic2' attachment directories looking for .deb files to include in the repository.

You can gain even more control of what goes into your repository by restricting the write access to Topic1 and Topic2 using Foswiki's access control capabilities.

Changing the repository directory

By default, this plugin will put the repository files in a directory called debian under the web public directory. If for some reason you need a different name, set the variable DEBIAN_REPOSITORY_NAME in the WebPreferences topic. For example, to make the repository in debian/squeeze directory, use:

   * Set DEBIAN_REPOSITORY_NAME = debian/squeeze

Remember to also replace "debian" with "debian/squeeze" if you copied the installation instructions template above.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

This plugin requires the apt-ftparchive program to work. This program is part of the apt-utils packages, and should already be installed in all systems running Debian GNU/Linux (or derivatives). If for some reason it is not installed already, then you must install it to make this plugin work for you.

To enable GnuPG signatures in the generated Debian repositories, you must put a 'gnupg' directory in the same level as your 'pub' directory ($Foswiki::cfg{PubDir}), containing a valid GnuPG home directory. You can generate one by issuing the following commands:

mkdir /path/to/foswiki/gnupg
gpg --homedir /path/to/foswiki/gnupg --gen-key
chown -R www-data:www-data /path/to/foswiki/gnupg
chmod -R go-rwx /path/to/foswiki/gnupg

The above commands assume that:

  • /path/to/foswiki/gnupg is at the same level as your pub directory. If you are using VirtualHostingContrib, you can have a per-virtualhost GnuPG directory at /path/to/foswiki/virtualhost/$VIRTUALHOST/gnupg.
  • Your web server runs under user www-data and group www-data, which is the case in Debian GNU/Linux. If your system uses other user/group combination, please adjust accordingly


Many thanks to Colivre for supporting this work.

Author(s): Antonio Terceiro
Copyright: © 2011 Antonio Terceiro (http://colivre.coop.br/)
License: GPL (GNU General Public License) version 2+
Release: 0.2.0
Version: 14234 (2012-03-07)
Change History:  
0.2.0 - added support for DEBIAN_REPOSITORY_NAME option -- 07 Mar 2012, Foswiki:Main/AntonioTerceiro
Dependencies: None
Home page: http://foswiki.org/bin/view/Extensions/DebianRepositoryPlugin
Support: http://foswiki.org/bin/view/Support/DebianRepositoryPlugin

Topic revision: r2 - 07 Mar 2012, AntonioTerceiro - This page was cached on 22 Oct 2016 - 09:13.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License