[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how th generate like oficial site from packages (or CD's)



Preston Boyington wrote:
Hugo Vanwoerkom wrote:

Indeed, reprepro is a lot better, I tried it yesterday, and faster too.
I invoke reprepro from a C++ program to generate a local mirror of all the packages that a system contains, generated by dpkg-repack, if anybody is interested.

Hugo

I am very interested.  How can I get more information?


The process is basically 2 steps: (a) generate debs for all the packages on the system and (b) generate a local mirror of those.

1. Allocate a dir. e.g. /archive
2. In that dir. run:
   set COLUMNS=200
   dpkg -l &>11.packages
   which will generate 11.packages containing all that is installed.
3. Run 'do_recreate_archives 11.packages' in that dir: it will generate all the debs of the packages that are installed. Check the output: if a 'package is broken' you have to substitute that deb! 4. Now follow http://www.debian-administration.org/articles/286 in setting up a reprepro configuration file, e.g.:

Origin: Debian
Label: Local Repository
Suite: unstable
Codename: sid
Version: 3.1
Architectures: i386 source
Components: main contrib non-free
Description: Local Repository

5. In the reprepro main dir. run 'do_reprepro_archives /archives/' and a local mirror will be generated that contains all the packages that are installed on the current system.

This uses 2 programs that I wrote in C++ using Qt: 'do_recreate_archives' and 'do_reprepro_archives'. They should be compiled and placed where you can invoke them.

If you tell me where to send them I can send them. Obviously this can be done also using any scripting language. I use Qt because I know it and have it installed.

Hugo






Reply to: