Brian,

Done the changes requested in the Test Plan.

** Description changed:

  [Impact]
  
  When working with ubuntu core or ubuntu core desktop, neither
  */etc/default/locale* nor */etc/default/keyboard* are modifiable, so
  it's not possible to set the global keyboard or the global language.
  This is required to allow to set the GDM language, and the default one
  during installation.
  
  The first half of the solution is to create the folder
  */etc/writable/default*, and make soft-links from */etc/default/locale*
  to */etc/writable/default/locale* and from */etc/default/keyboard* to
  */etc/writable/default/keyboard*, just like it is already being done
  with */etc/hostname*, */etc/issue*, */etc/localtime*, */etc/motd* and ,
  */etc/timezone*.
  
  This solution, unfortunately, isn't complete. Although any application
  that just reads the files will work, not all of the applications that
  write to them will; specifically the systemd utilities that set the
  contents for those files, because they don't open the file directly;
  instead, they create first the new file in the same folder than the old
  one, fill its contents, and only then delete the old one and rename the
  new one. To solve this, systemd in Ubuntu already has several patches
  that detect if a file is a soft-link, in which case it replaces the old
  path with the destination one.
  
  Currently I have in place a patch for Ubuntu Core Desktop that
  implements both changes for both */etc/default/locale* and
  */etc/default/keyboard*.
  
  [Test plan]
  
  Using *sudo localectl set-lang LANG="xx_YY.UTF-8"* in an Ubuntu Core or
  Ubuntu Core Desktop admin terminal must change the locale to the
  specified one, which can be checked by reading the */etc/default/locale*
  file. Also, *localectl* must return the new locale.
  
+ Using *sudo dbus-send --system --print-reply
+ --dest=org.freedesktop.locale1 /org/freedesktop/locale1
+ org.freedesktop.locale1.SetX11Keyboard string:XX string:pc10Y string:
+ string: boolean:true boolean:false" must change the
+ */etc/default/keyboard* file to layout XX and model PC10Y (being Y
+ either 1, 2, 4 or 5). Reading the file allows to check it. Also,
+ *localectl status* must return the layout and model values in "X11
+ Layout" and "X11 Model" entries.
+ 
  [Where problems could occur]
  
  In general, applications just read the content of the file and use the
  DBus interface to set the locale, so only those applications that modify
  by themselves the */etc/default/keyboard* and/or */etc/default/locale*
  would present a problem, in which case they would require specific
  patches. Anyway, those applications neither would work with the current
  state (with those files in a read-only filesystem).
  
  [Other info]
  
  For Noble, this will be addressed when we merge systemd v255 from
  Debian. This is only needed on core, so we don't need to fix for Mantic
  or Lunar.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2035122

Title:
  Under ubuntu core/core-desktop, /etc/default/locale is not modifiable

Status in systemd package in Ubuntu:
  New
Status in systemd source package in Jammy:
  Fix Committed
Status in systemd source package in Lunar:
  Won't Fix
Status in systemd source package in Mantic:
  Won't Fix

Bug description:
  [Impact]

  When working with ubuntu core or ubuntu core desktop, neither
  */etc/default/locale* nor */etc/default/keyboard* are modifiable, so
  it's not possible to set the global keyboard or the global language.
  This is required to allow to set the GDM language, and the default one
  during installation.

  The first half of the solution is to create the folder
  */etc/writable/default*, and make soft-links from
  */etc/default/locale* to */etc/writable/default/locale* and from
  */etc/default/keyboard* to */etc/writable/default/keyboard*, just like
  it is already being done with */etc/hostname*, */etc/issue*,
  */etc/localtime*, */etc/motd* and , */etc/timezone*.

  This solution, unfortunately, isn't complete. Although any application
  that just reads the files will work, not all of the applications that
  write to them will; specifically the systemd utilities that set the
  contents for those files, because they don't open the file directly;
  instead, they create first the new file in the same folder than the
  old one, fill its contents, and only then delete the old one and
  rename the new one. To solve this, systemd in Ubuntu already has
  several patches that detect if a file is a soft-link, in which case it
  replaces the old path with the destination one.

  Currently I have in place a patch for Ubuntu Core Desktop that
  implements both changes for both */etc/default/locale* and
  */etc/default/keyboard*.

  [Test plan]

  Using *sudo localectl set-lang LANG="xx_YY.UTF-8"* in an Ubuntu Core
  or Ubuntu Core Desktop admin terminal must change the locale to the
  specified one, which can be checked by reading the
  */etc/default/locale* file. Also, *localectl* must return the new
  locale.

  Using *sudo dbus-send --system --print-reply
  --dest=org.freedesktop.locale1 /org/freedesktop/locale1
  org.freedesktop.locale1.SetX11Keyboard string:XX string:pc10Y string:
  string: boolean:true boolean:false" must change the
  */etc/default/keyboard* file to layout XX and model PC10Y (being Y
  either 1, 2, 4 or 5). Reading the file allows to check it. Also,
  *localectl status* must return the layout and model values in "X11
  Layout" and "X11 Model" entries.

  [Where problems could occur]

  In general, applications just read the content of the file and use the
  DBus interface to set the locale, so only those applications that
  modify by themselves the */etc/default/keyboard* and/or
  */etc/default/locale* would present a problem, in which case they
  would require specific patches. Anyway, those applications neither
  would work with the current state (with those files in a read-only
  filesystem).

  [Other info]

  For Noble, this will be addressed when we merge systemd v255 from
  Debian. This is only needed on core, so we don't need to fix for
  Mantic or Lunar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2035122/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to