Package repositories (+Howto)

From Edgar BV Wiki
Jump to navigation Jump to search

First build the file structure (see howto)

build an ftp user

Give at least read rights to the ftp user in the repository

Then copy the .deb package into the binary directory

Once they're all there create the packages file (the index file telling apt what packages are in the repository)

tripraid:/export/home/install/Debian# dpkg-scanpackages dists/experimental/contrib/binary-i386 /dev/null | gzip -9c > dists/experimental/contrib/binary-i386/Packages.gz tripraid:/export/home/install/Debian# dpkg-scanpackages dists/experimental/main/binary-i386 /dev/null | gzip -9c > dists/experimental/main/binary-i386/Packages.gz tripraid:/export/home/install/Debian# dpkg-scanpackages dists/experimental/non-free/binary-i386 /dev/null | gzip -9c > dists/experimental/non-free/binary-i386/Packages.gz


tripraid:/export/home/install/Debian# dpkg-scanpackages dists /dev/null | gzip -9c > dists/Packages.gz

( or you can do it per directory, but the path info in Packages.gz will be fucked up Linux/dists/experimental/main# dpkg-scanpackages binary-i386 /dev/null | gzip -9c > binary-i386/Packages.gz)

add the ftp user - set the home dir 2 higher than the repository

change /etc/proftpd.conf and add

DefaultRoot ~/../..

test the ftp user login and make sure the / directory is the beginning of the repository

add the repository to the /etc/apt/sources.list

deb ftp://ftpuser:ftp0p3n@tripraid.ops.tripnet.int/Debian/ experimental main contrib non-free