gendistrib - generates a mirror tree for a distribution
gendistrib [options] directory
Always rebuild indexes, without checking whether it's needed.
Force rebuild of indexes from scratch.
Path of the hdlists file (defaults to media/media_info/hdlists). This is deprecated; if gendistrib finds a media.cfg file, it will use it and ignore the hdlists file unless this option is given.
Use the specified media.cfg file (defaults to media/media_info/media.cfg).
Don't abort when encountering bad rpms.
Stop and abort if an empty media is found.
Don't generate MD5SUM files.
If a media dir is missing, ignore it instead of aborting.
Silent mode.
gendistrib is a tool that helps to generate the structure of a Mandriva RPM repository, compatible with Mandriva tools (urpmi, rpmdrake, etc.)
A typical repository, under a root directory /ROOT/, has the following structure:
ROOT/ - media/ |- contrib/ | `- media_info/ |- main/ | `- media_info/ `- media_info/
In this example, we have two media, called main and contrib. The RPMs packages are placed in the main and contrib subdirectories. Repository metadata is contained in the top-level media_info directory. Per-media metadata are contained in the main/media_info and contrib/media_info subdirectories.
Before using gendistrib, you must create a file media_info/media.cfg to describe your repository. (An empty file will work, but this isn't recommended.) The syntax of this file is reminiscent of .ini files.
A first section [media_info] contains global information about the repository:
[media_info]
[media_info] version=2006.0 branch=Cooker arch=i586
Then, supply one section per media.
[main] hdlist=hdlist_main.cz name=Main
Here, the hdlist parameter specifies what will be the name of the hdlist file in the top-level media_info directory. name is a human readable label for the media.
hdlist
name
gendistrib should be passed the ROOT directory as parameter. It will then generate the hdlist and synthesis files and all other files needed for proper repository operation.
genhdlist2(1), and MDV::Distribconf(3) for description of the format of the media.cfg file.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 MandrakeSoft SA
Copyright (C) 2005, 2006 Mandriva SA
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
To install rpmtools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm rpmtools
CPAN shell
perl -MCPAN -e shell install rpmtools
For more information on module installation, please visit the detailed CPAN module installation guide.