Create debian repository: Unterschied zwischen den Versionen

Aus metasec wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „The Debian package management system (called Advanced Packaging Tool or APT) is by far the most well-designed and is one of the top killer features on the Linux p…“)
 
 
Zeile 17: Zeile 17:
  
 
Like this
 
Like this
cp src/bzr_0.11-1.1_all.deb public_html/my-repository/binary/
+
 
 +
cp src/bzr_0.11-1.1_all.deb public_html/my-repository/binary/
  
 
Install the tools to be able to create a repository index
 
Install the tools to be able to create a repository index
Zeile 24: Zeile 25:
  
 
Create a repository index
 
Create a repository index
cd my-repository
+
 
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
+
cd my-repository
dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz
+
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
 +
dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz
  
 
Using the repository
 
Using the repository

Aktuelle Version vom 1. Juli 2010, 15:00 Uhr

The Debian package management system (called Advanced Packaging Tool or APT) is by far the most well-designed and is one of the top killer features on the Linux platform.

This short Howto describes howto establish a Debian package repository for home-grown deb-packages or like (could be used for Ubuntu as well, since Ubuntu uses the Debian package management system).

Establish repository structure Create the repository structure in a directory. E.g. in ~/public_html directory exposed to the web.

cd public_html
mkdir my-repository
cd my-repository
mkdir binary
mkdir source

Copy your deb-packages into the repository

Like this

cp src/bzr_0.11-1.1_all.deb public_html/my-repository/binary/

Install the tools to be able to create a repository index

sudo aptitude install dpkg-dev

Create a repository index

cd my-repository
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz

Using the repository

# Add these two lines into the /etc/apt/sources.list
deb http://mediakey.dk/~cc/my-repository binary/
deb-src http://mediakey.dk/~cc/my-repository source/

Feel free to comment – easier methods and tips are more than welcome ;)

For a more professional package management setup, use reprepro