-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqt-stage-rpms
executable file
·65 lines (53 loc) · 1.67 KB
/
qt-stage-rpms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
# Bring an rpm into the appropriate repo from the staging area
#
########################################################################
# Change Log
# 04/11/14 shubes - changed invocation of qt-update-yum-repos
# - split out qt-check-sign-rpm script
# - split out qt-move-to-repo script
# - refactored
# 04/09/14 shubes - remove related binaries when staging srpm
# 12/09/13 shubes - added processing for logs
# 12/01/13 shubes - created
########################################################################
########################################################################
# process each build logs and its binary rpms
a6_stage_build_files(){
archdir=${staglog%/*}
while read wrotestring; do
rpmfile=${wrotestring#Wrote: }
# there's a \r at the end of this string that we need to get rid of
rpmfile=${rpmfile%.rpm*}
rpmfile=${rpmfile}.rpm
rpmfile=${rpmfile##*/}
stagfile=$archdir/$rpmfile
qt-check-sign-rpm $stagfile
qt-move-file-to-repo $stagfile
done << !EOF!
$(grep ^Wrote $staglog)
!EOF!
archdir=$(echo $archdir | sed -e "s|$stagdir/|$repodir/|")
touch $archdir/$flagfile
qt-move-file-to-repo $staglog
}
########################################################################
# main process begins here
#
me=${0##*/}
myver=v1.1
echo "$me - $myver started"
stagdir=/stage
repodir=/repos
flagfile=.needs-update
for stagfile in $(find $stagdir -name "*.src.rpm" ); do
qt-check-sign-rpm $stagfile
qt-remove-binaries $stagfile
qt-move-file-to-repo $stagfile
done
for staglog in $(find $stagdir -name "*.buildlog.txt" ); do
a6_stage_build_files
done
qt-update-yum-repos
echo "$me - ended"
exit 0