Skip to contentSkip to conversation

git-instaweb: Configure it to work with new gitweb structure

PATCH In review Pavan Kumar Sunkara 2 participants 6 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 git-instaweb: Configure it to work with new gitweb structure

git-instaweb in its current form (re)creates gitweb.cgi and (some of) required static files in $GIT_DIR/gitweb/ directory. Splitting gitweb would make it difficult for git-instaweb to continue with this method.

Use the instaweb.gitwebdir config variable to point git-instaweb script to a global directory which contains gitweb files as server root and the httpd.conf along with server logs and pid go into '$(GIT_DIR)/gitweb' directory.

---

This patch is based on commit 'jn/gitweb-install' in the next branch.

 Makefile        |   10 +------
 git-instaweb.sh |   71 ++++++++++++++++++++----------------------------------
 2 files changed, 28 insertions(+), 53 deletions(-)
Makefile +2 -8
index caf2f64..91cd726 100644
@@ -1592,15 +1592,8 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/
 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
-	    -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \
-	    -e '/@@GITWEB_CGI@@/d' \
-	    -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \
-	    -e '/@@GITWEB_CSS@@/d' \
-	    -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \
-	    -e '/@@GITWEB_JS@@/d' \
+	    -e 's|@@GITWEBDIR@@|$(gitwebdir)|g' \
 	    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
-            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
-            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
 	    [email protected] > $@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
