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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
slapos
Commits
ab641fd9
Commit
ab641fd9
authored
Aug 21, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gitrepo software using generic recipes
parent
8cd3413e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
258 additions
and
0 deletions
+258
-0
software/gitrepo/git-http-backend.cgi.in
software/gitrepo/git-http-backend.cgi.in
+3
-0
software/gitrepo/gitweb.cgi.in
software/gitrepo/gitweb.cgi.in
+3
-0
software/gitrepo/gitweb.conf.in
software/gitrepo/gitweb.conf.in
+6
-0
software/gitrepo/httpd.conf.in
software/gitrepo/httpd.conf.in
+63
-0
software/gitrepo/instance-gitrepo.cfg
software/gitrepo/instance-gitrepo.cfg
+104
-0
software/gitrepo/instance.cfg
software/gitrepo/instance.cfg
+13
-0
software/gitrepo/software.cfg
software/gitrepo/software.cfg
+66
-0
No files found.
software/gitrepo/git-http-backend.cgi.in
0 → 100644
View file @
ab641fd9
#!/usr/bin/env sh
GIT_PROJECT_ROOT
=
"%(projectdir)s"
GIT_HTTP_EXPORT_ALL
=
exec
"%(githttpbackend)s"
$@
software/gitrepo/gitweb.cgi.in
0 → 100644
View file @
ab641fd9
#!/usr/bin/env sh
GITWEB_CONFIG
=
"%(gitwebconf)s"
exec
"%(perl)s"
"%(gitweb)s"
$@
software/gitrepo/gitweb.conf.in
0 → 100644
View file @
ab641fd9
$projectroot = '%(projectdir)s';
$site_name = '%(sitename)s';
# Beautiful URLs
$feature{'pathinfo'}{'default'} = [1];
software/gitrepo/httpd.conf.in
0 → 100644
View file @
ab641fd9
PidFile "%(pidfile)s"
Listen %(ip)s:%(port)s
ServerAdmin someone@email
ErrorLog "%(errorlog)s"
LogLevel warn
ScriptSock "%(cgidsock)s"
<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Alias "/static/" "%(gitwebstaticdir)s"
<Directory "%(gitwebstaticdir)s">
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"
# 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"
# Everything else is gitweb interface
ScriptAlias "/" "%(gitwebscript)s/"
<Location />
Order deny,allow
Allow from all
</Location>
<LocationMatch "^/.*/git-receive-pack$">
AuthType Basic
AuthName "Git Push Access"
AuthBasicProvider file
AuthUserFile "%(passwdfile)s"
Require valid-user
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
</LocationMatch>
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
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 unixd_module modules/mod_unixd.so
software/gitrepo/instance-gitrepo.cfg
0 → 100644
View file @
ab641fd9
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
httpd
publish
[publish]
recipe = slapos.cookbook:publish
url = http://$${pwgen:user}:$${pwgen:password}@[$${httpd-conf:ip}]:$${httpd-conf:port}/
[httpd]
recipe = slapos.cookbook:wrapper
command-line = ${apache:location}/bin/httpd -DFOREGROUND -f "$${httpd-conf:output}"
output = $${basedirectory:services}/httpd
[httpd-conf]
recipe = slapos.cookbook:template
template = ${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}
port = 8080
[gitweb-conf]
recipe = slapos.cookbook:template
template = ${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}
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}
output = $${rootdirectory:bin}/git-http-backend.cgi
mode = 700
projectdir = $${git-repos:base-directory}
githttpbackend = ${git:location}/libexec/git-core/git-http-backend
[htpasswd]
recipe = collective.recipe.cmd
output = $${rootdirectory:etc}/httpd.htpasswd
on_install = true
on_udptae = true
cmds =
${apache:location}/bin/htpasswd -cb $${:output} $${pwgen:user} $${pwgen:password}
[pwgen]
recipe = slapos.cookbook:pwgen
file = $${buildout:directory}/.password
pwgen-binary = ${pwgen:location}/bin/pwgen
user = slapos
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/
bin = $${buildout:directory}/bin/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
git-repos = $${rootdirectory:srv}/git/
log = $${rootdirectory:var}/log/
[git-repos]
recipe = slapos.cookbook:gitinit
base-directory = $${basedirectory:git-repos}
repos = $${slap-parameter:repos}
git-binary = ${git:location}/bin/git
[slap-parameter]
title = GitSlap
software/gitrepo/instance.cfg
0 → 100644
View file @
ab641fd9
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
switch-softwaretype
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-gitrepo:output}
software/gitrepo/software.cfg
0 → 100644
View file @
ab641fd9
[buildout]
extends =
../../component/apache/buildout.cfg
../../component/perl/buildout.cfg
../../component/git/buildout.cfg
../../component/pwgen/buildout.cfg
../../stack/slapos.cfg
parts =
apache
perl
git
gitweb
slapos-cookbook
template
template-gitrepo
collective-recipe-cmd
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 5917cf0a9d6cc5d6d184e89ca2d72a91
output = ${buildout:directory}/template.cfg
mode = 0644
[template-gitrepo]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-gitrepo.cfg
md5sum = 79ebc1f23443562b3facd4945f031fcf
output = ${buildout:directory}/template-gitrepo.cfg
mode = 0644
[template-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
[template-gitweb-cgi]]
<= template-download
filename = gitweb.cgi.in
md5sum = 977d23296605d6a7f33f4f83d5bd29c8
[template-gitweb-conf]
<= template-download
filename = gitweb.conf.in
md5sum = bdf4b9e616e7b8e436040304bf1ac312
[template-git-http-backend-cgi]
<= template-download
filename = git-http-backend.cgi.in
md5sum = 814393f919dd0204c913aa77e6183b9c
[template-httpd-conf]
<= template-download
filename = httpd.conf.in
md5sum = f1056dbad1281929cd49c24e62ecc88e
[collective-recipe-cmd]
recipe = zc.recipe.egg
eggs =
collective.recipe.cmd
[version]
slapos.cookbook =
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