| |
@@ -1,7 +1,7 @@
|
| |
Summary: A small text editor
|
| |
Name: nano
|
| |
Version: 5.3
|
| |
- Release: 3%{?dist}
|
| |
+ Release: 4%{?dist}
|
| |
License: GPLv3+
|
| |
URL: https://www.nano-editor.org
|
| |
Source: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz
|
| |
@@ -77,6 +77,20 @@
|
| |
install -Dpm 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/profile.d/%{basename:%{S:12}}
|
| |
install -Dpm 0644 %{SOURCE13} %{buildroot}%{_datadir}/fish/vendor_conf.d/%{basename:%{S:13}}
|
| |
|
| |
+ # We need to manually remove EDITOR set by a previous versions
|
| |
+ # and let it be set with the updated nano-default-editor.fish.
|
| |
+ # It was set with -U, which sets EDITOR to /usr/bin/nano even if
|
| |
+ # nano-default-editor is removed.
|
| |
+ # Remove after release or two...
|
| |
+ %post default-editor
|
| |
+ if [ test "$EDITOR" = "/usr/bin/nano" ]
|
| |
+ then
|
| |
+ if [ test "$SHELL" = "/usr/bin/fish" ] || [ test "$SHELL" = "/bin/fish" ]
|
| |
+ then
|
| |
+ set -e EDITOR
|
| |
+ fi
|
| |
+ fi
|
| |
+
|
| |
%files -f build/%{name}.lang
|
| |
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
|
| |
%doc build/doc/sample.nanorc
|
| |
@@ -95,6 +109,9 @@
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Thu Oct 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 5.3-4
|
| |
+ - fix nano-default-editor.fish - don't give EDITOR an universal scope
|
| |
+
|
| |
* Mon Oct 12 2020 Neal Gompa <ngompa13@gmail.com> - 5.3-3
|
| |
- Ensure default-editor subpackage is easily swappable
|
| |
|
| |
Hi,
the current
fish
profile fornano
overridesEDITOR
environment variable permanently even ifnano-default-editor
is removed.The reason of this is
-U
parameter ofset
, which givesEDITOR
to universal scope, which means it survives reboot (and it seems even uninstallation of original package).The patch removes the option and fixes upgrades from older releases within
%post
scriptlet, because the way how to makeEDITOR
configurable again is to manually erase the variable. The scriptlet is applied only whenEDITOR
contains/usr/bin/nano
andSHELL`` is
fish```.Would you mind adding the PR to the project? Please let me know if I should change something.
Thank you in advance!
Zdenek