summaryrefslogtreecommitdiffstats
path: root/mkallrepo
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-03-20 09:39:06 +0100
committerRemi Collet <fedora@famillecollet.com>2013-03-20 09:39:06 +0100
commitc2213a3c63677926e1564ef3a8ef56d7f9c17bd5 (patch)
treeb02f1628cdee8093a6238b4a2827419b0ff97e06 /mkallrepo
parent9e0cb3911d349bd13d1ea7985e038fa8ce393a0f (diff)
save remi repo management tools
Diffstat (limited to 'mkallrepo')
-rwxr-xr-xmkallrepo65
1 files changed, 65 insertions, 0 deletions
diff --git a/mkallrepo b/mkallrepo
new file mode 100755
index 0000000..39d2ae6
--- /dev/null
+++ b/mkallrepo
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+TMPSIG=$(mktemp)
+TMPLNK=$(mktemp)
+
+cd /home/rpmbuild/site/rpms
+
+#for dep in *.{i386,ppc,ppc64,x86_64} fedora/*/*/{i386,ppc,ppc64,x86_64}
+for dep in fedora/{12,13,14,15,16,17,18}/*/{i386,x86_64} enterprise/{5,6}/*/{i386,x86_64}
+do
+ arch=${dep##*/}
+
+ LST=""
+ if [ -d $dep/repodata -a $dep -nt $dep/repodata -a ! -f $dep/.closed ]
+ then echo "== Nouveaux RPM dans $dep =="
+ if [ $arch = x86_64 ]
+ then
+ find $dep -name \*.rpm -a -newer $dep/repodata -print >>$TMPSIG
+ else
+ find $dep -name \*.noarch.rpm -a -newer $dep/repodata -print >>$TMPLNK
+ find $dep -name \*.i?86.rpm -a -newer $dep/repodata -print >>$TMPSIG
+ fi
+
+ fi
+
+done
+find SRPMS -name \*.rpm -a -newer SRPMS/repodata -print >>$TMPSIG
+
+
+if [ -s $TMPSIG ]
+then echo "À signer:"; sort < $TMPSIG
+ echo "== Signature des $(cat $TMPSIG | wc -l) nouveaux RPM =="
+ if rpmsign --addsign $(cat $TMPSIG)
+ then echo done.
+ else exit 1
+ fi
+else echo "Rien à signer."
+fi
+
+if [ -s $TMPLNK ]
+then echo "== Création des liens (noarch) =="
+ cat $TMPLNK | while read dest
+ do
+ srce=${dest/\/ppc64/\/x86_64}
+ srce=${srce/\/ppc/\/x86_64}
+ srce=${srce/\/i386/\/x86_64}
+
+ ln -f $srce $dest && echo $dest
+ done
+else echo "Rien à lier."
+fi
+
+#for dep in *.{i386,ppc,ppc64,x86_64} fedora/*/*/{i386,ppc,ppc64,x86_64}
+for dep in SRPMS fedora/{12,13,14,15,16,17,18}/*/{i386,x86_64} enterprise/{5,6}/*/{i386,x86_64}
+do
+ if [ -d $dep/repodata -a $dep -nt $dep/repodata -a ! -f $dep/.closed ]
+ then echo "== Actualisation de $dep =="
+ pushd $dep
+ mkrepo nocheck
+ touch repodata
+ popd
+ #else echo "== $dep est à jour =="
+ fi
+done
+