summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-18 09:07:10 +0100
committerRemi Collet <remi@remirepo.net>2018-01-18 09:07:10 +0100
commit4a462b6b5b0908b16d82e3b088d2fed56e36d86f (patch)
tree28362d9356429618c43cfd755d6465284edb824d
parent2078d064f95c1f738576f8ccfaf3b3ac21bfb0d4 (diff)
switch to createrepo_c (F27 only for now)
-rwxr-xr-xmkallrepo2
-rwxr-xr-xmkrepo30
2 files changed, 21 insertions, 11 deletions
diff --git a/mkallrepo b/mkallrepo
index 8710c01..77668f6 100755
--- a/mkallrepo
+++ b/mkallrepo
@@ -8,7 +8,6 @@ TMPSIG3=$(mktemp)
cd /home/rpmbuild/site/rpms
-#for dep in *.{i386,ppc,ppc64,x86_64} fedora/*/*/{i386,ppc,ppc64,x86_64}
for dep in fedora/{23,24,25,26,27}/*/{i386,x86_64} enterprise/{6,7}/*/{i386,x86_64,armhfp}
do
arch=${dep##*/}
@@ -78,7 +77,6 @@ then echo "== Création des liens (noarch) =="
else echo "Rien à lier."
fi
-#for dep in *.{i386,ppc,ppc64,x86_64} fedora/*/*/{i386,ppc,ppc64,x86_64}
for dep in SRPMS fedora/{23,24,25,26,27}/*/{i386,x86_64} enterprise/{6,7}/*/{i386,x86_64,armhfp}
do
if [ -d $dep/repodata -a $dep -nt $dep/repodata -a ! -f $dep/.closed ]
diff --git a/mkrepo b/mkrepo
index 6d496f9..5790363 100755
--- a/mkrepo
+++ b/mkrepo
@@ -46,13 +46,25 @@ fi
cache=/home/rpmbuild/site/rpms/.createrepocache/$nom
mkdir -p $cache
check=sha256
-echo "+ Génération des meta + sql ($check)"
-createrepo --workers 4 \
- --cachedir $cache \
- --checksum $check \
- --unique-md-filenames \
- --compress-type=bz2 \
- --database .
+if [ "$dis" == "fedora" -a "$ver" -ge 27 ]; then
+ echo "+ Génération repodata (createrepo_c, $check)"
+ createrepo_c --workers 4 \
+ --cachedir $cache \
+ --unique-md-filenames \
+ --retain-old-md 1 \
+ --changelog-limit 3 \
+ --compress-type=bz2 \
+ --database .
+else
+ echo "+ Génération repodata (createrepo, $check)"
+ createrepo --workers 4 \
+ --cachedir $cache \
+ --checksum $check \
+ --unique-md-filenames \
+ --changelog-limit 3 \
+ --compress-type=bz2 \
+ --database .
+fi
if [ -d headers ]
then
@@ -64,8 +76,8 @@ echo "+ Génération repoview"
nom=${PWD#/home/rpmbuild/site/rpms/}
echo repoview --url http://rpms.remirepo.net/$nom \
--template-dir /home/rpmbuild/site/rpms/repotmpl \
- --title "Les RPM de Remi - ${nom//\// - }" .
+ --title "Remi's RPM repository - ${nom//\// - }" .
LANG=C repoview --url http://rpms.remirepo.net/$nom \
--template-dir /home/rpmbuild/site/rpms/repotmpl \
- --title "Les RPM de Remi - ${nom//\// - }" .
+ --title "Remi's RPM repository - ${nom//\// - }" .