diff --git a/lang/python/django-formtools/Makefile b/lang/python/django-formtools/Makefile new file mode 100644 index 000000000..d6bcc252f --- /dev/null +++ b/lang/python/django-formtools/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-formtools +PKG_VERSION:=2.1 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4a/86/ccbb8225dec0621f99f7e19f3dea0a629f1e41bd99fd58ac3e2f388e028f +PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/django-formtools + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=A set of high-level abstractions for Django forms + URL:=https://django-formtools.readthedocs.io/en/latest/ + DEPENDS:=+python +django +endef + +define Package/django-formtools/description + Django "formtools" is a set of high-level abstractions for Django forms. + Currently for form previews and multi-step forms. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-formtools/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-formtools)) diff --git a/lang/python/django-ranged-response/Makefile b/lang/python/django-ranged-response/Makefile new file mode 100644 index 000000000..34c32ae60 --- /dev/null +++ b/lang/python/django-ranged-response/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-ranged-response +PKG_VERSION:=0.2.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/70/e3/9372fcdca8e9c3205e7979528ccd1a14354a9a24d38efff11c1846ff8bf1 +PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985 + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/django-ranged-response + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=Modified Django FileResponse that adds Content-Range headers. + URL:=https://github.com/wearespindle/django-ranged-fileresponse + DEPENDS:=+python +django +endef + +define Package/django-ranged-response/description + Modified Django FileResponse that adds Content-Range headers. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-ranged-response/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-ranged-response)) diff --git a/lang/python/django-simple-captcha/Makefile b/lang/python/django-simple-captcha/Makefile new file mode 100644 index 000000000..f9b04520c --- /dev/null +++ b/lang/python/django-simple-captcha/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-simple-captcha +PKG_VERSION:=0.5.9 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/d7/f4/ea95b04ed3abc7bf225716f17e35c5a185f6100db4d7541a46696ce40351 +PKG_HASH:=0c30a14f02502119fd1a4d308dd5d2b899d0f4284825a396bbb010afd904754a + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/django-simple-captcha + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=A very simple, yet powerful, Django captcha application + URL:=https://github.com/mbi/django-simple-captcha + DEPENDS:=+python +python-six +django +pillow +django-ranged-response +endef + +define Package/django-simple-captcha/description + Django Simple Captcha is an extremely simple, yet highly customizable Django + application to add captcha images to any Django form. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-simple-captcha/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-simple-captcha)) diff --git a/lang/python/django-webpack-loader/Makefile b/lang/python/django-webpack-loader/Makefile new file mode 100644 index 000000000..0b15ccf69 --- /dev/null +++ b/lang/python/django-webpack-loader/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=django-webpack-loader +PKG_VERSION:=0.6.0 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/ff/0f/e812908c5dcc7c8cac5beba2cddd14bbfe045496117b3d306a71b19fc828 +PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520 + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/django-webpack-loader + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=Transparently use webpack with django + URL:=https://github.com/owais/django-webpack-loader + DEPENDS:=+python +django +endef + +define Package/django-webpack-loader/description + Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/django-webpack-loader/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,django-webpack-loader)) diff --git a/lang/python/pyjwt/Makefile b/lang/python/pyjwt/Makefile new file mode 100644 index 000000000..d2f7f4182 --- /dev/null +++ b/lang/python/pyjwt/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyjwt +PKG_VERSION:=1.6.4 +PKG_RELEASE:=1 +PKG_LICENSE:=MIT + +PKG_SOURCE:=PyJWT-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/00/5e/b358c9bb24421e6155799d995b4aa3aa3307ffc7ecae4ad9d29fd7e07a73 +PKG_HASH:=4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176 +PKG_BUILD_DIR:=$(BUILD_DIR)/PyJWT-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/pyjwt + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=JSON Web Token implementation in Python + URL:=http://github.com/jpadilla/pyjwt + DEPENDS:=+python +endef + +define Package/pyjwt/description + A Python implementation of RFC 7519. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/pyjwt/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyjwt)) diff --git a/lang/python/python-certifi/Makefile b/lang/python/python-certifi/Makefile new file mode 100644 index 000000000..28d2bd0dc --- /dev/null +++ b/lang/python/python-certifi/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-certifi +PKG_VERSION:=2018.4.16 +PKG_RELEASE:=1 +PKG_LICENSE:=MPL-2.0 + +PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d +PKG_HASH:=13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7 +PKG_BUILD_DIR:=$(BUILD_DIR)/certifi-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-certifi + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=Python package for providing Mozilla's CA Bundle. + URL:=http://certifi.io/ + DEPENDS:=+python +endef + +define Package/python-certifi/description + Certifi is a carefully curated collection of Root Certificates for validating the + trustworthiness of SSL certificates while verifying the identity of TLS hosts. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-certifi/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-certifi)) diff --git a/lang/python/python-oauthlib/Makefile b/lang/python/python-oauthlib/Makefile new file mode 100644 index 000000000..ac5ef5a20 --- /dev/null +++ b/lang/python/python-oauthlib/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-oauthlib +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853 +PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162 +PKG_BUILD_DIR:=$(BUILD_DIR)/oauthlib-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-oauthlib + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=A generic, spec-compliant, thorough implementation of the OAuth request-signing logic + URL:=https://github.com/oauthlib/oauthlib + DEPENDS:=+python +endef + +define Package/python-oauthlib/description + A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-oauthlib/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-oauthlib)) diff --git a/lang/python/python-qrcode/Makefile b/lang/python/python-qrcode/Makefile new file mode 100644 index 000000000..cb026a702 --- /dev/null +++ b/lang/python/python-qrcode/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-qrcode +PKG_VERSION:=6.0 +PKG_RELEASE:=1 +PKG_LICENSE:=BSD-3-Clause + +PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41 +PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf +PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-qrcode + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=QR Code image generator + URL:=https://github.com/lincolnloop/python-qrcode + DEPENDS:=+python +python-six +endef + +define Package/python-qrcode/description + Pure python QR Code generator +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-qrcode/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-qrcode)) diff --git a/lang/python/python-requests-oauthlib/Makefile b/lang/python/python-requests-oauthlib/Makefile new file mode 100644 index 000000000..618925faf --- /dev/null +++ b/lang/python/python-requests-oauthlib/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-requests-oauthlib +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 +PKG_LICENSE:=ISC + +PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205 +PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f +PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-requests-oauthlib + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=OAuthlib authentication support for Requests. + URL:=https://github.com/requests/requests-oauthlib + DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +pyjwt +endef + +define Package/python-requests-oauthlib/description + This project provides first-class OAuth library support for Requests. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-requests-oauthlib/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-requests-oauthlib)) diff --git a/lang/python/python-requests/Makefile b/lang/python/python-requests/Makefile new file mode 100644 index 000000000..e48271d02 --- /dev/null +++ b/lang/python/python-requests/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-requests +PKG_VERSION:=2.19.1 +PKG_RELEASE:=1 +PKG_LICENSE:=Apache-2.0 + +PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9 +PKG_HASH:=ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a +PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk + +define Package/python-requests + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + MAINTAINER:=Eneas U de Queiroz + TITLE:=HTTP library for Python + URL:=http://python-requests.org/ + DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi +endef + +define Package/python-requests/description + Requests is the only Non-GMO HTTP library for Python, safe for human consumption. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-requests/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-requests)) diff --git a/libs/libsearpc/Makefile b/libs/libsearpc/Makefile index b6cba6624..e2ed5806a 100644 --- a/libs/libsearpc/Makefile +++ b/libs/libsearpc/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsearpc -PKG_VERSION:=6.2.2 +PKG_VERSION:=3.0.8 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=8998e7b2c5587f0b94c48db24e2952d08def5add +PKG_SOURCE_VERSION:=12a01268825e9c7e17794c58c367e3b4db912ad9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=207baa1fc63a60c117cf4985b60a18212b151fa070f208621633c3b53ab679bf +PKG_MIRROR_HASH:=8ca4785c4d276afeac212a26a143b22e45b85cf196c1218e4630f6072a33f430 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/net/seafile-ccnet/Makefile b/net/seafile-ccnet/Makefile index 64603ed8f..beda03459 100644 --- a/net/seafile-ccnet/Makefile +++ b/net/seafile-ccnet/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=seafile-ccnet -PKG_VERSION:=6.2.2 +PKG_VERSION:=6.3.0 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/ccnet-server.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=6b9d7e2920aa9b807f9efe9038439b57ce949ecc +PKG_SOURCE_VERSION:=614926b161623b267b4fb77fa1861718da406103 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=8aed6d2283ac7b3148f9b5c82b1d992ed36dc5193000cf727bdcfae7446ce1fe +PKG_MIRROR_HASH:=843660e05809e6a6e076cf4d5ea3a6aad65b9b03aa1eaa3b4d980a314e7aed61 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -34,7 +34,7 @@ define Package/seafile-ccnet DEPENDS:=+libsearpc +libevent2 +libopenssl \ +glib2 +python +libzdb +libuuid \ +libpthread +libsqlite3 +jansson $(ICONV_DEPENDS) - EXTRA_DEPENDS:=libsearpc (=6.2.2-8998e7b2c5587f0b94c48db24e2952d08def5add-1) + EXTRA_DEPENDS:=libsearpc (=3.0.8-12a01268825e9c7e17794c58c367e3b4db912ad9-1) endef define Package/seafile-ccnet/description diff --git a/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch b/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch new file mode 100644 index 000000000..df8e9906a --- /dev/null +++ b/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch @@ -0,0 +1,153 @@ +From afeb62f01ad6e610cd19dcde0ceffc018b3247ec Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Wed, 6 Jun 2018 18:05:33 -0300 +Subject: [PATCH] Remove API deprecated in openssl 1.1 + +With openssl 1.1, we do not call OpenSSL_add_all_algorithms(), as +library initialization is done automatically. +Functions RAND_pseudo_bytes and RSA_generate_key were deprecated as +well. +Also, we need to #include for BN_num_bytes(). + +Signed-off-by: Eneas U de Queiroz +--- + lib/rsa.c | 19 ++++++++++++++----- + net/common/processors/keepalive-proc.c | 4 ++-- + net/common/processors/keepalive2-proc.c | 2 +- + net/common/processors/sendsessionkey-proc.c | 2 +- + net/common/processors/sendsessionkey-v2-proc.c | 2 +- + net/server/user-mgr.c | 4 ++++ + tools/ccnet-init.c | 2 ++ + 7 files changed, 25 insertions(+), 10 deletions(-) + +diff --git a/lib/rsa.c b/lib/rsa.c +index 7cca150..23abb82 100644 +--- a/lib/rsa.c ++++ b/lib/rsa.c +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -207,9 +208,17 @@ RSA * + generate_private_key(u_int bits) + { + RSA *private = NULL; +- +- private = RSA_generate_key(bits, 35, NULL, NULL); +- if (private == NULL) +- g_error ("rsa_generate_private_key: key generation failed."); +- return private; ++ BIGNUM *e = NULL; ++ ++ private = RSA_new(); ++ e = BN_new(); ++ if (private == NULL || e == NULL || !BN_set_word(e, 35) || ++ !RSA_generate_key_ex(private, bits, e, NULL)) { ++ RSA_free(private); ++ BN_free(e); ++ g_error ("rsa_generate_private_key: key generation failed."); ++ return NULL; ++ } ++ BN_free(e); ++ return private; + } +diff --git a/net/common/processors/keepalive-proc.c b/net/common/processors/keepalive-proc.c +index 609d102..42a0c23 100644 +--- a/net/common/processors/keepalive-proc.c ++++ b/net/common/processors/keepalive-proc.c +@@ -401,7 +401,7 @@ static void send_challenge(CcnetProcessor *processor) + unsigned char *buf; + int len; + +- RAND_pseudo_bytes (priv->random_buf, 40); ++ RAND_bytes (priv->random_buf, 40); + buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); + ccnet_processor_send_update (processor, "311", NULL, (char *)buf, len); + +@@ -434,7 +434,7 @@ static void send_challenge_user(CcnetProcessor *processor, CcnetUser *user) + + ccnet_debug ("[Keepalive] Send user challenge to %.8s\n", + processor->peer->id); +- RAND_pseudo_bytes (priv->random_buf, 40); ++ RAND_bytes (priv->random_buf, 40); + buf = public_key_encrypt (user->pubkey, priv->random_buf, 40, &len); + ccnet_processor_send_update (processor, "321", NULL, (char *)buf, len); + +diff --git a/net/common/processors/keepalive2-proc.c b/net/common/processors/keepalive2-proc.c +index d3e799e..d81c266 100644 +--- a/net/common/processors/keepalive2-proc.c ++++ b/net/common/processors/keepalive2-proc.c +@@ -306,7 +306,7 @@ static void send_challenge(CcnetProcessor *processor) + unsigned char *buf; + int len; + +- RAND_pseudo_bytes (priv->random_buf, 40); ++ RAND_bytes (priv->random_buf, 40); + buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); + if (len < 0) { + ccnet_debug ("[Keepalive] Failed to encrypt challenge " +diff --git a/net/common/processors/sendsessionkey-proc.c b/net/common/processors/sendsessionkey-proc.c +index 3ec2757..10c3340 100644 +--- a/net/common/processors/sendsessionkey-proc.c ++++ b/net/common/processors/sendsessionkey-proc.c +@@ -124,7 +124,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p) + unsigned char random_buf[40]; + SHA_CTX s; + +- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); ++ RAND_bytes (random_buf, sizeof(random_buf)); + + SHA1_Init (&s); + SHA1_Update (&s, random_buf, sizeof(random_buf)); +diff --git a/net/common/processors/sendsessionkey-v2-proc.c b/net/common/processors/sendsessionkey-v2-proc.c +index c1c6924..4805ba6 100644 +--- a/net/common/processors/sendsessionkey-v2-proc.c ++++ b/net/common/processors/sendsessionkey-v2-proc.c +@@ -125,7 +125,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p) + unsigned char random_buf[40]; + SHA_CTX s; + +- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); ++ RAND_bytes (random_buf, sizeof(random_buf)); + + SHA1_Init (&s); + SHA1_Update (&s, random_buf, sizeof(random_buf)); +diff --git a/net/server/user-mgr.c b/net/server/user-mgr.c +index 0973959..3f0c3b3 100644 +--- a/net/server/user-mgr.c ++++ b/net/server/user-mgr.c +@@ -811,9 +811,13 @@ hash_password_pbkdf2_sha256 (const char *passwd, + char salt_str[SHA256_DIGEST_LENGTH*2+1]; + + if (!RAND_bytes (salt, sizeof(salt))) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L + ccnet_warning ("Failed to generate salt " + "with RAND_bytes(), use RAND_pseudo_bytes().\n"); + RAND_pseudo_bytes (salt, sizeof(salt)); ++#else ++ ccnet_warning ("Failed to generate salt with RAND_bytes().\n"); ++#endif + } + + PKCS5_PBKDF2_HMAC (passwd, strlen(passwd), +diff --git a/tools/ccnet-init.c b/tools/ccnet-init.c +index 4748962..28c9995 100644 +--- a/tools/ccnet-init.c ++++ b/tools/ccnet-init.c +@@ -162,7 +162,9 @@ main(int argc, char **argv) + + config_dir = ccnet_expand_path (config_dir); + /* printf("[conf_dir=%s\n]", config_dir); */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_algorithms(); ++#endif + + if (RAND_status() != 1) { /* it should be seeded automatically */ + fprintf(stderr, "PRNG is not seeded\n"); +-- +2.16.4 + diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile index 2cf27aef1..b6ad37cd9 100644 --- a/net/seafile-seahub/Makefile +++ b/net/seafile-seahub/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=seafile-seahub -PKG_VERSION:=6.2.2 +PKG_VERSION:=6.3.0 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=Apache-2.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/seahub.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=120e7a299e77968f1af48ea2dcf4bd9b909c426f +PKG_SOURCE_VERSION:=d1ab146a936a6ea1e1581bf3f194e86742f0d3cd PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=511500c40dd7b1009f77109c6df810df1cf2c17a84a8f6841d592a9e05d22064 +PKG_MIRROR_HASH:=21c2ed3886d0c87853f9720704b14c0a0dce8215e7346af775e306f80b29fa0d include $(INCLUDE_DIR)/package.mk include ../../lang/python/python-package.mk @@ -29,9 +29,11 @@ define Package/seafile-seahub MAINTAINER:=Gergely Kiss URL:=http://seafile.com/ DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \ - +django-compressor +django-constance +django-jsonfield +django-picklefield \ - +django-postoffice +django-restframework +django-statici18n +et_xmlfile \ - +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql +pytz +rcssmin + +django-compressor +django-constance +django-formtools +django-jsonfield \ + +django-picklefield +django-postoffice +django-restframework \ + +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \ + +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \ + +python-qrcode +python-requests +python-requests-oauthlib +pytz +rcssmin endef define Build/Configure diff --git a/net/seafile-seahub/patches/010-default-config.patch b/net/seafile-seahub/patches/010-default-config.patch index 4168dc15f..b439495a4 100644 --- a/net/seafile-seahub/patches/010-default-config.patch +++ b/net/seafile-seahub/patches/010-default-config.patch @@ -1,7 +1,6 @@ -diff -rupN seahub-3.1.7-server.orig/seahub/settings.py seahub-3.1.7-server/seahub/settings.py ---- seahub-3.1.7-server.orig/seahub/settings.py 2014-10-20 09:32:35.000000000 +0200 -+++ seahub-3.1.7-server/seahub/settings.py 2014-12-10 15:47:21.625104606 +0100 -@@ -46,7 +46,7 @@ SITE_ID = 1 +--- a/seahub/settings.py ++++ b/seahub/settings.py +@@ -47,7 +47,7 @@ SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. @@ -10,8 +9,8 @@ diff -rupN seahub-3.1.7-server.orig/seahub/settings.py seahub-3.1.7-server/seahu # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale. -@@ -209,7 +209,7 @@ SHOW_REPO_DOWNLOAD_BUTTON = False - REPO_PASSWORD_MIN_LENGTH = 8 +@@ -310,7 +310,7 @@ SHARE_LINK_EMAIL_LANGUAGE = '' + ENABLE_UPLOAD_LINK_VIRUS_CHECK = False # mininum length for user's password -USER_PASSWORD_MIN_LENGTH = 6 @@ -19,12 +18,12 @@ diff -rupN seahub-3.1.7-server.orig/seahub/settings.py seahub-3.1.7-server/seahu # LEVEL based on four types of input: # num, upper letter, lower letter, other symbols -@@ -218,7 +218,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3 +@@ -319,7 +319,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3 # default False, only check USER_PASSWORD_MIN_LENGTH # when True, check password strength level, STRONG(or above) is allowed -USER_STRONG_PASSWORD_REQUIRED = False +USER_STRONG_PASSWORD_REQUIRED = True - # Using server side crypto by default, otherwise, let user choose crypto method. - FORCE_SERVER_CRYPTO = True + # Force user to change password when admin add/reset a user. + FORCE_PASSWORD_CHANGE = True diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch index efae34d13..35f4f93fe 100644 --- a/net/seafile-seahub/patches/020-Makefile-fixes.patch +++ b/net/seafile-seahub/patches/020-Makefile-fixes.patch @@ -1,6 +1,5 @@ -diff -rupN seafile-seahub-6.2.2.orig/Makefile seafile-seahub-6.2.2/Makefile ---- seafile-seahub-6.2.2.orig/Makefile 2017-10-22 22:28:22.000000000 +0200 -+++ seafile-seahub-6.2.2/Makefile 2017-10-22 22:46:18.007470936 +0200 +--- a/Makefile ++++ b/Makefile @@ -1,3 +1,6 @@ +include $(TOPDIR)/rules.mk +include $(TOPDIR)/feeds/packages/lang/python/python-package.mk @@ -8,18 +7,16 @@ diff -rupN seafile-seahub-6.2.2.orig/Makefile seafile-seahub-6.2.2/Makefile PROJECT=seahub develop: setup-git -@@ -9,7 +12,9 @@ dist: locale uglify statici18n collectst +@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectst locale: @echo "--> Compile locales" -- django-admin.py compilemessages && cd seahub/two_factor && django-admin.py compilemessages -+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages) -+ cd seahub/two_factor +- django-admin.py compilemessages + $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages) @echo "" uglify: -@@ -19,17 +24,17 @@ uglify: +@@ -19,17 +22,17 @@ uglify: statici18n: @echo "--> Generate JS locale files in static/scripts/i18n" diff --git a/net/seafile-server/Makefile b/net/seafile-server/Makefile index 12b2b2c47..69b1d4ca9 100644 --- a/net/seafile-server/Makefile +++ b/net/seafile-server/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=seafile-server -PKG_VERSION:=6.2.2 +PKG_VERSION:=6.3.0 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 PKG_LICENSE:=GPL-3.0 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haiwen/seafile-server.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=6978d2cb2e05cc774370b4d06c9f0a864df71936 +PKG_SOURCE_VERSION:=a8c66e1bc6f6245e48917f39a24167d22a95dbd6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=99aa9c41641d7c0ffe18bbab75418b1347dd9e156124472bbee5a6dda09a8057 +PKG_MIRROR_HASH:=d63667f8cddcac645fb0d350c71e2a32d0c44f47df46a3a013d2dbecb3574d9a PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -34,7 +34,7 @@ define Package/seafile-server DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \ +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \ +libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS) - EXTRA_DEPENDS:=seafile-ccnet (=6.2.2-6b9d7e2920aa9b807f9efe9038439b57ce949ecc-1), seafile-seahub (=6.2.2-120e7a299e77968f1af48ea2dcf4bd9b909c426f-1) + EXTRA_DEPENDS:=seafile-ccnet (=6.3.0-614926b161623b267b4fb77fa1861718da406103-1), seafile-seahub (=6.3.0-d1ab146a936a6ea1e1581bf3f194e86742f0d3cd-1) MENU:=1 endef diff --git a/net/seafile-server/patches/020-script-patches.patch b/net/seafile-server/patches/020-script-patches.patch index 585784dd4..dcbf82c0d 100644 --- a/net/seafile-server/patches/020-script-patches.patch +++ b/net/seafile-server/patches/020-script-patches.patch @@ -1,6 +1,5 @@ -diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh ---- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200 +--- a/scripts/seaf-fsck.sh ++++ b/scripts/seaf-fsck.sh @@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") TOPDIR=$(dirname "${INSTALLPATH}") default_ccnet_conf_dir=${TOPDIR}/ccnet @@ -10,9 +9,8 @@ diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/s export PATH=${INSTALLPATH}/seafile/bin:$PATH export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} -diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh ---- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200 +--- a/scripts/seaf-gc.sh ++++ b/scripts/seaf-gc.sh @@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") TOPDIR=$(dirname "${INSTALLPATH}") default_ccnet_conf_dir=${TOPDIR}/ccnet @@ -22,9 +20,8 @@ diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scr seaf_gc_opts="" export PATH=${INSTALLPATH}/seafile/bin:$PATH -diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh ---- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200 +--- a/scripts/setup-seafile-mysql.sh ++++ b/scripts/setup-seafile-mysql.sh @@ -40,15 +40,10 @@ function check_python_executable() { function check_python_module () { module=$1 @@ -65,10 +62,9 @@ diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-serv export PYTHON=$PYTHON +export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH" - exec $PYTHON "$python_script" -diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh ---- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200 -+++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200 + exec $PYTHON "$python_script" "$@" +--- a/scripts/sqlite2mysql.sh ++++ b/scripts/sqlite2mysql.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash diff --git a/net/seafile-server/patches/060-timestamps-as-int64.patch b/net/seafile-server/patches/060-timestamps-as-int64.patch index 5e655d839..4f51ade6c 100644 --- a/net/seafile-server/patches/060-timestamps-as-int64.patch +++ b/net/seafile-server/patches/060-timestamps-as-int64.patch @@ -1,7 +1,6 @@ -diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo.vala ---- seafile-server-5.1.1.orig/lib/repo.vala 2016-04-19 15:44:32.000000000 +0200 -+++ seafile-server-5.1.1/lib/repo.vala 2016-04-25 21:29:33.327962235 +0200 -@@ -30,7 +30,7 @@ public class Repo : Object { +--- a/lib/repo.vala ++++ b/lib/repo.vala +@@ -34,7 +34,7 @@ public class Repo : Object { // data format version public int version { get; set; } @@ -9,8 +8,8 @@ diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo + public int64 last_modify { get; set; } public int64 size { get; set; } public int64 file_count { get; set; } - public string head_cmmt_id { get; set; } -@@ -40,7 +40,7 @@ public class Repo : Object { + public string last_modifier { get; set; } +@@ -45,7 +45,7 @@ public class Repo : Object { public string repo_id { get; set; } public string repo_name { get; set; } public string repo_desc { get; set; } @@ -19,7 +18,7 @@ diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo // Section 2: Encryption related // Members in this section should be set for every Repo object -@@ -63,7 +63,7 @@ public class Repo : Object { +@@ -68,7 +68,7 @@ public class Repo : Object { get { return _relay_id; } set { _relay_id = value; } } @@ -28,7 +27,7 @@ diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo public bool auto_sync { get; set; } public bool worktree_invalid { get; set; } -@@ -155,7 +155,7 @@ public class DeletedEntry : Object { +@@ -162,7 +162,7 @@ public class DeletedEntry : Object { public string obj_name { get; set; } public string basedir { get; set; } public int mode { get; set; } diff --git a/net/seafile-server/patches/080-Remove-API-deprecated-in-openssl-1.1.patch b/net/seafile-server/patches/080-Remove-API-deprecated-in-openssl-1.1.patch new file mode 100644 index 000000000..0e4272632 --- /dev/null +++ b/net/seafile-server/patches/080-Remove-API-deprecated-in-openssl-1.1.patch @@ -0,0 +1,35 @@ +From 13f95a28ce12216ba51cf0ca8d61c3d89689d02b Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Wed, 6 Jun 2018 18:11:47 -0300 +Subject: [PATCH] Remove API deprecated in openssl 1.1 + +Openssl 1.1 has deprecated RAND_pseudo_bytes. It won't compile with +openssl built witout deprecated API. + +Signed-off-by: Eneas U de Queiroz +--- + common/seafile-crypt.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/common/seafile-crypt.c b/common/seafile-crypt.c +index c7d1702..c3cebf5 100644 +--- a/common/seafile-crypt.c ++++ b/common/seafile-crypt.c +@@ -81,9 +81,14 @@ seafile_generate_random_key (const char *passwd, char *random_key) + + int rc = RAND_bytes (secret_key, sizeof(secret_key)); + if (rc != 1) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L + seaf_warning ("Failed to generate secret key for repo encryption " + "with RAND_bytes(), use RAND_pseudo_bytes().\n"); + RAND_pseudo_bytes (secret_key, sizeof(secret_key)); ++#else ++ seaf_warning ("Failed to generate secret key for repo encryption " ++ "with RAND_bytes().\n"); ++#endif + } + + seafile_derive_key (passwd, strlen(passwd), 2, key, iv); +-- +2.16.4 + diff --git a/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch b/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch new file mode 100644 index 000000000..86a448202 --- /dev/null +++ b/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch @@ -0,0 +1,32 @@ +From 25dcf165f77c94f758383d35632293d69666d0ad Mon Sep 17 00:00:00 2001 +From: cuihaikuo +Date: Thu, 7 Jun 2018 11:56:44 +0800 +Subject: [PATCH] Fix that table SystemInfo can't be created in sqlite db. + +--- + server/seafile-session.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/server/seafile-session.c b/server/seafile-session.c +index 76d9c12..2a1fc0c 100644 +--- a/server/seafile-session.c ++++ b/server/seafile-session.c +@@ -424,9 +424,17 @@ create_system_default_repo (void *data) + void + schedule_create_system_default_repo (SeafileSession *session) + { +- char *sql = "CREATE TABLE IF NOT EXISTS SystemInfo " ++ int db_type = seaf_db_type (session->db); ++ char *sql; ++ ++ if (db_type == SEAF_DB_TYPE_MYSQL) ++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo " + "(id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, " + "info_key VARCHAR(256), info_value VARCHAR(1024))"; ++ else ++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo( " ++ "info_key VARCHAR(256), info_value VARCHAR(1024))"; ++ + if (seaf_db_query (session->db, sql) < 0) + return; + diff --git a/net/seafile-server/patches/100-seafile-admin-Make-sure-ccnet-is-running.patch b/net/seafile-server/patches/100-seafile-admin-Make-sure-ccnet-is-running.patch new file mode 100644 index 000000000..a665e4528 --- /dev/null +++ b/net/seafile-server/patches/100-seafile-admin-Make-sure-ccnet-is-running.patch @@ -0,0 +1,26 @@ +--- a/tools/seafile-admin ++++ b/tools/seafile-admin +@@ -831,7 +831,22 @@ def setup_seafile(args): + conf[CONF_SEAFILE_CENTRAL_CONF_DIR] = os.path.join(cwd, 'conf') + config_ccnet_seafile() + init_ccnet_seafile() +- init_seahub() ++ ++ # make sure ccnet-server is running to avoid an error creating django superuser ++ if not is_running('ccnet-server'): ++ argv = [ ++ 'ccnet-server', ++ '-F', ++ conf[CONF_SEAFILE_CENTRAL_CONF_DIR], ++ '-c', ++ conf[CONF_CCNET_DIR], ++ '-d' ++ ] ++ run_argv(argv) ++ init_seahub() ++ pkill('ccnet-server') ++ else: ++ init_seahub() + + print + print '-----------------------------------------------------------------'