]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: make locale directory writable for systemd-localed
authorChristian Hesse <mail@eworm.de>
Sun, 28 Mar 2021 11:00:49 +0000 (13:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Mar 2021 10:33:36 +0000 (12:33 +0200)
With 8f20232fcb52dbe6255f3df6101fc057af90bcfa systemd-localed supports
generating locales when required. This fails if the locale directory is
read-only, so make it writable.

Closes #19138

meson.build
units/systemd-localed.service.in

index f41a811e2e1d249c2e4f1289683a207ef61253a4..6a474afdac33a284350f96f48bb7526e4bb49d9b 100644 (file)
@@ -857,10 +857,13 @@ conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
 
 localegen_path = get_option('localegen-path')
 have = false
+writable = ''
 if localegen_path != ''
         conf.set_quoted('LOCALEGEN_PATH', localegen_path)
         have = true
+        writable = ' /usr/lib/locale'
 endif
+substs.set('SERVICE_LOCALEGEN_WRITABLE', writable)
 conf.set10('HAVE_LOCALEGEN', have)
 
 conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
index 652b956a34095647a5c1b7a206bb9b40c7fe98a9..e60a1735911186b840b9f46e87cb8590c76e950f 100644 (file)
@@ -33,7 +33,7 @@ ProtectKernelLogs=yes
 ProtectKernelModules=yes
 ProtectKernelTunables=yes
 ProtectSystem=strict
-ReadWritePaths=/etc
+ReadWritePaths=/etc@SERVICE_LOCALEGEN_WRITABLE@
 RestrictAddressFamilies=AF_UNIX
 RestrictNamespaces=yes
 RestrictRealtime=yes