[Rt-commit] rt branch, 4.4/add-postgresql-apache-fcgid-tests, created. rt-4.4.4-139-g4b18a29a61

Dianne Skoll dianne at bestpractical.com
Tue Aug 25 09:07:30 EDT 2020


The branch, 4.4/add-postgresql-apache-fcgid-tests has been created
        at  4b18a29a61054e2df5030602c4245460cd853e53 (commit)

- Log -----------------------------------------------------------------
commit c7870a6a7ad621ca088fbd8cab7d9d4519bb78e4
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Mon Aug 24 14:56:22 2020 -0400

    Add support for mod_fcgid.

diff --git a/configure.ac b/configure.ac
index e10ccf199a..005f8e09be 100755
--- a/configure.ac
+++ b/configure.ac
@@ -54,9 +54,9 @@ AC_ARG_WITH(web-handler,
         ]),
     WEB_HANDLER=$withval,
     WEB_HANDLER=fastcgi)
-my_web_handler_test=$($PERL -e 'print "ok" unless grep $_ !~ /^(modperl1|modperl2|fastcgi|standalone)$/i, grep defined && length, split /\s*,\s*/, $ARGV@<:@0@:>@' $WEB_HANDLER)
+my_web_handler_test=$($PERL -e 'print "ok" unless grep $_ !~ /^(modperl1|modperl2|fastcgi|fcgid|standalone)$/i, grep defined && length, split /\s*,\s*/, $ARGV@<:@0@:>@' $WEB_HANDLER)
 if test "$my_web_handler_test" != "ok"; then
-	AC_MSG_ERROR([Only modperl1, modperl2, fastcgi and standalone are valid web-handlers])
+	AC_MSG_ERROR([Only modperl1, modperl2, fastcgi, fcgid and standalone are valid web-handlers])
 fi
 AC_SUBST(WEB_HANDLER)
 
@@ -503,6 +503,7 @@ AC_CONFIG_FILES([
                  t/data/configs/apache2.2+mod_perl.conf
                  t/data/configs/apache2.2+fastcgi.conf
                  t/data/configs/apache2.4+mod_perl.conf
-                 t/data/configs/apache2.4+fastcgi.conf],
+                 t/data/configs/apache2.4+fastcgi.conf
+                 t/data/configs/apache2.4+fcgid.conf],
                )
 AC_OUTPUT
diff --git a/lib/RT/Test/Apache.pm b/lib/RT/Test/Apache.pm
index 2cb0df4187..3c0bfe0505 100644
--- a/lib/RT/Test/Apache.pm
+++ b/lib/RT/Test/Apache.pm
@@ -58,6 +58,7 @@ my %MODULES = (
     '2.4' => {
         "mod_perl" => [qw(mpm_worker authz_core authn_core authz_host env alias perl)],
         "fastcgi"  => [qw(mpm_worker authz_core authn_core authz_host env alias mime fastcgi)],
+        "fcgid"  => [qw(mpm_worker authz_core authn_core authz_host env alias mime fcgid)],
     },
 );
 
diff --git a/t/data/configs/apache2.4+fcgid.conf.in b/t/data/configs/apache2.4+fcgid.conf.in
new file mode 100644
index 0000000000..0ef6cf99d4
--- /dev/null
+++ b/t/data/configs/apache2.4+fcgid.conf.in
@@ -0,0 +1,47 @@
+ServerRoot %%SERVER_ROOT%%
+PidFile %%PID_FILE%%
+ServerAdmin root at localhost
+
+%%LOAD_MODULES%%
+
+<IfModule !mpm_netware_module>
+<IfModule !mpm_winnt_module>
+User @WEB_USER@
+Group @WEB_GROUP@
+</IfModule>
+</IfModule>
+
+ServerName localhost
+Listen %%LISTEN%%
+
+ErrorLog "%%LOG_FILE%%"
+LogLevel debug
+
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+    Require all denied
+</Directory>
+
+AddDefaultCharset UTF-8
+
+FcgidConnectTimeout 20
+FcgidProcessTableFile %%tmp_dir%%/shm
+FcgidIPCDir %%tmp_dir%%
+FcgidInitialEnv RT_TESTING 1
+FcgidInitialEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%%
+
+ScriptAlias / %%RT_SBIN_PATH%%/rt-server.fcgi/
+
+DocumentRoot "%%DOCUMENT_ROOT%%"
+<Location />
+
+    <RequireAll>
+        Require all granted
+%%BASIC_AUTH%%
+    </RequireAll>
+
+    Options +ExecCGI
+    AddHandler fcgid-script .fcgi
+</Location>
+

