NetBSD Problem Report #56092

From mlr@rterm.rse.com  Fri Apr  2 21:49:14 2021
Return-Path: <mlr@rterm.rse.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3826D1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  2 Apr 2021 21:49:14 +0000 (UTC)
Message-Id: <20210402214252.6CD7E11ADA5@rterm.rse.com>
Date: Fri,  2 Apr 2021 17:42:52 -0400 (EDT)
From: mlr@rse.com
Reply-To: mlr@rse.com
To: gnats-bugs@NetBSD.org
Subject: libreoffice hard-codes a /usr/bin/xdg-open ref
X-Send-Pr-Version: 3.95

>Number:         56092
>Category:       pkg
>Synopsis:       libreoffice hard-codes a /usr/bin/xdg-open ref
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 02 21:50:00 +0000 2021
>Closed-Date:    Sun Apr 18 07:18:30 +0000 2021
>Last-Modified:  Mon Apr 19 18:50:01 +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  (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:/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

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Sat, 03 Apr 2021 00:56:44 +0000
Responsible-Changed-Why:
I will take this.


From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Mon, 5 Apr 2021 10:17:21 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Mon Apr  5 10:17:21 UTC 2021

 Modified Files:
 	pkgsrc/misc/libreoffice: Makefile distinfo options.mk
 Added Files:
 	pkgsrc/misc/libreoffice/patches:
 	    patch-shell_source_unix_exec_shellexec.cxx
 	    patch-shell_source_unix_misc_senddoc.sh

 Log Message:
 libreoffice: Update to 7.1.2.2

 * Fix xdg-open path. PR pkg/56092
   https://bugs.documentfoundation.org/show_bug.cgi?id=108591
 * Enable gtk3 option by default.
   The scrollbar problem disappears. Reported by Chavdar Ivanov.
   And this fix performance problem in drawing UI.

 Changelog:
 7.1.2.2
 Bugs fixed compared to 7.1.2 rc1:

  1. tdf#114076 FILEOPEN: artifacts on Images ( white lines ) [Xisco Fauli]
  2. tdf#118693 FILEOPEN: Drawing has incorrect size [Xisco Fauli]
  3. tdf#127217 PDF export: LibreOffice 6.3 option buttons in forms not working
     in Adobe Reader (OK in other readers) [Julien Nabet]
  4. tdf#134607 LO7RC1 - LANGPACK macOS - many versions fail to recognize
     LibreOffice 7.0 / 7.1 installation as valid on Catalina and Big Sur
     [Christian Lohmaier]
  5. tdf#136929 FILESAVE DOCX: Large footer when image moved from text body into
     footer [Justin Luth]
  6. tdf#140136 When we click on the FILTERED dropdown + sign it CHECKS and
     UNCHECKS all along with expanding and contracting [Attila Sz?cs]
  7. tdf#140539 Crash when I open the help window [Caol??n McNamara]
  8. tdf#140917 skia/salbmp.cxx assertion on Windows with 150% text size [Lubo?
     Lu????k]
  9. tdf#141045 close the application with the execution of the BASIC code,
     function replace [Andreas Heinisch]
 10. tdf#141063 White lines during scrolling across bitmap images on macOS
     [Thorsten Wagner]
 11. tdf#141166 Crash in: mergedlo.dll: Press "Help" button in Hyperlink dialog
     [Caol??n McNamara]

 7.1.2.1
 Bugs fixed compared to 7.1.1 RC2

  1. rhbz#1931423 Updating gtk3 breaks formula editing in LibreOffice [Caol??n
     McNamara]
  2. tdf#105301 sort options not remembered thoroughly in saved document
     [Andreas Heinisch]
  3. tdf#116983 Paste is sometimes deactivated in (context) menu even though
     text is copied to clipboard and CTRL+V functioning (steps: Comment 0 and
     Comment 13 and Comment 28 and Comment 78) [Mike Kaganski]
  4. tdf#123202 EDITING Sorting of the filtered data is incorrect [T??nde T??th]
  5. tdf#124678 Writer: DOCX export from ODT: Header/Footer are wrong when first
     node is section [Vasily Melenchuk]
  6. tdf#127471 Copied calc diagram in gdi format looks ok under linux, but the
     fonts looks weird under windows. [Armin Le Grand (Allotropia)]
  7. tdf#132368 FILESAVE PPTX: text changes are reproducibly lost (SmartArt)
     [Miklos Vajna]
  8. tdf#133038 Some format toolbar icons are wrong for Catalan language [Rizal
     Muttaqin]
  9. tdf#133473 FILEOPEN: Shadow is gone [G??l?ah K?se]
 10. tdf#134210 FILEOPEN PPTX: Image shown with wider aspect ratio and different
     clipping - cropping not being applied [G??l?ah K?se]
 11. tdf#134940 --> does not replace automatically to ?? in AutoCorrect [L??szl
     ?? N??meth]
 12. tdf#136011 Number in multi-line chart categories are not exported if chart
     is copied from Calc to Writer [Ouyang Leyan]
 13. tdf#136175 Paste is sometimes deactivated in (context) menu even though
     text is copied to clipboard and CTRL+V functioning [Mike Kaganski]
 14. tdf#136570 FILEOPEN: OLE objects containing links to other documents are
     blurred [Attila Bakos (NISZ)]
 15. tdf#137122 Font rendering display error (skia) and some DejaVu fonts [Lubo?
     Lu????k]
 16. tdf#138122 (blurry_text) LibreOffice text blurry on Retina displays on
     macOS 11 [Thorsten Wagner]
 17. tdf#138314 Blank tab names in dialog frames, macOS 11 Big Sur [Thorsten
     Wagner]
 18. tdf#138598 FILEOPEN: DOCX: images in even page footer not displayed [Attila
     Bakos (NISZ)]
 19. tdf#139039 PDF export: Error message if filepath is URL coded / crash when
     saving as DOCX [Miklos Vajna]
 20. tdf#139070 LISTBOX: Values, which are in different rows, where not shown
     right separated in preview [Caol??n McNamara]
 21. tdf#139301 IMPORT XLSX Not showing styles for dashed lines [L??szl?? N??
     meth]
 22. tdf#139763 FILEOPEN XLSX Anchor type of rotated shape changes [Regina
     Henschel]
 23. tdf#139820 Hang: Undoing paste of block with empty cells [Lubo? Lu????k]
 24. tdf#139928 FILEOPEN XLSX Conditional formatting with multiple different
     operators incorrect [Tibor Nagy]
 25. tdf#139940 FILEOPEN DOCX: gradient has lost its colour [Justin Luth]
 26. tdf#140006 Drop down text is not full lenght of the column (see comment 4
     for a test file) [Caol??n McNamara]
 27. tdf#140137 FILEOPEN Cannot open .docx in writer - format openXML [Aron
     Budea]
 28. tdf#140158 EDITING Shape and textframe fall apart on inserting page break
     [Attila Bakos (NISZ)]
 29. tdf#140207 Qt's ImCursorRectangle is not correctly take device scale factor
     into account [Jan-Marek Glogowski]
 30. tdf#140257 No way to set Outline level simply [Caol??n McNamara]
 31. tdf#140288 Crash with zero-size window when running a macro [Lubo? Lu????k]
 32. tdf#140332 FIREBIRD - LibreOffice Vanilla fails to load tables or reports
     from an embedded Firebird ODB file [Tor Lillqvist]
 33. tdf#140387 Orca no longer reads many options on the sidebar in Linux [Caol
     ??n McNamara]
 34. tdf#140397 Navigator in master documents: button for Toggle Master view
     missing (all backends except GTK3) [Jim Raykowski]
 35. tdf#140498 Primary selection does not work in Calc input line [Caol??n
     McNamara]
 36. tdf#140528 Crash in: swlo.dll In "Save As" dialog in "Tools -Chapter
     Numbering", when switching from Numbering to Position tab [Noel Grandin]
 37. tdf#140537 Unnecessary scrolling in Math's Element pane, post weld [Caol??n
     McNamara]
 38. tdf#140552 FILESAVE RTF After saving DOCX to RTF, reload gives File format
     error [Miklos Vajna]
 39. tdf#140572 FILESAVE DOCX Crash when saving a file with superscript
     formatting [Justin Luth]
 40. tdf#140597 FILEOPEN: DOCX: missing borders in some cells [L??szl?? N??meth]
 41. tdf#140598 FILESAVE: PDF: Incorrect table position when using --convert-to
     pdf in commandline [Attila Bakos (NISZ)]
 42. tdf#140606 PDF: EXPORT: Crash in: mergedlo.dll [Toma? Vajngerl]
 43. tdf#140661 Objects not visible in navigator after ungrouping [Jim
     Raykowski]
 44. tdf#140668 CRASH: importing docx file [Daniel Arato (NISZ)]
 45. tdf#140674 EDITING Autocorrect no longer works with Change Tracking enabled
     [L??szl?? N??meth]
 46. tdf#140700 calc crash at exit in
     ScSelectionTransferObj::~ScSelectionTransferObj (steps in comment 18) [Mike
     Kaganski]
 47. tdf#140754 LibreOffice Calc crash when selecting filters (threaded) [Lubo?
     Lu????k]
 48. tdf#140797 Moving the top image (with images behind) is rather slow [Lubo?
     Lu????k]
 49. tdf#140833 Double click on column separator in Calc on Wayland moves window
     to background [Caol??n McNamara]
 50. tdf#140838 elementary: New Arrow Style for Undo and Redo [Rizal Muttaqin]


 To generate a diff of this commit:
 cvs rdiff -u -r1.254 -r1.255 pkgsrc/misc/libreoffice/Makefile
 cvs rdiff -u -r1.111 -r1.112 pkgsrc/misc/libreoffice/distinfo
 cvs rdiff -u -r1.17 -r1.18 pkgsrc/misc/libreoffice/options.mk
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/misc/libreoffice/patches/patch-shell_source_unix_exec_shellexec.cxx \
     pkgsrc/misc/libreoffice/patches/patch-shell_source_unix_misc_senddoc.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56092 (libreoffice hard-codes a /usr/bin/xdg-open ref)
