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 ).
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
Status?
(In reply to w.schwarzenfeld from comment #2) Waiting submitter to fix issues pointed in comment 1
(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?
(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
Created attachment 192658 [details] updated patch
(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
Created attachment 192673 [details] Re-updated patch Remove unneeded instruction.
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