all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 33820@debbugs.gnu.org
Subject: [bug#33820] [PATCH 8/9] gnu: kpackage: Transfer patches from NixOS.
Date: Fri, 21 Dec 2018 11:10:51 +0100	[thread overview]
Message-ID: <20181221101052.26832-8-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20181221101052.26832-1-h.goebel@crazy-compilers.com>

Transfer the NixOS patches for kpackage as of 2018-02-17:
- Allow external paths.
- Make QDirIterator follow symlinks.

Decided to use a patch for one of the "allow external paths" changes since
'substitute*' seems not to be robust enough.

* gnu/packages/patches/kpackage-allow-external-paths.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/kde-frameworks.scm(kpackage)[source]: Use it. <patch>: New
  phase.
---
 gnu/local.mk                                             |  1 +
 gnu/packages/kde-frameworks.scm                          | 15 ++++++++++++++-
 gnu/packages/patches/kpackage-allow-external-paths.patch | 13 +++++++++++++
 3 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/kpackage-allow-external-paths.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dd2a15b14..a7db95c20 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -858,6 +858,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/kinit-kdeinit-libpath.patch		\
   %D%/packages/patches/kio-search-smbd-on-PATH.patch		\
   %D%/packages/patches/kmod-module-directory.patch		\
+  %D%/packages/patches/kpackage-allow-external-paths.patch	\
   %D%/packages/patches/kobodeluxe-paths.patch			\
   %D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch	\
   %D%/packages/patches/kobodeluxe-const-charp-conversion.patch	\
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index c269c4758..65233f72e 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1848,7 +1848,10 @@ covers feedback and persistent events.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1xbfjwxb4gff8gg0hs5m9s0jcnzqk27rs2jr71g5ckhvs5psnkcd"))))
+                "1xbfjwxb4gff8gg0hs5m9s0jcnzqk27rs2jr71g5ckhvs5psnkcd"))
+              ;; Default to: external paths/symlinks can be followed by a
+              ;; package
+              (patches (search-patches "kpackage-allow-external-paths.patch"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1863,6 +1866,16 @@ covers feedback and persistent events.")
      `(#:tests? #f ; FIXME: 3/9 tests fail.
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda _
+             ;; Make QDirIterator follow symlinks
+             (substitute* '("src/kpackage/packageloader.cpp"
+                            "src/kpackage/private/packagejobthread.cpp")
+               (("^\\s*(const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories)(;)" _ a b)
+                (string-append a " | QDirIterator::FollowSymlinks" b))
+               (("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b)
+                (string-append a " | QDirIterator::FollowSymlinks" b)))
+             #t))
          (add-before 'check 'check-setup
            (lambda _
              (setenv "HOME" (getcwd))
diff --git a/gnu/packages/patches/kpackage-allow-external-paths.patch b/gnu/packages/patches/kpackage-allow-external-paths.patch
new file mode 100644
index 000000000..c1c9efde7
--- /dev/null
+++ b/gnu/packages/patches/kpackage-allow-external-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
+index 5aec9fd..b15c933 100644
+--- a/src/kpackage/package.cpp
++++ b/src/kpackage/package.cpp
+@@ -820,7 +820,7 @@ PackagePrivate::PackagePrivate()
+     : QSharedData(),
+       fallbackPackage(nullptr),
+       metadata(nullptr),
+-      externalPaths(false),
++      externalPaths(true),
+       valid(false),
+       checkedValid(false)
+ {
-- 
2.13.7

  parent reply	other threads:[~2018-12-21 10:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 10:08 [bug#33820] [PATCH 0/9] Adopt NixOS patches for KDE Frameworks Hartmut Goebel
2018-12-21 10:10 ` [bug#33820] [PATCH 1/9] gnu: kcmutils: Make QDirIterator follow symlinks Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 2/9] gnu: kcmutils: Print plugin name when loading fails Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 3/9] gnu: kconfigwidgets: Make QDirIterator follow symlinks Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 4/9] gnu: kdelibs4support: Add todo comment for a patch from NixOS Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 5/9] gnu: kio: Search 'smbd' on $PATH Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 6/9] gnu: kinit: Use the store paths for dynamically loaded libs Hartmut Goebel
2018-12-21 10:10   ` [bug#33820] [PATCH 7/9] gnu: kinit: Use LIBRARY_PATH to search " Hartmut Goebel
2018-12-21 10:10   ` Hartmut Goebel [this message]
2018-12-21 10:10   ` [bug#33820] [PATCH 9/9] gnu: kservice: Transfer patches from NixOS Hartmut Goebel
     [not found] ` <handler.33820.B.15453865187770.ack@debbugs.gnu.org>
2019-01-04  9:28   ` bug#33820: Acknowledgement ([PATCH 0/9] Adopt NixOS patches for KDE Frameworks) Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181221101052.26832-8-h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=33820@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.