Skip to content
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

Refactoring replicated build scripts? #27

Open
jfpanisset opened this issue Feb 17, 2020 · 0 comments
Open

Refactoring replicated build scripts? #27

jfpanisset opened this issue Feb 17, 2020 · 0 comments

Comments

@jfpanisset
Copy link
Contributor

For some tools like ccache and cmake, it looks like there are two different installs involved (and I'm probably getting details wrong, just started looking into this):

  • a global install in /opt/aswfbuilder which (I think) is used to build the infrastructure for building the ASWF containers, and which uses hard coded versions
  • a per-container install in /usr/local which is versioned based on the reference platform year

There are separate but very similar scripts for these two steps:

  • scripts/common/install_dev_cmake.sh : /opt/aswfbuilder with hard coded version
  • scripts/base/install_cmake.sh: /usr/local with per year version
  • scripts/common/install_dev_cache.sh: /opt/aswfbuilder with hard coded version
  • scripts/common/install_ccache.sh: /usr/local with per year version

I would make the following suggestions:

  • add/move definitions such as ARG CMAKE_VERSION=3.12.4 and ARG CCACHE_VERSION=3.7.4 to packages/Dockerfile instead of hard coding those in the scripts, assuming those get overridden once you are inside the package specific containers by the definitions in scripts/20xx/versions_base.sh
  • merge the cmake and ccache scripts into a single one which gets an additional command line parameter to specify the desired behavior of installing in /opt/aswfbuilder vs /usr/local

Of course it is possible that there are additional reasons for needing to keep these scripts split up, I've only given this a brief look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant