From 21f2aa80fa368ea05588d0d201e3ff21c6981980 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 09:12:09 +0000 Subject: [PATCH 01/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- nano.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nano.spec b/nano.spec index 9297826..dfedc16 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 7.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 7.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 79ad8577efd06cea1136a6aff638e5b6f005d820 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 08:36:22 +0000 Subject: [PATCH 02/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- nano.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nano.spec b/nano.spec index dfedc16..3b3b548 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 7.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 7.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From af8d44ce1212483795e28797141530ed299a9bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 2 May 2024 10:09:43 +0200 Subject: [PATCH 03/14] rebase to latest upstream version Resolves: rhbz#2278126 --- .gitignore | 4 ++-- nano.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1fe7111..4de06d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/nano-[3-7].*.tar.xz -/nano-[3-7].*.tar.xz.asc +/nano-[3-8].*.tar.xz +/nano-[3-8].*.tar.xz.asc diff --git a/nano.spec b/nano.spec index 3b3b548..30fd8ac 100644 --- a/nano.spec +++ b/nano.spec @@ -7,8 +7,8 @@ Summary: A small text editor Name: nano -Version: 7.2 -Release: 6%{?dist} +Version: 8.0 +Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu May 02 2024 Lukáš Zaoral - 8.0-1 +- rebase to latest upstream version (rhbz#2278126) + * Thu Jan 25 2024 Fedora Release Engineering - 7.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 2dd8566..0401079 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-7.2.tar.xz.asc) = 3ba3921c892ab3121cfe86ff37ab709c592d49524624c132fa32e22129b988ce5c6cac28f6b2fa7f1967ab3799dbc1652695c92ea91c576c378c2a2302b0f7b8 -SHA512 (nano-7.2.tar.xz) = a6dfa70edab62e439a9a998ca214f2415d57dbdc01766ad2e4b14048836557a32755f8b09de13c6a89023f215b61d2854017b389eae8d097ca6f3ba73ce2f583 +SHA512 (nano-8.0.tar.xz.asc) = a9208b0e4e5a54c9f13e7dd2ba4cad4b4542aff25230825faafe1e5149c1da7be3e615ab85ab5090ee7d97076e36963c2792ee06a8f10f7f4df46f7e8d2101e5 +SHA512 (nano-8.0.tar.xz) = 86c484428b8805768fd580d0f62aa32ce8f588f4beedcdd35a4014506b562928c7a2fa6487aa0d853b4c9c1639a4d186f46b4e96721568ff81191d5098403ca8 From 9be9f6d5d4ded27ec9b470c19ad530628365eb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 6 May 2024 10:24:11 +0200 Subject: [PATCH 04/14] fix emergency file replacement vulnerability Resolves: rhbz#2277586 --- nano-7.2-emergency-file-replace-vuln.patch | 96 ++++++++++++++++++++++ nano.spec | 7 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 nano-7.2-emergency-file-replace-vuln.patch diff --git a/nano-7.2-emergency-file-replace-vuln.patch b/nano-7.2-emergency-file-replace-vuln.patch new file mode 100644 index 0000000..cde32de --- /dev/null +++ b/nano-7.2-emergency-file-replace-vuln.patch @@ -0,0 +1,96 @@ +From 5e7a3c2e7e118c7f12d5dfda9f9140f638976aa2 Mon Sep 17 00:00:00 2001 +From: Benno Schulenberg +Date: Sun, 28 Apr 2024 10:51:52 +0200 +Subject: files: run `chmod` and `chown` on the descriptor, not on the filename + +This closes a window of opportunity where the emergency file could be +replaced by a malicious symlink. + +The issue was reported by `MartinJM` and `InvisibleMeerkat`. + +Problem existed since version 2.2.0, commit 123110c5, when chmodding +and chowning of the emergency .save file was added. +--- + src/definitions.h | 2 +- + src/files.c | 13 ++++++++++++- + src/nano.c | 12 +----------- + 3 files changed, 14 insertions(+), 13 deletions(-) + +diff --git a/src/definitions.h b/src/definitions.h +index af3a793..55d8235 100644 +--- a/src/definitions.h ++++ b/src/definitions.h +@@ -288,7 +288,7 @@ typedef enum { + } message_type; + + typedef enum { +- OVERWRITE, APPEND, PREPEND ++ OVERWRITE, APPEND, PREPEND, EMERGENCY + } kind_of_writing_type; + + typedef enum { +diff --git a/src/files.c b/src/files.c +index 57c2001..584b579 100644 +--- a/src/files.c ++++ b/src/files.c +@@ -1763,6 +1763,8 @@ bool write_file(const char *name, FILE *thefile, bool normal, + #endif + char *realname = real_dir_from_tilde(name); + /* The filename after tilde expansion. */ ++ int fd = 0; ++ /* The descriptor that is assigned when opening the file. */ + char *tempname = NULL; + /* The name of the temporary file we use when prepending. */ + linestruct *line = openfile->filetop; +@@ -1846,7 +1848,6 @@ bool write_file(const char *name, FILE *thefile, bool normal, + * For an emergency file, access is restricted to just the owner. */ + if (thefile == NULL) { + mode_t permissions = (normal ? RW_FOR_ALL : S_IRUSR|S_IWUSR); +- int fd; + + #ifndef NANO_TINY + block_sigwinch(TRUE); +@@ -1972,6 +1973,16 @@ bool write_file(const char *name, FILE *thefile, bool normal, + } + #endif + ++#if !defined(NANO_TINY) && defined(HAVE_CHMOD) && defined(HAVE_CHOWN) ++ /* Change permissions and owner of an emergency save file to the values ++ * of the original file, but ignore any failure as we are in a hurry. */ ++ if (method == EMERGENCY && fd && openfile->statinfo) { ++ IGNORE_CALL_RESULT(fchmod(fd, openfile->statinfo->st_mode)); ++ IGNORE_CALL_RESULT(fchown(fd, openfile->statinfo->st_uid, ++ openfile->statinfo->st_gid)); ++ } ++#endif ++ + if (fclose(thefile) != 0) { + statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno)); + +diff --git a/src/nano.c b/src/nano.c +index 90b4a0b..973054f 100644 +--- a/src/nano.c ++++ b/src/nano.c +@@ -337,18 +337,8 @@ void emergency_save(const char *filename) + + if (*targetname == '\0') + fprintf(stderr, _("\nToo many .save files\n")); +- else if (write_file(targetname, NULL, SPECIAL, OVERWRITE, NONOTES)) { ++ else if (write_file(targetname, NULL, SPECIAL, EMERGENCY, NONOTES)) + fprintf(stderr, _("\nBuffer written to %s\n"), targetname); +-#if !defined(NANO_TINY) && defined(HAVE_CHMOD) && defined(HAVE_CHOWN) +- /* Try to chmod/chown the saved file to the values of the original file, +- * but ignore any failure as we are in a hurry to get out. */ +- if (openfile->statinfo) { +- IGNORE_CALL_RESULT(chmod(targetname, openfile->statinfo->st_mode)); +- IGNORE_CALL_RESULT(chown(targetname, openfile->statinfo->st_uid, +- openfile->statinfo->st_gid)); +- } +-#endif +- } + + free(targetname); + free(plainname); +-- +cgit v1.1 + diff --git a/nano.spec b/nano.spec index 9297826..b97849d 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 7.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -26,6 +26,8 @@ Source11: nano-default-editor.sh Source12: nano-default-editor.csh Source13: nano-default-editor.fish +Patch0: nano-7.2-emergency-file-replace-vuln.patch + BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: gcc @@ -133,6 +135,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Mon May 06 2024 Lukáš Zaoral - 7.2-5 +- fix emergency file replacement vulnerability (rhbz#2277586) + * Thu Jul 20 2023 Fedora Release Engineering - 7.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From cdde5d559c99e8c9565a9432db98853e720d10db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 18 Jul 2024 10:05:31 +0200 Subject: [PATCH 05/14] rebase to latest upstream release Resolves: rhbz#2297610 --- nano.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nano.spec b/nano.spec index 30fd8ac..0a67f91 100644 --- a/nano.spec +++ b/nano.spec @@ -7,7 +7,7 @@ Summary: A small text editor Name: nano -Version: 8.0 +Version: 8.1 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Jul 18 2024 Lukáš Zaoral - 8.1-1 +- rebase to latest upstream release (rhbz#2297610) + * Thu May 02 2024 Lukáš Zaoral - 8.0-1 - rebase to latest upstream version (rhbz#2278126) diff --git a/sources b/sources index 0401079..bfaf66c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.0.tar.xz.asc) = a9208b0e4e5a54c9f13e7dd2ba4cad4b4542aff25230825faafe1e5149c1da7be3e615ab85ab5090ee7d97076e36963c2792ee06a8f10f7f4df46f7e8d2101e5 -SHA512 (nano-8.0.tar.xz) = 86c484428b8805768fd580d0f62aa32ce8f588f4beedcdd35a4014506b562928c7a2fa6487aa0d853b4c9c1639a4d186f46b4e96721568ff81191d5098403ca8 +SHA512 (nano-8.1.tar.xz.asc) = 257bc2ca26bd46f929be45fbe6fa2dddc75eaf2fe973211e2778a44fd3bea1768b2af855adaa2959e3a982f4715805a8f30262f715b26bbf2ede3e4e50145cac +SHA512 (nano-8.1.tar.xz) = cb7d696bd18322ba1e713282e3156934e2c7f2a8abc17c99b2d5ae91fa40ea1478758853d4ad391f72039f01cfe0db79fd7302f3e67ed2afeff3a447b6f975ec From 0160cdf3b2e0556eb703aa0dcaaf89b477649a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 5 Sep 2024 12:58:49 +0200 Subject: [PATCH 06/14] rebase to latest upstream release Resolves: rhbz#2310179 --- nano.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nano.spec b/nano.spec index 0a67f91..dc98f09 100644 --- a/nano.spec +++ b/nano.spec @@ -7,7 +7,7 @@ Summary: A small text editor Name: nano -Version: 8.1 +Version: 8.2 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Sep 05 2024 Lukáš Zaoral - 8.2-1 +- rebase to latest upstream release (rhbz#2310179) + * Thu Jul 18 2024 Lukáš Zaoral - 8.1-1 - rebase to latest upstream release (rhbz#2297610) diff --git a/sources b/sources index bfaf66c..1979191 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.1.tar.xz.asc) = 257bc2ca26bd46f929be45fbe6fa2dddc75eaf2fe973211e2778a44fd3bea1768b2af855adaa2959e3a982f4715805a8f30262f715b26bbf2ede3e4e50145cac -SHA512 (nano-8.1.tar.xz) = cb7d696bd18322ba1e713282e3156934e2c7f2a8abc17c99b2d5ae91fa40ea1478758853d4ad391f72039f01cfe0db79fd7302f3e67ed2afeff3a447b6f975ec +SHA512 (nano-8.2.tar.xz.asc) = 8525d87c2e636eca166a46b621118d154c3b5c8e13dbab646fb7817d0c8a390b071e23f6ac92f9027916169a7742faacc15fb9e4e61812b719c08d6ac493f96d +SHA512 (nano-8.2.tar.xz) = 07c69d6894f87cb386afa89e984ded7e11fe7575cf3af1c18237e3b2c00de371015c9ea126e505c7c0e7200f7359d5ae7c3779198e188fbbc617154d09c4ba14 From ca2d15a9329666f0e215b81751778b8980b26007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 2 Jan 2025 12:24:26 +0100 Subject: [PATCH 07/14] rebase to latest upstream version Resolves: rhbz#2333643 --- nano.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nano.spec b/nano.spec index dc98f09..543e203 100644 --- a/nano.spec +++ b/nano.spec @@ -7,7 +7,7 @@ Summary: A small text editor Name: nano -Version: 8.2 +Version: 8.3 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Jan 02 2025 Lukáš Zaoral - 8.3-1 +- rebase to latest upstream version (rhbz#2333643) + * Thu Sep 05 2024 Lukáš Zaoral - 8.2-1 - rebase to latest upstream release (rhbz#2310179) diff --git a/sources b/sources index 1979191..d5366ac 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.2.tar.xz.asc) = 8525d87c2e636eca166a46b621118d154c3b5c8e13dbab646fb7817d0c8a390b071e23f6ac92f9027916169a7742faacc15fb9e4e61812b719c08d6ac493f96d -SHA512 (nano-8.2.tar.xz) = 07c69d6894f87cb386afa89e984ded7e11fe7575cf3af1c18237e3b2c00de371015c9ea126e505c7c0e7200f7359d5ae7c3779198e188fbbc617154d09c4ba14 +SHA512 (nano-8.3.tar.xz.asc) = 3af105c0766a1b1bbde22097d1a5b036e025fb1e726792934280d605b24767c73e03b634b91a9ba37eb79a88ab0f1e06a3a3ac8173a17e77d965eef25b213609 +SHA512 (nano-8.3.tar.xz) = 9f57bb16a30240fdfc8fc31f5a55f681b80dd72de66fa143ef36c59ab696cc672d8fa054f5a4a547324db3deb2fe2f777cd7c1c023b571e2bb36c86a783ff1d6 From 31a86c372c17750c4a05cbef8bde31c8ceae0033 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 19:40:44 +0000 Subject: [PATCH 08/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- nano.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nano.spec b/nano.spec index 543e203..3a07c4b 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 8.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jan 02 2025 Lukáš Zaoral - 8.3-1 - rebase to latest upstream version (rhbz#2333643) From 7cb431a87d6123106dacbcd72fb78b0cf2920914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 20 Mar 2025 09:13:07 +0100 Subject: [PATCH 09/14] fix nano syntax highlighting in default nanorc Resolves: rhbz#2353508 --- nano.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nano.spec b/nano.spec index 3a07c4b..c6eb9bf 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 8.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -80,8 +80,8 @@ cd build # generate default /etc/nanorc # - set hunspell as the default spell-checker # - enable syntax highlighting by default (#1270712) -sed -e 's/^#.*set speller.*$/set speller "hunspell"/' \ - -e 's|^# \(include "/usr/share/nano/\*.nanorc"\)|\1|' \ +sed -E -e 's/^#.*set speller.*$/set speller "hunspell"/' \ + -e 's|^# (include "?/usr/share/nano/\*.nanorc"?)|\1|' \ %{SOURCE3} doc/sample.nanorc > ./nanorc %install @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Mar 20 2025 Lukáš Zaoral - 8.3-3 +- fix nano syntax highlighting in default nanorc (rhbz#2353508) + * Fri Jan 17 2025 Fedora Release Engineering - 8.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From b5b5b4645bd9e4151f351783186ee2a5baa0a78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 7 Apr 2025 10:25:13 +0200 Subject: [PATCH 10/14] rebase to latest upstream release Resolves: rhbz#2357699 --- nano.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nano.spec b/nano.spec index c6eb9bf..8e63de9 100644 --- a/nano.spec +++ b/nano.spec @@ -7,8 +7,8 @@ Summary: A small text editor Name: nano -Version: 8.3 -Release: 3%{?dist} +Version: 8.4 +Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Mon Apr 07 2025 Lukáš Zaoral - 8.4-1 +- rebase to latest upstream release (rhbz#2357699) + * Thu Mar 20 2025 Lukáš Zaoral - 8.3-3 - fix nano syntax highlighting in default nanorc (rhbz#2353508) diff --git a/sources b/sources index d5366ac..4d62b76 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.3.tar.xz.asc) = 3af105c0766a1b1bbde22097d1a5b036e025fb1e726792934280d605b24767c73e03b634b91a9ba37eb79a88ab0f1e06a3a3ac8173a17e77d965eef25b213609 -SHA512 (nano-8.3.tar.xz) = 9f57bb16a30240fdfc8fc31f5a55f681b80dd72de66fa143ef36c59ab696cc672d8fa054f5a4a547324db3deb2fe2f777cd7c1c023b571e2bb36c86a783ff1d6 +SHA512 (nano-8.4.tar.xz.asc) = 4b42309bc70c14f4178301f42b290bf60416c51c4ce5eaddaaa2ef503740a38169e8fd1c12b7d2059b9cd35c2b7f44627622d26f89ee203d7223f769732b627f +SHA512 (nano-8.4.tar.xz) = 1b8258e341a8722114b24af9d4676fbd8a91dc3639786a81bcd192a7b4fbca87581ab8ebe49493dfb3599ae90b59f4df8ae2a4ee0c0c7ccec9a49b563c82f44a From ae5af3c760c393135a15f57dee4312cda648b67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 12 Jun 2025 14:52:17 +0200 Subject: [PATCH 11/14] rebase to latest upstream release Resolves: rhbz#2372436 --- nano.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nano.spec b/nano.spec index 8e63de9..b46d7e7 100644 --- a/nano.spec +++ b/nano.spec @@ -7,7 +7,7 @@ Summary: A small text editor Name: nano -Version: 8.4 +Version: 8.5 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Jun 12 2025 Lukáš Zaoral - 8.5-1 +- rebase to latest upstream release (rhbz#2372436) + * Mon Apr 07 2025 Lukáš Zaoral - 8.4-1 - rebase to latest upstream release (rhbz#2357699) diff --git a/sources b/sources index 4d62b76..2852afe 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.4.tar.xz.asc) = 4b42309bc70c14f4178301f42b290bf60416c51c4ce5eaddaaa2ef503740a38169e8fd1c12b7d2059b9cd35c2b7f44627622d26f89ee203d7223f769732b627f -SHA512 (nano-8.4.tar.xz) = 1b8258e341a8722114b24af9d4676fbd8a91dc3639786a81bcd192a7b4fbca87581ab8ebe49493dfb3599ae90b59f4df8ae2a4ee0c0c7ccec9a49b563c82f44a +SHA512 (nano-8.5.tar.xz.asc) = 20901368fc0c1dda61c7fafa9737bcd979a0ffef28709ab8abb7b04f179e37fb3f66b048494d2c1262110d4005e32c8db070e53abd103dee70b2e6afc8ecc747 +SHA512 (nano-8.5.tar.xz) = d79562b2adbfe165e565b80ab4339e24f4a0ea464a97dfb7dce166df851b514c83e5071d89bee97759c0d6ff7d1fab1da97eaa0e742f3913d5c41a5539a3d8a1 From 6731166f7be19680b25133fd69a251dc1ce26ee4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 22:37:27 +0000 Subject: [PATCH 12/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- nano.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nano.spec b/nano.spec index b46d7e7..1334e38 100644 --- a/nano.spec +++ b/nano.spec @@ -8,7 +8,7 @@ Summary: A small text editor Name: nano Version: 8.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 8.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jun 12 2025 Lukáš Zaoral - 8.5-1 - rebase to latest upstream release (rhbz#2372436) From 614d05d10330084922085fa1d096c8a6679b61fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 21 Aug 2025 09:43:04 +0200 Subject: [PATCH 13/14] rebase to the latest upstream release Resolves: rhbz#2390027 --- nano.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nano.spec b/nano.spec index 1334e38..8f8c284 100644 --- a/nano.spec +++ b/nano.spec @@ -7,8 +7,8 @@ Summary: A small text editor Name: nano -Version: 8.5 -Release: 2%{?dist} +Version: 8.6 +Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -133,6 +133,9 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Thu Aug 21 2025 Lukáš Zaoral - 8.6-1 +- rebase to the latest upstream release (rhbz#2390027) + * Thu Jul 24 2025 Fedora Release Engineering - 8.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 2852afe..c053cf7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.5.tar.xz.asc) = 20901368fc0c1dda61c7fafa9737bcd979a0ffef28709ab8abb7b04f179e37fb3f66b048494d2c1262110d4005e32c8db070e53abd103dee70b2e6afc8ecc747 -SHA512 (nano-8.5.tar.xz) = d79562b2adbfe165e565b80ab4339e24f4a0ea464a97dfb7dce166df851b514c83e5071d89bee97759c0d6ff7d1fab1da97eaa0e742f3913d5c41a5539a3d8a1 +SHA512 (nano-8.6.tar.xz.asc) = 188886835724ec11236228c9be526602d2cb5c4aa5b01efe23451698fe01c2b296a2c6b9521342f77c46c528356cbb2ab82b5f532b8a360b73490b4883b635c0 +SHA512 (nano-8.6.tar.xz) = f783c59d2fb47e121c63779c4ce8c6d5e90c31184ca28449c6c9270933d02e19ee60d29b6c9a1122fe59de1132d56d9e402cc63fc88f847cea2b4af6302524ea From 67f433bce86d9d447da8a289ae6df70bc00e2399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Wed, 26 Nov 2025 14:57:03 +0100 Subject: [PATCH 14/14] rebase to latest upstream release Resolves: rhbz#2414527 --- nano-8.7-gnulib-c23.patch | 140 ++++++++++++++++++++++++++++++++++++++ nano.spec | 14 +++- sources | 4 +- 3 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 nano-8.7-gnulib-c23.patch diff --git a/nano-8.7-gnulib-c23.patch b/nano-8.7-gnulib-c23.patch new file mode 100644 index 0000000..8e8380c --- /dev/null +++ b/nano-8.7-gnulib-c23.patch @@ -0,0 +1,140 @@ +From c028b6f1804a8fef398d7642d8ccb7d8f73150fb Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Nov 2025 00:50:40 -0800 +Subject: [PATCH] Port to C23 qualifier-generic fns like strchr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This ports Gnulib to strict C23 platforms that reject code +like ‘char *q = strchr (P, 'x');’ when P is a pointer to const, +because in C23 strchr is a qualifier-generic function so +strchr (P, 'x') returns char const *. +This patch does not attempt to do the following two things, +which might be useful in the future: +1. When compiling on non-C23 platforms, check user code for +portability to platforms that define qualifier-generic functions. +2. Port Gnulib to platforms that have qualifier-generic functions +not listed in the C23 standard, e.g., strchrnul. I don’t know +of any such platforms. +* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro. +* lib/c++defs.h (_GL_FUNCDECL_SYS): +* lib/stdlib.in.h (bsearch): +Use it, to prevent C23 names like strchr from acting like macros. +* lib/string.in.h (memchr, strchr, strpbrk, strrchr): +Do not #undef when GNULIB_POSIXCHECK is defined, as this could +cause conforming C23 code to fail to conform. It’s not clear why +_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more? +But for now, limit the removal of #undef to these four functions +where #undeffing is clearly undesirable in C23. +* lib/wchar.in.h (wmemchr): Parenthesize function name in decl, +to prevent it from acting like a macro. + +Cherry-picked-by: Lukáš Zaoral +Upstream-commit: df17f4f37ed3ca373d23ad42eae51122bdb96626 +--- + lib/c++defs.h | 12 +++++++++++- + lib/stdlib.in.h | 6 +++--- + lib/string.in.h | 4 ---- + lib/wchar.in.h | 2 +- + 4 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/lib/c++defs.h b/lib/c++defs.h +index b77979a..7384457 100644 +--- a/lib/c++defs.h ++++ b/lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index bef0aaa..fd0e1e0 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -224,9 +224,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/lib/string.in.h b/lib/string.in.h +index fdcdd21..8b56acf 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -409,7 +409,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -674,7 +673,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -981,7 +979,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -1011,7 +1008,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index ab602a2..6be4515 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -301,7 +301,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +-- +2.52.0 + diff --git a/nano.spec b/nano.spec index 8f8c284..78276d4 100644 --- a/nano.spec +++ b/nano.spec @@ -7,7 +7,7 @@ Summary: A small text editor Name: nano -Version: 8.6 +Version: 8.7 Release: 1%{?dist} License: GPL-3.0-or-later URL: https://www.nano-editor.org @@ -26,10 +26,14 @@ Source11: nano-default-editor.sh Source12: nano-default-editor.csh Source13: nano-default-editor.fish +# gnulib C23 support +# https://github.com/coreutils/gnulib/commit/df17f4f37ed3ca373d23ad42eae51122bdb96626 +Patch: nano-8.7-gnulib-c23.patch + BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: gcc -BuildRequires: git +BuildRequires: git-core BuildRequires: gnupg2 BuildRequires: groff BuildRequires: make @@ -68,7 +72,7 @@ who don't have nano as a default editor during upgrade. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -S git +%autosetup -S git_am %build mkdir build @@ -133,6 +137,10 @@ install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basen %changelog +* Wed Nov 26 2025 Lukáš Zaoral - 8.7-1 +- require only git-core which is already sufficient for %%autosetup -S git_am +- rebase to latest upstream release (rhbz#2414527) + * Thu Aug 21 2025 Lukáš Zaoral - 8.6-1 - rebase to the latest upstream release (rhbz#2390027) diff --git a/sources b/sources index c053cf7..3c344f6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nano-8.6.tar.xz.asc) = 188886835724ec11236228c9be526602d2cb5c4aa5b01efe23451698fe01c2b296a2c6b9521342f77c46c528356cbb2ab82b5f532b8a360b73490b4883b635c0 -SHA512 (nano-8.6.tar.xz) = f783c59d2fb47e121c63779c4ce8c6d5e90c31184ca28449c6c9270933d02e19ee60d29b6c9a1122fe59de1132d56d9e402cc63fc88f847cea2b4af6302524ea +SHA512 (nano-8.7.tar.xz.asc) = b525ae9bdd69eae326c364ffd76a03592f4012132fdbff061ec804741857f6cb7428ffa4ebb65ab584a3eb1ce310bf9865d4ad2f73b11d2b156b55bd2ade23c1 +SHA512 (nano-8.7.tar.xz) = 0aac5b1708b05a882cba57f718154e42a6cd8a57f1e1c13c76598fe85645c49703f0c17d2e650da90348eb60c2bdbe349925415b6511c27e5b1bea77d107ab37