- update to 1.5.0

This commit is contained in:
Dan Horák 2021-03-17 14:33:19 +01:00
parent f3ff2bef9f
commit 2a796260f7
5 changed files with 147 additions and 7 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/smc-tools-1.1.0.tar.gz
/smc-tools-1.2.0.tar.gz
/smc-tools-1.3.1.tar.gz
/smc-tools-1.5.0.tar.gz

View File

@ -0,0 +1,90 @@
diff --git a/Makefile b/Makefile
index 427fc71..b80eaf1 100644
--- a/Makefile
+++ b/Makefile
@@ -61,16 +61,16 @@ endif
all: libsmc-preload.so libsmc-preload32.so smcd smcr smcss smc_pnet
CFLAGS ?= -Wall -O3 -g
-ALL_CFLAGS = -DSMC_TOOLS_RELEASE=$(SMC_TOOLS_RELEASE) $(CFLAGS)
-
ifneq ($(shell sh -c 'command -v pkg-config'),)
-SMC_PNET_CFLAGS = $(shell pkg-config --silence-errors --cflags libnl-genl-3.0)
-SMC_PNET_LFLAGS = $(shell pkg-config --silence-errors --libs libnl-genl-3.0)
+LIBNL_CFLAGS = $(shell pkg-config --silence-errors --cflags libnl-genl-3.0)
+LIBNL_LFLAGS = $(shell pkg-config --silence-errors --libs libnl-genl-3.0)
else
-SMC_PNET_CFLAGS = -I /usr/include/libnl3
-SMC_PNET_LFLAGS = -lnl-genl-3 -lnl-3
+LIBNL_CFLAGS = -I /usr/include/libnl3
+LIBNL_LFLAGS = -lnl-genl-3 -lnl-3
endif
-CFLAGS += ${SMC_PNET_CFLAGS}
+ALL_CFLAGS += ${CFLAGS} -DSMC_TOOLS_RELEASE=$(SMC_TOOLS_RELEASE) \
+ ${LIBNL_CFLAGS} ${OPTFLAGS}
+ALL_LDFLAGS += ${LDFLAGS} ${LIBNL_LFLAGS}
ifeq ($(ARCHTYPE),s390x)
MACHINE_OPT32="-m31"
@@ -79,23 +79,23 @@ else
endif
util.o: util.c util.h
- ${CCC} ${CFLAGS} -c util.c
+ ${CCC} ${ALL_CFLAGS} -c util.c
libnetlink.o: libnetlink.c libnetlink.h
- ${CCC} ${CFLAGS} ${LDFLAGS} -c libnetlink.c
+ ${CCC} ${ALL_CFLAGS} ${ALL_LDFLAGS} -c libnetlink.c
smc-preload.o: smc-preload.c
- ${CCC} ${CFLAGS} -fPIC -c smc-preload.c
+ ${CCC} ${ALL_CFLAGS} -fPIC -c smc-preload.c
libsmc-preload.so: smc-preload.o
- ${LINK} ${LDFLAGS} -shared smc-preload.o -ldl -Wl,-z,defs,-soname,$@.$(VER_MAJOR) -o $@
+ ${LINK} ${ALL_LDFLAGS} -shared smc-preload.o -ldl -Wl,-z,defs,-soname,$@.$(VER_MAJOR) -o $@
chmod u+s $@
libsmc-preload32.so: smc-preload.c
ifeq ($(ARCH),64)
ifeq ($(STUFF_32BIT),1)
- ${CCC} ${CFLAGS} -fPIC -c ${MACHINE_OPT32} $< -o smc-preload32.o
- ${LINK} ${LDFLAGS} -shared smc-preload32.o ${MACHINE_OPT32} -ldl -Wl,-soname,$@.$(VER_MAJOR) -o $@
+ ${CCC} ${ALL_CFLAGS} -fPIC -c ${MACHINE_OPT32} $< -o smc-preload32.o
+ ${LINK} ${ALL_LDFLAGS} -shared smc-preload32.o ${MACHINE_OPT32} -ldl -Wl,-soname,$@.$(VER_MAJOR) -o $@
chmod u+s $@
else
$(warning "Warning: Skipping 31/32-bit library build because 31/32-bit build tools")
@@ -116,13 +116,13 @@ endif
${CCC} ${ALL_CFLAGS} -c $< -o $@
smc: smc.o dev.o linkgroup.o libnetlink.o util.o
- ${CCC} ${ALL_CFLAGS} ${LDFLAGS} $^ ${SMC_PNET_LFLAGS} -o $@
+ ${CCC} ${ALL_CFLAGS} ${ALL_LDFLAGS} $^ -o $@
smcd: smcd.o infod.o devd.o linkgroupd.o libnetlink.o util.o
- ${CCC} ${ALL_CFLAGS} ${LDFLAGS} $^ ${SMC_PNET_LFLAGS} -o $@
+ ${CCC} ${ALL_CFLAGS} $^ ${ALL_LDFLAGS} -o $@
smcr: smcr.o infor.o devr.o linkgroupr.o libnetlink.o util.o
- ${CCC} ${ALL_CFLAGS} ${LDFLAGS} $^ ${SMC_PNET_LFLAGS} -o $@
+ ${CCC} ${ALL_CFLAGS} $^ ${ALL_LDFLAGS} -o $@
smc_pnet: smc_pnet.c smctools_common.h
@if [ ! -e /usr/include/libnl3/netlink/netlink.h ]; then \
@@ -135,12 +135,10 @@ smc_pnet: smc_pnet.c smctools_common.h
printf "**************************************************************\n" >&2; \
exit 1; \
fi
- ${CCC} ${ALL_CFLAGS} ${SMC_PNET_CFLAGS} ${LDFLAGS} -o $@ $< ${SMC_PNET_LFLAGS}
+ ${CCC} ${ALL_CFLAGS} $< ${ALL_LDFLAGS} -o $@
smcss: smcss.o libnetlink.o
- ${CCC} ${ALL_CFLAGS} ${LDFLAGS} $^ ${SMC_PNET_LFLAGS} -o $@
-#smcss: smcss.c smctools_common.h libnetlink.h
-# ${CCC} ${ALL_CFLAGS} ${LDFLAGS} $< -o $@
+ ${CCC} ${ALL_CFLAGS} $^ ${ALL_LDFLAGS} -o $@
install: all
echo " INSTALL"

