From 5961c6562b7078fcf57b4149353e7a09349a3467 Mon Sep 17 00:00:00 2001 From: Tom Yearke Date: Tue, 22 Aug 2017 16:36:35 -0400 Subject: [PATCH 1/7] Updated release notes and change log for 7.0.0 --- CHANGELOG.md | 9 +++++++++ xdmod-appkernels.spec.in | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cb5eb5..b006aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Open XDMoD Application Kernels Change Log ========================================= +## 2017-0?-?? v7.0.0 + +- Bug Fixes + - Fixed various compatibility issues with PHP 7 ([\#18](https://github.com/ubccr/xdmod-appkernels/pull/18)) +- Miscellaneous + - Updated for compatibility with Open XDMoD 7.0.0 ([\#20](https://github.com/ubccr/xdmod-appkernels/pull/20), [\#29](https://github.com/ubccr/xdmod-appkernels/pull/29)) + - Improved development workflow ([\#21](https://github.com/ubccr/xdmod-appkernels/pull/21)) + - Improved quality assurance ([\#22](https://github.com/ubccr/xdmod-appkernels/pull/22), [\#27](https://github.com/ubccr/xdmod-appkernels/pull/27), [\#30](https://github.com/ubccr/xdmod-appkernels/pull/30)) + 2017-05-11 v6.6.0 ----------------- diff --git a/xdmod-appkernels.spec.in b/xdmod-appkernels.spec.in index 38e9826..14fd8bb 100644 --- a/xdmod-appkernels.spec.in +++ b/xdmod-appkernels.spec.in @@ -59,6 +59,14 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/cron.d/%{name} %changelog +* ??? ??? ?? 2017 Jeffrey T. Palmer 7.0.0-1.0 +- Bug Fixes + - Fixed various compatibility issues with PHP 7 +- Miscellaneous + - Updated for compatibility with Open XDMoD 7.0.0 + - Improved development workflow + - Improved quality assurance + * Thu May 11 2017 Jeffrey T. Palmer 6.6.0-1.0 - Miscellaneous - Updated for compatibility with Open XDMoD 6.6.0 From 299de685115f3d2101cd57ab5d0b9d716288c873 Mon Sep 17 00:00:00 2001 From: ryanrath Date: Thu, 31 Aug 2017 09:55:33 -0400 Subject: [PATCH 2/7] Adding ETL related files for the appkernels module (#28) * Adding ETL related files for the appkernels module Added appkernels.json - Added the modules.d/appkernels.json file to the file_maps section of build.json * Adding the new module file to the rpm build - just making sure that the new module file: modules.d/appkernels.json is included in the rpm build. This would otherwise cause the build to fail. * Updating spec file to account for module file - Explicitly cal out the module file as a regular file inclusion as opposed to config(noreplace). - Add the other configuration files / directories as no-replace. Testing consisted of building the rpm with the latest docker image and then executing the following commands: - cd ~/rpmbuild/RPMS/noarch - rpm -qp --queryformat '[%{FILENAMES} %{FILEFLAGS} \n]' xdmod-appkernels-7.0.0-1.0.el7.centos.noarch.rpm | grep -E "appkernels\.*\.json" | grep /etc/xdmod - ex. output: /etc/xdmod/modules.d/appkernels.json 0 - if the number is 17 then it's a config / noreplace - if the number is 0 then it's just a regular file. - you can find all the file flags and their values ( it's a bitflag ) @ htttp://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pkgformat.html * Removing extraneous doc dir - per review comment by @jtpalmer --- build.json | 3 ++- xdmod-appkernels.spec.in | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.json b/build.json index adb9a51..53a7500 100644 --- a/build.json +++ b/build.json @@ -38,7 +38,8 @@ "configuration/roles.json": "roles.d/appkernels.json", "configuration/setup.json": "setup.d/appkernels.json", "configuration/rest.d": "rest.d", - "configuration/assets.d": "assets.d" + "configuration/assets.d": "assets.d", + "configuration/modules.d/appkernels.json": "modules.d/appkernels.json" }, "etc/crond": { "configuration/cron.conf": "xdmod-appkernels" diff --git a/xdmod-appkernels.spec.in b/xdmod-appkernels.spec.in index 38e9826..ce68b2e 100644 --- a/xdmod-appkernels.spec.in +++ b/xdmod-appkernels.spec.in @@ -51,9 +51,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/xdmod/ %{_datadir}/xdmod/ %{_docdir}/%{name}-%{version}__PRERELEASE__/ +%{_sysconfdir}/xdmod/modules.d/appkernels.json %config(noreplace) %{_sysconfdir}/xdmod/*.d/appkernels.ini -%config(noreplace) %{_sysconfdir}/xdmod/*.d/appkernels.json +%config(noreplace) %{_sysconfdir}/xdmod/assets.d/appkernels*.json +%config(noreplace) %{_sysconfdir}/xdmod/internal_dashboard.d/appkernels*.json +%config(noreplace) %{_sysconfdir}/xdmod/roles.d/appkernels*.json +%config(noreplace) %{_sysconfdir}/xdmod/setup.d/appkernels*.json %config(noreplace) %{_sysconfdir}/xdmod/rest.d/akrr.json %config(noreplace) %{_sysconfdir}/xdmod/rest.d/app_kernel.json %config(noreplace) %{_sysconfdir}/cron.d/%{name} From 5761441042f6e1cd5a2aae85db1b2253dc001421 Mon Sep 17 00:00:00 2001 From: Tom Yearke Date: Mon, 11 Sep 2017 14:26:50 -0400 Subject: [PATCH 3/7] Updated 7.0.0 change log --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b006aa9..9c22fe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Open XDMoD Application Kernels Change Log - Bug Fixes - Fixed various compatibility issues with PHP 7 ([\#18](https://github.com/ubccr/xdmod-appkernels/pull/18)) - Miscellaneous - - Updated for compatibility with Open XDMoD 7.0.0 ([\#20](https://github.com/ubccr/xdmod-appkernels/pull/20), [\#29](https://github.com/ubccr/xdmod-appkernels/pull/29)) + - Updated for compatibility with Open XDMoD 7.0.0 ([\#20](https://github.com/ubccr/xdmod-appkernels/pull/20), [\#28](https://github.com/ubccr/xdmod-appkernels/pull/28), [\#29](https://github.com/ubccr/xdmod-appkernels/pull/29)) - Improved development workflow ([\#21](https://github.com/ubccr/xdmod-appkernels/pull/21)) - Improved quality assurance ([\#22](https://github.com/ubccr/xdmod-appkernels/pull/22), [\#27](https://github.com/ubccr/xdmod-appkernels/pull/27), [\#30](https://github.com/ubccr/xdmod-appkernels/pull/30)) From dc3c523d00b2685c63acd277e3701047e1b4e8bd Mon Sep 17 00:00:00 2001 From: Tom Yearke Date: Tue, 19 Sep 2017 13:43:00 -0400 Subject: [PATCH 4/7] Set release date for 7.0.0 --- CHANGELOG.md | 2 +- xdmod-appkernels.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c22fe6..02c46bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Open XDMoD Application Kernels Change Log ========================================= -## 2017-0?-?? v7.0.0 +## 2017-09-21 v7.0.0 - Bug Fixes - Fixed various compatibility issues with PHP 7 ([\#18](https://github.com/ubccr/xdmod-appkernels/pull/18)) diff --git a/xdmod-appkernels.spec.in b/xdmod-appkernels.spec.in index 14fd8bb..995059b 100644 --- a/xdmod-appkernels.spec.in +++ b/xdmod-appkernels.spec.in @@ -59,7 +59,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/cron.d/%{name} %changelog -* ??? ??? ?? 2017 Jeffrey T. Palmer 7.0.0-1.0 +* Thu Sep 21 2017 Jeffrey T. Palmer 7.0.0-1.0 - Bug Fixes - Fixed various compatibility issues with PHP 7 - Miscellaneous From 6981acff6c6aada3b8c2bd6bcf7be39bba832f34 Mon Sep 17 00:00:00 2001 From: "Jeffrey T. Palmer" Date: Wed, 20 Sep 2017 14:44:39 -0400 Subject: [PATCH 5/7] Update travis per other repos (#37) Removes PHP 5.3 from travis builds --- .travis.build.sh | 80 ++++++++++++++++++++++++---------------------- .travis.install.sh | 39 ++++------------------ .travis.yml | 7 ++-- 3 files changed, 53 insertions(+), 73 deletions(-) diff --git a/.travis.build.sh b/.travis.build.sh index 6e38b4a..30e6a3e 100755 --- a/.travis.build.sh +++ b/.travis.build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash +PATH="$(pwd)/vendor/bin:$(pwd)/node_modules/.bin:$(pwd)/../xdmod/vendor/bin:$PATH" export PATH -PATH="$(pwd)/vendor/bin:$(pwd)/node_modules/.bin:$PATH" source ~/.nvm/nvm.sh nvm use "$NODE_VERSION" @@ -35,7 +35,7 @@ if [ "$TEST_SUITE" = "syntax" ] || [ "$TEST_SUITE" = "style" ]; then files_changed=() while IFS= read -r -d $'\0' file; do files_changed+=("$file") - done < <(git diff --name-only --diff-filter=d -z "$TRAVIS_COMMIT_RANGE") + done < <(git diff --name-only --diff-filter=da -z "$TRAVIS_COMMIT_RANGE") # Separate the changed files by language. php_files_changed=() @@ -47,6 +47,17 @@ if [ "$TEST_SUITE" = "syntax" ] || [ "$TEST_SUITE" = "style" ]; then js_files_changed+=("$file") fi done + + # Get any added files by language + php_files_added=() + js_files_added=() + while IFS= read -r -d $'\0' file; do + if [[ "$file" == *.php ]]; then + php_files_added+=("$file") + elif [[ "$file" == *.js ]]; then + js_files_added+=("$file") + fi + done < <(git diff --name-only --diff-filter=A -z "$TRAVIS_COMMIT_RANGE") fi # Build tests require the corresponding version of Open XDMoD. @@ -55,26 +66,9 @@ if [ "$TEST_SUITE" = "build" ]; then echo "Cloning Open XDMoD branch '$xdmod_branch'" git clone --depth=1 --branch="$xdmod_branch" https://github.com/ubccr/xdmod.git ../xdmod - # If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. - # Use a newer version of PHP for installing Composer dependencies. - using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" - if "$using_php_533"; then - echo "Using newer version of PHP for installing dependencies" - phpenv global 5.3 - php --version - fi - - # Install Composer dependencies. - pushd ../xdmod >/dev/null - composer install - popd >/dev/null - - # If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. - if "$using_php_533"; then - echo "Reverting back to PHP 5.3.3 for testing" - phpenv global 5.3.3 - php --version - fi + pushd ../xdmod + . .travis.install.sh + popd # Create a symlink from Open XDMoD to this module. ln -s "$(pwd)" "../xdmod/open_xdmod/modules/$module_dir" @@ -96,28 +90,45 @@ if [ "$TEST_SUITE" = "syntax" ]; then fi done elif [ "$TEST_SUITE" = "style" ]; then + npm install https://github.com/jpwhite4/lint-diff/tarball/master + for file in "${php_files_changed[@]}"; do + phpcs "$file" --report=json > "$file.lint.new.json" + if [ $? != 0 ]; then + git show "$commit_range_start:$file" | phpcs --stdin-path="$file" --report=json > "$file.lint.orig.json" + ./node_modules/.bin/lint-diff "$file.lint.orig.json" "$file.lint.new.json" + if [ $? != 0 ]; then + build_exit_value=2 + fi + rm "$file.lint.orig.json" + fi + rm "$file.lint.new.json" + done + for file in "${php_files_added[@]}"; do phpcs "$file" if [ $? != 0 ]; then build_exit_value=2 fi done for file in "${js_files_changed[@]}"; do + eslint "$file" -f json > "$file.lint.new.json" + if [ $? != 0 ]; then + git show "$commit_range_start:$file" | eslint --stdin --stdin-filename "$file" -f json > "$file.lint.orig.json" + ./node_modules/.bin/lint-diff "$file.lint.orig.json" "$file.lint.new.json" + if [ $? != 0 ]; then + build_exit_value=2 + fi + rm "$file.lint.orig.json" + fi + rm "$file.lint.new.json" + done + for file in "${js_files_added[@]}"; do eslint "$file" if [ $? != 0 ]; then build_exit_value=2 fi done elif [ "$TEST_SUITE" = "build" ]; then - # If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. - # Use a newer version of PHP for installing Composer dependencies. - using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" - if "$using_php_533"; then - echo "Using newer version of PHP for installing dependencies" - phpenv global 5.3 - php --version - fi - echo "Building Open XDMoD..." ../xdmod/open_xdmod/build_scripts/build_package.php --module xdmod echo "Building $module_name module..." @@ -126,13 +137,6 @@ elif [ "$TEST_SUITE" = "build" ]; then build_exit_value=2 fi - # If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. - if "$using_php_533"; then - echo "Reverting back to PHP 5.3.3 for testing" - phpenv global 5.3.3 - php --version - fi - xdmod_install_dir="$HOME/xdmod-install" echo "Installing Open XDMoD..." diff --git a/.travis.install.sh b/.travis.install.sh index 0b57ed8..ce4d301 100755 --- a/.travis.install.sh +++ b/.travis.install.sh @@ -1,43 +1,16 @@ #!/usr/bin/env bash -function install_pear_dependencies() { - pear install Log -} - -# If PHP 5.3.3 is installed, SSL/TLS isn't available to PHP. -# Use a newer version of PHP for installing Composer dependencies. -using_php_533="false"; [[ "$(php --version)" == PHP\ 5.3.3\ * ]] && using_php_533="true" -if "$using_php_533"; then - echo "Using newer version of PHP for installing dependencies" - phpenv global 5.3 - php --version - - # Update Composer since the attempt made by the Travis setup script - # using PHP 5.3.3 would have failed. - # - # First, we update to the latest developer version since the version - # of Composer pre-installed on Travis systems (1.0.0) doesn't support - # selecting an update channel. Then, we use this version to rollback to - # the latest stable version. - composer self-update - composer self-update --stable - - # Install PEAR dependencies for newer version of PHP. - install_pear_dependencies -fi +composer self-update --stable # Install Composer dependencies. composer install -# If using PHP 5.3.3 for testing purposes, stop using the newer PHP version. -if "$using_php_533"; then - echo "Reverting back to PHP 5.3.3 for testing" - phpenv global 5.3.3 - php --version -fi +#fix for https://github.com/travis-ci/travis-ci/issues/8365 +pear config-set php_dir $(php -r 'echo substr(get_include_path(),2);') -# Install PEAR dependencies for testing version of PHP. -install_pear_dependencies +pear channel-update pear.php.net +# Install PEAR dependencies. +pear install --alldeps Log # Install npm dependencies. source ~/.nvm/nvm.sh diff --git a/.travis.yml b/.travis.yml index d369d02..1b54f48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,9 @@ dist: precise # Specify the build matrix language: php php: - - '5.3.3' - '5.4' + - '7.0' + - '7.1.6' env: global: - NODE_VERSION=6 @@ -21,7 +22,9 @@ matrix: allow_failures: - env: TEST_SUITE=style exclude: - - php: '5.4' + - php: '7.0' + env: TEST_SUITE=style + - php: '7.1.6' env: TEST_SUITE=style # Add dependency directories to the Travis cache From 274e8513cb69a5325d808d89c5e32cde9aec6776 Mon Sep 17 00:00:00 2001 From: "Jeffrey T. Palmer" Date: Wed, 20 Sep 2017 15:03:13 -0400 Subject: [PATCH 6/7] Update xdmod RPM dependency (#35) --- xdmod-appkernels.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdmod-appkernels.spec.in b/xdmod-appkernels.spec.in index 969991e..616ded3 100644 --- a/xdmod-appkernels.spec.in +++ b/xdmod-appkernels.spec.in @@ -11,7 +11,7 @@ Source: %{name}-%{version}__PRERELEASE__.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}__PRERELEASE__-%{release}-XXXXXX) BuildArch: noarch BuildRequires: php-cli -Requires: xdmod >= 7.0.0 +Requires: xdmod >= 7.0.0, xdmod < 7.1.0 %description This package provides application kernel support for Open XDMoD. The From 480e299f99551a9f83bf6fb465787ae201009150 Mon Sep 17 00:00:00 2001 From: Tom Yearke Date: Thu, 21 Sep 2017 13:49:59 -0400 Subject: [PATCH 7/7] Updated 7.0.0 change log (#36) --- CHANGELOG.md | 3 ++- xdmod-appkernels.spec.in | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c46bb..c14db8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,11 @@ Open XDMoD Application Kernels Change Log - Bug Fixes - Fixed various compatibility issues with PHP 7 ([\#18](https://github.com/ubccr/xdmod-appkernels/pull/18)) + - Fixed issue that allowed incompatible versions of XDMoD and this module to be installed when installing via RPM ([\#35](https://github.com/ubccr/xdmod-appkernels/pull/35)) - Miscellaneous - Updated for compatibility with Open XDMoD 7.0.0 ([\#20](https://github.com/ubccr/xdmod-appkernels/pull/20), [\#28](https://github.com/ubccr/xdmod-appkernels/pull/28), [\#29](https://github.com/ubccr/xdmod-appkernels/pull/29)) - Improved development workflow ([\#21](https://github.com/ubccr/xdmod-appkernels/pull/21)) - - Improved quality assurance ([\#22](https://github.com/ubccr/xdmod-appkernels/pull/22), [\#27](https://github.com/ubccr/xdmod-appkernels/pull/27), [\#30](https://github.com/ubccr/xdmod-appkernels/pull/30)) + - Improved quality assurance ([\#22](https://github.com/ubccr/xdmod-appkernels/pull/22), [\#27](https://github.com/ubccr/xdmod-appkernels/pull/27), [\#30](https://github.com/ubccr/xdmod-appkernels/pull/30), [\#37](https://github.com/ubccr/xdmod-appkernels/pull/37)) 2017-05-11 v6.6.0 ----------------- diff --git a/xdmod-appkernels.spec.in b/xdmod-appkernels.spec.in index 616ded3..837fee0 100644 --- a/xdmod-appkernels.spec.in +++ b/xdmod-appkernels.spec.in @@ -66,6 +66,8 @@ rm -rf $RPM_BUILD_ROOT * Thu Sep 21 2017 Jeffrey T. Palmer 7.0.0-1.0 - Bug Fixes - Fixed various compatibility issues with PHP 7 + - Fixed issue that allowed incompatible versions of XDMoD and this module + to be installed when installing via RPM - Miscellaneous - Updated for compatibility with Open XDMoD 7.0.0 - Improved development workflow