Date: Tue, 06 Apr 2021 19:50:33 -0400

 Hello,

 I see two issues with the change set that was pushed. The first is
 simply that if the package expects xdg-open to be available, then it
 should explicitly depend on misc/xdg-utils, which provides it.

 The second is that one of the two patches may not work as expected.
 You have this:

 +--- shell/source/unix/misc/senddoc.sh.orig     2021-03-24 16:28:10.000000000 +0000
 ++++ shell/source/unix/misc/senddoc.sh
 +@@ -393,6 +393,8 @@ case $(basename "$MAILER" | sed 's/-.*$/
 +             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

 "type -p" will not work as expected with NetBSD's /bin/sh (and with
 certain other versions). Please see PR bin/54803 (where kre@ recommended
 using "command -v" instead).

 Regards,

 Dave


From: Ryo ONODERA <ryo@tetera.org>
To: gnats-bugs@netbsd.org, david@gutteridge.ca
Cc: 
Subject: Re: pkg/56092 (libreoffice hard-codes a /usr/bin/xdg-open ref)
Date: Thu, 08 Apr 2021 20:12:23 +0900

 Hi,

 Thanks for your suggestion.
 I will use command -v instead of type -p for misc/libreoffice.

 However I have no idea how to test this shell script
 from libreoffice program...

 "David H. Gutteridge" <david@gutteridge.ca> writes:

 > The following reply was made to PR pkg/56092; it has been noted by GNATS.
 >
 > From: "David H. Gutteridge" <david@gutteridge.ca>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/56092 (libreoffice hard-codes a /usr/bin/xdg-open ref)
 > Date: Tue, 06 Apr 2021 19:50:33 -0400
 >
 >  Hello,
 >  
 >  I see two issues with the change set that was pushed. The first is
 >  simply that if the package expects xdg-open to be available, then it
 >  should explicitly depend on misc/xdg-utils, which provides it.
 >  
 >  The second is that one of the two patches may not work as expected.
 >  You have this:
 >  
 >  +--- shell/source/unix/misc/senddoc.sh.orig     2021-03-24 16:28:10.000000000 +0000
 >  ++++ shell/source/unix/misc/senddoc.sh
 >  +@@ -393,6 +393,8 @@ case $(basename "$MAILER" | sed 's/-.*$/
 >  +             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
 >  
 >  "type -p" will not work as expected with NetBSD's /bin/sh (and with
 >  certain other versions). Please see PR bin/54803 (where kre@ recommended
 >  using "command -v" instead).
 >  
 >  Regards,
 >  
 >  Dave
 >  
 >  

 -- 
 Ryo ONODERA // ryo@tetera.org
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Sat, 10 Apr 2021 13:13:48 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Sat Apr 10 13:13:47 UTC 2021

 Modified Files:
 	pkgsrc/misc/libreoffice: Makefile distinfo
 	pkgsrc/misc/libreoffice/patches:
 	    patch-shell_source_unix_misc_senddoc.sh

 Log Message:
 libreoffice: Use portable 'command -v' instead of 'type -p' and fix segfault

 Pointed out in PR pkg/56092 by gutteridge@.

 And convert to use OpenSSL TLS backend.
 Recent devel/nss change, libsoftkn3.so uses MD5_Update()
 from OpenSSL and it causes SIGSEGV.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.256 -r1.257 pkgsrc/misc/libreoffice/Makefile
 cvs rdiff -u -r1.112 -r1.113 pkgsrc/misc/libreoffice/distinfo
 cvs rdiff -u -r1.1 -r1.2 \
     pkgsrc/misc/libreoffice/patches/patch-shell_source_unix_misc_senddoc.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Sun, 11 Apr 2021 04:29:59 +0000

 Module Name:	pkgsrc
 Committed By:	gutteridge
 Date:		Sun Apr 11 04:29:59 UTC 2021

 Modified Files:
 	pkgsrc/misc/libreoffice: Makefile

 Log Message:
 libreoffice: reflect xdg-utils dependency for xdg-open command

 Relates to PR pkg/56092. LibreOffice expects xdg-open to be installed.


 To generate a diff of this commit:
 cvs rdiff -u -r1.257 -r1.258 pkgsrc/misc/libreoffice/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: gutteridge@netbsd.org
