File tree 1 file changed +23
-4
lines changed
1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
SCM=" ~/projects/samba/samba-perf"
4
4
PKG=" ~/projects/fedora/samba"
5
+ REPO=" ~/repo/f23/x86_64"
6
+ REPO_NAME=" jarrpa"
7
+ NODES=" ganesh"
5
8
6
9
MOCK_OPTS=" --no-clean --without=configure --nocheck --no-cleanup-after"
7
10
if [ " x${1} " == " xclean" ]; then
@@ -18,13 +21,29 @@ VERSION=$(grep "define samba_version" samba.spec | awk '{print $3}')
18
21
RELEASE=$( grep " define main_release" samba.spec | awk ' {print $3}' )
19
22
SRPM=" samba-${VERSION} -${RELEASE} .fc23.src.rpm"
20
23
24
+ if [ -f " ${REPO} /${SRPM} " ]; then
25
+ OLD_MD5=` md5sum ${REPO} /${SRPM} | awk ' {print $1}' `
26
+ else
27
+ OLD_MD5=" "
28
+ fi
29
+
21
30
pushd $SCM
22
31
git archive --format=tar.gz --prefix=samba-${VERSION} / HEAD -o $PKG /samba-${VERSION} .tar.gz
23
32
popd
24
33
25
34
fedpkg --dist f23 srpm
26
35
27
- echo " sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM} "
28
- sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
29
- popd
30
- vagrant rsync
36
+ NEW_MD5=` md5sum ${SRPM} | awk ' {print $1}' `
37
+
38
+ if [ " ${NEW_MD5} " != " ${OLD_MD5} " ]; then
39
+ echo " sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM} "
40
+ sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
41
+ popd
42
+ vagrant rsync
43
+ if [ " x${OLD_MD5} " != " x" ]; then
44
+ CMD=" SAMBA_PKGS=` dnf list installed | grep \" samba\\\| ctdb\\\| libwb\\\| libsmb\" | awk ' {print $1}' ` ; sudo dnf reinstall ${SAMBA_PKGS} "
45
+ else
46
+ CMD=" sudo dnf --disablerepo=* --enablerepo=${REPO_NAME} update"
47
+ fi
48
+ vagrant ssh ${NODES} -c " ${CMD} "
49
+ fi
You can’t perform that action at this time.
0 commit comments