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

docs: adding how to add language packs in autoinstall.yaml #815

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docs/oem-provisioning-24_04_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,44 @@ autoinstall:
EOF
touch meta-data
```
#### Adding additional Language packs

The default Ubuntu ISO only has the English language pack seeded. To have additional languages
seb128 marked this conversation as resolved.
Show resolved Hide resolved
available in Gnome Initial Setup, you will need to install additional language packs via the
`autoinstall.yaml`

To install additional language packs, you can make use of [late commands](https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html#late-commands) in the `autoinstall.yaml:
matthew-hagemann marked this conversation as resolved.
Show resolved Hide resolved

```yaml
#cloud-config
autoinstall:
version: 1
late-commands:
- |
curtin in-target --target=/target -- bash -c '
# Update package list
apt-get update

# Installing languages not in seed
# Add language codes of packs you with to install here
for lang in "fr" "de"; do
for pkg in $(check-language-support --show-installed -l "$lang"); do
# gimp: not installed by default
# fcitx5: not used by ubuntu as gnome is in use
# mozc-utils-gui: is in universe
if [ "${pkg%%-*}" = gimp ] || [ "${pkg%%-*}" = fcitx5 ] || [ "$pkg" = "mozc-utils-gui" ]; then
continue
fi
apt-get install -y "$pkg"
done
for pkg in $(check-language-support --show-installed -l "$lang" -p "ibus,gnome-user-docs,gvfs"); do
matthew-hagemann marked this conversation as resolved.
Show resolved Hide resolved
apt-get install -y "$pkg"
done
for pkg in $(check-language-support --show-installed -l "$lang" -p "libreoffice-common"); do
matthew-hagemann marked this conversation as resolved.
Show resolved Hide resolved
apt-get install -y "$pkg"
done
done'
```
#### Serve the cloud-init configuration over HTTP

Change into the directory where the cloud-init configuration was created and start a server:
Expand Down Expand Up @@ -187,6 +224,45 @@ EOF
touch meta-data
```

#### Adding additional Language packs

The default Ubuntu ISO only has the English language pack seeded. To have additional languages
available in Gnome Initial Setup, you will need to install additional language packs via the
`autoinstall.yaml`

To install additional language packs, you can make use of [late commands](https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html#late-commands) in the `autoinstall.yaml:
matthew-hagemann marked this conversation as resolved.
Show resolved Hide resolved

```yaml
#cloud-config
autoinstall:
version: 1
late-commands:
- |
curtin in-target --target=/target -- bash -c '
# Update package list
apt-get update

# Installing languages not in seed
# Add language codes of packs you with to install here
for lang in "fr" "de"; do
for pkg in $(check-language-support --show-installed -l "$lang"); do
# gimp: not installed by default
# fcitx5: not used by ubuntu as gnome is in use
# mozc-utils-gui: is in universe
if [ "${pkg%%-*}" = gimp ] || [ "${pkg%%-*}" = fcitx5 ] || [ "$pkg" = "mozc-utils-gui" ]; then
continue
fi
apt-get install -y "$pkg"
done
for pkg in $(check-language-support --show-installed -l "$lang" -p "ibus,gnome-user-docs,gvfs"); do
apt-get install -y "$pkg"
done
for pkg in $(check-language-support --show-installed -l "$lang" -p "libreoffice-common"); do
apt-get install -y "$pkg"
done
done'
```

#### Create an ISO to use as a cloud-init data source

Install utilities for working with cloud images:
Expand Down
Loading