forked from gboudreau/Greyhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_vfs.sh
executable file
·156 lines (134 loc) · 6.03 KB
/
build_vfs.sh
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/bin/bash
## Note to self:
# Run this script on:
# - x86_64: gb@fileserver2:~
# - i386: bougu@macbook:~/VirtualBox VMs/Ubuntu (32-bit)
# - ARM: gb@fileserver2:~/qemu-arm
# And don't forget to get the latest version of the samba-module from fileserver2 first:
# scp [email protected]:Greyhole/samba-module/* ~/Greyhole/samba-module/
export GREYHOLE_INSTALL_DIR="/home/gb/Greyhole"
export HOME="/home/gb"
###
cd "$HOME"
cd samba-3.4.9/source3
if [ ! -f modules/vfs_greyhole.c ]; then
./configure
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile-samba-3.4.patch
fi
rm -f modules/vfs_greyhole.c
ln -s ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-3.4.c modules/vfs_greyhole.c
make -j4
cd ../..
cd samba-3.5.4/source3
if [ ! -f modules/vfs_greyhole.c ]; then
./configure
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile-samba-3.5.patch
fi
rm -f modules/vfs_greyhole.c
ln -s ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-3.5.c modules/vfs_greyhole.c
make -j4
cd ../..
cd samba-3.6.9/source3
if [ ! -f modules/vfs_greyhole.c ]; then
./configure
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile-samba-3.6.patch
fi
rm -f modules/vfs_greyhole.c
ln -s ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-3.6.c modules/vfs_greyhole.c
make -j4
cd ../..
cd samba-4.0.14
if [ ! -f source3/modules/vfs_greyhole.c ]; then
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/wscript-samba-4.0.patch
./configure --enable-debug --enable-selftest --disable-symbol-versions
fi
rm -f source3/modules/vfs_greyhole.c
ln -s ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-4.0.c source3/modules/vfs_greyhole.c
make -j4
cd ..
cd samba-4.1.4
if [ ! -f source3/modules/vfs_greyhole.c ]; then
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/wscript-samba-4.1.patch
./configure --enable-debug --enable-selftest --disable-symbol-versions
fi
rm -f source3/modules/vfs_greyhole.c
ln -s ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-4.1.c source3/modules/vfs_greyhole.c
make -j4
cd ..
echo
echo "****************************************"
echo
ARCH="`uname -i`"
if [ "$ARCH" = "unknown" ]; then
ARCH="armhf"
fi
if [ -f samba-3.4.9/source3/bin/greyhole.so ]; then
ls -1 samba-3.4.9/source3/bin/greyhole.so
cp samba-3.4.9/source3/bin/greyhole.so ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.4/greyhole-$ARCH.so
echo " was copied to "
ls -1 ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.4/greyhole-$ARCH.so
echo
fi
if [ -f samba-3.5.4/source3/bin/greyhole.so ]; then
ls -1 samba-3.5.4/source3/bin/greyhole.so
cp samba-3.5.4/source3/bin/greyhole.so ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.5/greyhole-$ARCH.so
echo " was copied to "
ls -1 ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.5/greyhole-$ARCH.so
echo
fi
if [ -f samba-3.6.9/source3/bin/greyhole.so ]; then
ls -1 samba-3.6.9/source3/bin/greyhole.so
cp samba-3.6.9/source3/bin/greyhole.so ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.6/greyhole-$ARCH.so
echo " was copied to "
ls -1 ${GREYHOLE_INSTALL_DIR}/samba-module/bin/3.6/greyhole-$ARCH.so
echo
fi
if [ -f samba-4.0.14/bin/default/source3/modules/libvfs-greyhole.so ]; then
ls -1 samba-4.0.14/bin/default/source3/modules/libvfs-greyhole.so
cp samba-4.0.14/bin/default/source3/modules/libvfs-greyhole.so ${GREYHOLE_INSTALL_DIR}/samba-module/bin/4.0/greyhole-$ARCH.so
echo " was copied to "
ls -1 ${GREYHOLE_INSTALL_DIR}/samba-module/bin/4.0/greyhole-$ARCH.so
echo
fi
if [ -f samba-4.1.4/bin/default/source3/modules/libvfs-greyhole.so ]; then
ls -1 samba-4.1.4/bin/default/source3/modules/libvfs-greyhole.so
cp samba-4.1.4/bin/default/source3/modules/libvfs-greyhole.so ${GREYHOLE_INSTALL_DIR}/samba-module/bin/4.1/greyhole-$ARCH.so
echo " was copied to "
ls -1 ${GREYHOLE_INSTALL_DIR}/samba-module/bin/4.1/greyhole-$ARCH.so
echo
fi
echo "****************************************"
echo
exit
SSH_HOST="[email protected]"
ARCH="i386"
cd ~/git/Greyhole/samba-module/bin/
scp $SSH_HOST:Greyhole/samba-module/bin/3.4/greyhole-$ARCH.so 3.4/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.5/greyhole-$ARCH.so 3.5/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.6/greyhole-$ARCH.so 3.6/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.0/greyhole-$ARCH.so 4.0/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.1/greyhole-$ARCH.so 4.1/greyhole-$ARCH.so
SSH_HOST="[email protected]"
ARCH="x86_64"
cd ~/git/Greyhole/samba-module/bin/
scp $SSH_HOST:Greyhole/samba-module/bin/3.4/greyhole-$ARCH.so 3.4/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.5/greyhole-$ARCH.so 3.5/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.6/greyhole-$ARCH.so 3.6/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.0/greyhole-$ARCH.so 4.0/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.1/greyhole-$ARCH.so 4.1/greyhole-$ARCH.so
SSH_HOST="[email protected]"
ARCH="armhf"
cd ~/Greyhole/samba-module/bin/
scp -P 2223 $SSH_HOST:Greyhole/samba-module/bin/3.4/greyhole-$ARCH.so 3.4/greyhole-$ARCH.so
scp -P 2223 $SSH_HOST:Greyhole/samba-module/bin/3.5/greyhole-$ARCH.so 3.5/greyhole-$ARCH.so
scp -P 2223 $SSH_HOST:Greyhole/samba-module/bin/3.6/greyhole-$ARCH.so 3.6/greyhole-$ARCH.so
scp -P 2223 $SSH_HOST:Greyhole/samba-module/bin/4.0/greyhole-$ARCH.so 4.0/greyhole-$ARCH.so
scp -P 2223 $SSH_HOST:Greyhole/samba-module/bin/4.1/greyhole-$ARCH.so 4.1/greyhole-$ARCH.so
SSH_HOST="[email protected]"
ARCH="armhf"
cd ~/git/Greyhole/samba-module/bin/
scp $SSH_HOST:Greyhole/samba-module/bin/3.4/greyhole-$ARCH.so 3.4/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.5/greyhole-$ARCH.so 3.5/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/3.6/greyhole-$ARCH.so 3.6/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.0/greyhole-$ARCH.so 4.0/greyhole-$ARCH.so
scp $SSH_HOST:Greyhole/samba-module/bin/4.1/greyhole-$ARCH.so 4.1/greyhole-$ARCH.so