From e55c8f37c053470944ea00a3a7b57ca014c568f8 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 4 May 2016 16:08:08 +0000 Subject: [PATCH] Add a fullfiletimelist file with timestamps for fedora/epel changes to master mirrors --- roles/bodhi2/backend/files/update-fullfilelist | 17 ++++++++++++++++- roles/releng/files/update-fullfilelist | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/roles/bodhi2/backend/files/update-fullfilelist b/roles/bodhi2/backend/files/update-fullfilelist index 0302c6a5b6..bac3f9c909 100755 --- a/roles/bodhi2/backend/files/update-fullfilelist +++ b/roles/bodhi2/backend/files/update-fullfilelist @@ -1,6 +1,6 @@ #!/bin/bash -# currently runs on releng2.fedora.phx.redhat.com +# currently runs on bodhi-backend01 after updates pushes MOD=$1 [ -z "$MOD" ] && { @@ -8,6 +8,8 @@ MOD=$1 exit 1 } +# This is the old traditional fullfilelist with no timestamps + TMPFILE=$(mktemp -p /tmp/) pushd /pub/$MOD > /dev/null find * -print > $TMPFILE @@ -18,3 +20,16 @@ else fi chmod 0644 fullfilelist popd > /dev/null + +# This is the new list with timestamps + +TMPFILE=$(mktemp -p /tmp/) +pushd /pub/$MOD > /dev/null +/usr/bin/rsync --no-h --list-only -r . > $TMPFILE +if diff $TMPFILE fullfiletimelist > /dev/null; then + rm -f $TMPFILE +else + mv $TMPFILE fullfiletimelist +fi +chmod 0644 fullfiletimelist +popd > /dev/null diff --git a/roles/releng/files/update-fullfilelist b/roles/releng/files/update-fullfilelist index 0302c6a5b6..bac3f9c909 100755 --- a/roles/releng/files/update-fullfilelist +++ b/roles/releng/files/update-fullfilelist @@ -1,6 +1,6 @@ #!/bin/bash -# currently runs on releng2.fedora.phx.redhat.com +# currently runs on bodhi-backend01 after updates pushes MOD=$1 [ -z "$MOD" ] && { @@ -8,6 +8,8 @@ MOD=$1 exit 1 } +# This is the old traditional fullfilelist with no timestamps + TMPFILE=$(mktemp -p /tmp/) pushd /pub/$MOD > /dev/null find * -print > $TMPFILE @@ -18,3 +20,16 @@ else fi chmod 0644 fullfilelist popd > /dev/null + +# This is the new list with timestamps + +TMPFILE=$(mktemp -p /tmp/) +pushd /pub/$MOD > /dev/null +/usr/bin/rsync --no-h --list-only -r . > $TMPFILE +if diff $TMPFILE fullfiletimelist > /dev/null; then + rm -f $TMPFILE +else + mv $TMPFILE fullfiletimelist +fi +chmod 0644 fullfiletimelist +popd > /dev/null