- rebased to 2.7.1

This commit is contained in:
Dan Horák 2019-01-02 08:44:15 -05:00
parent 95b85f6150
commit 51e189a385
4 changed files with 36 additions and 49 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ src_vipa-2.0.4.tar.gz
/s390-tools-2.5.0.tar.gz
/s390-tools-2.6.0.tar.gz
/s390-tools-2.7.0.tar.gz
/s390-tools-2.7.1.tar.gz

View File

@ -1,18 +1,19 @@
From 8ec7b75204f3c7bf691e14b89c73c5dd28d2a824 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 15 Oct 2018 13:54:16 -0400
Subject: [PATCH] blscfg: sort like rpm nvr, not like a single version
Signed-off-by: Peter Jones <pjones@redhat.com>
---
zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++-
zipl/src/Makefile | 3 +-
2 files changed, 96 insertions(+), 3 deletions(-)
diff --git a/zipl/src/scan.c b/zipl/src/scan.c
index fe72e9ab13d..63186222783 100644
--- a/zipl/src/scan.c
+++ b/zipl/src/scan.c
diff -up s390-tools-2.7.1/zipl/src/Makefile.blscfg-rpm-nvr-sort s390-tools-2.7.1/zipl/src/Makefile
--- s390-tools-2.7.1/zipl/src/Makefile.blscfg-rpm-nvr-sort 2019-01-02 07:46:02.847225675 -0500
+++ s390-tools-2.7.1/zipl/src/Makefile 2019-01-02 07:48:51.267225675 -0500
@@ -8,7 +8,8 @@ ALL_CPPFLAGS += -I../include -I../boot \
ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
libs = $(rootdir)/libu2s/libu2s.a \
- $(rootdir)/libutil/libutil.a
+ $(rootdir)/libutil/libutil.a \
+ -lrpm
objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \
install.o zipl.o $(rootdir)/zipl/boot/data.o
diff -up s390-tools-2.7.1/zipl/src/scan.c.blscfg-rpm-nvr-sort s390-tools-2.7.1/zipl/src/scan.c
--- s390-tools-2.7.1/zipl/src/scan.c.blscfg-rpm-nvr-sort 2018-12-13 09:57:25.000000000 -0500
+++ s390-tools-2.7.1/zipl/src/scan.c 2019-01-02 07:46:02.847225675 -0500
@@ -33,6 +33,8 @@
#include "lib/util_base.h"
@ -22,7 +23,7 @@ index fe72e9ab13d..63186222783 100644
#include "boot.h"
#include "error.h"
#include "misc.h"
@@ -652,14 +654,104 @@ bls_filter(const struct dirent *ent)
@@ -652,13 +654,103 @@ bls_filter(const struct dirent *ent)
return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0;
}
@ -63,8 +64,9 @@ index fe72e9ab13d..63186222783 100644
+ *release = NULL;
+ }
+}
+
+static int
static int
-bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
+split_cmp(char *nvr0, char *nvr1, int has_name)
+{
+ int ret = 0;
@ -95,7 +97,8 @@ index fe72e9ab13d..63186222783 100644
+/* 0: filename0 and filename1 are the same version */
+/* -1: filename1 is newer than filename0 */
+static int bls_cmp(const char *filename0, const char *filename1)
+{
{
- return strverscmp((*ent_a)->d_name, (*ent_b)->d_name);
+ char *id0, *id1;
+ int l, r;
+
@ -116,33 +119,13 @@ index fe72e9ab13d..63186222783 100644
+ free(id1);
+
+ return r;
}
+static int
+bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
+{
+ return bls_cmp((*ent_a)->d_name, (*ent_b)->d_name);
+}
static int
bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
{
- return strverscmp((*ent_a)->d_name, (*ent_b)->d_name);
+ return bls_cmp((*ent_a)->d_name, (*ent_b)->d_name);
}
-
static int
scan_append_section_heading(struct scan_token* scan, int* index, char* name);
static int
diff --git a/zipl/src/Makefile b/zipl/src/Makefile
index 1634c0d5121..bc797990652 100644
--- a/zipl/src/Makefile
+++ b/zipl/src/Makefile
@@ -11,7 +11,8 @@ ALL_CPPFLAGS += -I../include -I../boot \
ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
libs = $(rootdir)/libutil/libutil.a \
- $(rootdir)/libu2s/libu2s.a
+ $(rootdir)/libu2s/libu2s.a \
+ -lrpm
objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \
install.o zipl.o $(rootdir)/zipl/boot/data.o
--
2.17.1

View File

@ -3,8 +3,8 @@
Name: s390utils
Summary: Utilities and daemons for IBM z Systems
Group: System Environment/Base
Version: 2.7.0
Release: 4%{?dist}
Version: 2.7.1
Release: 1%{?dist}
Epoch: 2
License: MIT
ExclusiveArch: s390 s390x
@ -29,7 +29,7 @@ Source24: 91-zipl.install
# change the defaults to match Fedora environment
Patch0: s390-tools-zipl-invert-script-options.patch
Patch3: 0007-blscfg-sort-like-rpm-nvr-not-like-a-single-version.patch
Patch3: s390-tools-zipl-blscfg-rpm-nvr-sort.patch
# https://github.com/ibm-s390-tools/s390-tools/pull/47
Patch5: s390-tools-zipl-title-section-name.patch
@ -749,6 +749,9 @@ User-space development files for the s390/s390x architecture.
%changelog
* Wed Jan 02 2019 Dan Horák <dan[at]danny.cz> - 2:2.7.1-1
- rebased to 2.7.1
* Wed Dec 05 2018 Dan Horák <dan[at]danny.cz> - 2:2.7.0-4
- fix deps for dropped cmsfs subpackage

View File

@ -1,2 +1,2 @@
SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7
SHA512 (s390-tools-2.7.0.tar.gz) = f1c41f251d77ab7776def1569c2e8c424571b1fda9b3d6921fcf65bbfaa7c9dfc585a89e839ba00813ce4ee462ff525e3cf36d6dd02bf64b62ae81f2d4b7ca7d
SHA512 (s390-tools-2.7.1.tar.gz) = e2e17ee30b88f8b5bb1cf54638b8320fe1b125686496e9487afd641d72329523695f51097b564303f5c761733de637abc9dd5f3e4579b1c5ad1521e0252f93a0