From 57db11bdbfe024d45f4b0b16c12c09c9ce66797f Mon Sep 17 00:00:00 2001 From: Spencer Bliven Date: Sat, 27 Apr 2024 22:56:27 +0200 Subject: [PATCH] datacatalog/2.2.0 This migrates to installing from github. --- Tools/datacatalog/README.md | 28 ++++++++++++++++++++++++ Tools/datacatalog/build | 30 +++++++++++++------------- Tools/datacatalog/files/variants.Linux | 8 ++++--- Tools/datacatalog/modulefile | 13 +++++++---- 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/Tools/datacatalog/README.md b/Tools/datacatalog/README.md index 7d08119..7df942a 100644 --- a/Tools/datacatalog/README.md +++ b/Tools/datacatalog/README.md @@ -4,6 +4,18 @@ This module provides tools to interface with the Data Catalog (discovery.psi.ch). +## Version Numbers + +Prior to version 2, each command had it's own version. The pmodule version +roughly tracked the datasetIngestor version. However, some pmodules were +updated manually with more recent binaries, so in general there is no way to +check the versions contained in older pmodules other than running each command +and parsing the output. + +From v2.2.0 all CLI commands share a common version, and the pmodules will +reflect this. The SciCat GUI is still versioned independently, but this is +planned to be brought in sync with the CLI and pmodule soon. + ## Installation Run `./build ` to install the latest version. This downloads the @@ -18,3 +30,19 @@ the conda module is not activated. See Programming/anaconda/2019.07/conda-env-defs/scicat_client for environment installation details. +### SciCat GUI + +The SciCat GUI is installed manually to `bin`. As of 2.2.0, no standard release +cycle is used for the GUI. It should be built from source in the [rollout +repo](https://git.psi.ch/MELANIE/rollout/-/tree/master/Software/00-General/SciCatArchiverGUI) +and manually coppied. + +An issue in 2.2.0 and earlier prevents the GUI from running on RHEL 8. This was +fixed with a manual wrapper script which produces an error on RHEL 8. + +# TODO + +- [ ] The post_prep section of the build script should be removed following + fixing [#55](https://github.com/paulscherrerinstitute/scicat-cli/issues/55) +- [ ] SciCat should be downloaded and installed in the build script + diff --git a/Tools/datacatalog/build b/Tools/datacatalog/build index 77e2ff3..f039f9e 100755 --- a/Tools/datacatalog/build +++ b/Tools/datacatalog/build @@ -1,32 +1,32 @@ #!/usr/bin/env modbuild pbuild::add_to_group 'Tools' +pbuild::set_download_url https://github.com/paulscherrerinstitute/scicat-cli/releases/download/v${V_PKG}/scicat-cli_.${V_PKG}_Linux_x86_64.tar.gz -pbuild::prep() { - : +pbuild::post_prep() { + # PModules 1.0.0 fails on tar bundles without top-level directories. This + # tries to work around this. It could be removed if the cli release process + # changes (https://github.com/paulscherrerinstitute/scicat-cli/issues/55) + if [[ ! -f "${SRC_DIR}/datasetIngestor" ]]; then + local file="$PMODULES_DISTFILESDIR/scicat-cli_.${V_PKG}_Linux_x86_64.tar.gz" + tar --directory="${SRC_DIR}" -xv --strip-components 0 -f "${file}" + fi } pbuild::configure() { - : + : } pbuild::compile() { - : + : } pbuild::install() { - mkdir -p "$PREFIX/bin" + mkdir -p "$PREFIX/bin" - /usr/bin/curl -o "$PREFIX/bin/datasetIngestor" https://intranet.psi.ch/pub/Daas/WebHome/datasetIngestor - chmod +x "$PREFIX/bin/datasetIngestor" + cp $SRC_DIR/dataset{Ingestor,Retriever,Archiver} "$PREFIX/bin" - /usr/bin/curl -o "$PREFIX/bin/datasetRetriever" https://intranet.psi.ch/pub/Daas/WebHome/datasetRetriever - chmod +x "$PREFIX/bin/datasetRetriever" - - /usr/bin/curl -o "$PREFIX/bin/datasetArchiver" https://intranet.psi.ch/pub/Daas/WebHome/datasetArchiver - chmod +x "$PREFIX/bin/datasetArchiver" - - # Hardcoded; could be made version-specific in the future if needed - ln -s "${PMODULES_ROOT}/Programming/anaconda/2019.07/conda/envs/scicat_client-0.1.0/bin/scicat_client" "$PREFIX/bin/scicat_client" + # Hardcoded; could be made version-specific in the future if needed + ln -s "${PMODULES_ROOT}/Programming/anaconda/2019.07/conda/envs/scicat_client-0.1.0/bin/scicat_client" "$PREFIX/bin/scicat_client" } diff --git a/Tools/datacatalog/files/variants.Linux b/Tools/datacatalog/files/variants.Linux index bd3c881..03713ef 100644 --- a/Tools/datacatalog/files/variants.Linux +++ b/Tools/datacatalog/files/variants.Linux @@ -1,7 +1,9 @@ -datacatalog/1.1.10 stable -datacatalog/1.1.9 removed -datacatalog/1.1.15 removed datacatalog/1.1.3 removed datacatalog/1.1.4 removed datacatalog/1.1.7 removed datacatalog/1.1.8 removed +datacatalog/1.1.9 removed +datacatalog/1.1.15 removed +datacatalog/1.1.10 deprecated +datacatalog/1.1.11 deprecated +datacatalog/2.2.0 stable diff --git a/Tools/datacatalog/modulefile b/Tools/datacatalog/modulefile index fb6329c..d52cf13 100644 --- a/Tools/datacatalog/modulefile +++ b/Tools/datacatalog/modulefile @@ -1,11 +1,16 @@ #%Module1.0 module-whatis "SciCat datacatalog related tools" -module-url "https://melanie.gitpages.psi.ch/SciCatPages/" -module-license "GPL-V3" -module-maintainer "Stephan Egli " +module-url "https://scicatproject.github.io/documentation/Ingestor/ingestManual.html" +module-license "BSD 3" +module-maintainer "Spencer Bliven " module-help " Data catalog ingest and retrieve tools. -" +Source code for the command line tools (datasetIngestor and datasetRetreiver) +is available at https://github.com/paulscherrerinstitute/scicat-cli. Source +code for the SciCat GUI is available from PSI at +https://git.psi.ch/MELANIE/rollout + +"