Difference between revisions of "Debian Package Repositories"

From FreekiWiki
Jump to navigation Jump to search
(describe using mini-dinstall and dput)
m (link to debian repository howto)
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
most limited are:
 
most limited are:
  
dpkg-scanpackages from the [http://packages.debian.org/ dpkg-dev] package
+
dpkg-scanpackages from the [http://packages.debian.org/dpkg-dev dpkg-dev] package
  
apt-ftparchive from the [http://packages.debian.org/ apt-utils] package
+
apt-ftparchive from the [http://packages.debian.org/apt-utils apt-utils] package
  
this document discusses using [http://packages.debian.org/mini-dinstall
+
for more generic information: [http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html debian repository howto]
mini-dinstall].
 
  
this document assumes that you have an account on llama.freegeek.org.
+
this document discusses using [http://packages.debian.org/mini-dinstall mini-dinstall].
 +
 
 +
this document assumes that you have an account on llama.freegeek.org, and that
 +
you have just built a debian package with debuild.
  
 
first thing you need is a .mini-dinstall.conf in your home directory on
 
first thing you need is a .mini-dinstall.conf in your home directory on
Line 18: Line 20:
  
 
  [DEFAULT]
 
  [DEFAULT]
  architectures = all, i386, sparc, powerpc
+
  architectures = all, i386, powerpc
 
  archivedir = ~/public_html/debian/
 
  archivedir = ~/public_html/debian/
 
  use_dnotify = 0
 
  use_dnotify = 0
Line 26: Line 28:
 
  archive_style = flat
 
  archive_style = flat
 
  poll_time = 10
 
  poll_time = 10
 
 
  mail_log_level = NONE
 
  mail_log_level = NONE
 
+
generate_release = 1
 +
release_origin = llama.freegeek.org
 
  [unstable]
 
  [unstable]
 
[experimental]
 
  
 
now run mini-dinstall to initialize the repository:
 
now run mini-dinstall to initialize the repository:
Line 40: Line 40:
 
you should now be able to browse to http://llama.freegeek.org/~USERNAME/debian
 
you should now be able to browse to http://llama.freegeek.org/~USERNAME/debian
  
but you'll see that the Packages files in unstable and experimental are empty.
+
but you'll see that the Packages file in unstable is empty.
 +
 
  
 
to install something into your repository, you need to grab the .changes file
 
to install something into your repository, you need to grab the .changes file
Line 49: Line 50:
 
named something like:
 
named something like:
  
libwww-mediawiki-client-perl_0.27-0+vagrant.1_i386.changes
+
simple-cdd_0.2.0_i386.changes
  
 
SOURCE-NAME_VERSION_ARCHITECTURE.changes
 
SOURCE-NAME_VERSION_ARCHITECTURE.changes
  
SOURCE-NAME: the source package name. i.e. libwww-media-wiki-client-perl
+
SOURCE-NAME: the source package name. i.e. simple-cdd
  
VERSION: the version of the source package. i.e. 0.27-0+vagrant.1
+
VERSION: the version of the source package. i.e. 0.2.0
  
 
ARCHITECTURE: the architecture these packages were built on (not necessarily
 
ARCHITECTURE: the architecture these packages were built on (not necessarily
 
the same as the target architecture of the package). i.e. i386
 
the same as the target architecture of the package). i.e. i386
  
now that you've located a .changes file, you'll need to use the tool
+
now that you've located a .changes file(note: any file referenced in the
[http://packages.debian.org/dput dput] to add upload the packages into your
+
.changes file must be also be present in the same directory as the .changes
mini-dinstall repository:
+
file), you'll need to use the tool [http://packages.debian.org/dput dput] to
 +
upload the packages into your mini-dinstall repository:
 +
 
  
 
if you built the packages on llama.freegeek.org, it's quite simple:
 
if you built the packages on llama.freegeek.org, it's quite simple:
  
dput local libwww-mediawiki-client-perl_0.27-0+vagrant.1_i386.changes
+
dput -u local simple-cdd_0.2.0_i386.changes
 +
 
 +
(you can leave off the -u if you are using gpg to sign your .changes file,
 +
which is a very good thing to do!)
  
 
if you built the packages on another machine, you'll need to define a
 
if you built the packages on another machine, you'll need to define a
Line 75: Line 81:
 
  fqdn = llama.freegeek.org
 
  fqdn = llama.freegeek.org
 
  incoming = /home/vagrant/public_html/debian/mini-dinstall/incoming
 
  incoming = /home/vagrant/public_html/debian/mini-dinstall/incoming
  #run_dinstall = 0
+
  run_dinstall = 0
  post_upload_command = /usr/bin/mini-dinstall --batch
+
  post_upload_command = ssh llama.freegeek.org /usr/bin/mini-dinstall --batch
 +
 
 +
dput -u llama simple-cdd_0.2.0_i386.changes
 +
 
 +
since this method requires multiple ssh connections(and multiple password
 +
requests), you probably want to learn how to use ssh keys.
 +
 
 +
now, to download your fine new packages, in /etc/apt/sources.list, you can put
 +
a line like this:
 +
 
 +
deb http://llama.freegeek.org/~USERNAME/debian unstable/
 +
 
 +
and then:
 +
 
 +
  apt-get update
 +
  apt-get install your-package
 +
 
 +
defining additional distributions
 +
 
 +
if you want additional distributions beyond "unstable", you need to define them
 +
in mini-dinstall.conf with the following lines:
 +
 
 +
[experimental]
 +
[foo]
 +
[bar]
 +
 
 +
then when you're building packages, change the part before the ; on the first
 +
line of your debian/changelog to whatever distribution you want it to show up
 +
in.
 +
 
 +
simple-cdd (0.2.0+svn) unstable; urgency=low
 +
 
 +
  * SVN PRE-RELEASE
 +
  * upload into unstable
 +
...becomes...
 +
simple-cdd (0.2.0+svn) experimental; urgency=low
 +
   
 +
  * SVN PRE-RELEASE
 +
  * upload into experimental
 +
 
 +
and it will get installed into debian/experimental instead of debian/unstable.
 +
 
 +
you can also define distribution-specific options, read the mini-dinstall man
 +
page for more information.
  
dput llama libwww-mediawiki-client-perl_0.27-0+vagrant.1_i386.changes
+
TODO: someday this document will also describe using [http://packages.debian.org/reprepro reprepro].
  
TODO: someday this document will also describe using
+
[[Category: Coders]]
[http://packages.debian.org/reprepro reprepro].
 

Latest revision as of 21:46, 4 October 2005

How to set up a debian package repository

several tools are useful for building package repositories. the simplest and most limited are:

dpkg-scanpackages from the dpkg-dev package

apt-ftparchive from the apt-utils package

for more generic information: debian repository howto

this document discusses using mini-dinstall.

this document assumes that you have an account on llama.freegeek.org, and that you have just built a debian package with debuild.

first thing you need is a .mini-dinstall.conf in your home directory on llama.freegeek.org, here's an example(based almost entirely on /usr/share/doc/mini-dinstall/examples/mini-dinstall.conf.walters):

[DEFAULT]
architectures = all, i386, powerpc
archivedir = ~/public_html/debian/
use_dnotify = 0
verify_sigs = 0
extra_keyrings = ~/.gnupg/pubring.gpg
mail_on_success = 0
archive_style = flat
poll_time = 10
mail_log_level = NONE
generate_release = 1
release_origin = llama.freegeek.org
[unstable]

now run mini-dinstall to initialize the repository:

mini-dinstall --batch


you should now be able to browse to http://llama.freegeek.org/~USERNAME/debian

but you'll see that the Packages file in unstable is empty.


to install something into your repository, you need to grab the .changes file produced from running debuild (part of the devscripts package).

it's usually in the directory just above where you built the package(..), and named something like:

simple-cdd_0.2.0_i386.changes

SOURCE-NAME_VERSION_ARCHITECTURE.changes

SOURCE-NAME: the source package name. i.e. simple-cdd

VERSION: the version of the source package. i.e. 0.2.0

ARCHITECTURE: the architecture these packages were built on (not necessarily the same as the target architecture of the package). i.e. i386

now that you've located a .changes file(note: any file referenced in the .changes file must be also be present in the same directory as the .changes file), you'll need to use the tool dput to upload the packages into your mini-dinstall repository:


if you built the packages on llama.freegeek.org, it's quite simple:

dput -u local simple-cdd_0.2.0_i386.changes

(you can leave off the -u if you are using gpg to sign your .changes file, which is a very good thing to do!)

if you built the packages on another machine, you'll need to define a ~/.dput.rc file for llama.freegeek.org, on the machine you're uploading from:

[llama]
method = scp
fqdn = llama.freegeek.org
incoming = /home/vagrant/public_html/debian/mini-dinstall/incoming
run_dinstall = 0
post_upload_command = ssh llama.freegeek.org /usr/bin/mini-dinstall --batch

dput -u llama simple-cdd_0.2.0_i386.changes

since this method requires multiple ssh connections(and multiple password requests), you probably want to learn how to use ssh keys.

now, to download your fine new packages, in /etc/apt/sources.list, you can put a line like this:

deb http://llama.freegeek.org/~USERNAME/debian unstable/

and then:

 apt-get update
 apt-get install your-package

defining additional distributions

if you want additional distributions beyond "unstable", you need to define them in mini-dinstall.conf with the following lines:

[experimental]
[foo]
[bar]

then when you're building packages, change the part before the ; on the first line of your debian/changelog to whatever distribution you want it to show up in.

simple-cdd (0.2.0+svn) unstable; urgency=low
 
 * SVN PRE-RELEASE
 * upload into unstable 
...becomes...
simple-cdd (0.2.0+svn) experimental; urgency=low
   
 * SVN PRE-RELEASE
 * upload into experimental

and it will get installed into debian/experimental instead of debian/unstable.

you can also define distribution-specific options, read the mini-dinstall man page for more information.

TODO: someday this document will also describe using reprepro.