From 1b768425b24585aea8c06e24838b44bf8087ebb2 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 4 Dec 2020 10:19:35 +0100 Subject: [PATCH 1/8] Added checks for TLD_SUFFIX in check-config.sh --- check-config.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/check-config.sh b/check-config.sh index 63539a99..d94939b4 100755 --- a/check-config.sh +++ b/check-config.sh @@ -218,6 +218,7 @@ fi print_head_1 "Checking .env file values" WRONG_ENV_FILES_VALUES=0 + DEBUG_COMPOSE_ENTRYPOINT="$( get_env_value "DEBUG_COMPOSE_ENTRYPOINT" )" if [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "0" ] && [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "1" ] && [ "${DEBUG_COMPOSE_ENTRYPOINT}" != "2" ]; then log_err "Variable 'DEBUG_COMPOSE_ENTRYPOINT' should be 0, 1 or 2. Has: ${DEBUG_COMPOSE_ENTRYPOINT}" @@ -392,6 +393,7 @@ NEW_UID="$( get_env_value "NEW_UID" )" if [ "${NEW_UID}" != "${MY_UID}" ]; then log_err "Variable 'NEW_UID' has wrong value: '${NEW_UID}'. Should have: ${MY_UID}" RET_CODE=$(( RET_CODE + 1)) + WRONG_ENV_FILES_VALUES=1 else log_debug "Variable 'NEW_UID' has correct value: '${NEW_UID}'" fi @@ -400,10 +402,27 @@ NEW_GID="$( get_env_value "NEW_GID" )" if [ "${NEW_GID}" != "${MY_GID}" ]; then log_err "Variable 'NEW_GID' has wrong value: '${NEW_GID}'. Should have: ${MY_GID}" RET_CODE=$(( RET_CODE + 1)) + WRONG_ENV_FILES_VALUES=1 else log_debug "Variable 'NEW_GID' has correct value: '${NEW_GID}'" fi +TLD_SUFFIX="$( get_env_value "TLD_SUFFIX" )" +TLD_SUFFIX_BLACKLIST="dev|com|org|net|int|edu|de" +if echo "${TLD_SUFFIX}" | grep -E "^(${TLD_SUFFIX_BLACKLIST})\$" >/dev/null; then + log_err "Variable 'TLD_SUFFX' should not be set to '${TLD_SUFFIX}'. It is a real tld domain." + log_err "All DNS requests will be intercepted to this tld domain and re-routed to the HTTP container." + log_info "Consider using a subdomain value of e.g.: 'mydev.${TLD_SUFFIX}' instead." + RET_CODE=$(( RET_CODE + 1)) + WRONG_ENV_FILES_VALUES=1 +elif [ "${TLD_SUFFIX}" = "localhost" ]; then + log_err "Variable 'TLD_SUFFX' should not be set to '${TLD_SUFFIX}'. It is a loopback address." + log_info "See: https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06" + RET_CODE=$(( RET_CODE + 1)) + WRONG_ENV_FILES_VALUES=1 +else + log_debug "Variable 'TLD_SUFFIX' has correct value: '${TLD_SUFFIX}'" +fi if [ "${WRONG_ENV_FILES_VALUES}" = "0" ]; then log_ok "All .env file variables have correct values" From 22f5c945efda1ba5497abcd7e1dac6af5718c85e Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 4 Dec 2020 10:19:59 +0100 Subject: [PATCH 2/8] Fixes #761 missing varnish config env var --- compose/docker-compose.override.yml-all | 2 +- compose/docker-compose.override.yml-varnish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/docker-compose.override.yml-all b/compose/docker-compose.override.yml-all index 52afdc9e..bd301bbe 100644 --- a/compose/docker-compose.override.yml-all +++ b/compose/docker-compose.override.yml-all @@ -119,7 +119,7 @@ services: app_net: ipv4_address: 172.16.238.230 environment: - - VARNISH_CONFIG=/etc/varnish/default.vcl + - VARNISH_CONFIG=${VARNISH_CONFIG:-/etc/varnish/default.vcl} - CACHE_SIZE=${VARNISH_CACHE_SIZE:-128m} - VARNISHD_PARAMS=${VARNISH_PARAMS:--p default_ttl=3600 -p default_grace=3600} - BACKEND_HOST=httpd diff --git a/compose/docker-compose.override.yml-varnish b/compose/docker-compose.override.yml-varnish index 966e33d2..074ef488 100644 --- a/compose/docker-compose.override.yml-varnish +++ b/compose/docker-compose.override.yml-varnish @@ -16,7 +16,7 @@ services: app_net: ipv4_address: 172.16.238.230 environment: - - VARNISH_CONFIG=/etc/varnish/default.vcl + - VARNISH_CONFIG=${VARNISH_CONFIG:-/etc/varnish/default.vcl} - CACHE_SIZE=${VARNISH_CACHE_SIZE:-128m} - VARNISHD_PARAMS=${VARNISH_PARAMS:--p default_ttl=3600 -p default_grace=3600} - BACKEND_HOST=httpd From 9c6711c948ab9a9f726d8e11d3dac86cb47917d0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 4 Dec 2020 10:20:39 +0100 Subject: [PATCH 3/8] Update php images --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index fb0756f8..a17732d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,7 +95,7 @@ services: # PHP # ------------------------------------------------------------ php: - image: devilbox/php-fpm:${PHP_SERVER}-work-0.117 + image: devilbox/php-fpm:${PHP_SERVER}-work-0.120 hostname: php ## From 01511676354a1db8c21d6aca53520ec3f754d6b5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 17:39:21 +0100 Subject: [PATCH 4/8] Devilbox Release v1.9.0 --- .devilbox/www/config.php | 4 ++-- .github/workflows/lint.yml | 7 ++++++ CHANGELOG.md | 49 ++++++++++++++++++++++++++++++++++++-- README.md | 28 +++++++++++----------- docker-compose.yml | 4 ++-- 5 files changed, 72 insertions(+), 20 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 271765a7..63daa6ae 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ error_reporting(-1); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v1.8.3'; -$DEVILBOX_DATE = '2020-11-22'; +$DEVILBOX_VERSION = 'v1.9.0'; +$DEVILBOX_DATE = '2020-12-12'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1bfae76b..b21492d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -49,6 +49,13 @@ jobs: cd .tests/ make lint-tests + - name: Update Readme + shell: bash + run: | + cd .tests/ + make make update-readme + git diff --quiet || { echo "Build Changes"; git diff; git status; false; }; + - name: Check configuration shell: bash run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index f84ad2cf..c7884a3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,57 @@ # Changelog -Make sure to have a look at [UPDATING](https://github.com/cytopia/devilbox/blob/master/UPDATING.md) to see any required steps for updating -major versions. +Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/blob/master/UPDATING.md) to see any required steps for updating major or minor versions. ## Unreleased +## Release v1.9.0 (2020-12-12) + +#### Fixed + +- [#761](https://github.com/cytopia/devilbox/issues/761) Fixed missing Varnish config env var +- [#10](https://github.com/devilbox/watcherd/issues/10) watcherd performance issues +- Fixed `mdl` rubygen for PHP images +- Fixed `drupal` (Drupal Console Launcher) for PHP images + +#### Added + +- Added `ioncube` extension to PHP 7.4 +- Added `sqlsrv` extension to PHP 7.4 +- Added `apcu` extension to PHP 8.0 +- Added `blackfire` extension to PHP 8.0 +- Added `igbinary` extension to PHP 8.0 +- Added `imap` extension to PHP 8.0 +- Added `mcrypt` extension to PHP 8.0 +- Added `memcache` extension to PHP 8.0 +- Added `msgpack` extension to PHP 8.0 +- Added `oauth` extension to PHP 8.0 +- Added `psr` extension to PHP 8.0 +- Added `solr` extension to PHP 8.0 +- Added `xlswriter` extension to PHP 8.0 +- Added `yaml` extension to PHP 8.0 +- Added `apcu` extension to PHP 8.1 +- Added `igbinary` extension to PHP 8.1 +- Added `imap` extension to PHP 8.1 +- Added `mcrypt` extension to PHP 8.1 +- Added `memcache` extension to PHP 8.1 +- Added `msgpack` extension to PHP 8.1 +- Added `oauth` extension to PHP 8.1 +- Added `psr` extension to PHP 8.1 +- Added `solr` extension to PHP 8.1 +- Added `xlswriter` extension to PHP 8.1 +- Added `yaml` extension to PHP 8.1 +- Added checks for TLD_SUFFIX in check-config.sh + +#### Changed + +- [#763](https://github.com/cytopia/devilbox/issues/764) `redis` extension compiles with `msgpack` and `igbinary` as available serializers +- Updated xdebug to latest version +- Updated `watcherd` to latest version +- Updated `vhost-gen` to latest version + + ## Release v1.8.3 (2020-11-22) #### Fixed diff --git a/README.md b/README.md index f49e0d7e..f637c265 100644 --- a/README.md +++ b/README.md @@ -724,9 +724,9 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module |-------------------------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------| | amqp | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | apc | | 🗸 | 🗸 | 🗸 | 🗸 | | | | | | | | -| apcu | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| apcu | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | bcmath | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| blackfire | | | | | d | d | d | d | d | d | | | +| blackfire | | | | | d | d | d | d | d | d | d | | | bz2 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | calendar | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | Core | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | @@ -747,27 +747,27 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | gmp | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | hash | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | iconv | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| igbinary | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| igbinary | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | imagick | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | -| imap | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| imap | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | interbase | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | | intl | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| ioncube | d | d | d | d | d | d | d | d | d | | | | +| ioncube | d | d | d | d | d | d | d | d | d | d | | | | json | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ldap | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | libxml | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | mbstring | ✔ | 🗸 | 🗸 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| mcrypt | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | -| memcache | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| mcrypt | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | +| memcache | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | memcached | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | mhash | | | | | ✔ | | | | | | | | | mongo | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | | | | | | mongodb | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| msgpack | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| msgpack | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | mysql | ✔ | ✔ | 🗸 | 🗸 | 🗸 | | | | | | | | | mysqli | ✔ | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | mysqlnd | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| OAuth | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| OAuth | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | oci8 | | d | d | d | d | d | d | d | d | d | d | d | | openssl | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | pcntl | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | @@ -785,7 +785,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | Phar | 🗸 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | posix | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | pspell | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| psr | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| psr | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | rdkafka | | d | d | d | d | d | d | d | d | d | | | | readline | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | recode | 🗸 | ✔ | ✔ | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | @@ -798,11 +798,11 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | soap | ✔ | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | sockets | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | sodium | | | | | | | | ✔ | ✔ | ✔ | ✔ | ✔ | -| solr | | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | | | +| solr | | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | SPL | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | SQLite | ✔ | ✔ | | | | | | | | | | | | sqlite3 | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| sqlsrv | | | | | | d | d | d | d | | | | +| sqlsrv | | | | | | d | d | d | d | d | | | | ssh2 | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | standard | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | swoole | | d | d | d | d | d | d | d | d | d | | | @@ -815,13 +815,13 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | vips | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | wddx | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | | xdebug | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| xlswriter | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| xlswriter | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | xml | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | xmlreader | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | xmlrpc | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | | xmlwriter | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | xsl | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | -| yaml | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | +| yaml | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | Zend OPcache | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | zip | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | zlib | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | diff --git a/docker-compose.yml b/docker-compose.yml index a17732d1..d1072edd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,7 +95,7 @@ services: # PHP # ------------------------------------------------------------ php: - image: devilbox/php-fpm:${PHP_SERVER}-work-0.120 + image: devilbox/php-fpm:${PHP_SERVER}-work-0.122 hostname: php ## @@ -221,7 +221,7 @@ services: # Web Server # ------------------------------------------------------------ httpd: - image: devilbox/${HTTPD_SERVER}:0.35 + image: devilbox/${HTTPD_SERVER}:0.36 hostname: httpd environment: From f9b4a9d9f453da7105ed75581ec3ce7737e8195a Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 17:54:32 +0100 Subject: [PATCH 5/8] Fix lint job --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b21492d5..12a6605e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -53,7 +53,7 @@ jobs: shell: bash run: | cd .tests/ - make make update-readme + make update-readme git diff --quiet || { echo "Build Changes"; git diff; git status; false; }; - name: Check configuration From 75aa5139e214e821d0abae8053a446e1908f8e0b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 18:14:15 +0100 Subject: [PATCH 6/8] Sort correctly when updating modules --- .tests/scripts/get-modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tests/scripts/get-modules.sh b/.tests/scripts/get-modules.sh index a674d9df..9d178805 100755 --- a/.tests/scripts/get-modules.sh +++ b/.tests/scripts/get-modules.sh @@ -320,7 +320,7 @@ fi ### ### Todo: add ioncube ### -MODS="$( echo "${PHP52_MODS}, ${PHP53_MODS}, ${PHP54_MODS}, ${PHP55_MODS}, ${PHP56_MODS}, ${PHP70_MODS}, ${PHP71_MODS}, ${PHP72_MODS}, ${PHP73_MODS}, ${PHP74_MODS}, ${PHP80_MODS}, ${PHP81_MODS}" | sed 's/,/\n/g' | sed -e 's/^\s*//g' -e 's/\s*$//g' | sort -u )" +MODS="$( echo "${PHP52_MODS}, ${PHP53_MODS}, ${PHP54_MODS}, ${PHP55_MODS}, ${PHP56_MODS}, ${PHP70_MODS}, ${PHP71_MODS}, ${PHP72_MODS}, ${PHP73_MODS}, ${PHP74_MODS}, ${PHP80_MODS}, ${PHP81_MODS}" | sed 's/,/\n/g' | sed -e 's/^\s*//g' -e 's/\s*$//g' | sort -uf )" ### From 09b8803f21e533d72f09d2d72315e95e8c4cc5d8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 19:04:35 +0100 Subject: [PATCH 7/8] Adjust test and examples according to Xdebug 3.0 --- .tests/tests/config-xdebug.sh | 28 ++++++++++++------------- cfg/php-ini-7.2/devilbox-php.ini-xdebug | 7 +++---- cfg/php-ini-7.3/devilbox-php.ini-xdebug | 7 +++---- cfg/php-ini-7.4/devilbox-php.ini-xdebug | 7 +++---- 4 files changed, 23 insertions(+), 26 deletions(-) diff --git a/.tests/tests/config-xdebug.sh b/.tests/tests/config-xdebug.sh index bd41b816..517d0ef8 100755 --- a/.tests/tests/config-xdebug.sh +++ b/.tests/tests/config-xdebug.sh @@ -60,18 +60,18 @@ fi ### Xdebug default disabled ### printf "[TEST] Xdebug default disabled" -if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.mode' | grep -E 'develop.+develop' >/dev/null" "${RETRIES}" "" "0"; then +if [ "${PHP_VERSION}" = "5.2" ] || [ "${PHP_VERSION}" = "5.3" ] || [ "${PHP_VERSION}" = "5.4" ] || [ "${PHP_VERSION}" = "5.5" ] || [ "${PHP_VERSION}" = "5.6" ] || [ "${PHP_VERSION}" = "7.0" ] || [ "${PHP_VERSION}" = "7.1" ]; then + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug default disabled\\n" - run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.mode' || true" + run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true" exit 1 else printf "\\r[OK] Xdebug default disabled\\n" fi else - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.mode' | grep -E 'develop.+develop' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug default disabled\\n" - run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true" + run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.mode' || true" exit 1 else printf "\\r[OK] Xdebug default disabled\\n" @@ -82,15 +82,7 @@ fi ### Xdebug autostart disabled ### printf "[TEST] Xdebug autostart disabled" -if [ "${PHP_VERSION}" = "8.0" ] || [ "${PHP_VERSION}" = "8.1" ]; then - if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.start_with_request' | grep -E 'default.+default' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] Xdebug autostart disabled\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.start_with_request' || true" - exit 1 - else - printf "\\r[OK] Xdebug autostart disabled\\n" - fi -else +if [ "${PHP_VERSION}" = "5.2" ] || [ "${PHP_VERSION}" = "5.3" ] || [ "${PHP_VERSION}" = "5.4" ] || [ "${PHP_VERSION}" = "5.5" ] || [ "${PHP_VERSION}" = "5.6" ] || [ "${PHP_VERSION}" = "7.0" ] || [ "${PHP_VERSION}" = "7.1" ]; then if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_autostart' | grep -E 'Off.+Off' >/dev/null" "${RETRIES}" "" "0"; then printf "\\r[FAIL] Xdebug autostart disabled\\n" run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_autostart' || true" @@ -98,4 +90,12 @@ else else printf "\\r[OK] Xdebug autostart disabled\\n" fi +else + if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.start_with_request' | grep -E 'default.+default' >/dev/null" "${RETRIES}" "" "0"; then + printf "\\r[FAIL] Xdebug autostart disabled\\n" + run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.start_with_request' || true" + exit 1 + else + printf "\\r[OK] Xdebug autostart disabled\\n" + fi fi diff --git a/cfg/php-ini-7.2/devilbox-php.ini-xdebug b/cfg/php-ini-7.2/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.2/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.2/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM diff --git a/cfg/php-ini-7.3/devilbox-php.ini-xdebug b/cfg/php-ini-7.3/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.3/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.3/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM diff --git a/cfg/php-ini-7.4/devilbox-php.ini-xdebug b/cfg/php-ini-7.4/devilbox-php.ini-xdebug index d3e977b5..d0629d1c 100644 --- a/cfg/php-ini-7.4/devilbox-php.ini-xdebug +++ b/cfg/php-ini-7.4/devilbox-php.ini-xdebug @@ -21,13 +21,12 @@ [PHP] ; Xdebug +; https://3.xdebug.org/docs/upgrade_guide ; Use these settings to enable Xdebug for PHP ; Make sure to read up on Xdebug some settings might significantly slow down requests. ; The following is just an example configuration and should be adjusted -xdebug.default_enable = On -xdebug.profiler_enable = On -xdebug.remote_enable = On -xdebug.remote_autostart = On +xdebug.mode = debug +xdebug.start_with_request = yes xdebug.remote_handler = dbgp xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM From 50ae11f95f8a045accff7fdcf0872cd29ad44f2e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 19:13:31 +0100 Subject: [PATCH 8/8] Retry network tasks --- .github/workflows/documentation.yml | 17 +++++++- .github/workflows/lint.yml | 64 +++++++++++++++++++++++------ 2 files changed, 68 insertions(+), 13 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 26d1409b..6d686336 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -48,7 +48,22 @@ jobs: - name: Check documentation shell: bash run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + cd docs - make ${TARGET} + retry make ${TARGET} env: TARGET: ${{ matrix.target }} + RETRIES: 20 + PAUSE: 10 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 12a6605e..4296262e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,16 +25,8 @@ on: # ------------------------------------------------------------------------------------------------- jobs: lint: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - jobs: - - tests - - name: "[Lint ${{ matrix.jobs }}]" + name: "[Lint]" steps: # ------------------------------------------------------------ @@ -46,20 +38,68 @@ jobs: - name: Lint shell: bash run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + cd .tests/ - make lint-tests + retry make lint-tests + env: + RETRIES: 20 + PAUSE: 10 - name: Update Readme shell: bash run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + cd .tests/ - make update-readme + retry make update-readme git diff --quiet || { echo "Build Changes"; git diff; git status; false; }; + env: + RETRIES: 20 + PAUSE: 10 - name: Check configuration shell: bash run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + cp env-example .env sed -i'' "s/^NEW_UID=.*/NEW_UID=$(id -u)/g" .env sed -i'' "s/^NEW_GID=.*/NEW_GID=$(id -g)/g" .env - ./check-config.sh + retry ./check-config.sh + env: + RETRIES: 20 + PAUSE: 10