Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seafile-server: fix install, django 1.11 patch, enhance seafile-seahub version dependency #8442

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

cotequeiroz
Copy link
Member

@cotequeiroz cotequeiroz commented Mar 18, 2019

Maintainer: @kissg1988
Compile tested: mvebu, wrt3200acm, openwrt master
Run tested: mvebu, wrt3200acm, openwrt master, tested basic file creation/upload/download, using web interface.

Description:
Current package does not get installed because it pulls up an incorrect seafile-seahub release, resulting in:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for seafile-server:
 *      seafile-seahub (= 6.3.4-1)
 * opkg_install_cmd: Cannot install package seafile-server.

Added a build-time check in seafile-server to error out if the versions don't match, instead of a static install-time check.

Django 1.11 is supported (required?), see https://manual.seafile.com/changelog/server-changelog.html), but the current patch does not fix a bug in the seafile-admin script that causes it to still look for v. 1.8. Replaced current patch for django-1.11 with the patch from haiwen/seafile-server#147, which fixes this, avoiding this error message when setting up:

*** Installation completed, running configuration script...
-----------------------------------------------------------------
This script will guide you to config and setup your seafile server.
Make sure you have read seafile server manual at

        https://github.com/haiwen/seafile/wiki

Press [ENTER] to continue
-----------------------------------------------------------------


check python modules ...
Error: Django 1.8 is required

Cleaned up unsupported configure options, including riak backend, for which we don't have a package. Here's the build message:

configure: WARNING: unrecognized options: --disable-nls, --disable-client, --enable-server, --disable-static-build, --disable-server-pkg, --disable-riak

Notice that you can try to build the riak backend by defining RIAK_BACKEND in CFLAGS. However, it would fail to build since we don't package the riak client library (or anything that installs riak-client.h).

Signed-off-by: Eneas U de Queiroz [email protected]

@neheb
Copy link
Contributor

neheb commented Mar 18, 2019

Thank you for looking into this. I had a change like this before but never got around to posting it.

@neheb
Copy link
Contributor

neheb commented Mar 18, 2019

MariaDB seems to be failing compilation. ping @micmac1

@micmac1
Copy link
Contributor

micmac1 commented Mar 18, 2019 via email

@neheb
Copy link
Contributor

neheb commented Mar 18, 2019

The issue is wrongly attributed to mariadb. It's an issue with tools/xz. I will prepare a patch.

@micmac1
Copy link
Contributor

micmac1 commented Mar 18, 2019 via email

@yousong
Copy link
Member

yousong commented Mar 19, 2019

grep -C1 -E ':[0-9]+: .* failed' build_2052_step_105_container_0.txt seems to indicate it's python-dateutil

