* [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable
@ 2022-01-09 10:29 Sergei Trofimovich
2022-01-09 10:29 ` [dm-devel] [PATCH 2/4] multipath-tools: autodiscover libdevmapper.h headers Sergei Trofimovich
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sergei Trofimovich @ 2022-01-09 10:29 UTC (permalink / raw)
To: dm-devel; +Cc: Sergei Trofimovich, Martin Wilck
`gzip` supports (deprecated) `GZIP` environment variable. If it's
already present Makefile would override it and pass it through causing
thre breakage:
$ dev>GZIP=-n make
gzip -9 -c mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
gzip: -c: option not valid in GZIP environment variable
Try `gzip --help' for more information.
Fix build by renaming GZIP variable to GZIP_PROG to avoid collision.
CC: Martin Wilck <mwilck@suse.com>
CC: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
---
Makefile.inc | 2 +-
kpartx/Makefile | 2 +-
libmpathpersist/Makefile | 4 ++--
mpathpersist/Makefile | 2 +-
multipath/Makefile | 4 ++--
multipathd/Makefile | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index b340f2ae..59856f24 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -75,7 +75,7 @@ nvmedir = $(TOPDIR)/libmultipath/nvme
includedir = $(prefix)/usr/include
pkgconfdir = $(usrlibdir)/pkgconfig
-GZIP = gzip -9 -c
+GZIP_PROG = gzip -9 -c
RM = rm -f
LN = ln -sf
INSTALL_PROGRAM = install
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 2906a984..9be115d6 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -21,7 +21,7 @@ all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
+ $(GZIP_PROG) $(EXEC).8 > $(EXEC).8.gz
install: $(EXEC) $(EXEC).8
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile
index 1e6399d6..ccdc3223 100644
--- a/libmpathpersist/Makefile
+++ b/libmpathpersist/Makefile
@@ -33,8 +33,8 @@ $(DEVLIB): $(LIBS)
$(LN) $(LIBS) $@
man:
- $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
- $(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
+ $(GZIP_PROG) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
+ $(GZIP_PROG) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
install: all
$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
diff --git a/mpathpersist/Makefile b/mpathpersist/Makefile
index 51268010..de66b644 100644
--- a/mpathpersist/Makefile
+++ b/mpathpersist/Makefile
@@ -14,7 +14,7 @@ all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS)
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
+ $(GZIP_PROG) $(EXEC).8 > $(EXEC).8.gz
install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
diff --git a/multipath/Makefile b/multipath/Makefile
index 0828a8f7..3f12d75b 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -16,8 +16,8 @@ all: $(EXEC)
$(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
- $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
+ $(GZIP_PROG) $(EXEC).8 > $(EXEC).8.gz
+ $(GZIP_PROG) $(EXEC).conf.5 > $(EXEC).conf.5.gz
install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
diff --git a/multipathd/Makefile b/multipathd/Makefile
index 393b6cbb..64df2214 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -40,7 +40,7 @@ all : $(EXEC)
$(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS)
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
+ $(GZIP_PROG) $(EXEC).8 > $(EXEC).8.gz
cli_handlers.o: cli_handlers.c
$(CC) $(CFLAGS) -Wno-unused-parameter -c -o $@ $<
--
2.34.1
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread* [dm-devel] [PATCH 2/4] multipath-tools: autodiscover libdevmapper.h headers 2022-01-09 10:29 [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Sergei Trofimovich @ 2022-01-09 10:29 ` Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 3/4] multipath-tools: autodiscover libudev.h headers Sergei Trofimovich ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Sergei Trofimovich @ 2022-01-09 10:29 UTC (permalink / raw) To: dm-devel; +Cc: Sergei Trofimovich, Martin Wilck On NixOS nothing is installed in /usr/include and instead lives in it's own prefix. pkg-config variables are expected to be used for installation discovery: $ pkg-config --variable=includedir devmapper /nix/store/c30fr0ahpa285sjkjgiinc2rr68ysmid-lvm2-2.03.14-dev/include The change switches libdevmapper.h discovery to pkg-config provided path. CC: Martin Wilck <mwilck@suse.com> CC: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Sergei Trofimovich <slyich@gmail.com> --- Makefile.inc | 8 ++++++++ kpartx/Makefile | 2 +- libmultipath/Makefile | 10 +++++----- multipathd/Makefile | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 59856f24..3b50395f 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -52,6 +52,14 @@ ifndef SYSTEMDPATH SYSTEMDPATH=usr/lib endif +ifndef DEVMAPPER_INCDIR + ifeq ($(shell $(PKGCONFIG) --modversion devmapper >/dev/null 2>&1 && echo 1), 1) + DEVMAPPER_INCDIR = $(shell $(PKGCONFIG) --variable=includedir devmapper) + else + DEVMAPPER_INCDIR = /usr/include + endif +endif + prefix = exec_prefix = $(prefix) usr_prefix = $(prefix) diff --git a/kpartx/Makefile b/kpartx/Makefile index 9be115d6..d2943a99 100644 --- a/kpartx/Makefile +++ b/kpartx/Makefile @@ -8,7 +8,7 @@ LDFLAGS += $(BIN_LDFLAGS) LIBDEPS += -ldevmapper -ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_COOKIE endif diff --git a/libmultipath/Makefile b/libmultipath/Makefile index d4af1a54..be48775d 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile @@ -21,15 +21,15 @@ ifdef SYSTEMD endif endif -ifneq ($(call check_func,dm_task_no_flush,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_no_flush,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE endif -ifneq ($(call check_func,dm_task_get_errno,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_get_errno,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_GET_ERRNO endif -ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_COOKIE endif @@ -37,11 +37,11 @@ ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,/usr/include/libud CFLAGS += -DLIBUDEV_API_RECVBUF endif -ifneq ($(call check_func,dm_task_deferred_remove,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_deferred_remove,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_DEFERRED endif -ifneq ($(call check_func,dm_hold_control_dev,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_hold_control_dev,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_HOLD_CONTROL endif diff --git a/multipathd/Makefile b/multipathd/Makefile index 64df2214..5f4ef6c2 100644 --- a/multipathd/Makefile +++ b/multipathd/Makefile @@ -1,6 +1,6 @@ include ../Makefile.inc -ifneq ($(call check_func,dm_task_get_errno,/usr/include/libdevmapper.h),0) +ifneq ($(call check_func,dm_task_get_errno,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) CFLAGS += -DLIBDM_API_GET_ERRNO endif -- 2.34.1 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [dm-devel] [PATCH 3/4] multipath-tools: autodiscover libudev.h headers 2022-01-09 10:29 [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 2/4] multipath-tools: autodiscover libdevmapper.h headers Sergei Trofimovich @ 2022-01-09 10:29 ` Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 4/4] multipath-tools: allow passing non-standard linux-headers location Sergei Trofimovich 2022-01-10 18:29 ` [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Martin Wilck 3 siblings, 0 replies; 5+ messages in thread From: Sergei Trofimovich @ 2022-01-09 10:29 UTC (permalink / raw) To: dm-devel; +Cc: Sergei Trofimovich, Martin Wilck On NixOS nothing is installed in /usr/include and instead lives in it's own prefix. pkg-config variables are expected to be used for installation discovery: $ pkg-config --variable=includedir libudev /nix/store/27mwkz5zhzw0gip8y7pvjyma5r0hzzaw-systemd-249.7-dev/include The change switches libudev.h discovery to pkg-config provided path. CC: Martin Wilck <mwilck@suse.com> CC: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Sergei Trofimovich <slyich@gmail.com> --- Makefile.inc | 8 ++++++++ libmultipath/Makefile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index 3b50395f..f5509db4 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -60,6 +60,14 @@ ifndef DEVMAPPER_INCDIR endif endif +ifndef LIBUDEV_INCDIR + ifeq ($(shell $(PKGCONFIG) --modversion libudev >/dev/null 2>&1 && echo 1), 1) + LIBUDEV_INCDIR = $(shell $(PKGCONFIG) --variable=includedir libudev) + else + LIBUDEV_INCDIR = /usr/include + endif +endif + prefix = exec_prefix = $(prefix) usr_prefix = $(prefix) diff --git a/libmultipath/Makefile b/libmultipath/Makefile index be48775d..46972faf 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile @@ -33,7 +33,7 @@ ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h), CFLAGS += -DLIBDM_API_COOKIE endif -ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,/usr/include/libudev.h),0) +ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,$(LIBUDEV_INCDIR)/libudev.h),0) CFLAGS += -DLIBUDEV_API_RECVBUF endif -- 2.34.1 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [dm-devel] [PATCH 4/4] multipath-tools: allow passing non-standard linux-headers location 2022-01-09 10:29 [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 2/4] multipath-tools: autodiscover libdevmapper.h headers Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 3/4] multipath-tools: autodiscover libudev.h headers Sergei Trofimovich @ 2022-01-09 10:29 ` Sergei Trofimovich 2022-01-10 18:29 ` [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Martin Wilck 3 siblings, 0 replies; 5+ messages in thread From: Sergei Trofimovich @ 2022-01-09 10:29 UTC (permalink / raw) To: dm-devel; +Cc: Sergei Trofimovich, Martin Wilck On NixOS nothing is installed in /usr/include and instead lives in it's own prefix. The change switches linux/nvme_ioctl.h discovery to user provided path. CC: Martin Wilck <mwilck@suse.com> CC: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Sergei Trofimovich <slyich@gmail.com> --- Makefile.inc | 5 +++++ libmultipath/prioritizers/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index f5509db4..a7d16dfd 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -68,6 +68,11 @@ ifndef LIBUDEV_INCDIR endif endif +# Allow user to override default location. +ifndef LINUX_HEADERS_INCDIR + LINUX_HEADERS_INCDIR = /usr/include +endif + prefix = exec_prefix = $(prefix) usr_prefix = $(prefix) diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile index 8d34ae32..16c63977 100644 --- a/libmultipath/prioritizers/Makefile +++ b/libmultipath/prioritizers/Makefile @@ -23,7 +23,7 @@ LIBS = \ libpriopath_latency.so \ libpriosysfs.so -ifneq ($(call check_file,/usr/include/linux/nvme_ioctl.h),0) +ifneq ($(call check_file,$(LINUX_HEADERS_INCDIR)/linux/nvme_ioctl.h),0) LIBS += libprioana.so CFLAGS += -I../nvme endif -- 2.34.1 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable 2022-01-09 10:29 [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Sergei Trofimovich ` (2 preceding siblings ...) 2022-01-09 10:29 ` [dm-devel] [PATCH 4/4] multipath-tools: allow passing non-standard linux-headers location Sergei Trofimovich @ 2022-01-10 18:29 ` Martin Wilck 3 siblings, 0 replies; 5+ messages in thread From: Martin Wilck @ 2022-01-10 18:29 UTC (permalink / raw) To: Sergei Trofimovich, dm-devel On Sun, 2022-01-09 at 10:29 +0000, Sergei Trofimovich wrote: > `gzip` supports (deprecated) `GZIP` environment variable. If it's > already present Makefile would override it and pass it through > causing > thre breakage: > > $ dev>GZIP=-n make > gzip -9 -c mpath_persistent_reserve_in.3 > > mpath_persistent_reserve_in.3.gz > gzip: -c: option not valid in GZIP environment variable > Try `gzip --help' for more information. > > Fix build by renaming GZIP variable to GZIP_PROG to avoid collision. > > CC: Martin Wilck <mwilck@suse.com> > CC: Benjamin Marzinski <bmarzins@redhat.com> > Signed-off-by: Sergei Trofimovich <slyich@gmail.com> For the series: Looks good, no breakage found, so Reviewed-by: Martin Wilck <mwilck@suse.com> -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-10 18:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-01-09 10:29 [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 2/4] multipath-tools: autodiscover libdevmapper.h headers Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 3/4] multipath-tools: autodiscover libudev.h headers Sergei Trofimovich 2022-01-09 10:29 ` [dm-devel] [PATCH 4/4] multipath-tools: allow passing non-standard linux-headers location Sergei Trofimovich 2022-01-10 18:29 ` [dm-devel] [PATCH 1/4] multipath-tools: avoid using GZIP Makefile variable Martin Wilck
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.