This patch allows the Haskell daemons to locate Python libraries installed to a non-standard pythondir. It is necessary because Guix does not use versionedsharedir (see related patch that disables it). diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -83,6 +83,7 @@ myexeclibdir = $(pkglibdir) bindir = $(versiondir)/$(BINDIR) sbindir = $(versiondir)$(SBINDIR) mandir = $(versionedsharedir)/root$(MANDIR) +pythondir = $(versionedsharedir) pkgpythondir = $(versionedsharedir)/ganeti pkgpython_rpc_stubdir = $(versionedsharedir)/ganeti/rpc/stub gntpythondir = $(versionedsharedir) @@ -2386,6 +2387,7 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \ -DPKGLIBDIR="$(libdir)/ganeti" \ -DSHAREDIR="$(prefix)/share/ganeti" \ -DVERSIONEDSHAREDIR="$(versionedsharedir)" \ + -DPYTHONDIR="$(pythondir)" \ -DDRBD_BARRIERS="$(DRBD_BARRIERS)" \ -DDRBD_NO_META_FLUSH="$(DRBD_NO_META_FLUSH)" \ -DSYSLOG_USAGE="$(SYSLOG_USAGE)" \ diff --git a/src/AutoConf.hs.in b/src/AutoConf.hs.in --- a/src/AutoConf.hs.in +++ b/src/AutoConf.hs.in @@ -157,6 +157,9 @@ sharedir = "SHAREDIR" versionedsharedir :: String versionedsharedir = "VERSIONEDSHAREDIR" +pythondir :: String +pythondir = "PYTHONDIR" + drbdBarriers :: String drbdBarriers = "DRBD_BARRIERS" diff --git a/src/Ganeti/Path.hs b/src/Ganeti/Path.hs --- a/src/Ganeti/Path.hs +++ b/src/Ganeti/Path.hs @@ -188,5 +188,5 @@ getInstReasonFilename instName = instanceReasonDir `pjoin` instName -- | The path to the Python executable for starting jobs. jqueueExecutorPy :: IO FilePath -jqueueExecutorPy = return $ versionedsharedir - "ganeti" "jqueue" "exec.py" +jqueueExecutorPy = return $ pythondir + "ganeti" "jqueue" "exec.py" diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs --- a/src/Ganeti/Query/Exec.hs +++ b/src/Ganeti/Query/Exec.hs @@ -99,12 +99,12 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $ do use_debug <- isDebugMode env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0") - . M.insert "PYTHONPATH" AC.versionedsharedir + . M.insert "PYTHONPATH" AC.pythondir . M.fromList) `liftM` getEnvironment execPy <- P.jqueueExecutorPy logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy - ++ " with PYTHONPATH=" ++ AC.versionedsharedir + ++ " with PYTHONPATH=" ++ AC.pythondir (master, child) <- pipeClient connectConfig let (rh, wh) = clientToHandle child ft'>Author 2021-01-17gnu: oil: Update to 0.8.6....Tobias Geerinckx-Rice 2021-01-02gnu: dash: Update to 0.5.11.3....Tobias Geerinckx-Rice 2020-11-25gnu: oil: Update to 0.8.5....Ryan Prior via Guix-patches via 2020-11-09gnu: oil: Update to 0.8.4....Ryan Prior via Guix-patches via 2020-11-05gnu: oil: Update to 0.8.3....Tobias Geerinckx-Rice 2020-10-19gnu: xonsh: Update to 0.9.24....Tobias Geerinckx-Rice 2020-10-14gnu: oil: Update to 0.8.2....Tobias Geerinckx-Rice 2020-10-13gnu: xonsh: Update to 0.9.23....Tobias Geerinckx-Rice 2020-10-02gnu: oil: Update to 0.8.1....Tobias Geerinckx-Rice 2020-09-23gnu: xonsh: Update to 0.9.22....Tobias Geerinckx-Rice 2020-09-23gnu: Fix typoes in package descriptions....Tobias Geerinckx-Rice 2020-09-20gnu: oil: Don't hardcode gcc....Efraim Flashner 2020-09-20gnu: oil: Update to 0.8.0....Ryan Prior 2020-09-11gnu: xonsh: Update to 0.9.21....Tobias Geerinckx-Rice 2020-08-30gnu: xonsh: Update to 0.9.20....Tobias Geerinckx-Rice 2020-08-29gnu: dash: Update to 0.5.11.2....Tobias Geerinckx-Rice 2020-08-13gnu: xonsh: Update to 0.9.19....Tobias Geerinckx-Rice