« RPM/Mash » : différence entre les versions
(→F.A.Q.) |
|||
| Ligne 13 : | Ligne 13 : | ||
Fichier <path>/etc/mash/mash.conf</path> | Fichier <path>/etc/mash/mash.conf</path> | ||
<syntaxhighlight lang="ini"> | <syntaxhighlight lang="ini"> | ||
[defaults] | [defaults] | ||
configdir = /etc/mash | configdir = /etc/mash | ||
buildhost = http:// | buildhost = http://koji.b2pweb.com/kojihub | ||
repodir = file:///mnt/koji | repodir = file:///mnt/koji | ||
use_sqlite = True | use_sqlite = True | ||
use_repoview = | use_repoview = True | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 39 : | Ligne 41 : | ||
tag = centos-5 | tag = centos-5 | ||
inherit = True | inherit = True | ||
strict_keys = | strict_keys = True | ||
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9 | keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9, 773DF357 | ||
repoviewurl = http:// | repoviewurl = http://koji.b2pweb.com/repositories/ | ||
repoviewtitle = "CentOS 5 repository - %(arch)s" | repoviewtitle = "CentOS 5 repository - %(arch)s" | ||
arches = i386 x86_64 | arches = i386 x86_64 | ||
| Ligne 47 : | Ligne 49 : | ||
# Change distro_tags as fedora-release version gets bumped | # Change distro_tags as fedora-release version gets bumped | ||
#distro_tags = cpe:/o:fedoraproject:fedora:17 rawhide | #distro_tags = cpe:/o:fedoraproject:fedora:17 rawhide | ||
distro_tags = cpe:/o:centos:centos:5 centos-5 | |||
hash_packages = True | hash_packages = True | ||
#make_ancient = True | #make_ancient = True | ||
hash = sha1 | hash = sha1 | ||
outputdir = /mnt/ | outputdir = /mnt/repos/centos | ||
# This forces to also create older version of same package | |||
latest = False | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 58 : | Ligne 63 : | ||
Fichier <path>/etc/mash/centos6.mash</path> | Fichier <path>/etc/mash/centos6.mash</path> | ||
<syntaxhighlight lang="ini"> | <syntaxhighlight lang="ini"> | ||
# mash config file | |||
[6] | [6] | ||
rpm_path = os/RPMS/%(arch)s/ | rpm_path = os/RPMS/%(arch)s/ | ||
| Ligne 68 : | Ligne 75 : | ||
tag = centos-6 | tag = centos-6 | ||
inherit = True | inherit = True | ||
strict_keys = | strict_keys = True | ||
keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9 | keys = 22B3B81A, 1ACA3465, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9, D3F3C56A | ||
repoviewurl = http:// | repoviewurl = http://koji.b2pweb.com/repositories/ | ||
repoviewtitle = "CentOS 6 repository - %(arch)s" | repoviewtitle = "CentOS 6 repository - %(arch)s" | ||
arches = i386 x86_64 | arches = i386 x86_64 | ||
delta = True | delta = True | ||
# Change distro_tags as fedora-release version gets bumped | # Change distro_tags as fedora-release version gets bumped | ||
distro_tags = cpe:/o:centos:centos:6 centos-6 | |||
hash_packages = True | hash_packages = True | ||
outputdir = /mnt/ | outputdir = /mnt/repos/centos | ||
# This forces to also create older version of same package | |||
latest = False | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 120 : | Ligne 130 : | ||
Order allow,deny | Order allow,deny | ||
Allow from all | 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> | </Directory> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 15 janvier 2014 à 07:22
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://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 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
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