commit c9b592293a14cfe8f4ebbbaa66ef1316dbc54160
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Mon Aug 24 15:16:46 2020 -0400

    Add PostgreSQL tests on Travis CI.

diff --git a/.travis.yml b/.travis.yml
index 9a3695ae32..044c0233c0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,20 +1,42 @@
 language: bash
 services: docker
+os: linux
 
 notifications:
   slack:
     secure: ebb/6lbr1ob7wMh04C5PzM5/NNz6IstEUaUROA7BATuKKgPetl6qwmQNwvlwE5zYvJQBWQwKJ70JaCzJkXK6JVMVRRAWsXINJTzMfSqsoXEcJ59c5isf0bsnspVO7jxHTfXF/NZngR4EuPwH5v5lWp9m++j90t9nBKFFVi34WUE=
 
-env:
-  - RT_TEST_PARALLEL=1 RT_DBA_USER=root RT_DBA_PASSWORD=password DB_VERSION_TAG=10.3
+jobs:
+  include:
+  - stage: test
+    name: Test against PostgreSQL
+    env:
+      - RT_TEST_PARALLEL=1 RT_DBA_USER=postgres RT_DBA_PASSWORD=password DB_VERSION_TAG=9.6
 
 # $TRAVIS_BUILD_DIR will have a clone of the current branch
-before_install:
-  - docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG
-  - docker build -t rt-base .
-  - docker run -d -v $TRAVIS_BUILD_DIR:/rt --name rt --link mariadb:db rt-base
-  - docker ps -a
-  - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
+    before_install:
+      - docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:$DB_VERSION_TAG
+      - docker build -t rt-base .
+      - docker run -d -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -v $TRAVIS_BUILD_DIR:/rt --name rt --link postgresql:db rt-base
+      - docker ps -a
+      - docker exec -it rt bash -c "apt-get update && apt-get install -y libdbd-pg-perl"
+      - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
 
-script:
-    - docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
+    script:
+        - docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
+
+  - stage: test
+    name: Test against MariaDB
+    env:
+      - RT_TEST_PARALLEL=1 RT_DBA_USER=root RT_DBA_PASSWORD=password DB_VERSION_TAG=10.3
+
+# $TRAVIS_BUILD_DIR will have a clone of the current branch
+    before_install:
+      - docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG
+      - docker build -t rt-base .
+      - docker run -d -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password -v $TRAVIS_BUILD_DIR:/rt --name rt --link mariadb:db rt-base
+      - docker ps -a
+      - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
+
+    script:
+        - docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
diff --git a/Dockerfile b/Dockerfile
index d77111ec6f..47ae886637 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,6 @@ FROM bpssysadmin/rt-base-debian-stretch
 
 ENV RT_TEST_PARALLEL 1
 ENV RT_TEST_DEVEL 1
-ENV RT_DBA_USER root
-ENV RT_DBA_PASSWORD password
 ENV RT_TEST_DB_HOST=172.17.0.2
 ENV RT_TEST_RT_HOST=172.17.0.3
 

commit 4b18a29a61054e2df5030602c4245460cd853e53
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Mon Aug 24 15:32:54 2020 -0400

    Add three parallel test configurations:
    
    1) RT web handler + SQLite
    2) MariaDB + Apache/mod_fcgid
    3) PostgreSQL + Apache/mod_fcgid

diff --git a/.travis.yml b/.travis.yml
index 044c0233c0..7faa64faad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,34 +9,47 @@ notifications:
 jobs:
   include:
   - stage: test
