[SRU] LibreOffice localization is not working out of the box

Bug #1970270 reported by Aaron Rainbolt
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calamares-settings-ubuntu (Ubuntu)
Fix Released
High
Unassigned
Impish
Won't Fix
Undecided
Unassigned
Jammy
Fix Released
High
Unassigned
Kinetic
Fix Released
High
Unassigned

Bug Description

[Impact]

 * Due to an error in our configuration, users who install Lubuntu in a
   language other than English end up with LibreOffice still displaying in
   English. The localization package for the user's language must be
   installed manually in order to make LibreOffice display properly.

 * This is because our Calamares configuration does not allow the
   installed system to access the Internet during the installation
   process, as the resolv.conf file of the installed system is left as a
   dangling symlink. While our configuration is designed to automatically
   download and install the proper localization files during installation,
   it fails to actually download those files due to this problem. This bug
   has been verified to affect both Lubuntu and Ubuntu Studio.

 * Additionally, the current configuration only installs the LibreOffice
   help files for the chosen language, pulling in the localization package
   as a dependency. This fails on languages such as Icelandic where the
   localization package exists but the help package doesn't.

 * This SRU resolves the issue by bind-mounting /run/systemd/resolve from
   the live environment to the installed system. This provides the
   installed system the required resolv.conf file, permitting it to access
   the Internet and install packages during the initial installation
   process. Additionally, the localization package is explicitly pulled
   in, ensuring that the localization package is installed regardless of
   whether or not the help package for the selected language exists.

[Test plan]

 * Create a VM using Lubuntu or Ubuntu Studio 22.04's ISO, and boot into
   the live environment.

 * Double-click the installation icon on the VM's desktop.

 * Select a language other than English to install in (I usually use
   German, but French and Icelandic will work too).

 * Continue with the rest of the installation in your selected language.
   This bug appears to occur whether you use the defaults or install in
   an advanced configuration.

 * When the installation is complete, allow the VM to reboot.

 * Once the VM has rebooted, launch any LibreOffice app (like LibreOffice
   writer). You will see the user interface is in English despite your
   language choice during the installation process.

 * Boot back into the live ISO of your chosen flavor, and install the
   calamares-settings-ubuntu-common package from this SRU into the live
   environment of the VM.

 * Install either the calamares-settings-lubuntu or
   calamares-settings-ubuntustudio package into the live environment of
   the VM, depending on which flavor you are testing.

 * Repeat the steps to reproduce the bug. This time, when you launch a
   LibreOffice app after installing the flavor, the user interface will
   appear in your desired language (if the proper localization package for
   LibreOffice exists).

[Where problems could occur]

 * A multilingual user may be annoyed to find that LibreOffice is
   displaying in their native language when they prefer for it to display
   in English. But having LibreOffice display in an
   understandable-but-non-ideal language is a lot better than having it
   display in an unintelligible language, and the user can change the
   language LibreOffice display language from within the office suite's
   options.

 * An error in the configuration files could potentially cause a breakage
   in the "mount" or "packages" module of Calamares, potentially resulting
   in installation failures or a system too damaged to use after
   installation. Due to the rather obvious nature of such bugs and the
   thorough test suite we intend to put the package through, such an error
   will be easy to notice.

-----

Original bug report:

Using Lubuntu 22.04 within a virtual machine made using virt-manager, KVM, and QEMU.

When Lubuntu 22.04 is installed in a language other than English, the LibreOffice UI displays in English, despite the user's language choice. The issue can be worked around by running "sudo apt update" followed by "sudo apt install libreoffice-l10n-<lang>", where <lang> is replaced with the 2-character language code (for example, de or fr). This will cause LibreOffice to display in the correct language.

I have tested using both German and French language options at install time - the problem exists in both scenarios.

Reproducibility: 100%

Steps to reproduce (edited to be more precise):

1: Open virt-manager.
2: Add a connection to "QEMU User session".
3: Create a new virtual machine under "QEMU User session". I set the OS as "Ubuntu 21.04", since that's the newest version of Ubuntu that my version of virt-manager supports. I gave the VM 20 GB of hard drive space, 4 GB of RAM, and 2 CPU cores. I didn't make any other customizations.
4: Once the VM is running, select "Try or install Lubuntu" in the GRUB prompt.
5: Once Lubuntu is done booting, double-click "Install Lubuntu 22.04".
6: At the first screen of the installation, select a language other than American English. I tried using German and French, and they both reproduced the issue.
7: Use the default keyboard settings for your chosen language.
8: Use the "Erase disk" option when choosing where to install Lubuntu.
9: Set your name as "User", your username as "user", your computer name as "user-germantest", and your password as "z". I also enabled automatic login here.
10: Wait for the installation to finish, then reboot.
11: Open LibreOffice Writer.

Expected result: The UI should be displayed in the language selected at install time.

Actual result: The UI displays in English, regardless of the language selected at install time.

Additional notes:

I am using LibreOffice version 7.3.2 within the VM. I am using fully-updated Ubuntu Studio 21.10 as the host OS.

Prior to running "sudo apt update", there are no LibreOffice localization packages available in apt (as verified by doing "apt-cache search l10n"). After the update, the packages appear.

I have not yet tested Ubuntu 22.04 for this problem, so I do not know if this applies to Ubuntu as a whole, or to Lubuntu alone. I do intend to test this in the near future.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Finally managed to download and test the Ubuntu 22.04 image, and Ubuntu 22.04 does **not** have this issue, so this isn't a problem with Ubuntu as a whole.

tags: added: lubuntu
description: updated
Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

A quick comparison of jammy manifests notices these (& more) in the Ubuntu but not Lubuntu's

libreoffice-l10n-de 1:7.3.2-0ubuntu2
libreoffice-l10n-en-gb 1:7.3.2-0ubuntu2
libreoffice-l10n-en-za 1:7.3.2-0ubuntu2
libreoffice-l10n-es 1:7.3.2-0ubuntu2
libreoffice-l10n-fr 1:7.3.2-0ubuntu2
libreoffice-l10n-it 1:7.3.2-0ubuntu2
libreoffice-l10n-pt 1:7.3.2-0ubuntu2
libreoffice-l10n-pt-br 1:7.3.2-0ubuntu2
libreoffice-l10n-ru 1:7.3.2-0ubuntu2
libreoffice-l10n-zh-cn 1:7.3.2-0ubuntu2
libreoffice-l10n-zh-tw 1:7.3.2-0ubuntu2

but I've not noted what in the seeds causes the difference (though likely relates to https://people.canonical.com/~ubuntu-archive/seeds/ubuntu.jammy/desktop-default-languages )