Subject: Re: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Sat, 17 Apr 2021 07:26:56 +0000

 Are all the issues in the PR fixed?

 Thanks.

From: "David H. Gutteridge" <david@gutteridge.ca>
To: coypu@sdf.org, gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Sat, 17 Apr 2021 21:58:27 -0400

 On Sat, 2021-04-17 at 07:26 +0000, coypu@sdf.org wrote:
 > Are all the issues in the PR fixed?
 > 
 > Thanks.

 Hi Maya,

 As far as I understand, yes. I added some comments to the upstream bug
 report, and the current version of the patch set they have in their
 Gerrit review now uses "command -v". They also had some other points at
 their end, e.g., whether it was best to try to run "xdg-open" without
 an explicit path. If we were concerned about that, we could use the
 SUBST framework, but I leave that to ryoon@ as maintainer's decision.

 Cheers,

 Dave


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 18 Apr 2021 07:18:30 +0000
State-Changed-Why:
Seems to be fixed.


From: Mike Riechers <mlr@rse.com>
To: gnats-bugs@netbsd.org
Cc: Michael Riechers <mlr@rse.com>
Subject: Re: PR/56092 CVS commit: pkgsrc/misc/libreoffice
Date: Mon, 19 Apr 2021 13:24:46 -0400

 Fine by me, thank you, and thank you for your prompt attention.

 One question, though.  Could these changes be added to the package source
 2021 quarter 1 package, as well as to current?

 I'm dithering on whether to compile 2021 q1, or go whole hog to current.

 Yours,

 -Mike

 On Saturday 17 April 2021 10:00:04 pm David H. Gutteridge wrote:
 > The following reply was made to PR pkg/56092; it has been noted by GNATS.
 >
 > From: "David H. Gutteridge" <david@gutteridge.ca>
 > To: coypu@sdf.org, gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: PR/56092 CVS commit: pkgsrc/misc/libreoffice
 > Date: Sat, 17 Apr 2021 21:58:27 -0400
 >
 >  On Sat, 2021-04-17 at 07:26 +0000, coypu@sdf.org wrote:
 >  > Are all the issues in the PR fixed?
 >  >
 >  > Thanks.
 >
 >  Hi Maya,
 >
 >  As far as I understand, yes. I added some comments to the upstream bug
 >  report, and the current version of the patch set they have in their
 >  Gerrit review now uses "command -v". They also had some other points at
 >  their end, e.g., whether it was best to try to run "xdg-open" without
 >  an explicit path. If we were concerned about that, we could use the
 >  SUBST framework, but I leave that to ryoon@ as maintainer's decision.
 >
 >  Cheers,
 >
 >  Dave

 -- 
 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  (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

>Unformatted:


 libreoffice-6.4.4.2

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.