Re: Local packages
On Thu, Feb 28, 2002 at 03:19:15PM +0300, Sergey Lapin wrote:
> Hello, all!!!
>
> I have big collection of self-made packages, which I would like to
> distribute through my network via usual apt-get methods while allowing
> them to update from Debian sites. Connection is only by http,
> so I have to install http server somewhere. Could you tell me, how I
> could produce file tree as automajically as I can, and to simplify
> adding packajes to the tree in future? System is 'stable'.
Here's what I did to solve the same problem.
added a line like:
deb ftp://package-server/misc-packages packages aw
to /etc/apt/sources.list on all the machines.
Then I created a directory structure like:
-mirrors
|_misc-packages
|_apt-ftparchive.conf (file)
|_override (dir)
| |_override (file)
|_dists (dir)
|_packages (dir)
|_aw (dir)
|_binary-i386 (dir)
|_host (dir)
|_kernel (dir)
|_etc. (dir)
Then I found a apt-ftparchive.conf file, and modified it for my
machine:
// $Id: apt.conf,v 1.43 1999/12/06 02:19:38 jgg Exp $
/* This file is a sample configuration file with a few harmless sample
options.
*/
Dir
{
//Standard directories needed to locate files during generation
//process
ArchiveDir "/export/mirror/misc-packages/packages/aw/";
OverrideDir "/export/mirror/misc-packages/override/";
CacheDir "/export/mirror/db-cache/misc-packages/";
};
Default
{
Packages::Compress ". gzip";
FileMode 0664;
}
Tree "dists/packages"
{
Sections "aw";
Architectures "i386";
BinOverrride "override";
}
Then I created the overrides file:
host required base
mysql-3.23.43-pc-linux-gnu optional misc
syncup recommended base
php4-cgi optional web
php4-curl optional web
php4-dev optional web
php4-domxml optional web
php4-gd optional web
php4-imap optional web
php4-ldap optional web
php4-mcal optional web
php4-mcrypt optional web
php4-mhash optional web
php4-mysql optional web
php4-pear optional web
php4-sablot optional web
php4-snmp optional web
php4-sybase optional web
Then I wrote this script:
#!/bin/sh
#This is the directory where we will store customized and
non-distribution
#packages:
MISC_DIR='/export/mirror/misc-packages/'
override='/export/mirror/misc-packages/override/override'
basedir='dists/packages/aw/binary-i386'
cd $MISC_DIR;
apt-ftparchive packages ./$basedir $override 'packages/aw/binary-i386' > \
./$basedir/Packages
gzip -c ./$basedir/Packages > ./$basedir/Packages.gz
So then when I compile a new package (usually a new kernel) I stick it
in <some_path>/mirror/misc-packages/dists/packages/aw/binary-i386/kernel
and run that script (called make_packages_list.sh) and it creates the
Packages and Packages.gz files in binary-i386.
--
Share and Enjoy.
Reply to: