{"thread":{"id":"16916","subject":"gitweb $export_ok question","startedAt":"2008-12-29T20:26:02Z","lastAt":"2009-01-03T13:23:28Z","messageCount":7,"participants":["Thomas Amsler","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98912","messageId":"9B3762519053E645820D9CEBD18B3734023A9FBA00@XEDAMAIL2.ex.ad3.ucdavis.edu","threadId":"16916","inReplyTo":null,"subject":"gitweb $export_ok question","fromName":"Thomas Amsler","fromEmail":"tpamsler@ucdavis.edu","sentAt":"2008-12-29T20:26:02Z","receivedAt":"2008-12-29T20:26:02Z","isPatch":false,"sender":{"key":"tpamsler@ucdavis.edu","avatar":null},"body":"Hello,\n\nI am trying to get the gitweb $export_ok to  work. According the installation instructions:\n\nAlternatively, you can configure gitweb to only list and allow\nviewing of the explicitly exported repositories, via the\n\n\n\nGITWEB_EXPORT_OK build configuration variable (or the $export_ok\nvariable in gitweb config file). If it evaluates to true, gitweb\nshows repositories only if this file exists in its object database\n(if directory has the magic file named $export_ok).\n\n\n\n... I set $export_ok = \"true\" in my /etc/gitweb.conf file. I don't know what \"file\" needs to be added to a repository in order for it to show up again in gitweb. I have tried several things, like specifying the file name in /etc/gitweb.con:\n\n$export_ok =\"magic-file-name\"\n\netc. but that doesn't seem to work.\n\nWhat am I doing wrong here?"},{"id":"99005","messageId":"m3sko5b84t.fsf@localhost.localdomain","threadId":"16916","inReplyTo":"9B3762519053E645820D9CEBD18B3734023A9FBA00@XEDAMAIL2.ex.ad3.ucdavis.edu","subject":"Re: gitweb $export_ok question","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-30T22:37:44Z","receivedAt":"2008-12-30T22:37:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Thomas Amsler <tpamsler@ucdavis.edu> writes:\n\n> Hello,\n> \n> I am trying to get the gitweb $export_ok to work. According the\n> installation instructions:\n> \n>   Alternatively, you can configure gitweb to only list and allow\n>   viewing of the explicitly exported repositories, via the\n>   GITWEB_EXPORT_OK build configuration variable (or the $export_ok\n>   variable in gitweb config file). If it evaluates to true, gitweb\n>   shows repositories only if this file exists in its object database\n>   (if directory has the magic file named $export_ok).\n> \n> ... I set $export_ok = \"true\" in my /etc/gitweb.conf file.\n[...]\n\n$export_ok is not a boolean, is the _name_ of a file, which if it\nis present, then repository is exported to gitweb, and if it is not,\nit is invisible to gitweb. It means that if for example we have\n  $export_ok = \"gitweb-export-ok\";\nin the GITWEB_CONFIG file (usually gitweb_config.perl, installed\nin the same place as gitweb.cgi), the repo.git is exported only\nif it has file gitweb-export-ok in it.\n\nThis mechanism is similar to git-daemon and its magic file\n\"git-daemon-export-ok\".\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"99008","messageId":"m3ocytb6ze.fsf@localhost.localdomain","threadId":"16916","inReplyTo":"m3sko5b84t.fsf@localhost.localdomain","subject":"Re: gitweb $export_ok question","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-30T23:02:37Z","receivedAt":"2008-12-30T23:02:37Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> in the GITWEB_CONFIG file (usually gitweb_config.perl, installed\n> in the same place as gitweb.cgi) [...]\n\nI'm sorry, I forgot about GITWEB_CONFIG_SYSTEM which as you\nwrote is by default /etc/gitweb.conf (and is also Perl).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"99045","messageId":"200812311000.25818.jnareb@gmail.com","threadId":"16916","inReplyTo":"6db6bed70812302037w54fe5640of234cd611f5ab45e@mail.gmail.com","subject":"Re: gitweb $export_ok question","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-31T09:00:21Z","receivedAt":"2008-12-31T09:00:21Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Thomas Amsler wrote:\n\n> Thank you for your information.\n> \n> I have just tried that but the repository doesn't show up in gitweb\n> \n> - added to /etc/gitweb.conf\n> -- $export_ok = \"gitweb-export-ok\"\n> - touched the \"gitweb-export-ok\" file in the repository\n> -- touch /path-to-repo/repository/authz.git/gitweb-export-ok\n> \n> Then gitweb reports:\n> \n> 404 - No projects found\n> \n> Does the gitweb-export-ok file need to be part of  the repo so that it is\n> tracked?\n\nNo, gitweb-export-ok file has to be in $GIT_DIR (like description file),\nnot part of repo.\n\nAs to \"No projects found\" error: what is your $projectroot? Is it\neither \"/path-to-repo/repository\" or \"/path-to-repo\"? Is repository\nreadable and searchable for the web server user (does it have correct\npermissions)?\n-- \nJakub Narebski\nPoland\n"},{"id":"99069","messageId":"6db6bed70812311056y6bdb4a52x4d361677b5915bb3@mail.gmail.com","threadId":"16916","inReplyTo":"6db6bed70812311013l3cf575c1y874e71e70d1dde57@mail.gmail.com","subject":"Re: gitweb $export_ok question","fromName":"Thomas Amsler","fromEmail":"tpamsler@ucdavis.edu","sentAt":"2008-12-31T18:56:46Z","receivedAt":"2008-12-31T18:56:46Z","isPatch":false,"sender":{"key":"tpamsler@ucdavis.edu","avatar":null},"body":"One more question. Now, on the gitweb home page, the project name\nhyper link shows up as:\n\nauthz.git/.git\n\nwhere it used to be just:\n\nauthz.git/\n\nis there a way to configure this so that it doesn't show the trailing .git?\n\nBest,\n-- Thomas\n\n\n\n\nOn Wed, Dec 31, 2008 at 10:13 AM, Thomas Amsler <tpamsler@ucdavis.edu> wrote:\n> That did the trick. It wasn't quite clear from the documentation that the\n> file defined by $export_ok has to be located in repository/.git/\n>\n> Thank you for your help.\n>\n> Best,\n> -- Thomas\n>\n>\n>\n> On Wed, Dec 31, 2008 at 1:00 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n>>\n>> Thomas Amsler wrote:\n>>\n>> > Thank you for your information.\n>> >\n>> > I have just tried that but the repository doesn't show up in gitweb\n>> >\n>> > - added to /etc/gitweb.conf\n>> > -- $export_ok = \"gitweb-export-ok\"\n>> > - touched the \"gitweb-export-ok\" file in the repository\n>> > -- touch /path-to-repo/repository/authz.git/gitweb-export-ok\n>> >\n>> > Then gitweb reports:\n>> >\n>> > 404 - No projects found\n>> >\n>> > Does the gitweb-export-ok file need to be part of  the repo so that it\n>> > is\n>> > tracked?\n>>\n>> No, gitweb-export-ok file has to be in $GIT_DIR (like description file),\n>> not part of repo.\n>>\n>> As to \"No projects found\" error: what is your $projectroot? Is it\n>> either \"/path-to-repo/repository\" or \"/path-to-repo\"? Is repository\n>> readable and searchable for the web server user (does it have correct\n>> permissions)?\n>> --\n>> Jakub Narebski\n>> Poland\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n"},{"id":"99124","messageId":"200901012351.28864.jnareb@gmail.com","threadId":"16916","inReplyTo":"6db6bed70812311027g3be1cfbei35c014243237fd59@mail.gmail.com","subject":"Re: gitweb $export_ok question","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-01T22:51:26Z","receivedAt":"2009-01-01T22:51:26Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Two requests: could you please do not toppost, as it goes against\nnatural flow of discussion and reading, but rather quote relevant\nparts and respond below? It would be good to not try to send HTML\nmail, as it is forbidden by VGER anti-SPAM filter, so you trying\nto send HTML-formatted email result in me getting two copies: one\nwith and one without HTML version.\n\nOn Wed, 31 Dec 2008, Thomas Amsler wrote:\n\n> One more question. Now, on the gitweb home page, the project name hyper link\n> shows up as:\n> \n> authz.git/.git\n> \n> where it used to be just:\n> \n> authz.git/\n> \n> is there a way to configure this so that it doesn't show the trailing .git?\n\nI'm afraid it is not possible without modifying gitweb, unless you use\nsymlinks in place of real repositories, i.e. if you have authz.git in\n$projectroot being symlink to authz.git/.git or even authz/.git (which\nmight be somewhere else).\n\nFor example I have /home/local/scm/git.git be symlink to ~/git/.git\n\nThe longer explanation (which probably should made into gitweb/README\nor gitweb/INSTALL) is that gitweb is meant to deal with _bare_ \nrepositories; gitweb doesn't touch and doesn't examine working area\nof \"live\" (non-bare) repository. If you host git repositories (like\nkernel.org, freedesktop.org or repo.or.cz) you usually host them bare\n(public repositories should be bare); but you might want to have\ngitweb for your own repository too.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"99253","messageId":"200901031423.31305.jnareb@gmail.com","threadId":"16916","inReplyTo":"200901012351.28864.jnareb@gmail.com","subject":"[PATCH] gitweb: Document that gitweb deals with bare repositories","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-03T13:23:28Z","receivedAt":"2009-01-03T13:23:28Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Add reminders to gitweb/README and gitweb/INSTALL that gitweb works\nwith bare repositories.  While it might be obvious to us, it is not\napparently as evident for newcomers.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nOn Thu, 1 Jan 2009, Jakub Narebski wrote:\n\n> The longer explanation (which probably should made into gitweb/README\n> or gitweb/INSTALL) is that gitweb is meant to deal with _bare_ \n> repositories; gitweb doesn't touch and doesn't examine working area\n> of \"live\" (non-bare) repository. If you host git repositories (like\n> kernel.org, freedesktop.org or repo.or.cz) you usually host them bare\n> (public repositories should be bare); but you might want to have\n> gitweb for your own repository too.\n\nAnd here it is.\n\nBy the way, I was wondering if to mark this patch as an RFC, because\nI am not completely sure about the wording I used...\n\n gitweb/INSTALL |   14 ++++++++++++++\n gitweb/README  |   12 +++++++-----\n 2 files changed, 21 insertions(+), 5 deletions(-)\n\ndiff --git a/gitweb/INSTALL b/gitweb/INSTALL\nindex 18c9ce3..f43e233 100644\n--- a/gitweb/INSTALL\n+++ b/gitweb/INSTALL\n@@ -127,6 +127,20 @@ GITWEB_CONFIG file:\n Gitweb repositories\n -------------------\n \n+- Gitweb deals with bare repositories, which means that gitweb scans for\n+  (in the case where $projects_list is a directory to search for\n+  repositories) or has to be provided with list of (in the case where\n+  $projects_list is a text file) bare repositories, i.e. $GIT_DIR for\n+  each repository. The consequence of that is the fact that if you use\n+  gitweb to view non-bare repository named 'repo' then gitweb would show\n+  (or would have to be provided with) 'repo/.git'.\n+\n+  If you want to view a buch of non-bare repositories in gitweb but want\n+  them named 'repo.git' as is the standard for bare repositories, you\n+  can as a workaround populare $projectroot / $project_list with\n+  symbolic links to $GIT_DIR of each project you want to publish (have\n+  shown) in gitweb.\n+\n - By default all git repositories under projectroot are visible and\n   available to gitweb. The list of projects is generated by default by\n   scanning the projectroot directory for git repositories (for object\ndiff --git a/gitweb/README b/gitweb/README\nindex 825162a..6dbfcd5 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -34,10 +34,11 @@ You can specify the following configuration variables when building GIT:\n  * GITWEB_LIST\n    Points to a directory to scan for projects (defaults to project root\n    if not set / if empty) or to a file with explicit listing of projects\n-   (together with projects' ownership). See \"Generating projects list\n-   using gitweb\" in INSTALL file for gitweb to find out how to generate\n-   such file from scan of a directory. [No default, which means use root\n-   directory for projects]\n+   (together with projects' ownership). Note that gitweb deals with bare\n+   repositories; it shows/uses $GIT_DIR for each repository. See also\n+   \"Generating projects list using gitweb\" in INSTALL file for gitweb to\n+   find out how to generate such file from scan of a directory. \n+   [No default, which means use root directory for projects]\n  * GITWEB_EXPORT_OK\n    Show repository only if this file exists (in repository).  Only\n    effective if this variable evaluates to true.  [No default / Not set]\n@@ -153,7 +154,8 @@ not include variables usually directly set during build):\n    Absolute filesystem path which will be prepended to project path;\n    the path to repository is $projectroot/$project.  Set to\n    $GITWEB_PROJECTROOT during installation.  This variable have to be\n-   set correctly for gitweb to find repositories.\n+   set correctly for gitweb to find repositories.  (Note that gitweb deals\n+   with bare repositories.)\n  * $projects_list\n    Source of projects list, either directory to scan, or text file\n    with list of repositories (in the \"<URI-encoded repository path> SP\n-- \n1.6.0.4\n"}]}