TIP DebianRepositoryPlugin is not installed on Foswiki.org.

DebianRepositoryPlugin

automatically creates a Debian repository listing .deb attachments

Usage

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:

<code>
deb %PUBURL%/%WEB%/debian ./
</code>

Then import the signing key by running the following command:

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

Then update your package lists with the following command:

<code>
$ sudo apt-get update
</code>

And then install PACKAGE:

<code>
$ sudo apt-get install PACKAGE
</code>

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:

   * Set DEBIAN_REPOSITORY_TOPICS = Topic1 Topic2

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

Info

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

I Attachment Action Size Date Who Comment
DebianRepositoryPlugin.md5md5 DebianRepositoryPlugin.md5 manage 189 bytes 07 Mar 2012 - 17:59 AntonioTerceiro  
DebianRepositoryPlugin.sha1sha1 DebianRepositoryPlugin.sha1 manage 213 bytes 07 Mar 2012 - 18:00 AntonioTerceiro  
DebianRepositoryPlugin.tgztgz DebianRepositoryPlugin.tgz manage 12 K 07 Mar 2012 - 17:59 AntonioTerceiro  
DebianRepositoryPlugin.zipzip DebianRepositoryPlugin.zip manage 14 K 07 Mar 2012 - 17:59 AntonioTerceiro  
DebianRepositoryPlugin_installerEXT DebianRepositoryPlugin_installer manage 4 K 07 Mar 2012 - 17:59 AntonioTerceiro  
Topic revision: r2 - 07 Mar 2012, AntonioTerceiro
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy