Setting up Ubuntu Repository

Since I rebuilt some Ubuntu packages such as pure-ftpd and ffmpeg, I think it would be better to keep the packages where I can get it back quickly whenever I need. I have a host for hosting my files. Anyway, the host is CentOS and it does not have any APT tools. In addtion, I don't know about Ubuntu or Debian repository. Fortunately, I found a good article and a good howto. The most important thing in Debian-based repository is its directory structure. What I have is as follow.
+-ubuntu/
+-dists/
|-breezy/
| |-binary-i386/
| | |-Release
| | +-Package.gz
| +-source/
| |-Release
| +-Source.gz
+-dapper/
|-binary-i386/
| |-Release
| +-Package.gz
+-source/
|-Release
+-Source.gz
I moved all *_i386.deb files into binary-i386 and other files into source. Then, I need to generate index files for binary (Packages.gz) and source (Sources.gz) using dpkg tools.
$ dpkg-scanpackages binary-i386 /dev/null | gzip -9c > binary-i386/Packages.gz
$ dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz
Next step is to create Release file to describe the origin, architecture and other meaningful information for each binary and source directory.
Archive: dapper
Component: contrib
Origin: ThaiGrid
Label: ThaiGrid Ubuntu repository
Architecture: i386
Now it should work by just adding below lines in /etc/apt/sources.list.
deb http://download.thaigrid.or.th/pub/ubuntu breezy contrib
deb-src http://download.thaigrid.or.th/pub/ubuntu breezy contrib
For more information, I recommend you to see live directory strucure at my repository.

Technorati Tags: , , , ,

Post new comment