-
Notifications
You must be signed in to change notification settings - Fork 2
HYRAX-1964: Make non-static tarballs for rocky8 and rocky9 #97
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 2 commits
6670767
70273d4
df6b1c1
2d11d30
d475d10
316fb02
408f0f5
2838628
799cb92
692c3d6
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 |
|---|---|---|
|
|
@@ -72,6 +72,47 @@ jobs: | |
| - tar -C $HOME -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-build.tar.gz install | ||
| - ./travis/check-installed $EXPECTED_DEPS_COUNT | ||
|
|
||
| # mkdir returns true if the directory already exists. This dir is used in 'before_deploy'. | ||
| - stage: build | ||
| name: "rocky8-static" | ||
| script: | ||
| - echo "# rocky8 - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 | ||
| - export extra_targets="" | ||
| - install_dir=$HOME/rocky8/install | ||
| - mkdir -p $install_dir | ||
| - docker run | ||
| --env prefix=/root/install | ||
| --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky8_hyrax_builder:latest | ||
| /root/hyrax-dependencies/travis/build-for-rocky8-static.sh | ||
| - export ARTIFACT=rocky8-static | ||
| - mkdir -p $TRAVIS_BUILD_DIR/package | ||
| - tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8-static.tar.gz install | ||
| - ./travis/check-installed $EXPECTED_DEPS_COUNT | ||
| - ls -l $TRAVIS_BUILD_DIR/package/ | ||
|
Comment on lines
+86
to
+101
Contributor
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. no changes as compared to the original rocky8 job EXCEPT to rename the build script being used to |
||
|
|
||
| - stage: build | ||
| name: "rocky9-static" | ||
| script: | ||
| - echo "# rocky9 - Expecting to build and install $EXPECTED_DEPS_COUNT dependencies." >&2 | ||
| - export extra_targets="" | ||
| - install_dir=$HOME/rocky9/install | ||
| - mkdir -p $install_dir | ||
| - docker run | ||
| --env prefix=/root/install | ||
| --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky9_hyrax_builder:latest | ||
| /root/hyrax-dependencies/travis/build-for-rocky9-static.sh | ||
| - export ARTIFACT=rocky9-static | ||
| - mkdir -p $TRAVIS_BUILD_DIR/package | ||
| - tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static-$TRAVIS_BUILD_NUMBER.gz install | ||
| - ./travis/check-installed $EXPECTED_DEPS_COUNT | ||
| - ls -l $TRAVIS_BUILD_DIR/package/ | ||
|
|
||
| # mkdir returns true if the directory already exists. This dir is used in 'before_deploy'. | ||
| - stage: build | ||
| name: "rocky8" | ||
|
|
@@ -80,16 +121,16 @@ jobs: | |
| - export extra_targets="" | ||
| - install_dir=$HOME/rocky8/install | ||
| - mkdir -p $install_dir | ||
| - docker run | ||
| - docker run | ||
| --env prefix=/root/install | ||
| --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky8_hyrax_builder:latest | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky8_hyrax_builder:latest | ||
| /root/hyrax-dependencies/travis/build-for-rocky8.sh | ||
| - export ARTIFACT=rocky8 | ||
| - mkdir -p $TRAVIS_BUILD_DIR/package | ||
| - tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8-static.tar.gz install | ||
| - tar -C $HOME/rocky8/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky8.tar.gz install | ||
| - ./travis/check-installed $EXPECTED_DEPS_COUNT | ||
| - ls -l $TRAVIS_BUILD_DIR/package/ | ||
|
|
||
|
|
@@ -100,16 +141,16 @@ jobs: | |
| - export extra_targets="" | ||
| - install_dir=$HOME/rocky9/install | ||
| - mkdir -p $install_dir | ||
| - docker run | ||
| --env prefix=/root/install | ||
| - docker run | ||
| --env prefix=/root/install | ||
| --env BUILD_NUMBER="$TRAVIS_BUILD_NUMBER" | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky9_hyrax_builder:latest | ||
| --volume $install_dir:/root/install | ||
| --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| opendap/rocky9_hyrax_builder:latest | ||
| /root/hyrax-dependencies/travis/build-for-rocky9.sh | ||
| - export ARTIFACT=rocky9 | ||
| - mkdir -p $TRAVIS_BUILD_DIR/package | ||
| - tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static-$TRAVIS_BUILD_NUMBER.gz install | ||
| - tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-$TRAVIS_BUILD_NUMBER.tar.gz install | ||
| - ./travis/check-installed $EXPECTED_DEPS_COUNT | ||
| - ls -l $TRAVIS_BUILD_DIR/package/ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| #!/bin/sh | ||
|
Contributor
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. Copied from previous build-for-rocky8.sh |
||
| # | ||
| # Build the hyrax-dependencies binary tar ball for use with libdap and BES | ||
| # RPM builds. Uses the opendap/centos6_hyrax_builder:latest docker container | ||
| # (or the CentOS7 or CentOS-Stream8 version). | ||
| # | ||
| # Modified to take an optional parameter that denotes the version of the C++ | ||
| # compiler to use. Since C6 lacks a C++-11 compiler, this can be used to suppress | ||
| # building some of the dependencies. jhrg 10/28/19 | ||
| # Removed that for C7 anc CS8. jhrg 2/8/22 | ||
| # | ||
| # Now used for the rocky8 build. No change from the centos-stream8. jhrg 5/7/24 | ||
|
|
||
| # -e: Exit immediately if a command, command in a pipeline, etc., fails | ||
| # -u: Treat unset variables in substitutions as errors (except for @ and *) | ||
| set -eu | ||
|
|
||
| HR="#########################################################################" | ||
| ########################################################################### | ||
| # loggy() | ||
| function loggy(){ | ||
| echo "$@" | awk '{ print "# rocky8 - "$0;}' >&2 | ||
| } | ||
| # This is not needed when the 'for-static-rpm' target is used below. That is | ||
| # a more robust way to build the static packages since some of them might not | ||
| # use configure, but cmake, e.g. jhrg 10/10/25 | ||
| # | ||
| # export CONFIGURE_FLAGS="--disable-shared" | ||
|
|
||
| # Need to have 64 bit rpc code! | ||
| export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/tirpc" | ||
| export LDFLAGS="${LDFLAGS:-""} -ltirpc" | ||
|
|
||
| # Why no libcurl already? No one knows... | ||
| export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/curl" | ||
| export LDFLAGS="${LDFLAGS:-""} -lcurl" | ||
|
|
||
| # Why no sqlite already? Installed from yum! No one knows... | ||
| #export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include" | ||
| #export LDFLAGS="${LDFLAGS:-""} -lsqlite" | ||
|
|
||
| loggy "$HR" | ||
| loggy "BEGIN $0" | ||
| loggy "Inside the docker container." | ||
| loggy " BUILD_NUMBER: $BUILD_NUMBER" | ||
| loggy " prefix: $prefix" | ||
| loggy " HOME: $HOME" | ||
| loggy " PATH: $PATH" | ||
| loggy " LDFLAGS: $LDFLAGS" | ||
| loggy " CPPFLAGS: $CPPFLAGS" | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "redhat-release: '$(cat /etc/redhat-release)'" | ||
| loggy " uname -a: '$(uname -a)'" | ||
| loggy " ldd --version: '$(ldd --version | head -1)'" | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "pkg-config --list-all:" | ||
| loggy "$(pkg-config --list-all)" | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "ENVIRONMENT:" | ||
| loggy "$(env)" | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "" | ||
| loggy "Running dnf update" | ||
| dnf -y update | ||
|
|
||
| # Assume that the docker container has been started with the cloned repo | ||
| # mounted so it appears within 'root.' | ||
| cd /root/hyrax-dependencies | ||
|
|
||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "Running: make for-static-rpm" | ||
| make -j16 for-static-rpm | ||
|
|
||
| make list-built | ||
|
|
||
| # Now clean out the binary images, which are huge for a static build. | ||
| # NB prefix = /root/install, set by the Docker run command | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "Cleanup..." | ||
| rm -f $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} | ||
| rm -rf $prefix/deps/proj-6/bin; | ||
|
|
||
| loggy "END - $0" | ||
| loggy "$HR" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| #!/bin/sh | ||
|
Contributor
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. Copied from previous build-for-rocky9.sh |
||
| # | ||
| # Build the hyrax-dependencies binary tar ball for use with libdap and BES | ||
| # RPM builds for RHEL9. Uses the docker container: | ||
| # opendap/rocky9_hyrax_builder:latest | ||
| # | ||
| # To build it, first we set up the directory into which we will put the results: | ||
| # | ||
| # install_dir=$HOME/rocky9/install | ||
| # mkdir -p "$install_dir" | ||
| # | ||
| # And then we use this script to build it by running the script in the docker container: | ||
| # | ||
| # docker run | ||
| # --env prefix=/root/install | ||
| # --volume $install_dir:/root/install | ||
| # --volume $TRAVIS_BUILD_DIR:/root/hyrax-dependencies | ||
| # opendap/rocky9_hyrax_builder:latest | ||
| # /root/hyrax-dependencies/build-for-rocky9.sh | ||
| # | ||
| # We collect the results like this: | ||
| # tar -C $HOME/rocky9/ -czvf $TRAVIS_BUILD_DIR/package/hyrax-dependencies-rocky9-static.tar.gz install | ||
| # | ||
|
|
||
| # -e: Exit immediately if a command, command in a pipeline, etc., fails | ||
| # -u: Treat unset variables in substitutions as errors (except for @ and *) | ||
| set -eu | ||
|
|
||
| # Formatted output shenanigans... | ||
| HR="#########################################################################" | ||
| ########################################################################### | ||
| # loggy() | ||
| function loggy(){ | ||
| echo "$@" | awk '{ print "# rocky9 - "$0;}' >&2 | ||
| } | ||
|
|
||
| # Need to have 64 bit rpc code! | ||
| export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/tirpc" | ||
| export LDFLAGS="${LDFLAGS:-""} -ltirpc" | ||
|
|
||
| # Why no libcurl already? No one knows... | ||
| export CPPFLAGS="${CPPFLAGS:-""} -I/usr/include/curl" | ||
| export LDFLAGS="${LDFLAGS:-""} -lcurl" | ||
|
|
||
| loggy "$HR" | ||
| loggy "BEGIN $0" | ||
| loggy "Inside the docker container." | ||
| loggy " BUILD_NUMBER: $BUILD_NUMBER" | ||
| loggy " prefix: $prefix" | ||
| loggy " HOME: $HOME" | ||
| loggy " PATH: $PATH" | ||
| loggy " LDFLAGS: $LDFLAGS" | ||
| loggy " CPPFLAGS: $CPPFLAGS" | ||
| loggy "redhat-release: \"$(cat /etc/redhat-release)\"" | ||
| loggy " Environment:" | ||
| loggy "$(env)" | ||
| loggy "uname -a: $(uname -a)" | ||
| loggy "- - - - - - - - - - - - - - - - - - - - -" | ||
| loggy "Running dnf update" | ||
| dnf -y update | ||
|
|
||
| # Build only the static libraries so that when these are used during the BES | ||
| # RPM build we have packages that others can install. jhrg 2/8/22 | ||
| # | ||
| # Assume that the docker container has been started with the cloned repo | ||
| # mounted so it appears within '/root', cd into that spot to run the build... | ||
| cd /root/hyrax-dependencies | ||
|
|
||
| loggy "Running: make for-static-rpm" | ||
| make -j16 for-static-rpm | ||
| make list-built | ||
|
|
||
|
|
||
| # Now clean out the binary images, which are huge for a static build. | ||
| # NB prefix = /root/install, set by the Docker run command | ||
| loggy "Cleanup..." | ||
| rm -vf $prefix/deps/bin/{gdal_*,gdal[a-z]*,ogr*,gnm*,nearblack,testepsg} | ||
| rm -vrf $prefix/deps/proj-6/bin | ||
|
|
||
| loggy "END - $0" | ||
|
|
||
|
|
||
|
|
||
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.
Wellll this all showed up oddly in gitthub formatting, but if you squint you can see that I kept the original two build jobs; renamed them, their ARTIFACT env var, and their build scripts to "*-static"; and then added duplicate non-static jobs (with associated non-static scripts).