-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-and-build
47 lines (43 loc) · 1.04 KB
/
patch-and-build
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
#!/bin/bash
XCAT_GIT_ROOT=http://git.code.sf.net/p/xcat/xcat-core
XCAT_GIT_BRANCH=2.8
SERIES_FILE=`pwd`/series-2.8
PATCHES_DIR=`pwd`/patches
if [[ `whoami` != root ]]
then
echo 'this should be run as root user'
exit -1
fi
pushd /tmp &&
export HOME=/tmp &&
cat >> ~/.rpmmacros <<EOF
%_rpmdir /tmp/xcat-core-snap
EOF
mkdir -p /tmp/xcat-core-snap
cat >> /tmp/quiltrc <<EOF
QUILT_PATCHES=.patches
QUILT_PATCHES_PREFIX=yes
EOF
git clone $XCAT_GIT_ROOT &&
pushd xcat-core &&
git checkout 2.8
mkdir -p ./.patches &&
cp $PATCHES_DIR/* ./.patches/ &&
cp $SERIES_FILE series &&
quilt --quiltrc=/tmp/quiltrc series &&
quilt --quiltrc=/tmp/quiltrc push -a &&
for arch in i386 x86_64
do
for package in xCAT xCATsn xCAT-nbroot
do
./makerpm $package $arch || exit -1
done
done &&
./makerpm xCAT-nbroot ppc64 &&
for package in perl-xCAT xCAT-client xCAT-IBMhpc xCAT-rmc xCAT-server xCAT-test xCAT-OpenStack xCAT-genesis-scripts xCAT-buildkit
do
./makerpm $package x86_64 || exit -1
done &&
./makegenesisbuilderrpm &&
quilt --quiltrc=/tmp/quiltrc pop -a &&
popd