@@ -1972,6 +1965,7 @@ install: all
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
+	$(MAKE) -C gitweb gitwebdir=$(gitwebdir) install
 endif
 ifndef NO_PYTHON
 	$(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
git-instaweb.sh +26 -45

156 lines not on this page · raw message

Signature · 1 line
1.7.1.18.g74211d.dirty
Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines · Pavan Kumar Sunkara

git-instaweb in its current form (re)creates gitweb.cgi and (some of) required static files in $GIT_DIR/gitweb/ directory. Splitting gitweb would make it difficult for git-instaweb to continue with this method.

Use the instaweb.gitwebdir config variable to point git-instaweb script to a global directory which contains gitweb files as server root and the httpd.conf along with server logs and pid go into '$(GIT_DIR)/gitweb' directory.

That's not all this patch changes, isn't it?

While at it, change apache2 configuration to use the same access log and error log files as the rest of web servers supported by git-instaweb.

While it would be better to have it as a separate commit, I think it doesn't matter much, and having it in this patch is acceptable as "while at it" change.

Quoted 2 lines

I like this change, because it simplifies greatly git-instaweb generation; besides the fact that it is necessary for future splitting gitweb for better maintability, and for write functionality for gitweb.

_If_ there is no problem with $(gitwebdir) and not $(gitwebdir_SQ), see below for details.

Quoted 3 lines

---

This patch is based on commit 'jn/gitweb-install' in the next branch.

I think it is based on your earlier patches:

* gitweb: Move static files into seperate subdirectory
http://article.gmane.org/gmane.comp.version-control.git/147321
* gitweb: Set default destination directory for installing gitweb in Makefile
http://article.gmane.org/gmane.comp.version-control.git/147160

Those are necessary for this patch to be applied. Well, the second is necessary for it to make sense...

BTW. which web servers supported by git-instaweb: lighttpd, apache2, webrick, mongoose you have tested your change with?

Quoted 10 lines
 Makefile        |   10 +------
 git-instaweb.sh |   71 ++++++++++++++++++++----------------------------------
 2 files changed, 28 insertions(+), 53 deletions(-)
Makefile +0 -0
index caf2f64..91cd726 100644
@@ -1592,15 +1592,8 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/
 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \

[...]

Makefile install: all · line 1969

Quoted 13 lines
Makefile +2 -2
+	    -e 's|@@GITWEBDIR@@|$(gitwebdir)|g' \
 	    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
-            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
-            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
 	    [email protected] > $@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
@@ -1972,6 +1965,7 @@ install: all
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
+	$(MAKE) -C gitweb gitwebdir=$(gitwebdir) install
 endif

Have you checked that you can use $(gitwebdir) and don't need $(gitwebdir_SQ) here? Does git-instaweb installs and works correctly if 'gitwebdir' contains spaces and single or double quote characters?

But perhaps that doesn't matter in practice, and this is good enough.

Quoted 13 lines
git-instaweb.sh +1 -0
index f608014..b3e9192 100755
@@ -24,6 +24,7 @@ restart        restart the web server
 fqgitdir="$GIT_DIR"
 local="$(git config --bool --get instaweb.local)"
 httpd="$(git config --get instaweb.httpd)"
+root="$(git config --get instaweb.gitwebdir)"
 port=$(git config --get instaweb.port)
 module_path="$(git config --get instaweb.modulepath)"
 

git-instaweb.sh conf="$GIT_DIR/gitweb/httpd.conf" · line 40

Quoted 6 lines
git-instaweb.sh +3 -0
@@ -34,6 +35,9 @@ conf="$GIT_DIR/gitweb/httpd.conf"
 # if installed, it doesn't need further configuration (module_path)
 test -z "$httpd" && httpd='lighttpd -f'
 
+# Default is @@GITWEBDIR@@
+test -z "$root" && root='@@GITWEBDIR@@'
+

Nice.

git-instaweb.sh resolve_full_httpd () { · line 67

Quoted 9 lines
git-instaweb.sh +1 -1
@@ -57,7 +61,7 @@ resolve_full_httpd () {
 		# these days and those are not in most users $PATHs
 		# in addition, we may have generated a server script
 		# in $fqgitdir/gitweb.
-		for i in /usr/local/sbin /usr/sbin "$fqgitdir/gitweb"
+		for i in /usr/local/sbin /usr/sbin "$root" "$fqgitdir/gitweb"
 		do
 			if test -x "$i/$httpd_only"
 			then

You probably want to update comment above this loop. But this is not something very important.

Alternatively, if e.g. webrick.rb and webrick (shell script) are installed in "$fqgitdir/gitweb" directory, there is no need to check "$root".

Quoted 1 line

webrick_conf () {

[...]

Quoted 7 lines

-:DocumentRoot: "$fqgitdir/gitweb"
+:DocumentRoot: "$root"

lighttpd_conf () {

git-instaweb.sh +1 -1
 	cat > "$conf" <<EOF
-server.document-root = "$fqgitdir/gitweb"
+server.document-root = "$root"

[...]

Quoted 4 lines
git-instaweb.sh +1 -1
-setenv.add-environment = ( "PATH" => env.PATH )
+setenv.add-environment = ( "PATH" => env.PATH, "GITWEB_CONFIG" => env.GITWEB_CONFIG )
 
 apache2_conf () {

[...]

Quoted 4 lines
git-instaweb.sh +2 -2
-ServerRoot "$fqgitdir/gitweb"
-DocumentRoot "$fqgitdir/gitweb"
+ServerRoot "$root"
+DocumentRoot "$root"

[...]

Quoted 10 lines

PerlPassEnv GIT_DIR
PerlPassEnv GIT_EXEC_DIR

git-instaweb.sh +2 -1
+PerlPassEnv GITWEB_CONFIG
@@ -353,7 +359,7 @@ mongoose_conf() {
 # For detailed description of every option, visit
 # http://code.google.com/p/mongoose/wiki/MongooseManual
 
-root		$fqgitdir/gitweb
+root		$root

[...]

git-instaweb.sh error_log $fqgitdir/gitweb/error.log · line 370

Quoted 2 lines
git-instaweb.sh +1 -1
-cgi_env		PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
+cgi_env		PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH,GITWEB_CONFIG=$GITWEB_CONFIG

All right, those changes are pretty clear.

Quoted 9 lines
git-instaweb.sh +0 -1
@@ -277,14 +281,15 @@ EOF
 
 apache2_conf () {
 	test -z "$module_path" && module_path=/usr/lib/apache2/modules
-	mkdir -p "$GIT_DIR/gitweb/logs"
 	bind=
 	test x"$local" = xtrue && bind='127.0.0.1:'
 	echo 'text/css css' > "$fqgitdir/mime.types"
 	cat > "$conf" <<EOF

git-instaweb.sh EOF · line 295

Quoted 10 lines
git-instaweb.sh +4 -2
 ServerName "git-instaweb"
-ServerRoot "$fqgitdir/gitweb"
-DocumentRoot "$fqgitdir/gitweb"
+ServerRoot "$root"
+DocumentRoot "$root"
+ErrorLog "$fqgitdir/gitweb/error.log"
+CustomLog "$fqgitdir/gitweb/access.log" combined
 PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF

This is independent change, modifying configuration of apache2 web server to use the same files for access log and for error log ("$fqgitdir/gitweb/access.log" and "$fqgitdir/gitweb/error.log", respectively) as the rest of web servers.

Isn't it?

Quoted 12 lines
git-instaweb.sh +0 -8
@@ -370,41 +376,16 @@ mime_types	.gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-t
 EOF
 }
 
-
-script='
-s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
-s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
-s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
-s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
-
-gitweb_cgi () {

[...]

git-instaweb.sh mime_types .gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-t · line 386

Quoted 8 lines
git-instaweb.sh +7 -0
+gitweb_conf() {
+	cat > "$fqgitdir/gitweb/gitweb_config.perl" <<EOF
+#!/usr/bin/perl
+our \$projectroot = "$(dirname "$fqgitdir")";
+our \$git_temp = "$fqgitdir/gitweb/tmp";
+our \$projects_list = \$projectroot;
+EOF
 }

Right, $GIT (formerly $gitbin) is set when generating gitweb.cgi from gitweb.perl.

Actually $git_temp is not needed by modern gitweb (from quite some time, since using external /usr/bin/diff was replaced by git-diff-tree), so setting it could be removed from gitweb_config.perl. Nevertheless it is not a problem having it.

Quoted 9 lines
git-instaweb.sh +1 -3
-gitweb_cgi "$GIT_DIR/gitweb/gitweb.cgi"
-gitweb_css "$GIT_DIR/@@GITWEB_CSS_NAME@@"
-gitweb_js  "$GIT_DIR/@@GITWEB_JS_NAME@@"
+gitweb_conf
 
 case "$httpd" in
 *lighttpd*)
Signature · 1 line
1.7.1.18.g74211d.dirty
Signature · 2 lines
Jakub Narebski
Poland
#2 lore raw

2010/5/22 Jakub Narebski <[email protected]>:

Quoted 23 lines · Pavan Kumar Sunkara
Quoted 10 lines

git-instaweb in its current form (re)creates gitweb.cgi and (some of) required static files in $GIT_DIR/gitweb/ directory. Splitting gitweb would make it difficult for git-instaweb to continue with this method.

Use the instaweb.gitwebdir config variable to point git-instaweb script to a global directory which contains gitweb files as server root and the httpd.conf along with server logs and pid go into '$(GIT_DIR)/gitweb' directory.

That's not all this patch changes, isn't it?

 While at it, change apache2 configuration to use the same access log and error log files as the rest of web servers supported by git-instaweb.

While it would be better to have it as a separate commit, I think it doesn't matter much, and having it in this patch is acceptable as "while at it" change.

Quoted 1 line
Quoted 5 lines
Quoted 1 line

I like this change, because it simplifies greatly git-instaweb generation; besides the fact that it is necessary for future splitting gitweb for better maintability, and for write functionality for gitweb.

Thanks.

Quoted 11 lines

_If_ there is no problem with $(gitwebdir) and not $(gitwebdir_SQ), see below for details.

Quoted 3 lines

---

This patch is based on commit 'jn/gitweb-install' in the next branch.

I think it is based on your earlier patches:

Quoted 7 lines

* gitweb: Move static files into seperate subdirectory
 http://article.gmane.org/gmane.comp.version-control.git/147321
* gitweb: Set default destination directory for installing gitweb in Makefile
 http://article.gmane.org/gmane.comp.version-control.git/147160

Those are necessary for this patch to be applied.  Well, the second is necessary for it to make sense...

Yes. They are necessary patches before this patch. I assume, they are going to be merged before this patch is.

Quoted 2 lines

BTW. which web servers supported by git-instaweb: lighttpd, apache2, webrick, mongoose you have tested your change with?

I tested this patch with lighttpd and apache2.
And am sure about mongoose. But don't know the status with webrick.

Quoted 21 lines
Quoted 10 lines

 Makefile        |   10 +------
 git-instaweb.sh |   71 ++++++++++++++++++++----------------------------------

 2 files changed, 28 insertions(+), 53 deletions(-)
Makefile +0 -0
index caf2f64..91cd726 100644
@@ -1592,15 +1592,8 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/
       sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \

[...]

Quoted 10 lines

+         -e 's|@@GITWEBDIR@@|$(gitwebdir)|g' \
          -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
-            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
-            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
          [email protected] > $@+ && \
      chmod +x $@+ && \
      mv $@+ $@

Makefile +0 -0
@@ -1972,6 +1965,7 @@ install: all

      $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install ifndef NO_PERL

Quoted 8 lines
Quoted 3 lines

      $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
+     $(MAKE) -C gitweb gitwebdir=$(gitwebdir) install
 endif

Have you checked that you can use $(gitwebdir) and don't need $(gitwebdir_SQ) here?  Does git-instaweb installs and works correctly if 'gitwebdir' contains spaces and single or double quote characters? But perhaps that doesn't matter in practice, and this is good enough.

Nope. I didn't check it. But you are right.

Quoted 101 lines
Quoted 17 lines
git-instaweb.sh +0 -0
index f608014..b3e9192 100755
@@ -24,6 +24,7 @@ restart        restart the web server

 fqgitdir="$GIT_DIR"
 local="$(git config --bool --get instaweb.local)" httpd="$(git config --get instaweb.httpd)" +root="$(git config --get instaweb.gitwebdir)" port=$(git config --get instaweb.port) module_path="$(git config --get instaweb.modulepath)"

git-instaweb.sh +0 -0
@@ -34,6 +35,9 @@ conf="$GIT_DIR/gitweb/httpd.conf"
  # if installed, it doesn't need further configuration (module_path)

 test -z "$httpd" && httpd='lighttpd -f'

git-instaweb.sh conf="$GIT_DIR/gitweb/httpd.conf" · line 40

Quoted 3 lines
git-instaweb.sh +3 -0
+# Default is @@GITWEBDIR@@
+test -z "$root" && root='@@GITWEBDIR@@'
+

Nice.

Quoted 9 lines
git-instaweb.sh +1 -1
@@ -57,7 +61,7 @@ resolve_full_httpd () {
               # these days and those are not in most users $PATHs
               # in addition, we may have generated a server script
               # in $fqgitdir/gitweb.
-             for i in /usr/local/sbin /usr/sbin "$fqgitdir/gitweb"
+             for i in /usr/local/sbin /usr/sbin "$root" "$fqgitdir/gitweb"

              do
                      if test -x "$i/$httpd_only"
                      then

You probably want to update comment above this loop.  But this is not something very important.

Alternatively, if e.g. webrick.rb and webrick (shell script) are installed in "$fqgitdir/gitweb" directory, there is no need to check "$root".

Quoted 1 line

 webrick_conf () {

[...]

Quoted 7 lines

-:DocumentRoot: "$fqgitdir/gitweb"
+:DocumentRoot: "$root"

 lighttpd_conf () {
      cat > "$conf" <<EOF

git-instaweb.sh +1 -1
-server.document-root = "$fqgitdir/gitweb"
+server.document-root = "$root"

[...]

Quoted 4 lines
git-instaweb.sh +1 -1
-setenv.add-environment = ( "PATH" => env.PATH )
+setenv.add-environment = ( "PATH" => env.PATH, "GITWEB_CONFIG" => env.GITWEB_CONFIG )

 apache2_conf () {

[...]

Quoted 4 lines
git-instaweb.sh +2 -2
-ServerRoot "$fqgitdir/gitweb"
-DocumentRoot "$fqgitdir/gitweb"
+ServerRoot "$root"
+DocumentRoot "$root"

[...]

Quoted 10 lines

 PerlPassEnv GIT_DIR
 PerlPassEnv GIT_EXEC_DIR

git-instaweb.sh +2 -1
+PerlPassEnv GITWEB_CONFIG
@@ -353,7 +359,7 @@ mongoose_conf() {
  # For detailed description of every option, visit
  # http://code.google.com/p/mongoose/wiki/MongooseManual
 
-root         $fqgitdir/gitweb
+root         $root

[...]

git-instaweb.sh error_log $fqgitdir/gitweb/error.log · line 370

Quoted 2 lines
git-instaweb.sh +1 -1
-cgi_env              PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
+cgi_env              PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH,GITWEB_CONFIG=$GITWEB_CONFIG

All right, those changes are pretty clear.

Quoted 16 lines
git-instaweb.sh +0 -0
@@ -277,14 +281,15 @@ EOF
 
  apache2_conf () {

      test -z "$module_path" && module_path=/usr/lib/apache2/modules
-     mkdir -p "$GIT_DIR/gitweb/logs"
      bind=
      test x"$local" = xtrue && bind='127.0.0.1:'
      echo 'text/css css' > "$fqgitdir/mime.types"
      cat > "$conf" <<EOF
 ServerName "git-instaweb"

git-instaweb.sh +4 -2
-ServerRoot "$fqgitdir/gitweb"
-DocumentRoot "$fqgitdir/gitweb"
+ServerRoot "$root"
+DocumentRoot "$root"
+ErrorLog "$fqgitdir/gitweb/error.log"
+CustomLog "$fqgitdir/gitweb/access.log" combined
Quoted 3 lines

 PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF

This is independent change, modifying configuration of apache2 web server to use the same files for access log and for error log ("$fqgitdir/gitweb/access.log" and "$fqgitdir/gitweb/error.log", respectively) as the rest of web servers.

Quoted 1 line

Isn't it?

Yes. But I included it in this commit because, it is not a big change to be included in another commit.

Quoted 36 lines
Quoted 12 lines
git-instaweb.sh +0 -0
@@ -370,41 +376,16 @@ mime_types      .gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-t

 EOF
 }

git-instaweb.sh +0 -8
-
-script='
-s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
-s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
-s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
-s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
-
-gitweb_cgi () {

[...]

Quoted 8 lines
git-instaweb.sh +7 -0
+gitweb_conf() {
+     cat > "$fqgitdir/gitweb/gitweb_config.perl" <<EOF
+#!/usr/bin/perl
+our \$projectroot = "$(dirname "$fqgitdir")";
+our \$git_temp = "$fqgitdir/gitweb/tmp";
+our \$projects_list = \$projectroot;
+EOF

 }

Right, $GIT (formerly $gitbin) is set when generating gitweb.cgi from gitweb.perl.

Actually $git_temp is not needed by modern gitweb (from quite some time, since using external /usr/bin/diff was replaced by git-diff-tree), so setting it could be removed from gitweb_config.perl.  Nevertheless it is not a problem having it.

Quoted 5 lines
git-instaweb.sh +1 -3
-gitweb_cgi "$GIT_DIR/gitweb/gitweb.cgi"
-gitweb_css "$GIT_DIR/@@GITWEB_CSS_NAME@@"
-gitweb_js  "$GIT_DIR/@@GITWEB_JS_NAME@@"
+gitweb_conf
Quoted 10 lines
Quoted 4 lines

 case "$httpd" in
 *lighttpd*)
--
1.7.1.18.g74211d.dirty

--
Jakub Narebski
Poland

Thanks
-Pavan

#3 lore raw
Quoted 7 lines · Pavan Kumar Sunkara

2010/5/22 Jakub Narebski <[email protected]>:

Quoted 6 lines · Pavan Kumar Sunkara

_If_ there is no problem with $(gitwebdir) and not $(gitwebdir_SQ), see below for details.

[...]

Quoted 26 lines
Quoted 17 lines
Quoted 6 lines
Makefile +0 -0
index caf2f64..91cd726 100644
@@ -1592,15 +1592,8 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/
       sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \

[...]

Quoted 10 lines

+         -e 's|@@GITWEBDIR@@|$(gitwebdir)|g' \
          -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
-            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
-            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
          [email protected]> $@+ && \
      chmod +x $@+ && \
      mv $@+ $@

Makefile +0 -0
@@ -1972,6 +1965,7 @@ install: all

      $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install ifndef NO_PERL

Quoted 8 lines
Quoted 3 lines

      $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
+     $(MAKE) -C gitweb gitwebdir=$(gitwebdir) install
 endif

Have you checked that you can use $(gitwebdir) and don't need $(gitwebdir_SQ) here?  Does git-instaweb installs and works correctly if 'gitwebdir' contains spaces and single or double quote characters? But perhaps that doesn't matter in practice, and this is good enough.

Quoted 1 line

Nope. I didn't check it. But you are right.

Does it mean that after your patch git-instaweb works correctly if 'gitwebdir' is set to something like (for example):

gitwebdir="/home/local/some strange \"path'"

Signature · 2 lines
Jakub Narebski
Poland
#4 lore raw

No. It doesn't.

Do you want me to make that change to and send the patch again ?

- Pavan

#5 lore raw
Quoted 1 line · Pavan Kumar Sunkara

Do you want me to make that change to and send the patch again ?

Yes, I would like you to.

And push this change to your repository after it is accepted as a final version. TIA.

Signature · 2 lines
Jakub Narebski
Poland