You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2019/11/28 09:55:00 UTC

svn commit: r1870551 - in /httpd/httpd/branches/2.4.x: ./ .travis.yml test/README.travis test/travis_before_linux.sh test/travis_run_linux.sh

Author: jorton
Date: Thu Nov 28 09:55:00 2019
New Revision: 1870551

URL: http://svn.apache.org/viewvc?rev=1870551&view=rev
Log:
Merge r1869541, r1869543, r1869564, r1869565, r1869684, r1869697, r1869703, r1869708, r1869729, r1869801, r1869846, r1870047, r1870077, r1870080, r1870086, r1870150, r1870550 from trunk:

Run buildconf using the specific APR/APR-util versions if configured.


Revert r1869541 and always run httpd's buildconf against the Debian APR,
which does include the *.m4 files.


Add shared-mpms build, add build against APR trunk (httpd trunk only).
Fix handling and ensure safe caching of APR trunk build.


Fix yaml typo.

* .travis.yml: Build on Bionic by default, only build w/APR 1.5.x for
  the 2.4.x branch.

* .travis.yml, test/travis_run_linux.sh: Pass BUILDCONF to buildconf
  and add job which uses the new option.


Install PCRE v2 (10.x) by default, add a job testing with PCRE "v1" (8.x).


Minor Travis doc updates and a todo list. 


Test IRC and e-mail notifications.


Add build job for trunk on Xenial with custom APR/APR-util builds.


Try mailing dev@ for Travis build results.

The defaults are to mail:
- on success (if changed from failure)
- on failure (always)


Specify make flags globally and work around PR 63942 for regeneration
of server/util_expr parser.


Support travis builds against APR/APR-util non-trunk branches.
Add job for APR 1.7.x + APR-util 1.7.x.


