Skip to content

Commit

Permalink
Add custom ccr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aebruno committed Apr 25, 2024
1 parent c1b3b97 commit 828a3dc
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# use flags from desktop profile without qt5 and udev
USE="a52 aac acpi alsa bluetooth branding cairo cdda cdr cups dbus dri dts dvd dvdr elogind encode exif flac gif gpm gtk gui icu jpeg lcms libnotify mad mng mp3 mp4 mpeg ogg opengl pango pdf png policykit ppds sdl sndfile sound spell startup-notification svg tiff truetype vorbis udisks unicode upower usb vulkan wxwidgets X xcb xft x264 xml xv xvid"
# other global use flags needed
USE="${USE} emacs fontconfig sqlite x265 pgo lto xattr brotli zlib osmesa"
FEATURES="${FEATURES} -sfperms suidctl preserve-libs"
COMMON_FLAGS="-mcpu=neoverse-v1"
CFLAGS="${CFLAGS} ${COMMON_FLAGS}"
CXXFLAGS="${CXXFLAGS} ${COMMON_FLAGS}"
MAKEOPTS="-j72"
L10N="en en-US"
VIDEO_CARDS="virgl"
12 changes: 12 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/files/make-x86_64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# use flags from desktop profile without qt5 and udev
USE="a52 aac acpi alsa bluetooth branding cairo cdda cdr cups dbus dri dts dvd dvdr elogind encode exif flac gif gpm gtk gui icu jpeg lcms libnotify mad mng mp3 mp4 mpeg ogg opengl pango pdf png policykit ppds sdl sndfile sound spell startup-notification svg tiff truetype vorbis udisks unicode upower usb vulkan wxwidgets X xcb xft x264 xml xv xvid"
# other global use flags needed
USE="${USE} emacs fontconfig sqlite x265 pgo lto xattr brotli zlib osmesa"
FEATURES="${FEATURES} -sfperms suidctl preserve-libs"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"
COMMON_FLAGS="-march=x86-64-v3 -O2 -ftree-vectorize -fno-math-errno -pipe"
CFLAGS="${CFLAGS} ${COMMON_FLAGS}"
CXXFLAGS="${CXXFLAGS} ${COMMON_FLAGS}"
MAKEOPTS="-j64"
L10N="en en-US"
VIDEO_CARDS="virgl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Add a custom make.conf to the Gentoo Prefix installation.
---
- name: Create make.conf
ansible.builtin.copy:
src: "make-{{ eessi_host_arch }}.conf"
dest: "{{ gentoo_prefix_path }}/etc/portage/make.conf/0500_eessi_prefix_make.conf"
mode: '0644'
3 changes: 3 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
- name: Add EESSI overlay
ansible.builtin.include_tasks: add_overlay.yml

- name: Add EESSI make.conf
ansible.builtin.include_tasks: add_make_conf.yml

- name: Set the glibc trusted dirs
ansible.builtin.include_tasks: set_glibc_trusted_dirs.yml

Expand Down
124 changes: 124 additions & 0 deletions ccr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Defaults file for CCR compatibility layer role.
---
eessi_version: "2024.04"

custom_overlays:
- name: ubccr
source: git
url: https://github.com/ubccr/gentoo-overlay.git
eclass-overrides: true

cvmfs_repository: soft.ccr.buffalo.edu

gentoo_prefix_path: /cvmfs/{{ cvmfs_repository }}/versions/{{ eessi_version }}/compat/{{ eessi_host_os }}/{{ eessi_host_arch }}

