Bug 206490 - www/obhttpd: Added option URL_REWRITE to enable rewrite support
Summary: www/obhttpd: Added option URL_REWRITE to enable rewrite support
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/sadaszewski/httpd
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-22 11:43 UTC by s.adaszewski
Modified: 2016-01-26 10:55 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description s.adaszewski 2016-01-22 11:43:45 UTC
Added option URL_REWRITE which allows to build the port with URL rewriting support as implemented here: https://github.com/sadaszewski/httpd and discussed here: https://groups.google.com/forum/#!topic/mailing.openbsd.tech/-Jbyrb5842E

--- Makefile    2015-12-14 18:16:54.000000000 +0100
+++ /tmp/Makefile.new   2016-01-22 12:34:18.015568000 +0100
@@ -11,9 +11,18 @@

 WRKSRC=                ${WRKDIR}/${GH_PROJECT}-${PORTVERSION}/src/usr.sbin/${GH_PROJECT}

+OPTIONS_DEFINE= URL_REWRITE
+
 USE_GITHUB=    yes
+.if defined(PACKAGE_BUILDING)
+GH_ACCOUNT=    koue sadaszewski:sadaszewski
+GH_PROJECT=     httpd httpd:sadaszewski
+.else
 GH_ACCOUNT=    koue
+URL_REWRITE_GH_ACCOUNT= sadaszewski
 GH_PROJECT=    httpd
+.endif
+

 USE_OPENSSL=   yes
 USE_RC_SUBR=   obhttpd
Comment 1 s.adaszewski 2016-01-22 12:18:17 UTC
Had to modify it a bit to work with a tagname:

--- Makefile    2015-12-14 18:16:54.000000000 +0100
+++ /tmp/Makefile.new   2016-01-22 13:10:47.501490000 +0100
@@ -9,11 +9,28 @@

 LICENSE=       BSD3CLAUSE

-WRKSRC=                ${WRKDIR}/${GH_PROJECT}-${PORTVERSION}/src/usr.sbin/${GH_PROJECT}
+
+OPTIONS_DEFINE= URL_REWRITE

 USE_GITHUB=    yes
+.if defined(PACKAGE_BUILDING)
+GH_ACCOUNT=    koue sadaszewski:sadaszewski
+GH_PROJECT=     httpd httpd:sadaszewski
+GH_TAGNAME=     4245a4:sadaszewski
+.else
 GH_ACCOUNT=    koue
+URL_REWRITE_GH_ACCOUNT= sadaszewski
+URL_REWRITE_GH_TAGNAME= 4245a4
+URL_REWRITE_DISTFILES= sadaszewski-httpd-4245a4_GH0.tar.gz
+# URL_REWRITE_DIST_NAME= sadaszewski-httpd-4245a4
 GH_PROJECT=    httpd
+.endif
+
+.if ${PORT_OPTIONS:URL_REWRITE}
+WRKSRC=                ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME}/src/usr.sbin/${GH_PROJECT}
+.else
+WRKSRC=                ${WRKDIR}/${GH_PROJECT}-${PORTVERSION}/src/usr.sbin/${GH_PROJECT}
+.endif

 USE_OPENSSL=   yes
 USE_RC_SUBR=   obhttpd
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-22 12:59:38 UTC
Thanks for your submission.

Could you please:

* Include your proposed change as an attachment
* Confirm this change passes QA (portlint, poudriere)

For future issues, please use attachments for large bodies of text, build logs, configuration files or patches :)
Comment 3 Nikola Kolev 2016-01-25 07:35:28 UTC
Hi Stanislaw,

As I mention in the github pull request I prefer the features first to be included in the upstream otherwise it will become distribution not port of OpenBSD httpd.
I prefer to stick to the upstream so I'm not agree with this update.

Regards,
Nikola
Comment 4 s.adaszewski 2016-01-25 07:47:34 UTC
Hi Nikola,

Thanks for your feedback. Agreed that it's a distribution. More precisely - addition of an option which turns a port into a distribution. But I don't see anything bad about it - it's fully optional and obviously turned off in binary packages. If anything - it's good for FreeBSD to have a better version than OB. OB seems to be starved in terms of developers and the turnabout of any change there is months. Actually if people reviewed and tested the feature in FreeBSD it would perhaps help OB accept the patch. Otherwise it might not make it there ever, even though people like it and I get emails every week asking how to apply the patch and so on.

Besides, I think we need to migrate this port from using the GitHub repositories to fetching necessary sources from OpenBSD CVS and applying your patches on top of it. Like this it's easier to review any changes made on top of trusted OpenBSD codebase. Forgive my paranoia but the case of GitHub repo + its owner being also the port owner... makes me feel uneasy ;) What do you think?

Best,

S.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-25 09:12:56 UTC
As requested in comment 2, can you please include your proposed change (svn diff against the port) as an attachment please. Without it, we wont be able to track maintainer feedback/approval on this issue.
Comment 6 Nikola Kolev 2016-01-25 13:45:49 UTC
(In reply to s.adaszewski from comment #4)

https://github.com/koue/httpd has OpenBSD branch which you can easily compare with the official OpenBSD cvs. In the commit messages I'm including the current date so this will help you with the tracking. This script will help you with the cvs checkout: https://github.com/koue/scripts/blob/master/OpenBSD/cvs_checkout_httpd.sh . You can take all patches from the master branch and apply them by yourself. I hope this will makes you feel easy. And of course you can start developing enhanced version of the OpenBSD httpd.
At the moment I don't think it is necessary to move out the port from Github and I will stick with the upstream.

Regards,
Nikola
Comment 7 s.adaszewski 2016-01-25 14:30:14 UTC
What I was trying to say is that your "port" is already a fork since it resides outside of both OpenBSD CVS and FreeBSD ports tree - thus why not accept (optional) patches ;) Doesn't matter - at this point I also agree that a new 'enhanced' port is necessary.

Best,

S.
Comment 8 Nikola Kolev 2016-01-25 15:05:49 UTC
(In reply to s.adaszewski from comment #7)

My patches are only to be able to compile and run the server on FreeBSD without any functionality changes. With few other optional patches about functionality merging with the next versions from OpenBSD cvs will become nightmare. For instance check FreeBSD mail lists archives about merging PF from OpenBSD :)

Regards,
Nikola
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-25 18:16:06 UTC
Maintainer, can you please provide instructions on how you'd like to proceed?
Comment 10 Nikola Kolev 2016-01-26 10:48:10 UTC
Proposed change is not yet accepted by the OpenBSD developers. Follow the upstream and the port stays as it is. Closing the bug.

Regards,
Nikola