Build on s390x (interesting test target since it's big-endian).
IRC notifications work, e-mail doesn't; branches are done.
ppc64le builds also work but are extremely slow, so not enabled.


Doc updates for Travis.  


Note that APU_VERSION=trunk doesn't work per rpluem's mail. 


Skip ap_expr regeneration for 2.4.x.


Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/.travis.yml
    httpd/httpd/branches/2.4.x/test/README.travis
    httpd/httpd/branches/2.4.x/test/travis_before_linux.sh
    httpd/httpd/branches/2.4.x/test/travis_run_linux.sh

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1869541,1869543,1869564-1869565,1869684,1869697,1869703,1869708,1869729,1869801,1869846,1870047,1870077,1870080,1870086,1870150,1870550

Modified: httpd/httpd/branches/2.4.x/.travis.yml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/.travis.yml?rev=1870551&r1=1870550&r2=1870551&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/.travis.yml (original)
+++ httpd/httpd/branches/2.4.x/.travis.yml Thu Nov 28 09:55:00 2019
@@ -1,13 +1,21 @@
 language: c
 os:
   - linux
+dist:
+  - bionic
 cache:
   directories:
     - /home/travis/perl5
     - /home/travis/root
+# The non-x86_64 images currently lack cpanminus, when that is fixed
+# the cpanminus & universe sourceline can be removed.
 addons:
   apt:
+    update: false
+    sources:
+      - sourceline: 'deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe'
     packages:
+      - cpanminus
       - libtool-bin
       - libapr1-dev
       - libaprutil1-dev
@@ -18,11 +26,19 @@ addons:
       - libsystemd-dev
       - libnghttp2-dev
       - libjansson-dev
+      - libpcre2-dev
+env:
+  global:
+    - MFLAGS=-j2
 
 matrix:
   include:
     - name: Linux Ubuntu, Default module set
     # -------------------------------------------------------------------------
+    - name: Linux s390x Ubuntu, all-modules
+      arch: s390x
+      env: CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
     - name: Linux Ubuntu, Default, all-modules
       env: CONFIG="--enable-mods-shared=reallyall"
     # -------------------------------------------------------------------------
@@ -32,17 +48,18 @@ matrix:
     - name: Linux Ubuntu, Worker MPM, all-modules
       env: CONFIG="--enable-mods-shared=reallyall --with-mpm=worker"
     # -------------------------------------------------------------------------
-    - name: Linux Ubuntu Bionic, all-modules
-      os: linux
-      dist: bionic
-      env: CONFIG="--enable-mods-shared=reallyall"
+    - name: Linux Ubuntu, Shared MPMs, all-modules
+      env: CONFIG="--enable-mods-shared=reallyall --enable-mpms-shared=all"
     # -------------------------------------------------------------------------
-    - name: Linux Ubuntu Bionic, GCC 7 maintainer-mode w/-Werror
+    - name: Linux Ubuntu, GCC 7 maintainer-mode w/-Werror
       os: linux
-      dist: bionic
       env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7"
            SKIP_TESTING=1
     # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, PCRE 1, GCC 7 maintainer-mode w/-Werror
+      os: linux
+      env: CONFIG="--enable-mods-shared=reallyall --with-pcre=/usr/bin/pcre-config --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7"
+    # -------------------------------------------------------------------------
     - name: Linux Ubuntu, GCC 8 maintainer-mode w/-Werror
       env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-8"
            SKIP_TESTING=1
@@ -62,19 +79,51 @@ matrix:
             - libsystemd-dev
             - libnghttp2-dev
             - libjansson-dev
+            - libpcre2-dev
+    # -------------------------------------------------------------------------
+    # MFLAGS= works around https://bz.apache.org/bugzilla/show_bug.cgi?id=63942
+    - if: branch != 2.4.x
+      name: Linux Ubuntu, Regenerate ap_expr
+      os: linux
+      env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror"
+           BUILDCONFIG="--with-regen-expr"
+           MFLAGS=
+    # -------------------------------------------------------------------------
+    - if: branch != 2.4.x
+      name: Linux Ubuntu, APR trunk
+      env: APR_VERSION=trunk APR_CONFIG="--with-crypto"
+           CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - if: branch = 2.4.x
+      name: Linux Ubuntu Xenial, all-modules, system APR/APR-util
+      os: linux
+      dist: xenial
+      env: CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu Xenial, all-modules, APR 1.7.0, APR-util 1.6.1
+      dist: xenial
+      env: APR_VERSION=1.7.0 APU_VERSION=1.6.1
+           CONFIG="--enable-mods-shared=reallyall"
+           APU_CONFIG="--with-crypto"
     # -------------------------------------------------------------------------
     - name: Linux Ubuntu, APR 1.7.0, APR-util 1.6.1
       env: APR_VERSION=1.7.0 APU_VERSION=1.6.1
            CONFIG="--enable-mods-shared=reallyall"
            APU_CONFIG="--with-crypto"
     # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, APR 1.7.x, APR-util 1.7.x
+      env: APR_VERSION=1.7.x APU_VERSION=1.7.x
+           CONFIG="--enable-mods-shared=reallyall"
+           APU_CONFIG="--with-crypto"
+    # -------------------------------------------------------------------------
     - name: Linux Ubuntu, APR 1.7.0 --enable-pool-debug, APR-util 1.6.1
       env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug"
            APU_VERSION=1.6.1
            APU_CONFIG="--with-crypto"
            CONFIG="--enable-mods-shared=reallyall"
     # -------------------------------------------------------------------------
-    - name: Linux Ubuntu, APR 1.5.1, APR-util 1.5.4
+    - if: branch = 2.4.x
+      name: Linux Ubuntu, APR 1.5.1, APR-util 1.5.4
       env: APR_VERSION=1.5.1 APU_VERSION=1.5.4
            CONFIG="--enable-mods-shared=reallyall"
     # -------------------------------------------------------------------------
@@ -95,3 +144,8 @@ before_script:
 
 script:
   - ./test/travis_run_${TRAVIS_OS_NAME}.sh
+
+notifications:
+  irc: "chat.freenode.net#httpd-dev"
+  email:
+    - dev@httpd.apache.org

Modified: httpd/httpd/branches/2.4.x/test/README.travis
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/README.travis?rev=1870551&r1=1870550&r2=1870551&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/README.travis (original)
+++ httpd/httpd/branches/2.4.x/test/README.travis Thu Nov 28 09:55:00 2019
@@ -4,20 +4,27 @@ Variables
 
 The Travis scripts use the following environment variables:
 
-* APR_VERSION - if set, APR of this version is built and installed
-  in $HOME/root/apr-$APR_VERSION (trunk means trunk is used)
+* APR_VERSION - if set, APR of this version is built and installed in
+  $HOME/root/apr-$APR_VERSION - a value of "trunk" means trunk is
+  used, "*.x" means a branch, otherwise a tagged version is implied.
 
 * APR_CONFIG - arguments to pass when running APR's configure script
   if APR_VERSION is set
 
 * APU_VERSION - if set, APR-util of this version is built and
-  installed in $HOME/root/apu-$APU_VERSION (trunk means trunk is used)
+  installed in $HOME/root/apr-util-$APU_VERSION - a value of "*.x"
+  means a branch, otherwise a tagged version is implied.  (Since there
+  is no "trunk" for apr-util, that value cannot be used here.)
 
 * APU_CONFIG - arguments to pass when running APR-util's configure
   script if APU_VERSION is set
 
 * CONFIG - arguments to pass to httpd's configure script.
 
+* BUILDCONFIG - arguments to pass when running httpd's ./buildconf script
+
+* MFLAGS - arguments to pass when running "make" for httpd.
+
 * SKIP_TESTING - if set, the Perl test framework is not run for the
   build.
 
@@ -30,3 +37,67 @@ Anything installed into the $HOME/root d
 versions of APR/APR-util are installed here and cached across httpd
 build jobs without needing to be rebuilt every time.
 
+TODO list
+---------
+
+* MacOS build
+* Windows build
+* clang-on-Linux build
+* Multi-arch testing
+ - non-x86_64 images lack installed cpanminus and don't enable caching.
+   ppc64le builds seem unreasonably slow to install CPAN deps each time
+   (15-20 minutes) - not sure why.  s390x is enabled & seems reasonably fast.
+* Use containers for non-Ubuntu-based Linux testing
+* E-mail notifications
+* VPATH builds
+* sanity checks for use of APLOGNO() - empty arguments, accidental duplicates, etc.
+ - not sure how exactly
+
+Testing from a Feature Branch
+-----------------------------
+
+An SVN branch off trunk should be mirrored to github, and will be
+tested in the same way that trunk is in Travis, so this workflow is
+available for those familiar with using Subversion and the standard
+ASF/httpd repository layout.
+
+Tested branches are listed at: https://travis-ci.org/apache/httpd/branches
+
+Travis will also run the tests for a PR filed against the httpd Github
+repository at https://github.com/apache/httpd or from a fork of this
+repository if enabled for the Travis user.
+
+A workflow to enable testing would be as follows, substituting
+$USERNAME for your github username:
+
+  $ git clone https://github.com/apache/httpd
+  $ cd httpd
+  $ git remote add $USERNAME git@github.com:$USERNAME/httpd.git
+  $ git checkout -b my-feature origin/trunk
+  ... do some work ...
+  $ git commit ...
+  $ git push -u $USERNAME my-feature:my-feature
+
+To enable testing for a fork, visit the settings page at
+https://travis-ci.org/$USERNAME/httpd/settings - you may need to sync
+your account via https://travis-ci.org/account/repositories for a
+freshly created fork.
+
+To create a Pull Request, go to a URL like:
+https://github.com/apache/httpd/compare/trunk...$USERNAME:trunk
+
+Once a PR has been created, travis will run the tests and link the
+results from a PR comment. All tested PRs are listed here:
+https://travis-ci.org/apache/httpd/pull_requests
+
+To merge from github back to SVN trunk, create a patch from e.g.:
+
+  $ git diff origin/trunk..my-feature
+
+and then apply it in SVN.  To rebase a feature once trunk has
+diverged, from a feature branch run:
+
+  $ git pull
+  $ git rebase -i origin/trunk
+
+and follow the standard rebase steps.

Modified: httpd/httpd/branches/2.4.x/test/travis_before_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/travis_before_linux.sh?rev=1870551&r1=1870550&r2=1870551&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/travis_before_linux.sh (original)
+++ httpd/httpd/branches/2.4.x/test/travis_before_linux.sh Thu Nov 28 09:55:00 2019
@@ -2,38 +2,48 @@
 if ! test -v SKIP_TESTING; then
    svn export -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework
 fi
-if test -v APR_VERSION; then
-    if ! test -d $HOME/root/apr-${APR_VERSION}; then
-        case $APR_VERSION in
-            trunk) url=https://svn.apache.org/repos/asf/apr/apr/trunk ;;
-            *) url=https://svn.apache.org/repos/asf/apr/apr/tags/${APR_VERSION} ;;
-        esac
-        svn export -q ${url} $HOME/build/apr-${APR_VERSION}
-        pushd $HOME/build/apr-${APR_VERSION}
-        if [ $APR_VERSION = 1.4.1 ]; then
-            # 1.4.1 doesn't build with current libtool
-            svn cat https://svn.apache.org/repos/asf/apr/apr/tags/1.5.1/buildconf > buildconf
-        fi
-        ./buildconf
-        ./configure ${APR_CONFIG} --prefix=$HOME/root/apr-${APR_VERSION}
-        make -j2
-        make install
-        popd
-        APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
+
+function install_apx() {
+    local name=$1
+    local version=$2
+    local root=https://svn.apache.org/repos/asf/apr/${name}
+    local prefix=${HOME}/root/${name}-${version}
+    local build=${HOME}/build/${name}-${version}
+    local config=$3
+    local buildconf=$4
+
+    case $version in
+    trunk) url=${root}/trunk ;;
+    *.x) url=${root}/branches/${version} ;;
+    *) url=${root}/tags/${version} ;;
+    esac
+
+    local revision=`svn info --show-item last-changed-revision ${url}`
+
+    # Blow away the cached install root if the revision does not
+    # match.
+    test -f ${prefix}/.revision-is-${revision} || rm -rf ${prefix}
+
+    if test -d ${prefix}; then
+        return 0
     fi
