aports/main/s390-tools/argz.patch
omni 1036034170 main/s390-tools: upgrade to 2.16.0
[AC: add patches for iucvterm and zkey ekmfweb install rules,
 change CFLAGS use to CPPFLAGS so that zkey paths don't get
 clobbered.]
2021-03-29 10:09:16 -06:00

167 lines
5.1 KiB
Diff

diff --git a/Makefile b/Makefile
index 6081acc..fe8dd2f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/ar
# Include common definitions
include common.mak
-LIB_DIRS = libvtoc libutil libzds libdasd libvmdump libccw libvmcp libekmfweb
+LIB_DIRS = libargz libvtoc libutil libzds libdasd libvmdump libccw libvmcp libekmfweb
TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \
tape390 osasnmpd qetharp ip_watcher qethconf scripts zconf \
vmconvert vmcp man mon_tools dasdinfo vmur ipl_tools \
diff --git a/common.mak b/common.mak
index 0a5fd69..c6f429c 100644
--- a/common.mak
+++ b/common.mak
@@ -329,6 +329,10 @@ endif
# check the library directory via "make -C" when the tools Makefile is
# processed.
+$(rootdir)/libargz/libargz.a: $(rootdir)/libargz
+ $(MAKE) -C $(rootdir)/libargz/ libargz.a
+.PHONY: $(rootdir)/libargz
+
$(rootdir)/libutil/libutil.a: $(rootdir)/libutil
$(MAKE) -C $(rootdir)/libutil/ libutil.a
.PHONY: $(rootdir)/libutil
diff --git a/zconf/chp/Makefile b/zconf/chp/Makefile
index 2e3065f..486d469 100644
--- a/zconf/chp/Makefile
+++ b/zconf/chp/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
all: chchp lschp
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
chchp: chchp.o $(libs)
lschp: lschp.o $(libs)
diff --git a/zconf/css/Makefile b/zconf/css/Makefile
index 2a36820..749cc6e 100644
--- a/zconf/css/Makefile
+++ b/zconf/css/Makefile
@@ -2,7 +2,8 @@
include ../../common.mak
libs = $(rootdir)/libccw/libccw.a \
- $(rootdir)/libutil/libutil.a
+ $(rootdir)/libutil/libutil.a \
+ $(rootdir)/libargz/libargz.a
objects = lscss.o misc.o
diff --git a/zconf/qeth/Makefile b/zconf/qeth/Makefile
index 43716a3..f69d4f0 100644
--- a/zconf/qeth/Makefile
+++ b/zconf/qeth/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
all: lsqeth
-libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libvmcp/libvmcp.a $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
lsqeth: lsqeth.o misc.o $(libs)
diff --git a/zconf/scm/Makefile b/zconf/scm/Makefile
index 12faf44..1d9ec36 100644
--- a/zconf/scm/Makefile
+++ b/zconf/scm/Makefile
@@ -2,7 +2,7 @@ include ../../common.mak
all: lsscm
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
lsscm: lsscm.o $(libs)
diff --git a/zconf/zcrypt/Makefile b/zconf/zcrypt/Makefile
index d075f34..a1744a4 100644
--- a/zconf/zcrypt/Makefile
+++ b/zconf/zcrypt/Makefile
@@ -2,7 +2,7 @@
all: chzcrypt lszcrypt zcryptctl zcryptstats
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
chzcrypt: chzcrypt.o misc.o $(libs)
lszcrypt: lszcrypt.o misc.o $(libs)
diff --git a/zkey/Makefile b/zkey/Makefile
index a44b14b..48c02fb 100644
--- a/zkey/Makefile
+++ b/zkey/Makefile
@@ -32,7 +32,7 @@
INSTALL_TARGETS += zkey-cryptsetup-skip-cryptsetup2
endif
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\"
@@ -90,11 +90,11 @@
ep11.h misc.h utils.h
kms.o: kms.c kms.h kms-plugin.h utils.h pkey.h
-zkey: LDLIBS = -ldl -lcrypto
+zkey: LDLIBS = -ldl -lcrypto $(LIBEXECINFO_LIBS)
zkey: zkey.o pkey.o cca.o ep11.o properties.o keystore.o utils.o kms.o $(libs)
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
-zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto
+zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c -lcrypto $(LIBEXECINFO_LIBS)
zkey-cryptsetup: zkey-cryptsetup.o pkey.o cca.o ep11.o utils.o $(libs)
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
--- a/zkey/ekmfweb/Makefile
+++ b/zkey/ekmfweb/Makefile
@@ -5,7 +5,7 @@ VERM = $(shell echo $(VERSION) | cut -d
all: zkey-ekmfweb.so
-libs = $(rootdir)/libutil/libutil.a
+libs = $(rootdir)/libutil/libutil.a $(rootdir)/libargz/libargz.a
zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \
../cca.h ../utils.h ../pkey.h ../properties.h \
@@ -27,7 +27,8 @@ utils.o: ../utils.c ../utils.h ../pkey.h
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@
zkey-ekmfweb.so: ALL_CFLAGS += -fPIC
-zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto
+zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto \
+ $(LIBEXECINFO_LIBS)
zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \
-Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM)
zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs)
diff --git a/zkey/keystore.c b/zkey/keystore.c
index 9dcac07..2f87798 100644
--- a/zkey/keystore.c
+++ b/zkey/keystore.c
@@ -23,6 +23,7 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <fcntl.h>
#include "lib/util_base.h"
#include "lib/util_libc.h"
diff --git a/libutil/Makefile b/libutil/Makefile
index ca90f2a..3042f3d 100644
--- a/libutil/Makefile
+++ b/libutil/Makefile
@@ -1,6 +1,6 @@
include ../common.mak
-lib = libutil.a
+lib = libutil.a $(rootdir)/libargz/libargz.a
examples = util_base_example \
util_panic_example \