This repository has been archived by the owner on Mar 22, 2021. It is now read-only.
forked from gboudreau/Greyhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_vfs.sh
executable file
·128 lines (110 loc) · 4.51 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
#!/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 -r [email protected]:Greyhole ~
export GREYHOLE_INSTALL_DIR="/home/gb/Greyhole"
export HOME="/home/gb"
###
cd "$HOME"
cd samba-3.4.9/source3
if [ ! -f bin/greyhole.so ]; 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 bin/greyhole.so ]; 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 bin/greyhole.so ]; 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 bin/default/source3/modules/libvfs-greyhole.so ]; 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 bin/default/source3/modules/libvfs-greyhole.so ]; 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="arm"
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