View File

@ -0,0 +1,29 @@
From c3d1f45abff2433afefaea9d31cd9cda0a7408d3 Mon Sep 17 00:00:00 2001
From: Stefan Raspl <raspl@de.ibm.com>
Date: Mon, 8 Feb 2021 16:43:01 +0100
Subject: [PATCH] Makefile: Install smc_chk.8 on s390 only
Since smc_chk depends on smc_rnics (which is s390-only), we should not
install the man-page on non-s390 platforms, too.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
---
Makefile | 2 +-
README.md | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index a9068d0..427fc71 100644
--- a/Makefile
+++ b/Makefile
@@ -161,9 +161,9 @@ ifeq ($(shell uname -m | cut -c1-4),s390)
install $(INSTALL_FLAGS_BIN) smc_rnics $(DESTDIR)$(BINDIR)
install $(INSTALL_FLAGS_MAN) smc_rnics.8 $(DESTDIR)$(MANDIR)/man8
install $(INSTALL_FLAGS_BIN) smc_chk $(DESTDIR)$(BINDIR)
+ install $(INSTALL_FLAGS_MAN) smc_chk.8 $(DESTDIR)$(MANDIR)/man8
endif
install $(INSTALL_FLAGS_MAN) af_smc.7 $(DESTDIR)$(MANDIR)/man7
- install $(INSTALL_FLAGS_MAN) smc_chk.8 $(DESTDIR)$(MANDIR)/man8
install $(INSTALL_FLAGS_MAN) smc_run.8 $(DESTDIR)$(MANDIR)/man8
install $(INSTALL_FLAGS_MAN) smc_pnet.8 $(DESTDIR)$(MANDIR)/man8
install $(INSTALL_FLAGS_MAN) smcss.8 $(DESTDIR)$(MANDIR)/man8

View File

@ -1,17 +1,28 @@
Name: smc-tools
Version: 1.3.1
Release: 2%{?dist}
Version: 1.5.0
Release: 1%{?dist}
Summary: Shared Memory Communication Tools
License: EPL
URL: https://www.ibm.com/developerworks/linux/linux390/smc-tools.html
Source0: https://public.dhe.ibm.com/software/dw/linux390/ht_src/%{name}-%{version}.tar.gz
URL: https://github.com/ibm-s390-linux/smc-tools
Source0: https://github.com/ibm-s390-linux/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
# https://github.com/ibm-s390-linux/smc-tools/commit/c3d1f45abff2433afefaea9d31cd9cda0a7408d3
Patch0: smc-tools-1.5.0-makefile.patch
# https://github.com/ibm-s390-linux/smc-tools/issues/1
Patch1: smc-tools-1.5.0-flags.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: libnl3-devel
BuildRequires: bash-completion
%ifarch s390 s390x
# for smc_chk
Requires: python3
Requires: man
%endif
%description
The Shared Memory Communication Tools (smc-tools) package enables usage of SMC
@ -31,24 +42,33 @@ sockets in Linux.
%files
%license LICENSE
%doc README.smctools
%doc README.md
%{_bindir}/smcd
%{_bindir}/smcr
%{_bindir}/smc_dbg
%{_bindir}/smc_pnet
%{_bindir}/smc_run
%{_bindir}/smcss
%{_libdir}/libsmc-preload.so*
%{_mandir}/man7/af_smc.7*
%{_mandir}/man8/smcd*.8*
%{_mandir}/man8/smcr*.8*
%{_mandir}/man8/smc_pnet.8*
%{_mandir}/man8/smc_run.8*
%{_mandir}/man8/smcss.8*
%ifarch s390 s390x
%{_bindir}/smc_chk
%{_bindir}/smc_rnics
%{_mandir}/man8/smc_chk.8*
%{_mandir}/man8/smc_rnics.8*
%endif
%{_datadir}/bash-completion/
%changelog
* Wed Mar 17 2021 Dan Horák <dan@danny.cz> - 1.5.0-1
- update to 1.5.0
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (smc-tools-1.3.1.tar.gz) = b2252d5283e3481f1909e1de198d8aaafe7dd1e7ebc506567840a69e9ef3771c10d498aa435e1954ae9e286b9c3b7df6407ad7db981f74faca3cabc233bbd9df
SHA512 (smc-tools-1.5.0.tar.gz) = 3e28b4084308332ee60dc7f412a56e630cb72fbb5033e0bf4a21bccaed434c33b9e6720358bb614fba6d9513d3225d7df91d62523a6d27eadc80191700c7d78b