diff --git a/nano-2.0.6-open-macro.patch b/nano-2.0.6-open-macro.patch new file mode 100644 index 0000000..975e0f6 --- /dev/null +++ b/nano-2.0.6-open-macro.patch @@ -0,0 +1,20 @@ +--- nano-2.0.6/src/files.c~ 2007-04-21 21:33:56.000000000 +0100 ++++ nano-2.0.6/src/files.c 2007-08-22 18:52:11.000000000 +0100 +@@ -1518,7 +1518,7 @@ bool write_file(const char *name, FILE * + } + + if (f_open == NULL) { +- fd_source = open(realname, O_RDONLY | O_CREAT); ++ fd_source = open(realname, O_RDONLY | O_CREAT, 0600); + + if (fd_source != -1) { + f_source = fdopen(fd_source, "rb"); +@@ -1637,7 +1637,7 @@ bool write_file(const char *name, FILE * + int fd_source; + FILE *f_source = NULL; + +- fd_source = open(tempname, O_RDONLY | O_CREAT); ++ fd_source = open(tempname, O_RDONLY | O_CREAT, 0600); + + if (fd_source != -1) { + f_source = fdopen(fd_source, "rb"); diff --git a/nano.spec b/nano.spec index 0ca7b46..cbb943d 100644 --- a/nano.spec +++ b/nano.spec @@ -6,6 +6,7 @@ License: GPLv2+ Group: Applications/Editors URL: http://www.nano-editor.org Source: http://www.nano-editor.org/dist/v1.3/%{name}-%{version}.tar.gz +Patch0: nano-2.0.6-open-macro.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel, autoconf, gettext-devel, groff Requires(post): /sbin/install-info @@ -16,6 +17,7 @@ GNU nano is a small and friendly text editor. %prep %setup -q +%patch0 -p1 iconv -f iso-8859-1 -t utf-8 -o nano.1.tmp doc/man/fr/nano.1 && mv nano.1.tmp doc/man/fr/nano.1 iconv -f iso-8859-1 -t utf-8 -o nanorc.5.tmp doc/man/fr/nano.1 && mv nanorc.5.tmp doc/man/fr/nanorc.5