@TCB13
I have not done any benchmark tests, because i have no idea how to do this.
If you told me how, then i do the tests.
Hi All,
apologies for the rather crude script (will be updated as soon I’ve got time), but below seems to be working with the most recent 7.1.3 release (python3 and with mysql):
In part taken from:
@towa48: Cheers for the updated script on GitHub, much appreciated!
#! /bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
BUILDFOLDER=build
THIRDPARTYFOLDER=$SCRIPTPATH/$BUILDFOLDER/seahub_thirdparty
PKGSOURCEDIR=seafile-sources
PKGDIR=seafile-server-pkgs
MYSQL=/usr/local/bin/mariadb_config
LIBSEARPC_VERSION=3.2.0
LIBSEARPC_VERSION_OLD=3.1.0
LIBSEARPC_TAG=v$LIBSEARPC_VERSION
VERSION=7.1.3
VERSION_OLD=6.0.1
VERSION_TAG=v$VERSION-server
VERSION_CCNET=7.1.3
VERSION_SEAFILE=7.1.3
[ ! -d "$SCRIPTPATH/$BUILDFOLDER" ] && \
mkdir -p $SCRIPTPATH/$BUILDFOLDER
# Load initial env variables
. /etc/profile
install_dependencies() {
apt-get install -y \
build-essential \
git \
cmake \
libldap2-dev \
libssl-dev \
libevent-dev \
libcurl4-openssl-dev \
libglib2.0-dev \
uuid-dev \
intltool \
libsqlite3-dev \
libmariadbclient-dev \
libarchive-dev \
libtool \
libjansson-dev \
valac \
libfuse-dev \
python3 \
python3-dev \
python3-pip \
libjpeg-dev \
zlib1g-dev
}
build_mariadb() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/mariadb" ] && \
mkdir -p $SCRIPTPATH/$BUILDFOLDER/mariadb
git clone -b v3.1.7 --single-branch https://github.com/mariadb-corporation/mariadb-connector-c.git $SCRIPTPATH/$BUILDFOLDER/mariadb
cd $SCRIPTPATH/$BUILDFOLDER/mariadb
cmake .
make -j8
make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/mariadb
ldconfig
}
build_libevhtp() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/libevhtp" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/libevhtp
git clone -b 1.2.0 --single-branch https://www.github.com/haiwen/libevhtp.git $SCRIPTPATH/$BUILDFOLDER/libevhtp
cd $SCRIPTPATH/$BUILDFOLDER/libevhtp
# Temporary patch - otherwise build fails
sed -i '1 i\#include <signal.h>' $SCRIPTPATH/$BUILDFOLDER/libevhtp/test_proxy.c
cmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .
make -j8
make install
cp -av $SCRIPTPATH/$BUILDFOLDER/libevhtp/oniguruma/onigposix.h /usr/local/include/
ldconfig
}
export_python_path() {
export PKG_CONFIG_PATH=$SCRIPTPATH/$BUILDFOLDER/seafile-server/lib:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$SCRIPTPATH/$BUILDFOLDER/libsearpc:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$SCRIPTPATH/$BUILDFOLDER/ccnet-server:$PKG_CONFIG_PATH
}
build_searpc() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/libsearpc" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/libsearpc
git clone -b $LIBSEARPC_TAG --single-branch https://github.com/haiwen/libsearpc.git $SCRIPTPATH/$BUILDFOLDER/libsearpc
cd $SCRIPTPATH/$BUILDFOLDER/libsearpc
[ -n "$LIBSEARPC_VERSION_OLD" ] && \
[ -n "$LIBSEARPC_VERSION" ] && \
sed -i "s/$LIBSEARPC_VERSION_OLD/$LIBSEARPC_VERSION/g" $SCRIPTPATH/$BUILDFOLDER/libsearpc/configure.ac
./autogen.sh
./configure
make -j8
make install
make dist
}
build_ccnet() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/ccnet-server" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/ccnet-server
git clone -b $VERSION_TAG --single-branch https://github.com/haiwen/ccnet-server.git $SCRIPTPATH/$BUILDFOLDER/ccnet-server
cd $SCRIPTPATH/$BUILDFOLDER/ccnet-server
[ -n "$VERSION_OLD" ] && \
[ -n "$VERSION" ] && \
sed -i "s/$VERSION_OLD/$VERSION/g" $SCRIPTPATH/$BUILDFOLDER/ccnet-server/configure.ac
./autogen.sh
./configure --with-mysql=$MYSQL
make dist
}
build_seafile() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/seafile-server" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/seafile-server
git clone -b $VERSION_TAG --single-branch https://github.com/haiwen/seafile-server.git $SCRIPTPATH/$BUILDFOLDER/seafile-server
cd $SCRIPTPATH/$BUILDFOLDER/seafile-server
[ -n "$VERSION_OLD" ] && \
[ -n "$VERSION" ] && \
sed -i "s/$VERSION_OLD/$VERSION/g" $SCRIPTPATH/$BUILDFOLDER/seafile-server/configure.ac
./autogen.sh
./configure --with-mysql=$MYSQL
make dist
}
build_seahub() {
[ ! -d "$THIRDPARTYFOLDER" ] && \
mkdir -p $THIRDPARTYFOLDER
export PYTHONPATH=$THIRDPARTYFOLDER
export PATH=$PATH:$THIRDPARTYFOLDER
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/seahub" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/seahub
git clone -b $VERSION_TAG --single-branch https://github.com/haiwen/seahub.git $SCRIPTPATH/$BUILDFOLDER/seahub
cd $SCRIPTPATH/$BUILDFOLDER/seahub
# Use more recent version of Django
sed -i "s/Django==1.11.29/Django==2.1.10/g" $SCRIPTPATH/$BUILDFOLDER/seahub/requirements.txt
while read line; do python3 /usr/lib/python3/dist-packages/easy_install.py -d $THIRDPARTYFOLDER $line; done < requirements.txt
python3 ./tools/gen-tarball.py --version=$VERSION --branch=HEAD
}
build_seafobj() {
[ ! -d "$SCRIPTPATH/$BUILDFOLDER/seafobj" ] && \
mkdir $SCRIPTPATH/$BUILDFOLDER/seafobj
git clone -b $VERSION_TAG --single-branch https://github.com/haiwen/seafobj.git $SCRIPTPATH/$BUILDFOLDER/seafobj
cd $SCRIPTPATH/$BUILDFOLDER/seafobj
make dist
}
build_seafdav() {
mkdir $SCRIPTPATH/$BUILDFOLDER/seafdav
git clone -b $VERSION_TAG --single-branch https://github.com/haiwen/seafdav.git $SCRIPTPATH/$BUILDFOLDER/seafdav
cd $SCRIPTPATH/$BUILDFOLDER/seafdav
make
}
copy_pkg_source() {
[ ! -d "$SCRIPTPATH/$PKGSOURCEDIR" ] && \
mkdir -p $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/libsearpc/libsearpc-$LIBSEARPC_VERSION.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/ccnet-server/ccnet-$VERSION_CCNET.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/seafile-server/seafile-$VERSION_SEAFILE.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/seahub/seahub-$VERSION_SEAFILE.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/seafobj/seafobj.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
cp $SCRIPTPATH/$BUILDFOLDER/seafdav/seafdav.tar.gz $SCRIPTPATH/$PKGSOURCEDIR
}
build_server() {
[ ! -d "$SCRIPTPATH/$PKGDIR" ] && \
mkdir $SCRIPTPATH/$PKGDIR
python3 $SCRIPTPATH/$BUILDFOLDER/seafile-server/scripts/build/build-server.py \
--libsearpc_version=$LIBSEARPC_VERSION \
--ccnet_version=$VERSION_CCNET \
--seafile_version=$VERSION_SEAFILE \
--version=$VERSION \
--thirdpartdir=$THIRDPARTYFOLDER \
--srcdir=$SCRIPTPATH/$PKGSOURCEDIR \
--outputdir=$SCRIPTPATH/$PKGDIR \
--mysql_config=$MYSQL \
--yes
}
install_dependencies
build_mariadb
build_libevhtp
export_python_path
build_searpc
build_ccnet
build_seafile
build_seahub
build_seafobj
build_seafdav
copy_pkg_source
build_server
Good day, could you re-post it. The links no longer work. I will be very grateful.
Hi, all.
I have build a docker image for seafile aarch64, and the Dockerfile and build script was at github repo:
hanwckf/seafile-aarch64-docker
hanwckf/seafile-aarch64-build
It use docker-compose to deploy, the usage is quite the same as the official seafile x86 docker version.
In the light of ARM gaining popularity, especially with cloud providers like AWS offering (Graviton) ARM-based options, this is becoming more interesting than ever. Does the above still apply for later version of Seafile like v9.x ?
Have a look here: https://github.com/haiwen/seafile-rpi
There also the official docker image which is built for arm64 since Seafile 9.