Bug 213979 - [PATCH] www/nginx: Add support for 3rd party FastDFS module
Summary: [PATCH] www/nginx: Add support for 3rd party FastDFS module
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey A. Osokin
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-11-01 16:02 UTC by Daniel Ylitalo
Modified: 2016-11-18 01:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (osa)


Attachments
Patch that adds the FastDFS option (4.92 KB, patch)
2016-11-01 16:02 UTC, Daniel Ylitalo
no flags Details | Diff
Patch that adds the FastDFS option (5.29 KB, patch)
2016-11-08 14:12 UTC, Daniel Ylitalo
no flags Details | Diff
Patch that adds the FastDFS option (10.75 KB, patch)
2016-11-10 11:17 UTC, Daniel Ylitalo
no flags Details | Diff
Patch that adds the FastDFS option (10.43 KB, patch)
2016-11-10 15:36 UTC, Daniel Ylitalo
no flags Details | Diff
Patch that adds the FastDFS option (10.46 KB, patch)
2016-11-10 19:04 UTC, Daniel Ylitalo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ylitalo 2016-11-01 16:02:27 UTC
Created attachment 176378 [details]
Patch that adds the FastDFS option

Attached patch adds support for the 3rd party FastDFS module
Comment 1 Sergey A. Osokin freebsd_committer freebsd_triage 2016-11-06 01:17:04 UTC
Hi Daniel,

thanks for the patch.

I've found a couple hard-coded "/usr/local" values in the patch.

Could you please fix this issue, as example I'd recommend to take a look on the DRIZZLE third-party module adoption.
Comment 2 Daniel Ylitalo 2016-11-08 14:12:12 UTC
Created attachment 176785 [details]
Patch that adds the FastDFS option

Changes static /usr/local to dynamic ${LOCALBASE} and ${PREFIX}
Comment 3 Sergey A. Osokin freebsd_committer freebsd_triage 2016-11-10 03:19:48 UTC
Looks better, thanks.

Would you mind to do a patch for www/nginx-devel please.

Thanks in advance.
Comment 4 Daniel Ylitalo 2016-11-10 11:17:04 UTC
Created attachment 176850 [details]
Patch that adds the FastDFS option

This version also covers nginx-devel
Comment 5 Sergey A. Osokin freebsd_committer freebsd_triage 2016-11-10 15:15:49 UTC
Hi Daniel,

thanks for the patch for the www/nginx-devel too.

I don't think I fully understand this part of the patch:

+.if ${PORT_OPTIONS:MFASTDFS}
+	${ECHO_CMD} @sample etc/fdfs/mod_fastdfs.conf.sample
+.endif


Are you going to add a record of this file to the package list?
Could you please explain this.

One more thing - would you mind to change the version of the module from 5a8110f57ec55ff580260cf1fc6aa152a5a4c574 to more convenient and readable 5a8110f?
If so, could you please update the patch.

Thanks in advance.
Comment 6 Daniel Ylitalo 2016-11-10 15:36:54 UTC
Created attachment 176862 [details]
Patch that adds the FastDFS option

Yes, I'm installing a sample config file;
+.if ${PORT_OPTIONS:MFASTDFS}
+       ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fdfs
+       ${INSTALL_DATA} ${WRKSRC_fastdfs}/src/mod_fastdfs.conf ${STAGEDIR}${PREFIX}/etc/fdfs/mod_fastdfs.conf.sample
+.endif

The module needs to know alot of info to be able to connect to a fastdfs cluster so the author has created a separate config for the module, you only load the module itself in nginx.conf
Comment 7 Sergey A. Osokin freebsd_committer freebsd_triage 2016-11-10 15:51:25 UTC
Well, I got you.  So, in this case the part of the code should looks like:

+.if ${PORT_OPTIONS:MFASTDFS}
+	${ECHO_CMD} @sample etc/fdfs/mod_fastdfs.conf.sample >> ${TMPPLIST}
+.endif

Is that right?
Comment 8 Daniel Ylitalo 2016-11-10 19:04:56 UTC
Created attachment 176869 [details]
Patch that adds the FastDFS option

Oh, that was quite the catch! Didn't see my misstake at all until you pointed it out. 

Updated the patch piping it to the plist
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-11-18 01:07:10 UTC
A commit references this bug:

Author: osa
Date: Fri Nov 18 01:06:27 UTC 2016
New revision: 426303
URL: https://svnweb.freebsd.org/changeset/ports/426303

Log:
  Add third-party fastdfs module.

  PR:	213979

Changes:
  head/www/nginx/Makefile
  head/www/nginx/distinfo
  head/www/nginx/files/extra-patch-fastdfs-src-config
  head/www/nginx-devel/Makefile
  head/www/nginx-devel/distinfo
  head/www/nginx-devel/files/extra-patch-fastdfs-src-config
Comment 10 Sergey A. Osokin freebsd_committer freebsd_triage 2016-11-18 01:07:57 UTC
I've just committed my version, thanks for report!