Skip to content

Commit

Permalink
units: make locale directory writable for systemd-localed
Browse files Browse the repository at this point in the history
With 8f20232 systemd-localed supports
generating locales when required. This fails if the locale directory is
read-only, so make it writable.

Closes systemd#19138
  • Loading branch information
eworm-de authored and keszybz committed Mar 29, 2021
1 parent 945317a commit 46cfe8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion units/systemd-localed.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46cfe8f

Please sign in to comment.