/[adm]/puppet/modules/buildsystem/templates/signbot/sign-check-package
ViewVC logotype

Annotation of /puppet/modules/buildsystem/templates/signbot/sign-check-package

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2740 - (hide annotations) (download)
Thu Apr 19 22:42:58 2012 UTC (9 years, 5 months ago) by boklm
File size: 832 byte(s)
use empty temporary directory to sign packages
1 boklm 1023 #!/bin/sh
2    
3 misc 1872 if [ $# != 3 ] ; then
4     echo "missing arguments"
5     echo "usage : $0 file key_number key_directory"
6     exit 1
7     fi
8    
9 boklm 1023 file="$1"
10     key="$2"
11     keydir="$3"
12    
13 boklm 2740 tmpdir=`mktemp -d signbot-XXXXX`
14     tmpfile="$tmpdir/$(basename $file)"
15 boklm 1024 cp -pf "$file" "$tmpfile"
16 boklm 1023 rpm --delsign "$tmpfile"
17 misc 2163 /usr/local/bin/mga-signpackage "$tmpfile" "$key" "$keydir"
18 boklm 1026 nbtry=0
19 boklm 1023 while rpmsign -Kv "$tmpfile" 2>&1 | grep BAD
20     do
21 boklm 1026 nbtry=$(($nbtry + 1))
22 boklm 1912 if [ $nbtry -ge 30 ]
23 boklm 1026 then
24     exit 1
25     fi
26 pterjan 1081
27     # Archive failed file for further analysis
28     mkdir -p "/tmp/failed-sign/"
29     failedfile="/tmp/failed-sign/$(basename "$file").$(date +%Y%m%d%H%M%S)"
30     cp -pf "$file" "$failedfile"
31    
32 boklm 1024 cp -pf "$file" "$tmpfile"
33 boklm 1026 rpm --delsign "$tmpfile"
34 misc 2163 /usr/local/bin/mga-signpackage "$tmpfile" "$key" "$keydir"
35 boklm 1023 done
36     mv -f "$tmpfile" "$file"
37 boklm 2740 rmdir "$tmpdir"

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.28