diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-03-20 09:39:06 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-03-20 09:39:06 +0100 |
commit | c2213a3c63677926e1564ef3a8ef56d7f9c17bd5 (patch) | |
tree | b02f1628cdee8093a6238b4a2827419b0ff97e06 /mkrepo | |
parent | 9e0cb3911d349bd13d1ea7985e038fa8ce393a0f (diff) |
save remi repo management tools
Diffstat (limited to 'mkrepo')
-rwxr-xr-x | mkrepo | 65 |
1 files changed, 65 insertions, 0 deletions
@@ -0,0 +1,65 @@ +#!/bin/sh +#set -x +TMP=/tmp/liste.$(basename $PWD) + +if [ ${1:-check} != nocheck ]; then + echo "+ Controle des signatures" + rpm -K *.rpm | grep -v 'gpg OK' | cut -d: -f1 | tee $TMP + if [ -s $TMP ] + then rpmsign --addsign $(cat $TMP) + else echo OK. + fi +fi + +echo "+ Nettoyage des anciens" + +repomanage --old --keep=2 . | tee $TMP +LST=$(cat $TMP) + +if [ -z "$LST" ] +then echo OK. +else mv $LST /data/rpms/old/ +fi + +nom=${PWD#/home/rpmbuild/site/rpms/} +if [ "$nom" = "SRPMS" ] +then + dis=fedora + ver=17 +else + dis=${nom%%/*} + ver=${nom#$dis/} + ver=${ver%%/*} +fi + +cache=/home/rpmbuild/site/rpms/.createrepocache/$nom +mkdir -p $cache +if [ $dis == fedora -a $ver -ge 11 ] +then check=sha256 +elif [ $dis == enterprise -a $ver -ge 6 ] +then check=sha256 +else check=sha +fi +echo "+ Génération des meta + sql ($check)" +createrepo --workers 4 \ + --cachedir $cache \ + --checksum $check \ + --unique-md-filenames \ + --compress-type=bz2 \ + --database . + +if [ -d headers ] +then + echo "+ Génération des headers" + yum-arch . +fi + +echo "+ Génération repoview" +nom=${PWD#/home/rpmbuild/site/rpms/} +echo repoview --url http://rpms.famillecollet.com/$nom \ + --template-dir /home/rpmbuild/site/rpms/repotmpl \ + --title "Les RPM de Remi - ${nom//\// - }" . +LANG=C repoview --url http://rpms.famillecollet.com/$nom \ + --template-dir /home/rpmbuild/site/rpms/repotmpl \ + --title "Les RPM de Remi - ${nom//\// - }" . + |