Accepting request 829918 from Base:System

- Set libexecdir at build time for wrapper (boo#1175813)
- Do the same in mandb.service

OBS-URL: https://build.opensuse.org/request/show/829918
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/man?expand=0&rev=82
This commit is contained in:
Dominique Leuenberger 2020-08-27 12:42:01 +00:00 committed by Git OBS Bridge
commit 2c0d3f8f1d
4 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 27 07:38:06 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Set libexecdir at build time for wrapper (boo#1175813)
- Do the same in mandb.service
-------------------------------------------------------------------
Mon Jun 15 07:49:33 UTC 2020 - Dr. Werner Fink <werner@suse.de>

View File

@ -185,7 +185,7 @@ printer (using groff).
done
patch --backup --suffix=.s10 ${FUZZ+"--fuzz=$FUZZ"} -p0 < %{SOURCE10}
gcc $CFLAGS -I gl/lib/ -I include/ --include config.h -D LOCALEDIR="\"%{_datarootdir}/locale\"" \
-o wrapper %{SOURCE5} -L gl/lib/.libs/ -lgnu
-D LIBEXECDIR="\"%{_libexecdir}\"" -o wrapper %{SOURCE5} -L gl/lib/.libs/ -lgnu
%check
if ! make check; then
@ -263,6 +263,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%if 0%{?suse_version} >= 1500
install -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/
install -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/
sed -ri 's|@@LIBEXECDIR@@|%{_libexecdir}|' %{buildroot}%{_unitdir}/mandb.service
%endif
%endif

View File

@ -9,4 +9,4 @@ Group=man
Type=oneshot
Nice=5
IOSchedulingClass=idle
ExecStart=/usr/lib/man-db/do_mandb
ExecStart=@@LIBEXECDIR@@/man-db/do_mandb

View File

@ -44,6 +44,9 @@
#include "manconfig.h"
#ifndef LIBEXECDIR
# define LIBEXECDIR "/usr/lib"
#endif
/* this list is used to authenticate the program running.
* it is fixed at compile time to avoid a full class of
@ -59,8 +62,8 @@ static struct {
{ "_man", "src/man", "man" },
{ "_mandb", "src/mandb", "man" },
#endif
{ "man", "/usr/lib/man-db/man", "man" },
{ "mandb", "/usr/lib/man-db/mandb", "man" },
{ "man", LIBEXECDIR "/man-db/man", "man" },
{ "mandb", LIBEXECDIR "/man-db/mandb", "man" },
{ 0, 0, 0, }};
char *program_name;