Bug 218229 - devel/git: simplify GITWEB configuration
Summary: devel/git: simplify GITWEB configuration
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Renato Botelho
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2017-03-30 15:18 UTC by Zsolt Udvari
Modified: 2018-04-20 12:04 UTC (History)
1 user (show)

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


Attachments
patch (3.29 KB, patch)
2017-03-30 15:18 UTC, Zsolt Udvari
no flags Details | Diff
updated patch (2.76 KB, patch)
2018-04-19 16:02 UTC, Zsolt Udvari
no flags Details | Diff
Re-updated patch (2.68 KB, patch)
2018-04-20 05:38 UTC, Zsolt Udvari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt Udvari 2017-03-30 15:18:00 UTC
Created attachment 181316 [details]
patch

The user can modify the /usr/local/etc/git/gitweb.conf and doesn't need copy the whole examples/gitweb directory and "hack" the gitweb.cgi.

Poudriere testport passed (details: http://freebsd.uzsolt.hu/logs/devel/git/10amd64-default/git-2.12.1.log ).
Comment 1 Renato Botelho freebsd_committer 2017-06-27 13:45:45 UTC
The instructions saying to copy gitweb.conf.sample to gitweb.conf is not necessary since it will happen automatically due to @sample call in pkg-plist
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-02-07 11:33:20 UTC
Status?
Comment 3 Renato Botelho freebsd_committer 2018-04-19 10:07:50 UTC
(In reply to w.schwarzenfeld from comment #2)
Waiting submitter to fix issues pointed in comment 1
Comment 4 Zsolt Udvari 2018-04-19 11:49:12 UTC
(In reply to Renato Botelho from comment #3)
Sorry, I thought I shouldn't do anything.
If it's acceptable should remove point 2) from instructions. Do you need to upload an updated patch?
Comment 5 Renato Botelho freebsd_committer 2018-04-19 13:05:08 UTC
(In reply to Zsolt Udvari from comment #4)
JFYI, we also have a code review system available at https://reviews.freebsd.org. Feel free to submit patches there in the future. It's easier to review.

I'll paste blocks of your patch with comments. Please submit a fresh patch with changes.

----------------------------------------------------

+post-install-GITWEB-on:
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	@${CP} ${WRKDIR}/gitweb.conf ${STAGEDIR}${ETCDIR}

* Replace ${CP} by ${INSTALL_DATA}
* Remove @ to unmute it
* Install gitweb.conf as gitweb.conf.sample

---------------------------------------------------

-1) Copy the files %%EXAMPLESDIR%%/gitweb/* to a directory on
-   your web server (e.g. Apache2) in which you are able to execute
-   CGI-scripts.
-2) In gitweb.cgi, adjust the variable $projectroot to point to
-   your git repository (that is where you have your *.git project
-   directories).
+1) Please be sure you're able to execute CGI scripts in
+   %%EXAMPLESDIR%%/gitweb.
+2) Copy %%ETCDIR%%/gitweb.conf.sample to
+   %%ETCDIR%%/gitweb.conf and edit it!
+3) Set the GITWEB_CONFIG variable in your webserver's config to
+   %%ETCDIR%%/gitweb.conf. This variable is passed to gitweb.cgi.
+4) Restart server.

* Remove item 2, it's not necessary

---------------------------------------------------

+%%GITWEB%%@sample %%ETCDIR%%/gitweb.conf

* Add .sample to the end of filename
Comment 6 Zsolt Udvari 2018-04-19 16:02:55 UTC
Created attachment 192658 [details]
updated patch
Comment 7 Renato Botelho freebsd_committer 2018-04-19 19:43:20 UTC
(In reply to Zsolt Udvari from comment #6)
Item #2 of instructions is not right. Users don't need to copy gitweb.conf.sample to gitweb.conf. It will be done automatically when package is installed because of @sample item in pkg-plist
Comment 8 Zsolt Udvari 2018-04-20 05:38:54 UTC
Created attachment 192673 [details]
Re-updated patch

Remove unneeded instruction.
Comment 9 commit-hook freebsd_committer 2018-04-20 12:01:35 UTC
A commit references this bug:

Author: garga
Date: Fri Apr 20 12:01:07 UTC 2018
New revision: 467821
URL: https://svnweb.freebsd.org/changeset/ports/467821

Log:
  Install a gitweb.conf initial file and update pkg-message to make it easier
  to configure it

  PR:		218229
  Submitted by:	Zsolt Udvari <uzsolt@uzsolt.hu>
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Changes:
  head/devel/git/Makefile
  head/devel/git/files/gitweb.conf.in
  head/devel/git/files/pkg-message.in
  head/devel/git/pkg-plist