diff -Nru dlm-4.0.7/debian/changelog dlm-4.0.8/debian/changelog --- dlm-4.0.7/debian/changelog 2018-11-18 09:02:59.000000000 +0000 +++ dlm-4.0.8/debian/changelog 2019-01-15 14:26:46.000000000 +0000 @@ -1,3 +1,18 @@ +dlm (4.0.8-1) unstable; urgency=medium + + * [0f134dd] Upstream does not provide tarballs anymore + * [948d36e] Switch to the merged Pacemaker dev package + * [05d2feb] Update Standards-Version to 4.3.0 + * [79db167] Switch to dh_missing + * [ad3febd] Bump Debhelper compat level to 12 + * [583193a] Refresh copyright years + * [8b55e90] New upstream release (4.0.8) + * [a7bb130] Delete upstreamed patches, refresh the rest (ordering problems + reemerged!) + * [3f917a6] The __DATE__ and __TIME__ macros are reproducible now in GCC + + -- Ferenc Wágner Tue, 15 Jan 2019 15:26:46 +0100 + dlm (4.0.7-4) unstable; urgency=medium * [5063137] Add patch to fix cross build from source (Closes: #913866) diff -Nru dlm-4.0.7/debian/compat dlm-4.0.8/debian/compat --- dlm-4.0.7/debian/compat 2018-04-25 21:31:59.000000000 +0000 +++ dlm-4.0.8/debian/compat 2019-01-15 14:25:16.000000000 +0000 @@ -1 +1 @@ -11 +12 diff -Nru dlm-4.0.7/debian/control dlm-4.0.8/debian/control --- dlm-4.0.7/debian/control 2018-11-04 17:54:52.000000000 +0000 +++ dlm-4.0.8/debian/control 2019-01-15 14:25:16.000000000 +0000 @@ -4,14 +4,14 @@ Maintainer: Debian HA Maintainers Uploaders: Ferenc Wágner , Valentin Vidic -Standards-Version: 4.2.1 -Build-Depends: debhelper (>= 11), +Standards-Version: 4.3.0 +Build-Depends: debhelper (>= 12), libcfg-dev (>= 1.99), libcpg-dev (>= 1.99), libcmap-dev (>= 1.99), libquorum-dev (>= 1.99), libsystemd-dev, - libstonithd-dev, + pacemaker-dev, libxml2-dev, pkg-config Homepage: https://pagure.io/dlm diff -Nru dlm-4.0.7/debian/copyright dlm-4.0.8/debian/copyright --- dlm-4.0.7/debian/copyright 2018-04-25 21:31:59.000000000 +0000 +++ dlm-4.0.8/debian/copyright 2019-01-15 14:25:16.000000000 +0000 @@ -25,7 +25,7 @@ License: GPL-2+ Files: debian/* -Copyright: 2015-2016 Ferenc Wágner +Copyright: 2015-2019 Ferenc Wágner License: GPL-2+ License: GPL-2 diff -Nru dlm-4.0.7/debian/gbp.conf dlm-4.0.8/debian/gbp.conf --- dlm-4.0.7/debian/gbp.conf 2018-04-25 21:31:59.000000000 +0000 +++ dlm-4.0.8/debian/gbp.conf 2019-01-13 16:41:05.000000000 +0000 @@ -1,9 +1,8 @@ [DEFAULT] debian-branch = debian/master -upstream-branch = upstream/latest - -[import-orig] +upstream-tag = dlm-%(version)s pristine-tar = True +pristine-tar-commit = True [pq] patch-numbers = False diff -Nru dlm-4.0.7/debian/patches/Build-reproducibly-don-t-compile-in-the-build-time.patch dlm-4.0.8/debian/patches/Build-reproducibly-don-t-compile-in-the-build-time.patch --- dlm-4.0.7/debian/patches/Build-reproducibly-don-t-compile-in-the-build-time.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Build-reproducibly-don-t-compile-in-the-build-time.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -From: =?utf-8?q?Ferenc_W=C3=A1gner?= -Date: Mon, 1 Feb 2016 18:18:52 +0100 -Subject: Build reproducibly: don't compile in the build time - ---- - dlm_controld/main.c | 5 ++--- - dlm_tool/main.c | 3 +-- - 2 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/dlm_controld/main.c b/dlm_controld/main.c -index 02f4737..e8ee4cf 100644 ---- a/dlm_controld/main.c -+++ b/dlm_controld/main.c -@@ -1436,9 +1436,8 @@ static void set_opt_cli(int argc, char **argv) - } - - if (!strcmp(arg1, "version") || !strcmp(arg1, "--version") || !strcmp(arg1, "-V")) { -- printf("dlm_controld %s (built %s %s)\n", -- RELEASE_VERSION, __DATE__, __TIME__); -- printf("%s\n", REDHAT_COPYRIGHT); -+ printf("dlm_controld %s\n", RELEASE_VERSION); -+ printf("%s\n", REDHAT_COPYRIGHT); - exit(EXIT_SUCCESS); - } - -diff --git a/dlm_tool/main.c b/dlm_tool/main.c -index 042caa9..2570af1 100644 ---- a/dlm_tool/main.c -+++ b/dlm_tool/main.c -@@ -256,8 +256,7 @@ static void decode_arguments(int argc, char **argv) - break; - - case 'V': -- printf("%s %s (built %s %s)\n", -- prog_name, RELEASE_VERSION, __DATE__, __TIME__); -+ printf("%s %s\n", prog_name, RELEASE_VERSION); - printf("%s\n", REDHAT_COPYRIGHT); - exit(EXIT_SUCCESS); - break; diff -Nru dlm-4.0.7/debian/patches/Check-sscanf-return-value.patch dlm-4.0.8/debian/patches/Check-sscanf-return-value.patch --- dlm-4.0.7/debian/patches/Check-sscanf-return-value.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Check-sscanf-return-value.patch 2019-01-15 14:25:17.000000000 +0000 @@ -7,10 +7,10 @@ 1 file changed, 5 insertions(+) diff --git a/dlm_tool/main.c b/dlm_tool/main.c -index 2570af1..75410cf 100644 +index 042caa9..1900236 100644 --- a/dlm_tool/main.c +++ b/dlm_tool/main.c -@@ -691,6 +691,11 @@ static void print_lkb(char *line, struct rinfo *ri) +@@ -692,6 +692,11 @@ static void print_lkb(char *line, struct rinfo *ri) (unsigned long long *)&lkb.timestamp, (unsigned long long *)&lkb.time_bast); diff -Nru dlm-4.0.7/debian/patches/Check-write-return-value.patch dlm-4.0.8/debian/patches/Check-write-return-value.patch --- dlm-4.0.7/debian/patches/Check-write-return-value.patch 2018-11-04 17:50:42.000000000 +0000 +++ dlm-4.0.8/debian/patches/Check-write-return-value.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -From: Valentin Vidic -Date: Tue, 16 Oct 2018 22:04:44 +0200 -Subject: dlm_controld: check write return value - -plock.c: In function ‘write_result’: -plock.c:691:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] - write(plock_device_fd, in, sizeof(struct dlm_plock_info)); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---- - dlm_controld/plock.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c -index 28f07e6..992fb16 100644 ---- a/dlm_controld/plock.c -+++ b/dlm_controld/plock.c -@@ -687,8 +687,13 @@ static int add_waiter(struct lockspace *ls, struct resource *r, - static void write_result(struct lockspace *ls, struct dlm_plock_info *in, - int rv) - { -+ int write_rv; -+ - in->rv = rv; -- write(plock_device_fd, in, sizeof(struct dlm_plock_info)); -+ write_rv = write(plock_device_fd, in, sizeof(struct dlm_plock_info)); -+ if (write_rv < 0) -+ log_debug("write_result: write error %d fd %d\n", -+ errno, plock_device_fd); - } - - static void do_waiters(struct lockspace *ls, struct resource *r) diff -Nru dlm-4.0.7/debian/patches/Don-t-link-dlm_stonith-against-libxml2.patch dlm-4.0.8/debian/patches/Don-t-link-dlm_stonith-against-libxml2.patch --- dlm-4.0.7/debian/patches/Don-t-link-dlm_stonith-against-libxml2.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Don-t-link-dlm_stonith-against-libxml2.patch 2019-01-15 14:25:16.000000000 +0000 @@ -3,23 +3,18 @@ Subject: Don't link dlm_stonith against libxml2 --- - fence/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + fence/Makefile | 1 - + 1 file changed, 1 deletion(-) diff --git a/fence/Makefile b/fence/Makefile -index 504cce8..cc8cc4f 100644 +index d4a3c09..1382260 100644 --- a/fence/Makefile +++ b/fence/Makefile -@@ -30,11 +30,11 @@ BIN_CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -fdiagnostics-show-option \ +@@ -22,7 +22,6 @@ CFLAGS += `xml2-config --cflags` + CFLAGS += -I../include - BIN_CFLAGS += -fPIE -DPIE -+# pacemaker/crm/stonith-ng.h includes libxml/tree.h, so we need this: - BIN_CFLAGS += `xml2-config --cflags` - BIN_CFLAGS += -I../include - - BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie --BIN_LDFLAGS += `xml2-config --libs` - BIN_LDFLAGS += -ldl + LDFLAGS += -Wl,-z,relro -pie +-LDFLAGS += `xml2-config --libs` + LDFLAGS += -ldl all: $(BIN_TARGET) diff -Nru dlm-4.0.7/debian/patches/Fix-cross-build.patch dlm-4.0.8/debian/patches/Fix-cross-build.patch --- dlm-4.0.7/debian/patches/Fix-cross-build.patch 2018-11-18 09:00:16.000000000 +0000 +++ dlm-4.0.8/debian/patches/Fix-cross-build.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -From: Helmut Grohne -Date: Fri, 16 Nov 2018 06:24:06 +0100 -Subject: FTCBFS: uses the wrong pkg-config - -dlm fails to cross build from source, because the upstream Makefile hard -codes the build architecture pkg-config. The attached patch makes -pkg-config substitutable. dh_auto_build substitutes it and dlm becomes -cross buildable. - ---- a/dlm_controld/Makefile -+++ b/dlm_controld/Makefile -@@ -61,10 +61,11 @@ - LIB_CFLAGS += $(BIN_CFLAGS) - LIB_LDFLAGS += -Wl,-z,relro -pie - -+PKG_CONFIG ?= pkg-config - ifeq ($(USE_SD_NOTIFY),yes) -- BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \ -+ BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) \ - -DUSE_SD_NOTIFY -- BIN_LDFLAGS += $(shell pkg-config --libs libsystemd) -+ BIN_LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) - endif - - all: $(LIB_TARGET) $(BIN_TARGET) diff -Nru dlm-4.0.7/debian/patches/Include-sys-sysmacros.h-to-use-minor-3.patch dlm-4.0.8/debian/patches/Include-sys-sysmacros.h-to-use-minor-3.patch --- dlm-4.0.7/debian/patches/Include-sys-sysmacros.h-to-use-minor-3.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Include-sys-sysmacros.h-to-use-minor-3.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -From: Valentin Vidic -Date: Wed, 25 Apr 2018 22:56:49 +0200 -Subject: Include to use minor(3) - ---- - dlm_controld/dlm_daemon.h | 1 + - libdlm/libdlm.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h -index f8068cf..47abbe4 100644 ---- a/dlm_controld/dlm_daemon.h -+++ b/dlm_controld/dlm_daemon.h -@@ -11,6 +11,7 @@ - - #include - #include -+#include - #include - #include - #include -diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c -index a9e6195..d50bb87 100644 ---- a/libdlm/libdlm.c -+++ b/libdlm/libdlm.c -@@ -11,6 +11,7 @@ - #include - #endif - #include -+#include - #include - #include - #include diff -Nru dlm-4.0.7/debian/patches/Move-our-CFLAGS-before-the-environmental-CFLAGS.patch dlm-4.0.8/debian/patches/Move-our-CFLAGS-before-the-environmental-CFLAGS.patch --- dlm-4.0.7/debian/patches/Move-our-CFLAGS-before-the-environmental-CFLAGS.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Move-our-CFLAGS-before-the-environmental-CFLAGS.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From: =?utf-8?q?Ferenc_W=C3=A1gner?= -Date: Mon, 19 Dec 2016 22:37:39 +0100 -Subject: Move our CFLAGS before the environmental CFLAGS - -This gives the user settings (in the environment) higher priority. -At the same time, simplify the pthread handling: use -pthread both for -compilation and linking explicitly. ---- - libdlm/Makefile | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -diff --git a/libdlm/Makefile b/libdlm/Makefile -index 9350940..dfd6ff9 100644 ---- a/libdlm/Makefile -+++ b/libdlm/Makefile -@@ -55,7 +55,8 @@ UDEV_TARGET = 51-dlm.rules - - SOURCE = libdlm.c - --CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ -+DLM_CFLAGS = \ -+ -D_GNU_SOURCE -O2 -ggdb \ - -Wall \ - -Wformat \ - -Wformat-security \ -@@ -77,24 +78,21 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -fdiagnostics-show-option \ - -fPIC - --LIB_CFLAGS += -D_REENTRANT --LIB_LDFLAGS += -lpthread -- - all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC) - - $(LIB_O): $(SOURCE) -- $(CC) $(CPPFLAGS) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@ -+ $(CC) $(CPPFLAGS) $< $(DLM_CFLAGS) $(CFLAGS) -c -o $@ -pthread - - $(LLT_O): $(SOURCE) -- $(CC) $(CPPFLAGS) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@ -+ $(CC) $(CPPFLAGS) $< $(DLM_CFLAGS) $(CFLAGS) -c -o $@ - - $(LIB_TARGET): $(LIB_O) -- $(CC) $^ $(LIB_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) -+ $(CC) $^ $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) -pthread - ln -sf $(LIB_TARGET) $(LIB_SO) - ln -sf $(LIB_TARGET) $(LIB_SMAJOR) - - $(LLT_TARGET): $(LLT_O) -- $(CC) $^ $(LLT_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) -+ $(CC) $^ $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) - ln -sf $(LLT_TARGET) $(LLT_SO) - ln -sf $(LLT_TARGET) $(LLT_SMAJOR) - diff -Nru dlm-4.0.7/debian/patches/series dlm-4.0.8/debian/patches/series --- dlm-4.0.7/debian/patches/series 2018-11-18 09:00:07.000000000 +0000 +++ dlm-4.0.8/debian/patches/series 2019-01-15 14:25:17.000000000 +0000 @@ -1,12 +1,5 @@ Debian-path-for-the-config-file.patch -Build-reproducibly-don-t-compile-in-the-build-time.patch Enable-systemctl-help-dlm-to-show-relevant-man-pages.patch -Use-the-passed-in-CFLAGS-and-LDFLAGS-settings.patch Use-CPPFLAGS-from-the-environment.patch -Move-our-CFLAGS-before-the-environmental-CFLAGS.patch Don-t-link-dlm_stonith-against-libxml2.patch -Include-sys-sysmacros.h-to-use-minor-3.patch Check-sscanf-return-value.patch -Check-write-return-value.patch -Toplevel-Makefile-always-returns-success.patch -Fix-cross-build.patch diff -Nru dlm-4.0.7/debian/patches/Toplevel-Makefile-always-returns-success.patch dlm-4.0.8/debian/patches/Toplevel-Makefile-always-returns-success.patch --- dlm-4.0.7/debian/patches/Toplevel-Makefile-always-returns-success.patch 2018-11-04 17:50:49.000000000 +0000 +++ dlm-4.0.8/debian/patches/Toplevel-Makefile-always-returns-success.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -From: Valentin Vidic -Date: Tue, 16 Oct 2018 21:50:18 +0200 -Subject: Toplevel Makefile always returns success - -Check exit codes from each of the subdirectories. ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index dd29bce..ab069a1 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,2 +1,2 @@ - all install clean: %: -- for d in libdlm dlm_controld dlm_tool fence; do $(MAKE) -C $$d $@; done -+ set -e; for d in libdlm dlm_controld dlm_tool fence; do $(MAKE) -C $$d $@; done diff -Nru dlm-4.0.7/debian/patches/Use-CPPFLAGS-from-the-environment.patch dlm-4.0.8/debian/patches/Use-CPPFLAGS-from-the-environment.patch --- dlm-4.0.7/debian/patches/Use-CPPFLAGS-from-the-environment.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Use-CPPFLAGS-from-the-environment.patch 2019-01-15 14:25:16.000000000 +0000 @@ -10,62 +10,62 @@ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile -index 873d7c2..d0c0732 100644 +index 75c5750..47af929 100644 --- a/dlm_controld/Makefile +++ b/dlm_controld/Makefile -@@ -70,10 +70,10 @@ endif +@@ -58,10 +58,10 @@ endif all: $(LIB_TARGET) $(BIN_TARGET) $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. -+ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. +- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. ++ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. $(LIB_TARGET): $(LIB_SOURCE) -- $(CC) $^ $(LIB_CFLAGS) $(CFLAGS) $(LIB_LDFLAGS) $(LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) -+ $(CC) $(CPPFLAGS) $^ $(LIB_CFLAGS) $(CFLAGS) $(LIB_LDFLAGS) $(LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) +- $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) ++ $(CC) $(CPPFLAGS) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) ln -sf $(LIB_TARGET) $(LIB_SO) ln -sf $(LIB_TARGET) $(LIB_SMAJOR) diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile -index 27635a7..7a01132 100644 +index 80d7725..a9b3be0 100644 --- a/dlm_tool/Makefile +++ b/dlm_tool/Makefile -@@ -39,7 +39,7 @@ BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol +@@ -27,7 +27,7 @@ LDFLAGS += -lpthread -ldlm -ldlmcontrol all: $(BIN_TARGET) $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -+ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ +- $(CC) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ ++ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ clean: rm -f *.o *.so *.so.* $(BIN_TARGET) diff --git a/fence/Makefile b/fence/Makefile -index 2574382..504cce8 100644 +index b927879..d4a3c09 100644 --- a/fence/Makefile +++ b/fence/Makefile -@@ -40,7 +40,7 @@ BIN_LDFLAGS += -ldl +@@ -28,7 +28,7 @@ LDFLAGS += -ldl all: $(BIN_TARGET) $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. -+ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. +- $(CC) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ -L. ++ $(CC) $(CPPFLAGS) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ -L. clean: rm -f *.o *.so *.so.* $(BIN_TARGET) diff --git a/libdlm/Makefile b/libdlm/Makefile -index 3352b0a..9350940 100644 +index ab32761..21addf8 100644 --- a/libdlm/Makefile +++ b/libdlm/Makefile -@@ -83,10 +83,10 @@ LIB_LDFLAGS += -lpthread +@@ -90,10 +90,10 @@ LLT_LDFLAGS += $(LDFLAGS) all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC) $(LIB_O): $(SOURCE) -- $(CC) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@ -+ $(CC) $(CPPFLAGS) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@ +- $(CC) $< $(LIB_CFLAGS) -c -o $@ ++ $(CC) $(CPPFLAGS) $< $(LIB_CFLAGS) -c -o $@ $(LLT_O): $(SOURCE) -- $(CC) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@ -+ $(CC) $(CPPFLAGS) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@ +- $(CC) $< $(LLT_CFLAGS) -c -o $@ ++ $(CC) $(CPPFLAGS) $< $(LLT_CFLAGS) -c -o $@ $(LIB_TARGET): $(LIB_O) - $(CC) $^ $(LIB_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) + $(CC) $^ $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) diff -Nru dlm-4.0.7/debian/patches/Use-the-passed-in-CFLAGS-and-LDFLAGS-settings.patch dlm-4.0.8/debian/patches/Use-the-passed-in-CFLAGS-and-LDFLAGS-settings.patch --- dlm-4.0.7/debian/patches/Use-the-passed-in-CFLAGS-and-LDFLAGS-settings.patch 2018-11-04 17:50:08.000000000 +0000 +++ dlm-4.0.8/debian/patches/Use-the-passed-in-CFLAGS-and-LDFLAGS-settings.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -From: =?utf-8?q?Ferenc_W=C3=A1gner?= -Date: Mon, 19 Dec 2016 20:22:25 +0100 -Subject: Use the passed in CFLAGS and LDFLAGS settings - ---- - dlm_controld/Makefile | 4 ++-- - dlm_tool/Makefile | 2 +- - fence/Makefile | 2 +- - libdlm/Makefile | 15 ++++++--------- - 4 files changed, 10 insertions(+), 13 deletions(-) - -diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile -index cf556c9..873d7c2 100644 ---- a/dlm_controld/Makefile -+++ b/dlm_controld/Makefile -@@ -70,10 +70,10 @@ endif - all: $(LIB_TARGET) $(BIN_TARGET) - - $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. -+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. - - $(LIB_TARGET): $(LIB_SOURCE) -- $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) -+ $(CC) $^ $(LIB_CFLAGS) $(CFLAGS) $(LIB_LDFLAGS) $(LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) - ln -sf $(LIB_TARGET) $(LIB_SO) - ln -sf $(LIB_TARGET) $(LIB_SMAJOR) - -diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile -index c16d8f5..27635a7 100644 ---- a/dlm_tool/Makefile -+++ b/dlm_tool/Makefile -@@ -39,7 +39,7 @@ BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol - all: $(BIN_TARGET) - - $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ - - clean: - rm -f *.o *.so *.so.* $(BIN_TARGET) -diff --git a/fence/Makefile b/fence/Makefile -index 77bf0fd..2574382 100644 ---- a/fence/Makefile -+++ b/fence/Makefile -@@ -40,7 +40,7 @@ BIN_LDFLAGS += -ldl - all: $(BIN_TARGET) - - $(BIN_TARGET): $(BIN_SOURCE) -- $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. -+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L. - - clean: - rm -f *.o *.so *.so.* $(BIN_TARGET) -diff --git a/libdlm/Makefile b/libdlm/Makefile -index 336c22e..3352b0a 100644 ---- a/libdlm/Makefile -+++ b/libdlm/Makefile -@@ -77,27 +77,24 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -fdiagnostics-show-option \ - -fPIC - --LIB_CFLAGS += $(CFLAGS) -D_REENTRANT --LLT_CFLAGS += $(CFLAGS) -- --LIB_LDFLAGS += $(LDFLAGS) -lpthread --LLT_LDFLAGS += $(LDFLAGS) -+LIB_CFLAGS += -D_REENTRANT -+LIB_LDFLAGS += -lpthread - - all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC) - - $(LIB_O): $(SOURCE) -- $(CC) $< $(LIB_CFLAGS) -c -o $@ -+ $(CC) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@ - - $(LLT_O): $(SOURCE) -- $(CC) $< $(LLT_CFLAGS) -c -o $@ -+ $(CC) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@ - - $(LIB_TARGET): $(LIB_O) -- $(CC) $^ $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) -+ $(CC) $^ $(LIB_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) - ln -sf $(LIB_TARGET) $(LIB_SO) - ln -sf $(LIB_TARGET) $(LIB_SMAJOR) - - $(LLT_TARGET): $(LLT_O) -- $(CC) $^ $(LLT_LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) -+ $(CC) $^ $(LLT_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) - ln -sf $(LLT_TARGET) $(LLT_SO) - ln -sf $(LLT_TARGET) $(LLT_SMAJOR) - diff -Nru dlm-4.0.7/debian/rules dlm-4.0.8/debian/rules --- dlm-4.0.7/debian/rules 2018-04-25 21:31:59.000000000 +0000 +++ dlm-4.0.8/debian/rules 2019-01-15 14:25:16.000000000 +0000 @@ -17,7 +17,10 @@ DEFDIR=debian/dlm-controld/etc/default SDDIR= debian/dlm-controld/lib/systemd/system override_dh_install: - dh_install --fail-missing + dh_install mkdir -p "$(DEFDIR)" "$(SDDIR)" cp init/dlm.sysconfig "$(DEFDIR)"/dlm cp init/dlm.service "$(SDDIR)" + +override_dh_missing: + dh_missing --fail-missing diff -Nru dlm-4.0.7/debian/watch dlm-4.0.8/debian/watch --- dlm-4.0.7/debian/watch 2018-04-25 21:31:59.000000000 +0000 +++ dlm-4.0.8/debian/watch 2019-01-13 16:41:05.000000000 +0000 @@ -1,2 +1,5 @@ +# Upstream does not provide tarballs since 4.0.8, only tags, which +# we merge into the debian/master packaging branch directly. +# Thus this watch file is for the Debian QA dashboard only. version=4 -https://releases.pagure.org/dlm/ dlm-(.*).tar.gz debian uupdate +opts="mode=git" https://pagure.io/dlm.git refs/tags/dlm-([\d.]+) diff -Nru dlm-4.0.7/dlm_controld/action.c dlm-4.0.8/dlm_controld/action.c --- dlm-4.0.7/dlm_controld/action.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/action.c 2019-01-08 15:15:53.000000000 +0000 @@ -574,6 +574,7 @@ { char path[PATH_MAX]; char padded_addr[sizeof(struct sockaddr_storage)]; + struct sockaddr_storage *saddr = (struct sockaddr_storage *)addr; char buf[32]; int rv, fd; @@ -618,9 +619,31 @@ /* * set the address */ - memset(padded_addr, 0, sizeof(padded_addr)); - memcpy(padded_addr, addr, addrlen); + + if (local) { + if (saddr->ss_family == AF_INET && opt(enable_inaddr_any_ind) != 6) { + struct sockaddr_in *in4 = (struct sockaddr_in *)&padded_addr; + + if (opt(enable_inaddr_any_ind)) + in4->sin_addr.s_addr = INADDR_ANY; + else + memcpy(in4, addr, addrlen); + + in4->sin_family = AF_INET; + } else { + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)padded_addr; + struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; + + if (opt(enable_inaddr_any_ind)) + memcpy(in6->sin6_addr.s6_addr, &in6addr_any, sizeof(in6addr_any)); + else + memcpy(in6, addr, addrlen); + + in6->sin6_family = AF_INET6; + } + } else + memcpy(padded_addr, addr, addrlen); memset(path, 0, PATH_MAX); snprintf(path, PATH_MAX, "%s/%d/addr", COMMS_DIR, nodeid); diff -Nru dlm-4.0.7/dlm_controld/config.c dlm-4.0.8/dlm_controld/config.c --- dlm-4.0.7/dlm_controld/config.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/config.c 2019-01-08 15:15:53.000000000 +0000 @@ -210,6 +210,10 @@ if (!o) continue; + /* Doesn't make sense to set this in conf file. */ + if (!strcmp(str, "daemon_debug")) + continue; + o->file_set++; if (!o->req_arg) { diff -Nru dlm-4.0.7/dlm_controld/cpg.c dlm-4.0.8/dlm_controld/cpg.c --- dlm-4.0.7/dlm_controld/cpg.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/cpg.c 2019-01-08 15:15:53.000000000 +0000 @@ -6,6 +6,75 @@ * of the GNU General Public License v2 or (at your option) any later version. */ +/* + * . application in the kernel or userspace asks to join + * a lockspace + * + * . dlm_new_lockspace() in the kernel sets up basic + * lockspace structures, then sends a uevent to + * dlm_controld in userspace (KOBJ_ONLINE), asking + * dlm_controld to join the corosync group ("cpg") + * for the lockspace. dlm_new_lockspace() blocks + * waiting for a reply from dlm_controld (the reply is + * a write to the "event_done" sysfs file). + * When the successful reply comes back to dlm-kernel + * from dlm_controld, dlm-kernel knows it is now a member + * of the lockspace membership (represented in userspace + * by the corosync cpg), and can do locking with the + * other members. Before sending event_done to the kernel, + * dlm_controld tells dlm-kernel who the other lockspace + * members are via configfs settings. + * + * . When dlm_controld gets a request from dlm-kernel to + * join a lockspace, it runs dlm_join_lockspace() which + * calls cpg_join() to join the corosync group representing + * the members of the lockspace. dlm_controld will get + * callbacks from corosync when membership of this cpg + * changes (joins/leaves/failures). After calling + * cpg_join(), dlm_controld waits for the first + * corosync membership callback indicating it is now + * a member of the cpg. The callback function for + * cpg membership changes is confchg_cb(). Corosync + * guarantees that all members of the cpg see the + * same sequence of confchg callbacks (e.g. if a number + * of nodes are joining/leaving/failing at once). + * When the first confchg arrives after cpg_join(), + * dlm_controld sets up the current members for dlm-kernel + * via configfs, then writes to event_done in sysfs to start + * dlm-kernel running. + * + * . When a cpg member joins/leaves/fails, dlm_controld + * on all current members gets a confchg callback + * showing the new members. dlm_controld then stops + * dlm-kernel locking activity for that lockspace by + * writing 0 to the "control" sysfs file. + * dlm_controld then sends/recvs cpg messages to all + * other cpg members to act as barrier to ensure all + * members have stopped locking activity in the kernel + * (apply_changes()). When all have done this, + * dlm_controld on all the members then sets up the + * new members in the kernel (via configfs) and tells + * dlm-kernel to start the lockspace again (start_kernel()). + * + * . When dlm-kernel is started after being stopped, it does + * lockspace recovery based on changes to the membership. + * When recovery is done, normal locking activity resumes. + * + * Replacing dlm_controld is a matter doing the following + * steps by either manually setting up sysfs and configfs, + * or having a new daemon to do it: + * + * - decide who the lockspace members are + * - stop dlm-kernel before changing lockspace members (write to sysfs) + * - wait for previous step on all before making changes + * - tell dlm-kernel member nodeids/IPs in configfs (write to configfs) + * - start dlm-kernel (write to sysfs) + * + * echo 0/1 into /sys/kernel/dlm/foo/control and /sys/kernel/dlm/foo/event_done + * echo/mkdir/write values into /sys/kernel/config/dlm/cluster/comms/ and + * /sys/kernel/config/dlm/cluster/spaces/foo/ + */ + #include "dlm_daemon.h" #define log_limit(ls, fmt, args...) ({ \ diff -Nru dlm-4.0.7/dlm_controld/dlm.conf.5 dlm-4.0.8/dlm_controld/dlm.conf.5 --- dlm-4.0.7/dlm_controld/dlm.conf.5 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/dlm.conf.5 2019-01-08 15:15:53.000000000 +0000 @@ -34,12 +34,12 @@ Options: -daemon_debug -.br log_debug .br protocol .br +enable_inaddr_any=1 +.br debug_logfile .br enable_plock diff -Nru dlm-4.0.7/dlm_controld/dlm_controld.8 dlm-4.0.8/dlm_controld/dlm_controld.8 --- dlm-4.0.7/dlm_controld/dlm_controld.8 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/dlm_controld.8 2019-01-08 15:15:53.000000000 +0000 @@ -33,6 +33,14 @@ .I str dlm kernel lowcomms protocol: tcp, sctp, detect +.B --enable_inaddr_any +0|1|4|6 + enable binding to INADDR_ANY on the local node + 0=disabled, bind to local node IP address + 1=automatic, (based on local node IP address) + 4=bind to INADDR_ANY (IPv4) + 6=bind to IN6ADDR_ANY (IPv6/IPv4) + .B --debug_logfile | -L write debugging to log file diff -Nru dlm-4.0.7/dlm_controld/dlm_daemon.h dlm-4.0.8/dlm_controld/dlm_daemon.h --- dlm-4.0.7/dlm_controld/dlm_daemon.h 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/dlm_daemon.h 2019-01-08 15:15:53.000000000 +0000 @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -93,6 +94,7 @@ log_debug_ind, timewarn_ind, protocol_ind, + enable_inaddr_any_ind, debug_logfile_ind, enable_fscontrol_ind, enable_plock_ind, diff -Nru dlm-4.0.7/dlm_controld/main.c dlm-4.0.8/dlm_controld/main.c --- dlm-4.0.7/dlm_controld/main.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/main.c 2019-01-08 15:15:53.000000000 +0000 @@ -1281,6 +1281,11 @@ -1, "detect", "dlm kernel lowcomms protocol: tcp, sctp, detect"); + set_opt_default(enable_inaddr_any_ind, + "enable_inaddr_any", '\0', req_arg_int, + 0, NULL, + "local node to use inaddr_any: 0=disable, 1=auto, 4=IPv4, 6=IPv6"); + set_opt_default(debug_logfile_ind, "debug_logfile", 'L', no_arg, 0, NULL, diff -Nru dlm-4.0.7/dlm_controld/Makefile dlm-4.0.8/dlm_controld/Makefile --- dlm-4.0.7/dlm_controld/Makefile 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/Makefile 2019-01-08 15:15:53.000000000 +0000 @@ -31,40 +31,28 @@ rbtree.c LIB_SOURCE = lib.c -BIN_CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wall \ - -Wformat \ - -Wformat-security \ - -Wmissing-prototypes \ - -Wnested-externs \ - -Wpointer-arith \ - -Wextra -Wshadow \ - -Wcast-align \ - -Wwrite-strings \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Winline \ - -Wredundant-decls \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions \ - -fasynchronous-unwind-tables \ - -fdiagnostics-show-option \ +CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings \ + -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ + -fstack-clash-protection -Wl,-z,now -BIN_CFLAGS += -fPIE -DPIE +BIN_CFLAGS += $(CFLAGS) -fPIE -DPIE BIN_CFLAGS += -I../include -I../libdlm +LIB_CFLAGS += $(CFLAGS) -fPIC -BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie +BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum +LIB_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie -LIB_CFLAGS += $(BIN_CFLAGS) -LIB_LDFLAGS += -Wl,-z,relro -pie - +PKG_CONFIG ?= pkg-config ifeq ($(USE_SD_NOTIFY),yes) - BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \ + BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) \ -DUSE_SD_NOTIFY - BIN_LDFLAGS += $(shell pkg-config --libs libsystemd) + BIN_LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) endif all: $(LIB_TARGET) $(BIN_TARGET) @@ -73,7 +61,7 @@ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. $(LIB_TARGET): $(LIB_SOURCE) - $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) + $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) ln -sf $(LIB_TARGET) $(LIB_SO) ln -sf $(LIB_TARGET) $(LIB_SMAJOR) diff -Nru dlm-4.0.7/dlm_controld/member.c dlm-4.0.8/dlm_controld/member.c --- dlm-4.0.7/dlm_controld/member.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/member.c 2019-01-08 15:15:53.000000000 +0000 @@ -169,6 +169,9 @@ addrptr[j].address_length, (quorum_nodes[i] == our_nodeid)); + if (opt(enable_inaddr_any_ind) && + (quorum_nodes[i] == our_nodeid)) + break; } } } diff -Nru dlm-4.0.7/dlm_controld/plock.c dlm-4.0.8/dlm_controld/plock.c --- dlm-4.0.7/dlm_controld/plock.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_controld/plock.c 2019-01-08 15:15:53.000000000 +0000 @@ -687,8 +687,13 @@ static void write_result(struct lockspace *ls, struct dlm_plock_info *in, int rv) { + int write_rv; + in->rv = rv; - write(plock_device_fd, in, sizeof(struct dlm_plock_info)); + write_rv = write(plock_device_fd, in, sizeof(struct dlm_plock_info)); + if (write_rv < 0) + log_debug("write_result: write error %d fd %d\n", + errno, plock_device_fd); } static void do_waiters(struct lockspace *ls, struct resource *r) diff -Nru dlm-4.0.7/dlm_tool/Makefile dlm-4.0.8/dlm_tool/Makefile --- dlm-4.0.7/dlm_tool/Makefile 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/dlm_tool/Makefile 2019-01-08 15:15:53.000000000 +0000 @@ -8,38 +8,26 @@ BIN_SOURCE = main.c -BIN_CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wall \ - -Wformat \ - -Wformat-security \ - -Wmissing-prototypes \ - -Wnested-externs \ - -Wpointer-arith \ - -Wextra -Wshadow \ - -Wcast-align \ - -Wwrite-strings \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Winline \ - -Wredundant-decls \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions \ - -fasynchronous-unwind-tables \ - -fdiagnostics-show-option \ - -BIN_CFLAGS += -fPIE -DPIE -BIN_CFLAGS += -I../include -I../libdlm -I../dlm_controld - -BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie -BIN_LDFLAGS += -L../libdlm -L../dlm_controld -BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol +CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings \ + -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ + -fstack-clash-protection -Wl,-z,now + +CFLAGS += -fPIE -DPIE +CFLAGS += -I../include -I../libdlm -I../dlm_controld + +LDFLAGS += -Wl,-z,relro -pie +LDFLAGS += -L../libdlm -L../dlm_controld +LDFLAGS += -lpthread -ldlm -ldlmcontrol all: $(BIN_TARGET) $(BIN_TARGET): $(BIN_SOURCE) - $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ + $(CC) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ clean: rm -f *.o *.so *.so.* $(BIN_TARGET) diff -Nru dlm-4.0.7/fence/Makefile dlm-4.0.8/fence/Makefile --- dlm-4.0.7/fence/Makefile 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/fence/Makefile 2019-01-08 15:15:53.000000000 +0000 @@ -8,39 +8,27 @@ BIN_SOURCE = stonith_helper.c -BIN_CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wall \ - -Wformat \ - -Wformat-security \ - -Wmissing-prototypes \ - -Wnested-externs \ - -Wpointer-arith \ - -Wextra -Wshadow \ - -Wcast-align \ - -Wwrite-strings \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Winline \ - -Wredundant-decls \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions \ - -fasynchronous-unwind-tables \ - -fdiagnostics-show-option \ - -BIN_CFLAGS += -fPIE -DPIE -BIN_CFLAGS += `xml2-config --cflags` -BIN_CFLAGS += -I../include - -BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie -BIN_LDFLAGS += `xml2-config --libs` -BIN_LDFLAGS += -ldl +CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings \ + -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ + -fstack-clash-protection -Wl,-z,now + +CFLAGS += -fPIE -DPIE +CFLAGS += `xml2-config --cflags` +CFLAGS += -I../include + +LDFLAGS += -Wl,-z,relro -pie +LDFLAGS += `xml2-config --libs` +LDFLAGS += -ldl all: $(BIN_TARGET) $(BIN_TARGET): $(BIN_SOURCE) - $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L. + $(CC) $(BIN_SOURCE) $(CFLAGS) $(LDFLAGS) -o $@ -L. clean: rm -f *.o *.so *.so.* $(BIN_TARGET) diff -Nru dlm-4.0.7/include/version.cf dlm-4.0.8/include/version.cf --- dlm-4.0.7/include/version.cf 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/include/version.cf 2019-01-08 15:15:53.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef _RELEASE_VERSION_CF_ #define _RELEASE_VERSION_CF_ -#define RELEASE_VERSION "4.0.7" +#define RELEASE_VERSION "4.0.8" #endif diff -Nru dlm-4.0.7/libdlm/libdlm.c dlm-4.0.8/libdlm/libdlm.c --- dlm-4.0.7/libdlm/libdlm.c 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/libdlm/libdlm.c 2019-01-08 15:15:53.000000000 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef HAVE_SELINUX #include #endif diff -Nru dlm-4.0.7/libdlm/Makefile dlm-4.0.8/libdlm/Makefile --- dlm-4.0.7/libdlm/Makefile 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/libdlm/Makefile 2019-01-08 15:15:53.000000000 +0000 @@ -72,10 +72,14 @@ -Wno-sign-compare \ -Wno-unused-parameter \ -Wp,-D_FORTIFY_SOURCE=2 \ + -Wp,-D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong \ + -fstack-clash-protection \ -fexceptions \ -fasynchronous-unwind-tables \ -fdiagnostics-show-option \ - -fPIC + -fPIC \ + -Wl,-z,now LIB_CFLAGS += $(CFLAGS) -D_REENTRANT LLT_CFLAGS += $(CFLAGS) diff -Nru dlm-4.0.7/Makefile dlm-4.0.8/Makefile --- dlm-4.0.7/Makefile 2016-12-19 15:01:53.000000000 +0000 +++ dlm-4.0.8/Makefile 2019-01-08 15:15:53.000000000 +0000 @@ -1,2 +1,2 @@ all install clean: %: - for d in libdlm dlm_controld dlm_tool fence; do $(MAKE) -C $$d $@; done + set -e; for d in libdlm dlm_controld dlm_tool fence; do $(MAKE) -C $$d $@; done diff -Nru dlm-4.0.7/README.rst dlm-4.0.8/README.rst --- dlm-4.0.7/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ dlm-4.0.8/README.rst 2019-01-08 15:15:53.000000000 +0000 @@ -0,0 +1,3 @@ +| ``See https://pagure.io/dlm`` +| ``See dlm_controld(8) at dlm.git/dlm_controld/dlm_controld.8`` +| ``See dlm.conf(5) at dlm.git/dlm_controld/dlm.conf.5``