- fix build with non-standard %dist

This commit is contained in:
Dan Horák 2018-01-22 16:51:08 +01:00
parent 2136cc04f3
commit 732529cc93
2 changed files with 115 additions and 1 deletions

View File

@ -0,0 +1,107 @@
From 05de40cdeb0e1343343692e621a4bd6010d8cf6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 22 Jan 2018 12:32:19 +0100
Subject: [PATCH] Replace delimiter char in sed expressions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Use a character, that can't be used in rpm Version and Release tag, as
the delimiter in sed expressions.
Fixes: #25
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
hmcdrvfs/Makefile | 2 +-
ip_watcher/Makefile | 2 +-
qethconf/Makefile | 2 +-
scripts/Makefile | 4 ++--
zconf/Makefile | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hmcdrvfs/Makefile b/hmcdrvfs/Makefile
index 5144c15..5d81031 100644
--- a/hmcdrvfs/Makefile
+++ b/hmcdrvfs/Makefile
@@ -49,7 +49,7 @@ install: all install-scripts
install-scripts: lshmc
@for i in $^; do \
cat $$i | \
- sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(USRSBINDIR)/$$i; \
chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
diff --git a/ip_watcher/Makefile b/ip_watcher/Makefile
index d0190e7..0e9df39 100644
--- a/ip_watcher/Makefile
+++ b/ip_watcher/Makefile
@@ -8,7 +8,7 @@ clean:
rm -f *.o core xcec-bridge
install: ip_watcher.pl xcec-bridge start_hsnc.sh
- $(SED) -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ $(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< start_hsnc.sh >$(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/start_hsnc.sh; \
diff --git a/qethconf/Makefile b/qethconf/Makefile
index e320b45..0b099a2 100644
--- a/qethconf/Makefile
+++ b/qethconf/Makefile
@@ -3,7 +3,7 @@ include ../common.mak
all:
install: qethconf
- $(SED) -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ $(SED) -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
< qethconf >$(DESTDIR)$(BINDIR)/qethconf; \
chown $(OWNER).$(GROUP) $(DESTDIR)$(BINDIR)/qethconf; \
chmod 755 $(DESTDIR)$(BINDIR)/qethconf; \
diff --git a/scripts/Makefile b/scripts/Makefile
index f0c2ff7..dc5b0f0 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -10,13 +10,13 @@ install:
@for i in $(SCRIPTS); \
do \
cat $$i | \
- sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(BINDIR)/$$i; \
chown $(OWNER):$(GROUP) $(DESTDIR)$(BINDIR)/$$i; \
chmod 755 $(DESTDIR)$(BINDIR)/$$i; \
done
- sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' cpictl > \
+ sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' cpictl > \
$(DESTDIR)$(TOOLS_LIBDIR)/cpictl
chown $(OWNER):$(GROUP) $(DESTDIR)$(TOOLS_LIBDIR)/cpictl
chmod 775 $(DESTDIR)$(TOOLS_LIBDIR)/cpictl
diff --git a/zconf/Makefile b/zconf/Makefile
index a4acd8f..008b598 100644
--- a/zconf/Makefile
+++ b/zconf/Makefile
@@ -23,7 +23,7 @@ install: install-scripts install-manpages install-usrsbin-scripts $(SUB_DIRS)
install-scripts: $(SCRIPTS)
@for i in $^; do \
cat $$i | \
- sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(BINDIR)/$$i; \
chown $(OWNER).$(GROUP) $(DESTDIR)$(BINDIR)/$$i; \
chmod 755 $(DESTDIR)$(BINDIR)/$$i; \
@@ -32,7 +32,7 @@ install-scripts: $(SCRIPTS)
install-usrsbin-scripts: $(USRSBIN_SCRIPTS)
@for i in $^; do \
cat $$i | \
- sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(USRSBINDIR)/$$i; \
chown $(OWNER).$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
--
2.13.6

View File

@ -5,7 +5,7 @@ Name: s390utils
Summary: Utilities and daemons for IBM z Systems
Group: System Environment/Base
Version: 2.2.0
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 2
License: MIT
ExclusiveArch: s390 s390x
@ -28,6 +28,9 @@ Source16: ccw_init
Source17: ccw.udev
Source21: normalize_dasd_arg
# https://github.com/ibm-s390-tools/s390-tools/commit/05de40cdeb0e1343343692e621a4bd6010d8cf6b
Patch0: s390-tools-2.2.0-delim.patch
Patch1000: cmsfs-1.1.8-warnings.patch
Patch1001: cmsfs-1.1.8-kernel26.patch
Patch1002: cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch
@ -51,6 +54,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers.
%prep
%setup -q -n s390-tools-%{version} -a 4 -a 6
%patch0 -p1
# Fedora/RHEL changes
# none
@ -785,6 +789,9 @@ User-space development files for the s390/s390x architecture.
%changelog
* Mon Jan 22 2018 Dan Horák <dan[at]danny.cz> - 2:2.2.0-2
- fix build with non-standard %%dist
* Thu Dec 07 2017 Dan Horák <dan[at]danny.cz> - 2:2.2.0-1
- rebased to 2.2.0