Bug 193134 - [NEW PORT] net-mgmt/seafile: Framework for writing networked applications
Summary: [NEW PORT] net-mgmt/seafile: Framework for writing networked applications
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/haiwen/seafile
Keywords: patch
Depends on: 193131 193132 193133
Blocks: 193135 193312
  Show dependency treegraph
 
Reported: 2014-08-29 20:20 UTC by Jingfeng Yan
Modified: 2014-11-06 14:06 UTC (History)
2 users (show)

See Also:


Attachments
new port shar file (18.59 KB, application/x-shar)
2014-08-29 20:20 UTC, Jingfeng Yan
no flags Details
test port log (320.51 KB, text/plain)
2014-08-29 20:23 UTC, Jingfeng Yan
no flags Details
new port shar file (27.92 KB, application/x-shar)
2014-09-04 15:38 UTC, Jingfeng Yan
no flags Details
portlint -AC output (300 bytes, text/plain)
2014-09-06 13:48 UTC, Jingfeng Yan
no flags Details
diff to updated shar file (6.16 KB, patch)
2014-09-06 13:58 UTC, Jingfeng Yan
no flags Details | Diff
updated shar file (90.23 KB, application/x-shar)
2014-09-06 13:59 UTC, Jingfeng Yan
no flags Details
updated shar file (22.38 KB, application/x-shar)
2014-09-08 01:14 UTC, Jingfeng Yan
no flags Details
updated shar file (20.64 KB, text/plain)
2014-09-09 20:20 UTC, Jingfeng Yan
no flags Details
overall diff to 0922 shar (1.10 KB, patch)
2014-11-03 04:55 UTC, Jingfeng Yan
no flags Details | Diff
diff to 0922 shar file (5.05 KB, patch)
2014-11-03 05:41 UTC, Jingfeng Yan
no flags Details | Diff
test port log (284.56 KB, text/plain)
2014-11-03 05:43 UTC, Jingfeng Yan
no flags Details
updated shar file (19.27 KB, text/plain)
2014-11-03 05:43 UTC, Jingfeng Yan
no flags Details
diff to 0922 shar file (11.60 KB, patch)
2014-11-05 04:50 UTC, Jingfeng Yan
no flags Details | Diff
updated shar file (19.92 KB, text/plain)
2014-11-05 04:51 UTC, Jingfeng Yan
no flags Details
diff to 0922 shar file (11.66 KB, patch)
2014-11-06 04:15 UTC, Jingfeng Yan
no flags Details | Diff
portlint -AC log (392 bytes, text/plain)
2014-11-06 04:16 UTC, Jingfeng Yan
no flags Details
updated shar file (19.15 KB, text/plain)
2014-11-06 04:20 UTC, Jingfeng Yan
no flags Details
test port log (291.22 KB, text/plain)
2014-11-06 04:52 UTC, Jingfeng Yan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jingfeng Yan 2014-08-29 20:20:29 UTC
Created attachment 146505 [details]
new port shar file

Seafile is a next-generation open source cloud storage system with advanced
support for file syncing, privacy protection and teamwork.  Collections of
files are called libraries, and each library can be synced separately. A
library can be encrypted with a user chosen password. This password is not
stored on the server, so even the server admin cannot view a file's contents.

Seafile allows users to create groups with file syncing, wiki, and discussion
to enable easy collaboration around documents within a team.
Comment 1 Jingfeng Yan 2014-08-29 20:23:46 UTC
Created attachment 146506 [details]
test port log
Comment 2 Jingfeng Yan 2014-09-04 15:38:41 UTC
Created attachment 146794 [details]
new port shar file

- updated from 3.0.4 to 3.1.4, which is latest release version.
- fixed issue that desktop client can not connect to server.
- fixed one pkgconfig typo.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-06 02:56:47 UTC
Please update this patch according to review feedback in bug 193132 and bug 193133

Additionally,

Each individual port needs its own unique COMMENT, that make sense on their own, and together as a group. Please update them to suit, and then change each bug summary (title) to reflect the COMMENT
Comment 4 Jingfeng Yan 2014-09-06 13:48:56 UTC
Created attachment 146931 [details]
portlint -AC output

