diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e045998 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer +ci: + autofix_prs: true diff --git a/CHANGELOG.md b/CHANGELOG.md index f11a2be..1ea9dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Until May 2022 (inclusive) no changelog was kept. We might try to reconstruct it * Alpaca: Unused, unmaintained and doesn't include all relevant production mechanisms for our use +* Remove unused recipes ## [24.10](https://github.com/ShipSoft/shipdist/tree/24.10) diff --git a/README.md b/README.md index a317dff..b3e1e78 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # shipdist +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ShipSoft/shipdist/main.svg)](https://results.pre-commit.ci/latest/github/ShipSoft/shipdist/main) + Recipes to build `FairShip` and it's dependencies using `aliBuild` ## General information diff --git a/alidpg.sh b/alidpg.sh deleted file mode 100644 index c890e5b..0000000 --- a/alidpg.sh +++ /dev/null @@ -1,27 +0,0 @@ -package: AliDPG -version: "%(tag_basename)s" -tag: master -source: https://github.com/alisw/AliDPG ---- -#!/bin/bash -e -rsync -a --exclude='**/.git' --delete --delete-excluded \ - $SOURCEDIR/ $INSTALLROOT/ - -# Modulefile -mkdir -p etc/modulefiles -cat > etc/modulefiles/$PKGNAME < "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" < etc/modulefiles/$PKGNAME < "$MODULEFILE" < $INSTALLROOT/etc/gcov-setup.sh -export GCOV_PREFIX=${GCOV_PREFIX:-"$WORK_DIR/${ARCHITECTURE}/profile-data/AliRoot/$PKGVERSION-$PKGREVISION"} -export GCOV_PREFIX_STRIP=$(echo $INSTALLROOT | sed -e 's|/$||;s|^/||;s|//*|/|g;s|[^/]||g' | wc -c | sed -e 's/[^0-9]*//') -EOF -source $INSTALLROOT/etc/gcov-setup.sh -fi - -cmake $SOURCEDIR \ - -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \ - -DROOTSYS="$ROOT_ROOT" \ - ${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE"} \ - ${ALIEN_RUNTIME_ROOT:+-DALIEN="$ALIEN_RUNTIME_ROOT"} \ - ${FASTJET_ROOT:+-DFASTJET="$FASTJET_ROOT"} \ - ${DPMJET_ROOT:+-DDPMJET="$DPMJET_ROOT"} \ - ${ZEROMQ_ROOT:+-DZEROMQ=$ZEROMQ_ROOT} \ - ${ALICE_DAQ:+-DDA=ON -DDARPM=ON -DdaqDA=$DAQ_DALIB} \ - ${ALICE_DAQ:+-DAMORE_CONFIG=$AMORE_CONFIG} \ - ${ALICE_DAQ:+-DDATE_CONFIG=$DATE_CONFIG} \ - ${ALICE_DAQ:+-DDATE_ENV=$DATE_ENV} \ - ${ALICE_DAQ:+-DDIMDIR=$DAQ_DIM -DODIR=linux} \ - ${ALICE_SHUTTLE:+-DDIMDIR=$HOME/dim -DODIR=linux} \ - ${ALICE_SHUTTLE:+-DSHUTTLE=ON -DApMon=$ALIEN_RUNTIME_ROOT} \ - -DOCDB_INSTALL=PLACEHOLDER - -make ${IGNORE_ERRORS:+-k} ${JOBS+-j $JOBS} install -# ctest will succeed if no load_library tests were found -ctest -R load_library --output-on-failure ${JOBS:+-j $JOBS} -[[ $ALICE_DAQ && ! $ALICE_DISABLE_DA_RPMS ]] && { make daqDA-all-rpm && make ${JOBS+-j $JOBS} install; } - -rsync -av $SOURCEDIR/test/ $INSTALLROOT/test - -[[ $CMAKE_BUILD_TYPE == COVERAGE ]] \ - && mkdir -p "$WORK_DIR/${ARCHITECTURE}/profile-data/AliRoot/$PKGVERSION-$PKGREVISION/" \ - && rsync -acv --filter='+ */' --filter='+ *.c' --filter='+ *.cxx' --filter='+ *.cpp' --filter='+ *.cc' --filter='+ *.hpp' --filter='+ *.h' --filter='+ *.gcno' --filter='- *' "$BUILDDIR/" "$WORK_DIR/${ARCHITECTURE}/profile-data/AliRoot/$PKGVERSION-$PKGREVISION/" - -# Modulefile -mkdir -p etc/modulefiles -cat > etc/modulefiles/$PKGNAME < etc/modulefiles/$PKGNAME < "$MODULEFILE" <\n" | gcc -xc++ - -c -o /dev/null --- - diff --git a/cern-get-sso-cookie.sh b/cern-get-sso-cookie.sh deleted file mode 100644 index 2720d12..0000000 --- a/cern-get-sso-cookie.sh +++ /dev/null @@ -1,34 +0,0 @@ -package: cern-get-sso-cookie -version: "1.0" -source: https://github.com/ktf/cern-get-sso-cookie -prefer_system: .* -prefer_system_check: which cern-get-sso-cookie ---- -#!/bin/bash -ex - -curl http://cpanmin.us | perl - -l $INSTALLROOT local::lib Authen::Krb5 WWW::Curl::Easy -mkdir -p $INSTALLROOT/bin $INSTALLROOT/lib/perl5/WWW/CERNSSO -cp $SOURCEDIR/cern-get-sso-cookie/usr/share/perl5/WWW/CERNSSO/Auth.pm $INSTALLROOT/lib/perl5/WWW/CERNSSO/Auth.pm -cp $SOURCEDIR/cern-get-sso-cookie/usr/bin/cern-get-sso-cookie $INSTALLROOT/bin - -# Modulefile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" < /dev/null && \ ls $LOG4CPP_ROOT/lib/ > /dev/null && \ true @@ -257,7 +251,7 @@ overrides: ls $LHAPDF5_ROOT/lib/libLHAPDF.la > /dev/null && \ ls $LHAPDF5_ROOT/lib/libLHAPDF.a > /dev/null && \ ls $LHAPDF5_ROOT/lib64/python2.7/site-packages/lhapdf.py > /dev/null && \ - ls $LHAPDF5_ROOT/share/lhapdf > /dev/null + ls $LHAPDF5_ROOT/share/lhapdf > /dev/null XercesC: prefer_system_check: | ls $XERCESC_ROOT/ > /dev/null && \ diff --git a/epos-test.sh b/epos-test.sh deleted file mode 100644 index 0774877..0000000 --- a/epos-test.sh +++ /dev/null @@ -1,13 +0,0 @@ -package: EPOS-test -version: v1 -force_rebuild: 1 -requires: - - EPOS ---- -#!/bin/bash -ex -export OPT=$PWD -export CHK=$PWD -cp "$EPO"/test/bp5nohnoc10n10f.optns . -cp "$EPO"/test/iclbp.optns . -epos bp5nohnoc10n10f -[ -f z-bp5nohnoc10n10f.root ] diff --git a/epos.sh b/epos.sh deleted file mode 100644 index 608f403..0000000 --- a/epos.sh +++ /dev/null @@ -1,66 +0,0 @@ -package: EPOS -version: "%(tag_basename)s%(defaults_upper)s" -tag: alice/v3.111 -source: https://gitlab.cern.ch/ALICEPrivateExternals/epos.git -requires: - - ROOT - - fastjet -env: - EPOVSN: "${EPOS_VERSION/./}" - EPO: "${EPOS_ROOT}/epos/" ---- -#!/bin/bash -ex - -export EPOVSN=${PKGVERSION/./} - -# The following two variables *must* have a trailing slash! EPOS installation -# will make a mess otherwise. -export EPO=$PWD/ -export OBJ=$EPO/Unu/Lib/ - -rsync -a --exclude='**/.git' --delete ${SOURCEDIR}/ . -mkdir $OBJ - -export LDFLAGS="-Wl,--no-as-needed -L${MPFR_ROOT}/lib -L${GMP_ROOT}/lib -L${CGAL_ROOT}/lib" -export LIBRARY_PATH="$LD_LIBRARY_PATH" -make LFLAGS="$LDFLAGS" - -# "Install" -INST_SUBROOT=$INSTALLROOT/epos -mkdir -p $INST_SUBROOT \ - $INSTALLROOT/bin -rsync -a \ - --exclude='**/bin' \ - --exclude='**/.git' \ - --exclude=*.f \ - --exclude=*.o \ - --exclude=*.h \ - --exclude=*.c \ - --exclude=*.cpp \ - --exclude=Makefile \ - ./ $INST_SUBROOT/ -rsync -a bin/ $INSTALLROOT/bin/ -find $INSTALLROOT -type d -empty -exec rmdir '{}' \; > /dev/null 2>&1 || true -[ -d "$INST_SUBROOT/Unu/Lib/epos$EPOVSN" ] - -# Modulefile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < etc/modulefiles/$PKGNAME < "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" < post-install -#!/bin/sh -ldconfig -EOF - -fpm -s dir -t $PACKAGE_FORMAT \ - --after-install post-install \ - -d "libunwind = `echo $RPM_LIBUNWIND_VERSION | tr - _`" \ - --iteration $IGPROF_REVISION \ - -a $RPM_ARCH \ - -v $IGPROF_VERSION \ - -n igprof \ - -C igprof \ - usr/bin usr/lib usr/include - -fpm -s dir -t $PACKAGE_FORMAT --iteration $LIBUNWIND_REVISION -a $RPM_ARCH -v $RPM_LIBUNWIND_VERSION -n libunwind -C libunwind usr/lib usr/include -fpm -s dir -t $PACKAGE_FORMAT --iteration $LIBATOMIC_OPS_REVISION -a $RPM_ARCH -v $LIBATOMIC_OPS_VERSION -n libatomic_ops -C libatomic_ops usr/lib usr/include - -cat << EOF > packaging.yaml -architecture: $ARCHITECTURE -organization: igprof -description: IgProf test repository -format: $PACKAGE_FORMAT -labels: - - profiling - - development -packages: - - name: igprof - version: $IGPROF_VERSION - file: igprof$VERSION_SEP$IGPROF_VERSION-$IGPROF_REVISION$ARCH_SEP$RPM_ARCH.$PACKAGE_FORMAT - licenses: - - GPL-2.0 - vcs_url: "https://github.com/igprof/igprof.git" - website_url: http://igprof.org - labels: - - profiling - - development - - name: libunwind - version: $LIBUNWIND_VERSION - file: libunwind$VERSION_SEP$RPM_LIBUNWIND_VERSION-$LIBUNWIND_REVISION$ARCH_SEP$RPM_ARCH.$PACKAGE_FORMAT - licenses: - - GPL-2.0 - vcs_url: "https://github.com/igprof/libunwind" - labels: - - profiling - - development - - name: libatomic_ops - version: $RPM_LIBATOMIC_OPS_VERSION - file: $RPM_LIBATOMIC_OPS_NAME$VERSION_SEP$RPM_LIBATOMIC_OPS_VERSION-$LIBATOMIC_OPS_REVISION$ARCH_SEP$RPM_ARCH.$PACKAGE_FORMAT - licenses: - - GPL-2.0 - vcs_url: "https://github.com/igprof/libatomic_ops" - labels: - - profiling - - development -level: test -EOF - -ls -$SOURCEDIR/upload-bintray-distribution -u ktf packaging.yaml diff --git a/igprof.sh b/igprof.sh deleted file mode 100644 index 65ced18..0000000 --- a/igprof.sh +++ /dev/null @@ -1,17 +0,0 @@ -package: IgProf -version: 5.9.16 -source: https://github.com/igprof/igprof -tag: v5.9.16 -requires: - - libunwind - - CMake ---- -#!/bin/sh - -cmake $SOURCEDIR \ - -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - -DUNWIND_INCLUDE_DIR=$LIBUNWIND_ROOT/include \ - -DUNWIND_LIBRARY=$LIBUNWIND_ROOT/lib/libunwind.so \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -U_FORTIFY_SOURCE -Wno-attributes" -make ${JOBS+-j $JOBS} -make install diff --git a/lcov.sh b/lcov.sh index 7ccde84..8123a7b 100644 --- a/lcov.sh +++ b/lcov.sh @@ -26,4 +26,3 @@ setenv LCOV_ROOT \$::env(BASEDIR)/$PKGNAME/\$version prepend-path LD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib $([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib") EoF - diff --git a/libatomic_ops.sh b/libatomic_ops.sh deleted file mode 100644 index b87cefe..0000000 --- a/libatomic_ops.sh +++ /dev/null @@ -1,15 +0,0 @@ -package: libatomic_ops -version: libatomic_ops-7_4_2 -source: https://github.com/ivmai/libatomic_ops/ -tag: master -build_requires: - - autotools:(slc[56].*|ubt.*) ---- -#!/bin/sh -rsync -a $SOURCEDIR/ ./ -libtoolize -autoreconf -ivf -./configure --prefix=$INSTALLROOT - -make ${JOBS+-j $JOBS} -make install diff --git a/libperl.sh b/libperl.sh index aa37920..f49f580 100644 --- a/libperl.sh +++ b/libperl.sh @@ -5,4 +5,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \nint main(){}\n" | cc -xc -lperl -L`perl -MConfig -e 'print $Config{archlib}'`/CORE -I`perl -MConfig -e 'print $Config{archlib}'`/CORE - -o /dev/null && perl -MExtUtils::Embed -e 1 --- - diff --git a/make.sh b/make.sh index 9746bd6..3c6002c 100644 --- a/make.sh +++ b/make.sh @@ -8,4 +8,3 @@ system_requirement: ".*" system_requirement_check: | type make --- - diff --git a/mesos-dds.sh b/mesos-dds.sh deleted file mode 100644 index 94ddea6..0000000 --- a/mesos-dds.sh +++ /dev/null @@ -1,35 +0,0 @@ -package: mesos-dds -version: master -source: https://github.com/alisw/mesos-dds -requires: -- mesos -- protobuf -- boost -- glog -- cpprestsdk -- DDS -build_requires: -- CMake -tag: master ---- -#!/bin/sh - -case $ARCHITECTURE in - osx*) - [[ ! $BOOST_ROOT ]] && BOOST_ROOT=$(brew --prefix boost) - [[ ! $MESOS_ROOT ]] && MESOS_ROOT=$(brew --prefix mesos) - ;; -esac - -cmake "$SOURCEDIR" \ - -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - -DPROTOBUF_ROOT=${PROTOBUF_ROOT} \ - ${MESOS_ROOT:+-DMESOS_ROOT=${MESOS_ROOT}} \ - ${BOOST_ROOT:+-DBOOST_ROOT=${BOOST_ROOT}} \ - -DGLOG_ROOT=${GLOG_ROOT} \ - -DCPPRESTSDK_ROOT=${CPPRESTSDK_ROOT} \ - -DDDS_ROOT=${DDS_ROOT} - -make ${JOBS:+-j $JOBS} -make install - diff --git a/mesos-workqueue.sh b/mesos-workqueue.sh deleted file mode 100644 index 416a0f5..0000000 --- a/mesos-workqueue.sh +++ /dev/null @@ -1,46 +0,0 @@ -package: mesos-workqueue -version: 0.0.2-%(short_hash)s -source: https://github.com/alisw/mesos-workqueue -tag: master -requires: -- mesos -- protobuf -- boost -- glog -build_requires: -- CMake ---- -case $ARCHITECTURE in - osx*) - [[ -z "$BOOST_ROOT" ]] && BOOST_ROOT=$(brew --prefix boost) - ;; -esac -cmake "$SOURCEDIR" \ - -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - -DPROTOBUF_ROOT=${PROTOBUF_ROOT} \ - -DMESOS_ROOT=${MESOS_ROOT} \ - ${BOOST_ROOT:+-DBOOST_ROOT=${BOOST_ROOT}} \ - -DGLOG_ROOT=${GLOG_ROOT} -make ${JOBS:+-j $JOBS} -make install - -#ModuleFile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < "$MODULEFILE" < "$MODULEFILE" <\nint main() {}\n" | cc -xc - -o /dev/null ---- diff --git a/o2.sh b/o2.sh deleted file mode 100644 index 8494f41..0000000 --- a/o2.sh +++ /dev/null @@ -1,125 +0,0 @@ -package: O2 -version: dev -requires: - - FairRoot - - AliRoot - - DDS - - Vc - - hijing -source: https://github.com/AliceO2Group/AliceO2 -tag: dev -prepend_path: - ROOT_INCLUDE_PATH: "$O2_ROOT/include" -incremental_recipe: | - make ${JOBS:+-j$JOBS} install - mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles - # install the compilation database so that we can post-check the code - cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT} - - DEVEL_SOURCES="`readlink $SOURCEDIR || echo $SOURCEDIR`" - # This really means we are in development mode. We need to make sure we - # use the real path for sources in this case. We also copy the - # compile_commands.json file so that IDEs can make use of it directly, this - # is a departure from our "no changes in sourcecode" policy, but for a good reason - # and in any case the file is in gitignore. - if [ "$DEVEL_SOURCES" != "$SOURCEDIR" ]; then - perl -p -i -e "s|$SOURCEDIR|$DEVEL_SOURCES|" compile_commands.json - ln -sf $BUILDDIR/compile_commands.json $DEVEL_SOURCES/compile_commands.json - fi - if [[ $ALIBUILD_O2_TESTS ]]; then - export O2_ROOT=$INSTALLROOT - CTEST_OUTPUT_ON_FAILURE=1 make test - fi -valid_defaults: - - o2 - - o2-daq - - o2-dev-fairroot ---- -#!/bin/sh -export ROOTSYS=$ROOT_ROOT - -# Making sure people do not have SIMPATH set when they build fairroot. -# Unfortunately SIMPATH seems to be hardcoded in a bunch of places in -# fairroot, so this really should be cleaned up in FairRoot itself for -# maximum safety. -unset SIMPATH - -case $ARCHITECTURE in - osx*) - # If we preferred system tools, we need to make sure we can pick them up. - [[ ! $BOOST_ROOT ]] && BOOST_ROOT=`brew --prefix boost` - [[ ! $ZEROMQ_ROOT ]] && ZEROMQ_ROOT=`brew --prefix zeromq` - [[ ! $GSL_ROOT ]] && GSL_ROOT=`brew --prefix gsl` - [[ ! $PROTOBUF_ROOT ]] && PROTOBUF_ROOT=`brew --prefix protobuf` - SONAME=dylib - ;; - *) SONAME=so ;; -esac - -cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - -DCMAKE_MODULE_PATH="$SOURCEDIR/cmake/modules;$FAIRROOT_ROOT/share/fairbase/cmake/modules;$FAIRROOT_ROOT/share/fairbase/cmake/modules_old" \ - -DFairRoot_DIR=$FAIRROOT_ROOT \ - -DALICEO2_MODULAR_BUILD=ON \ - -DROOTSYS=$ROOTSYS \ - ${PYTHIA6_ROOT:+-DPythia6_LIBRARY_DIR=$PYTHIA6_ROOT/lib} \ - ${GEANT3_ROOT:+-DGeant3_DIR=$GEANT3_ROOT} \ - ${GEANT4_ROOT:+-DGeant4_DIR=$GEANT4_ROOT} \ - -DFAIRROOTPATH=$FAIRROOT_ROOT \ - ${BOOST_ROOT:+-DBOOST_ROOT=$BOOST_ROOT} \ - ${DDS_ROOT:+-DDDS_PATH=$DDS_ROOT} \ - -DZMQ_DIR=$ZEROMQ_ROOT \ - -DZMQ_INCLUDE_DIR=$ZEROMQ_ROOT/include \ - -DALIROOT=$ALIROOT_ROOT \ - -DPROTOBUF_INCLUDE_DIR=$PROTOBUF_ROOT/include \ - -DPROTOBUF_PROTOC_EXECUTABLE=$PROTOBUF_ROOT/bin/protoc \ - -DPROTOBUF_LIBRARY=$PROTOBUF_ROOT/lib/libprotobuf.$SONAME \ - ${GSL_ROOT:+-DGSL_DIR=$GSL_ROOT} \ - ${PYTHIA_ROOT:+-DPYTHIA8_INCLUDE_DIR=$PYTHIA_ROOT/include} \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - -if [[ $GIT_TAG == master ]]; then - CONTINUE_ON_ERROR=true -fi -make ${CONTINUE_ON_ERROR+-k} ${JOBS+-j $JOBS} install - -# install the compilation database so that we can post-check the code -cp compile_commands.json ${INSTALLROOT} - -DEVEL_SOURCES="`readlink $SOURCEDIR || echo $SOURCEDIR`" -# This really means we are in development mode. We need to make sure we -# use the real path for sources in this case. We also copy the -# compile_commands.json file so that IDEs can make use of it directly, this -# is a departure from our "no changes in sourcecode" policy, but for a good reason -# and in any case the file is in gitignore. -if [ "$DEVEL_SOURCES" != "$SOURCEDIR" ]; then - perl -p -i -e "s|$SOURCEDIR|$DEVEL_SOURCES|" compile_commands.json - ln -sf $BUILDDIR/compile_commands.json $DEVEL_SOURCES/compile_commands.json -fi - -# Modulefile -mkdir -p etc/modulefiles -cat > etc/modulefiles/$PKGNAME < $BUILDDIR/changed - if [[ $(cat $BUILDDIR/changed | wc -l) -le 50 ]]; then - O2_CHECKCODE_CHANGEDFILES=$(while read FILE; do [[ -e "$O2_SRC/$FILE" ]] && echo "$FILE" || true; done < <(cat $BUILDDIR/changed) | \ - xargs echo | sed -e 's/ /:/g') - if [[ ! $O2_CHECKCODE_CHANGEDFILES ]]; then - echo "Nothing changed with respect to base commit: not checking anything" - exit 0 - fi - fi - popd -fi - -# Call a tool to filter out unwanted sources (ROOT dicts, etc) from the compilations database. -# Further, also optionally restrict the checks on a specific set of files, which can be passed here via means of the -# environment variable O2_CHECKCODE_CHANGEDFILES. The environment variable is supposed to hold a colon separated list of files. -ThinCompilationsDatabase.py -exclude-files '(?:.*G\_\_.*\.cxx|.*\.pb.cc)' ${O2_CHECKCODE_CHANGEDFILES:+-use-files ${O2_CHECKCODE_CHANGEDFILES}} -cp thinned_compile_commands.json compile_commands.json - -# List of enabled C++ checks (make sure they are all green) -CHECKS="${O2_CHECKER_CHECKS:--*,modernize-*,-modernize-use-default,-modernize-pass-by-value,-modernize-use-auto,-modernize-use-bool-literals,-modernize-use-using,-modernize-loop-convert,-modernize-use-bool-literals,-modernize-make-unique,aliceO2-member-name}" - -# Run C++ checks -run_O2CodeChecker.py -clang-tidy-binary $(which O2codecheck) -header-filter=.*SOURCES.* ${O2_CHECKER_FIX:+-fix} -checks=${CHECKS} 2>&1 | tee error-log.txt - -# Turn warnings into errors -sed -e 's/ warning:/ error:/g' error-log.txt > error-log.txt.0 && mv error-log.txt.0 error-log.txt - -# Run copyright notice check -COPYRIGHT="$(cat <<'EOF' -// Copyright CERN and copyright holders of ALICE O2. This software is -// distributed under the terms of the GNU General Public License v3 (GPL -// Version 3), copied verbatim in the file "COPYING". -// -// See https://alice-o2.web.cern.ch/ for full licensing information. -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. -EOF -)" -COPYRIGHT_LINES=$(echo "$COPYRIGHT" | wc -l) -set +x -while read FILE; do - FILE="$O2_SRC/$FILE" - [[ "$(head -n$COPYRIGHT_LINES "$FILE")" == "$COPYRIGHT" ]] || { printf "$FILE:1:1: error: missing or malformed copyright notice\n" >> error-log.txt; } -done < <([[ $O2_CHECKCODE_CHANGEDFILES ]] && echo "$O2_CHECKCODE_CHANGEDFILES" | sed -e 's/:/\n/g' \ - || (cd "$O2_SRC"; find . -name '*.cxx' -o -name '*.h')) - -# Tell user what to do in case of copyright notice error -if grep -q "malformed copyright notice" error-log.txt; then - printf "\nerror: Some files are missing the correct copyright notice on top.\n" - printf "error: Make sure all your source files begin with the following exact lines:\nerror:\n" - while read LINE; do printf "error: $LINE\n"; done < <(echo "$COPYRIGHT") - printf "error:\nerror: List of non-compliant files will follow.\n\n" -fi - -# Filter the actual errors from the log. Break with nonzero if errors are found -! ( grep " error:" error-log.txt ) diff --git a/o2codechecker.sh b/o2codechecker.sh deleted file mode 100644 index 08b23f6..0000000 --- a/o2codechecker.sh +++ /dev/null @@ -1,39 +0,0 @@ -package: o2codechecker -version: "%(tag_basename)s%(defaults_upper)s" -requires: - - Clang -build_requires: - - CMake -source: https://github.com/AliceO2Group/O2CodeChecker.git -tag: master -incremental_recipe: | - make ${JOBS+-j$JOBS} install - mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles ---- -#!/bin/bash -e -cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ - -DClang_DIR=$CLANG_ROOT/lib/cmake/clang \ - -DLLVM_DIR=$CLANG_ROOT/lib/cmake/llvm -make ${JOBS+-j$JOBS} install -ctest - -# Modulefile -mkdir -p etc/modulefiles -cat > etc/modulefiles/$PKGNAME <\n" | cc -xc - -c -o /dev/null fi --- - diff --git a/openssl.sh b/openssl.sh index b1ed82d..ffc29e9 100644 --- a/openssl.sh +++ b/openssl.sh @@ -26,10 +26,10 @@ build_requires: rsync -av --delete --exclude="**/.git" $SOURCEDIR/ . case ${PKG_VERSION} in - v1.1*) + v1.1*) OPTS="" OPENSSLDIRPREFIX="" ;; - *) + *) OPTS="no-krb5" OPENSSLDIRPREFIX="etc/ssl" ;; diff --git a/osx-system-openssl.sh b/osx-system-openssl.sh deleted file mode 100644 index 8bae133..0000000 --- a/osx-system-openssl.sh +++ /dev/null @@ -1,9 +0,0 @@ -package: osx-system-openssl -version: 1.0 -system_requirement_missing: | - Please make sure you install openssl using Homebrew (brew install openssl) -system_requirement: "osx.*" -system_requirement_check: | - echo '#include ' | c++ -x c++ - -I`brew --prefix openssl`/include -c -o /dev/null ---- - diff --git a/parquet-cpp.sh b/parquet-cpp.sh deleted file mode 100644 index 5c68318..0000000 --- a/parquet-cpp.sh +++ /dev/null @@ -1,44 +0,0 @@ -package: parquet-cpp -version: release-0.1-rc0 -source: https://github.com/apache/parquet-cpp -build_requires: -- protobuf -- snappy -- zlib -- thrift -build_requires: -- CMake -- googletest ---- - -export THRIFT_HOME=$(brew --prefix thrift) -cmake $SOURCEDIR \ - -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ - ${BOOST_ROOT:+-DBOOST_ROOT=$BOOST_ROOT} \ - ${BOOST_ROOT:+-DBoost_DIR=$BOOST_ROOT} \ - ${BOOST_ROOT:+-DBoost_INCLUDE_DIR=$BOOST_ROOT/include} - -make ${JOBS+-j $JOBS} -make install - -#ModuleFile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < etc/modulefiles/$PKGNAME < DIPSYpp_HepMC.in <<\EOF -read Tune27.in -cd /DIPSY -cp EventHandler LHCEventHandler -set LHCEventHandler:WFL stdProton -set LHCEventHandler:WFR stdProton -set LHCEventHandler:ConsistencyLevel 0 -set LHCEventHandler:XSecFn:CheckOffShell false -set LHCEventHandler:CascadeHandler NULL -set LHCEventHandler:HadronizationHandler NULL -set LHCEventHandler:DecayHandler NULL -create ThePEG::FixedCMSLuminosity LHCLumi -set LHCEventHandler:LuminosityFunction LHCLumi -cp Generator LHCGenerator -set LHCGenerator:EventHandler LHCEventHandler -set LHCEventHandler:EffectivePartonMode Colours -set LHCGenerator:EventHandler:DecayHandler /Defaults/Handlers/StandardDecayHandler -set LHCGenerator:EventHandler:HadronizationHandler Frag8 -set LHCEventHandler:WFL Proton -set LHCEventHandler:WFR Proton -set LHCEventHandler:EventFiller:SoftRemove NoValence -set LHCGenerator:EventHandler:LuminosityFunction:Energy 7000 -create ThePEG::HepMCFile HepMCFile HepMCAnalysis.so -set LHCGenerator:AnalysisHandlers 0 HepMCFile -set HepMCFile:Filename DIPSYpp.hepmc -set HepMCFile:PrintEvent 10000000000 -set HepMCFile:Format GenEvent -set HepMCFile:Units GeV_mm -saverun DIPSYpp LHCGenerator -EOF - -setupThePEG -r $THEPEG_ROOT/lib/ThePEG/ThePEGDefaults.rpo \ - -I $THEPEG_ROOT/share/Ariadne \ - DIPSYpp_HepMC.in -runThePEG DIPSYpp.run -N100 --tics - -rivet-mkanalysis ALICE_Test -rivet-buildplugin RivetALICE_Test.so ALICE_Test.cc - -rivet --pwd -a ALICE_2010_S8625980 -a ALICE_Test DIPSYpp.hepmc - -rivet-cmphistos Rivet.yoda diff --git a/rivet.sh b/rivet.sh deleted file mode 100644 index 49456cd..0000000 --- a/rivet.sh +++ /dev/null @@ -1,81 +0,0 @@ -package: Rivet -version: "%(tag_basename)s%(defaults_upper)s" -tag: 2.5.1-alice1 -source: https://github.com/alisw/rivet -requires: - - GSL - - YODA - - fastjet - - HepMC - - boost -prepend_path: - PYTHONPATH: $RIVET_ROOT/lib64/python2.7/site-packages:$RIVET_ROOT/lib/python2.7/site-packages ---- -#!/bin/bash -e -case $ARCHITECTURE in - osx*) - # If we preferred system tools, we need to make sure we can pick them up. - [[ ! $GSL_ROOT ]] && GSL_ROOT=`brew --prefix gsl` - [[ ! $BOOST_ROOT ]] && BOOST_ROOT=`brew --prefix boost` - ;; - *) - ARCH_LDFLAGS="-Wl,--no-as-needed" - ;; -esac - -rsync -a --exclude='**/.git' --delete --delete-excluded $SOURCEDIR/ ./ - -# MPFR and GMP are compiled statically, however in some cases there might be -# some "-lgmp" left somewhere and we have to deal with it with the correct path. -# Boost flags are also necessary -export LDFLAGS="$ARCH_LDFLAGS -L${MPFR_ROOT}/lib -L${GMP_ROOT}/lib -L${CGAL_ROOT}/lib -lCGAL" -export LIBRARY_PATH="$LD_LIBRARY_PATH" -export CXXFLAGS="$CXXFLAGS -I${MPFR_ROOT}/include -I${GMP_ROOT}/include -I${CGAL_ROOT}/include -DCGAL_DO_NOT_USE_MPZF" - -if [[ "$BOOST_ROOT" != '' ]]; then - export LDFLAGS="$LDFLAGS -L$BOOST_ROOT/lib" - export CXXFLAGS="$CXXFLAGS -I$BOOST_ROOT/include" -fi -if printf "int main(){}" | c++ $LDFLAGS -lboost_thread -lboost_system -xc++ - -o /dev/null; then - export LDFLAGS="$LDFLAGS -lboost_thread -lboost_system" -else - export LDFLAGS="$LDFLAGS -lboost_thread-mt -lboost_system-mt" -fi - -[[ "$CXXFLAGS" != *'-std=c++11'* ]] || CXX11=1 - -autoreconf -ivf -./configure \ - --prefix="$INSTALLROOT" \ - --disable-doxygen \ - --with-yoda="$YODA_ROOT" \ - ${GSL_ROOT:+--with-gsl="$GSL_ROOT"} \ - --with-hepmc="$HEPMC_ROOT" \ - --with-fastjet="$FASTJET_ROOT" \ - ${BOOST_ROOT:+--with-boost="$BOOST_ROOT"} \ - ${CXX11:+--enable-stdcxx11} -make -j$JOBS -make install - -# Modulefile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < etc/modulefiles/$PKGNAME < fakewget/wget && chmod +x fakewget/wget - -PATH=$PATH:fakewget ./configure --prefix=$INSTALLROOT \ - --with-sqlite3=install \ - --enable-hepmc2=$HEPMC_ROOT \ - --enable-lhapdf=$LHAPDF5_ROOT - -make ${JOBS+-j $JOBS} -make install - -# Modulefile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" < "$MODULEFILE" <\n" | gcc -xc++ - -c -o /dev/null --- - diff --git a/thepeg-test.sh b/thepeg-test.sh deleted file mode 100644 index fbe0ef6..0000000 --- a/thepeg-test.sh +++ /dev/null @@ -1,42 +0,0 @@ -package: ThePEG-test -version: v1 -force_rebuild: 1 -requires: - - ThePEG ---- -#!/bin/bash -cat > DIPSYpp_HepMC.in <<\EOF -read Tune27.in -cd /DIPSY -cp EventHandler LHCEventHandler -set LHCEventHandler:WFL stdProton -set LHCEventHandler:WFR stdProton -set LHCEventHandler:ConsistencyLevel 0 -set LHCEventHandler:XSecFn:CheckOffShell false -set LHCEventHandler:CascadeHandler NULL -set LHCEventHandler:HadronizationHandler NULL -set LHCEventHandler:DecayHandler NULL -create ThePEG::FixedCMSLuminosity LHCLumi -set LHCEventHandler:LuminosityFunction LHCLumi -cp Generator LHCGenerator -set LHCGenerator:EventHandler LHCEventHandler -set LHCEventHandler:EffectivePartonMode Colours -set LHCGenerator:EventHandler:DecayHandler /Defaults/Handlers/StandardDecayHandler -set LHCGenerator:EventHandler:HadronizationHandler Frag8 -set LHCEventHandler:WFL Proton -set LHCEventHandler:WFR Proton -set LHCEventHandler:EventFiller:SoftRemove NoValence -set LHCGenerator:EventHandler:LuminosityFunction:Energy 7000 -create ThePEG::HepMCFile HepMCFile HepMCAnalysis.so -set LHCGenerator:AnalysisHandlers 0 HepMCFile -set HepMCFile:Filename DIPSYpp.hepmc -set HepMCFile:PrintEvent 10000000000 -set HepMCFile:Format GenEvent -set HepMCFile:Units GeV_mm -saverun DIPSYpp LHCGenerator -EOF - -setupThePEG -r $THEPEG_ROOT/lib/ThePEG/ThePEGDefaults.rpo \ - -I $THEPEG_ROOT/share/Ariadne \ - DIPSYpp_HepMC.in -runThePEG DIPSYpp.run -N100 --tics diff --git a/thepeg.sh b/thepeg.sh deleted file mode 100644 index 85494eb..0000000 --- a/thepeg.sh +++ /dev/null @@ -1,95 +0,0 @@ -package: ThePEG -version: "%(tag_basename)s%(defaults_upper)s" -source: https://github.com/alisw/thepeg -tag: "v2.0.4-alice1" -requires: - - Rivet - - pythia - - HepMC - - boost -build_requires: - - autotools -prepend_path: - LD_LIBRARY_PATH: "$THEPEG_ROOT/lib/ThePEG" - DYLD_LIBRARY_PATH: "$THEPEG_ROOT/lib/ThePEG" -env: - ThePEG_INSTALL_PATH: "$THEPEG_ROOT/lib/ThePEG" ---- -#!/bin/bash -e -case $ARCHITECTURE in - osx*) - # If we preferred system tools, we need to make sure we can pick them up. - [[ ! $GSL_ROOT ]] && GSL_ROOT=`brew --prefix gsl` - [[ ! $BOOST_ROOT ]] && BOOST_ROOT=`brew --prefix boost` - ;; -esac - -export LDFLAGS="-Wl,--no-as-needed -L${MPFR_ROOT}/lib -L${GMP_ROOT}/lib -L${CGAL_ROOT}/lib" -export CXXFLAGS="-I${CGAL_ROOT}/include" -export LIBRARY_PATH="$LD_LIBRARY_PATH" - -if [[ "$BOOST_ROOT" != '' ]]; then - export LDFLAGS="$LDFLAGS -L$BOOST_ROOT/lib" - export CXXFLAGS="$CXXFLAGS -I$BOOST_ROOT/include" -fi -if printf "int main(){}" | c++ $LDFLAGS -lboost_thread -lboost_system -xc++ - -o /dev/null; then - export LDFLAGS="$LDFLAGS -lboost_thread -lboost_system" -else - export LDFLAGS="$LDFLAGS -lboost_thread-mt -lboost_system-mt" -fi - -rsync -a --delete --exclude '**/.git' --delete-excluded $SOURCEDIR/ ./ - -# Override perl from AliEn-Runtime -mkdir -p fakeperl/bin -ln -nfs /usr/bin/perl fakeperl/bin/perl -export PATH="$PWD/fakeperl/bin:$PATH" - -# special treatment for ThePEG version used for DIPSY -if [[ "$PKGVERSION" =~ "v2015-08-11" ]]; then - sed -i -e 's#@PYTHIA8_DIR@/xmldoc#@PYTHIA8_DIR@/share/Pythia8/xmldoc#' TheP8I/Config/interfaces.pl.in - sed -i -e 's#@PYTHIA8_DIR@/xmldoc#@PYTHIA8_DIR@/share/Pythia8/xmldoc#' TheP8I/src/Makefile.am - sed -i -e 's#@PYTHIA8_DIR@/xmldoc#@PYTHIA8_DIR@/share/Pythia8/xmldoc#' TheP8I/src/Makefile.in -fi - -autoreconf -ivf -export LDFLAGS="-L$LHAPDF_ROOT/lib" -./configure \ - --disable-silent-rules \ - --enable-shared \ - --enable-stdcxx11 \ - --disable-static \ - --without-javagui \ - --prefix="$INSTALLROOT" \ - ${GSL_ROOT:+--with-gsl="$GSL_ROOT"} \ - --with-pythia8="$PYTHIA_ROOT" \ - --with-hepmc="$HEPMC_ROOT" \ - --with-rivet="$RIVET_ROOT" \ - --with-lhapdf="$LHAPDF_ROOT" \ - --with-fastjet="$FASTJET_ROOT" \ - --enable-unitchecks 2>&1 | tee -a thepeg_configure.log -grep -q 'Cannot build TheP8I without a working Pythia8 installation.' thepeg_configure.log && false -make C_INCLUDE_PATH="${GSL_ROOT}/include" CPATH="${GSL_ROOT}/include" ${JOBS:+-j $JOBS} -make install - -# Modulefile -MODULEDIR="$INSTALLROOT/etc/modulefiles" -MODULEFILE="$MODULEDIR/$PKGNAME" -mkdir -p "$MODULEDIR" -cat > "$MODULEFILE" <' | clang++ -x c++ - -c -o /dev/null ---- diff --git a/xdevel.sh b/xdevel.sh index e99d803..b439097 100644 --- a/xdevel.sh +++ b/xdevel.sh @@ -8,4 +8,3 @@ system_requirement: ".*" system_requirement_check: | printf "#include \n#include \n#include \n#include \n" | cc -xc - -I/opt/X11/include $(freetype-config --cflags 2> /dev/null || pkg-config freetype2 --cflags 2> /dev/null) -c -o /dev/null --- - diff --git a/xercesc.sh b/xercesc.sh index 9646abf..c4b98d0 100644 --- a/xercesc.sh +++ b/xercesc.sh @@ -11,7 +11,7 @@ env: #!/bin/sh cd $SOURCEDIR autoreconf -i -cd - +cd - echo "command $SOURCEDIR configure --prefix $INSTALLROOT CFLAGS $CFLAGS CXXFLAGS=$CFLAGS" $SOURCEDIR/configure --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" make ${JOBS+-j $JOBS} diff --git a/yacc-like.sh b/yacc-like.sh index 54be0d6..965fd81 100644 --- a/yacc-like.sh +++ b/yacc-like.sh @@ -7,5 +7,3 @@ system_requirement: ".*" system_requirement_check: | which bison && which flex --- - - diff --git a/yaml-cpp.sh b/yaml-cpp.sh index ae880d8..ea9fc42 100644 --- a/yaml-cpp.sh +++ b/yaml-cpp.sh @@ -46,4 +46,3 @@ module load BASE/1.0 ${BOOST_REVISION:+boost/$BOOST_VERSION-$BOOST_REVISION} set YAMLCPP \$::env(BASEDIR)/$PKGNAME/\$version prepend-path LD_LIBRARY_PATH \$YAMLCPP/lib EoF -