From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 33820@debbugs.gnu.org
Subject: [bug#33820] [PATCH 5/9] gnu: kio: Search 'smbd' on $PATH.
Date: Fri, 21 Dec 2018 11:10:48 +0100 [thread overview]
Message-ID: <20181221101052.26832-5-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20181221101052.26832-1-h.goebel@crazy-compilers.com>
Transfer the remaining NixOS patch for kio as of 2018-02-17.
* gnu/packages/patches/kio-search-smbd-on-PATH.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/kde-frameworks.scm(kio)<source>: Use it.
---
gnu/local.mk | 1 +
gnu/packages/kde-frameworks.scm | 6 ++---
gnu/packages/patches/kio-search-smbd-on-PATH.patch | 30 ++++++++++++++++++++++
3 files changed, 34 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/kio-search-smbd-on-PATH.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 8e1ce88bc..0403f82ba 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -854,6 +854,7 @@ dist_patch_DATA = \
%D%/packages/patches/kiki-makefile.patch \
%D%/packages/patches/kiki-missing-includes.patch \
%D%/packages/patches/kiki-portability-64bit.patch \
+ %D%/packages/patches/kio-search-smbd-on-PATH.patch \
%D%/packages/patches/kmod-module-directory.patch \
%D%/packages/patches/kobodeluxe-paths.patch \
%D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index c73527b43..435b55a49 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -2595,7 +2595,8 @@ makes starting KDE applications faster and reduces memory consumption.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0rrsg3g1b204cdp58vxd5dig1ggwyvk1382p1c86vn6w8qbrq27k"))))
+ "0rrsg3g1b204cdp58vxd5dig1ggwyvk1382p1c86vn6w8qbrq27k"))
+ (patches (search-patches "kio-search-smbd-on-PATH.patch"))))
(build-system cmake-build-system)
(propagated-inputs
`(("kbookmarks" ,kbookmarks)
@@ -2638,11 +2639,10 @@ makes starting KDE applications faster and reduces memory consumption.")
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda _
- ;; Better error message (taken from nix)
+ ;; Better error message (taken from NixOS)
(substitute* "src/kiod/kiod_main.cpp"
(("(^\\s*qCWarning(KIOD_CATEGORY) << \"Error loading plugin:\")( << loader.errorString();)" _ a b)
(string-append a "<< name" b)))
- ;; TODO: samba-search-path.patch from nix: search smbd on $PATH
#t))
(add-before 'check 'check-setup
(lambda _
diff --git a/gnu/packages/patches/kio-search-smbd-on-PATH.patch b/gnu/packages/patches/kio-search-smbd-on-PATH.patch
new file mode 100644
index 000000000..47e20cfc0
--- /dev/null
+++ b/gnu/packages/patches/kio-search-smbd-on-PATH.patch
@@ -0,0 +1,30 @@
+Adopted from NixOS
+pkgs/development/libraries/kde-frameworks/kio/samba-search-path.patch
+
+===================================================================
+--- kio-5.17.0.orig/src/core/ksambashare.cpp
++++ kio-5.17.0/src/core/ksambashare.cpp
+@@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate(
+
+ bool KSambaSharePrivate::isSambaInstalled()
+ {
+- if (QFile::exists(QStringLiteral("/usr/sbin/smbd"))
+- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) {
+- return true;
++ const QByteArray pathEnv = qgetenv("PATH");
++ if (!pathEnv.isEmpty()) {
++ QLatin1Char pathSep(':');
++ QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts);
++ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
++ it->append("/smbd");
++ if (QFile::exists(*it)) {
++ return true;
++ }
++ }
+ }
+
+- //qDebug() << "Samba is not installed!";
+-
+ return false;
+ }
+
--
2.13.7
next prev 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 ` Hartmut Goebel [this message]
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 ` [bug#33820] [PATCH 8/9] gnu: kpackage: Transfer patches from NixOS Hartmut Goebel
2018-12-21 10:10 ` [bug#33820] [PATCH 9/9] gnu: kservice: " 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-5-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.