Punt CGit!
authorMatt Birkholz <matt@birchwood-abbey.net>
Fri, 22 Dec 2023 23:27:47 +0000 (16:27 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sat, 23 Dec 2023 05:06:41 +0000 (22:06 -0700)
README.org
roles_t/abbey-core/tasks/main.yml
roles_t/abbey-front/tasks/main.yml

index 50b3a95258db03ee52d392fe38facc289adf1a50..4b0b0c06c07e50139b63af356e6439118cede950 100644 (file)
@@ -377,52 +377,6 @@ web site =/favicon.ico=.
     state: restarted
 #+END_SRC
 
-** Configure CGit on Front
-
-CGit is handled similarly, modifying =/etc/cgitrc= to reference a
-~CGIT_SCANPATH~ environment variable set by Apache re-write rules.
-The resulting Apache directives are given in ~apache-cgit~ and the
-Ansible tasks in ~apache-cgit-tasks~, for both Front and Core.
-
-#+NAME: apache-cgit
-#+CAPTION: ~apache-cgit~
-#+BEGIN_SRC conf
-
-ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-Alias /cgit-css/ /usr/share/cgit/
-<Directory "/usr/lib/cgit/">
-   AllowOverride None
-   Options ExecCGI FollowSymlinks
-   Require all granted
-</Directory>
-RewriteRule ^/cgit?(/.*)$ \
-            /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
-            /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
-#+END_SRC
-
-#+NAME: apache-cgit-tasks
-#+CAPTION: ~apache-cgi-tasks~
-#+BEGIN_SRC conf
-- name: Install CGit.
-  become: yes
-  apt: pkg=cgit
-
-- name: Disable CGit default configuration.
-  become: yes
-  command:
-    cmd: a2disconf -q cgit
-    removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
-  become: yes
-  lineinfile:
-    path: /etc/cgitrc
-    regexp: "^scan-path *="
-    line: "scan-path=$CGIT_SCANPATH"
-  notify: Restart Apache2.
-#+END_SRC
-
 ** Configure Apache for Abbey Documentation
 
 Some of the directives added to the =-vhost.conf= file are needed by
@@ -476,11 +430,11 @@ Luckily there is support for this in the institutional configuration.
 The abbey simply creates a =birchwood-abbey.net-vhost.conf= file in
 =/etc/apache2/sites-available/=.
 
-The following task adds the [[apache-abbey][~apache-abbey~]], [[apache-photos][~apache-photos~]],
-[[apache-gitweb][~apache-gitweb~]], and [[apache-cgit][~apache-cgit~]] directives described above to the
-=-vhost.conf= file, and includes =options-ssl-apache.conf= from
-=/etc/letsencrypt/=.  The rest of the Let's Encrypt configuration is
-discussed in the following [[*Install Let's Encrypt][Install Let's Encrypt]] section.
+The following task adds the [[apache-abbey][~apache-abbey~]], [[apache-photos][~apache-photos~]], and
+[[apache-gitweb][~apache-gitweb~]] directives described above to the =-vhost.conf= file,
+and includes =options-ssl-apache.conf= from =/etc/letsencrypt/=.  The
+rest of the Let's Encrypt configuration is discussed in the following
+[[*Install Let's Encrypt][Install Let's Encrypt]] section.
 
 #+CAPTION: =roles_t/abbey-front/tasks/main.yml=
 #+BEGIN_SRC conf :tangle roles_t/abbey-front/tasks/main.yml :noweb yes
@@ -494,14 +448,11 @@ discussed in the following [[*Install Let's Encrypt][Install Let's Encrypt]] sec
         <<apache-abbey>>
         <<apache-photos>>
         <<apache-gitweb>>
-        <<apache-cgit>>
         IncludeOptional /etc/letsencrypt/options-ssl-apache.conf
     dest: /etc/apache2/sites-available/{{ domain_name }}-vhost.conf
   notify: Restart Apache2.
 
 <<apache-gitweb-tasks>>
-
-<<apache-cgit-tasks>>
 #+END_SRC
 
 #+CAPTION: =roles_t/abbey-front/handlers/main.yml=
@@ -913,7 +864,7 @@ services on Front and Core.  See [[Configure Git Daemon on Front]] and
 The Apache2 configuration on Core specifies three web sites (live,
 test, and campus).  The live and test sites must operate just like the
 site on Front.  Their configurations include the same [[apache-abbey][~apache-abbey~]],
-[[apache-photos][~apache-photos~]], [[apache-gitweb][~apache-gitweb~]], and [[apache-cgit][~apache-cgit~]] used on Front.
+[[apache-photos][~apache-photos~]], and [[apache-gitweb][~apache-gitweb~]] used on Front.
 
 #+CAPTION: =roles_t/abbey-core/tasks/main.yml=
 #+BEGIN_SRC conf :tangle roles_t/abbey-core/tasks/main.yml :noweb yes
@@ -927,7 +878,6 @@ site on Front.  Their configurations include the same [[apache-abbey][~apache-ab
         <<apache-abbey>>
         <<apache-photos>>
         <<apache-gitweb>>
-        <<apache-cgit>>
     dest: /etc/apache2/sites-available/live-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
@@ -941,14 +891,11 @@ site on Front.  Their configurations include the same [[apache-abbey][~apache-ab
         <<apache-abbey>>
         <<apache-photos>>
         <<apache-gitweb>>
-        <<apache-cgit>>
     dest: /etc/apache2/sites-available/test-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
 
 <<apache-gitweb-tasks>>
-
-<<apache-cgit-tasks>>
 #+END_SRC
 
 #+CAPTION: =roles_t/abbey-core/handlers/main.yml=
@@ -963,8 +910,7 @@ The institute serves its =/usr/share/doc/= on the house (campus) web
 site.  This is a debugging convenience, making some HTML documentation
 more accessible, especially the documentation of software installed on
 Core and not on typical desktop clients.  Also included: the Apache2
-directives that enable user Git publishing with Gitweb and CGit
-(defined [[apache-gitweb][here]] and [[apache-cgit][here]] respectively).
+directives that enable user Git publishing with Gitweb (defined [[apache-gitweb][here]]).
 
 #+CAPTION: =roles_t/abbey-core/tasks/main.yml=
 #+BEGIN_SRC conf :tangle roles_t/abbey-core/tasks/main.yml :noweb yes
@@ -978,7 +924,6 @@ directives that enable user Git publishing with Gitweb and CGit
           Options Indexes
       </Directory>
       <<apache-gitweb>>
-      <<apache-cgit>>
     dest: /etc/apache2/sites-available/www-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
index c4ca66920fabee60ebc3df848dad0e4758f5f5fe..6eafa5fa5af22aeac61967965d929febc7a2b791 100644 (file)
         RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
                     /cgi-bin/gitweb.cgi$3 \
                     [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-        
-        ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-        Alias /cgit-css/ /usr/share/cgit/
-        <Directory "/usr/lib/cgit/">
-           AllowOverride None
-           Options ExecCGI FollowSymlinks
-           Require all granted
-        </Directory>
-        RewriteRule ^/cgit?(/.*)$ \
-                    /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-        RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
-                    /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
     dest: /etc/apache2/sites-available/live-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
         RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
                     /cgi-bin/gitweb.cgi$3 \
                     [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-        
-        ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-        Alias /cgit-css/ /usr/share/cgit/
-        <Directory "/usr/lib/cgit/">
-           AllowOverride None
-           Options ExecCGI FollowSymlinks
-           Require all granted
-        </Directory>
-        RewriteRule ^/cgit?(/.*)$ \
-                    /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-        RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
-                    /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
     dest: /etc/apache2/sites-available/test-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
     dest: /etc/gitweb.conf
     mode: u=rw,g=r,o=r
 
-- name: Install CGit.
-  become: yes
-  apt: pkg=cgit
-
-- name: Disable CGit default configuration.
-  become: yes
-  command:
-    cmd: a2disconf -q cgit
-    removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
-  become: yes
-  lineinfile:
-    path: /etc/cgitrc
-    regexp: "^scan-path *="
-    line: "scan-path=$CGIT_SCANPATH"
-  notify: Restart Apache2.
-
 - name: Configure house website.
   become: yes
   copy:
       RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
                   /cgi-bin/gitweb.cgi$3 \
                   [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-      
-      ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-      Alias /cgit-css/ /usr/share/cgit/
-      <Directory "/usr/lib/cgit/">
-         AllowOverride None
-         Options ExecCGI FollowSymlinks
-         Require all granted
-      </Directory>
-      RewriteRule ^/cgit?(/.*)$ \
-                  /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-      RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
-                  /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
     dest: /etc/apache2/sites-available/www-vhost.conf
     mode: u=rw,g=r,o=r
   notify: Restart Apache2.
index 1aba984e87d1e052113a2b0479b145e3d21c2e79..07ff9ce2df5dc40e3189caaea00c3a833140038c 100644 (file)
         RewriteRule ^/\~([^\/]+)/gitweb(\.cgi)?(/.*)?$ \
                     /cgi-bin/gitweb.cgi$3 \
                     [QSA,E=GITWEB_PROJECTROOT:/home/$1/Public/Git/,L,PT]
-        
-        ScriptAlias /cgit/ /usr/lib/cgit/cgit.cgi/
-        Alias /cgit-css/ /usr/share/cgit/
-        <Directory "/usr/lib/cgit/">
-           AllowOverride None
-           Options ExecCGI FollowSymlinks
-           Require all granted
-        </Directory>
-        RewriteRule ^/cgit?(/.*)$ \
-                    /cgit$1 [QSA,E=CGIT_SCANPATH:/var/www/git/,L,PT]
-        RewriteRule ^/\~([^\/]+)/cgit(/.*)?$ \
-                    /cgit$2 [QSA,E=CGIT_SCANPATH:/home/$1/Public/Git/,L,PT]
         IncludeOptional /etc/letsencrypt/options-ssl-apache.conf
     dest: /etc/apache2/sites-available/{{ domain_name }}-vhost.conf
   notify: Restart Apache2.
     dest: /etc/gitweb.conf
     mode: u=rw,g=r,o=r
 
-- name: Install CGit.
-  become: yes
-  apt: pkg=cgit
-
-- name: Disable CGit default configuration.
-  become: yes
-  command:
-    cmd: a2disconf -q cgit
-    removes: /etc/apache2/conf-enabled/cgit.conf
-
-- name: Override CGit scan path.
-  become: yes
-  lineinfile:
-    path: /etc/cgitrc
-    regexp: "^scan-path *="
-    line: "scan-path=$CGIT_SCANPATH"
-  notify: Restart Apache2.
-
 - name: Configure Apache log archival.
   become: yes
   lineinfile: