summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgetmock2
-rw-r--r--mirrorsync77
-rwxr-xr-xmkallrepo13
-rwxr-xr-xmkmodular4
-rwxr-xr-xmkrepo9
-rwxr-xr-xmockit4
-rwxr-xr-xpkgup2
7 files changed, 74 insertions, 37 deletions
diff --git a/getmock b/getmock
index 11ff924..abe3460 100755
--- a/getmock
+++ b/getmock
@@ -759,7 +759,7 @@ elif [ $1 = allphp ]; then
SCL="scl56 scl70 scl71 scl72 scl73 scl74 scl80 scl81 scl82 scl83 scl84"
for i in $SCL $MOD
do $0 $opt $i | tee $LOG
- if grep -q '64\.rpm' $LOG && grep -q 'Aucun' $LOG
+ if grep -q '64\.rpm' $LOG && grep -q 'pas un dossier mock' $LOG
then
echo -en "\n> $i - [enter] >"; read rep
fi
diff --git a/mirrorsync b/mirrorsync
index 002b840..2ceb9d1 100644
--- a/mirrorsync
+++ b/mirrorsync
@@ -32,20 +32,6 @@
# SOFTWARE.
#
-# Find rsync in default path
-rsync_run(){
- if command -v rsync >/dev/null; then
- command rsync "$@";
- else
- command -p rsync "$@";
- fi;
-}
-
-# You can change v to q if you do not want detailed logging
-# You may also add additional excludes if you don't want to provide certain
-# repositories or architectures.
-opts=(-avSH --exclude="*.~tmp~" --delete-delay --delay-updates)
-
# Please use a mirror geographically close to you for initial sync,
# or if you are hosting a private mirror (not publicly available).
#
@@ -57,24 +43,52 @@ opts=(-avSH --exclude="*.~tmp~" --delete-delay --delay-updates)
# A complete list of mirrors can be found at
# https://rpms.remirepo.net/
-# Enterprise repo source
-src1="rsync://rpms.remirepo.net/enterprise"
-# Fedora repo source
-src2="rsync://rpms.remirepo.net/fedora"
-
+##### TO BE ADAPTED TO YOUR CONFIGURATION #####
+# sync from primary mirror only allowed to official mirrors
+src="rsync://rpms.remirepo.net"
# Your local path. Change to whatever fits your system.
+dst=/mnt/RepoSync
# $mirrormodule is also used in syslog output.
+# ${dst}/${mirrormodule}/enterprise MUST exists
+# ${dst}/${mirrormodule}/fedora MUST exists
mirrormodule="Remi"
-dst1="/mnt/RepoSync/${mirrormodule}/enterprise"
-dst2="/mnt/RepoSync/${mirrormodule}/fedora"
+# You can change v to q if you do not want detailed logging
+# You may also add additional excludes if you don't want to provide certain
+# repositories or architectures.
+opts=(-avSH --exclude="*.~tmp~" --delete-delay --delay-updates)
+##### END OF TO BE ADAPTED #####
+
+# Enterprise repo
+src1="${src}/enterprise"
+dst1="${dst}/${mirrormodule}/enterprise"
+# Fedora repo
+src2="${src}/fedora"
+dst2="${dst}/${mirrormodule}/fedora"
datefile="date"
lockfile="$0.lockfile"
logfile="$0.log"
+# Find rsync in default path
+rsync_run(){
+ if command -v rsync >/dev/null; then
+ command rsync "$@";
+ else
+ command -p rsync "$@";
+ fi;
+}
+
+if [ ! -d ${dst1} ]; then
+ echo "${dst1} directory does not exist"
+ exit 1
+fi
+if [ ! -d ${dst2} ]; then
+ echo "${dst2} directory does not exist"
+ exit 1
+fi
# Always pull the index.html to ensure the latest. curl/wget would still use same bandiwdth to check if the page changed even
# if we aren't going to save a new copy
-wget https://rpms.remirepo.net/index.html -O /mnt/RepoSync/${mirrormodule}/index.html
+wget https://rpms.remirepo.net/index.html -O ${dst}/${mirrormodule}/index.html >> "$logfile" 2>&1
# Check if the datefile has changed on upstream mirror
# and exit cleanly if it is still the same
@@ -106,19 +120,28 @@ fi
# The actual syncing part
printf '%s\n' "$$" > "$lockfile"
printf "Started update at %(%c)T\n" -1 >> "$logfile" 2>&1
-logger -t rsync "Updating ${mirrormodule}"
-
# Sync src1/dst1 if there are changes
if [[ -n "$checkresult1" ]]; then
- rsync_run "${opts[@]}" "${src1}/" "${dst1}/" >> "$logfile" 2>&1
+ logger -t rsync "Updating ${mirrormodule} for ${dst1}"
+ if rsync_run "${opts[@]}" "${src1}/" "${dst1}/" >> "$logfile" 2>&1; then
+ logger -t rsync "Succeed updating ${mirrormodule}"
+ else
+ logger -t rsync "Failed updating ${mirrormodule} see ${logfile}"
+ rm -f ${dst1}/${datefile}
+ fi
fi
# Sync src2/dst2 if there are changes
if [[ -n "$checkresult2" ]]; then
- rsync_run "${opts[@]}" "${src2}/" "${dst2}/" >> "$logfile" 2>&1
+ logger -t rsync "Updating ${mirrormodule} for ${dst2}"
+ if rsync_run "${opts[@]}" "${src2}/" "${dst2}/" >> "$logfile" 2>&1; then
+ logger -t rsync "Succeed updating ${mirrormodule}"
+ else
+ logger -t rsync "Failed updating ${mirrormodule} see ${logfile}"
+ rm -f ${dst1}/${datefile}
+ fi
fi
-logger -t rsync "Finished updating ${mirrormodule}"
printf "End: %(%c)T\n" -1 >> "$logfile" 2>&1
rm -f "$lockfile"
diff --git a/mkallrepo b/mkallrepo
index 830b2b9..790ed54 100755
--- a/mkallrepo
+++ b/mkallrepo
@@ -7,6 +7,7 @@ TMPSIG2018=$(mktemp -t XXXXXXXX.2018)
TMPSIG2021=$(mktemp -t XXXXXXXX.2021)
TMPSIG2023=$(mktemp -t XXXXXXXX.2023)
TMPSIG2024=$(mktemp -t XXXXXXXX.2024)
+TMPSIG2025=$(mktemp -t XXXXXXXX.2025)
cd /home/rpmbuild/site/rpms
@@ -51,11 +52,19 @@ if [ -s $TMPSIG ]; then
# 2023
grep fc39 $TMPSIG > $TMPSIG2023
# 2024
- grep src.rpm $TMPSIG > $TMPSIG2024
- grep fc40 $TMPSIG >> $TMPSIG2024
+ grep fc40 $TMPSIG > $TMPSIG2024
grep fc41 $TMPSIG >> $TMPSIG2024
grep el10 $TMPSIG >> $TMPSIG2024
+ # 2025
+ grep src.rpm $TMPSIG > $TMPSIG2025
+ if [ -s $TMPSIG2025 ]; then
+ echo "== Signature des $(cat $TMPSIG2025 | wc -l) nouveaux RPM (2025) =="
+ if rpmsign --define '_gpg_path /home/remi/.gnupgrpm' --define "_gpg_name 83833E4687A4AA03B6AC94F2061566968F1F4B2D" --addsign $(cat $TMPSIG2025)
+ then echo done.
+ else exit 1
+ fi
+ fi
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)
diff --git a/mkmodular b/mkmodular
index ee088c6..60f3584 100755
--- a/mkmodular
+++ b/mkmodular
@@ -346,7 +346,9 @@ chdir($dest);
[$dis,$ver]=explode("/", $dest);
$GPG_PATH="/home/remi/.gnupgrpm";
if ($dis == "fedora") {
- if ($ver >= 40) {
+ if ($ver >= 42) {
+ $GPG_NAME="83833E4687A4AA03B6AC94F2061566968F1F4B2D";
+ } else if ($ver >= 40) {
$GPG_NAME="CF1DF0057CE85DFF5B2F2A37C2FD3B2C2A0948E4";
} else if ($ver >= 38) {
$GPG_NAME="50A5E157DFE548EC7C05E9D8D5933DAB6DEFD35E";
diff --git a/mkrepo b/mkrepo
index 0dfecfa..e658031 100755
--- a/mkrepo
+++ b/mkrepo
@@ -12,7 +12,7 @@ then
elif [ "$nom" = "SRPMS" ]
then
dis=fedora
- ver=40
+ ver=42
old=8
dst=/data/rpms/SRPMS.remi
else
@@ -26,7 +26,10 @@ fi
GPG_PATH=/home/remi/.gnupgrpm
if [ "$dis" == "fedora" ]; then
# Fedora
- if [ "$ver" -ge 40 ]
+ if [ "$ver" -ge 42 ]
+ then echo "key 2025"
+ GPG_NAME="83833E4687A4AA03B6AC94F2061566968F1F4B2D"
+ elif [ "$ver" -ge 40 ]
then echo "key 2024"
GPG_NAME="CF1DF0057CE85DFF5B2F2A37C2FD3B2C2A0948E4"
elif [ "$ver" -ge 38 ]
@@ -50,7 +53,7 @@ if [ "$dis" == "fedora" ]; then
else
# Enterprise
if [ "$ver" -ge 10 ]
- then echo "key 2021"
+ then echo "key 2024"
GPG_NAME="CF1DF0057CE85DFF5B2F2A37C2FD3B2C2A0948E4"
elif [ "$ver" -ge 9 ]
then echo "key 2021"
diff --git a/mockit b/mockit
index c4d9745..6578612 100755
--- a/mockit
+++ b/mockit
@@ -39,13 +39,13 @@ if [ "$1" == "--list" ]; then
echo "-- x86_64 queue: $($REDISCLI scard mockx) tasks --"
a=$($REDISCLI smembers mockx)
[ -n "$a" ] && $REDISCLI smembers mockx | \
- sed -e 's/^.*-r/ /;s/rebuild/\t/' | sort || \
+ sed -e 's/^.*-r / /;s/rebuild/\t/;s:/.*/::' | sort | head -n 25 || \
ps -ef | grep mock/mock | grep -v grep
echo -e "\n-- aarch64 queue: $($REDISCLI scard mocka) tasks --"
a=$($REDISCLI smembers mocka)
[ -n "$a" ] && $REDISCLI smembers mocka | \
- sed -e 's/^.*-r/ /;s/rebuild/\t/'| sort || \
+ sed -e 's/^.*-r / /;s/rebuild/\t/;s:/.*/::'| sort || \
ps -ef | ssh remi@ampere 'ps -ef | grep mock/mock | grep -v grep'
exit 0
diff --git a/pkgup b/pkgup
index 4ae31ce..a3b8189 100755
--- a/pkgup
+++ b/pkgup
@@ -24,7 +24,7 @@ sed --regexp-extended \
--expression "/^Version:/s/[0-9.]+$/$1/" \
--expression "/github_version/s/[0-9.]+$/$1/" \
--expression "/upstream_version/s/[0-9.]+$/$1/" \
- --expression "/(github|gh)_commit/s/[0-9a-f]{40}$/$2/" \
+ --expression "/(github_|gh_| )commit /s/[0-9a-f]{40}$/$2/" \
--expression "/(github|gh)_date/s/[0-9\-]{10}$/$date/" \
--expression '/^Release:/s/[0-9.]+/1/' \
--expression "s/%changelog/%changelog\n* $rpmdate $vendor - $1-1\n- update to $1\n/" \