From 0656553dfaa6b5c5eec1ac36dcb58a0e65af167e723ca818596edb5f28112604 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 27 Aug 2020 07:39:03 +0000 Subject: [PATCH 1/2] boo#1175813 OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=116 --- man.changes | 5 +++++ man.spec | 2 +- wrapper.c | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/man.changes b/man.changes index 47e09ae..d8e0db6 100644 --- a/man.changes +++ b/man.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 27 07:38:06 UTC 2020 - Dr. Werner Fink + +- Set libexecdir at build time for wrapper (boo#1175813) + ------------------------------------------------------------------- Mon Jun 15 07:49:33 UTC 2020 - Dr. Werner Fink diff --git a/man.spec b/man.spec index 6f3e903..c743f5d 100644 --- a/man.spec +++ b/man.spec @@ -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 diff --git a/wrapper.c b/wrapper.c index a617ae4..1736265 100644 --- a/wrapper.c +++ b/wrapper.c @@ -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; From 5a5c3600ae92d84906ba1a33fda6ae6e6e5c7ff74691e297d1d97ab5922916b6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 27 Aug 2020 08:01:50 +0000 Subject: [PATCH 2/2] boo#1175813 -- also for mandb.service OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=117 --- man.changes | 1 + man.spec | 1 + mandb.service | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man.changes b/man.changes index d8e0db6..9892011 100644 --- a/man.changes +++ b/man.changes @@ -2,6 +2,7 @@ Thu Aug 27 07:38:06 UTC 2020 - Dr. Werner Fink - 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 diff --git a/man.spec b/man.spec index c743f5d..03c90af 100644 --- a/man.spec +++ b/man.spec @@ -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 diff --git a/mandb.service b/mandb.service index ab00eb2..a723b0f 100644 --- a/mandb.service +++ b/mandb.service @@ -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