From 3064c5a57278c284ae3be229fc2ba808d6e036f2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 10 Mar 2025 15:39:32 +0000 Subject: [PATCH] Rebase to libnbd 1.22.1 resolves: RHEL-78831 Fix nbdinfo with dark theme resolves: RHEL-7119 --- ...ease-notes-1.22.pod-Set-release-date.patch | 25 ------- ...-for-export-headings-instead-of-blac.patch | 73 +++++++++++++++++++ libnbd.spec | 10 ++- sources | 4 +- 4 files changed, 81 insertions(+), 31 deletions(-) delete mode 100644 0001-docs-libnbd-release-notes-1.22.pod-Set-release-date.patch create mode 100644 0001-info-Use-magenta-for-export-headings-instead-of-blac.patch diff --git a/0001-docs-libnbd-release-notes-1.22.pod-Set-release-date.patch b/0001-docs-libnbd-release-notes-1.22.pod-Set-release-date.patch deleted file mode 100644 index 1160928..0000000 --- a/0001-docs-libnbd-release-notes-1.22.pod-Set-release-date.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a6e16c3b81f59baffd3530ead7a6617166113dbb Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 11 Feb 2025 14:00:16 +0000 -Subject: [PATCH] docs/libnbd-release-notes-1.22.pod: Set release date - ---- - docs/libnbd-release-notes-1.22.pod | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/libnbd-release-notes-1.22.pod b/docs/libnbd-release-notes-1.22.pod -index 13307085..6deb95b6 100644 ---- a/docs/libnbd-release-notes-1.22.pod -+++ b/docs/libnbd-release-notes-1.22.pod -@@ -7,7 +7,7 @@ libnbd-release-notes-1.22 - release notes for libnbd 1.22 - These are the release notes for libnbd stable release 1.22. - This describes the major changes since 1.20. - --libnbd 1.22.0 was released on B. -+libnbd 1.22.0 was released on B<11 February 2025>. - - =head2 Security - --- -2.47.1 - diff --git a/0001-info-Use-magenta-for-export-headings-instead-of-blac.patch b/0001-info-Use-magenta-for-export-headings-instead-of-blac.patch new file mode 100644 index 0000000..e9cd1c9 --- /dev/null +++ b/0001-info-Use-magenta-for-export-headings-instead-of-blac.patch @@ -0,0 +1,73 @@ +From 7e75a5666bf4078030a7334def14c67c2eeab1f6 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 10 Mar 2025 15:18:06 +0000 +Subject: [PATCH] info: Use magenta for export headings, instead of black + +Use of black foreground text makes the text invisible when using a +dark theme. Use a magenta colour instead which works on both light +and dark background. + +Reported-by: Ming Xie +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2221199 +Fixes: https://issues.redhat.com/browse/RHEL-7119 +--- + info/main.c | 2 -- + info/show.c | 6 ++---- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/info/main.c b/info/main.c +index 8aa6cb74..1ee9e329 100644 +--- a/info/main.c ++++ b/info/main.c +@@ -358,7 +358,6 @@ main (int argc, char *argv[]) + + if (!json_output) { + if (protocol) { +- ansi_colour (ANSI_FG_GREY, fp); + fprintf (fp, "protocol: %s", protocol); + if (tls_negotiated >= 0) + fprintf (fp, " %s TLS", tls_negotiated ? "with" : "without"); +@@ -367,7 +366,6 @@ main (int argc, char *argv[]) + eh_negotiated ? "extended" : + sr_negotiated ? "structured" : "simple"); + fprintf (fp, "\n"); +- ansi_restore (fp); + } + } + else { +diff --git a/info/show.c b/info/show.c +index 1596eb77..4886dad5 100644 +--- a/info/show.c ++++ b/info/show.c +@@ -131,7 +131,7 @@ show_one_export (struct nbd_handle *nbd, const char *desc, + content = get_content (nbd, size); + + if (!json_output) { +- ansi_colour (ANSI_FG_BOLD_BLACK, fp); ++ ansi_colour (ANSI_FG_BRIGHT_MAGENTA, fp); + fprintf (fp, "export="); + /* Might as well use the JSON function to get an escaped string here ... */ + print_json_string (export_name); +@@ -148,10 +148,9 @@ show_one_export (struct nbd_handle *nbd, const char *desc, + fprintf (fp, "\texport-size: %s\n", size_str); + if (content) + fprintf (fp, "\tcontent: %s\n", content); ++ ansi_restore (fp); + if (uri) + fprintf (fp, "\turi: %s\n", uri); +- ansi_restore (fp); +- ansi_colour (ANSI_FG_GREY, fp); + if (show_context) { + fprintf (fp, "\tcontexts:\n"); + for (i = 0; i < contexts.len; ++i) +@@ -160,7 +159,6 @@ show_one_export (struct nbd_handle *nbd, const char *desc, + if (is_rotational >= 0) + fprintf (fp, "\t%s: %s\n", "is_rotational", + is_rotational ? "true" : "false"); +- ansi_restore (fp); + if (is_read_only >= 0) + fprintf (fp, "\t%s: %s\n", "is_read_only", + is_read_only ? "true" : "false"); +-- +2.47.1 + diff --git a/libnbd.spec b/libnbd.spec index e0c1480..bf8a5d1 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -20,7 +20,7 @@ %global source_directory 1.22-stable Name: libnbd -Version: 1.22.0 +Version: 1.22.1 Release: 1%{?dist} Summary: NBD client library in userspace @@ -41,7 +41,7 @@ Source3: copy-patches.sh # https://gitlab.com/nbdkit/libnbd/-/commits/rhel-10.1/ # Patches. -Patch0001: 0001-docs-libnbd-release-notes-1.22.pod-Set-release-date.patch +Patch0001: 0001-info-Use-magenta-for-export-headings-instead-of-blac.patch %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -382,10 +382,12 @@ make %{?_smp_mflags} check || { %changelog -* Mon Feb 24 2025 Richard W.M. Jones - 1.22.0-1 -- Rebase to libnbd 1.22.0 +* Mon Mar 10 2025 Richard W.M. Jones - 1.22.1-1 +- Rebase to libnbd 1.22.1 - Synch spec file with Fedora Rawhide. - resolves: RHEL-78831 +- Fix nbdinfo with dark theme + resolves: RHEL-7119 * Wed Oct 30 2024 Troy Dawson - 1.20.3-2 - Bump release for October 2024 mass rebuild: diff --git a/sources b/sources index 252c230..98368e0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.22.0.tar.gz) = 68204a00d35cd6356e302543f993609cb39fb58c7b5478e9d6a4afafaf6ca91723b8586b4319502aadf546b2e9d5508089ed483a461d7857e6cad9d8f833fa36 -SHA512 (libnbd-1.22.0.tar.gz.sig) = 070a6ead2df7fe5b8158dfd96b8b0ae0c8434d52fa0e903b89f0fe5709a8c361ba8c21e1cb8eecf56abe7093bb0d257422bbeda801a28482625995d99cfa51b6 +SHA512 (libnbd-1.22.1.tar.gz) = 3f265ed59020c394c5e1f46c51d0ae7f3e7e54461739da964ac92b5c4c8bc98ea9813b93342e025f5f770b688d16d155d6e74d715beab482a040115df6be5afa +SHA512 (libnbd-1.22.1.tar.gz.sig) = fd56b7ff28c3c8ecc39dc8433fe8b8e3852b2ce66fe003cb614957f3d6f09850c042f820098fe4a3039863320faf037657cfbafbc3a902ecc0849f771ea544c4