Fix duplicate documentation files (#1001234)
- Fix encoding of manifests being written (#968308)
This commit is contained in:
parent
a46193bd53
commit
395a42086e
38
0001-a2x-Write-manifests-in-UTF-8-by-default.patch
Normal file
38
0001-a2x-Write-manifests-in-UTF-8-by-default.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From adb0929f0db4da533a9d5b317e6f49a91feb3b3e Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Tue, 3 Dec 2013 18:03:13 +0100
|
||||
Subject: [PATCH] [a2x] Write manifests in UTF-8 by default
|
||||
|
||||
This is a workaround for rhbz#968308 where a2x tries to write non-ASCII content
|
||||
epub manifest. Since the write_file is mostly used to write xml content which
|
||||
defaults to UTF-8 this seems fairly safe
|
||||
---
|
||||
a2x.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/a2x.py b/a2x.py
|
||||
index 1b192a2..ad163e3 100755
|
||||
--- a/a2x.py
|
||||
+++ b/a2x.py
|
||||
@@ -21,6 +21,7 @@ import urlparse
|
||||
import zipfile
|
||||
import xml.dom.minidom
|
||||
import mimetypes
|
||||
+import codecs
|
||||
|
||||
PROG = os.path.basename(os.path.splitext(__file__)[0])
|
||||
VERSION = '8.6.8'
|
||||
@@ -144,8 +145,8 @@ def find_executable(file_name):
|
||||
result = _find_executable(file_name)
|
||||
return result
|
||||
|
||||
-def write_file(filename, data, mode='w'):
|
||||
- f = open(filename, mode)
|
||||
+def write_file(filename, data, mode='w', encoding='utf-8'):
|
||||
+ f = codecs.open(filename, mode, encoding)
|
||||
try:
|
||||
f.write(data)
|
||||
finally:
|
||||
--
|
||||
1.8.4.2
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: Text based document generation
|
||||
Name: asciidoc
|
||||
Version: 8.6.8
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
# The python code does not specify a version.
|
||||
# The javascript example code is GPLv2+.
|
||||
License: GPL+ and GPLv2+
|
||||
@ -13,6 +13,8 @@ Group: Applications/System
|
||||
URL: http://www.methods.co.nz/asciidoc/
|
||||
Source: http://sourceforge.net/projects/asciidoc/files/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch1: 0001-a2x-Write-manifests-in-UTF-8-by-default.patch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: dblatex
|
||||
BuildRequires: graphviz
|
||||
@ -66,6 +68,8 @@ Requires: lilypond
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1 -b .bz968308
|
||||
|
||||
# Fix line endings on COPYRIGHT file
|
||||
sed -i "s/\r//g" COPYRIGHT
|
||||
|
||||
@ -130,9 +134,12 @@ python testasciidoc.py run
|
||||
%exclude %{_sysconfdir}/asciidoc/filters/*/*.py[co]
|
||||
%exclude %{_sysconfdir}/asciidoc/filters/latex
|
||||
%exclude %{_sysconfdir}/asciidoc/filters/music
|
||||
%exclude %{_pkgdocdir}/examples
|
||||
%exclude %{_pkgdocdir}/doc
|
||||
|
||||
%files doc
|
||||
%{_docdir}/%{name}
|
||||
%{_pkgdocdir}/examples
|
||||
%{_pkgdocdir}/doc
|
||||
%exclude %{_docdir}/%{name}/{BUGS,CHANGELOG,COPYING,COPYRIGHT,README}
|
||||
|
||||
%files latex
|
||||
@ -148,6 +155,10 @@ python testasciidoc.py run
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Dec 03 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.6.8-3
|
||||
- Fix duplicate documentation files (#1001234)
|
||||
- Fix encoding of manifests being written (#968308)
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.6.8-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user