Skip to content

Commit

Permalink
Merge pull request EESSI#46 from EESSI/fix_locales
Browse files Browse the repository at this point in the history
Generate locales for Prefix installation
  • Loading branch information
peterstol authored Sep 30, 2020
2 parents 24544ed + 1107939 commit e1a5041
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Once the bootstrap is completed, run the script to replace some paths with symli
scripts/prefix-symlink-host-paths.sh
```

In order to generate the right locales for your installation, see [this item](https://wiki.gentoo.org/wiki/Project:Prefix/FAQ#Add_an_en_US.UTF-8_locale)
of the Gentoo Prefix FAQ.

### Adding the EESSI overlay and packages
Additional packages are added in the EESSI overlay, which is based on ComputeCanada.
You can add them manually or in an automated way by using Ansible, being Ansible the preferred way. Below you can find the two options explained.
Expand Down
1 change: 1 addition & 0 deletions ansible/playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Before running the playbook, make sure the following settings are correct, and o
| Variable | Description |
| --- | --- |
| gentoo_prefix_path | Path to the root of your Gentoo Prefix installation |
|prefix_locales|List of locales to be generated|
| package_sets | List of package sets to be installed |
| prefix_packages | List of additional packages to be installed |
| python_targets | String consisting of [Gentoo Python targets](https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS) |
Expand Down
7 changes: 6 additions & 1 deletion ansible/playbooks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
- name: Install compatibility layer
hosts: cvmfsstratum0servers
environment:
PATH: "{{ gentoo_prefix_path }}/usr/bin:{{ gentoo_prefix_path }}/bin:{{ ansible_env.PATH }}"
PATH:
"{{ gentoo_prefix_path }}/usr/sbin\
:{{ gentoo_prefix_path }}/usr/bin\
:{{ gentoo_prefix_path }}/sbin\
:{{ gentoo_prefix_path }}/bin\
:{{ ansible_env.PATH }}"
EPREFIX: "{{ gentoo_prefix_path }}"
BPREFIX: "{{ gentoo_prefix_path }}"
LC_ALL: C
Expand Down
3 changes: 3 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ cvmfs_repository: pilot.eessi-hpc.org

gentoo_prefix_path: /cvmfs/pilot.eessi-hpc.org/2020.09/compat/x86_64

prefix_locales:
- en_US.UTF-8 UTF-8

package_sets:
- 2020.08

Expand Down
5 changes: 5 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Handlers for this role
---

- name: Generate locales
command: locale-gen
2 changes: 2 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
when: cvmfs_start_transaction

- block:
- include_tasks: prefix_configuration.yml

- include_tasks: create_host_symlinks.yml

- include_tasks: add_overlay.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# General configuration of the Prefix installation,
# for instance locale support.
---

- name: Add locales to configuration file
lineinfile:
path: "{{ gentoo_prefix_path }}/etc/locale.gen"
line: "{{ item }}"
state: present
with_items: "{{ prefix_locales }}"
notify: Generate locales

0 comments on commit e1a5041

Please sign in to comment.