Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Niget
slapos
Commits
298b664d
Commit
298b664d
authored
Aug 28, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gitrepo profile
parent
d4ed74a9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
46 deletions
+54
-46
software/gitrepo/git-http-backend.cgi.in
software/gitrepo/git-http-backend.cgi.in
+4
-1
software/gitrepo/gitweb.cgi.in
software/gitrepo/gitweb.cgi.in
+1
-1
software/gitrepo/gitweb.conf.in
software/gitrepo/gitweb.conf.in
+2
-2
software/gitrepo/httpd.conf.in
software/gitrepo/httpd.conf.in
+17
-13
software/gitrepo/instance-gitrepo.cfg
software/gitrepo/instance-gitrepo.cfg
+25
-24
software/gitrepo/software.cfg
software/gitrepo/software.cfg
+5
-5
No files found.
software/gitrepo/git-http-backend.cgi.in
View file @
298b664d
#!/usr/bin/env sh
GIT_PROJECT_ROOT
=
"%(projectdir)s"
GIT_HTTP_EXPORT_ALL
=
exec
"%(githttpbackend)s"
$@
## This is a very dirty hack
export
PATH_INFO
=
"
$$
{REDIRECT_URL:-
$PATH_INFO
}"
GIT_PROJECT_ROOT
=
'${git-repos:base-directory}'
GIT_HTTP_EXPORT_ALL
=
exec
'${:githttpbackend}'
$@
software/gitrepo/gitweb.cgi.in
View file @
298b664d
#!/usr/bin/env sh
GITWEB_CONFIG
=
"%(gitwebconf)s"
exec
"%(perl)s"
"%(gitweb)s"
$@
GITWEB_CONFIG
=
'${gitweb-conf:output}'
exec
'${:perl}'
'${:gitweb}'
$@
software/gitrepo/gitweb.conf.in
View file @
298b664d
$projectroot = '
%(projectdir)s
';
$projectroot = '
${git-repos:base-directory}
';
$site_name = '
%(sitename)s
';
$site_name = '
${slap-parameter:title}
';
# Beautiful URLs
$feature{'pathinfo'}{'default'} = [1];
software/gitrepo/httpd.conf.in
View file @
298b664d
PidFile "
%(pidfile)s
"
Listen
%(ip)s:%(port)s
PidFile "
${:pid-file}
"
Listen
${slap-network-information:global-ipv6}:${:port}
ServerAdmin someone@email
ErrorLog "
%(errorlog)s
"
ErrorLog "
${:error-log}
"
LogLevel warn
ScriptSock "
%(cgidsock)s
"
ScriptSock "
${:cgid-sock}
"
<Directory />
AllowOverride None
...
...
@@ -13,38 +13,41 @@ ScriptSock "%(cgidsock)s"
Deny from all
</Directory>
Alias "/static/" "
%(gitwebstaticdir)s
"
<Directory "
%(gitwebstaticdir)s
">
Alias "/static/" "
${:gitweb-static-dir}
"
<Directory "
${:gitweb-static-dir}
">
Options FollowSymLinks
Order deny,allow
Allow from all
</Directory>
# This is Static Accelerated git pull
AliasMatch "^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$" "
%(projectdir)s
/$1"
AliasMatch "^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$" "
%(projectdir)s
/$1"
AliasMatch "^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$" "
${:project-dir}
/$1"
AliasMatch "^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$" "
${:project-dir}
/$1"
# When it can't be statically delivered, we rely on git-http-backend
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/info/[^/]+ | \
git-(upload|receive)-pack))$" \
"
%(githttpbackend)s
/$1"
git-(upload|receive)-pack))
(/push)?
$" \
"
${:git-http-backend}
/$1"
# Everything else is gitweb interface
ScriptAlias "/" "
%(gitwebscript)s
/"
ScriptAlias "/" "
${:gitweb-script}
/"
<Location />
Order deny,allow
Allow from all
RewriteEngine On
RewriteCond %{QUERY_STRING} service=git-receive-pack
RewriteRule ^(.*)$ $1/push [END]
</Location>
<LocationMatch "
^/.*/git-receive-pack
$">
<LocationMatch "
(^/.*/git-receive-pack|/push)
$">
AuthType Basic
AuthName "Git Push Access"
AuthBasicProvider file
AuthUserFile "
%(passwdfile)s
"
AuthUserFile "
${:passwd-file}
"
Require valid-user
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
</LocationMatch>
...
...
@@ -60,4 +63,5 @@ LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule env_module modules/mod_env.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule unixd_module modules/mod_unixd.so
software/gitrepo/instance-gitrepo.cfg
View file @
298b664d
...
...
@@ -5,12 +5,19 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
httpd
publish
httpd
httpd-conf
gitweb-conf
gitweb-cgi
git-http-backend-cgi
htpasswd
pwgen
git-repos
[publish]
recipe = slapos.cookbook:publish
url = http://$${pwgen:user}:$${pwgen:password}@[$${
httpd-conf:ip
}]:$${httpd-conf:port}/
url = http://$${pwgen:user}:$${pwgen:password}@[$${
slap-network-information:global-ipv6
}]:$${httpd-conf:port}/
[httpd]
recipe = slapos.cookbook:wrapper
...
...
@@ -19,48 +26,42 @@ output = $${basedirectory:services}/httpd
[httpd-conf]
recipe = slapos.
cookbook:
template
template
= ${template-httpd-conf:location}/${template-httpd-conf:filename}
recipe = slapos.
recipe.
template
url
= ${template-httpd-conf:location}/${template-httpd-conf:filename}
output = $${rootdirectory:etc}/httpd.conf
pidfile = $${basedirectory:run}/httpd.pid
errorlog = $${basedirectory:log}/httpd-errorlog.log
gitwebstaticdir = ${gitweb:location}/share/gitweb/static/
gitwebscript = $${gitweb-cgi:output}
githttpbackend = $${git-http-backend-cgi:output}
cgidsock = $${basedirectory:run}/cgid.sock
projectdir = $${gitweb-conf:projectdir}
passwdfile = $${htpasswd:output}
ip = $${slap-network-information:global-ipv6}
pid-file = $${basedirectory:run}/httpd.pid
error-log = $${basedirectory:log}/httpd-errorlog.log
gitweb-static-dir = ${gitweb:location}/share/gitweb/static/
gitweb-script = $${gitweb-cgi:output}
git-http-backend = $${git-http-backend-cgi:output}
cgid-sock = $${basedirectory:run}/cgid.sock
project-dir = $${git-repos:base-directory}
passwd-file = $${htpasswd:output}
port = 8080
[gitweb-conf]
recipe = slapos.
cookbook:
template
template
= ${template-gitweb-conf:location}/${template-gitweb-conf:filename}
recipe = slapos.
recipe.
template
url
= ${template-gitweb-conf:location}/${template-gitweb-conf:filename}
output = $${rootdirectory:etc}/gitweb.conf
projectdir = $${git-repos:base-directory}
sitename = $${slap-parameter:title}
[gitweb-cgi]
recipe = slapos.
cookbook:
template
template
= ${template-gitweb-cgi:location}/${template-gitweb-cgi:filename}
recipe = slapos.
recipe.
template
url
= ${template-gitweb-cgi:location}/${template-gitweb-cgi:filename}
output = $${rootdirectory:bin}/gitweb.cgi
mode = 700
perl = ${perl:location}/bin/perl
gitweb = ${gitweb:location}/share/gitweb/gitweb.cgi
gitwebconf = $${gitweb-conf:output}
[git-http-backend-cgi]
recipe = slapos.
cookbook:
template
template
= ${template-git-http-backend-cgi:location}/${template-git-http-backend-cgi:filename}
recipe = slapos.
recipe.
template
url
= ${template-git-http-backend-cgi:location}/${template-git-http-backend-cgi:filename}
output = $${rootdirectory:bin}/git-http-backend.cgi
mode = 700
projectdir = $${git-repos:base-directory}
githttpbackend = ${git:location}/libexec/git-core/git-http-backend
...
...
software/gitrepo/software.cfg
View file @
298b664d
...
...
@@ -27,7 +27,7 @@ mode = 0644
[template-gitrepo]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-gitrepo.cfg
md5sum =
79ebc1f23443562b3facd4945f031fcf
md5sum =
2ad8457628996bf0b71d80e10b3b5aa9
output = ${buildout:directory}/template-gitrepo.cfg
mode = 0644
...
...
@@ -39,22 +39,22 @@ download-only = true
[template-gitweb-cgi]]
<= template-download
filename = gitweb.cgi.in
md5sum =
977d23296605d6a7f33f4f83d5bd29c8
md5sum =
5c720202053bfba06eec6e97d8d47cd0
[template-gitweb-conf]
<= template-download
filename = gitweb.conf.in
md5sum =
bdf4b9e616e7b8e436040304bf1ac312
md5sum =
d3cb0c16f54da0ea02ac982dd59d7924
[template-git-http-backend-cgi]
<= template-download
filename = git-http-backend.cgi.in
md5sum =
814393f919dd0204c913aa77e6183b9c
md5sum =
7e0562b0ce8d48bc8f6b422850dc53af
[template-httpd-conf]
<= template-download
filename = httpd.conf.in
md5sum =
442ffed44a671eb3c5810a6bfa8a3515
md5sum =
e5e6a6de32323248d11918934f6aad99
[collective-recipe-cmd]
recipe = zc.recipe.egg
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment