[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
88/155: gnu: kdbusaddons: Embed kinit store dir, avoid dependency cycles
From: |
John Darrington |
Subject: |
88/155: gnu: kdbusaddons: Embed kinit store dir, avoid dependency cycles. |
Date: |
Wed, 21 Dec 2016 20:48:36 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 17e34d0dd4260244f8304227620eb92c3c884e74
Author: Thomas Danckaert <address@hidden>
Date: Tue Dec 6 14:55:39 2016 +0100
gnu: kdbusaddons: Embed kinit store dir, avoid dependency cycles.
kdbusaddons needs to know the location of the kdeinit5 executable,
provided by kinit. kinit depends on kdbusaddons, so we add bootstrap
versions of all packages in the dependency chain from kinit to
kdbusaddons to avoid cyclic dependencies.
* gnu/packages/kde-frameworks.scm (kinit-bootstrap,
kdbusaddons-bootstrap): New variables.
(kdbusaddons)[inputs]: Add kinit-bootstrap.
[source,arguments]: Add patch and substitution to embed
kinit-bootstrap's store directory in the code.
* gnu/packages/patches/kdbusaddons-kinit-file-name.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/local.mk | 1 +
gnu/packages/kde-frameworks.scm | 36 ++++++++++++++++++--
.../patches/kdbusaddons-kinit-file-name.patch | 15 ++++++++
3 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3fb6037..b4fb803 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -654,6 +654,7 @@ dist_patch_DATA =
\
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
%D%/packages/patches/jbig2dec-ignore-testtest.patch \
%D%/packages/patches/jq-CVE-2015-8863.patch \
+ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \
%D%/packages/patches/khmer-use-libraries.patch \
%D%/packages/patches/kmod-module-directory.patch \
%D%/packages/patches/kobodeluxe-paths.patch \
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 8b84133..94145fb 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -25,6 +25,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages attr)
@@ -50,7 +51,8 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
- #:use-module (gnu packages xorg))
+ #:use-module (gnu packages xorg)
+ #:use-module (srfi srfi-1))
(define-public extra-cmake-modules
(package
@@ -516,7 +518,8 @@ many more.")
name "-" version ".tar.xz"))
(sha256
(base32
- "07mzb1xr8wyiid25p8kg6mjp6vq8ngvv1ikhq75zvd2cbax530c8"))))
+ "07mzb1xr8wyiid25p8kg6mjp6vq8ngvv1ikhq75zvd2cbax530c8"))
+ (patches (search-patches "kdbusaddons-kinit-file-name.patch"))))
(build-system cmake-build-system)
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
@@ -524,10 +527,18 @@ many more.")
("qttools" ,qttools)))
(inputs
`(("qtbase" ,qtbase)
- ("qtx11extras" ,qtx11extras)))
+ ("qtx11extras" ,qtx11extras)
+ ("kinit" ,kinit-bootstrap))) ;; kinit-bootstrap: kinit package which
does not depend on kdbusaddons.
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before
+ 'configure 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; look for the kdeinit5 executable in kinit's store directory,
+ ;; instead of the current application's directory:
+ (substitute* "src/kdeinitinterface.cpp"
+ (("@SUBSTITUTEME@") (assoc-ref inputs "kinit")))))
(replace 'check
(lambda _
(setenv "DBUS_FATAL_WARNINGS" "0")
@@ -2866,3 +2877,22 @@ setUrl, setUserAgent and call.")
script engines.")
;; dual licensed
(license (list license:gpl2+ license:lgpl2.1+))))
+
+;; This version of kdbusaddons does not use kinit as an input, and is used to
+;; build kinit-bootstrap, as well as bootstrap versions of all kinit
+;; dependencies which also rely on kdbusaddons.
+(define kdbusaddons-bootstrap
+ (package
+ (inherit kdbusaddons)
+ (source (origin
+ (inherit (package-source kdbusaddons))
+ (patches '())))
+ (inputs (alist-delete "kinit" (package-inputs kdbusaddons)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments kdbusaddons)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'patch-source)))))))
+
+(define kinit-bootstrap
+ ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) kinit))
diff --git a/gnu/packages/patches/kdbusaddons-kinit-file-name.patch
b/gnu/packages/patches/kdbusaddons-kinit-file-name.patch
new file mode 100644
index 0000000..ffed88e
--- /dev/null
+++ b/gnu/packages/patches/kdbusaddons-kinit-file-name.patch
@@ -0,0 +1,15 @@
+Add placeholder for kinit's store file name.
+
+diff --git a/src/kdeinitinterface.cpp b/src/kdeinitinterface.cpp
+index 22fa5e5..3d40937 100644
+--- a/src/kdeinitinterface.cpp
++++ b/src/kdeinitinterface.cpp
+@@ -52,7 +52,7 @@ void KDEInitInterface::ensureKdeinitRunning()
+ // If not found in system paths, search other paths
+ if (srv.isEmpty()) {
+ const QStringList searchPaths = QStringList()
+- << QCoreApplication::applicationDirPath() // then look where our
application binary is located
++ << QString::fromUtf8("@SUBSTITUTEME@/bin") // using
QStringLiteral would be more efficient, but breaks guix store reference
detection.
+ << QLibraryInfo::location(QLibraryInfo::BinariesPath); // look
where exec path is (can be set in qt.conf)
+ srv = QStandardPaths::findExecutable(QStringLiteral("kdeinit5"),
searchPaths);
+ if (srv.isEmpty()) {
- 121/155: services: cuirass: Add Cuirass to the system profile., (continued)
- 121/155: services: cuirass: Add Cuirass to the system profile., John Darrington, 2016/12/21
- 128/155: mailmap: Add alias for Marius Bakke., John Darrington, 2016/12/21
- 126/155: build: Delete all the .service and .conf files upon 'make clean'., John Darrington, 2016/12/21
- 134/155: gnu: borg: Update to 1.0.9., John Darrington, 2016/12/21
- 136/155: gnu: mailutils: Update to 3.1.1., John Darrington, 2016/12/21
- 137/155: gnu: mailutils: Use 'modify-phases' syntax., John Darrington, 2016/12/21
- 130/155: environment: Add '--root' option., John Darrington, 2016/12/21
- 144/155: gnu: imagemagick: Update to 6.9.7-0., John Darrington, 2016/12/21
- 149/155: gnu: jsoncpp: Update to 1.8.0., John Darrington, 2016/12/21
- 152/155: gnu: lablgtk: Update to 2.18.5, John Darrington, 2016/12/21
- 88/155: gnu: kdbusaddons: Embed kinit store dir, avoid dependency cycles.,
John Darrington <=
- 102/155: services: cuirass: Add 'log-file' option., John Darrington, 2016/12/21
- 94/155: gnu: grub: Use qemu-minimal for tests., John Darrington, 2016/12/21
- 101/155: gnu: cuirass: Add Git to 'PATH'., John Darrington, 2016/12/21
- 103/155: services: cuirass: Honor 'user' and 'group'., John Darrington, 2016/12/21
- 98/155: gnu: Add c-toxcore., John Darrington, 2016/12/21
- 104/155: services: cuirass: Cache defaults to /var/cache/cuirass., John Darrington, 2016/12/21
- 110/155: gnu: weechat: Use new xz-compressed tarball., John Darrington, 2016/12/21
- 127/155: gnu: gnupg: Update to 2.1.17., John Darrington, 2016/12/21
- 120/155: services: cuirass: Add 'cuirass' field., John Darrington, 2016/12/21
- 116/155: gnu: argon2: Update to 20161029., John Darrington, 2016/12/21