From f3fde18904f6c6a4a8461fafa5c0a1f99afbfe77 Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Mon, 20 Jun 2022 21:12:15 +0200 Subject: [PATCH 1/7] Upgrade to seafile 9.0.5 --- README.md | 16 ++++++++-------- build-batch.sh | 11 +++++++---- build.sh | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 93f1ce6..0a388a8 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ Seafile server package for Raspberry Pi. Maintained by seafile community. ## Build -E.g. to compile Seafile server v9.0.2: +E.g. to compile Seafile server v9.0.5: ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build.sh $ chmod u+x build.sh -$ ./build.sh -DTA -v 9.0.2 +$ ./build.sh -DTA -v 9.0.5 ``` Calling `./build.sh` without arguments will return usage information and a list of all available arguments: ```shell @@ -35,15 +35,15 @@ Usage: -A All options -1 to -8 in one go -v Set seafile server version to build - default: 9.0.2 + default: 9.0.5 -r Set libsearpc version default: 3.2-latest -f Set fixed libsearpc version default: 3.1.0 -h Set python requirement file for seahub - default: https://raw.githubusercontent.com/haiwen/seahub/v9.0.2-server/requirements.txt + default: https://raw.githubusercontent.com/haiwen/seahub/v9.0.5-server/requirements.txt -d Set python requirement file for seafdav - default: https://raw.githubusercontent.com/haiwen/seafdav/v9.0.2-server/requirements.txt + default: https://raw.githubusercontent.com/haiwen/seafdav/v9.0.5-server/requirements.txt use --version for version info of this script. ``` @@ -55,9 +55,9 @@ seafile@rpi-focal:~$ tree . -L 3 ├── build.sh ├── build-server.py.patch ├── built-seafile-server-pkgs -│   └── seafile-server-9.0.2-focal-armv7l.tar.gz +│   └── seafile-server-9.0.5-focal-armv7l.tar.gz ├── built-seafile-sources -│   └── R9.0.2 +│   └── R9.0.5 ├── go │   └── pkg ├── haiwen-build @@ -78,7 +78,7 @@ If you want to build for multiple distributions and architectures via lxc contai ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build-batch.sh $ chmod u+x build-batch.sh -$ time bash ./build-batch.sh 9.0.2 +$ time bash ./build-batch.sh 9.0.5 ``` Edit the script in order to build for your preferred distributions. diff --git a/build-batch.sh b/build-batch.sh index b195ac7..d65263c 100644 --- a/build-batch.sh +++ b/build-batch.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version which needs to be build -VERSION=${1:-'9.0.2'} +VERSION=${1:-'9.0.5'} echo "Get the current build script" wget -O build.sh https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build.sh @@ -11,10 +11,10 @@ chmod u+x build.sh sysArch=$(arch) [ "$sysArch" == "aarch64" ] && archhfName='armv8l' || archhfName='armv7l' -declare -A lxcDistroMap=(["stretch"]="debian/9/" ["buster"]="debian/10/" ["bullseye"]="debian/11/" ["bionic"]="ubuntu/18.04/" ["focal"]="ubuntu/20.04/" ["hirsute"]="ubuntu/21.04/" ["impish"]="ubuntu/21.10/") +declare -A lxcDistroMap=(["bullseye"]="debian/11/" ["buster"]="debian/10/" ["stretch"]="debian/9/" ["jammy"]="ubuntu/22.04/" ["hirsute"]="ubuntu/21.04/" ["focal"]="ubuntu/20.04/" ["bionic"]="ubuntu/18.04/") # Assign the distros which need to be build -configLxcDistros=("hirsute" "focal" "bionic" "bullseye" "buster") +configLxcDistros=("jammy" "focal" "bionic" "bullseye" "buster") configLxcArchs=("armhf") if [[ "$sysArch" == "aarch64" ]]; then # Only add arm64 if system supports it @@ -58,6 +58,9 @@ for container in ${lxcContainers[@]}; do sudo lxc exec $container -- /bin/bash -c "echo 'seafile ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo" fi + echo "Upgrade container packages: $container" + sudo lxc exec $container -- apt-get update && apt-get -y upgrade + echo "Building for container: $container" sudo lxc file push build.sh $container/home/seafile/ @@ -67,7 +70,7 @@ for container in ${lxcContainers[@]}; do sleep .5 done echo -e "\e[1A\e[KNetwork available in $container"; - sudo lxc exec $container -- su - seafile -- ./build.sh -D -A -v $VERSION + sudo lxc exec $container -- su - seafile -- ./build.sh -DTA -v $VERSION filename=$(sudo lxc exec $container -- bash -c "ls /home/seafile/built-seafile-server-pkgs/seafile-server-$VERSION-*.tar.gz" 2>/dev/null) sudo lxc file pull "$container$filename" ./ diff --git a/build.sh b/build.sh index 49e02cd..eb0b63f 100755 --- a/build.sh +++ b/build.sh @@ -22,7 +22,7 @@ PREFIX="${HOME}/opt/local" LIBSEARPC_VERSION_LATEST="3.2-latest" # check if new tag is available on https://github.com/haiwen/libsearpc/releases LIBSEARPC_VERSION_FIXED="3.1.0" # libsearpc sticks to 3.1.0 https://github.com/haiwen/libsearpc/commit/43d768cf2eea6afc6e324c2b1a37a69cd52740e3 -VERSION="9.0.2" +VERSION="9.0.5" VERSION_SEAFILE="6.0.1" # dummy version for seafile (see configure.ac) MYSQL_CONFIG_PATH="/usr/bin/mysql_config" # ensure compilation with mysql support From c2f17f72b6d0a7500350effb99c9de4f8ae10205 Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Wed, 29 Jun 2022 08:08:26 +0200 Subject: [PATCH 2/7] feat: Add custom seahub and seafdav requirements (closes #99, closes #113) --- README.md | 14 +++++++--- build-batch.sh | 2 +- build.sh | 2 +- requirements/README.md | 4 +++ requirements/seafdav_requirements_v9.0.5.txt | 10 ++++++++ requirements/seahub_requirements_v9.0.5.txt | 27 ++++++++++++++++++++ 6 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 requirements/README.md create mode 100644 requirements/seafdav_requirements_v9.0.5.txt create mode 100644 requirements/seahub_requirements_v9.0.5.txt diff --git a/README.md b/README.md index 0a388a8..ce08583 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,15 @@ Seafile server package for Raspberry Pi. Maintained by seafile community. ## Build E.g. to compile Seafile server v9.0.5: + ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build.sh $ chmod u+x build.sh -$ ./build.sh -DTA -v 9.0.5 +$ ./build.sh -DTA -v 9.0.5 -h https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seahub_requirements_v9.0.5.txt -d https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seafdav_requirements_v9.0.5.txt ``` + Calling `./build.sh` without arguments will return usage information and a list of all available arguments: + ```shell seafile@rpi-focal:~$ ./build.sh @@ -49,6 +52,7 @@ Usage: ``` Schema of created directory structure after execution of `./build.sh`: + ``` seafile@rpi-focal:~$ tree . -L 3 . @@ -75,11 +79,13 @@ seafile@rpi-focal:~$ tree . -L 3 ## Batch Build If you want to build for multiple distributions and architectures via lxc containers you can run: + ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build-batch.sh $ chmod u+x build-batch.sh $ time bash ./build-batch.sh 9.0.5 ``` + Edit the script in order to build for your preferred distributions. ## Manual and Guides @@ -89,9 +95,11 @@ Edit the script in order to build for your preferred distributions. ## Reporting Issues / GitHub Issues -If you have any problems or suggestions when using the seafile rpi server package, please report it on [seafile server forum](https://forum.seafile.com/). +If you have any problems or suggestions when using the seafile rpi server package, please report it +on [seafile server forum](https://forum.seafile.com/). -**GitHub Issues support is dropped** and will not be maintained anymore. If you need help, clarification or report some weird behaviour, please post it on the [seafile server forum](https://forum.seafile.com/) as well. +**GitHub Issues support is dropped** and will not be maintained anymore. If you need help, clarification or report some +weird behaviour, please post it on the [seafile server forum](https://forum.seafile.com/) as well. ## Contributors diff --git a/build-batch.sh b/build-batch.sh index d65263c..4628346 100644 --- a/build-batch.sh +++ b/build-batch.sh @@ -70,7 +70,7 @@ for container in ${lxcContainers[@]}; do sleep .5 done echo -e "\e[1A\e[KNetwork available in $container"; - sudo lxc exec $container -- su - seafile -- ./build.sh -DTA -v $VERSION + sudo lxc exec $container -- su - seafile -- ./build.sh -DTA -v $VERSION -h https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seahub_requirements_v${VERSION}.txt -d https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seafdav_requirements_v${VERSION}.txt filename=$(sudo lxc exec $container -- bash -c "ls /home/seafile/built-seafile-server-pkgs/seafile-server-$VERSION-*.tar.gz" 2>/dev/null) sudo lxc file pull "$container$filename" ./ diff --git a/build.sh b/build.sh index eb0b63f..1961b0f 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/bash [[ "$1" =~ ^(--version)$ ]] && { - echo "2022-04-21"; + echo "2022-06-29"; exit 0 }; diff --git a/requirements/README.md b/requirements/README.md new file mode 100644 index 0000000..4401846 --- /dev/null +++ b/requirements/README.md @@ -0,0 +1,4 @@ +# Requirements + +Updated dependencies for [Seahub](https://github.com/haiwen/seahub/blob/master/requirements.txt) +and [Seafdav](https://github.com/haiwen/seafdav/blob/master/requirements.txt). diff --git a/requirements/seafdav_requirements_v9.0.5.txt b/requirements/seafdav_requirements_v9.0.5.txt new file mode 100644 index 0000000..249a9d8 --- /dev/null +++ b/requirements/seafdav_requirements_v9.0.5.txt @@ -0,0 +1,10 @@ +defusedxml~=0.5 +Jinja2~=2.10 +json5~=0.8.5 +python-pam~=1.8 +PyYAML~=5.1 +six~=1.13 +lxml +sqlalchemy +# input from @wsirhc see https://github.com/haiwen/seafile-rpi/issues/113 +markupsafe==2.0.1 diff --git a/requirements/seahub_requirements_v9.0.5.txt b/requirements/seahub_requirements_v9.0.5.txt new file mode 100644 index 0000000..bdf61bc --- /dev/null +++ b/requirements/seahub_requirements_v9.0.5.txt @@ -0,0 +1,27 @@ +# See: https://github.com/haiwen/seafile-rpi/issues/99#issuecomment-1002535579 +Django<4 +future +captcha +django-statici18n +django-webpack_loader==0.7.0 +gunicorn +mysqlclient +django-picklefield>=2.1.1 +openpyxl +qrcode +django-formtools>=2.3 +django-simple-captcha +djangorestframework>=3.11.1 +python-dateutil +requests +pillow +pyjwt>=2.1.* +pycryptodome>=3.12.0 +requests_oauthlib +chardet +python-cas +djangosaml2>=0.20.0 +pysaml2>=6.5.1 +cffi>=1.14.0 +# input from @nihilistaX see https://github.com/haiwen/seafile-rpi/issues/99 +cryptography==36.0.0 From 295205362f8695977c20f067f4e9366119de2c41 Mon Sep 17 00:00:00 2001 From: Thibaud Franchetti Date: Wed, 9 Nov 2022 20:47:05 +0100 Subject: [PATCH 3/7] Update to v9.0.9 --- README.md | 16 +++++------ build-batch.sh | 2 +- build.sh | 4 +-- requirements/seafdav_requirements_v9.0.9.txt | 10 +++++++ requirements/seahub_requirements_v9.0.9.txt | 29 ++++++++++++++++++++ 5 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 requirements/seafdav_requirements_v9.0.9.txt create mode 100644 requirements/seahub_requirements_v9.0.9.txt diff --git a/README.md b/README.md index ce08583..02eda01 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ Seafile server package for Raspberry Pi. Maintained by seafile community. ## Build -E.g. to compile Seafile server v9.0.5: +E.g. to compile Seafile server v9.0.9: ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build.sh $ chmod u+x build.sh -$ ./build.sh -DTA -v 9.0.5 -h https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seahub_requirements_v9.0.5.txt -d https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seafdav_requirements_v9.0.5.txt +$ ./build.sh -DTA -v 9.0.9 -h https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seahub_requirements_v9.0.9.txt -d https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seafdav_requirements_v9.0.9.txt ``` Calling `./build.sh` without arguments will return usage information and a list of all available arguments: @@ -38,15 +38,15 @@ Usage: -A All options -1 to -8 in one go -v Set seafile server version to build - default: 9.0.5 + default: 9.0.9 -r Set libsearpc version default: 3.2-latest -f Set fixed libsearpc version default: 3.1.0 -h Set python requirement file for seahub - default: https://raw.githubusercontent.com/haiwen/seahub/v9.0.5-server/requirements.txt + default: https://raw.githubusercontent.com/haiwen/seahub/v9.0.9-server/requirements.txt -d Set python requirement file for seafdav - default: https://raw.githubusercontent.com/haiwen/seafdav/v9.0.5-server/requirements.txt + default: https://raw.githubusercontent.com/haiwen/seafdav/v9.0.9-server/requirements.txt use --version for version info of this script. ``` @@ -59,9 +59,9 @@ seafile@rpi-focal:~$ tree . -L 3 ├── build.sh ├── build-server.py.patch ├── built-seafile-server-pkgs -│   └── seafile-server-9.0.5-focal-armv7l.tar.gz +│   └── seafile-server-9.0.9-focal-armv7l.tar.gz ├── built-seafile-sources -│   └── R9.0.5 +│   └── R9.0.9 ├── go │   └── pkg ├── haiwen-build @@ -83,7 +83,7 @@ If you want to build for multiple distributions and architectures via lxc contai ```shell $ wget https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build-batch.sh $ chmod u+x build-batch.sh -$ time bash ./build-batch.sh 9.0.5 +$ time bash ./build-batch.sh 9.0.9 ``` Edit the script in order to build for your preferred distributions. diff --git a/build-batch.sh b/build-batch.sh index 4628346..171ca11 100644 --- a/build-batch.sh +++ b/build-batch.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version which needs to be build -VERSION=${1:-'9.0.5'} +VERSION=${1:-'9.0.9'} echo "Get the current build script" wget -O build.sh https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build.sh diff --git a/build.sh b/build.sh index 1961b0f..f9ecf6f 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/bash [[ "$1" =~ ^(--version)$ ]] && { - echo "2022-06-29"; + echo "2022-11-09"; exit 0 }; @@ -22,7 +22,7 @@ PREFIX="${HOME}/opt/local" LIBSEARPC_VERSION_LATEST="3.2-latest" # check if new tag is available on https://github.com/haiwen/libsearpc/releases LIBSEARPC_VERSION_FIXED="3.1.0" # libsearpc sticks to 3.1.0 https://github.com/haiwen/libsearpc/commit/43d768cf2eea6afc6e324c2b1a37a69cd52740e3 -VERSION="9.0.5" +VERSION="9.0.9" VERSION_SEAFILE="6.0.1" # dummy version for seafile (see configure.ac) MYSQL_CONFIG_PATH="/usr/bin/mysql_config" # ensure compilation with mysql support diff --git a/requirements/seafdav_requirements_v9.0.9.txt b/requirements/seafdav_requirements_v9.0.9.txt new file mode 100644 index 0000000..249a9d8 --- /dev/null +++ b/requirements/seafdav_requirements_v9.0.9.txt @@ -0,0 +1,10 @@ +defusedxml~=0.5 +Jinja2~=2.10 +json5~=0.8.5 +python-pam~=1.8 +PyYAML~=5.1 +six~=1.13 +lxml +sqlalchemy +# input from @wsirhc see https://github.com/haiwen/seafile-rpi/issues/113 +markupsafe==2.0.1 diff --git a/requirements/seahub_requirements_v9.0.9.txt b/requirements/seahub_requirements_v9.0.9.txt new file mode 100644 index 0000000..1fdca25 --- /dev/null +++ b/requirements/seahub_requirements_v9.0.9.txt @@ -0,0 +1,29 @@ +# See: https://github.com/haiwen/seafile-rpi/issues/99#issuecomment-1002535579 +Django<4 +future +captcha +django-statici18n +django-webpack_loader==0.7.0 +gunicorn +mysqlclient +django-picklefield>=2.1.1 +openpyxl +qrcode +django-formtools>=2.3 +django-simple-captcha +djangorestframework>=3.11.1 +python-dateutil +requests +pillow +pyjwt>=2.1.* +pycryptodome>=3.12.0 +requests_oauthlib +chardet +python-cas +djangosaml2>=0.20.0 +pysaml2>=6.5.1 +cffi>=1.14.0 +# input from @nihilistaX see https://github.com/haiwen/seafile-rpi/issues/99 +cryptography==36.0.0 +Markdown +bleach From 27a92bb1c5468cb8714293184da81a3a4ac33a3b Mon Sep 17 00:00:00 2001 From: Thibaud Franchetti Date: Wed, 9 Nov 2022 20:49:57 +0100 Subject: [PATCH 4/7] Update to libsearpc 3.3-latest --- README.md | 2 +- build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02eda01..b0d302a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Usage: -v Set seafile server version to build default: 9.0.9 -r Set libsearpc version - default: 3.2-latest + default: 3.3-latest -f Set fixed libsearpc version default: 3.1.0 -h Set python requirement file for seahub diff --git a/build.sh b/build.sh index f9ecf6f..3c93a35 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ PREFIX="${HOME}/opt/local" # Temporary folder for seafile-server dependency builds for shared libraries (ld) # see https://github.com/haiwen/seahub/blob/eab3ba2f6d3a311728130d8752c716e782b8d62e/scripts/build/build-server.py#L324 -LIBSEARPC_VERSION_LATEST="3.2-latest" # check if new tag is available on https://github.com/haiwen/libsearpc/releases +LIBSEARPC_VERSION_LATEST="3.3-latest" # check if new tag is available on https://github.com/haiwen/libsearpc/releases LIBSEARPC_VERSION_FIXED="3.1.0" # libsearpc sticks to 3.1.0 https://github.com/haiwen/libsearpc/commit/43d768cf2eea6afc6e324c2b1a37a69cd52740e3 VERSION="9.0.9" VERSION_SEAFILE="6.0.1" # dummy version for seafile (see configure.ac) From 8030460386ec0e29438683dd346d6ecaf8fe886f Mon Sep 17 00:00:00 2001 From: Thibaud Franchetti Date: Wed, 9 Nov 2022 20:59:12 +0100 Subject: [PATCH 5/7] Remove upstream merged patch See haiwen/seahub#5073 --- build-server.py.patch | 107 ------------------------------------------ build.sh | 6 --- 2 files changed, 113 deletions(-) delete mode 100644 build-server.py.patch diff --git a/build-server.py.patch b/build-server.py.patch deleted file mode 100644 index 74b979e..0000000 --- a/build-server.py.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff --git a/scripts/build/build-server.py b/scripts/build/build-server.py -index a479b6c75..ad60b4d46 100755 ---- a/scripts/build/build-server.py -+++ b/scripts/build/build-server.py -@@ -25,6 +25,7 @@ import subprocess - import optparse - import atexit - import platform -+import distro - - #################### - ### Global variables -@@ -539,6 +540,15 @@ def copy_user_manuals(): - for path in glob.glob(src_pattern): - must_copy(path, dst_dir) - -+# copy go_fileserver "fileserver" to directory seafile-server/seafile/bin -+def copy_go_fileserver(): -+ builddir = conf[CONF_BUILDDIR] -+ srcdir = conf[CONF_SRCDIR] -+ src_go_fileserver = os.path.join(srcdir, 'fileserver') -+ dst_bin_dir = os.path.join(builddir, 'seafile-server', 'seafile', 'bin') -+ -+ must_copy(src_go_fileserver, dst_bin_dir) -+ - def copy_seafdav(): - dst_dir = os.path.join(conf[CONF_BUILDDIR], 'seafile-server', 'seahub', 'thirdpart') - tarball = os.path.join(conf[CONF_SRCDIR], 'seafdav.tar.gz') -@@ -556,7 +566,8 @@ def copy_scripts_and_libs(): - - ''' - builddir = conf[CONF_BUILDDIR] -- scripts_srcdir = os.path.join(builddir, Seafile().projdir, 'scripts') -+ src_seahubdir = Seahub().projdir -+ scripts_srcdir = os.path.join(builddir, src_seahubdir, 'scripts') - serverdir = os.path.join(builddir, 'seafile-server') - - must_copy(os.path.join(scripts_srcdir, 'setup-seafile.sh'), -@@ -589,7 +600,7 @@ def copy_scripts_and_libs(): - error('failed to copy upgrade scripts: %s' % e) - - # copy sql scripts -- sql_scriptsdir = os.path.join(scripts_srcdir, 'sql') -+ sql_scriptsdir = os.path.join(Seafile().projdir, 'scripts', 'sql') - dst_sql_scriptsdir = os.path.join(serverdir, 'sql') - try: - shutil.copytree(sql_scriptsdir, dst_sql_scriptsdir) -@@ -603,7 +614,6 @@ def copy_scripts_and_libs(): - runtimedir) - - # move seahub to seafile-server/seahub -- src_seahubdir = Seahub().projdir - dst_seahubdir = os.path.join(serverdir, 'seahub') - try: - shutil.move(src_seahubdir, dst_seahubdir) -@@ -622,6 +632,9 @@ def copy_scripts_and_libs(): - copy_shared_libs() - copy_user_manuals() - -+ # copy go_fileserver -+ copy_go_fileserver() -+ - def copy_pdf2htmlex(): - '''Copy pdf2htmlEX exectuable and its dependent libs''' - pdf2htmlEX_executable = find_in_path('pdf2htmlEX') -@@ -785,10 +798,14 @@ def create_tarball(tarball_name): - excludes_list = [ '--exclude=%s' % pattern for pattern in ignored_patterns ] - excludes = ' '.join(excludes_list) - -- tar_cmd = 'tar czf %(tarball_name)s %(versioned_serverdir)s %(excludes)s' \ -+ # tar will copy the content the directory python3.[0-9]+/ to python3/ -+ transform = '--transform=\'s,python3\.[0-9]\+/,python3/,\'' -+ -+ tar_cmd = 'tar czf %(tarball_name)s %(transform)s %(versioned_serverdir)s %(excludes)s' \ - % dict(tarball_name=tarball_name, - versioned_serverdir=versioned_serverdir, -- excludes=excludes) -+ excludes=excludes, -+ transform=transform) - - if run(tar_cmd) < 0: - error('failed to generate the tarball') -@@ -806,17 +823,20 @@ def gen_tarball(): - # 32-bit: seafile-server_1.2.2_i386.tar.gz - version = conf[CONF_VERSION] - arch = os.uname()[-1].replace('_', '-') -- if 'arm' in platform.machine(): -- arch = 'pi' -+ if 'arm' in platform.machine() or 'aarch64' in platform.machine(): -+ arch = platform.machine() - elif arch != 'x86-64': - arch = 'i386' - -+ # determine linux distribution -+ distribution = distro.codename().replace(' ', '-').lower() -+ - dbg = '' - if conf[CONF_NO_STRIP]: - dbg = '.dbg' - -- tarball_name = 'seafile-server_%(version)s_%(arch)s%(dbg)s.tar.gz' \ -- % dict(version=version, arch=arch, dbg=dbg) -+ tarball_name = 'seafile-server-%(version)s-%(distribution)s-%(arch)s%(dbg)s.tar.gz' \ -+ % dict(version=version, distribution=distribution, arch=arch, dbg=dbg) - dst_tarball = os.path.join(conf[CONF_OUTPUTDIR], tarball_name) - - # generate the tarball diff --git a/build.sh b/build.sh index 3c93a35..b048b42 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,6 @@ VERSION_TAG="v${VERSION}-server" LIBSEARPC_TAG="v${LIBSEARPC_VERSION_LATEST}" PYTHON_REQUIREMENTS_URL_SEAHUB="https://raw.githubusercontent.com/haiwen/seahub/${VERSION_TAG}/requirements.txt" # official requirements.txt file PYTHON_REQUIREMENTS_URL_SEAFDAV="https://raw.githubusercontent.com/haiwen/seafdav/${VERSION_TAG}/requirements.txt" -BUILD_SERVER_PATCH="https://raw.githubusercontent.com/haiwen/seafile-rpi/master/build-server.py.patch" STEPS=0 STEPCOUNTER=0 @@ -618,11 +617,6 @@ build_server() cd "${BUILDPATH}" mkmissingdir "${SCRIPTPATH}/${PKGDIR}" - msg "-> Copying current build-server.py.patch from GitHub to ${SCRIPTPATH}..." - (set -x; wget "${BUILD_SERVER_PATCH}" -O "${SCRIPTPATH}/build-server.py.patch") - - msg "-> Applying patch file from ${SCRIPTPATH}/build-server.py.patch..." - (set -x; patch -N -b "${BUILDPATH}/seahub/scripts/build/build-server.py" "${SCRIPTPATH}/build-server.py.patch") msg "-> Executing build-server.py" (set -x; python3 "${BUILDPATH}/seahub/scripts/build/build-server.py" \ --libsearpc_version="${LIBSEARPC_VERSION_FIXED}" \ From 951d201f87e67c9e2fdc10bb51e1351f40052058 Mon Sep 17 00:00:00 2001 From: Thibaud Franchetti Date: Wed, 16 Nov 2022 18:23:38 +0100 Subject: [PATCH 6/7] Update distro version --- build-batch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-batch.sh b/build-batch.sh index 171ca11..f1f120d 100644 --- a/build-batch.sh +++ b/build-batch.sh @@ -11,7 +11,7 @@ chmod u+x build.sh sysArch=$(arch) [ "$sysArch" == "aarch64" ] && archhfName='armv8l' || archhfName='armv7l' -declare -A lxcDistroMap=(["bullseye"]="debian/11/" ["buster"]="debian/10/" ["stretch"]="debian/9/" ["jammy"]="ubuntu/22.04/" ["hirsute"]="ubuntu/21.04/" ["focal"]="ubuntu/20.04/" ["bionic"]="ubuntu/18.04/") +declare -A lxcDistroMap=(["bullseye"]="debian/11/" ["buster"]="debian/10/" ["stretch"]="debian/9/" ["kinetic"]="ubuntu/22.10/" ["jammy"]="ubuntu/22.04/" ["focal"]="ubuntu/20.04/" ["bionic"]="ubuntu/18.04/") # Assign the distros which need to be build configLxcDistros=("jammy" "focal" "bionic" "bullseye" "buster") From e3661d0c7b87cab29ef219d0da0c6e3ea7baba8c Mon Sep 17 00:00:00 2001 From: Thibaud Franchetti Date: Wed, 16 Nov 2022 18:28:15 +0100 Subject: [PATCH 7/7] Update requirement files --- build-batch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-batch.sh b/build-batch.sh index f1f120d..bfede8e 100644 --- a/build-batch.sh +++ b/build-batch.sh @@ -70,7 +70,7 @@ for container in ${lxcContainers[@]}; do sleep .5 done echo -e "\e[1A\e[KNetwork available in $container"; - sudo lxc exec $container -- su - seafile -- ./build.sh -DTA -v $VERSION -h https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seahub_requirements_v${VERSION}.txt -d https://github.com/haiwen/seafile-rpi/blob/feat/master/requirements/seafdav_requirements_v${VERSION}.txt + sudo lxc exec $container -- su - seafile -- ./build.sh -DTA -v $VERSION -h https://raw.githubusercontent.com/haiwen/seafile-rpi/master/requirements/seahub_requirements_v${VERSION}.txt -d https://raw.githubusercontent.com/haiwen/seafile-rpi/master/requirements/seafdav_requirements_v${VERSION}.txt filename=$(sudo lxc exec $container -- bash -c "ls /home/seafile/built-seafile-server-pkgs/seafile-server-$VERSION-*.tar.gz" 2>/dev/null) sudo lxc file pull "$container$filename" ./