Bug 229200 - [patch] devel/fossil: add fossil_proto="https" option to rc-file
Summary: [patch] devel/fossil: add fossil_proto="https" option to rc-file
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: Pietro Cerutti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 11:47 UTC by Oleh Hushchenkov
Modified: 2018-06-22 08:07 UTC (History)
1 user (show)

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


Attachments
Patch (667 bytes, patch)
2018-06-21 11:47 UTC, Oleh Hushchenkov
no flags Details | Diff
Add fossil_https parameter (2.00 KB, patch)
2018-06-21 16:24 UTC, Pietro Cerutti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh Hushchenkov 2018-06-21 11:47:57 UTC
Created attachment 194452 [details]
Patch
Comment 1 Pietro Cerutti freebsd_committer freebsd_triage 2018-06-21 14:23:20 UTC
As far as I understand, the -https switch is used in conjunction with -scgi to overrides the CGI "HTTPS" parameter. With your patch, you can choose either "scgi" or "https" as a fossil_proto, which doesn't make sense to me.

How about allowing additional parameters in fossil_args instead?
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2018-06-21 14:26:33 UTC
Or a dedicated fossil_https switch, which sets the --https command line option if non empty.
Comment 3 Oleh Hushchenkov 2018-06-21 15:03:23 UTC
Hi Pietro.

I use fossil(--https without --scgi) + nginx as reverse proxy with enforced https.

Using fossil_args to enforcing https connection is little ugly, but acceptable, solution for me. Dedicated fossil_https switch is much better. In any case, feel free to close this PR.

Thanks for you work on this!
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2018-06-21 16:24:12 UTC
Created attachment 194463 [details]
Add fossil_https parameter
Comment 5 Pietro Cerutti freebsd_committer freebsd_triage 2018-06-21 16:24:35 UTC
Hi Oleh, how about this patch?
Comment 6 Oleh Hushchenkov 2018-06-21 18:34:05 UTC
(In reply to Pietro Cerutti from comment #5)

> [ -z "${fossil_https}"     ] && fossil_args="${fossil_args} --https"
Did you mean: "[ -n ..."?
Comment 7 Pietro Cerutti freebsd_committer freebsd_triage 2018-06-22 06:44:19 UTC
Oh, of course :)
Comment 8 Oleh Hushchenkov 2018-06-22 06:59:04 UTC
(In reply to Pietro Cerutti from comment #7)

I am completely fine with this patch.

Thank you.
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-06-22 08:06:56 UTC
A commit references this bug:

Author: gahr
Date: Fri Jun 22 08:06:06 UTC 2018
New revision: 473020
URL: https://svnweb.freebsd.org/changeset/ports/473020

Log:
  devel/fossil: add fossil_https rc.conf setting

  When the rc.conf fossil_https is set to a non-empty string, the --https
  parameter is added to the fossil serve command line to force HTTPS
  communication.

  PR:		229200
  Submitted by:	Oleh Hushchenkov <gor@clogic.com.ua>

Changes:
  head/devel/fossil/Makefile
  head/devel/fossil/files/fossil.in