« RPM/Mash » : différence entre les versions
| Ligne 90 : | Ligne 90 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Configuration du dépôt pour fedora | === Configuration du dépôt pour fedora 20 === | ||
Fichier <path>/etc/ | Le fichier existe déjà (installé en même temps que <app>mash</app>. Seul la version de fedora s'incrémente au fur et à mesure des sorties de la distribution. | ||
Fichier <path>/etc/mash/branched.mash</path> | |||
<syntaxhighlight lang="ini"> | <syntaxhighlight lang="ini"> | ||
# mash config file | # mash config file | ||
[ | [20] | ||
rpm_path = os/RPMS/%(arch)s/ | rpm_path = os/RPMS/%(arch)s/ | ||
repodata_path = os/RPMS/%(arch)s/ | repodata_path = os/RPMS/%(arch)s/ | ||
| Ligne 104 : | Ligne 106 : | ||
multilib = True | multilib = True | ||
multilib_method = devel | multilib_method = devel | ||
tag = fedora- | tag = fedora-20 | ||
inherit = True | inherit = True | ||
strict_keys = | strict_keys = True | ||
keys = | keys = 246110C1 | ||
repoviewurl = http:// | repoviewurl = http://koji.b2pweb.com/repositories/ | ||
repoviewtitle = "Fedora | repoviewtitle = "Fedora 20 repository - %(arch)s" | ||
arches = i386 x86_64 | arches = i386 x86_64 | ||
delta = True | delta = True | ||
max_delta_rpm_size = 800000000 | |||
# Change distro_tags as fedora-release version gets bumped | # Change distro_tags as fedora-release version gets bumped | ||
distro_tags = cpe:/o:fedoraproject:fedora:20 Null | |||
hash_packages = True | hash_packages = True | ||
outputdir = /mnt/repositories/fedora | outputdir = /mnt/repositories/fedora | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 15 janvier 2014 à 07:38
Mash
Présentation
Mash est un outil qui interroge Koji afin d'obtenir les RPMs pour un tag donné et qui créer un dépôt directement utilisable avec ceux-ci.
Installation
yum install mash
Configuration
Configuration générale de mash
Fichier <path>/etc/mash/mash.conf</path>
[defaults]
configdir = /etc/mash
buildhost = http://koji.b2pweb.com/kojihub
repodir = file:///mnt/koji
use_sqlite = True
use_repoview = True
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>
# 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 = True
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9, 773DF357
repoviewurl = http://koji.b2pweb.com/repositories/
repoviewtitle = "CentOS 5 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
distro_tags = cpe:/o:centos:centos:5 centos-5
hash_packages = True
#make_ancient = True
hash = sha1
outputdir = /mnt/repos/centos
# This forces to also create older version of same package
latest = False
Configuration du dépôt pour CentOS 6
Fichier <path>/etc/mash/centos6.mash</path>
# mash config file
[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 = True
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9, D3F3C56A
repoviewurl = http://koji.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:centos:centos:6 centos-6
hash_packages = True
outputdir = /mnt/repos/centos
# This forces to also create older version of same package
latest = False
Configuration du dépôt pour fedora 20
Le fichier existe déjà (installé en même temps que <app>mash</app>. Seul la version de fedora s'incrémente au fur et à mesure des sorties de la distribution.
Fichier <path>/etc/mash/branched.mash</path>
# mash config file
[20]
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-20
inherit = True
strict_keys = True
keys = 246110C1
repoviewurl = http://koji.b2pweb.com/repositories/
repoviewtitle = "Fedora 20 repository - %(arch)s"
arches = i386 x86_64
delta = True
max_delta_rpm_size = 800000000
# Change distro_tags as fedora-release version gets bumped
distro_tags = cpe:/o:fedoraproject:fedora:20 Null
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
Options +Indexes
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>
Lancement de l'outil
mash 5 mash 6
F.A.Q.
Ce bug est répertorié chez RedHat[1]
La correction est triviale, Il faut appliquer le patch suivant au fichier <path>/usr/lib/python2.6/site-packages/yum/depsolve.py</path>( _checkFileRequires() caches the file requires of installed or to-be installed packages. Update it when removing packages in TS_INSTALL_STATES from transaction).[2]
diff -up a/depsolve.py b/depsolve.py
--- a/depsolve.py 2014-01-14 14:51:27.288392585 +0100
+++ b/depsolve.py.new 2014-01-14 14:51:17.683392467 +0100
@@ -808,6 +808,8 @@ class Depsolve(object):
# Have to deal with loops!
continue
self.tsInfo.remove(otxmbr.pkgtup)
+ ifr = self.installedFileRequires or {}
+ ifr.pop(otxmbr.pkgtup, None)
# We need to remove an obsoleted entry that
# was maybe used to resolve something ... ?
CheckDeps = True