mv: cannot stat '/home/build/build_dir/staging_dir/hostpkg/lib/libreadline.a': No such file or directory
Makefile:254: recipe for target 'install-static' failed
make[3]: [install-static] Error 1 (ignored)
--
--
mv: cannot stat '/home/build/build_dir/staging_dir/hostpkg/lib/libhistory.a': No such file or directory
Makefile:254: recipe for target 'install-static' failed
make[3]: [install-static] Error 1 (ignored)
--
--
timsort.h: In function 'libxml_domnode_tim_sort':
timsort.h:487:21: warning: inlining failed in call to 'PUSH_NEXT': call is unlikely and code size would grow [-Winline]
 static __inline int PUSH_NEXT(SORT_TYPE *dst,
--
--
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timsort.h:487:21: warning: inlining failed in call to 'PUSH_NEXT': call is unlikely and code size would grow [-Winline]
 static __inline int PUSH_NEXT(SORT_TYPE *dst,
--
--
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timsort.h:487:21: warning: inlining failed in call to 'PUSH_NEXT': call is unlikely and code size would grow [-Winline]
 static __inline int PUSH_NEXT(SORT_TYPE *dst,
--
--
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timsort.h:487:21: warning: inlining failed in call to 'PUSH_NEXT': call is unlikely and code size would grow [-Winline]
 static __inline int PUSH_NEXT(SORT_TYPE *dst,
--
--
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timsort.h:487:21: warning: inlining failed in call to 'PUSH_NEXT': call is unlikely and code size would grow [-Winline]
 static __inline int PUSH_NEXT(SORT_TYPE *dst,
--
--
rm: cannot remove '/home/build/build_dir/staging_dir/hostpkg/lib/python3.7/lib-dynload/__pycache__': No such file or directory
Makefile:1553: recipe for target 'sharedinstall' failed
make[3]: [sharedinstall] Error 1 (ignored)
--
--
find /home/build/build_dir/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/packages -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | xargs -r rm -rf
Makefile:63: recipe for target 'compile' failed
make[2]: [compile] Error 1 (ignored)
--
--
mv: cannot stat '/home/build/build_dir/build_dir/target-mips_24kc_musl/readline-8.0/ipkg-install/usr/lib/libreadline.a': No such file or directory
Makefile:254: recipe for target 'install-static' failed
make[3]: [install-static] Error 1 (ignored)
--
--
mv: cannot stat '/home/build/build_dir/build_dir/target-mips_24kc_musl/readline-8.0/ipkg-install/usr/lib/libhistory.a': No such file or directory
Makefile:254: recipe for target 'install-static' failed
make[3]: [install-static] Error 1 (ignored)
--
--
make[4]: texi2dvi: Command not found
Makefile:354: recipe for target 'libext2fs.dvi' failed
make[4]: [libext2fs.dvi] Error 127 (ignored)
--
--
/usr/bin/install: cannot change ownership of '/home/build/build_dir/build_dir/target-mips_24kc_musl/krb5-1.17/ipkg-install/usr/bin/ksu': Operation not permitted
Makefile:673: recipe for target 'install' failed
make[5]: [install] Error 1 (ignored)
--
--
rm: cannot remove '/home/build/build_dir/build_dir/target-mips_24kc_musl/Python-3.7.2/ipkg-install/usr/lib/python3.7/lib-dynload/__pycache__': No such file or directory
Makefile:1553: recipe for target 'sharedinstall' failed
make[3]: [sharedinstall] Error 1 (ignored)
--
--
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
Makefile:59: recipe for target '/home/build/build_dir/build_dir/target-mips_24kc_musl/python3-dateutil-2.7.5/.built' failed
make[2]: *** [/home/build/build_dir/build_dir/target-mips_24kc_musl/python3-dateutil-2.7.5/.built] Error 1
--
--
time: package/feeds/packages/python-dateutil/python3/compile#0.74#0.05#0.96
package/Makefile:107: recipe for target 'package/feeds/packages/python-dateutil/compile' failed
make[1]: *** [package/feeds/packages/python-dateutil/compile] Error 2
--
--
make[1]: Leaving directory '/home/build/build_dir'
/home/build/build_dir/include/toplevel.mk:209: recipe for target 'package/seafile-server/compile' failed
make: *** [package/seafile-server/compile] Error 2

@neheb
Copy link
Contributor

neheb commented Mar 19, 2019

@yousong ah looks like you're right.

Download error on https://pypi.org/simple/setuptools_scm/: invalid protocol version -- Some packages may not be found!
Download error on https://pypi.org/simple/setuptools-scm/: invalid protocol version -- Some packages may not be found!

This is fixed by #8412 as well as #8436

@cotequeiroz cotequeiroz force-pushed the seafile-server_tidy branch from 80799cb to 35d9be9 Compare March 19, 2019 11:04
@cotequeiroz
Copy link
Member Author

I've rebased it just to check if the #8436 merge fixed it, and it works now.

ifeq ($(SEAHUB_CUR_VERSION),$(PKG_VERSION))
EXTRA_DEPENDS:=seafile-seahub (=$(SEAHUB_CUR_VERSION)-$(SEAHUB_CUR_RELEASE))
else
EXTRA_DEPENDS:=seafile-seahub (=$(PKG_VERSION)-$(PKG_RELEASE))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic I used is: try to get current PKG_VERSION and PKG_RELEASE from seafile-seahub Makefile. Use them if the versions match. If not, use the version & release of seafile-seahub. Historically, the versions have always matched.

If I am reading it right, you want to always use version of seafile-seahub no matter what ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. What I really wanted was to both match the same version, regardless of release number. I've tried:

EXTRA_DEPENDS:=seafile-seahub (=$(PKG_VERSION))
EXTRA_DEPENDS:=seafile-seahub (=$(PKG_VERSION)-*)
EXTRA_DEPENDS:=seafile-seahub (>=$(PKG_VERSION)-1 <=$(PKG_VERSION)-999999)

and

EXTRA_DEPENDS:=seafile-seahub (>=$(PKG_VERSION)-1) seafile-seahub ( <=$(PKG_VERSION)-999999)

I'll drop this. Now that I'm giving this extra thought, it won't work because when *seahub increases release, *server's needs to be increased as well, and we're not doing it. I'll drop it, and add a comment in *seahub's Makefile that this needs to match. It's the best.

@@ -24,6 +24,9 @@ include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python-package.mk

SEAHUB_CUR_VERSION:=$(shell egrep '^PKG_VERSION[ :]*=' ../seafile-seahub/Makefile | sed 's/PKG_VERSION.*=[ ]*//')
SEAHUB_CUR_RELEASE:=$(shell egrep '^PKG_RELEASE[ :]*=' ../seafile-seahub/Makefile | sed 's/PKG_RELEASE.*=[ ]*//')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just $(error xxx) if seafile-seahub version does not match that of seafile-server

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave the matching logic, and error out if they don't match. Compile-time errors are a lot easier to catch than install-time errors.
Thanks for the review.

@cotequeiroz cotequeiroz force-pushed the seafile-server_tidy branch 5 times, most recently from 42d232d to 8498d24 Compare March 20, 2019 21:30
@cotequeiroz cotequeiroz changed the title seafile-server: fix install, django 1.11 patch seafile-server: fix install, django 1.11 patch, seafile-seahub depend version; seafile-seahub: document need for version sync Mar 21, 2019
@cotequeiroz cotequeiroz changed the title seafile-server: fix install, django 1.11 patch, seafile-seahub depend version; seafile-seahub: document need for version sync seafile-server: fix install, django 1.11 patch, enhance seafile-seahub version dependency Mar 21, 2019
@@ -33,7 +47,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-seahub (=6.3.4-1)
EXTRA_DEPENDS:=seafile-seahub (=$(SEAHUB_VERSION_RELEASE))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we drop the version specific depends?

I think it's reasonable to assume that "opkg install seafile-server` pulls packages from the same repo, or users themselves are responsible for the versions of server and hub when install .ipk files manually. With that assumption, we just need to make sure at build time that the two packages are compatible by comparing major.minor versions, leaving out numbers of bugfix and revision. Less maintain details and more flexibility for the user

Copy link
Member Author

@cotequeiroz cotequeiroz Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that. I'll make the change when able.

@yousong yousong self-assigned this Mar 25, 2019
@cotequeiroz cotequeiroz force-pushed the seafile-server_tidy branch 2 times, most recently from fa94651 to 913d797 Compare March 25, 2019 21:37
@yousong
Copy link
Member

yousong commented Mar 28, 2019

Hi @cotequeiroz , please either keep them as 2 commits each with its own version bump, or squash them as a single tidy up. Thank you.

Django 1.11 is supported, but seafile-admin was still looking for v. 1.8.
Replaced current patch with the patch from haiwen/seafile-server#147.

Cleaned up unsupported configure options, including riak backend.

Check that the seafile-server version is the same as seafile-seanet's at
build time, removing the static EXTRA_DEPENDS check done at install
time.

Signed-off-by: Eneas U de Queiroz <[email protected]>
@cotequeiroz cotequeiroz force-pushed the seafile-server_tidy branch from 913d797 to 46a0979 Compare March 28, 2019 17:17
@cotequeiroz
Copy link
Member Author

I choose a single commit.

@yousong yousong merged commit fcfaea5 into openwrt:master Mar 29, 2019
@yousong
Copy link
Member

yousong commented Mar 29, 2019

Thank you!

@cotequeiroz cotequeiroz deleted the seafile-server_tidy branch July 10, 2019 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants