RPM/Mash

De TartareFR
Aller à la navigation Aller à la recherche

Mash

Présentation

Mash est un outil qui interroge Koji à propos des derniers RPM créés pour un tag donné et qui créer un dépôt avec ces RPM, incluant leurs dépendances.

Installation

yum install mash

Configuration

Configuration générale de mash

Fichier <path>/etc/mash/mash.conf</path>

[defaults]
configdir = /etc/mash
buildhost = http://didier.b2pweb.com/kojihub
repodir = file:///mnt/koji
use_sqlite = True
use_repoview = False

Configuration du dépôt pour CentOS 5

Par défaut, mash créé une somme de vérification avec l'algorythme sha256, ce qui est incompatible avec CentOS 5. On doit donc lui préciser d'utiliser l'algorythme sha1 en lieu et place.

Fichier <path>/etc/mash/centos5.mash</path> <syntaxhighligh# mash config file

[5] rpm_path = os/RPMS/%(arch)s/ repodata_path = os/RPMS/%(arch)s/ source_path = os/SRPMS debuginfo = True debuginfo_path = debug/%(arch)s/ multilib = True multilib_method = devel tag = centos-5 inherit = True strict_keys = False keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9 repoviewurl = http://didier.b2pweb.com/repositories/ repoviewtitle = "CentOS 5 repository - %(arch)s" arches = i386 x86_64 delta = True

  1. Change distro_tags as fedora-release version gets bumped
  2. distro_tags = cpe:/o:fedoraproject:fedora:17 rawhide

hash_packages = True

  1. make_ancient = True

hash = sha1 outputdir = /mnt/repositories/centost lang="ini">

</syntaxhighlight>

Configuration du dépôt pour CentOS 6

Fichier <path>/etc/mash/centos6.mash</path>

[6]
rpm_path = os/RPMS/%(arch)s/
repodata_path = os/RPMS/%(arch)s/
source_path = os/SRPMS
debuginfo = True
debuginfo_path = debug/%(arch)s/
multilib = True
multilib_method = devel
tag = centos-6
inherit = True
strict_keys = False
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9
repoviewurl = http://didier.b2pweb.com/repositories/
repoviewtitle = "CentOS 6 repository - %(arch)s"
arches = i386 x86_64
delta = True
# Change distro_tags as fedora-release version gets bumped
#distro_tags = cpe:/o:fedoraproject:fedora:17 rawhide
hash_packages = True
outputdir = /mnt/repositories/centos

Configuration du dépôt pour fedora 17

Fichier <path>/etc/httpd/conf.d/mash.conf</path>

# mash config file

[17]
rpm_path = os/RPMS/%(arch)s/
repodata_path = os/RPMS/%(arch)s/
source_path = os/SRPMS
debuginfo = True
debuginfo_path = debug/%(arch)s/
multilib = True
multilib_method = devel
tag = fedora-17
inherit = True
strict_keys = False
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9
repoviewurl = http://didier.b2pweb.com/repositories/
repoviewtitle = "Fedora 17 repository - %(arch)s"
arches = i386 x86_64
delta = True
# Change distro_tags as fedora-release version gets bumped
#distro_tags = cpe:/o:fedoraproject:fedora:17 rawhide
hash_packages = True
outputdir = /mnt/repositories/fedora

Mise en place d'un alias

Le répertoire <path>/mnt/repositories</path> doit être accessible par HTTP. On ajoute donc un alias.

Fichier <path>/etc/httpd/conf.d/mash.conf</path>

Alias /repositories "/mnt/repositories"
<Directory "/mnt/repositories">
        Options Indexes
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

Lancement de l'outil

mash 5
mash 6