-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'EESSI:main' into autobuild_bootstrap_container
- Loading branch information
Showing
6 changed files
with
103 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
ansible/playbooks/roles/compatibility_layer/tasks/install_packages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
ansible/playbooks/roles/compatibility_layer/tasks/set_glibc_trusted_dirs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Make sure that glibc is always compiled with a user-defined-trusted-dirs option | ||
--- | ||
- name: Find all strings in libc library | ||
command: "strings {{ gentoo_prefix_path }}/usr/lib64/libc.a" | ||
register: libc_strings | ||
when: eessi_host_os == "linux" | ||
|
||
- name: Find user defined trusted dirs in libc strings output | ||
set_fact: match='{{ libc_strings.stdout | regex_search("\n" + item + "/?\n") | default('', True) | string | length>0 }}' | ||
with_items: "{{ prefix_user_defined_trusted_dirs }}" | ||
register: trusted_dirs_in_libc | ||
|
||
- name: (Re)install glibc with the user-defined-trusted-dirs option | ||
portage: | ||
package: sys-libs/glibc | ||
noreplace: no | ||
oneshot: yes | ||
become: no | ||
environment: | ||
EXTRA_EMAKE: "user-defined-trusted-dirs={{ prefix_user_defined_trusted_dirs | join(':') }}" | ||
when: | ||
- eessi_host_os == "linux" | ||
- trusted_dirs_in_libc.results | selectattr('ansible_facts.match', 'equalto', False) | list | length>0 | ||
|
||
- name: Create portage env directory | ||
file: | ||
path: "{{ gentoo_prefix_path }}/etc/portage/env" | ||
state: directory | ||
mode: 0755 | ||
|
||
- name: Add env file for glibc to make sure the user-defined-trusted-dirs is always used | ||
copy: | ||
dest: "{{ gentoo_prefix_path }}/etc/portage/env/glibc-user-defined-trusted-dirs.conf" | ||
mode: 0644 | ||
content: | | ||
EXTRA_EMAKE="user-defined-trusted-dirs={{ prefix_user_defined_trusted_dirs | join(':') }}" | ||
- name: Add glibc env file to package.env | ||
lineinfile: | ||
path: "{{ gentoo_prefix_path }}/etc/portage/package.env" | ||
create: yes | ||
mode: 0644 | ||
line: sys-libs/glibc glibc-user-defined-trusted-dirs.conf | ||
state: present | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters