Table of contents:
Requirements:
- A raspberry pi with raspian distribution installed.
sudo apt-get install build-essential
sudo apt-get install libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev re2c flex python-setuptools cmake
libevhtp is a http server libary on top of libevent. It's used in seafile file server.
git clone https://www.github.com/haiwen/libevhtp.git
cd libevhtp
cmake -DEVHTP_DISABLE_SSL=OFF -DEVHTP_BUILD_SHARED=ON .
make
sudo make install
libzdb
provides a consistent API to various database backends, including sqlite/mysql/pg/oracle. It's used by ccnet-server and seafile-server.
git clone https://www.github.com/haiwen/libzdb.git
cd libzdb
./autogen.sh
./configure
make
sudo make install
After compiling all the libraries, run ldconfig
to update the system libraries cache:
sudo ldconfig
Create a new directory /home/pi/dev/seahub_thirdpart
:
mkdir -p ~/dev/seahub_thirdpart
Download these tarballs to /tmp/
:
Install all these libaries to /home/pi/dev/seahub_thirdpart
:
cd ~/dev/seahub_thirdpart
export PYTHONPATH=.
easy_install -d . /tmp/Django-1.5.12.tar.gz
easy_install -d . /tmp/djblets-0.6.14.tar.gz
easy_install -d . /tmp/gunicorn-0.16.1.tar.gz
easy_install -d . /tmp/flup-1.0.tar.gz
easy_install -d . /tmp/chardet-1.0.tar.gz
easy_install -d . /tmp/python-dateutil-1.5.tar.gz
easy_install -d . /tmp/six-<version>.tar.gz
To build seafile server, there are four sub projects involved:
The build process has two steps:
- First, fetch the tags of each projects, and make a soruce tarball for each of them.
- Then run a
build-server.py
script to build the server package from the source tarballs.
Seafile manages the releases in tags on github.
Assume we are packaging for seafile server 4.1.1, then the tags are:
- ccnet, seafile, and seahub would all have a
v4.1.1-sever
tag. - libsearpc would have the
v3.0-latest
tag (libsearpc has been quite stable and basically has no further development, so the tag is alwaysv3.0-latest
)
First setup the PKG_CONFIG_PATH
enviroment variable (So we don't need to make and make install libsearpc/ccnet/seafile into the system):
export PKG_CONFIG_PATH=/home/pi/dev/seafile/lib:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/home/pi/dev/libsearpc:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/home/pi/dev/ccnet:$PKG_CONFIG_PATH
cd ~/dev
git clone https://github.com/haiwen/libsearpc.git
cd libsearpc
git reset --hard v3.0-latest
./autogen.sh
./configure
make dist
cd ~/dev
git clone https://github.com/haiwen/ccnet.git
cd ccnet
git reset --hard v4.1.1-server
./autogen.sh
./configure
make dist
cd ~/dev
git clone https://github.com/haiwen/seafile.git
cd seafile
git reset --hard v4.1.1-server
./autogen.sh
./configure
make dist
cd ~/dev
git clone https://github.com/haiwen/seahub.git
cd seahub
git reset --hard v4.1.1-server
./tools/gen-tarball.py --version=4.1.1 --branch=HEAD
cd ~/dev
git clone https://github.com/haiwen/seafobj.git
cd seafobj
git reset --hard v4.1.1-server
make dist
cd ~/dev
git clone https://github.com/haiwen/seafdav.git
cd seafdav
git reset --hard v4.1.1-server
make
mkdir ~/seafile-sources
cp ~/dev/libsearpc/libsearpc-<version>-tar.gz ~/seafile-sources
cp ~/dev/ccnet/ccnet-<version>-tar.gz ~/seafile-sources
cp ~/dev/seafile/seafile-<version>-tar.gz ~/seafile-sources
cp ~/dev/seahub/seahub-<version>-tar.gz ~/seafile-sources
cp ~/dev/seafobj/seafobj.tar.gz ~/seafile-sources
cp ~/dev/seafdav/seafdav.tar.gz ~/seafile-sources
Now we have all the tarballs prepared, we can run the build-server.py
script to build the server package.
mkdir ~/seafile-server-pkgs
~/dev/seafile/scripts/build-server.py --libsearpc_version=<libsearpc_version> --ccnet_version=<ccnet_version> --seafile_version=<seafile_version> --seahub_version=<seahub_version> --srcdir= --thidrpartdir=/home/pi/dev/seahub_thirdpart --srcdir=/home/pi/seafile-sources --outputdir=/home/pi/seafile-server-pkgs
After the script finisheds, we would get a seafile-server_4.1.1_pi.tar.gz
in ~/seafile-server-pkgs
folder.
Use the built seafile server package to go over the steps of Deploying Seafile with SQLite.
The test should cover these steps at least:
- The setup process is ok
- After
seafile.sh start
andseahub.sh start
, you can login from a browser. - Uploading/Downloading files through a web browser works correctly.
- Seafile WebDAV server works correctly
- Download the package of the previous version seafile server, and setup it.
- Upgrading according to the manual
- After the upgrade, check the functionality is ok:
- Uploading/Downloading files through a web browser works correctly.
- Seafile WebDAV server works correctly