4092
Comment: Fix broken link with web.archive.org
|
← Revision 12 as of 2021-11-15 00:57:03 ⇥
4241
cleanups
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
This page offers some tips and tricks on how to build and maintain an unofficial Debian package repository. Before using this information, you should have read the Debian packaging paragraph of the Developers Reference. | This page offers some tips and tricks on how to build and maintain an unofficial Debian package repository using mini-dinstall. There are many other [[DebianRepository/Setup|software options]] for setting up a Debian package repository. Before using this information, you should have read the Debian packaging paragraph of the Developers Reference. |
Line 9: | Line 9: |
{{{ $ export DEBEMAIL=joe@joesdomain.org |
{{{ $ export DEBEMAIL=someone@example.org |
Line 12: | Line 13: |
Setting up the package directory | == Setting up the package directory == |
Line 15: | Line 17: |
{{{ | {{{ |
Line 20: | Line 23: |
$ sudo apt-get install dput mini-dinstall | $ sudo apt install dput mini-dinstall |
Line 22: | Line 25: |
Adding a source package | |
Line 24: | Line 26: |
Now it is time to download a source package, let's call it mypackage-1.0.tar.gz, and extract it. After that, dh_make is run within the extracted source directory. A few questions will pop up which should be answered accordingly. Now you are ready to edit the files in the debian/ directory which the next paragraphs will describe. {{{ $ wget http://somesite.bla/mypackage-1.0.tar.gz $ tar xzvf mypackage-1.0.tar.gz $ cd mypackage-1.0 && \ dh_make --templates $HOME/packages/dhtemplates -f ../mypackage-1.0.tar.gz; \ |
== Adding a source package == Now it is time to download a source package, let's call it example-1.0.tar.gz, and extract it. After that, dh_make is run within the extracted source directory. A few questions will pop up which should be answered accordingly. Now you are ready to edit the files in the debian/ directory which the next paragraphs will describe. {{{ $ wget http://example.org/example-1.0.tar.gz $ tar xzvf example-1.0.tar.gz $ cd example-1.0 && \ dh_make --templates $HOME/packages/dhtemplates -f ../example-1.0.tar.gz; \ |
Line 35: | Line 40: |
The Debian package version number is parsed from the top entry of debian/changelog, eg. mypackage (1.0-0joe1) unstable; urgency=low. The `-0joe1' is the debian release number. Subsequent releases have release numbers `-0joe2', `-0joe3', etc. If there is already an official package, for example with version `1.0-4', then use `1.0-4joe1'. |
The Debian package version number is parsed from the top entry of debian/changelog, eg. example (1.0-0example1) unstable; urgency=low. The `-0example1' is the debian release number. Subsequent releases have release numbers `-0example2', `-0example3', etc. If there is already an official package, for example with version `1.0-4', then use `1.0-4example1'. |
Line 39: | Line 44: |
{{{ $ dpkg --compare-versions "1.0-4.1" gt "1.0-4joe5" && \ echo "NMU version -4.1 greater than -4joe5" |
{{{ $ dpkg --compare-versions "1.0-4.1" gt "1.0-4example5" && \ echo "NMU version -4.1 greater than -4example5" |
Line 48: | Line 53: |
Description: this is mypackage *** Unofficial package from joe@joesdomain.org *** |
Description: this is example *** Unofficial package from someone@example.org *** |
Line 55: | Line 60: |
The standard tool for reporting bugs is [[reportbug]]. See /usr/share/doc/reportbug/README.developers for more info. Your package should have the file /usr/share/bug/mypackage/control installed with the following content: | The standard tool for reporting bugs is [[reportbug]]. See /usr/share/doc/reportbug/README.developers for more info. Your package should have the file /usr/share/bug/example/control installed with the following content: |
Line 57: | Line 62: |
Send-To: joe@joesdomain.org | Send-To: someone@example.org |
Line 59: | Line 64: |
Building the package | == Building the package == |
Line 61: | Line 66: |
Now add the mypackage target to the Makefile. There is already an example there, just adjust it. The package should be signed with your OpenPGP key (run gpg --gen-key to generate one). Adjust the GPGKEY variable to hold your OpenPGP key id. After that, build the package: | Now add the example target to the Makefile. There is already an example there, just adjust it. The package should be signed with your OpenPGP key (run gpg --gen-key to generate one). Adjust the GPGKEY variable to hold your OpenPGP key id. After that, build the package: |
Line 63: | Line 68: |
{{{ $ make mypackage |
{{{ $ make example |
Line 67: | Line 72: |
== Making it apt-get'able == | == Making it apt installable == |
Line 71: | Line 76: |
{{{ $ dput local mypackage_1.0-0joe1.changes |
{{{ $ dput local example_1.0-0example1.changes |
Line 75: | Line 80: |
Now edit [[SourcesList|/etc/apt/sources.list]] and add the deb and deb-src lines. By putting the files onto a web server, others can also access it with the http:// protocol. | Now add the [[SourcesList|apt sources]]. By putting the files onto a web server, others can also access it with the http:// protocol. |
Line 77: | Line 82: |
{{{ # /etc/apt/sources.list |
{{{#!highlight sourceslist numbers=disable |
Line 80: | Line 84: |
deb file:/home/joe/public_html/debian unstable/ deb-src file:/home/joe/public_html/debian unstable/ |
deb file:/home/someone/public_html/debian unstable/ deb-src file:/home/someone/public_html/debian unstable/ |
Line 83: | Line 88: |
deb http://www.joesdomain.org/~joe/debian unstable/ deb-src http://www.joesdomain.org/~joe/debian unstable/ |
deb http://www.example.org/~someone/debian unstable/ deb-src http://www.example.org/~someone/debian unstable/ |
Line 86: | Line 91: |
Introduction
This page offers some tips and tricks on how to build and maintain an unofficial Debian package repository using mini-dinstall. There are many other software options for setting up a Debian package repository. Before using this information, you should have read the Debian packaging paragraph of the Developers Reference. If you just wanted to search for existing packages, hop over to the unofficial APT repositories.
First things first: setting the maintainer email. You can set the DEBEMAIL environment variable if you like to have a different email address for Debian packaging. This address will be used in the package metadata information.
$ export DEBEMAIL=someone@example.org
Setting up the package directory
Generate a separate directory where all the package data will be put in. Download and extract the dh_make templates and the package build Makefile. Installing mini-dinstall and dput finishes up the preparation.
$ mkdir $HOME/packages $ cd $HOME/packages $ wget http://web.archive.org/web/20120129050314if_/http://people.debian.org/~calvin/unofficial/package.tar.gz $ tar xzvf package.tar.gz $ sudo apt install dput mini-dinstall
Adding a source package
Now it is time to download a source package, let's call it example-1.0.tar.gz, and extract it. After that, dh_make is run within the extracted source directory. A few questions will pop up which should be answered accordingly. Now you are ready to edit the files in the debian/ directory which the next paragraphs will describe.
$ wget http://example.org/example-1.0.tar.gz $ tar xzvf example-1.0.tar.gz $ cd example-1.0 && \ dh_make --templates $HOME/packages/dhtemplates -f ../example-1.0.tar.gz; \ cd ..
Package version
The Debian package version number is parsed from the top entry of debian/changelog, eg. example (1.0-0example1) unstable; urgency=low. The -0example1' is the debian release number. Subsequent releases have release numbers -0example2', `-0example3', etc. If there is already an official package, for example with version 1.0-4', then use 1.0-4example1'. You can compare versions with dpkg, see the dpkg(8) manpage for more info.
$ dpkg --compare-versions "1.0-4.1" gt "1.0-4example5" && \ echo "NMU version -4.1 greater than -4example5"
Package description
The package description in debian/control should note that this is not an official Debian package. Note that there is a single space at the beginning of each line below the Description: line.
Description: this is example
** Unofficial package from someone@example.org ***
- [description follows]
Bug reports
The standard tool for reporting bugs is reportbug. See /usr/share/doc/reportbug/README.developers for more info. Your package should have the file /usr/share/bug/example/control installed with the following content:
Send-To: someone@example.org
Building the package
Now add the example target to the Makefile. There is already an example there, just adjust it. The package should be signed with your OpenPGP key (run gpg --gen-key to generate one). Adjust the GPGKEY variable to hold your OpenPGP key id. After that, build the package:
$ make example
Making it apt installable
Copy the mini-dinstall configuration into $HOME/.mini-dinstall.conf and adjust it to your needs. Do the same with the dput configuration, putting it in $HOME/.dput.cf After that, run dput to install the package into the repository.
$ dput local example_1.0-0example1.changes
Now add the apt sources. By putting the files onto a web server, others can also access it with the http:// protocol.
# local repository
deb file:/home/someone/public_html/debian unstable/
deb-src file:/home/someone/public_html/debian unstable/
# http repository
deb http://www.example.org/~someone/debian unstable/
deb-src http://www.example.org/~someone/debian unstable/