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:
commit
cd6338a2fb
@ -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>
|
||||||
|
|
||||||
|
25
man.spec
25
man.spec
@ -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
|
||||||
|
# With fallback for systemdless containers
|
||||||
|
%{?tmpfiles_create:%tmpfiles_create %{_prefix}/lib/tmpfiles.d/man-db.conf}
|
||||||
|
if test ! -d %{_localstatedir}/cache/man
|
||||||
|
then
|
||||||
# Simply for systemdless containers
|
# Simply for systemdless containers
|
||||||
getent group man > /dev/null || groupadd -r man
|
umask 022
|
||||||
getent passwd man > /dev/null || useradd -r -g man -d %{_localstatedir}/cache/man -s /sbin/nologin -c "Manual pages viewer" man
|
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 || :
|
||||||
|
Loading…
Reference in New Issue
Block a user