bump seafile-server + components to stable 7.0.5, stable libsearpc

- downgrade to the latest stable seafile-server
- switch to a stable libsearpc version
- adapt & backport libevhtp patch
This commit is contained in:
Trolli Schmittlauch 2019-10-18 01:19:43 +02:00
parent e84aeea8f1
commit e54c1770d1
3 changed files with 35 additions and 15 deletions

View file

@ -7,9 +7,9 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "haiwen"; owner = "haiwen";
repo = "libsearpc"; repo = "libsearpc";
rev = "v${version}"; #rev = "v${version}";
#rev = "v3.2-latest"; rev = "v3.1-latest";
sha256 = "sha256:1zf8xxsl95wdx0372kl8s153hd8q3lhwwvwr2k96ia8scbn2ylkp"; sha256 = "sha256:078r0bgncgadsv4v82kxmq2mvd19grssakjn0syrv61a96vmfyjj";
}; };
patches = [ ./libsearpc.pc.patch ]; patches = [ ./libsearpc.pc.patch ];

View file

@ -4,7 +4,7 @@
python27, python27Packages }: python27, python27Packages }:
let let
version = "7.1.0"; version = "7.0.5";
seafile-server-core = stdenv.mkDerivation rec { seafile-server-core = stdenv.mkDerivation rec {
name = "seafile-server-core"; name = "seafile-server-core";
inherit version; inherit version;
@ -12,7 +12,7 @@
owner = "haiwen"; owner = "haiwen";
repo = "seafile-server"; repo = "seafile-server";
rev = "v${version}-server"; rev = "v${version}-server";
sha256 = "sha256:0hmhd42mlcahlck95ixa74l9i4srv77aa1pjfg22wxdp1x45gim9"; sha256 = "sha256:1875qsdcy6lw0nkjqjg8qwahwqxm8iy02lw8012s5qp91jcg8gpl";
}; };
# patch to work with latest, non-vulnerable libevhtp # patch to work with latest, non-vulnerable libevhtp
patches = [ patches = [
@ -36,7 +36,7 @@
owner = "haiwen"; owner = "haiwen";
repo = "seahub"; repo = "seahub";
rev = "v${version}-server"; rev = "v${version}-server";
sha256 = "sha256:19f9279zqkfy39gs1qfaj0m8asva5jgadh8f0yln8ln4khsrcnk8"; sha256 = "sha256:04wy0cj76j8kwgnx6iqja5gpc3q661lcy64qpqf3bzi907bad6xp";
}; };
phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ]; phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];
installPhase = '' installPhase = ''
@ -75,7 +75,7 @@
owner = "haiwen"; owner = "haiwen";
repo = "ccnet-server"; repo = "ccnet-server";
rev = "v${version}-server"; rev = "v${version}-server";
sha256 = "sha256:11r80npg47xbkrak24lsv9f135p1hhmqwnn122nxnyidzs82fvm6"; sha256 = "sha256:0mi0d2b4jwg511r0pp2ws9cw8ab6njplwy2a03wn6zi8q8fpjl38";
}; };
buildInputs = [ vala libsearpc libuuid sqlite openssl libevent glib python27 ] buildInputs = [ vala libsearpc libuuid sqlite openssl libevent glib python27 ]

View file

@ -60,8 +60,16 @@ index 21f955a..0606b28 100755
send_error_reply (req, EVHTP_RES_BADREQ, err_msg); send_error_reply (req, EVHTP_RES_BADREQ, err_msg);
g_free (repo_id); g_free (repo_id);
@@ -2667,32 +2667,32 @@ upload_file_init (evhtp_t *htp, const char *http_temp_dir) diff --git a/server/upload-file.c b/server/upload-file.c
g_free (cluster_shared_dir); index 8dc6001..5233b50 100755
--- a/server/upload-file.c
+++ b/server/upload-file.c
@@ -2905,38 +2905,38 @@ upload_file_init (evhtp_t *htp, const char *http_temp_dir)
cb = evhtp_set_regex_cb (htp, "^/upload/.*", upload_cb, NULL);
/* upload_headers_cb() will be called after evhtp parsed all http headers. */
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL); cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); - evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
@ -82,6 +90,10 @@ index 21f955a..0606b28 100755
cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL); cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); - evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update/.*", update_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); + evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL); cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL);
@ -148,7 +160,16 @@ index c6fef89..78dece3 100644
PKG_CHECK_MODULES(SSL, [openssl]) PKG_CHECK_MODULES(SSL, [openssl])
AC_SUBST(SSL_CFLAGS) AC_SUBST(SSL_CFLAGS)
@@ -227,6 +229,14 @@ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED]) @@ -189,6 +189,8 @@ ZDB_REQUIRED=2.10
CURL_REQUIRED=7.17
FUSE_REQUIRED=2.7.3
ZLIB_REQUIRED=1.2.0
+LIBEVHTP_REQUIRED=1.2.16
+ONIGURUMA_REQUIRED=5.9.2
PKG_CHECK_MODULES(SSL, [openssl])
AC_SUBST(SSL_CFLAGS)
@@ -222,6 +224,14 @@ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS) AC_SUBST(ZLIB_LIBS)
@ -160,7 +181,6 @@ index c6fef89..78dece3 100644
+AC_SUBST(ONIGURUMA_CFLAGS) +AC_SUBST(ONIGURUMA_CFLAGS)
+AC_SUBST(ONIGURUMA_LIBS) +AC_SUBST(ONIGURUMA_LIBS)
+ +
if test "x${MYSQL_CONFIG}" = "xdefault_mysql_config"; then if test x${compile_python} = xyes; then
PKG_CHECK_MODULES(MYSQL, [mysqlclient], [have_mysql="yes"], [have_mysql="no"]) AM_PATH_PYTHON([2.6])
if test "x${have_mysql}" = "xyes"; then if test "$bwin32" = true; then
if test "x${have_mysql}" = "xyes"; then