Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yelp for openSUSE:Factory checked in 
at 2022-03-28 17:00:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yelp (Old)
 and      /work/SRC/openSUSE:Factory/.yelp.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yelp"

Mon Mar 28 17:00:10 2022 rev:120 rq:964820 version:42.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yelp/yelp.changes        2022-03-23 
20:18:17.886460035 +0100
+++ /work/SRC/openSUSE:Factory/.yelp.new.1900/yelp.changes      2022-03-28 
17:00:51.460993543 +0200
@@ -1,0 +2,6 @@
+Fri Mar 25 09:08:26 UTC 2022 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Add yelp-ghelp.patch: Be even more careful about stripping
+  slashes. Fix applications still using ghelp: URIs.
+
+-------------------------------------------------------------------

New:
----
  yelp-ghelp.patch

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

Other differences:
------------------
++++++ yelp.spec ++++++
--- /var/tmp/diff_new_pack.kNdlRx/_old  2022-03-28 17:00:53.048995700 +0200
+++ /var/tmp/diff_new_pack.kNdlRx/_new  2022-03-28 17:00:53.056995711 +0200
@@ -24,7 +24,8 @@
 Group:          System/GUI/GNOME
 URL:            https://wiki.gnome.org/Apps/Yelp
 Source0:        
https://download.gnome.org/sources/yelp/42/%{name}-%{version}.tar.xz
-
+# PATCH-FIX-UPSTREAM yelp-ghelp.patch glgo#GNOME/yelp#187 dims...@opensuse.org 
-- Fix openeing ghelp: URIs
+Patch0:         yelp-ghelp.patch
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  itstool >= 1.2.0

++++++ yelp-ghelp.patch ++++++
>From b93fb44a90f8c7cd9f6137ea191591ddff1deb56 Mon Sep 17 00:00:00 2001
From: Shaun McCance <sha...@gnome.org>
Date: Thu, 2 Dec 2021 15:14:04 -0500
Subject: [PATCH] Be even more careful about stripping slashes

We broke absolute file paths in 41.beta, then we fixed them, but
it turns out ghelp URIs were still broken. The fix isn't great,
but it should work fine.

Fixes #187
---
 libyelp/yelp-document.c    | 2 +-
 libyelp/yelp-uri-builder.c | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index cfac7291..fb340ebd 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -220,7 +220,7 @@ yelp_document_get_for_uri (YelpUri *uri)
         return g_object_ref (document);
     }
 
-    switch (yelp_uri_get_document_type (uri)) {
+    switch (doctype) {
     case YELP_URI_DOCUMENT_TYPE_TEXT:
     case YELP_URI_DOCUMENT_TYPE_HTML:
     case YELP_URI_DOCUMENT_TYPE_XHTML:
diff --git a/libyelp/yelp-uri-builder.c b/libyelp/yelp-uri-builder.c
index 72084596..680bf90b 100644
--- a/libyelp/yelp-uri-builder.c
+++ b/libyelp/yelp-uri-builder.c
@@ -109,7 +109,13 @@ build_yelp_uri (const gchar *uri_str)
             memmove (resource, resource + 1, strlen (resource));
     }
     else if (g_str_has_prefix (uri, "ghelp:")) {
-        if (resource[0] == '/' && resource[1] == '/')
+        /* This is an ugly heuristic that probably always works. The URI
+           mangling ends up not distinguishing between absolute file paths
+           and ordinary old ghelp URIs. But absolute file paths should
+           have more than one slash, right? This will fail:
+               cp foo.xml / && yelp /foo.xml
+         */
+        if (resource[0] == '/' && !strchr (resource + 1, '/'))
             memmove (resource, resource + 1, strlen (resource));
     }
   }
-- 
GitLab

Reply via email to