-    name: Test against PostgreSQL
+    name: Test against SQLite with default web handler
     env:
-      - RT_TEST_PARALLEL=1 RT_DBA_USER=postgres RT_DBA_PASSWORD=password DB_VERSION_TAG=9.6
+      - RT_TEST_PARALLEL=1 RT_DBA_USER=root RT_DBA_PASSWORD=password DB_VERSION_TAG=10.3
 
-# $TRAVIS_BUILD_DIR will have a clone of the current branch
     before_install:
-      - docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:$DB_VERSION_TAG
       - docker build -t rt-base .
-      - docker run -d -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -v $TRAVIS_BUILD_DIR:/rt --name rt --link postgresql:db rt-base
+      - docker run -d -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password -v $TRAVIS_BUILD_DIR:/rt --name rt rt-base
       - docker ps -a
-      - docker exec -it rt bash -c "apt-get update && apt-get install -y libdbd-pg-perl"
-      - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
+      - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
 
     script:
         - docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
 
   - stage: test
-    name: Test against MariaDB
+    name: Test against MariaDB and Apache with mod_fcgid
     env:
       - RT_TEST_PARALLEL=1 RT_DBA_USER=root RT_DBA_PASSWORD=password DB_VERSION_TAG=10.3
 
-# $TRAVIS_BUILD_DIR will have a clone of the current branch
     before_install:
       - docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG
       - docker build -t rt-base .
-      - docker run -d -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password -v $TRAVIS_BUILD_DIR:/rt --name rt --link mariadb:db rt-base
+      - docker run -d -e RT_DBA_USER=root -e RT_DBA_PASSWORD=password -e RT_TEST_WEB_HANDLER=apache+fcgid -e HTTPD_ROOT=/etc/apache2 -e RT_TEST_APACHE=/usr/sbin/apache2 -e RT_TEST_APACHE_MODULES=/usr/lib/apache2/modules -v $TRAVIS_BUILD_DIR:/rt --name rt --link mariadb:db rt-base
       - docker ps -a
-      - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
+      - docker exec -it rt bash -c "chown -R rt-test /rt; touch /etc/apache2/mime.types"
+      - docker exec -e USER=rt-test -u rt-test -it rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --enable-layout=inplace --with-my-user-group --enable-developer --enable-externalauth --disable-gpg --disable-smime --with-web-handler=fcgid && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
 
     script:
-        - docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
+        - docker exec -e USER=rt-test -u rt-test -it rt bash -c "cd /rt &&prove -lj9 t/*"
+
+  - stage: test
+    name: Test against PostgreSQL and Apache with mod_fcgid
+    env:
+      - RT_TEST_PARALLEL=1 RT_DBA_USER=postgres RT_DBA_PASSWORD=password DB_VERSION_TAG=9.6
+
+    before_install:
+      - docker run --name postgresql --mount type=tmpfs,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=password -d postgres:$DB_VERSION_TAG
+      - docker build -t rt-base .
+      - docker run -d -e RT_DBA_USER=postgres -e RT_DBA_PASSWORD=password -e RT_TEST_WEB_HANDLER=apache+fcgid -e HTTPD_ROOT=/etc/apache2 -e RT_TEST_APACHE=/usr/sbin/apache2 -e RT_TEST_APACHE_MODULES=/usr/lib/apache2/modules -v $TRAVIS_BUILD_DIR:/rt --name rt --link postgresql:db rt-base
+      - docker ps -a
+      - docker exec -it rt bash -c "chown -R rt-test /rt; touch /etc/apache2/mime.types"
+      - docker exec -e USER=rt-test -u rt-test -it rt bash -c "cd /rt && ./configure.ac --with-db-type=Pg --enable-layout=inplace --with-my-user-group --enable-developer --enable-externalauth --disable-gpg --disable-smime --with-web-handler=fcgid && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
+
+    script:
+        - docker exec -e USER=rt-test -u rt-test -it rt bash -c "cd /rt && prove -lj9 t/*"

-----------------------------------------------------------------------


More information about the rt-commit mailing list