[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ next ]
To create a repository you mainly need a set of packages (source and/or binary) to generate Packages.gz and Sources.gz files from them. You may have binary-only packages in some cases, but be careful not to violate licenses. A GPL'ed software, for example, needs to have its source distributed along with the binaries.
To do that you need to use the apt-ftparchive
program which is
installed by the apt-utils
package. First of all you collect all
your packages in a directory. Let's say, for example,
~/public_html/debian
; using that we're going to be exposing the
repository through our http server, already!
I can go to that directory and do the following:
$ apt-ftparchive sources . > Sources $ apt-ftparchive packages . > Packages $ gzip -c Packages > Packages.gz $ gzip -c Sources > Sources.gz
The first two commands scan the directory and its subdirectories of the directory you specified (., in this case) and prints the resulting packages list to the standard output, which we're redirecting to the Sources and Packages files.
If you're using the file method to access this repository the first two lines are enough. If you're using a remote method like ftp or http, then you need the compressed versions, as they're what APT will look for when updating the packages lists.
Here are the source lines you could add to your
/etc/apt/sources.list
to make APT aware of your repository now:
# This will only work with local access to the filesystem deb file:/home/user/public_html/debian/ ./ # This will be useable by people that can access your machine # with a network connection if you have your http server properly # configured deb http://host/~user/debian/ ./
You get the idea. As we called apt-ftparchive at the same directory the packages were on we can simply provide the full path to where the packages are and add a ./ at the end. You can do things differently, by calling apt-ftparchive with different relative paths instead of calling it on the same directory in which the packages are. You can also separate groups of packages as sections like Debian does. Read the apt-ftparchive(1) manpage for more information and play with the possibilities.
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ next ]
APT HOWTO
2.0.0 - September 2005kov@debian.org