Skip to contentSkip to conversation

fix build, replace GZIP with GZIPCMD

PATCH In review Christian Hesse 2 participants 2 messages Sep 9, 2014 – Sep 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix build, replace GZIP with GZIPCMD

Files are compressed by gzip. In Makefiles the variable GZIP is used, this evaluates to 'gzip gzip' on my system.

From man gzip:

Quoted 3 lines

The environment variable GZIP can hold a set of
default options for gzip. These options are interpreted first and can be overwritten by explicit command line parameters.

So using any other variable name fixes this.

---
 Makefile.inc             | 2 +-
 kpartx/Makefile          | 2 +-
 libmpathpersist/Makefile | 4 ++--
 mpathpersist/Makefile    | 2 +-
 multipathd/Makefile      | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Makefile.inc +1 -1
index 20ae23e..662b1a2 100644
@@ -42,7 +42,7 @@ libdir	    = $(prefix)/$(LIB)/multipath
 unitdir     = $(prefix)/usr/lib/systemd/system
 mpathpersistdir = $(TOPDIR)/libmpathpersist
 
-GZIP        = gzip -9 -c
+GZIPCMD        = gzip -9 -c
 INSTALL_PROGRAM = install
 
 ifndef RPM_OPT_FLAGS
kpartx/Makefile +1 -1
index 4ba38ba..d533c9e 100644
@@ -21,7 +21,7 @@ all: $(EXEC)
 
 $(EXEC): $(OBJS)
 	$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
-	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
+	$(GZIPCMD) $(EXEC).8 > $(EXEC).8.gz
 
 install: $(EXEC) $(EXEC).8
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
libmpathpersist/Makefile +2 -2
index c4ec1c5..323465e 100644
@@ -22,8 +22,8 @@ $(LIBS):
 	$(CC) -Wall -fPIC -c $(CFLAGS) *.c 
 	$(CC)  -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
 	ln -s $(LIBS) $(DEVLIB)
-	$(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz	
-	$(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz	
+	$(GZIPCMD) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
+	$(GZIPCMD) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
 
 install: $(LIBS)
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
mpathpersist/Makefile +1 -1
index ad8e607..0f4965f 100644
@@ -13,7 +13,7 @@ all: $(EXEC)
 
 $(EXEC): $(OBJS)
 	$(CC) -g $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS)
-	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
+	$(GZIPCMD) $(EXEC).8 > $(EXEC).8.gz
 	
 install:
 	install -d $(DESTDIR)$(bindir)
multipathd/Makefile +1 -1
index 901d1e4..b405036 100644
@@ -40,7 +40,7 @@ all : $(EXEC)
 
 $(EXEC): $(OBJS)
 	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC)
-	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
+	$(GZIPCMD) $(EXEC).8 > $(EXEC).8.gz
 
 install:
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
Signature · 1 line
2.1.0
#1 lore raw

Dne 9.9.2014 v 10:28 Christian Hesse napsal(a):

Quoted 22 lines

Files are compressed by gzip. In Makefiles the variable GZIP is used, this evaluates to 'gzip gzip' on my system.

Quoted 4 lines

From man gzip:
The environment variable GZIP can hold a set of
default options for gzip. These options are interpreted first and can be overwritten by explicit command line parameters.

So using any other variable name fixes this.

---
  Makefile.inc             | 2 +-
  kpartx/Makefile          | 2 +-
  libmpathpersist/Makefile | 4 ++--
  mpathpersist/Makefile    | 2 +-
  multipathd/Makefile      | 2 +-
  5 files changed, 6 insertions(+), 6 deletions(-)
Makefile.inc +0 -0
index 20ae23e..662b1a2 100644

Makefile.inc libdir = $(prefix)/$(LIB)/multipath · line 46

Quoted 6 lines
Makefile.inc +1 -1
@@ -42,7 +42,7 @@ libdir	    = $(prefix)/$(LIB)/multipath
  unitdir     = $(prefix)/usr/lib/systemd/system
  mpathpersistdir = $(TOPDIR)/libmpathpersist
 
-GZIP        = gzip -9 -c
+GZIPCMD        = gzip -9 -c
  INSTALL_PROGRAM = install

This rather looks like a bug in your system you should fix locally.

kpartx/Makefile all: $(EXEC) · line 24

Quoted 12 lines
Makefile.inc +0 -0
  ifndef RPM_OPT_FLAGS
kpartx/Makefile +1 -1
index 4ba38ba..d533c9e 100644
@@ -21,7 +21,7 @@ all: $(EXEC)
 
  $(EXEC): $(OBJS)
  	$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
-	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
+	$(GZIPCMD) $(EXEC).8 > $(EXEC).8.gz

Probably pastbin output of your makefile processing here. Together with your environmental vars.

libmpathpersist/Makefile $(LIBS): · line 26

Quoted 10 lines
libmpathpersist/Makefile +2 -2
@@ -22,8 +22,8 @@ $(LIBS):
  	$(CC) -Wall -fPIC -c $(CFLAGS) *.c
  	$(CC)  -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
  	ln -s $(LIBS) $(DEVLIB)
-	$(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz	
-	$(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz	
+	$(GZIPCMD) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
+	$(GZIPCMD) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz

On the other hand - I'm quite puzzled why upstream build bothers to compress man pages?

Common practice is to leave this up-to distro packagers to maintain compressed man pages?

Or is there some new guide line for projects to build man pages in compressed form?

Zdenek