When I try not to specify .13 for liblibarchive.so, it will try to use system 
libarchive.so.5 under /usr/lib/libarchive, which causes some linkage issue.
Comment 5 Jingfeng Yan 2014-09-06 13:58:12 UTC
Created attachment 146932 [details]
diff to updated shar file
Comment 6 Jingfeng Yan 2014-09-06 13:59:39 UTC
Created attachment 146933 [details]
updated shar file
Comment 7 Jingfeng Yan 2014-09-08 01:14:40 UTC
Created attachment 147038 [details]
updated shar file
Comment 8 Jingfeng Yan 2014-09-09 20:20:32 UTC
Created attachment 147140 [details]
updated shar file

- delete one unused file in files/.  
- clean some comment out patch code.
Comment 9 John Marino freebsd_committer freebsd_triage 2014-10-27 15:36:43 UTC
I see two issues immediately:

1) install target suppresses all commands with "@".  Nope, just the mkdir commands are allowd to be suppressed.  We *want* these actions to be logged.

2) you refer to libevent2 but I don't see devel/libevent2 specified anywhere.  Can you explain that?
Comment 10 Jingfeng Yan 2014-10-27 15:50:02 UTC
(In reply to John Marino from comment #9)
> I see two issues immediately:
> 
> 1) install target suppresses all commands with "@".  Nope, just the mkdir
> commands are allowd to be suppressed.  We *want* these actions to be logged.
So, what you mean is that if I want to keep everything logged, I should remove "@" for anything else than "mkdir".  Am I right? 

