Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1562439 Details for
Bug 1704263
zipl fails the BLS title field contains trailing spaces and is set as default
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
zipl-remove-trailing-spaces-from-the-fields-defined-.patch
zipl-remove-trailing-spaces-from-the-fields-defined-.patch (text/plain), 4.61 KB, created by
Javier Martinez Canillas
on 2019-05-03 13:10:25 UTC
(
hide
)
Description:
zipl-remove-trailing-spaces-from-the-fields-defined-.patch
Filename:
MIME Type:
Creator:
Javier Martinez Canillas
Created:
2019-05-03 13:10:25 UTC
Size:
4.61 KB
patch
obsolete
>From b5a5e5fe56a6404103baa9aa9542b480a3813c66 Mon Sep 17 00:00:00 2001 >From: Javier Martinez Canillas <javierm@redhat.com> >Date: Fri, 3 May 2019 14:35:54 +0200 >Subject: [PATCH] - zipl: remove trailing spaces from the fields defined in BLS > files (#1704263) - Resolves: #1704263 - source /etc/os-release in > 20-zipl-kernel.install to generate proper title - Related: #1704263 > >Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> >--- > 20-zipl-kernel.install | 1 + > s390-tools-zipl-remove-trailing-spaces.patch | 49 ++++++++++++++++++++ > s390utils.spec | 11 ++++- > 3 files changed, 60 insertions(+), 1 deletion(-) > create mode 100644 s390-tools-zipl-remove-trailing-spaces.patch > >diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install >index 1978b115672..bc2e4f6cda5 100755 >--- a/20-zipl-kernel.install >+++ b/20-zipl-kernel.install >@@ -1,6 +1,7 @@ > #!/bin/bash > > [[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel >+[[ -f /etc/os-release ]] && . /etc/os-release > > COMMAND="$1" > KERNEL_VERSION="$2" >diff --git a/s390-tools-zipl-remove-trailing-spaces.patch b/s390-tools-zipl-remove-trailing-spaces.patch >new file mode 100644 >index 00000000000..b6d6ff035f4 >--- /dev/null >+++ b/s390-tools-zipl-remove-trailing-spaces.patch >@@ -0,0 +1,49 @@ >+From 3880757f2973b2ab62f2650a509130531669ce9c Mon Sep 17 00:00:00 2001 >+From: Javier Martinez Canillas <javierm@redhat.com> >+Date: Fri, 3 May 2019 13:52:01 +0200 >+Subject: [PATCH] zipl: remove trailing spaces from the fields defined in BLS >+ files >+ >+Currently the zipl tool doesn't remove trailing spaces from the BLS field >+values. So for example if a 'title' field has trailing spaces and is used >+as the default, zipl will complain that there's no section with that name: >+ >+Using config file '/etc/zipl.conf' >+Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-4.18.0-80.20.el8.s390x.conf' >+Using BLS config file '/boot/loader/entries/f871a0cf218348c5ba921f61c92b7eac-0-rescue.conf' >+Error: Config file '/etc/zipl.conf': Line 6: no such section 'Red Hat Enterprise Linux (4.18.0-80.20.el8.s390x) 8.1 (Ootpa)' >+ >+Since the trailing spaces are also removed from the fields defined in the >+zipl.conf file, do the same for the ones that are defined in the BLS file. >+ >+Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> >+--- >+ zipl/src/scan.c | 5 +++++ >+ 1 file changed, 5 insertions(+) >+ >+diff --git a/zipl/src/scan.c b/zipl/src/scan.c >+index 127d84856d1..b42b5f2cecf 100644 >+--- a/zipl/src/scan.c >++++ b/zipl/src/scan.c >+@@ -699,6 +699,10 @@ scan_bls_field(struct misc_file_buffer *file, struct scan_token* scan, >+ } >+ >+ val_end = file->pos; >++ >++ while (val_end > val_start && isblank(file->buffer[val_end - 1])) >++ val_end--; >++ >+ file->buffer[key_end] = '\0'; >+ file->buffer[val_end] = '\0'; >+ >+@@ -780,6 +784,7 @@ scan_bls(const char* blsdir, struct scan_token** token, int scan_size) >+ case EOF: >+ break; >+ case '\t': >++ case '\n': >+ case '\0': >+ case ' ': >+ file.pos++; >+-- >+2.21.0 >+ >diff --git a/s390utils.spec b/s390utils.spec >index 9f336e2c838..958b7f0761d 100644 >--- a/s390utils.spec >+++ b/s390utils.spec >@@ -5,7 +5,7 @@ Name: s390utils > Summary: Utilities and daemons for IBM z Systems > Group: System Environment/Base > Version: 2.6.0 >-Release: 14%{?dist} >+Release: 15%{?dist} > Epoch: 2 > License: MIT > ExclusiveArch: s390 s390x >@@ -41,6 +41,8 @@ Patch101: s390-tools-zipl-fiemap.patch > Patch102: s390-tools-zipl-sort-like-rpm.patch > # https://github.com/ibm-s390-tools/s390-tools/pull/47 > Patch103: s390-tools-zipl-title-section-name.patch >+# https://github.com/ibm-s390-tools/s390-tools/pull/62 >+Patch104: s390-tools-zipl-remove-trailing-spaces.patch > > Patch1000: cmsfs-1.1.8-warnings.patch > Patch1001: cmsfs-1.1.8-kernel26.patch >@@ -76,6 +78,7 @@ be used together with the zSeries (s390) Linux kernel and device drivers. > %patch101 -p1 -b .zipl-fiemap > %patch102 -p1 -b .zipl-sort-like-rpm > %patch103 -p1 -b .zipl-title-section-name >+%patch104 -p1 -b .zipl-remove-trailing-spaces > > # > # cmsfs >@@ -837,6 +840,12 @@ User-space development files for the s390/s390x architecture. > > > %changelog >+* Fri May 03 2019 Javier Martinez Canillas <javierm@redhat.com> - 2:2.6.0-15 >+- zipl: remove trailing spaces from the fields defined in BLS files (#1704263) >+- Resolves: #1704263 >+- source /etc/os-release in 20-zipl-kernel.install to generate proper title >+- Related: #1704263 >+ > * Wed Feb 27 2019 Dan Horák <dhorak@redhat.com> - 2:2.6.0-14 > - pkey: Support autoloading kernel pkey module (#1664632) > - Related: #1664632 >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1704263
: 1562439