install-info: use create-tmp-then-rename pattern because of OSTree
This commit is contained in:
parent
66fdba6628
commit
ea330f611c
|
@ -0,0 +1,44 @@
|
||||||
|
diff -up texinfo-6.0/install-info/install-info.c.orig texinfo-6.0/install-info/install-info.c
|
||||||
|
--- texinfo-6.0/install-info/install-info.c.orig 2016-06-22 15:21:04.000000000 +0200
|
||||||
|
+++ texinfo-6.0/install-info/install-info.c 2016-06-22 15:22:13.340282906 +0200
|
||||||
|
@@ -954,18 +954,23 @@ output_dirfile (char *dirfile, int dir_n
|
||||||
|
int n_entries_added = 0;
|
||||||
|
int i;
|
||||||
|
FILE *output;
|
||||||
|
+ char *dirfile_tmp = NULL;
|
||||||
|
+
|
||||||
|
+ asprintf (&dirfile_tmp, "%s.tmp", dirfile);
|
||||||
|
+ if (!dirfile_tmp)
|
||||||
|
+ xalloc_die ();
|
||||||
|
|
||||||
|
if (compression_program)
|
||||||
|
{
|
||||||
|
- char *command = concat (compression_program, ">", dirfile);
|
||||||
|
+ char *command = concat (compression_program, ">", dirfile_tmp);
|
||||||
|
output = popen (command, "w");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- output = fopen (dirfile, "w");
|
||||||
|
+ output = fopen (dirfile_tmp, "w");
|
||||||
|
|
||||||
|
if (!output)
|
||||||
|
{
|
||||||
|
- perror (dirfile);
|
||||||
|
+ perror (dirfile_tmp);
|
||||||
|
exit (EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1076,6 +1081,13 @@ output_dirfile (char *dirfile, int dir_n
|
||||||
|
pclose (output);
|
||||||
|
else
|
||||||
|
fclose (output);
|
||||||
|
+
|
||||||
|
+ if (rename (dirfile_tmp, dirfile) < 0)
|
||||||
|
+ {
|
||||||
|
+ perror (dirfile_tmp);
|
||||||
|
+ exit (EXIT_FAILURE);
|
||||||
|
+ }
|
||||||
|
+ free (dirfile_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Parse the input to find the section names and the entry names it
|
10
texinfo.spec
10
texinfo.spec
|
@ -5,7 +5,7 @@
|
||||||
Summary: Tools needed to create Texinfo format documentation files
|
Summary: Tools needed to create Texinfo format documentation files
|
||||||
Name: texinfo
|
Name: texinfo
|
||||||
Version: 6.0
|
Version: 6.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Publishing
|
Group: Applications/Publishing
|
||||||
Url: http://www.gnu.org/software/texinfo/
|
Url: http://www.gnu.org/software/texinfo/
|
||||||
|
@ -22,6 +22,8 @@ Patch0: texinfo-4.12-zlib.patch
|
||||||
Patch1: texinfo-6.0-disable-failing-info-test.patch
|
Patch1: texinfo-6.0-disable-failing-info-test.patch
|
||||||
# bz#1305062 already upstream
|
# bz#1305062 already upstream
|
||||||
Patch2: texinfo-6.0-mouse-protocol.patch
|
Patch2: texinfo-6.0-mouse-protocol.patch
|
||||||
|
# Patch3: rhbz#1348671, because of OSTree
|
||||||
|
Patch3: texinfo-6.0-install-info-use-create-tmp-then-rename-pattern.patch
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
Requires: perl >= 5.7.3, perl(Text::Unidecode)
|
Requires: perl >= 5.7.3, perl(Text::Unidecode)
|
||||||
|
@ -71,6 +73,7 @@ for printing using TeX.
|
||||||
%patch0 -p1 -b .zlib
|
%patch0 -p1 -b .zlib
|
||||||
%patch1 -p1 -b .disable-failing-info-test
|
%patch1 -p1 -b .disable-failing-info-test
|
||||||
%patch2 -p1 -b .mouse-protocol
|
%patch2 -p1 -b .mouse-protocol
|
||||||
|
%patch3 -p1 -b .install-info-use-create-tmp-then-rename-pattern
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-external-Text-Unidecode \
|
%configure --with-external-Text-Unidecode \
|
||||||
|
@ -173,6 +176,11 @@ fi
|
||||||
%{_mandir}/man1/pdftexi2dvi.1*
|
%{_mandir}/man1/pdftexi2dvi.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 22 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.0-3
|
||||||
|
- install-info: use create-tmp-then-rename pattern because of OSTree
|
||||||
|
(patch by Colin Walters)
|
||||||
|
Resolves: #1348671
|
||||||
|
|
||||||
* Tue Feb 09 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.0-2
|
* Tue Feb 09 2016 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.0-2
|
||||||
- Fix mouse no longer works with info
|
- Fix mouse no longer works with info
|
||||||
Resolves: #1305062
|
Resolves: #1305062
|
||||||
|
|
Loading…
Reference in New Issue