File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
SCM=~ /projects/samba/samba-perf
4
+ BASE=" 8108f0d"
5
+ VERS=" 4.4.0"
4
6
PKG=~ /projects/fedora/samba
5
7
REPO=~ /repos/f23/x86_64
6
8
REPO_NAME=" jarrpa"
16
18
17
19
pushd $PKG
18
20
19
- VERSION= $( grep " define samba_version " samba.spec | awk ' {print $3} ' )
20
- RELEASE= $( grep " define main_release " samba.spec | awk ' {print $3} ' )
21
- SRPM= " samba- ${VERSION} - ${RELEASE} .fc23.src.rpm "
21
+ pushd $SCM
22
+ RELNUM= ` git rev-list ${BASE} ..HEAD --abbrev-commit | wc -l `
23
+ RELEASE= " ${RELNUM} . ${BASE} "
22
24
23
- if [ -f " ${REPO} /${SRPM} " ]; then
24
- CMD=" SAMBA_PKGS=` dnf -C list installed | grep \" samba\\\| ctdb\\\| libwb\\\| libsmb\" | awk ' {print $1}' ` ; sudo dnf reinstall \$ SAMBA_PKGS"
25
- else
26
- CMD=" sudo dnf --disablerepo=* --enablerepo=${REPO_NAME} update"
27
- fi
25
+ SRPM=" samba-${VERS} -${RELEASE} .fc23.src.rpm"
28
26
29
- pushd $SCM
30
- git archive --format=tar.gz --prefix=samba-${VERSION} / HEAD -o $PKG /samba-${VERSION} .tar.gz
27
+ git archive --format=tar.gz --prefix=samba-${VERS} / HEAD -o $PKG /samba-${VERS} .tar.gz
31
28
popd
32
29
30
+ sed -i " s/\\ (define samba_version \\ ).*/\\ 1${VERS} /" samba.spec
31
+ sed -i " s/\\ (define main_release \\ ).*/\\ 1${RELEASE} /" samba.spec
32
+ md5sum samba-${VERS} .tar.gz > sources
33
33
fedpkg --dist f23 srpm
34
34
sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
35
35
36
36
popd
37
37
38
+ if [ -f " ${REPO} /${SRPM} " ]; then
39
+ CMD=" SAMBA_PKGS=\` dnf -C list installed | grep \" samba\\ \|ctdb\\ \|libwb\\ \|libsmb\" | awk '{printf \$ 1; printf \" \" }'\` ; sudo dnf -y reinstall \$ SAMBA_PKGS"
40
+ else
41
+ CMD=" sudo dnf -y --disablerepo=* --enablerepo=${REPO_NAME} update"
42
+ fi
43
+
38
44
./scripts/hark-a-vagrant.sh ${CMD}
You can’t perform that action at this time.
0 commit comments