* [Patch 001/GSoC] Move static files into subdir @ 2010-05-09 13:56 Pavan Kumar Sunkara 2010-05-09 17:10 ` Christian Couder 2010-05-09 22:13 ` Jakub Narebski 0 siblings, 2 replies; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-09 13:56 UTC (permalink / raw) To: Git List, Petr Baudis, Christian Couder Hi, It's been a while I mail to this list since I got GSoC. But I have been in contact with Christian and Petr (mentors) everyday. As I am having my vacation, I decided to statrt the project earlier itself. Here's is my first patch in the process of my GSoC. One of my project goals is to split gitweb. This patch initiates the splitting. PATCH: >From e25db0b62b481e029354ad33af8f0615a8353633 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Date: Wed, 5 May 2010 21:44:57 -0700 Subject: [PATCH] Gitweb: Move all static files into a seperate directory This commit creates a new subdirectory called 'static' in gitweb which will contain all the static files required by gitweb.cgi while executing. By doing so, the gitweb source will be more readable and maintainable. Also changed INSTALL, README, Makefile and test files according to this change. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> --- gitweb/INSTALL | 20 ++++++++++---------- gitweb/Makefile | 20 ++++++++++---------- gitweb/README | 8 ++++---- gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes gitweb/{ => static}/gitweb.css | 0 gitweb/{ => static}/gitweb.js | 0 t/gitweb-lib.sh | 6 +++--- 8 files changed, 27 insertions(+), 27 deletions(-) rename gitweb/{ => static}/git-favicon.png (100%) rename gitweb/{ => static}/git-logo.png (100%) rename gitweb/{ => static}/gitweb.css (100%) rename gitweb/{ => static}/gitweb.js (100%) diff --git a/gitweb/INSTALL b/gitweb/INSTALL index cbdc136..60c25ff 100644 --- a/gitweb/INSTALL +++ b/gitweb/INSTALL @@ -7,7 +7,8 @@ gitweb.css, git-logo.png and git-favicon.png) to their destination. For example if git was (or is) installed with /usr prefix, you can do $ make prefix=/usr gitweb ;# as yourself - # cp gitweb/git* /var/www/cgi-bin/ ;# as root + # cp gitweb/gitweb.cgi /var/www/cgi-bin/ ;# as root + # cp -r gitweb/static /var/www/cgi-bin/ ;# as root Alternatively you can use autoconf generated ./configure script to set up path to git binaries (via config.mak.autogen), so you can write @@ -16,7 +17,8 @@ instead $ make configure ;# as yourself $ ./configure --prefix=/usr ;# as yourself $ make gitweb ;# as yourself - # cp gitweb/git* /var/www/cgi-bin/ ;# as root + # cp gitweb/gitweb.cgi /var/www/cgi-bin/ ;# as root + # cp -r gitweb/static /var/www/cgi-bin/ ;# as root The above example assumes that your web server is configured to run [executable] files in /var/www/cgi-bin/ as server scripts (as CGI @@ -79,17 +81,15 @@ Build example we want to display are under /home/local/scm, you can do make GITWEB_PROJECTROOT="/home/local/scm" \ - GITWEB_JS="/gitweb/gitweb.js" \ - GITWEB_CSS="/gitweb/gitweb.css" \ - GITWEB_LOGO="/gitweb/git-logo.png" \ - GITWEB_FAVICON="/gitweb/git-favicon.png" \ + GITWEB_JS="/gitweb/static/gitweb.js" \ + GITWEB_CSS="/gitweb/static/gitweb.css" \ + GITWEB_LOGO="/gitweb/static/git-logo.png" \ + GITWEB_FAVICON="/gitweb/static/git-favicon.png" \ bindir=/usr/local/bin \ gitweb - cp -fv ~/git/gitweb/gitweb.{cgi,js,css} \ - ~/git/gitweb/git-{favicon,logo}.png \ - /var/www/cgi-bin/gitweb/ - + cp -fv gitweb/gitweb.cgi /var/www/cgi-bin/gitweb/ + cp -r gitweb/static /var/www/cgi-bin/gitweb/ Gitweb config file ------------------ diff --git a/gitweb/Makefile b/gitweb/Makefile index f2e1d92..c0d5da3 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -26,10 +26,10 @@ GITWEB_STRICT_EXPORT = GITWEB_BASE_URL = GITWEB_LIST = GITWEB_HOMETEXT = indextext.html -GITWEB_CSS = gitweb.css -GITWEB_LOGO = git-logo.png -GITWEB_FAVICON = git-favicon.png -GITWEB_JS = gitweb.js +GITWEB_CSS = static/gitweb.css +GITWEB_LOGO = static/git-logo.png +GITWEB_FAVICON = static/git-favicon.png +GITWEB_JS = static/gitweb.js GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER = @@ -81,16 +81,16 @@ endif all:: gitweb.cgi ifdef JSMIN -GITWEB_JS = gitweb.min.js -all:: gitweb.min.js -gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS +GITWEB_JS = static/gitweb.min.js +all:: static/gitweb.min.js +static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(JSMIN) <$< >$@ endif ifdef CSSMIN -GITWEB_CSS = gitweb.min.css -all:: gitweb.min.css -gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS +GITWEB_CSS = static/gitweb.min.css +all:: static/gitweb.min.css +static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(CSSMIN) <$ >$@ endif diff --git a/gitweb/README b/gitweb/README index 71742b3..eeac204 100644 --- a/gitweb/README +++ b/gitweb/README @@ -80,23 +80,23 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the + the gitweb config file. [Default: static/gitweb.css (or gitweb.min.css if the CSSMIN variable is defined / CSS minifier is used)] * GITWEB_LOGO Points to the location where you put git-logo.png on your web server (or to be more generic URI of logo, 72x27 size, displayed in top right corner of each gitweb page, and used as logo for Atom feed). Relative - to base URI of gitweb. [Default: git-logo.png] + to base URI of gitweb. [Default: static/git-logo.png] * GITWEB_FAVICON Points to the location where you put git-favicon.png on your web server (or to be more generic URI of favicon, assumed to be image/png type; web browsers that support favicons (website icons) may display them in the browser's URL bar and next to site name in bookmarks). Relative - to base URI of gitweb. [Default: git-favicon.png] + to base URI of gitweb. [Default: static/git-favicon.png] * GITWEB_JS Points to the localtion where you put gitweb.js on your web server (or to be more generic URI of JavaScript code used by gitweb). - Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js + Relative to base URI of gitweb. [Default: static/gitweb.js (or gitweb.min.js if JSMIN build variable is defined / JavaScript minifier is used)] * GITWEB_CONFIG This Perl file will be loaded using 'do' and can be used to override any diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css similarity index 100% rename from gitweb/gitweb.css rename to gitweb/static/gitweb.css diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js similarity index 100% rename from gitweb/gitweb.js rename to gitweb/static/gitweb.js diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh index 5a734b1..b70b891 100644 --- a/t/gitweb-lib.sh +++ b/t/gitweb-lib.sh @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; our \$site_header = ''; our \$site_footer = ''; our \$home_text = 'indextext.html'; -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; our \$projects_list = ''; our \$export_ok = ''; our \$strict_export = ''; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Patch 001/GSoC] Move static files into subdir 2010-05-09 13:56 [Patch 001/GSoC] Move static files into subdir Pavan Kumar Sunkara @ 2010-05-09 17:10 ` Christian Couder 2010-05-09 17:48 ` Pavan Kumar Sunkara 2010-05-09 22:13 ` Jakub Narebski 1 sibling, 1 reply; 17+ messages in thread From: Christian Couder @ 2010-05-09 17:10 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Git List, Petr Baudis On Sunday 09 May 2010 15:56:30 Pavan Kumar Sunkara wrote: Hi, > Hi, > > It's been a while I mail to this list since I got GSoC. But I have > been in contact with Christian and Petr (mentors) everyday. As I am > having my vacation, I decided to statrt the project earlier itself. > Here's is my first patch in the process of my GSoC. > > One of my project goals is to split gitweb. This patch initiates the > splitting. All of the above should go after the three dashes and before the diffstat bellow. Please try to look at the submitting patch documentation and what other people's patches look like. > From e25db0b62b481e029354ad33af8f0615a8353633 Mon Sep 17 00:00:00 2001 > From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > Date: Wed, 5 May 2010 21:44:57 -0700 The above line should not appear. > Subject: [PATCH] Gitweb: Move all static files into a seperate directory This line should be the subject of your email. If you really want to say that it's a GSoC patch you can use [PATCH GSoC] instead of [PATCH] but please don't put "001/GSoC". > This commit creates a new subdirectory called 'static' in gitweb > which will contain all the static files required by gitweb.cgi > while executing. By doing so, the gitweb source will be more > readable and maintainable. > > Also changed INSTALL, README, Makefile and test files > according to this change. > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > --- The comments that you put on top of the patch should go here. > gitweb/INSTALL | 20 ++++++++++---------- > gitweb/Makefile | 20 ++++++++++---------- > gitweb/README | 8 ++++---- > gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes > gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes > gitweb/{ => static}/gitweb.css | 0 > gitweb/{ => static}/gitweb.js | 0 > t/gitweb-lib.sh | 6 +++--- > 8 files changed, 27 insertions(+), 27 deletions(-) > rename gitweb/{ => static}/git-favicon.png (100%) > rename gitweb/{ => static}/git-logo.png (100%) > rename gitweb/{ => static}/gitweb.css (100%) > rename gitweb/{ => static}/gitweb.js (100%) [...] Regards, Christian. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch 001/GSoC] Move static files into subdir 2010-05-09 17:10 ` Christian Couder @ 2010-05-09 17:48 ` Pavan Kumar Sunkara 0 siblings, 0 replies; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-09 17:48 UTC (permalink / raw) To: Christian Couder; +Cc: Git List, Petr Baudis I will try to follow them from next time onwards. Thanks - Pavan On Sun, May 9, 2010 at 10:40 PM, Christian Couder <chriscool@tuxfamily.org> wrote: > On Sunday 09 May 2010 15:56:30 Pavan Kumar Sunkara wrote: > Hi, > >> Hi, >> >> It's been a while I mail to this list since I got GSoC. But I have >> been in contact with Christian and Petr (mentors) everyday. As I am >> having my vacation, I decided to statrt the project earlier itself. >> Here's is my first patch in the process of my GSoC. >> >> One of my project goals is to split gitweb. This patch initiates the >> splitting. > > All of the above should go after the three dashes and before the diffstat > bellow. > > Please try to look at the submitting patch documentation and what other > people's patches look like. > >> From e25db0b62b481e029354ad33af8f0615a8353633 Mon Sep 17 00:00:00 2001 >> From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> >> Date: Wed, 5 May 2010 21:44:57 -0700 > > The above line should not appear. > >> Subject: [PATCH] Gitweb: Move all static files into a seperate directory > > This line should be the subject of your email. > If you really want to say that it's a GSoC patch you can use [PATCH GSoC] > instead of [PATCH] but please don't put "001/GSoC". > >> This commit creates a new subdirectory called 'static' in gitweb >> which will contain all the static files required by gitweb.cgi >> while executing. By doing so, the gitweb source will be more >> readable and maintainable. >> >> Also changed INSTALL, README, Makefile and test files >> according to this change. >> >> Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> >> --- > > The comments that you put on top of the patch should go here. > >> gitweb/INSTALL | 20 ++++++++++---------- >> gitweb/Makefile | 20 ++++++++++---------- >> gitweb/README | 8 ++++---- >> gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes >> gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes >> gitweb/{ => static}/gitweb.css | 0 >> gitweb/{ => static}/gitweb.js | 0 >> t/gitweb-lib.sh | 6 +++--- >> 8 files changed, 27 insertions(+), 27 deletions(-) >> rename gitweb/{ => static}/git-favicon.png (100%) >> rename gitweb/{ => static}/git-logo.png (100%) >> rename gitweb/{ => static}/gitweb.css (100%) >> rename gitweb/{ => static}/gitweb.js (100%) > > [...] > > Regards, > Christian. > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch 001/GSoC] Move static files into subdir 2010-05-09 13:56 [Patch 001/GSoC] Move static files into subdir Pavan Kumar Sunkara 2010-05-09 17:10 ` Christian Couder @ 2010-05-09 22:13 ` Jakub Narebski 2010-05-10 11:44 ` Pavan Kumar Sunkara 1 sibling, 1 reply; 17+ messages in thread From: Jakub Narebski @ 2010-05-09 22:13 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Git List, Petr Baudis, Christian Couder Pavan Kumar Sunkara <pavan.sss1991@gmail.com> writes: > Hi, > > It's been a while I mail to this list since I got GSoC. But I have > been in contact with Christian and Petr (mentors) everyday. As I am > having my vacation, I decided to statrt the project earlier itself. > Here's is my first patch in the process of my GSoC. > > One of my project goals is to split gitweb. This patch initiates the splitting. > > PATCH: > > From e25db0b62b481e029354ad33af8f0615a8353633 Mon Sep 17 00:00:00 2001 > From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > Date: Wed, 5 May 2010 21:44:57 -0700 > Subject: [PATCH] Gitweb: Move all static files into a seperate directory Almost all right. Please read Documentation/SubmittingChanges first. There are two ways of submitting a patch with some comment about patch that should not be put in commit message. The first is to put first line (summary) of a commit message, in your case [PATCH GSoC] gitweb: Move all static files into a seperate directory in *email* subject, and put comments about patch itself between "---\n" line and diffstat (see also below). The second, used for example if the patch is byproduct of an email, is to write comment in the email, and add patch itself after a separator. Commonly used separator is 'scissors' line (see git-mailinfo(1)), e.g. "-- >8 --\n" line. You need to write 'Subject:' line _only_ if the subject of an email is different. The first is more commonly used, as you can see by looking at emails marked with '[PATCH]' in git mailing list; you can use mailing list archive like MARC or GMane, or GMane NNTP (Usenet) interface reading it with news reader. > This commit creates a new subdirectory called 'static' in gitweb > which will contain all the static files required by gitweb.cgi > while executing. By doing so, the gitweb source will be more > readable and maintainable. A minor issue: commit messages are usually written in imperative; also I'd rather avoid marketspeak-sounding "will be": Create a new subdirectory called 'static' in gitweb/, and move all static files required by gitweb.cgi when running, which means styles, images and Javascript code. This should make gitweb more readable and easier to maintain. I also wonder how other project solve this issue. Well, Gitalist uses 'root/static/'... > > Also changed INSTALL, README, Makefile and test files > according to this change. A minor issue: "Also changed" doesn't look like correct English grammar for me. I am not a native English speaker either, but I would personally write: Update t/gitweb-lib.sh to reflect this change. The default is now to install static files also in 'static' subdirectory in target directory: update gitweb's INSTALL, README and Makefile accordingly. Note that favicon.ico should be installed in top directory, but I think it doesn't really matter where is git-favicon.png as long as '<link rel="shortcut icon" ... />' points in correct place... > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > --- > gitweb/INSTALL | 20 ++++++++++---------- > gitweb/Makefile | 20 ++++++++++---------- > gitweb/README | 8 ++++---- > gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes > gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes > gitweb/{ => static}/gitweb.css | 0 > gitweb/{ => static}/gitweb.js | 0 > t/gitweb-lib.sh | 6 +++--- > 8 files changed, 27 insertions(+), 27 deletions(-) > rename gitweb/{ => static}/git-favicon.png (100%) > rename gitweb/{ => static}/git-logo.png (100%) > rename gitweb/{ => static}/gitweb.css (100%) > rename gitweb/{ => static}/gitweb.js (100%) You might need to update also git-instaweb.sh and generating git-instaweb in main Makefile. > > diff --git a/gitweb/INSTALL b/gitweb/INSTALL > index cbdc136..60c25ff 100644 > --- a/gitweb/INSTALL > +++ b/gitweb/INSTALL > @@ -7,7 +7,8 @@ gitweb.css, git-logo.png and git-favicon.png) to their > destination. > For example if git was (or is) installed with /usr prefix, you can do > > $ make prefix=/usr gitweb ;# as yourself > - # cp gitweb/git* /var/www/cgi-bin/ ;# as root > + # cp gitweb/gitweb.cgi /var/www/cgi-bin/ ;# as root > + # cp -r gitweb/static /var/www/cgi-bin/ ;# as root This assumes that ones 'cp' support -r / --recursive option. How portable is this? But I think this might be all right in an example. > @@ -79,17 +81,15 @@ Build example > we want to display are under /home/local/scm, you can do > > make GITWEB_PROJECTROOT="/home/local/scm" \ > - GITWEB_JS="/gitweb/gitweb.js" \ > - GITWEB_CSS="/gitweb/gitweb.css" \ > - GITWEB_LOGO="/gitweb/git-logo.png" \ > - GITWEB_FAVICON="/gitweb/git-favicon.png" \ > + GITWEB_JS="/gitweb/static/gitweb.js" \ > + GITWEB_CSS="/gitweb/static/gitweb.css" \ > + GITWEB_LOGO="/gitweb/static/git-logo.png" \ > + GITWEB_FAVICON="/gitweb/static/git-favicon.png" \ > bindir=/usr/local/bin \ > gitweb > > - cp -fv ~/git/gitweb/gitweb.{cgi,js,css} \ > - ~/git/gitweb/git-{favicon,logo}.png \ > - /var/www/cgi-bin/gitweb/ > - > + cp -fv gitweb/gitweb.cgi /var/www/cgi-bin/gitweb/ > + cp -r gitweb/static /var/www/cgi-bin/gitweb/ Sidenote (something to think about in the future): we might want to put static files in /var/www/html/gitweb/ (but not in /var/www/html/gitweb/static/), outside of where gitweb.cgi is put. > diff --git a/gitweb/Makefile b/gitweb/Makefile > index f2e1d92..c0d5da3 100644 > --- a/gitweb/Makefile > +++ b/gitweb/Makefile > @@ -26,10 +26,10 @@ GITWEB_STRICT_EXPORT = > GITWEB_BASE_URL = > GITWEB_LIST = > GITWEB_HOMETEXT = indextext.html > -GITWEB_CSS = gitweb.css > -GITWEB_LOGO = git-logo.png > -GITWEB_FAVICON = git-favicon.png > -GITWEB_JS = gitweb.js > +GITWEB_CSS = static/gitweb.css > +GITWEB_LOGO = static/git-logo.png > +GITWEB_FAVICON = static/git-favicon.png > +GITWEB_JS = static/gitweb.js > GITWEB_SITE_HEADER = > GITWEB_SITE_FOOTER = > > @@ -81,16 +81,16 @@ endif > all:: gitweb.cgi > > ifdef JSMIN > -GITWEB_JS = gitweb.min.js > -all:: gitweb.min.js > -gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS > +GITWEB_JS = static/gitweb.min.js > +all:: static/gitweb.min.js > +static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS > $(QUIET_GEN)$(JSMIN) <$< >$@ > endif > > ifdef CSSMIN > -GITWEB_CSS = gitweb.min.css > -all:: gitweb.min.css > -gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS > +GITWEB_CSS = static/gitweb.min.css > +all:: static/gitweb.min.css > +static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS > $(QUIET_GEN)$(CSSMIN) <$ >$@ > endif You need to update 'clean' target in gitweb/Makefile too. > diff --git a/gitweb/README b/gitweb/README > index 71742b3..eeac204 100644 > --- a/gitweb/README > +++ b/gitweb/README > @@ -80,23 +80,23 @@ You can specify the following configuration > variables when building GIT: > Points to the location where you put gitweb.css on your web server > (or to be more generic, the URI of gitweb stylesheet). Relative to the > base URI of gitweb. Note that you can setup multiple stylesheets from > - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the > + the gitweb config file. [Default: static/gitweb.css (or > gitweb.min.css if the > CSSMIN variable is defined / CSS minifier is used)] Word wrapped patch. It should read: @@ -80,23 +80,23 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the + the gitweb config file. [Default: static/gitweb.css (or gitweb.min.css if the CSSMIN variable is defined / CSS minifier is used)] You need to turn off line wrapping in your email client when sending a patch. Here it is minor issue. Also you forgot to update gitweb.min.css to static/gitweb.min.css... in which case you should probably rewrap this line to: @@ -80,24 +80,24 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the - CSSMIN variable is defined / CSS minifier is used)] + the gitweb config file. [Default: static/gitweb.css (or static/gitweb.min.css + if the CSSMIN variable is defined / CSS minifier is used)] [...] > - Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js > + Relative to base URI of gitweb. [Default: static/gitweb.js (or > gitweb.min.js Word-wrapped. > diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css > similarity index 100% > rename from gitweb/gitweb.css > rename to gitweb/static/gitweb.css Good! [...] > diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh > index 5a734b1..b70b891 100644 > --- a/t/gitweb-lib.sh > +++ b/t/gitweb-lib.sh > @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; > our \$site_header = ''; > our \$site_footer = ''; > our \$home_text = 'indextext.html'; > -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); > -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; > -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; > +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); > +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; > +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; > our \$projects_list = ''; > our \$export_ok = ''; > our \$strict_export = ''; Thanks for thinking about this... although it doesn't really matter, as it is not served to a web browser. -- Jakub Narebski Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch 001/GSoC] Move static files into subdir 2010-05-09 22:13 ` Jakub Narebski @ 2010-05-10 11:44 ` Pavan Kumar Sunkara 2010-05-10 11:53 ` Ramkumar Ramachandra 2010-05-10 12:55 ` [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory Jakub Narebski 0 siblings, 2 replies; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-10 11:44 UTC (permalink / raw) To: Jakub Narebski; +Cc: Git List, Petr Baudis, Christian Couder Gitweb: Move static files into seperate subdirectory Create a new subdirectory called 'static' in gitweb/, and move all static files required by gitweb.cgi when running, which means styles, images and Javascript code. This should make gitweb more readable and easier to maintain. Update t/gitweb-lib.sh to reflect this change. The default is now to install static files also in 'static' subdirectory in target directory: update Makefile, gitweb's INSTALL, README and Makefile accordingly. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> --- Makefile | 20 ++++++++++---------- gitweb/INSTALL | 20 ++++++++++---------- gitweb/Makefile | 20 ++++++++++---------- gitweb/README | 13 +++++++------ gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes gitweb/{ => static}/gitweb.css | 0 gitweb/{ => static}/gitweb.js | 0 t/gitweb-lib.sh | 6 +++--- 9 files changed, 40 insertions(+), 39 deletions(-) rename gitweb/{ => static}/git-favicon.png (100%) rename gitweb/{ => static}/git-logo.png (100%) rename gitweb/{ => static}/gitweb.css (100%) rename gitweb/{ => static}/gitweb.js (100%) diff --git a/Makefile b/Makefile index 910f471..fe34c22 100644 --- a/Makefile +++ b/Makefile @@ -1561,32 +1561,32 @@ gitweb: $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all ifdef JSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.js -GITWEB_JS = gitweb/gitweb.min.js +GITWEB_PROGRAMS += gitweb/static/gitweb.min.js +GITWEB_JS = gitweb/static/gitweb.min.js else -GITWEB_JS = gitweb/gitweb.js +GITWEB_JS = gitweb/static/gitweb.js endif ifdef CSSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.css -GITWEB_CSS = gitweb/gitweb.min.css +GITWEB_PROGRAMS += gitweb/static/gitweb.min.css +GITWEB_CSS = gitweb/static/gitweb.min.css else -GITWEB_CSS = gitweb/gitweb.css +GITWEB_CSS = gitweb/static/gitweb.css endif OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS) gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS) $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) ifdef JSMIN -gitweb/gitweb.min.js: gitweb/gitweb.js +gitweb/static/gitweb.min.js: gitweb/static/gitweb.js $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # JSMIN ifdef CSSMIN -gitweb/gitweb.min.css: gitweb/gitweb.css +gitweb/static/gitweb.min.css: gitweb/static/gitweb.css $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # CSSMIN -git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js $(QUIET_GEN)$(RM) $@ $@+ && \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ @@ -2098,7 +2098,7 @@ clean: $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean ifndef NO_PERL - $(RM) gitweb/gitweb.cgi gitweb/gitweb.min.* + $(RM) gitweb/gitweb.cgi gitweb/static/gitweb.min.* $(MAKE) -C perl clean endif ifndef NO_PYTHON diff --git a/gitweb/INSTALL b/gitweb/INSTALL index cbdc136..0b4693f 100644 --- a/gitweb/INSTALL +++ b/gitweb/INSTALL @@ -7,7 +7,8 @@ gitweb.css, git-logo.png and git-favicon.png) to their destination. For example if git was (or is) installed with /usr prefix, you can do $ make prefix=/usr gitweb ;# as yourself - # cp gitweb/git* /var/www/cgi-bin/ ;# as root + # cp gitweb/gitweb.cgi /var/www/cgi-bin/ ;# as root + # cp -r gitweb/static /var/www/cgi-bin/ ;# as root Alternatively you can use autoconf generated ./configure script to set up path to git binaries (via config.mak.autogen), so you can write @@ -16,7 +17,8 @@ instead $ make configure ;# as yourself $ ./configure --prefix=/usr ;# as yourself $ make gitweb ;# as yourself - # cp gitweb/git* /var/www/cgi-bin/ ;# as root + # cp gitweb/gitweb.cgi /var/www/cgi-bin/ ;# as root + # cp -r gitweb/static /var/www/cgi-bin/ ;# as root The above example assumes that your web server is configured to run [executable] files in /var/www/cgi-bin/ as server scripts (as CGI @@ -79,17 +81,15 @@ Build example we want to display are under /home/local/scm, you can do make GITWEB_PROJECTROOT="/home/local/scm" \ - GITWEB_JS="/gitweb/gitweb.js" \ - GITWEB_CSS="/gitweb/gitweb.css" \ - GITWEB_LOGO="/gitweb/git-logo.png" \ - GITWEB_FAVICON="/gitweb/git-favicon.png" \ + GITWEB_JS="/gitweb/static/gitweb.js" \ + GITWEB_CSS="/gitweb/static/gitweb.css" \ + GITWEB_LOGO="/gitweb/static/git-logo.png" \ + GITWEB_FAVICON="/gitweb/static/git-favicon.png" \ bindir=/usr/local/bin \ gitweb - cp -fv ~/git/gitweb/gitweb.{cgi,js,css} \ - ~/git/gitweb/git-{favicon,logo}.png \ - /var/www/cgi-bin/gitweb/ - + cp -fv ~/git/gitweb/gitweb.cgi /var/www/cgi-bin/gitweb/ + cp -r ~/git/gitweb/static /var/www/cgi-bin/gitweb/ Gitweb config file ------------------ diff --git a/gitweb/Makefile b/gitweb/Makefile index f2e1d92..c0d5da3 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -26,10 +26,10 @@ GITWEB_STRICT_EXPORT = GITWEB_BASE_URL = GITWEB_LIST = GITWEB_HOMETEXT = indextext.html -GITWEB_CSS = gitweb.css -GITWEB_LOGO = git-logo.png -GITWEB_FAVICON = git-favicon.png -GITWEB_JS = gitweb.js +GITWEB_CSS = static/gitweb.css +GITWEB_LOGO = static/git-logo.png +GITWEB_FAVICON = static/git-favicon.png +GITWEB_JS = static/gitweb.js GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER = @@ -81,16 +81,16 @@ endif all:: gitweb.cgi ifdef JSMIN -GITWEB_JS = gitweb.min.js -all:: gitweb.min.js -gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS +GITWEB_JS = static/gitweb.min.js +all:: static/gitweb.min.js +static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(JSMIN) <$< >$@ endif ifdef CSSMIN -GITWEB_CSS = gitweb.min.css -all:: gitweb.min.css -gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS +GITWEB_CSS = static/gitweb.min.css +all:: static/gitweb.min.css +static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(CSSMIN) <$ >$@ endif diff --git a/gitweb/README b/gitweb/README index 71742b3..8e063c0 100644 --- a/gitweb/README +++ b/gitweb/README @@ -80,24 +80,25 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the - CSSMIN variable is defined / CSS minifier is used)] + the gitweb config file. [Default: static/gitweb.css (or static/gitweb.min.css + if the CSSMIN variable is defined / CSS minifier is used)] * GITWEB_LOGO Points to the location where you put git-logo.png on your web server (or to be more generic URI of logo, 72x27 size, displayed in top right corner of each gitweb page, and used as logo for Atom feed). Relative - to base URI of gitweb. [Default: git-logo.png] + to base URI of gitweb. [Default: static/git-logo.png] * GITWEB_FAVICON Points to the location where you put git-favicon.png on your web server (or to be more generic URI of favicon, assumed to be image/png type; web browsers that support favicons (website icons) may display them in the browser's URL bar and next to site name in bookmarks). Relative - to base URI of gitweb. [Default: git-favicon.png] + to base URI of gitweb. [Default: static/git-favicon.png] * GITWEB_JS Points to the localtion where you put gitweb.js on your web server (or to be more generic URI of JavaScript code used by gitweb). - Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js - if JSMIN build variable is defined / JavaScript minifier is used)] + Relative to base URI of gitweb. [Default: static/gitweb.js (or + static/gitweb.min.js if JSMIN build variable is defined / JavaScript + minifier is used)] * GITWEB_CONFIG This Perl file will be loaded using 'do' and can be used to override any of the options above as well as some other options -- see the "Runtime diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css similarity index 100% rename from gitweb/gitweb.css rename to gitweb/static/gitweb.css diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js similarity index 100% rename from gitweb/gitweb.js rename to gitweb/static/gitweb.js diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh index 5a734b1..b70b891 100644 --- a/t/gitweb-lib.sh +++ b/t/gitweb-lib.sh @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; our \$site_header = ''; our \$site_footer = ''; our \$home_text = 'indextext.html'; -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; our \$projects_list = ''; our \$export_ok = ''; our \$strict_export = ''; -- 1.7.0.4 This is the new patch which includes the changes suggested by Jakub. Regarding wordwrap, all the mailing ports in my university are closed which leaves me only the gmail web cient which don't have any option to disable wordwrap. I will try to find a workaround for this. Please bear with my wordwrap until then. Thanks -Pavan ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Patch 001/GSoC] Move static files into subdir 2010-05-10 11:44 ` Pavan Kumar Sunkara @ 2010-05-10 11:53 ` Ramkumar Ramachandra 2010-05-10 12:55 ` [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory Jakub Narebski 1 sibling, 0 replies; 17+ messages in thread From: Ramkumar Ramachandra @ 2010-05-10 11:53 UTC (permalink / raw) To: Pavan Kumar Sunkara Cc: Jakub Narebski, Git List, Petr Baudis, Christian Couder Hi, > Regarding wordwrap, all the mailing ports in my university are closed > which leaves me only the gmail web cient which don't have any option > to disable wordwrap. I will try to find a workaround for this. Please > bear with my wordwrap until then. I was in a similar situation earlier. My suggestion: find out if your firewall allows HTTP CONNECT on all the ports; if it does, simply use something similar to Corkscrew. If it doesn't, I suggest that you buy a VPS from a cheap provider who'll allow you to listen for SSH connections on port 443, and use that to send email. I've found that git-send-email + msmtp is a good combination. If you don't want to copy files over to the server everytime you want to send email, can use something similar to proxychains. Hope this helps. -- Ram ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-10 11:44 ` Pavan Kumar Sunkara 2010-05-10 11:53 ` Ramkumar Ramachandra @ 2010-05-10 12:55 ` Jakub Narebski 2010-05-10 13:01 ` Pavan Kumar Sunkara 1 sibling, 1 reply; 17+ messages in thread From: Jakub Narebski @ 2010-05-10 12:55 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Git List, Petr Baudis, Christian Couder Only minor comments about submission itself. Patch I think is now all right with added required changes to main Makefile. On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: > Gitweb: Move static files into seperate subdirectory This should be the subject of an email, like now is (only without "Re:"), and this line should be missing from email body. Or you need to use Subject: gitweb: Move static files into seperate subdirectory It is customary to start subsystem prefix with lowercase. > > Create a new subdirectory called 'static' in gitweb/, and move > all static files required by gitweb.cgi when running, which means > styles, images and Javascript code. This should make gitweb more > readable and easier to maintain. > > Update t/gitweb-lib.sh to reflect this change. The default is > now to install static files also in 'static' subdirectory in target > directory: update Makefile, gitweb's INSTALL, README and Makefile > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > --- The comments about patch itself should be put *here*, between "---\n" and diffstat. > > This is the new patch which includes the changes suggested by Jakub. > > Regarding wordwrap, all the mailing ports in my university are closed > which leaves me only the gmail web cient which don't have any option > to disable wordwrap. I will try to find a workaround for this. Please > bear with my wordwrap until then. > > Thanks > -Pavan Like this. > Makefile | 20 ++++++++++---------- > gitweb/INSTALL | 20 ++++++++++---------- > gitweb/Makefile | 20 ++++++++++---------- > gitweb/README | 13 +++++++------ > gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes > gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes > gitweb/{ => static}/gitweb.css | 0 > gitweb/{ => static}/gitweb.js | 0 > t/gitweb-lib.sh | 6 +++--- > 9 files changed, 40 insertions(+), 39 deletions(-) > rename gitweb/{ => static}/git-favicon.png (100%) > rename gitweb/{ => static}/git-logo.png (100%) > rename gitweb/{ => static}/gitweb.css (100%) > rename gitweb/{ => static}/gitweb.js (100%) [...] -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-10 12:55 ` [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory Jakub Narebski @ 2010-05-10 13:01 ` Pavan Kumar Sunkara 2010-05-11 23:27 ` Jakub Narebski 0 siblings, 1 reply; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-10 13:01 UTC (permalink / raw) To: Jakub Narebski; +Cc: Git List, Petr Baudis, Christian Couder On Monday 10 May 2010 06:25 PM, Jakub Narebski wrote: > Only minor comments about submission itself. Patch I think is now > all right with added required changes to main Makefile. > > > On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: > > >> Gitweb: Move static files into seperate subdirectory >> > This should be the subject of an email, like now is (only without > "Re:"), and this line should be missing from email body. > > Or you need to use > > Subject: gitweb: Move static files into seperate subdirectory > > It is customary to start subsystem prefix with lowercase. > > >> Create a new subdirectory called 'static' in gitweb/, and move >> all static files required by gitweb.cgi when running, which means >> styles, images and Javascript code. This should make gitweb more >> readable and easier to maintain. >> >> Update t/gitweb-lib.sh to reflect this change. The default is >> now to install static files also in 'static' subdirectory in target >> directory: update Makefile, gitweb's INSTALL, README and Makefile >> >> Signed-off-by: Pavan Kumar Sunkara<pavan.sss1991@gmail.com> >> --- >> > The comments about patch itself should be put *here*, between "---\n" > and diffstat. > > >> This is the new patch which includes the changes suggested by Jakub. >> >> Regarding wordwrap, all the mailing ports in my university are closed >> which leaves me only the gmail web cient which don't have any option >> to disable wordwrap. I will try to find a workaround for this. Please >> bear with my wordwrap until then. >> >> Thanks >> -Pavan >> > > Like this. > > >> Makefile | 20 ++++++++++---------- >> gitweb/INSTALL | 20 ++++++++++---------- >> gitweb/Makefile | 20 ++++++++++---------- >> gitweb/README | 13 +++++++------ >> gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes >> gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes >> gitweb/{ => static}/gitweb.css | 0 >> gitweb/{ => static}/gitweb.js | 0 >> t/gitweb-lib.sh | 6 +++--- >> 9 files changed, 40 insertions(+), 39 deletions(-) >> rename gitweb/{ => static}/git-favicon.png (100%) >> rename gitweb/{ => static}/git-logo.png (100%) >> rename gitweb/{ => static}/gitweb.css (100%) >> rename gitweb/{ => static}/gitweb.js (100%) >> > [...] > Ok. I will follow this format from next time onwards. And thanks to ramkumar I found a solution to use email clients on ports. I would like to know when this patch will be merged. Thanks - Pavan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-10 13:01 ` Pavan Kumar Sunkara @ 2010-05-11 23:27 ` Jakub Narebski 2010-05-12 5:15 ` Pavan Kumar Sunkara 2010-05-12 7:52 ` [PATCHv3 " Pavan Kumar Sunkara 0 siblings, 2 replies; 17+ messages in thread From: Jakub Narebski @ 2010-05-11 23:27 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Git List, Petr Baudis, Christian Couder On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: > On Monday 10 May 2010 06:25 PM, Jakub Narebski wrote: >> On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: >> >>> Gitweb: Move static files into seperate subdirectory >>> >>> Create a new subdirectory called 'static' in gitweb/, and move >>> all static files required by gitweb.cgi when running, which means >>> styles, images and Javascript code. This should make gitweb more >>> readable and easier to maintain. >>> >>> Update t/gitweb-lib.sh to reflect this change. The default is >>> now to install static files also in 'static' subdirectory in target >>> directory: update Makefile, gitweb's INSTALL, README and Makefile >>> >>> Signed-off-by: Pavan Kumar Sunkara<pavan.sss1991@gmail.com> > I would like to know when this patch will be merged. Note please that this patch conflict on semantic level with the patch adding support for 'install' target in gitweb/Makefile (and install-gitweb to the main Makefile), which means that either this one or the 'jn/gitweb-install' would have to be changed. -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-11 23:27 ` Jakub Narebski @ 2010-05-12 5:15 ` Pavan Kumar Sunkara 2010-05-12 7:52 ` [PATCHv3 " Pavan Kumar Sunkara 1 sibling, 0 replies; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-12 5:15 UTC (permalink / raw) To: Jakub Narebski; +Cc: Git List, Petr Baudis, Christian Couder On Wed, May 12, 2010 at 4:57 AM, Jakub Narebski <jnareb@gmail.com> wrote: > On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: >> On Monday 10 May 2010 06:25 PM, Jakub Narebski wrote: >>> On Mon, 10 May 2010, Pavan Kumar Sunkara wrote: >>> >>>> Gitweb: Move static files into seperate subdirectory >>>> >>>> Create a new subdirectory called 'static' in gitweb/, and move >>>> all static files required by gitweb.cgi when running, which means >>>> styles, images and Javascript code. This should make gitweb more >>>> readable and easier to maintain. >>>> >>>> Update t/gitweb-lib.sh to reflect this change. The default is >>>> now to install static files also in 'static' subdirectory in target >>>> directory: update Makefile, gitweb's INSTALL, README and Makefile >>>> >>>> Signed-off-by: Pavan Kumar Sunkara<pavan.sss1991@gmail.com> > >> I would like to know when this patch will be merged. > > Note please that this patch conflict on semantic level with the > patch adding support for 'install' target in gitweb/Makefile (and > install-gitweb to the main Makefile), which means that either this > one or the 'jn/gitweb-install' would have to be changed. > > -- > Jakub Narebski > Poland > Yeah, actually me and petr have been discussing about 'install' target in gitweb/Makefile. So, I will apply these 2 patches http://repo.or.cz/w/alt-git.git/patch/152d94348f6a38eb7cb5f4af8397f51ba06ddffb http://repo.or.cz/w/alt-git.git/patch/8515392f5d4c5a36a0f9e4a73068f7106d7f4638 and resubmit this patch. Thanks - Pavan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-11 23:27 ` Jakub Narebski 2010-05-12 5:15 ` Pavan Kumar Sunkara @ 2010-05-12 7:52 ` Pavan Kumar Sunkara 2010-05-13 8:54 ` Christian Couder 1 sibling, 1 reply; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-12 7:52 UTC (permalink / raw) To: Jakub Narebski; +Cc: Git List, Petr Baudis, Christian Couder Create a new subdirectory called 'static' in gitweb/, and move all static files required by gitweb.cgi when running, which means styles, images and Javascript code. This should make gitweb more readable and easier to maintain. Update t/gitweb-lib.sh to reflect this change.The install-gitweb now also include moving of static files into 'static' subdirectory in target directory: update Makefile, gitweb's INSTALL, README and Makefile accordingly. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> --- This patch is rewritten based on 'jn/gitweb-install' as per the suggestion of Jakub Nareski Makefile | 20 ++++++++-------- gitweb/INSTALL | 19 +++++++-------- gitweb/Makefile | 41 ++++++++++++++++++---------------- gitweb/README | 14 ++++++----- gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes gitweb/{ => static}/gitweb.css | 0 gitweb/{ => static}/gitweb.js | 0 t/gitweb-lib.sh | 6 ++-- 9 files changed, 52 insertions(+), 48 deletions(-) rename gitweb/{ => static}/git-favicon.png (100%) rename gitweb/{ => static}/git-logo.png (100%) rename gitweb/{ => static}/gitweb.css (100%) rename gitweb/{ => static}/gitweb.js (100%) diff --git a/Makefile b/Makefile index dab5a14..de7f680 100644 --- a/Makefile +++ b/Makefile @@ -1561,32 +1561,32 @@ gitweb: $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all ifdef JSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.js -GITWEB_JS = gitweb/gitweb.min.js +GITWEB_PROGRAMS += gitweb/static/gitweb.min.js +GITWEB_JS = gitweb/static/gitweb.min.js else -GITWEB_JS = gitweb/gitweb.js +GITWEB_JS = gitweb/static/gitweb.js endif ifdef CSSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.css -GITWEB_CSS = gitweb/gitweb.min.css +GITWEB_PROGRAMS += gitweb/static/gitweb.min.css +GITWEB_CSS = gitweb/static/gitweb.min.css else -GITWEB_CSS = gitweb/gitweb.css +GITWEB_CSS = gitweb/static/gitweb.css endif OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS) gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS) $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) ifdef JSMIN -gitweb/gitweb.min.js: gitweb/gitweb.js +gitweb/static/gitweb.min.js: gitweb/static/gitweb.js $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # JSMIN ifdef CSSMIN -gitweb/gitweb.min.css: gitweb/gitweb.css +gitweb/static/gitweb.min.css: gitweb/static/gitweb.css $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # CSSMIN -git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js $(QUIET_GEN)$(RM) $@ $@+ && \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ @@ -2101,7 +2101,7 @@ clean: $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean ifndef NO_PERL - $(RM) gitweb/gitweb.cgi gitweb/gitweb.min.* + $(RM) gitweb/gitweb.cgi gitweb/static/gitweb.min.* $(MAKE) -C perl clean endif ifndef NO_PYTHON diff --git a/gitweb/INSTALL b/gitweb/INSTALL index d484d76..8230531 100644 --- a/gitweb/INSTALL +++ b/gitweb/INSTALL @@ -2,9 +2,10 @@ GIT web Interface (gitweb) Installation ======================================= First you have to generate gitweb.cgi from gitweb.perl using -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, -gitweb.css, git-logo.png and git-favicon.png) to their destination. -For example if git was (or is) installed with /usr prefix, you can do +"make gitweb", then "make install-gitweb" appropriate files +(gitweb.cgi, gitweb.js, gitweb.css, git-logo.png and git-favicon.png) +to their destination. For example if git was (or is) installed with +/usr prefix and gitwebdir is /var/www/cgi-bin, you can do $ make prefix=/usr gitweb ;# as yourself # make gitwebdir=/var/www/cgi-bin install-gitweb ;# as root @@ -81,16 +82,14 @@ Build example minifiers, you can do make GITWEB_PROJECTROOT="/home/local/scm" \ - GITWEB_JS="/gitweb/gitweb.js" \ - GITWEB_CSS="/gitweb/gitweb.css" \ - GITWEB_LOGO="/gitweb/git-logo.png" \ - GITWEB_FAVICON="/gitweb/git-favicon.png" \ + GITWEB_JS="gitweb/static/gitweb.js" \ + GITWEB_CSS="gitweb/static/gitweb.css" \ + GITWEB_LOGO="gitweb/static/git-logo.png" \ + GITWEB_FAVICON="gitweb/static/git-favicon.png" \ bindir=/usr/local/bin \ gitweb - cp -fv gitweb/gitweb.{cgi,js,css} \ - gitweb/git-{favicon,logo}.png \ - /var/www/cgi-bin/gitweb/ + make gitwebdir=/var/www/cgi-bin/gitweb install-gitweb Gitweb config file diff --git a/gitweb/Makefile b/gitweb/Makefile index 935d2d2..3af71f7 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -4,10 +4,10 @@ all:: # Define V=1 to have a more verbose compile. # # Define JSMIN to point to JavaScript minifier that functions as -# a filter to have gitweb.js minified. +# a filter to have static/gitweb.js minified. # # Define CSSMIN to point to a CSS minifier in order to generate a minified -# version of gitweb.css +# version of static/gitweb.css # prefix ?= $(HOME) @@ -16,6 +16,7 @@ gitwebdir ?= /var/www/cgi-bin RM ?= rm -f INSTALL ?= install +MKDIR ?= mkdir # default configuration for gitweb GITWEB_CONFIG = gitweb_config.perl @@ -29,10 +30,10 @@ GITWEB_STRICT_EXPORT = GITWEB_BASE_URL = GITWEB_LIST = GITWEB_HOMETEXT = indextext.html -GITWEB_CSS = gitweb.css -GITWEB_LOGO = git-logo.png -GITWEB_FAVICON = git-favicon.png -GITWEB_JS = gitweb.js +GITWEB_CSS = static/gitweb.css +GITWEB_LOGO = static/git-logo.png +GITWEB_FAVICON = static/git-favicon.png +GITWEB_JS = static/gitweb.js GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER = @@ -54,6 +55,7 @@ PERL_PATH ?= /usr/bin/perl # Shell quote; bindir_SQ = $(subst ','\'',$(bindir))#' gitwebdir_SQ = $(subst ','\'',$(gitwebdir))#' +gitwebfile_SQ = $(subst ','\'',$(gitwebdir)/static)#' SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))#' PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))#' DESTDIR_SQ = $(subst ','\'',$(DESTDIR))#' @@ -88,26 +90,26 @@ all:: gitweb.cgi GITWEB_PROGRAMS = gitweb.cgi ifdef JSMIN -GITWEB_FILES += gitweb.min.js -GITWEB_JS = gitweb.min.js -all:: gitweb.min.js -gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS +GITWEB_FILES += static/gitweb.min.js +GITWEB_JS = static/gitweb.min.js +all:: static/gitweb.min.js +static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(JSMIN) <$< >$@ else -GITWEB_FILES += gitweb.js +GITWEB_FILES += static/gitweb.js endif ifdef CSSMIN -GITWEB_FILES += gitweb.min.css -GITWEB_CSS = gitweb.min.css -all:: gitweb.min.css -gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS +GITWEB_FILES += static/gitweb.min.css +GITWEB_CSS = static/gitweb.min.css +all:: static/gitweb.min.css +static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(CSSMIN) <$ >$@ else -GITWEB_FILES += gitweb.css +GITWEB_FILES += static/gitweb.css endif -GITWEB_FILES += git-logo.png git-favicon.png +GITWEB_FILES += static/git-logo.png static/git-favicon.png GITWEB_REPLACE = \ -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \ @@ -147,12 +149,13 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)' $(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)' - $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebdir_SQ)' + $(MKDIR) -p '$(DESTDIR_SQ)$(gitwebfile_SQ)' + $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebfile_SQ)' ### Cleaning rules clean: - $(RM) gitweb.cgi gitweb.min.js gitweb.min.css GITWEB-BUILD-OPTIONS + $(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS .PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE diff --git a/gitweb/README b/gitweb/README index 71742b3..5787260 100644 --- a/gitweb/README +++ b/gitweb/README @@ -80,24 +80,26 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the - CSSMIN variable is defined / CSS minifier is used)] + the gitweb config file. [Default: static/gitweb.css (or + static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier + is used)] * GITWEB_LOGO Points to the location where you put git-logo.png on your web server (or to be more generic URI of logo, 72x27 size, displayed in top right corner of each gitweb page, and used as logo for Atom feed). Relative - to base URI of gitweb. [Default: git-logo.png] + to base URI of gitweb. [Default: static/git-logo.png] * GITWEB_FAVICON Points to the location where you put git-favicon.png on your web server (or to be more generic URI of favicon, assumed to be image/png type; web browsers that support favicons (website icons) may display them in the browser's URL bar and next to site name in bookmarks). Relative - to base URI of gitweb. [Default: git-favicon.png] + to base URI of gitweb. [Default: static/git-favicon.png] * GITWEB_JS Points to the localtion where you put gitweb.js on your web server (or to be more generic URI of JavaScript code used by gitweb). - Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js - if JSMIN build variable is defined / JavaScript minifier is used)] + Relative to base URI of gitweb. [Default: static/gitweb.js (or + static/gitweb.min.js if JSMIN build variable is defined / JavaScript + minifier is used)] * GITWEB_CONFIG This Perl file will be loaded using 'do' and can be used to override any of the options above as well as some other options -- see the "Runtime diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css similarity index 100% rename from gitweb/gitweb.css rename to gitweb/static/gitweb.css diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js similarity index 100% rename from gitweb/gitweb.js rename to gitweb/static/gitweb.js diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh index 5a734b1..b70b891 100644 --- a/t/gitweb-lib.sh +++ b/t/gitweb-lib.sh @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; our \$site_header = ''; our \$site_footer = ''; our \$home_text = 'indextext.html'; -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; our \$projects_list = ''; our \$export_ok = ''; our \$strict_export = ''; -- 1.7.1.13.g35592.dirty ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-12 7:52 ` [PATCHv3 " Pavan Kumar Sunkara @ 2010-05-13 8:54 ` Christian Couder 2010-05-13 9:01 ` Pavan Kumar Sunkara 0 siblings, 1 reply; 17+ messages in thread From: Christian Couder @ 2010-05-13 8:54 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Jakub Narebski, Git List, Petr Baudis On Wednesday 12 May 2010 09:52:15 Pavan Kumar Sunkara wrote: > > First you have to generate gitweb.cgi from gitweb.perl using > -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, > -gitweb.css, git-logo.png and git-favicon.png) to their destination. > -For example if git was (or is) installed with /usr prefix, you can do > +"make gitweb", then "make install-gitweb" appropriate files There is something missing between 'then "make install-gitweb"' and 'appropriate files', perhaps 'will copy' > +(gitweb.cgi, gitweb.js, gitweb.css, git-logo.png and git-favicon.png) > +to their destination. For example if git was (or is) installed with > +/usr prefix and gitwebdir is /var/www/cgi-bin, you can do > > $ make prefix=/usr gitweb ;# as yourself > # make gitwebdir=/var/www/cgi-bin install-gitweb ;# as root Thanks, Christian. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-13 8:54 ` Christian Couder @ 2010-05-13 9:01 ` Pavan Kumar Sunkara 2010-05-14 16:15 ` Pavan Kumar Sunkara 0 siblings, 1 reply; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-13 9:01 UTC (permalink / raw) To: Christian Couder; +Cc: Jakub Narebski, Git List, Petr Baudis >> First you have to generate gitweb.cgi from gitweb.perl using >> -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, >> -gitweb.css, git-logo.png and git-favicon.png) to their destination. >> -For example if git was (or is) installed with /usr prefix, you can do >> +"make gitweb", then "make install-gitweb" appropriate files >> Sorry about that. - Pavan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-13 9:01 ` Pavan Kumar Sunkara @ 2010-05-14 16:15 ` Pavan Kumar Sunkara 2010-05-14 21:25 ` Jakub Narebski 0 siblings, 1 reply; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-14 16:15 UTC (permalink / raw) To: Christian Couder; +Cc: Jakub Narebski, Git List, Petr Baudis Jakub, I would like to know the status of this patch. On Thu, May 13, 2010 at 2:31 PM, Pavan Kumar Sunkara <pavan.sss1991@gmail.com> wrote: > >>> First you have to generate gitweb.cgi from gitweb.perl using >>> -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, >>> -gitweb.css, git-logo.png and git-favicon.png) to their destination. >>> -For example if git was (or is) installed with /usr prefix, you can do >>> +"make gitweb", then "make install-gitweb" appropriate files >>> > > Sorry about that. > > - Pavan > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-14 16:15 ` Pavan Kumar Sunkara @ 2010-05-14 21:25 ` Jakub Narebski 2010-05-15 8:47 ` Pavan Kumar Sunkara 0 siblings, 1 reply; 17+ messages in thread From: Jakub Narebski @ 2010-05-14 21:25 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Christian Couder, Git List, Petr Baudis On Fri, 14 May 2010, Pavan Kumar Sunkara wrote: > Jakub, I would like to know the status of this patch. I like it, and I think all issues (especially with regard to git-instaweb) got addressed, but the patch itself is heavily whitespace damaged. Could you please then resend it as attachement (of *.txt file to have text/plain), if you are not able to send it inline without whitespace munging? Thanks in advance. -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-14 21:25 ` Jakub Narebski @ 2010-05-15 8:47 ` Pavan Kumar Sunkara 2010-05-18 0:06 ` Jakub Narebski 0 siblings, 1 reply; 17+ messages in thread From: Pavan Kumar Sunkara @ 2010-05-15 8:47 UTC (permalink / raw) To: Jakub Narebski; +Cc: Christian Couder, Git List, Petr Baudis [-- Attachment #1: Type: text/plain, Size: 689 bytes --] Here's the attachment of the patch. The file is not whitespace damaged. That is a problem with my mail client PFA the patch. On Sat, May 15, 2010 at 2:55 AM, Jakub Narebski <jnareb@gmail.com> wrote: > On Fri, 14 May 2010, Pavan Kumar Sunkara wrote: > >> Jakub, I would like to know the status of this patch. > > I like it, and I think all issues (especially with regard to git-instaweb) > got addressed, but the patch itself is heavily whitespace damaged. Could > you please then resend it as attachement (of *.txt file to have text/plain), > if you are not able to send it inline without whitespace munging? Thanks > in advance. > > -- > Jakub Narebski > Poland > [-- Attachment #2: 0004-gitweb-Move-static-files-into-seperate-subdirectory.patch --] [-- Type: text/x-patch, Size: 11316 bytes --] From 46758f50ce78975dbbbd63848eb9db56a36d6cf3 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Date: Wed, 12 May 2010 13:11:41 +0530 Subject: [PATCH 4/5] gitweb: Move static files into seperate subdirectory Create a new subdirectory called 'static' in gitweb/, and move all static files required by gitweb.cgi when running, which means styles, images and Javascript code. This should make gitweb more readable and easier to maintain. Update t/gitweb-lib.sh to reflect this change.The install-gitweb now also include moving of static files into 'static' subdirectory in target directory: update Makefile, gitweb's INSTALL, README and Makefile accordingly. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> --- Makefile | 20 ++++++++-------- gitweb/INSTALL | 19 +++++++-------- gitweb/Makefile | 41 ++++++++++++++++++---------------- gitweb/README | 14 ++++++----- gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes gitweb/{ => static}/gitweb.css | 0 gitweb/{ => static}/gitweb.js | 0 t/gitweb-lib.sh | 6 ++-- 9 files changed, 52 insertions(+), 48 deletions(-) rename gitweb/{ => static}/git-favicon.png (100%) rename gitweb/{ => static}/git-logo.png (100%) rename gitweb/{ => static}/gitweb.css (100%) rename gitweb/{ => static}/gitweb.js (100%) diff --git a/Makefile b/Makefile index dab5a14..de7f680 100644 --- a/Makefile +++ b/Makefile @@ -1561,32 +1561,32 @@ gitweb: $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all ifdef JSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.js -GITWEB_JS = gitweb/gitweb.min.js +GITWEB_PROGRAMS += gitweb/static/gitweb.min.js +GITWEB_JS = gitweb/static/gitweb.min.js else -GITWEB_JS = gitweb/gitweb.js +GITWEB_JS = gitweb/static/gitweb.js endif ifdef CSSMIN -GITWEB_PROGRAMS += gitweb/gitweb.min.css -GITWEB_CSS = gitweb/gitweb.min.css +GITWEB_PROGRAMS += gitweb/static/gitweb.min.css +GITWEB_CSS = gitweb/static/gitweb.min.css else -GITWEB_CSS = gitweb/gitweb.css +GITWEB_CSS = gitweb/static/gitweb.css endif OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS) gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS) $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) ifdef JSMIN -gitweb/gitweb.min.js: gitweb/gitweb.js +gitweb/static/gitweb.min.js: gitweb/static/gitweb.js $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # JSMIN ifdef CSSMIN -gitweb/gitweb.min.css: gitweb/gitweb.css +gitweb/static/gitweb.min.css: gitweb/static/gitweb.css $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) endif # CSSMIN -git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js $(QUIET_GEN)$(RM) $@ $@+ && \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ @@ -2101,7 +2101,7 @@ clean: $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean ifndef NO_PERL - $(RM) gitweb/gitweb.cgi gitweb/gitweb.min.* + $(RM) gitweb/gitweb.cgi gitweb/static/gitweb.min.* $(MAKE) -C perl clean endif ifndef NO_PYTHON diff --git a/gitweb/INSTALL b/gitweb/INSTALL index d484d76..8230531 100644 --- a/gitweb/INSTALL +++ b/gitweb/INSTALL @@ -2,9 +2,10 @@ GIT web Interface (gitweb) Installation ======================================= First you have to generate gitweb.cgi from gitweb.perl using -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, -gitweb.css, git-logo.png and git-favicon.png) to their destination. -For example if git was (or is) installed with /usr prefix, you can do +"make gitweb", then "make install-gitweb" will copy appropriate files +(gitweb.cgi, gitweb.js, gitweb.css, git-logo.png and git-favicon.png) +to their destination. For example if git was (or is) installed with +/usr prefix and gitwebdir is /var/www/cgi-bin, you can do $ make prefix=/usr gitweb ;# as yourself # make gitwebdir=/var/www/cgi-bin install-gitweb ;# as root @@ -81,16 +82,14 @@ Build example minifiers, you can do make GITWEB_PROJECTROOT="/home/local/scm" \ - GITWEB_JS="/gitweb/gitweb.js" \ - GITWEB_CSS="/gitweb/gitweb.css" \ - GITWEB_LOGO="/gitweb/git-logo.png" \ - GITWEB_FAVICON="/gitweb/git-favicon.png" \ + GITWEB_JS="gitweb/static/gitweb.js" \ + GITWEB_CSS="gitweb/static/gitweb.css" \ + GITWEB_LOGO="gitweb/static/git-logo.png" \ + GITWEB_FAVICON="gitweb/static/git-favicon.png" \ bindir=/usr/local/bin \ gitweb - cp -fv gitweb/gitweb.{cgi,js,css} \ - gitweb/git-{favicon,logo}.png \ - /var/www/cgi-bin/gitweb/ + make gitwebdir=/var/www/cgi-bin/gitweb install-gitweb Gitweb config file diff --git a/gitweb/Makefile b/gitweb/Makefile index 935d2d2..3af71f7 100644 --- a/gitweb/Makefile +++ b/gitweb/Makefile @@ -4,10 +4,10 @@ all:: # Define V=1 to have a more verbose compile. # # Define JSMIN to point to JavaScript minifier that functions as -# a filter to have gitweb.js minified. +# a filter to have static/gitweb.js minified. # # Define CSSMIN to point to a CSS minifier in order to generate a minified -# version of gitweb.css +# version of static/gitweb.css # prefix ?= $(HOME) @@ -16,6 +16,7 @@ gitwebdir ?= /var/www/cgi-bin RM ?= rm -f INSTALL ?= install +MKDIR ?= mkdir # default configuration for gitweb GITWEB_CONFIG = gitweb_config.perl @@ -29,10 +30,10 @@ GITWEB_STRICT_EXPORT = GITWEB_BASE_URL = GITWEB_LIST = GITWEB_HOMETEXT = indextext.html -GITWEB_CSS = gitweb.css -GITWEB_LOGO = git-logo.png -GITWEB_FAVICON = git-favicon.png -GITWEB_JS = gitweb.js +GITWEB_CSS = static/gitweb.css +GITWEB_LOGO = static/git-logo.png +GITWEB_FAVICON = static/git-favicon.png +GITWEB_JS = static/gitweb.js GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER = @@ -54,6 +55,7 @@ PERL_PATH ?= /usr/bin/perl # Shell quote; bindir_SQ = $(subst ','\'',$(bindir))#' gitwebdir_SQ = $(subst ','\'',$(gitwebdir))#' +gitwebfile_SQ = $(subst ','\'',$(gitwebdir)/static)#' SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))#' PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))#' DESTDIR_SQ = $(subst ','\'',$(DESTDIR))#' @@ -88,26 +90,26 @@ all:: gitweb.cgi GITWEB_PROGRAMS = gitweb.cgi ifdef JSMIN -GITWEB_FILES += gitweb.min.js -GITWEB_JS = gitweb.min.js -all:: gitweb.min.js -gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS +GITWEB_FILES += static/gitweb.min.js +GITWEB_JS = static/gitweb.min.js +all:: static/gitweb.min.js +static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(JSMIN) <$< >$@ else -GITWEB_FILES += gitweb.js +GITWEB_FILES += static/gitweb.js endif ifdef CSSMIN -GITWEB_FILES += gitweb.min.css -GITWEB_CSS = gitweb.min.css -all:: gitweb.min.css -gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS +GITWEB_FILES += static/gitweb.min.css +GITWEB_CSS = static/gitweb.min.css +all:: static/gitweb.min.css +static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS $(QUIET_GEN)$(CSSMIN) <$ >$@ else -GITWEB_FILES += gitweb.css +GITWEB_FILES += static/gitweb.css endif -GITWEB_FILES += git-logo.png git-favicon.png +GITWEB_FILES += static/git-logo.png static/git-favicon.png GITWEB_REPLACE = \ -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \ @@ -147,12 +149,13 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)' $(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)' - $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebdir_SQ)' + $(MKDIR) -p '$(DESTDIR_SQ)$(gitwebfile_SQ)' + $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebfile_SQ)' ### Cleaning rules clean: - $(RM) gitweb.cgi gitweb.min.js gitweb.min.css GITWEB-BUILD-OPTIONS + $(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS .PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE diff --git a/gitweb/README b/gitweb/README index 71742b3..5787260 100644 --- a/gitweb/README +++ b/gitweb/README @@ -80,24 +80,26 @@ You can specify the following configuration variables when building GIT: Points to the location where you put gitweb.css on your web server (or to be more generic, the URI of gitweb stylesheet). Relative to the base URI of gitweb. Note that you can setup multiple stylesheets from - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the - CSSMIN variable is defined / CSS minifier is used)] + the gitweb config file. [Default: static/gitweb.css (or + static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier + is used)] * GITWEB_LOGO Points to the location where you put git-logo.png on your web server (or to be more generic URI of logo, 72x27 size, displayed in top right corner of each gitweb page, and used as logo for Atom feed). Relative - to base URI of gitweb. [Default: git-logo.png] + to base URI of gitweb. [Default: static/git-logo.png] * GITWEB_FAVICON Points to the location where you put git-favicon.png on your web server (or to be more generic URI of favicon, assumed to be image/png type; web browsers that support favicons (website icons) may display them in the browser's URL bar and next to site name in bookmarks). Relative - to base URI of gitweb. [Default: git-favicon.png] + to base URI of gitweb. [Default: static/git-favicon.png] * GITWEB_JS Points to the localtion where you put gitweb.js on your web server (or to be more generic URI of JavaScript code used by gitweb). - Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js - if JSMIN build variable is defined / JavaScript minifier is used)] + Relative to base URI of gitweb. [Default: static/gitweb.js (or + static/gitweb.min.js if JSMIN build variable is defined / JavaScript + minifier is used)] * GITWEB_CONFIG This Perl file will be loaded using 'do' and can be used to override any of the options above as well as some other options -- see the "Runtime diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css similarity index 100% rename from gitweb/gitweb.css rename to gitweb/static/gitweb.css diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js similarity index 100% rename from gitweb/gitweb.js rename to gitweb/static/gitweb.js diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh index 5a734b1..b70b891 100644 --- a/t/gitweb-lib.sh +++ b/t/gitweb-lib.sh @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; our \$site_header = ''; our \$site_footer = ''; our \$home_text = 'indextext.html'; -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; our \$projects_list = ''; our \$export_ok = ''; our \$strict_export = ''; -- 1.7.1.16.g5d405c.dirty ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCHv3 GSoC] gitweb: Move static files into seperate subdirectory 2010-05-15 8:47 ` Pavan Kumar Sunkara @ 2010-05-18 0:06 ` Jakub Narebski 0 siblings, 0 replies; 17+ messages in thread From: Jakub Narebski @ 2010-05-18 0:06 UTC (permalink / raw) To: Pavan Kumar Sunkara; +Cc: Christian Couder, Git List, Petr Baudis On Sat, 15 May 2010, Pavan Kumar Sunkara wrote: > Here's the patch as an attachment. > > The file is not whitespace damaged. That is a problem with my mail client > > PFA the patch. If you cannot use ordinary email client configured to send email via SMTPS (ports 465 or 587), or via git-send-email, you should consider attaching patches (perhaps in addition to having them inline) as file with *.txt extension (to force to use 'text/plain' mimetype, 8bit, no transfer encoding). -- >8 -- > From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> > Subject: [PATCH 4/5] gitweb: Move static files into seperate subdirectory > > Create a new subdirectory called 'static' in gitweb/, and move > all static files required by gitweb.cgi when running, which means > styles, images and Javascript code. This should make gitweb more > readable and easier to maintain. > > Update t/gitweb-lib.sh to reflect this change. The install-gitweb > now also include moving of static files into 'static' subdirectory > in target directory: update Makefile, gitweb's INSTALL, README and > Makefile accordingly. > > Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Almost Acked-by: Jakub Narebski <jnareb@gmail.com> You need to use 'install -d' instead of 'mkdir -p' for modified 'install' target of gitweb/Makefile. > --- Here you should mention that you base your patch on 'next', or even better on which commit / which branch you base your changes on. See this fragment of Documentation/SubmittingPatches: If you are preparing a work based on "next" branch, that is fine, but please mark it as such. > Makefile | 20 ++++++++-------- > gitweb/INSTALL | 19 +++++++-------- > gitweb/Makefile | 41 ++++++++++++++++++---------------- > gitweb/README | 14 ++++++----- > gitweb/{ => static}/git-favicon.png | Bin 115 -> 115 bytes > gitweb/{ => static}/git-logo.png | Bin 207 -> 207 bytes > gitweb/{ => static}/gitweb.css | 0 > gitweb/{ => static}/gitweb.js | 0 > t/gitweb-lib.sh | 6 ++-- > 9 files changed, 52 insertions(+), 48 deletions(-) > rename gitweb/{ => static}/git-favicon.png (100%) > rename gitweb/{ => static}/git-logo.png (100%) > rename gitweb/{ => static}/gitweb.css (100%) > rename gitweb/{ => static}/gitweb.js (100%) [...] > diff --git a/gitweb/INSTALL b/gitweb/INSTALL > index d484d76..8230531 100644 > --- a/gitweb/INSTALL > +++ b/gitweb/INSTALL > @@ -2,9 +2,10 @@ GIT web Interface (gitweb) Installation > ======================================= > > First you have to generate gitweb.cgi from gitweb.perl using > -"make gitweb", then copy appropriate files (gitweb.cgi, gitweb.js, > -gitweb.css, git-logo.png and git-favicon.png) to their destination. > -For example if git was (or is) installed with /usr prefix, you can do > +"make gitweb", then "make install-gitweb" will copy appropriate files > +(gitweb.cgi, gitweb.js, gitweb.css, git-logo.png and git-favicon.png) > +to their destination. For example if git was (or is) installed with > +/usr prefix and gitwebdir is /var/www/cgi-bin, you can do > > $ make prefix=/usr gitweb ;# as yourself > # make gitwebdir=/var/www/cgi-bin install-gitweb ;# as root Thanks for noticing of what I missed when updating gitweb/INSTALL in 152d943 (gitweb: Create install target for gitweb in Makefile, 2010-05-01) > @@ -81,16 +82,14 @@ Build example > minifiers, you can do > > make GITWEB_PROJECTROOT="/home/local/scm" \ > - GITWEB_JS="/gitweb/gitweb.js" \ > - GITWEB_CSS="/gitweb/gitweb.css" \ > - GITWEB_LOGO="/gitweb/git-logo.png" \ > - GITWEB_FAVICON="/gitweb/git-favicon.png" \ > + GITWEB_JS="gitweb/static/gitweb.js" \ > + GITWEB_CSS="gitweb/static/gitweb.css" \ > + GITWEB_LOGO="gitweb/static/git-logo.png" \ > + GITWEB_FAVICON="gitweb/static/git-favicon.png" \ > bindir=/usr/local/bin \ > gitweb > > - cp -fv gitweb/gitweb.{cgi,js,css} \ > - gitweb/git-{favicon,logo}.png \ > - /var/www/cgi-bin/gitweb/ > + make gitwebdir=/var/www/cgi-bin/gitweb install-gitweb Here I am not sure of we should not leave an example how to copy files manually... but I guess with this form we wouldn't have to update this part if/when gitweb is split... > diff --git a/gitweb/Makefile b/gitweb/Makefile > @@ -16,6 +16,7 @@ gitwebdir ?= /var/www/cgi-bin > > RM ?= rm -f > INSTALL ?= install > +MKDIR ?= mkdir Is MKDIR really needed? The main Makefile doesn't use it. It is what "$(INSTALL) -d ..." is for this (the '-d' / '--directory') option would create each given directory and any missing parent directories). > @@ -54,6 +55,7 @@ PERL_PATH ?= /usr/bin/perl > # Shell quote; > bindir_SQ = $(subst ','\'',$(bindir))#' > gitwebdir_SQ = $(subst ','\'',$(gitwebdir))#' > +gitwebfile_SQ = $(subst ','\'',$(gitwebdir)/static)#' > SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))#' > PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))#' > DESTDIR_SQ = $(subst ','\'',$(DESTDIR))#' I would name it gitwebstaticdir_SQ, but admittedly this is a matter of taste. It can be named gitwebfile_SQ... although truth to be said it is NOT strictly NECESSARY, as "$(gitwebdir_SQ)/static" would work as well. > @@ -147,12 +149,13 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS > install: all > $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)' > $(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)' > - $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebdir_SQ)' > + $(MKDIR) -p '$(DESTDIR_SQ)$(gitwebfile_SQ)' > + $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebfile_SQ)' Use + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)/static' + $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebdir_SQ)/static' instead. BTW. mkdir doesn't need to support '-p' option. See for example this part of autoconf documentation: - Macro: AS_MKDIR_P (FILENAME) Make the directory FILENAME, including intervening directories as necessary. This is equivalent to `mkdir -p FILENAME', except that it is portable to older versions of `mkdir' that lack support for the `-p' option. > diff --git a/gitweb/README b/gitweb/README > index 71742b3..5787260 100644 > --- a/gitweb/README > +++ b/gitweb/README > @@ -80,24 +80,26 @@ You can specify the following configuration variables when building GIT: > Points to the location where you put gitweb.css on your web server > (or to be more generic, the URI of gitweb stylesheet). Relative to the > base URI of gitweb. Note that you can setup multiple stylesheets from > - the gitweb config file. [Default: gitweb.css (or gitweb.min.css if the > - CSSMIN variable is defined / CSS minifier is used)] > + the gitweb config file. [Default: static/gitweb.css (or > + static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier > + is used)] ^----------------- stray space character? > diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh > index 5a734b1..b70b891 100644 > --- a/t/gitweb-lib.sh > +++ b/t/gitweb-lib.sh > @@ -19,9 +19,9 @@ our \$site_name = '[localhost]'; > our \$site_header = ''; > our \$site_footer = ''; > our \$home_text = 'indextext.html'; > -our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css'); > -our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png'; > -our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png'; > +our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css'); > +our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png'; > +our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png'; > our \$projects_list = ''; > our \$export_ok = ''; > our \$strict_export = ''; Thanks for updating that. -- Jakub Narebski Poland ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-05-18 0:04 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-09 13:56 [Patch 001/GSoC] Move static files into subdir Pavan Kumar Sunkara 2010-05-09 17:10 ` Christian Couder 2010-05-09 17:48 ` Pavan Kumar Sunkara 2010-05-09 22:13 ` Jakub Narebski 2010-05-10 11:44 ` Pavan Kumar Sunkara 2010-05-10 11:53 ` Ramkumar Ramachandra 2010-05-10 12:55 ` [PATCHv2 GSoC] gitweb: Move static files into seperate subdirectory Jakub Narebski 2010-05-10 13:01 ` Pavan Kumar Sunkara 2010-05-11 23:27 ` Jakub Narebski 2010-05-12 5:15 ` Pavan Kumar Sunkara 2010-05-12 7:52 ` [PATCHv3 " Pavan Kumar Sunkara 2010-05-13 8:54 ` Christian Couder 2010-05-13 9:01 ` Pavan Kumar Sunkara 2010-05-14 16:15 ` Pavan Kumar Sunkara 2010-05-14 21:25 ` Jakub Narebski 2010-05-15 8:47 ` Pavan Kumar Sunkara 2010-05-18 0:06 ` Jakub Narebski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).