Incorrect default install path for Apache on Mac

Lars Hjemli hjemli at gmail.com
Tue May 24 02:01:57 CEST 2011


On Tue, May 24, 2011 at 01:30, Alex Smith <alex.smith.93 at gmail.com> wrote:
> On Mac install goes more like this however, it won't install to the default htdocs dir on a mac:
> make get-git
> make NEEDS_LIBICONV=YesPlease get-git
> sudo make NEEDS_LIBICONV=YesPlease install

sligthly off-topic:
* the get-git target is only needed once (to download the sources for libgit.a)
* if you've done 'git submodule init; git submodule update', there's
no need to 'make get-git' at all
* specifying NEEDS_LIBICONV is also only needed once (during building,
not install)

>
> Instead it installs to as evidenced by the Terminal:
> install -m 0755 -d /var/www/htdocs/cgit
> install -m 0755 cgit /var/www/htdocs/cgit/cgit.cgi
> install -m 0755 -d /var/www/htdocs/cgit
> install -m 0644 cgit.css /var/www/htdocs/cgit/cgit.css
> install -m 0644 cgit.png /var/www/htdocs/cgit/cgit.png
> install -m 0755 -d /usr/lib/cgit/filters
> install -m 0755 filters/* /usr/lib/cgit/filters

Yeah, these are the default paths, as defined at the start of the Makefile.

>
> Default directory for Mac web documents (i.e. htdocs) is: /Library/WebServer/Documents

Ok. Running 'make CGIT_SCRIPT_PATH=/Library/WebServer/Documents
install' would have put (some of) the files at the right place, put a
better solution is to specify these variables in a file named
cgit.conf which is always included by the Makefile (see the start of
the Makefile for these and other variables you might want to adjust in
cgit.conf).

Also, a new darwin-specific section in the Makefile would probably be
helpful, i.e. something like this (totally untested...):

diff --git a/Makefile b/Makefile
index af2879e..43b061c 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,12 @@ ifeq ($(uname_O),Cygwin)
 	NEEDS_LIBICONV = YesPlease
 endif

+ifeq ($(uname_S),Darwin)
+	NEEDS_LIBICONV = YesPlease
+	CGIT_SCRIPT_PATH=/Library/WebServer/Documents
+	filterdir=/Library/cgit/filters
+endif
+
 #
 # Let the user override the above settings.
 #


> I feel I can easily just move all files under /var/www/htdocs to this directory, but
> is it safe to move /usr/lib/cgit/filters?

The filter scripts are not supposed to be accessible by apache, so I'd
move them to e.g. /Library/cgit/filters (just guessing, I don't know
the fs layout on darwin...)

-- 
larsh




More information about the CGit mailing list