Skip to content

only tar up software directories for which modules were generated#239

Merged
boegel merged 5 commits intoEESSI:mainfrom
trz42:change_create_tarball
Apr 11, 2023
Merged

only tar up software directories for which modules were generated#239
boegel merged 5 commits intoEESSI:mainfrom
trz42:change_create_tarball

Conversation

@trz42
Copy link
Copy Markdown
Collaborator

@trz42 trz42 commented Mar 17, 2023

This lets create_tarball.sh only include software directories for which module files have been created.

It implements the first option in #225 (comment)

It has been tested interactively (resuming from a previous build job) and also in a bot job (NorESSI#57).

fixes #225

@eessi-bot
Copy link
Copy Markdown

eessi-bot Bot commented Mar 17, 2023

Instance bot-aws-PR155 is configured to build:

  • arch aarch64/graviton2 for repo EESSI-pilot
  • arch x86_64/generic for repo eessi-2021.12

Comment thread create_tarball.sh Outdated
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list}
# module files and symlinks
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules/all -type f -o -type l \
| grep -v '/\.wh\.' | sed -e 's/.lua$//' | awk -F'/' '{printf "%s/%s\n", $(NF-1), $NF}' | sort | uniq \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid hardcoding standard EasyBuild module naming scheme by using sed 's@.*/modules/all/@@g'

use sort -u instead of sort | uniq

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed via 4d13227

Comment thread create_tarball.sh
# installation directories but only those for which module files were created
for package_version in $(cat ${module_files_list}); do
echo "handling ${package_version}"
ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/${package_version} \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment here that the assumption here is that the module name and name of software installation directory match.
That will be the case as long as we use the standard EasyBuild module naming scheme, but will not be the case if we ever switch to another module naming scheme (like HierarchicalMNS)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment via 4d13227

Copy link
Copy Markdown
Contributor

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 9caf2d8 into EESSI:main Apr 11, 2023
@trz42 trz42 deleted the change_create_tarball branch April 18, 2023 06:51
trz42 pushed a commit to trz42/software-layer that referenced this pull request Jan 21, 2024
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

Successfully merging this pull request may close these issues.

Prevent .pyc files from being added to tarballs

3 participants