+
+    svn export -q -r ${revision} ${url} ${build}
+    pushd $build
+         ./buildconf ${buildconf}
+         ./configure --prefix=${prefix} ${config}
+         make -j2
+         make install
+    popd
+
+    touch ${prefix}/.revision-is-${revision}
+}
+
+if test -v APR_VERSION; then
+    install_apx apr ${APR_VERSION} "${APR_CONFIG}"
+    APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
 fi
+
 if test -v APU_VERSION; then
-    if ! test -d $HOME/root/apu-${APU_VERSION}; then
-        case $APU_VERSION in
-            trunk) url=https://svn.apache.org/repos/asf/apr/apr-util/trunk ;;
-            *) url=https://svn.apache.org/repos/asf/apr/apr-util/tags/${APU_VERSION} ;;
-        esac
-        svn export -q ${url} $HOME/build/apu-${APU_VERSION}
-        pushd $HOME/build/apu-${APU_VERSION}
-        ./buildconf --with-apr=$HOME/build/apr-${APR_VERSION}
-        ./configure ${APU_CONFIG} --prefix=$HOME/root/apu-${APU_VERSION}
-        make -j2
-        make install
-        popd
-    fi
+    install_apx apr-util ${APU_VERSION} "${APU_CONFIG}" --with-apr=$HOME/build/apr-${APR_VERSION}
 fi

Modified: httpd/httpd/branches/2.4.x/test/travis_run_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/travis_run_linux.sh?rev=1870551&r1=1870550&r2=1870551&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/travis_run_linux.sh (original)
+++ httpd/httpd/branches/2.4.x/test/travis_run_linux.sh Thu Nov 28 09:55:00 2019
@@ -1,5 +1,7 @@
 #!/bin/bash -ex
-./buildconf --with-apr=/usr/bin/apr-1-config
+### Installed apr/apr-util don't include the *.m4 files but the
+### Debian packages helpfully install them, so use the system APR to buildconf
+./buildconf --with-apr=/usr/bin/apr-1-config ${BUILDCONFIG}
 # For trunk, "make check" is sufficient to run the test suite.
 # For 2.4.x, the test suite must be run manually
 if test ! -v SKIP_TESTING; then
@@ -17,12 +19,12 @@ else
     CONFIG="$CONFIG --with-apr=/usr"
 fi
 if test -v APU_VERSION; then
-    CONFIG="$CONFIG --with-apr-util=$HOME/root/apu-${APU_VERSION}"
+    CONFIG="$CONFIG --with-apr-util=$HOME/root/apr-util-${APU_VERSION}"
 else
     CONFIG="$CONFIG --with-apr-util=/usr"
 fi
 ./configure $CONFIG
-make $MAKEFLAGS -j2
+make $MFLAGS
 if ! test -v SKIP_TESTING; then
     if test -v WITH_TEST_SUITE; then
         make check