Changed in lubuntu-meta (Ubuntu):
importance: Undecided → High
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Looks like you found it. Ubuntu 22.04 desktop-default-languages points to a number of other seed files (or at least I think they're seed files) such as "desktop-de" and the like. In the Languages folder of https://people.canonical.com/~ubuntu-archive/seeds/ubuntu.jammy/languages/desktop-de, there's quite a bit of LibreOffice related stuff, including the l10n package.

On the other hand, doing a search for "l10n" in https://people.canonical.com/~ubuntu-archive/seeds/lubuntu.jammy/desktop only shows up qttranslations5-l10n. So if I'm understanding correctly, we're only providing localization for QT5 applications.

Even if we make the seeds install other common languages, any languages we don't include still won't work, so we may need a deeper fix than just adding some packages to the seeds. According to Bug #1520278, ubiquity on Ubuntu < 16.04 was able to install languages on demand, so I'm wondering if calamares provides any similar feature.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

I think I may have found the solution for this bug.

In calamares-settings-ubuntu/lubuntu/modules/packages.conf:

    update_db: true
    backend: apt
    operations:
      - remove:
          - "^live-*"
          - calamares-settings-lubuntu
          - calamares
          - hunspell-en-us
          - zram-config
          - cifs-utils
      - try_install:
          - language-pack-$LOCALE
          - hunspell-$LOCALE
          - libreoffice-help-$LOCALE

Can we simply add "- libreoffice-l10n-$LOCALE" to the end of the "try_install" section?

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

So, further debugging on this issue has revealed that the "try_install" section isn't installing anything within the newly installed system. I changed "try_install" to "install", which resulted in an installer crash. Further debugging revealed that it was likely due to apt-get's inability to find the requested packages.

I chroot'd into the installation and tried to run "apt-get update", which failed due to network problems. I copied resolv.conf from the live session into the installation, then chroot'd and tried apt-get update again, and while it was able to download the database updates, it gave me a lot of errors related to GPG and the inability to create /dev/null, so the database never updated.

I'm thinking this should probably be moved to being a calamares bug, since a core feature of the installer is failing entirely, and its resolution should also fix this bug.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Pinpointed the Calamares bug: https://github.com/calamares/calamares/issues/1942 Once this is fixed, the fix in comment #4 ought to resolve this bug.

I also discovered that my /dev/null errors in comment #5 were due to the fact that I didn't know what I was doing with chroots, so you can probably ignore that part of comment #5.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Alright, so it turns out that the problem was our Calamares configuration after all, despite the hours of testing and fiddling I did (with multiple distros!) that led me to believe that this was a Calamares bug...

Thankfully, Adriaan de Groot on GitHub was able to spot the actual problem and was gracious enough to point it out to me.

In /etc/calamares/modules/mount.conf, we are mounting tmpfs to the installed system's /run directory. Because the installed system's /run is a tmpfs mount, the needed network configuration file is missing, as /etc/resolv.conf is a symlink pointing to /run/systemd/resolve/stub-resolv.conf.

By changing the file to bind-mount the live environment's /run to the installed system's /run, the network configuration works and the packages listed in packages.conf try_install (including those for LibreOffice localization) are installed successfully. (OK, I didn't check the installed status of every package in the try_install section, but libreoffice-help-de and libreoffice-l10n-de appear to have installed properly on a German installation after tweaking packages.conf to include the l10n package.)

Is there any particular reason that we're mounting tmpfs to /run rather than bind-mounting? Or is a switch to bind-mounting /run an acceptable solution?

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Further testing has revealed that this bug (and the solution in comment #7) affect Ubuntu Studio 22.04 as well.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

If the problem (and solution) is in /etc/calamares/modules/mount.conf, then this is an improperly filed bug and needs to be filed against calamares-settings-ubuntu, don't you think? Not the metas.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

@eeickmeyer I even looked for that package, and couldn't find it at first! I see it now. Argh. Guess I'm getting used to Launchpad... I've added calamares-settings-ubuntu to the affected packages. Should I remove lubuntu-meta and ubuntustudio-meta from the list?

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Yes, they absolutely should be removed because they have absolutely no bearing on this.

no longer affects: ubuntustudio-meta (Ubuntu)
no longer affects: lubuntu-meta (Ubuntu)
Changed in calamares-settings-ubuntu (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: New → Confirmed
Changed in calamares-settings-ubuntu (Ubuntu Impish):
status: New → Won't Fix
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Marking impish as "Won't Fix" simply because of the amount of time left of support.

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
importance: Undecided → High
Changed in calamares-settings-ubuntu (Ubuntu Kinetic):
importance: High → Medium
importance: Medium → High
tags: added: calamares kinetic
removed: lubuntu
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Let's keep the lubuntu tag and add ubuntustudio since it affects us as well. Ubuntu Studio and Lubuntu use Calamares for an installer, all others use Ubiquity.

tags: added: lubuntu ubuntustudio
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote (last edit ):

OK, so, after further research and testing, I learned the following:

1: It is not necessary to bind-mount all of /run - just /run/systemd/resolve does the trick.
2: There's no need to add "libreoffice-l10n-$LOCALE" to the packages.conf file - one of the packages already there must depend on it, since my latest solution still ends up with the bug solved even without modifying packages.conf.

I am submitting a patch which solves this bug. The patch should be applied to /etc/calamares/modules/mount.conf. I have tested this and verified that it works on Lubuntu 22.04 Jammy.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Bind-mounts /run/systemd/resolve from the live environment to the installed system during installation, allowing packages to be installed at OS install time." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1970270

tags: added: iso-testing
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested daily Lubuntu Kinetic 19-06-2022 and bug still present.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package calamares-settings-ubuntu - 1:22.10.10

---------------
calamares-settings-ubuntu (1:22.10.10) kinetic; urgency=medium

  * Fixed LibreOffice localization bug (LP: #1970270).

 -- Aaron Rainbolt <email address hidden> Mon, 25 Jul 2022 23:47:11 -0500

Changed in calamares-settings-ubuntu (Ubuntu Kinetic):
status: Confirmed → Fix Released
Revision history for this message
Leó Kolbeinsson (leok) wrote :

Tested daily Lubuntu Kinetic 07-08-2022 and confirm bug no longer present in Kinetic Lubuntu -

Test results here : http://iso.qa.ubuntu.com/qatracker/milestones/433/builds/255484/testcases/1701/results/

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: Confirmed → In Progress
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

SRU patch

description: updated
summary: - LibreOffice localization is not working out of the box
+ [SRU] LibreOffice localization is not working out of the box
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Aaron, or anyone else affected,

Accepted calamares-settings-ubuntu into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/calamares-settings-ubuntu/1:22.04.4.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Tested both Lubuntu and Ubuntu Studio in Secure Boot enabled EFI virtual machines, with proposed updates enabled and the correct calamares-settings-[l]ubuntu[studio] package installed for each test. Installed package, then installed system, rebooted, logged in, launched all LibreOffice subapps (Writer, Calc, etc.), and ensured that they rendered in the correct language. Both tests passed.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package calamares-settings-ubuntu - 1:22.04.4.2

---------------
calamares-settings-ubuntu (1:22.04.4.2) jammy; urgency=medium

  * Fixed LibreOffice localization bug (LP: #1970270)

 -- Aaron Rainbolt <email address hidden> Fri, 05 Aug 2022 17:26:33 -0500

Changed in calamares-settings-ubuntu (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for calamares-settings-ubuntu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.