#!/bin/sh TMPSIG=$(mktemp) TMPLNK=$(mktemp) TMPSIG2000=$(mktemp -t XXXXXXXX.2000) TMPSIG2018=$(mktemp -t XXXXXXXX.2018) TMPSIG2021=$(mktemp -t XXXXXXXX.2021) TMPSIG2023=$(mktemp -t XXXXXXXX.2023) TMPSIG2024=$(mktemp -t XXXXXXXX.2024) cd /home/rpmbuild/site/rpms for dep in fedora/{39,40,41}/*/{i386,x86_64,aarch64} enterprise/{8,9,10}/*/{x86_64,aarch64} do [[ $dep =~ /modular ]] && continue [[ $dep =~ /debug-modular ]] && continue 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 elif [ $arch = aarch64 ]; then find $dep -name \*.noarch.rpm -a -newer $dep/repodata -print >>$TMPLNK find $dep -name \*.aarch64.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 # old grep el7 $TMPSIG > $TMPSIG2000 # 2018 grep el8 $TMPSIG > $TMPSIG2018 # 2021 grep el9 $TMPSIG > $TMPSIG2021 # 2023 grep fc39 $TMPSIG > $TMPSIG2023 # 2024 grep src.rpm $TMPSIG > $TMPSIG2024 grep fc40 $TMPSIG >> $TMPSIG2024 grep fc41 $TMPSIG >> $TMPSIG2024 grep el10 $TMPSIG >> $TMPSIG2024 if [ -s $TMPSIG2024 ]; then echo "== Signature des $(cat $TMPSIG2024 | wc -l) nouveaux RPM (2024) ==" if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name CF1DF0057CE85DFF5B2F2A37C2FD3B2C2A0948E4" --addsign $(cat $TMPSIG2024) then echo done. else exit 1 fi fi if [ -s $TMPSIG2023 ]; then echo "== Signature des $(cat $TMPSIG2023 | wc -l) nouveaux RPM (2023) ==" if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name 50A5E157DFE548EC7C05E9D8D5933DAB6DEFD35E" --addsign $(cat $TMPSIG2023) then echo done. else exit 1 fi fi if [ -s $TMPSIG2021 ]; then echo "== Signature des $(cat $TMPSIG2021 | wc -l) nouveaux RPM (2021) ==" if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name B1ABF71E14C9D74897E198A8B19527F1478F8947" --addsign $(cat $TMPSIG2021) then echo done. else exit 1 fi fi if [ -s $TMPSIG2018 ]; then echo "== Signature des $(cat $TMPSIG2018 | wc -l) nouveaux RPM (2018) ==" if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name 6B38FEA7231F87F52B9CA9D8555097595F11735A" --addsign $(cat $TMPSIG2018) then echo done. else exit 1 fi fi if [ -s $TMPSIG2000 ]; then echo "== Signature des $(cat $TMPSIG2000 | wc -l) nouveaux RPM (old) ==" if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name 1EE04CCE88A4AE4AA29A5DF5004E6F4700F97F56" --addsign $(cat $TMPSIG2000) then echo done. else exit 1 fi 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} srce=${srce/\/armhfp/\/x86_64} srce=${srce/\/aarch64/\/x86_64} ln -f $srce $dest && echo $dest done else echo "Rien à lier." fi for dep in SRPMS fedora/{39,40,41}/*/{i386,x86_64,aarch64} enterprise/{8,9,10}/*/{x86_64,aarch64} do [[ $dep =~ /modular ]] && continue [[ $dep =~ /debug-modular ]] && continue 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