# How to build the prefix.
gentoo_git_repo: https://github.com/gentoo/gentoo.git
# Select a specific commit in the gentoo_git_repo that should be used for the bootstrap,
# e.g. by checking: https://github.com/gentoo/gentoo/commits/master
gentoo_git_commit: 8bb6a94e71013100a6abc5de938709cf855a21c2
prefix_required_space: 15 GB
prefix_user_defined_trusted_dirs:
- "/cvmfs/{{ cvmfs_repository }}/host_injections/{{ eessi_version }}/lib"
prefix_mask_packages: |
>=sys-devel/gcc-12
prefix_unmask_packages: |
# unmask older GCC to make it installable
# =sys-devel/gcc-9*
prefix_bootstrap_use_flags: |
# make sure that gold linker is installed with binutils
#>=sys-devel/binutils-2.42-r1 gold
sys-devel/binutils gold
# don't build the SSSD daemon (and man pages) either
sys-auth/sssd -daemon -man
# only install Python 3.11
*/* PYTHON_TARGETS: -* python3_11
*/* PYTHON_SINGLE_TARGET: -* python3_11
prefix_use_builtin_bootstrap: true
prefix_custom_bootstrap_script:
local: "{{ playbook_dir }}/../../bootstrap-prefix.sh"
remote: /tmp/bootstrap-prefix.sh
prefix_source_options: "{{ gentoo_prefix_path }} noninteractive"
prefix_install: >-
{{ prefix_use_builtin_bootstrap | ternary('/usr/local/bin/bootstrap-prefix.sh', prefix_custom_bootstrap_script.remote) }}
{{ prefix_source_options }}
# Reproducibility settings
prefix_reprod_dir: reprod
prefix_packages_file: packages.txt
prefix_metadata_json: build.json

# Logging
eessi_log_dir: "/tmp/eessi-logs"
prefix_build_log: "{{ eessi_log_dir }}/prefix-build.log"
emerge_log: "{{ gentoo_prefix_path }}/var/log/emerge.log"

prefix_locales:
- en_US.UTF-8 UTF-8

# By default, we install an architecture-specific set
package_sets:
- "ubccr-2024.04-{{ eessi_host_os }}-{{ eessi_host_arch }}"

prefix_packages:

prefix_remove_packages:
- app-eselect/eselect-rust
- dev-lang/go
- dev-lang/go-bootstrap
- dev-lang/rust
- dev-lang/rust-bin
- dev-python/setuptools-rust
- dev-util/cmake
- dev-util/ninja
- virtual/rust

reframe_venv_dir: /tmp/reframe_venv

# List of locations that should get a symlink $EPREFIX/$LOCATION -> $LOCATION.
# This ensures that things like user/group ids are correct/looked up in the right way in the Prefix environment.
symlinks_to_host:
# required to ensure local user groups are known
- /etc/group

# required to ensure local users are known (see https://github.com/EESSI/compatibility-layer/issues/15)
- /etc/passwd

# required to ensure that hosts specified in the host's hosts file can be resolved by tools in the Prefix
- /etc/hosts

# required to ensure name-service information is taken from the right source (e.g. ldap)
#- /etc/nsswitch.conf

Check failure on line 91 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

# required to use the DNS resolver from the host (should be done automatically)
- /etc/resolv.conf

# required to pick up the right timezone from the host
- /etc/localtime

# required if LDAP is used in nsswitch.conf
#- /lib64/libnss_ldap.so.2

Check failure on line 100 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

# required if SSSD is used in nsswitch.conf
#- /lib64/libnss_sss.so.2

Check failure on line 103 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

# required to make runtime data available for lots of tools (including who and w)
#- /var/run

Check failure on line 106 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

# required by the last command
#- /var/log/wtmp

Check failure on line 109 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

# required by matlab
#- /lib64/libaudit.so.1

Check failure on line 112 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment
#- /lib64/libcap-ng.so.0

Check failure on line 113 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment
#- /lib64/libpam.so.0

Check failure on line 114 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment

#- /run/dbus

Check failure on line 116 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment
#- /var/tmp

Check failure on line 117 in ccr.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

yaml[comments]

Missing starting space in comment
#- /tmp

# - /var/lib/munge
# - /var/lib/unbound
# - /var/lib/VirtualGL
# - /var/log/munge
# - /var/spool
2 changes: 1 addition & 1 deletion install_compatibility_layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export SINGULARITY_HOME="${EESSI_TMPDIR}/home:/home/${USER}"
[[ ${VERBOSE} == '-vvv' ]] && echo "SINGULARITY_HOME='${SINGULARITY_HOME}'"

# Construct the Ansible playbook command
ANSIBLE_OPTIONS="-e eessi_host_os=linux -e eessi_host_arch=$(uname -m)"
ANSIBLE_OPTIONS="${ANSIBLE_OPTIONS} -e eessi_host_os=linux -e eessi_host_arch=$(uname -m)"
if [[ ! -z ${VERSION} ]]; then
ANSIBLE_OPTIONS="${ANSIBLE_OPTIONS} -e eessi_version=${VERSION}"
fi
Expand Down

0 comments on commit 828a3dc

Please sign in to comment.