drop apache <2.4 support
authorIvan Kohler <ivan@freeside.biz>
Sat, 11 Apr 2020 21:20:58 +0000 (14:20 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sat, 11 Apr 2020 21:21:25 +0000 (14:21 -0700)
Makefile
htetc/freeside-base2.conf [deleted file]

index 545cecf..35355cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,17 +26,8 @@ MASONDATA = ${FREESIDE_CACHE}/masondata
 #package maintainers
 DIST_CONF = ${FREESIDE_CONF}/default_conf
 
-#mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x)
-#APACHE_VERSION=2
-#Apache 2.4 (Debian 8.x)
-#APACHE_VERSION=2.4
-APACHE_VERSION := $(shell /usr/sbin/apache2 -v | grep -q '\/2\.4\.' && echo '2.4' || echo '2')
-
-#deb (-7 and upgrades)
-#FREESIDE_DOCUMENT_ROOT = /var/www/freeside
-#deb (new installs of 8+) (plus needs more work w/new auth)
-#FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
-FREESIDE_DOCUMENT_ROOT := $(shell [ ${APACHE_VERSION} = '2.4' ] && echo '/var/www/html/freeside' || echo '/var/www/freeside')
+#deb
+FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
 
 #redhat, fedora, mandrake
 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
@@ -77,12 +68,8 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
 
 #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
-#deb (3.1+), apache2
-#APACHE_CONF = /etc/apache2/conf.d
 #debian unstable/8.0+, apache2.4
-#APACHE_CONF = /etc/apache2/conf-available
-APACHE_CONF := $(shell [ ${APACHE_VERSION} = '2.4' ] && echo '/etc/apache2/conf-available' || echo '/etc/apache2/conf.d')
-
+APACHE_CONF = /etc/apache2/conf-available
 INSSERV_OVERRIDE = /etc/insserv/overrides
 
 FREESIDE_RESTART = ${INIT_FILE} restart
@@ -291,7 +278,7 @@ install-init:
 install-apache:
        [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true
        [ -d ${APACHE_CONF} ] && \
-         ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \
+         ( install -o root -m 755 htetc/freeside-base2.4.conf ${APACHE_CONF} && \
            ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
            ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
            perl -p -i -e "\
@@ -300,8 +287,8 @@ install-apache:
              s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
            " ${APACHE_CONF}/freeside-*.conf \
          ) || true
-       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
-       [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
+       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base2.4 ) || true
+       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
        [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
        [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
 
diff --git a/htetc/freeside-base2.conf b/htetc/freeside-base2.conf
deleted file mode 100644 (file)
index 7ea26d3..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-PerlModule Apache2::compat
-
-#PerlModule Apache::DBI
-
-PerlModule HTML::Mason
-PerlSetVar MasonArgsMethod CGI
-PerlModule HTML::Mason::ApacheHandler
-
-PerlRequire "%%%MASON_HANDLER%%%"
-
-PerlChildInitHandler FS::Mason::child_init
-
-#Locale::SubCountry
-AddDefaultCharset UTF-8
-
-PerlModule FS::AuthCookieHandler
-
-#XXX need to also work properly for installs w/o /freeside/ in path
-PerlSetVar FreesideLoginScript /freeside/loginout/login.html
-
-#disables HTTP, so HTTPS only
-#PerlSetVar FreesideSecure 1
-
-#prevents cookie theft via JS
-PerlSetVar FreesideHttpOnly 1
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
-
-    AuthName Freeside
-    AuthType FS::AuthCookieHandler
-    PerlAuthenHandler FS::AuthCookieHandler->authenticate
-    PerlAuthzHandler  FS::AuthCookieHandler->authorize
-    require valid-user
-
-    <Files ~ "(\.cgi|\.html)$">
-        SetHandler perl-script
-        PerlHandler HTML::Mason
-    </Files>
-
-</Directory>
-
-<Files login>
-    AuthName Freeside
-    AuthType FS::AuthCookieHandler
-    SetHandler perl-script
-    PerlHandler FS::AuthCookieHandler->login
-</Files>
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/elements/>
-    <Files "freeside.css">
-        Satisfy any
-    </Files>
-
-    <Files ~ "(\.html)$">
-        Deny from all
-        SetHandler None
-    </Files>
-</Directory>
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/Helpers/>
-    SetHandler perl-script
-    PerlHandler HTML::Mason
-</Directory>
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/REST/1.0/NoAuth/>
-    Satisfy any
-</Directory>
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/NoAuth/iCal/>
-    Satisfy any
-    SetHandler perl-script
-    PerlHandler HTML::Mason
-</Directory>
-
-<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/REST/1.0/>
-    Satisfy any
-    SetHandler perl-script
-    PerlHandler HTML::Mason
-</Directory>
-