> 2) you refer to libevent2 but I don't see devel/libevent2 specified
> anywhere.  Can you explain that?
It is involved by copy from my other ports.  It should be cleaned out.
Comment 11 John Marino freebsd_committer freebsd_triage 2014-10-27 15:54:38 UTC
(In reply to Jingfeng Yan from comment #10)
> (In reply to John Marino from comment #9)
> > I see two issues immediately:
> > 
> > 1) install target suppresses all commands with "@".  Nope, just the mkdir
> > commands are allowd to be suppressed.  We *want* these actions to be logged.
> So, what you mean is that if I want to keep everything logged, I should
> remove "@" for anything else than "mkdir".  Am I right? 

I mean "@" is wrong so it must be removed (with the exception of mkdir -- for those it's your preference but they are usually left with "@").  I was just explaining the rationale.


> 
> > 2) you refer to libevent2 but I don't see devel/libevent2 specified
> > anywhere.  Can you explain that?
> It is involved by copy from my other ports.  It should be cleaned out.

Okay, so please do that.
Comment 12 John Marino freebsd_committer freebsd_triage 2014-11-02 17:59:06 UTC
This can't be patch-ready if PRs that block it aren't patch-ready (or committed) themselves.  Plus this needs changing, moving to "open"
Comment 13 Jingfeng Yan 2014-11-03 04:55:12 UTC
Created attachment 148975 [details]
overall diff to 0922 shar
Comment 14 Jingfeng Yan 2014-11-03 05:40:16 UTC
Comment on attachment 148975 [details]
overall diff to 0922 shar

Index: Makefile
===================================================================
--- Makefile	(revision 25)
+++ Makefile	(working copy)
@@ -10,7 +10,7 @@
 LICENSE=	GPLv3

 BUILD_DEPENDS+=	valac:${PORTSDIR}/lang/vala
-LIB_DEPENDS+=	libsearpc.so:${PORTSDIR}/www/libsearpc \
+LIB_DEPENDS+=	libsearpc.so:${PORTSDIR}/devel/libsearpc \
 		libevhtp.so:${PORTSDIR}/www/libevhtp \
 		libzdb.so:${PORTSDIR}/databases/libzdb \
 		libcrypto.so:${PORTSDIR}/security/openssl \
@@ -38,8 +38,8 @@
 ACLOCAL_ARGS=	-I m4
 AUTOMAKE_ARGS=	--add-missing --gnu

-CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/event2
-LDFLAGS+=	-L${LOCALBASE}/lib -L${LOCALBASE}/lib/event2
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib

 MAKE_JOBS_UNSAFE=yes

@@ -55,37 +55,37 @@
 post-install:
 	@${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/bin
 	@${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile
-	@${INSTALL} -m 0755 ${WRKSRC}/doc/seafile-tutorial.doc \
+	${INSTALL} -m 0755 ${WRKSRC}/doc/seafile-tutorial.doc \
 			${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile/
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/fileserver \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/fileserver \
 		${STAGEDIR}${WWWDIR}/seafile/bin/fileserver
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafile-controller \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafile-controller \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller
-	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
+	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
 		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool
-	@${INSTALL} -m 0755 ${WRKSRC}/scripts/*.py \
+	${INSTALL} -m 0755 ${WRKSRC}/scripts/*.py \
 		${STAGEDIR}${WWWDIR}
-	@${INSTALL} -m 0755 ${WRKSRC}/scripts/*.sh \
+	${INSTALL} -m 0755 ${WRKSRC}/scripts/*.sh \
 		${STAGEDIR}${WWWDIR}
-	@${INSTALL} -d -m 0755 ${WRKSRC}/scripts/upgrade/ \
+	${INSTALL} -d -m 0755 ${WRKSRC}/scripts/upgrade/ \
 		${STAGEDIR}${WWWDIR}/upgrade
-	@${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*py \
+	${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*py \
 		${STAGEDIR}${WWWDIR}/upgrade
-	@${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*sh \
+	${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*sh \
 		${STAGEDIR}${WWWDIR}/upgrade
-	@${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \
+	${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \
 		${STAGEDIR}${WWWDIR}/upgrade/sql/

 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 19)
+++ pkg-plist	(working copy)
@@ -94,34 +94,3 @@
 %%WWWDIR%%/upgrade/upgrade_2.1_2.2.sh
 %%WWWDIR%%/upgrade/upgrade_2.2_3.0.sh
 %%WWWDIR%%/upgrade/upgrade_3.0_3.1.sh
-@dirrmtry include/seafile
-@dirrmtry %%PYTHON_SITELIBDIR%%/seafile
-@dirrmtry %%PYTHON_SITELIBDIR%%/seaserv
-%%PORTDOCS%%@dirrmtry %%WWWDIR%%/seafile/%%DOCSDIR%%
-@dirrmtry %%WWWDIR%%/seafile/share/doc
-@dirrmtry %%WWWDIR%%/seafile/share
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/mysql
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/sqlite3
-@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0
-@dirrmtry %%WWWDIR%%/upgrade/sql
-@dirrmtry %%WWWDIR%%/upgrade
Comment 15 Jingfeng Yan 2014-11-03 05:41:08 UTC
Created attachment 148977 [details]
diff to 0922 shar file
Comment 16 Jingfeng Yan 2014-11-03 05:43:28 UTC
Created attachment 148978 [details]
test port log
Comment 17 Jingfeng Yan 2014-11-03 05:43:52 UTC
Created attachment 148979 [details]
updated shar file
Comment 18 John Marino freebsd_committer freebsd_triage 2014-11-03 06:42:41 UTC
okay, "@${MKDIR} -m 0755" needs to be just "@${MKDIR}"

"${INSTALL} -m 0755 ${WRKSRC}/doc/seafile-tutorial.doc"  (for example)
this is wrong too.
first, it's installing this as executable.
secondly, you need to use an install macro, e.g.

${INSTALL_PROGRAM}
${INSTALL_DATA}
${INSTALL_MAN}
${INSTALL_SCRIPT}

used INSTALL_DATA for non-executable, INSTALL_PROGRAM for executables that can be stripped, INSTALL_SCRIPT for executables that can't be stripped (e.g. bourne shell scripts)

search /usr/ports/Mk/bsd.port.mk for documentation about these commands if you need more info.
Comment 19 John Marino freebsd_committer freebsd_triage 2014-11-03 06:53:14 UTC
by the way, you don't use "-m" arguments with those INSTALL_* macros...
Comment 20 John Marino freebsd_committer freebsd_triage 2014-11-03 07:47:18 UTC
okay, see these lines:

X		libccnet.so:${PORTSDIR}/www/ccnet
XRUN_DEPENDS=	ccnet-server:${PORTSDIR}/www/ccnet \
X		ccnet-init:${PORTSDIR}/www/ccnet \

You don't need to define RUN_DEPENDS when the port is already set for LIB_DEPENDS (LIB_DEPENDS automatically sets run depends)

So this would change to:

X		libccnet.so:${PORTSDIR}/net-mgmt/ccnet

(reflects the new category for ccnet)
Comment 21 John Marino freebsd_committer freebsd_triage 2014-11-03 07:49:23 UTC
for these lines:

XBUILD_DEPENDS+=	valac:${PORTSDIR}/lang/vala
XLIB_DEPENDS+=	libsearpc.so:${PORTSDIR}/devel/libsearpc \


use "=" not "+=".  It is the first time you are defining this.  Only use "+=" if it's possible that the variable is already defined and you want to augment it.
Comment 22 John Marino freebsd_committer freebsd_triage 2014-11-03 08:08:26 UTC
change lines like these from

X-#ifdef __linux__
X+#if defined(__linux__) || defined(__FreeBSD__)

to

X-#ifdef __linux__
X+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)

(everywhere you add __FreeBSD__ also check for __DragonFly__ )




XCATEGORIES=	www

That's probably "net-mgmt"
Comment 23 Jingfeng Yan 2014-11-05 04:50:41 UTC
Created attachment 149059 [details]
diff to 0922 shar file

- changed to new catalog
- correct wrongly usage of ${INSTALL} 
- add other BSD variants in defined tests
- properly use "="
Comment 24 Jingfeng Yan 2014-11-05 04:51:36 UTC
Created attachment 149060 [details]
updated shar file

refer to diff file changes.
Comment 25 John Marino freebsd_committer freebsd_triage 2014-11-05 06:52:02 UTC
now that everything is cleaned up per request, the actual code has come out.  e.g.

X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/fileserver \
X		${STAGEDIR}${WWWDIR}/seafile/bin/fileserver
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafile-controller \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller
X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
X		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool


I see you are installing programs that are already in $STAGEDIR, apparently for the purpose having two names for the same program.  Normally sym links used for this.

try this:
(cd ${STAGEDIR}${PREFIX}/bin/seafile && \
    ${LN} -s ../fileserver && \
    ${LN} -s ../seaf-fsck && \
    ..etc)

You could also use .for/.endfor loops but I think the above is more clear

This assumes having installing the same program in 2 places is really desired.  Is it?  Why are these being put in seafile/bin ?
Comment 26 John Marino freebsd_committer freebsd_triage 2014-11-05 07:05:50 UTC
this is probably a mistake:
	${INSTALL_DATA} -d ${WRKSRC}/scripts/upgrade/ \

I think you mean ${MKDIR} ${WRKSRC}/scripts/upgrade/ and then wiped out the copy command.

Make sure you run testport again after they next shar submission.
Comment 27 Jingfeng Yan 2014-11-05 21:39:36 UTC
(In reply to John Marino from comment #25)
> now that everything is cleaned up per request, the actual code has come out.
> e.g.
> 
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/fileserver \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/fileserver
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafile-controller \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller
> X	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
> X		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool
> 
> 
> I see you are installing programs that are already in $STAGEDIR, apparently
> for the purpose having two names for the same program.  Normally sym links
> used for this.
> 
> try this:
> (cd ${STAGEDIR}${PREFIX}/bin/seafile && \
>     ${LN} -s ../fileserver && \
>     ${LN} -s ../seaf-fsck && \
>     ..etc)
> 
> You could also use .for/.endfor loops but I think the above is more clear
> 
> This assumes having installing the same program in 2 places is really
> desired.  Is it?  Why are these being put in seafile/bin ?

The ccnet and seafile build have both cli-, and server binaries, and other libs, etc.  Only server binaries are copied to ${WWWDIR}/seafile/bin.  When I start porting them, I am using symbolic links.  However, it gave me a lot of strange errors.  After some debugging, I found that if I use symblic link, it will find it real path.  Then, using the real path to determine the seafile installation path by go up directory several levels.  In the /proc file or system, it records the server processes running from the real path.  If I understand correctly, loader resolves from symbolic links to real path (If this is not true, we can come out other solution).  

Overall, somehow when I start symblic link "${WWWDIR}/seafile/bin/seafserv-tool", it will directly show I am running ${prefix}/bin/seafserv-tool.  seafile-tool then can not figure out where is seafile location by going up.

When I look at the released seafile server pkg, they don't do installation, and run from where it is extract.  All the bin, and lib are under somewhere similar to ${WWWDIR}/seafile.  In other works, even if you have libz, ... in Linux system, all the libs are duplicated.  

Although I don't prefer to the above solution, I failed when not copying all bins.  So, I decided duplicate as  small as possible, and copy bins only.
Comment 28 John Marino freebsd_committer freebsd_triage 2014-11-05 21:55:48 UTC
what about using hardlinks?  (e.g. ${LN} instead of ${LN} -s).  Do you still get the strange errors?
Comment 29 Jingfeng Yan 2014-11-05 21:57:49 UTC
(In reply to John Marino from comment #28)
> what about using hardlinks?  (e.g. ${LN} instead of ${LN} -s).  Do you still
> get the strange errors?

I will make a try. My mind keep soft all the time. :)
Comment 30 Jingfeng Yan 2014-11-06 04:15:32 UTC
Created attachment 149109 [details]
diff to 0922 shar file
Comment 31 Jingfeng Yan 2014-11-06 04:16:58 UTC
Created attachment 149111 [details]
portlint -AC log
Comment 32 Jingfeng Yan 2014-11-06 04:20:02 UTC
Created attachment 149112 [details]
updated shar file

- using ${LN} instead of ${INSTALL}
- using for loop to tight the codes
- correct catalog
Comment 33 Jingfeng Yan 2014-11-06 04:52:22 UTC
Created attachment 149118 [details]
test port log
Comment 34 John Marino freebsd_committer freebsd_triage 2014-11-06 07:45:08 UTC
(In reply to Jingfeng Yan from comment #32)
> - using for loop to tight the codes

I don't see an advantage to making a list and using it once with a loop versus the way I suggested, so I'm going to got with the (cd .... && ln && ln) approach.  I think it's clearer (more quickly) and shorter so...
Comment 35 John Marino freebsd_committer freebsd_triage 2014-11-06 08:50:37 UTC
fyi, I didn't want this:

@${MKDIR} ${dir1}
@${MKDIR} ${dir2}
@${MKDIR} ${dir3}

I wanted this:

@${MKDIR} ${dir1} \
  ${dir2} \
  ${dir3}

(1 command instead of 3, also easier to read IMO)

I am fixing that too.
Comment 36 John Marino freebsd_committer freebsd_triage 2014-11-06 08:57:51 UTC
i reworked the py sh loop to avoid needing a loop (and saved two more commands).

The "${CP} -R" line is wrong -- you need to use ${COPYTREE_SHARE} macro here.
Comment 37 John Marino freebsd_committer freebsd_triage 2014-11-06 09:13:01 UTC
is there a particular reason WITH_OPENSSL_PORT is defined?  I'm seeing a warning about conflicts with dependencies that use base openssl in the log.


Also, this doesn't build on FreeBSD 9 due to missing libiconv linkage.
Comment 38 John Marino freebsd_committer freebsd_triage 2014-11-06 09:14:11 UTC
correction, freebsd 10.  It works on 9 according to your log.
Comment 39 John Marino freebsd_committer freebsd_triage 2014-11-06 09:40:15 UTC
i'm having issues with my LN code so I'm going to go back to a modified version of what you submitted.
Comment 40 John Marino freebsd_committer freebsd_triage 2014-11-06 09:41:47 UTC
(In reply to John Marino from comment #37)
> is there a particular reason WITH_OPENSSL_PORT is defined?  I'm seeing a
> warning about conflicts with dependencies that use base openssl in the log.

from your own log:

/usr/bin/ld: warning: libssl.so.6, needed by /usr/local/lib/libzdb.so, may conflict with libssl.so.8
/usr/bin/ld: warning: libcrypto.so.6, needed by /usr/local/lib/libzdb.so, may conflict with libcrypto.so.8
Comment 41 John Marino freebsd_committer freebsd_triage 2014-11-06 09:55:25 UTC
(In reply to John Marino from comment #40)
> (In reply to John Marino from comment #37)
> > is there a particular reason WITH_OPENSSL_PORT is defined?  I'm seeing a
> > warning about conflicts with dependencies that use base openssl in the log.
> 
> from your own log:
> 
> /usr/bin/ld: warning: libssl.so.6, needed by /usr/local/lib/libzdb.so, may
> conflict with libssl.so.8
> /usr/bin/ld: warning: libcrypto.so.6, needed by /usr/local/lib/libzdb.so,
> may conflict with libcrypto.so.8

It looks like it doesn't matter if you have WITH_OPENSSL_PORT or not, you get the same warning either way, so I'll leave it.
Comment 42 commit-hook freebsd_committer freebsd_triage 2014-11-06 10:13:16 UTC
A commit references this bug:

Author: marino
Date: Thu Nov  6 10:13:11 UTC 2014
New revision: 372218
URL: https://svnweb.freebsd.org/changeset/ports/372218

Log:
  Add new port net-mgmt/seafile

  PR:		193134
  Submitted by:	Jingfeng Yan

  Seafile is a next-generation open source cloud storage system with
  advanced support for file syncing, privacy protection and teamwork.
  Collections of files are called libraries, and each library can be synced
  separately. A library can be encrypted with a user chosen password. This
  password is not stored on the server, so even the server admin cannot
  view a file's contents.

  Seafile allows users to create groups with file syncing, wiki, and
  discussion to enable easy collaboration around documents within a team.

Changes:
  head/net-mgmt/Makefile
  head/net-mgmt/seafile/
  head/net-mgmt/seafile/Makefile
  head/net-mgmt/seafile/distinfo
  head/net-mgmt/seafile/files/
  head/net-mgmt/seafile/files/patch-common_obj-backend-fs.c
  head/net-mgmt/seafile/files/patch-configure.ac
  head/net-mgmt/seafile/files/patch-controller_seafile-controller.c
  head/net-mgmt/seafile/files/patch-daemon_Makefile.am
  head/net-mgmt/seafile/files/patch-daemon_repo-mgr.c
  head/net-mgmt/seafile/files/patch-daemon_vc-utils.c
  head/net-mgmt/seafile/files/patch-lib_Makfile.am
  head/net-mgmt/seafile/files/patch-lib_libseafile.pc.in
  head/net-mgmt/seafile/files/patch-lib_net.c
  head/net-mgmt/seafile/files/patch-lib_utils.c
  head/net-mgmt/seafile/files/patch-lib_utils.h
  head/net-mgmt/seafile/files/patch-scripts_setup-seafile.sh
  head/net-mgmt/seafile/pkg-descr
  head/net-mgmt/seafile/pkg-plist
Comment 43 John Marino freebsd_committer freebsd_triage 2014-11-06 10:15:17 UTC
by the way, USES+=iconv fixed the problem on FreeBSD 10.

I tested this on FreeBSD 10 amd64 and FreeBSD 8.4 i386 in poudriere.

I made a few tweaks, you may want to review the final version, thanks.
Comment 44 Jingfeng Yan 2014-11-06 12:46:07 UTC
(In reply to John Marino from comment #43)
> by the way, USES+=iconv fixed the problem on FreeBSD 10.
> 
> I tested this on FreeBSD 10 amd64 and FreeBSD 8.4 i386 in poudriere.
> 
> I made a few tweaks, you may want to review the final version, thanks.

Again, I really appreciate your help and supports from my first ports (libevhtp). I am glad to continually learn from you. 

I will look at the changes.
Comment 45 Jingfeng Yan 2014-11-06 13:25:26 UTC
(In reply to John Marino from comment #37)
> is there a particular reason WITH_OPENSSL_PORT is defined?  I'm seeing a
> warning about conflicts with dependencies that use base openssl in the log.
> 
> 
> Also, this doesn't build on FreeBSD 9 due to missing libiconv linkage.

Oops, the poudriere sometime may not capture all the lib missing issue, which maybe I use some "cache" of previous builds.  For example, in this batch of working on the libsearpc, I delete port tree and rebuild again, somehow I get error for missing glib. 

Coming to openssl, I am not sure whether system update /lib/libcrypto.so or not.  By default, without openssl, it tries to use it, but some symbols do not exist when I started porting.  It should be HMAC_xxxx.

Thank you again for other changes.  Especially learn from you how to save another loop, and usage of COPYTREE_SHARE. I did use COPYTREE_SHARE before, but I think I have something wrong for destination maybe.  Then, I was back to the "CP"...
Comment 46 John Marino freebsd_committer freebsd_triage 2014-11-06 14:06:27 UTC
(In reply to Jingfeng Yan from comment #45)
> Oops, the poudriere sometime may not capture all the lib missing issue,
> which maybe I use some "cache" of previous builds.  For example, in this
> batch of working on the libsearpc, I delete port tree and rebuild again,
> somehow I get error for missing glib. 

no, in this case libiconv handling is different between freebsd 9 and 10.


I am glad you are learning new techniques!