pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56092: libreoffice hard-codes a /usr/bin/xdg-open ref



>Number:         56092
>Category:       pkg
>Synopsis:       libreoffice hard-codes a /usr/bin/xdg-open ref
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 02 21:50:00 +0000 2021
>Originator:     Michael L. Riechers
>Release:        NetBSD 9.0_STABLE libreoffice-6.4.4.2
>Organization:
Kind Regards, I am

 /s/ Michael L. Riechers

Michael L. Riechers,
Owner,					M L Riechers Systems Engineering
513/844-2220 (voice)			530 Main Street
513/205-5589 (cell)			Hamilton, Ohio 45013
mlr%rse.com@localhost  (internet)
www.rse.com  (WEB)

Systems Programming: The three most adverse malignancies in life are:
  1)signed numbers,  2)floating point numbers, and  3)little endians.

"Defend the Spirit of the Enlightenment."  Macron, 2017
>Environment:
	
	
System: NetBSD rterm.rse.com 9.0_STABLE NetBSD 9.0_STABLE (HOUSE-202006271630Z.9.0) #0: Sat Jul 4 16:51:05 EDT 2020 root%cterm.rse.com@localhost:/usr/local/src/usr/usr.202006271630Z.9.0/src/sys/arch/amd64/compile/obj/HOUSE-202006271630Z.9.0 amd64
Architecture: x86_64
Machine: amd64
>Description:
	
libreoffice hard-codes a /usr/bin/xdg-open (which doesn't exist) ref
instead of simply xdg-open in:

misc/libreoffice/work/libreoffice-6.4.4.2/shell/source/unix/exec/shellexec.cxx
and
misc/libreoffice/work/libreoffice-6.4.4.2/shell/source/unix/misc/senddoc.sh
>How-To-Repeat:
	
so, when these functions are called, hell breaks loose.
>Fix:
	

at: https://bugs.documentfoundation.org/show_bug.cgi?id=108591

patch at:
https://bug-attachments.documentfoundation.org/attachment.cgi?id=134083

diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
         if (std::getenv("LIBO_FLATPAK") != nullptr) {
             aBuffer.append("/app/bin/xdg-open");
         } else {
-            aBuffer.append("/usr/bin/xdg-open");
+            aBuffer.append("xdg-open");
         }
 #endif
         aBuffer.append(" ");
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
index 4519e01f26e2..8985711a2c01 100755
--- a/shell/source/unix/misc/senddoc.sh
+++ b/shell/source/unix/misc/senddoc.sh
@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
             MAILER=/usr/bin/kde-open
         elif [ -x /usr/bin/xdg-open ] ; then
             MAILER=/usr/bin/xdg-open
+        elif type -p xdg-open >/dev/null 2>&1 ; then
+            MAILER="$(type -p xdg-open)"
         else
             echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
             exit 2

>Unformatted:
 	
 	
 libreoffice-6.4.4.2


Home | Main Index | Thread Index | Old Index