SHA256
1
0
forked from pool/man

Accepting request 1146144 from Base:System

- Move creation of /var/cache/man into %pre scriplet (boo#1219370)

OBS-URL: https://build.opensuse.org/request/show/1146144
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/man?expand=0&rev=100
This commit is contained in:
Ana Guerrero 2024-02-15 19:59:42 +00:00 committed by Git OBS Bridge
commit cd6338a2fb
2 changed files with 17 additions and 15 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 12 09:32:21 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Move creation of /var/cache/man into %pre scriplet (boo#1219370)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 8 10:48:51 UTC 2024 - Dr. Werner Fink <werner@suse.de> Thu Feb 8 10:48:51 UTC 2024 - Dr. Werner Fink <werner@suse.de>

View File

@ -81,9 +81,8 @@ Requires: glibc-locale-base
Suggests: glibc-locale Suggests: glibc-locale
Requires: groff >= 1.18 Requires: groff >= 1.18
Requires: less Requires: less
# FIXME: use proper Requires(pre/post/preun/...) Requires(post): %fillup_prereq
PreReq: coreutils Requires(pre): coreutils
PreReq: fillup
Requires(pre): group(man) Requires(pre): group(man)
Requires(pre): user(man) Requires(pre): user(man)
Provides: man_db Provides: man_db
@ -354,9 +353,16 @@ then
esac esac
done done
fi fi
# Simply for systemdless containers # With fallback for systemdless containers
getent group man > /dev/null || groupadd -r man %{?tmpfiles_create:%tmpfiles_create %{_prefix}/lib/tmpfiles.d/man-db.conf}
getent passwd man > /dev/null || useradd -r -g man -d %{_localstatedir}/cache/man -s /sbin/nologin -c "Manual pages viewer" man if test ! -d %{_localstatedir}/cache/man
then
# Simply for systemdless containers
umask 022
rm -f %{_localstatedir}/cache/man
mkdir -p %{_localstatedir}/cache/man
chown -R man:man %{_localstatedir}/cache/man
fi
%post %post
%{fillup_only -an cron} %{fillup_only -an cron}
@ -386,15 +392,6 @@ getent passwd man > /dev/null || useradd -r -g man -d %{_localstatedir}/cache/ma
%endif %endif
%posttrans %posttrans
%{?tmpfiles_create:%tmpfiles_create %{_prefix}/lib/tmpfiles.d/man-db.conf}
if test ! -d %{_localstatedir}/cache/man
then
# Simply for systemdless containers
umask 022
rm -f %{_localstatedir}/cache/man
mkdir -p %{_localstatedir}/cache/man
chown -R man:man %{_localstatedir}/cache/man
fi
if test ! -s %{_localstatedir}/cache/man/index.db if test ! -s %{_localstatedir}/cache/man/index.db
then then
mandb --quiet --create || : mandb --quiet --create || :