Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jozef (8299)

jozef
  (email not shown publicly)
http://jozef.kutej.net/
Jabber: jozef@kutej.net

Journal of jozef (8299)

Tuesday July 07, 2009
09:40 AM

simple Debian repository

[ #39244 ]

The folder structure is following:

debian-simple-repo
|-- Makefile
|-- Release.conf
`-- unstable # files here generated
   |-- Packages
   |-- Packages.bz2
   |-- Packages.gz
   |-- Release
   |-- Release.gpg
   |-- Sources
   |-- Sources.bz2
   `-- Sources.gz

Makefile

all: repository

repository:
   dpkg-scanpackages unstable /dev/null > unstable/Packages
   dpkg-scansources unstable /dev/null > unstable/Sources

   bzip2 -c9 unstable/Packages > unstable/Packages.bz2
   gzip -c9 unstable/Packages > unstable/Packages.gz
   bzip2 -c9 unstable/Sources > unstable/Sources.bz2
   gzip -c9 unstable/Sources > unstable/Sources.gz

   apt-ftparchive -c=Release.conf release unstable > unstable/Release
   -rm unstable/Release.gpg
   gpg -abs -o unstable/Release.gpg unstable/Release

clean:
   rm -f unstable/Packages* unstable/Sources* unstable/Release*

Release.conf

APT::FTPArchive::Release::Origin "your@email";
APT::FTPArchive::Release::Label "Test repository";
APT::FTPArchive::Release::Suite "unstable";
APT::FTPArchive::Release::Architectures "i386 source";
APT::FTPArchive::Release::Components "main";

generation

All *.deb, *.dsc, *.diff.gz, *.changes, *.orig.tar.gz has to be copied to the unstable/ folder and `make` executed. This will generate unstable/Packages*, unstable/Sources*, unstable/Release* files. Then just the whole folder as-is copied to a web/ftp server.

usage

/etc/apt/sources.list file on a Debian machine has to be updated and a gpg key has to be added through `apt-key add`.

sources.list

deb http://your.hostname/some/folder/ unstable/
deb-src http://your.hostname/some/folder/ unstable/

beyond simple

For more advanced and more distribution like repository use reprepro. Setting up your own APT repository with upload support - is a good introduction to it.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.