Hello community,

here is the log from the commit of package lilypond for openSUSE:Factory 
checked in at 2018-05-16 11:42:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lilypond (Old)
 and      /work/SRC/openSUSE:Factory/.lilypond.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lilypond"

Wed May 16 11:42:02 2018 rev:22 rq:607525 version:2.18.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/lilypond/lilypond-doc.changes    2017-03-12 
20:02:55.746848888 +0100
+++ /work/SRC/openSUSE:Factory/.lilypond.new/lilypond-doc.changes       
2018-05-16 11:43:51.451354898 +0200
@@ -1,0 +2,14 @@
+Tue May 15 09:57:35 UTC 2018 - davejpla...@gmail.com
+
+- Fix boo#1093056 CVE-2018-10992 with Debian patch.
+  use_system_correctly.patch.
+- Added 0101-read_relocation_dir-in-lilypond_datadir-too.patch  
+  hurd_file_name_support.patch 
+  Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff
+  add_dircategories_to_documentation.patch     
+  Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff
+  add_set-global-fonts_function.patch                    
+  Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff and
+  use_cstring_and_ctype_includes.patch from Debian.
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/lilypond/lilypond.changes        2017-06-07 
09:55:25.226708228 +0200
+++ /work/SRC/openSUSE:Factory/.lilypond.new/lilypond.changes   2018-05-16 
11:43:51.547351404 +0200
@@ -1,0 +2,14 @@
+Tue May 15 09:50:17 UTC 2018 - davejpla...@gmail.com
+
+- Fix boo#1093056 CVE-2018-10992 with Debian patch 
+  use_system_correctly.patch.
+- Added 0101-read_relocation_dir-in-lilypond_datadir-too.patch
+  hurd_file_name_support.patch
+  Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff
+  add_dircategories_to_documentation.patch
+  Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff
+  add_set-global-fonts_function.patch
+  Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff and
+  use_cstring_and_ctype_includes.patch from Debian.
+
+-------------------------------------------------------------------

New:
----
  0101-read_relocation_dir-in-lilypond_datadir-too.patch
  Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff
  Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff
  Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff
  add_dircategories_to_documentation.patch
  add_set-global-fonts_function.patch
  hurd_file_name_support.patch
  use_cstring_and_ctype_includes.patch
  use_system_correctly.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lilypond-doc.spec ++++++
--- /var/tmp/diff_new_pack.ZSx3DN/_old  2018-05-16 11:43:52.767306997 +0200
+++ /var/tmp/diff_new_pack.ZSx3DN/_new  2018-05-16 11:43:52.767306997 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lilypond-doc
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,16 @@
 Group:          Documentation/HTML
 Url:            http://lilypond.org/
 Source0:        
http://download.linuxaudio.org/lilypond/sources/v%{ver}/lilypond-%{version}.tar.gz
+# Patches taken from Debian, see headers for info.
+Patch2:         0101-read_relocation_dir-in-lilypond_datadir-too.patch
+Patch3:         add_dircategories_to_documentation.patch
+Patch4:         add_set-global-fonts_function.patch
+Patch5:         hurd_file_name_support.patch
+Patch6:         Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff
+Patch7:         Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff
+Patch8:         Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff
+Patch9:         use_cstring_and_ctype_includes.patch
+Patch10:        use_system_correctly.patch
 BuildRequires:  ImageMagick-extra
 BuildRequires:  autoconf
 BuildRequires:  autotrace
@@ -67,8 +77,7 @@
 BuildRequires:  xorg-x11-fonts
 BuildRequires:  zip
 Requires:       lilypond = %{version}
