diff -Nru drbd8-8.4.3/debian/changelog drbd8-8.4.3/debian/changelog --- drbd8-8.4.3/debian/changelog 2014-02-07 18:55:46.000000000 +0100 +++ drbd8-8.4.3/debian/changelog 2014-04-22 15:07:16.000000000 +0200 @@ -1,3 +1,10 @@ +drbd8 (2:8.4.3-0ubuntu0.12.04.2) precise; urgency=low + + * Add compat library path before executing drbdsetup. Otherwise + the call fails with misleading error message (LP: #1185756). + + -- Stefan Bader Tue, 22 Apr 2014 15:05:50 +0200 + drbd8 (2:8.4.3-0ubuntu0.12.04.1) precise; urgency=low * Backport version from 13.04 so that the utils will handle the diff -Nru drbd8-8.4.3/debian/patches/series drbd8-8.4.3/debian/patches/series --- drbd8-8.4.3/debian/patches/series 2014-02-07 18:55:46.000000000 +0100 +++ drbd8-8.4.3/debian/patches/series 2014-04-22 15:00:42.000000000 +0200 @@ -5,3 +5,4 @@ ubuntu-no-options-in-global.patch ubuntu-emulate-adjust-with-progress.patch ubuntu-adjust-legacy-version.patch +ubuntu-fix-drbdsetup-legacy-path.patch diff -Nru drbd8-8.4.3/debian/patches/ubuntu-fix-drbdsetup-legacy-path.patch drbd8-8.4.3/debian/patches/ubuntu-fix-drbdsetup-legacy-path.patch --- drbd8-8.4.3/debian/patches/ubuntu-fix-drbdsetup-legacy-path.patch 1970-01-01 01:00:00.000000000 +0100 +++ drbd8-8.4.3/debian/patches/ubuntu-fix-drbdsetup-legacy-path.patch 2014-04-22 15:05:45.000000000 +0200 @@ -0,0 +1,40 @@ +Description: Also add drbd lib to the path for drbdsetup + The same is done for drbadmin. Otherwise the call to the legacy binary + fails. +Forwarded: not-yet +Origin: vendor, http://bugs.launchpad.net/bugs/1185756 +Bug-Ubuntu: http://bugs.launchpad.net/bugs/1185756 +Author: Stefan Bader +Index: drbd8-8.4.3/user/drbdsetup.c +=================================================================== +--- drbd8-8.4.3.orig/user/drbdsetup.c 2012-11-06 15:54:30.000000000 +0100 ++++ drbd8-8.4.3/user/drbdsetup.c 2014-04-22 15:05:38.424216743 +0200 +@@ -2395,6 +2395,20 @@ static int is_drbd_driver_missing(void) + return 1; + } + ++#ifdef DRBD_LEGACY_83 ++void add_lib_drbd_to_path(void) ++{ ++ char *new_path = NULL; ++ char *old_path = getenv("PATH"); ++ ++ m_asprintf(&new_path, "%s%s%s", ++ old_path, ++ old_path ? ":" : "", ++ "/lib/drbd"); ++ setenv("PATH", new_path, 1); ++} ++#endif ++ + void exec_legacy_drbdsetup(char **argv) + { + #ifdef DRBD_LEGACY_83 +@@ -2405,6 +2419,7 @@ void exec_legacy_drbdsetup(char **argv) + * look for the legacy drbdsetup binary in the same location, + * otherwise, just let execvp sort it out... */ + if ((progname = strrchr(argv[0], '/')) == 0) { ++ add_lib_drbd_to_path(); + drbdsetup = strdup(legacy_drbdsetup); + } else { + size_t len_dir, l;