-
Notifications
You must be signed in to change notification settings - Fork 183
Cleanup monitoring recipe #6034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,44 +9,42 @@ | |
| build_requires: | ||
| - CMake | ||
| - alibuild-recipe-tools | ||
| - protobuf | ||
| - ninja | ||
| source: https://github.com/AliceO2Group/Monitoring | ||
| incremental_recipe: | | ||
| make ${JOBS:+-j$JOBS} install | ||
| cmake --build . -- ${JOBS:+-j$JOBS} install | ||
| mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles | ||
| --- | ||
| #!/bin/bash -ex | ||
|
|
||
| case $ARCHITECTURE in | ||
| osx*) [[ ! $BOOST_ROOT ]] && BOOST_ROOT=$(brew --prefix boost);; | ||
| osx*) [[ ! $BOOST_ROOT ]] && BOOST_ROOT=$(brew --prefix boost) ;; | ||
|
Check notice on line 20 in monitoring.sh
|
||
| esac | ||
|
|
||
|
|
||
| if [[ $ALIBUILD_O2_TESTS ]]; then | ||
| CXXFLAGS="${CXXFLAGS} -Werror -Wno-error=deprecated-declarations" | ||
| fi | ||
|
|
||
| cmake $SOURCEDIR \ | ||
| -G Ninja \ | ||
| ${LIBRDKAFKA_REVISION:+-DRDKAFKA_ROOT="${LIBRDKAFKA_ROOT}"} \ | ||
| ${GRPC_REVISION:+-DGRPC_ROOT="${GRPC_ROOT}"} \ | ||
| -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ | ||
| ${BOOST_REVISION:+-DBOOST_ROOT=$BOOST_ROOT} \ | ||
| ${LIBGRPC_REVISION:--DO2_MONITORING_CONTROL_ENABLE=0} \ | ||
|
Check notice on line 34 in monitoring.sh
|
||
| ${LIBRDKAFKA_REVISION:--DO2_MONITORING_KAFKA_ENABLE=0} \ | ||
|
Check notice on line 35 in monitoring.sh
|
||
| ${PROTOBUF_ROOT:+-DPROTOBUF_ROOT=$PROTOBUF_ROOT} \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | ||
|
|
||
| cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT} | ||
|
|
||
| make ${JOBS+-j $JOBS} install | ||
| cmake --build . -- ${JOBS+-j $JOBS} install | ||
|
|
||
| if [[ $ALIBUILD_O2_TESTS ]]; then | ||
| ctest --output-on-failure | ||
| fi | ||
|
|
||
|
|
||
| #ModuleFile | ||
| mkdir -p etc/modulefiles | ||
| alibuild-generate-module --bin --lib > etc/modulefiles/$PKGNAME | ||
| cat >> etc/modulefiles/$PKGNAME <<EoF | ||
| # Our environment | ||
| set MONITORING_ROOT \$::env(BASEDIR)/$PKGNAME/\$version | ||
| prepend-path ROOT_INCLUDE_PATH \$PKG_ROOT/include | ||
| EoF | ||
| alibuild-generate-module --bin --lib --root > etc/modulefiles/$PKGNAME | ||
|
Check notice on line 49 in monitoring.sh
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here $PKGNAME is guaranteed not to expand. |
||
| mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@singiamtel Can we disable SC2086 or make sure that it does not complain for certain kind of variables? ${LIBGRPC_REVISION:--DO2_MONITORING_CONTROL_ENABLE=0} will never expand to something with a space in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@singiamtel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can only be disabled globally in the alidistlint config, or case by case with
# shellcheck disable=SC2086. What do you prefer?If the problem is that it's annoying to quote them when unneeded, maybe the autofix thing helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the issue is that we should not add quotes when not needed. I would vote for disabling SC2086 until it's possible to do whitelist "safe" variables.