exit 1
fi
+now=`date +%s`
+# sign if newer than signage (86400=24 hrs)
+signage=8000
#check if root has rpm macros
confdir=`pwd`
architectures="i386 x86_64"
mkdir -p $d/${arch}/Packages
for f in $distdir/RPMS/${arch}/*.rpm $distdir/RPMS/noarch/*.rpm; do
if test -f $f; then
- ln -sf $f $d/${arch}/Packages/
- if rpm -K $f|grep -q ' gpg' >/dev/null; then
- echo "Already signed $f"
- else
- expect << __EOF
- spawn rpm --addsign $f
+ age=`stat --printf='%Y' $f`
+ if expr $now - $age \< $signage >/dev/null; then
+ ln -sf $f $d/${arch}/Packages/
+ if rpm -K $f|grep -q ' gpg' >/dev/null; then
+ echo "Already signed $f"
+ else
+ expect << __EOF
+ spawn rpm --addsign $f
expect -exact "Enter pass phrase: "
send -- "\r"
expect eof
__EOF
- chgrp staff $f
- chmod g+w $f
+ chgrp staff $f
+ chmod g+w $f
+ fi
fi
fi
done