From 638eb126d7ce6e2227bd2ac504a4537e27cc4df4 Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Fri, 29 Sep 2017 15:11:22 +0200 Subject: [PATCH] * debian/patches/testsuite_honor_patroni_postgresql_bin_dir.patch: New patch, makes the accceptance testsuite honor the $PATRONI_POSTGRESQL_BIN_DIR environment variable when trying to kill postgres via pg_ctl. --- debian/patches/series | 1 + ...stsuite_honor_patroni_postgresql_bin_dir.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 debian/patches/testsuite_honor_patroni_postgresql_bin_dir.patch diff --git a/debian/patches/series b/debian/patches/series index 4a2662b..cf083b4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ sphinx_no_mathjax.patch startup_scripts.patch coverage_binary.patch relax_kazoo_requirement.patch +testsuite_honor_patroni_postgresql_bin_dir.patch diff --git a/debian/patches/testsuite_honor_patroni_postgresql_bin_dir.patch b/debian/patches/testsuite_honor_patroni_postgresql_bin_dir.patch new file mode 100644 index 0000000..e1a1d9e --- /dev/null +++ b/debian/patches/testsuite_honor_patroni_postgresql_bin_dir.patch @@ -0,0 +1,15 @@ +--- ./features/environment.py.orig 2017-09-29 14:54:22.558666638 +0200 ++++ ./features/environment.py 2017-09-29 14:58:32.971607543 +0200 +@@ -130,7 +130,11 @@ + + def stop(self, kill=False, timeout=15, postgres=False): + if postgres: +- return subprocess.call(['pg_ctl', '-D', self._data_dir, 'stop', '-mi', '-w']) ++ cmd = 'pg_ctl' ++ pgbindir = os.environ['PATRONI_POSTGRESQL_BIN_DIR'] ++ if pgbindir is not None: ++ cmd = pgbindir + '/pg_ctl' ++ return subprocess.call([cmd, '-D', self._data_dir, 'stop', '-mi', '-w']) + super(PatroniController, self).stop(kill, timeout) + if self.watchdog: + self.watchdog.stop()