From 5ce988e0636760e1963a0b3ae3c713215cde61c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Sat, 12 Mar 2022 16:42:35 +0100 Subject: [PATCH] Updated git.pm (set httpd config to authenticate through fds.in). --- .../install-data/etc/httpd/conf.d/git.conf | 41 +++++++++++-------- sources/git.pm/envvars | 2 +- sources/start-order.txt | 22 +++++----- 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/sources/git.pm/c3d/postinstall/install-data/etc/httpd/conf.d/git.conf b/sources/git.pm/c3d/postinstall/install-data/etc/httpd/conf.d/git.conf index d8bd2bd..192d005 100644 --- a/sources/git.pm/c3d/postinstall/install-data/etc/httpd/conf.d/git.conf +++ b/sources/git.pm/c3d/postinstall/install-data/etc/httpd/conf.d/git.conf @@ -2,28 +2,37 @@ ServerName git.pm.useribm.hu ServerAdmin siteadmin@useribm.hu - SetEnv GIT_PROJECT_ROOT /git + SetEnv GIT_PROJECT_ROOT /git/repositories SetEnv GIT_HTTP_EXPORT_ALL - DocumentRoot /git - ScriptAlias / /usr/libexec/git-core/git-http-backend/ + RewriteEngine on - - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - AllowOverride None + RewriteCond "%{HTTP_USER_AGENT}" "^git" + RewriteRule "^/git/" "-" [END] + RewriteCond "%{HTTP_USER_AGENT}" "^git" + RewriteRule "^/(.*)$" "/git/$1" [END,PT] + + RewriteCond "%{HTTP_USER_AGENT}" "!^git" + RewriteRule "^/browser/" "-" [END] + RewriteCond "%{HTTP_USER_AGENT}" "!^git" + RewriteRule "^/(.*)$" "/browser/$1" [END,PT] + + Alias /browser/ /git/gitweb/ + + + Options +ExecCGI + AddHandler cgi-script .cgi + DirectoryIndex gitweb.cgi Require all granted - + ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ + + AuthName "Git" - AuthType Digest - AuthDigestProvider file - AuthUserFile /git/auth.htdigest + AuthType Basic + AuthBasicProvider ldap + AuthLDAPURL "ldap://fds.in.useribm.hu/ou=People, dc=user, dc=hu" Require valid-user - - Dav On - Options Indexes FollowSymLinks - AllowOverride None - Require all granted - + diff --git a/sources/git.pm/envvars b/sources/git.pm/envvars index 30a7bb0..dc5db8e 100644 --- a/sources/git.pm/envvars +++ b/sources/git.pm/envvars @@ -1,3 +1,3 @@ DISTRIBUTION=Fedora DISTRIBUTION_VERSION=35 -SPEC_PACKAGES="cronie git-all httpd" +SPEC_PACKAGES="cronie git-all httpd mod_ldap" diff --git a/sources/start-order.txt b/sources/start-order.txt index a144514..bc245d9 100644 --- a/sources/start-order.txt +++ b/sources/start-order.txt @@ -14,20 +14,17 @@ group 4: group 5: dhcp.in 41 - ins.in 42 - ls.in 43 - mx.in 44 - ns1.in 45 - ns2.in 46 - svc.in 47 - vpn.in 48 + ls.in 42 + mx.in 43 + ns1.in 44 + ns2.in 45 + vpn.in 46 group 6: fds.in 51 - ldap.in 52 - pki.in 53 - sns.in 54 - wiki.in 55 + pki.in 52 + sns.in 53 + wiki.in 54 group 7: git.pm 61 @@ -36,4 +33,5 @@ group 7: group 8: dhsvn.in 71 - pastry.in 72 + fdc.in 72 + pastry.in 73 -- 2.54.0