-# FIXME: use proper Requires(pre/post/preun/...)
-PreReq:         %{install_info_prereq} %{_bindir}/touch %{_bindir}/sed
+Requires(pre):   %{install_info_prereq} %{_bindir}/touch %{_bindir}/sed
 Provides:       lilypond-documentation = %{version}
 Obsoletes:      lilypond-documentation < %{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -169,6 +178,16 @@
 %if 0%{?suse_version} > 1320
 %patch0
 %endif
+%patch2
+%patch3
+%patch4
+%patch5
+%patch6
+%patch7
+%patch8
+%patch9
+%patch10
+
 # Convert translations to UTF-8
 for file in $(grep -L charset=UTF-8 po/*.po) ; do
     msgconv -t UTF-8 $file >$file.new

++++++ lilypond.spec ++++++
--- /var/tmp/diff_new_pack.ZSx3DN/_old  2018-05-16 11:43:52.791306124 +0200
+++ /var/tmp/diff_new_pack.ZSx3DN/_new  2018-05-16 11:43:52.795305977 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lilypond
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,16 @@
 Patch0:         reproducible.patch
 # PATCH-FIX-UPSTREAM j.mairbo...@gmail.com -- 
https://sourceforge.net/p/testlilyissues/issues/4814/
 Patch1:         Avoid-segfault-in-grob.cc-with-gcc-6.patch
+# Patches taken from Debian, see headers for info.
+Patch2:         0101-read_relocation_dir-in-lilypond_datadir-too.patch
+Patch3:         add_dircategories_to_documentation.patch
+Patch4:         add_set-global-fonts_function.patch
+Patch5:         hurd_file_name_support.patch
+Patch6:         Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff
+Patch7:         Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff
+Patch8:         Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff
+Patch9:         use_cstring_and_ctype_includes.patch
+Patch10:        use_system_correctly.patch
 BuildRequires:  ImageMagick
 BuildRequires:  autotrace
 BuildRequires:  bison
@@ -117,7 +127,16 @@
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+%patch1 -p0
+%patch2
+%patch3
+%patch4
+%patch5
+%patch6
+%patch7
+%patch8
+%patch9
+%patch10
 
 %build
 %configure --without-kpathsea \

++++++ 0101-read_relocation_dir-in-lilypond_datadir-too.patch ++++++
Description: Read relocation dir under lilypond_datadir too
 This allows loading /usr/share/lilypond/2.18.2/etc/relocate/guile.reloc
 to set our own private GUILE_LOAD_PATH at startup.
Author: Anthony Fok <f...@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/746005
Forwarded: not-needed
Last-Update: 2017-01-24
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: lily/relocate.cc
===================================================================
--- lily/relocate.cc.orig       2014-03-17 17:29:16.000000000 +0200
+++ lily/relocate.cc    2018-05-15 10:43:59.399752162 +0200
@@ -146,8 +146,10 @@ framework_relocation (const string &pref
   debug_output (_f ("Relocation: framework_prefix=%s", prefix));
 
   sane_putenv ("INSTALLER_PREFIX", prefix, true);
+  sane_putenv ("LILYPOND_DATADIR", lilypond_datadir, true);
 
   read_relocation_dir (prefix + "/etc/relocate/");
+  read_relocation_dir (lilypond_datadir + "/etc/relocate/");
 
   string bindir = prefix + "/bin";
 
++++++ Avoid-segfault-in-grob.cc-with-gcc-6.patch ++++++
--- /var/tmp/diff_new_pack.ZSx3DN/_old  2018-05-16 11:43:52.835304522 +0200
+++ /var/tmp/diff_new_pack.ZSx3DN/_new  2018-05-16 11:43:52.835304522 +0200
@@ -12,11 +12,11 @@
  lily/grob.cc | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
-diff --git a/lily/grob.cc b/lily/grob.cc
-index 7ce89d5..eafa662 100644
---- a/lily/grob.cc
-+++ b/lily/grob.cc
-@@ -333,7 +333,7 @@ Real
+Index: lily/grob.cc
+===================================================================
+--- lily/grob.cc.orig  2014-03-17 17:29:16.000000000 +0200
++++ lily/grob.cc       2018-05-15 10:08:44.673032220 +0200
+@@ -330,7 +330,7 @@ Real
  Grob::relative_coordinate (Grob const *refp, Axis a) const
  {
    /* eaa - hmmm, should we do a programming_error() here? */
@@ -25,7 +25,7 @@
      return 0.0;
  
    /* We catch PARENT_L_ == nil case with this, but we crash if we did
-@@ -342,7 +342,8 @@ Grob::relative_coordinate (Grob const *refp, Axis a) const
+@@ -339,7 +339,8 @@ Grob::relative_coordinate (Grob const *r
    if (refp == dim_cache_[a].parent_)
      return off;
  
@@ -35,6 +35,3 @@
  
    return off;
  }
--- 
-2.7.4
-

++++++ Issue-5243-1-editor-scm-Add-shell-quote-argument-function.diff ++++++
From: David Kastrup <d...@gnu.org>
Date: Tue, 28 Nov 2017 11:18:07 +0000 (+0100)
Subject: Issue 5243/1: (editor scm): Add shell-quote-argument function
X-Git-Url: 
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commitdiff_plain;h=807f5eb8cd631133da3be6897e3e8fa7202e089d

Issue 5243/1: (editor scm): Add shell-quote-argument function

This is mostly stolen from Emacs.
---

Index: scm/editor.scm
===================================================================
--- scm/editor.scm.orig 2014-03-17 17:29:16.000000000 +0200
+++ scm/editor.scm      2018-05-15 10:48:31.408441118 +0200
@@ -40,6 +40,100 @@
         (else
          "emacs"))))
 
+;; A bunch of stuff stolen from Emacs
+
+(define (w32-using-nt)
+  "Return non-nil if running on a Windows NT descendant.
+That includes all Windows systems except for 9X/Me."
+  (getenv "SystemRoot"))
+
+(define (w32-shell-name)
+  "Return the name of the shell being used."
+  (or (getenv "SHELL")
+      (and (w32-using-nt) "cmd.exe")
+      "command.com"))
+
+(define w32-system-shells '("cmd" "cmd.exe" "command" "command.com"
+                            "4nt" "4nt.exe" "4dos" "4dos.exe"
+                            "tcc" "tcc.exe" "ndos" "ndos.exe"))
+
+(define (w32-system-shell-p shell-name)
+  (and shell-name
+       (member (string-downcase
+                (basename shell-name))
+              w32-system-shells)))
+
+(define (w32-shell-dos-semantics)
+  "Return non-nil if the interactive shell being used expects MS-DOS shell 
semantics."
+  (or (w32-system-shell-p (w32-shell-name))
+      (and (member (string-downcase (basename (w32-shell-name)))
+                  '("cmdproxy" "cmdproxy.exe"))
+          (w32-system-shell-p (getenv "COMSPEC")))))
+
+(define-public (shell-quote-argument argument)
+  "Quote ARGUMENT for passing as argument to an inferior shell.
+
+This function is designed to work with the syntax of your system's
+standard shell, and might produce incorrect results with unusual shells.
+See Info node `(elisp)Security Considerations'."
+  (cond
+   ((and (eq? PLATFORM 'windows) (w32-shell-dos-semantics))
+
+    ;; First, quote argument so that CommandLineToArgvW will
+    ;; understand it.  See
+    ;; http://msdn.microsoft.com/en-us/library/17w5ykft%28v=vs.85%29.aspx
+    ;; After we perform that level of quoting, escape shell
+    ;; metacharacters so that cmd won't mangle our argument.  If the
+    ;; argument contains no double quote characters, we can just
+    ;; surround it with double quotes.  Otherwise, we need to prefix
+    ;; each shell metacharacter with a caret.
+
+    (set! argument
+          ;; escape backslashes at end of string
+          (regexp-substitute/global
+           #f
+           "(\\\\+)$"
+           ;; escape backslashes and quotes in string body
+           (regexp-substitute/global
+            #f
+            "(\\\\*)\""
+            argument
+            'pre 1 1 "\\\"" 'post)
+           'pre 1 1 'post))
+
+    (if (string-match "[%!\"]" argument)
+        (string-append
+         "^\""
+         (regexp-substitute/global
+          #f
+          "[%!()\"<>&|^]"
+          argument
+          'pre "^" 0 'post)
+         "^\"")
+        (string-append "\"" argument "\"")))
+
+   (else
+    (if (string-null? argument)
+        "''"
+        ;; Quote everything except POSIX filename characters.
+        ;; This should be safe enough even for really weird shells.
+        (regexp-substitute/global
+         #f
+         "\n"
+         (regexp-substitute/global
+          #f
+;;;       "[^-0-9a-zA-Z_./\n]" Negative ranges are too dangerous since
+;;;       their UTF-8 implications aren't clear: we don't want
+;;;       characters outside the ASCII range quoted since it is not
+;;;       clear whether we need to quote bytes or characters.  So we just
+;;;       invert the above regexp pattern for Posix characters manually.
+          "[\x01-\x09\x0b-,:-@[-^{-\x7f]"
+          argument
+          'pre "\\" 0 'post)
+         'pre  "'\n'" 'post)))
+   ))
+
+
 (define editor-command-template-alist
   '(("emacs" .  "emacsclient --no-wait +%(line)s:%(column)s %(file)s || (emacs 
+%(line)s:%(column)s %(file)s&)")
     ("gvim" . "gvim --remote +:%(line)s:norm%(column)s %(file)s")
++++++ Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff ++++++
From: David Kastrup <d...@gnu.org>
Date: Tue, 28 Nov 2017 11:19:02 +0000 (+0100)
Subject: Issue 5243/2: Let get-editor use shell-quote-argument
X-Git-Url: 
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commitdiff_plain;h=39f800a7e5acb7cc5da6424c99fd2690e389495a

Issue 5243/2: Let get-editor use shell-quote-argument

Addresses security concerns.
---

Index: scm/editor.scm
===================================================================
--- scm/editor.scm.orig 2018-05-15 10:48:31.408441118 +0200
+++ scm/editor.scm      2018-05-15 10:49:06.949571451 +0200
@@ -169,7 +169,7 @@ See Info node `(elisp)Security Considera
   (let* ((editor (get-editor))
          (template (get-command-template editor-command-template-alist editor))
          (command
-          (re-sub "%\\(file\\)s" (format #f "~S" file-name)
+          (re-sub "%\\(file\\)s" (shell-quote-argument file-name)
                   (re-sub "%\\(line\\)s" (format #f "~a" line)
                           (re-sub "%\\(char\\)s" (format #f "~a" char)
                                   (re-sub
++++++ Issue-5243-3-More-conservative-parsing-of-textedit-URIs.diff ++++++
From: David Kastrup <d...@gnu.org>
Date: Tue, 28 Nov 2017 11:19:30 +0000 (+0100)
Subject: Issue 5243/3: More conservative parsing of textedit URIs
X-Git-Url: 
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commitdiff_plain;h=aee02594be68a968bb843f87d3264777099e46b4

Issue 5243/3: More conservative parsing of textedit URIs
---

Index: scripts/lilypond-invoke-editor.scm
===================================================================
--- scripts/lilypond-invoke-editor.scm.orig     2014-03-17 17:29:16.000000000 
+0200
+++ scripts/lilypond-invoke-editor.scm  2018-05-15 10:49:41.446667535 +0200
@@ -93,7 +93,7 @@ Options:
   
   
 (define (dissect-uri uri)
-  (let* ((match (string-match "textedit://(.*):([^:]+):([^:]+):(.*)$" uri)))
+  (let* ((match (string-match "textedit://(.*):([0-9]+):([0-9]+):([0-9]*)$" 
uri)))
     (if match
        (list (unquote-uri (match:substring match 1))
              (match:substring match 2)
++++++ add_dircategories_to_documentation.patch ++++++
++++ 738 lines (skipped)

++++++ add_set-global-fonts_function.patch ++++++
Description: Add set-global-fonts function to scm/font.scm
 Allow changing of notation fonts
 .
 This commit changes the behaviour of make-pango-font-tree in the
 following ways:
 .
 - Make all arguments optional key/value pairs
   keeping the current default values (emmentaler/Century Schoolbook)
 - Allow changing of music fonts too.
 .
 Currently alternative music fonts have to be present in the font
 directory besides Emmentaler fonts, and they have to be manually installed.
 But now there are a number of alternative and compatible fonts available.
 .
 See also:
 - https://sites.google.com/site/tisimst/lilypond-fonts/docs
 - http://lilypondblog.org/2015/03/managing-alternative-fonts-with-lilypond/
Author: Abraham Lee <tisimst.lilyp...@gmail.com>
Date:   Sat Aug 2 18:17:01 2014 +0200
Origin: upstream
Applied-Upstream: 2.19.12, 
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=a7b6efba453f6bec916d3908cd83bcb825b2a1a8
Reviewed-by: Urs Liska <u...@openlilylib.org>
Reviewed-by: Anthony Fok <f...@debian.org>
Last-Update: 2017-01-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: scm/font.scm
===================================================================
--- scm/font.scm.orig   2014-03-17 17:29:16.000000000 +0200
+++ scm/font.scm        2018-05-15 10:46:23.504364017 +0200
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2004--2012 Han-Wen Nienhuys <han...@xs4all.nl>
+;;;; Copyright (C) 2004--2014 Han-Wen Nienhuys <han...@xs4all.nl>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -147,7 +147,7 @@
 
 ;; Each size family is a vector of fonts, loaded with a delay.  The
 ;; vector should be sorted according to ascending design size.
-(define-public (add-music-fonts node name family design-size-alist factor)
+(define-public (add-music-fonts node family name brace design-size-alist 
factor)
   "Set up music fonts.
 
 Arguments:
@@ -156,12 +156,15 @@ Arguments:
 @var{node} is the font tree to modify.
 
 @item
+@var{family} is the family name of the music font.
+
+@item
 @var{name} is the basename for the music font.
 @file{@var{name}-<designsize>.otf} should be the music font,
-@file{@var{name}-brace.otf} should have piano braces.
 
 @item
-@var{family} is the family name of the music font.
+@var{brace} is the basename for the brace font.
+@file{@var{brace}-brace.otf} should have piano braces.
 
 @item
 @var{design-size-alist} is a list of @code{(rounded . designsize)}.
@@ -199,7 +202,7 @@ used.  This is used to select the proper
                        )))
      (fetaBraces ,(ly:pt 20.0)
                  #(,(delay (ly:system-font-load
-                            (format #f "~a-brace" name)))))
+                            (format #f "~a-brace" brace)))))
      )))
 
 (define-public (add-pango-fonts node lily-family family factor)
@@ -229,9 +232,40 @@ used.  This is used to select the proper
   (add-node 'italic 'normal)
   (add-node 'italic 'bold))
 
+; This function allows the user to change the specific fonts, leaving others
+; to the default values. This way, "make-pango-font-tree"'s syntax doesn't
+; have to change from the user's perspective.
+;
+; Usage:
+;   \paper {
+;     #(define fonts
+;       (set-global-fonts
+;        #:music "gonville"  ; (the main notation font)
+;        #:roman "FreeSerif" ; (the main/serif text font)
+;       ))
+;   }
+;
+; Leaving out "#:brace", "#:sans", and "#:typewriter" leave them at
+; "emmentaler", "sans-serif", and "monospace", respectively. All fonts are
+; still accesible through the usual scheme symbols: 'feta, 'roman, 'sans, and
+; 'typewriter.
+(define*-public (set-global-fonts #:key
+  (music "emmentaler")
+  (brace "emmentaler")
+  (roman "Century Schoolbook L")
+  (sans "sans-serif")
+  (typewriter "monospace")
+  (factor 1))
+  (let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
+    (add-music-fonts n 'feta music brace feta-design-size-mapping factor)
+    (add-pango-fonts n 'roman roman factor)
+    (add-pango-fonts n 'sans sans factor)
+    (add-pango-fonts n 'typewriter typewriter factor)
+    n))
+
 (define-public (make-pango-font-tree roman-str sans-str typewrite-str factor)
   (let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
-    (add-music-fonts n "emmentaler" 'feta feta-design-size-mapping factor)
+    (add-music-fonts n 'feta "emmentaler" "emmentaler" 
feta-design-size-mapping factor)
     (add-pango-fonts n 'roman roman-str factor)
     (add-pango-fonts n 'sans sans-str factor)
     (add-pango-fonts n 'typewriter typewrite-str factor)
@@ -240,7 +274,9 @@ used.  This is used to select the proper
 (define-public (make-century-schoolbook-tree factor)
   (make-pango-font-tree
    "Century Schoolbook L"
-   "sans-serif" "monospace" factor))
+   "sans-serif"
+   "monospace"
+   factor))
 
 (define-public all-text-font-encodings
   '(latin1))
++++++ hurd_file_name_support.patch ++++++
Description: Hurd build without PATH_MAX; currently broken
Forwarded: http://lists.gnu.org/archive/html/bug-lilypond/2017-01/msg00023.html
Origin: vendor, 
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=761036;filename=hurd_file_name_support;msg=5
Bug-Debian: https://bugs.debian.org/761036
Author: Don Armstrong <d...@debian.org>
Author: Petter Reinholdtsen <p...@hungry.com>
Reviewed-by: Dr. Tobias Quathamer <to...@debian.org>
Reviewed-by: Anthony Fok <f...@debian.org>
Last-Update: 2017-01-27
Index: flower/file-name.cc
===================================================================
--- flower/file-name.cc.orig    2014-03-17 17:29:16.000000000 +0200
+++ flower/file-name.cc 2018-05-15 10:47:37.694730726 +0200
@@ -96,9 +96,16 @@ dir_name (const string &file_name)
 string
 get_working_directory ()
 {
+#ifdef _GNU_SOURCE
+  char *cwd = get_current_dir_name();
+  string scwd(cwd);
+  free(cwd);
+  return scwd;
+#else
   char cwd[PATH_MAX];
   // getcwd returns NULL upon a failure, contents of cwd would be undefined!
   return string (getcwd (cwd, PATH_MAX));
+#endif
 }
 
 /* Join components to full file_name. */
Index: flower/test-file-path.cc
===================================================================
--- flower/test-file-path.cc.orig       2014-03-17 17:29:16.000000000 +0200
+++ flower/test-file-path.cc    2018-05-15 10:47:37.694730726 +0200
@@ -6,12 +6,26 @@
 #include "yaffut.hh"
 #include "config.hh"
 
+string
+get_working_directory ()
+{
+#ifdef _GNU_SOURCE
+  char *cwd = get_current_dir_name();
+  string scwd(cwd);
+  free(cwd);
+  return scwd;
+#else
+  char cwd[PATH_MAX];
+  // getcwd returns NULL upon a failure, contents of cwd would be undefined!
+  return string (getcwd (cwd, PATH_MAX));
+#endif
+}
+
 TEST (File_path, Find)
 {
   char const *extensions[] = {"ly", "", 0};
   string file = "init";
-  char cwd[PATH_MAX];
-  if (!getcwd (cwd, PATH_MAX))
+  if (get_working_directory().empty())
     {
       cerr << "Could not get current work directory\n";
       exit (1);
++++++ use_cstring_and_ctype_includes.patch ++++++
Description: Include missing cstring include files
Forwarded: 
Origin: vendor
Author: Don Armstrong <d...@debian.org>
Index: lily/midi-stream.cc
===================================================================
--- lily/midi-stream.cc.orig    2014-03-17 17:29:16.000000000 +0200
+++ lily/midi-stream.cc 2018-05-15 10:50:35.852394146 +0200
@@ -18,7 +18,7 @@
 */
 
 #include "midi-stream.hh"
-
+#include <cstring>
 #include <cerrno>
 using namespace std;
 
Index: lily/piano-pedal-engraver.cc
===================================================================
--- lily/piano-pedal-engraver.cc.orig   2014-03-17 17:29:16.000000000 +0200
+++ lily/piano-pedal-engraver.cc        2018-05-15 10:50:35.852394146 +0200
@@ -38,6 +38,7 @@
 #include "item.hh"
 
 #include "translator.icc"
+#include <cstring>
 
 #include <string.h>
 
Index: lily/prob.cc
===================================================================
--- lily/prob.cc.orig   2014-03-17 17:29:16.000000000 +0200
+++ lily/prob.cc        2018-05-15 10:50:35.852394146 +0200
@@ -22,7 +22,7 @@
 #include "item.hh"
 #include "input.hh"
 #include "profile.hh"
-
+#include <cstring>
 #include "ly-smobs.icc"
 
 IMPLEMENT_SMOBS (Prob);
Index: lily/relocate.cc
===================================================================
--- lily/relocate.cc.orig       2018-05-15 10:43:59.399752162 +0200
+++ lily/relocate.cc    2018-05-15 10:50:35.852394146 +0200
@@ -23,8 +23,10 @@
 
 /* TODO: autoconf support */
 
+#include <ctype.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <cstring>
 
 #if HAVE_GETTEXT
 #include <libintl.h>
Index: lily/source-file.cc
===================================================================
--- lily/source-file.cc.orig    2014-03-17 17:29:16.000000000 +0200
+++ lily/source-file.cc 2018-05-15 10:50:35.852394146 +0200
@@ -24,7 +24,7 @@
 #endif /* GCC_MAJOR < 4 */
 
 #include "source-file.hh"
-
+#include <cstring>
 #include "config.hh"
 
 #include <cstdio>
Index: lily/translator.cc
===================================================================
--- lily/translator.cc.orig     2014-03-17 17:29:16.000000000 +0200
+++ lily/translator.cc  2018-05-15 10:50:35.852394146 +0200
@@ -18,7 +18,7 @@
 */
 
 #include "translator.hh"
-
+#include <cstring>
 #include "context-def.hh"
 #include "dispatcher.hh"
 #include "global-context.hh"
++++++ use_system_correctly.patch ++++++
Subject: Use system* instead of system when invoking browser
Author: Don Armstrong <d...@debian.org>
Bug-Debian: https://bugs.debian.org/884136
Bug: https://sourceforge.net/p/testlilyissues/issues/5243
Index: scripts/lilypond-invoke-editor.scm
===================================================================
--- scripts/lilypond-invoke-editor.scm.orig     2018-05-15 10:49:41.446667535 
+0200
+++ scripts/lilypond-invoke-editor.scm  2018-05-15 10:51:33.710227632 +0200
@@ -127,11 +127,14 @@ Options:
          (exit 1)))))
 
 (define (run-browser uri)
-  (system
-   (if (getenv "BROWSER")
-       (format #f "~a ~a" (getenv "BROWSER") uri)
-       (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
-
+  (if (getenv "BROWSER")
+      (system*
+       (getenv "BROWSER")
+       uri)
+      (system*
+       "firefox"
+       "-remote"
+       (format #f "OpenUrl(~a,new-tab)" uri))))
 
 (define (strip-framework-path var)
   (define pat "lilypond/usr")

Reply via email to