From 7024729c081fa46d494e2849d296c9efbf42b57e1ccce9d36b81e62525c143df Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 16 Jan 2020 12:04:41 +0000 Subject: [PATCH] Ownership of ls-R OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=117 --- texlive-filesystem.changes | 6 ++++++ texlive-filesystem.spec | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index b9b9f8c..f6ef3c6 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 16 12:02:43 UTC 2020 - Dr. Werner Fink + +- Be sure that owner of ls-R files are corrected even on update + of already existing texlive filesystem + ------------------------------------------------------------------- Fri Jan 10 12:35:50 UTC 2020 - Dr. Werner Fink diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index ea70507..f97d06f 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -48,6 +48,7 @@ Requires(post): %fillup_prereq Requires(post): permissions Requires(post): /usr/bin/mktemp Requires(post): /usr/bin/mv +Requires(pre): /usr/bin/stat Requires(pre): /usr/bin/perl Requires(pre): /usr/bin/clear Requires(pre): /usr/bin/dialog @@ -15387,6 +15388,19 @@ popd %pre %{_bindir}/getent group %{texgrp} > /dev/null 2>&1 || %{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp} +# the ls-R file on update +error=0 +for dir in %{_texmfconfdir} \ + %{_fontcache} \ + %{_texmfvardir} \ + %{_texmfvardir}/dist \ + %{_texmfvardir}/main +do + test -e ${dir}/ls-R || continue + test "$(stat --format '%U:%G' ${dir}/ls-R)" != %{nobody}:%{texgrp} || continue + chown %{nobody}:%{texgrp} ${dir}/ls-R || error=1 +done +test $error = 0 || exit 1 %post %fillup_only -n texlive