From 7970c80edd2257b09692474b3bda0d5629fa099f07d26ca88ec18e1e10ab80a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 22 Aug 2018 12:42:47 +0000 Subject: [PATCH] Accepting request 630909 from home:kbabioch:branches:devel:libraries:c_c++ - Added curl-switch-off-all-styles.patch: Fix output of wrong escape sequences, which might mess up the terminal (bsc#1105624) OBS-URL: https://build.opensuse.org/request/show/630909 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=229 --- curl-mini.changes | 6 ++++++ curl-mini.spec | 2 ++ curl-switch-off-all-styles.patch | 30 ++++++++++++++++++++++++++++++ curl.changes | 6 ++++++ curl.spec | 2 ++ 5 files changed, 46 insertions(+) create mode 100644 curl-switch-off-all-styles.patch diff --git a/curl-mini.changes b/curl-mini.changes index 40eb40f..767d829 100644 --- a/curl-mini.changes +++ b/curl-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 22 12:32:50 UTC 2018 - kbabioch@suse.com + +- Added curl-switch-off-all-styles.patch: Fix output of wrong escape sequences, + which might mess up the terminal (bsc#1105624) + ------------------------------------------------------------------- Tue Jul 17 13:56:05 UTC 2018 - pgajdos@suse.com diff --git a/curl-mini.spec b/curl-mini.spec index f4f5bd8..af7bb41 100644 --- a/curl-mini.spec +++ b/curl-mini.spec @@ -46,6 +46,7 @@ Patch3: ignore_runtests_failure.patch # PATCH-FIX-OPENSUSE bsc#1076446 protocol redirection not supported or disabled Patch4: curl-disabled-redirect-protocol-message.patch Patch5: curl-use_OPENSSL_config.patch +Patch6: curl-switch-off-all-styles.patch BuildRequires: libtool BuildRequires: pkgconfig Requires: libcurl4%{?mini} = %{version} @@ -126,6 +127,7 @@ user interaction or any kind of interactivity. %endif %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build # curl complains if macro definition is contained in CFLAGS diff --git a/curl-switch-off-all-styles.patch b/curl-switch-off-all-styles.patch new file mode 100644 index 0000000..8129efe --- /dev/null +++ b/curl-switch-off-all-styles.patch @@ -0,0 +1,30 @@ +From 1b62b1704581fed8cd01e18cffe6676667e3a7f4 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 12 Jul 2018 11:04:00 +0200 +Subject: [PATCH] header output: switch off all styles, not just unbold + +... the "unbold" sequence doesn't work on the mac Terminal. + +Reported-by: Zero King +Fixes #2736 +Closes #2738 +--- + src/tool_cb_hdr.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c +index 88ce5e13b8..6419b72048 100644 +--- a/src/tool_cb_hdr.c ++++ b/src/tool_cb_hdr.c +@@ -42,7 +42,10 @@ static char *parse_filename(const char *ptr, size_t len); + #define BOLDOFF + #else + #define BOLD "\x1b[1m" +-#define BOLDOFF "\x1b[21m" ++/* Switch off bold by settting "all attributes off" since the explicit ++ bold-off code (21) isn't supported everywhere - like in the mac ++ Terminal. */ ++#define BOLDOFF "\x1b[0m" + #endif + + /* diff --git a/curl.changes b/curl.changes index 40eb40f..767d829 100644 --- a/curl.changes +++ b/curl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 22 12:32:50 UTC 2018 - kbabioch@suse.com + +- Added curl-switch-off-all-styles.patch: Fix output of wrong escape sequences, + which might mess up the terminal (bsc#1105624) + ------------------------------------------------------------------- Tue Jul 17 13:56:05 UTC 2018 - pgajdos@suse.com diff --git a/curl.spec b/curl.spec index 6665438..c4f2b58 100644 --- a/curl.spec +++ b/curl.spec @@ -44,6 +44,7 @@ Patch3: ignore_runtests_failure.patch # PATCH-FIX-OPENSUSE bsc#1076446 protocol redirection not supported or disabled Patch4: curl-disabled-redirect-protocol-message.patch Patch5: curl-use_OPENSSL_config.patch +Patch6: curl-switch-off-all-styles.patch BuildRequires: libtool BuildRequires: pkgconfig Requires: libcurl4%{?mini} = %{version} @@ -124,6 +125,7 @@ user interaction or any kind of interactivity. %endif %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build # curl complains if macro definition is contained in CFLAGS