Fix journal breakage on release name with umlaut
This commit is contained in:
parent
70d5cb801b
commit
787b71b599
@ -11,6 +11,7 @@ URL: https://fedorahosted.org/%{name}
|
||||
Requires: nfs-utils
|
||||
Requires: python2
|
||||
BuildRequires: /usr/bin/pod2man
|
||||
Patch0: robust-distro-names.patch
|
||||
|
||||
|
||||
%description
|
||||
@ -20,6 +21,7 @@ could be used when writing operating system level integration tests.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .robust-distros
|
||||
|
||||
%build
|
||||
make build
|
||||
@ -51,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc %{_docdir}/%{name}-%{version}/examples/*/*
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2013 Petr Muller <muller@redhat.com> - 1.7-2
|
||||
- Robustify journal to accept umlaut in distro release name
|
||||
|
||||
* Tue Apr 30 2013 Petr Muller <muller@redhat.com> - 1.7-1
|
||||
- rebase to upstream 1.7
|
||||
|
||||
|
27
robust-distro-names.patch
Normal file
27
robust-distro-names.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 42851022001773130ef8c4ad57089811f47b85ba Mon Sep 17 00:00:00 2001
|
||||
From: Petr Muller <muller@redhat.com>
|
||||
Date: Thu, 9 May 2013 13:05:46 +0200
|
||||
Subject: [PATCH] Robustify against non-ascii in distro release name
|
||||
|
||||
Danke, Herr Schoedinger
|
||||
---
|
||||
src/python/journalling.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/python/journalling.py b/src/python/journalling.py
|
||||
index c86b9bd..3d62fd7 100755
|
||||
--- a/src/python/journalling.py
|
||||
+++ b/src/python/journalling.py
|
||||
@@ -352,7 +352,8 @@ class Journal(object):
|
||||
release = release_file.read().strip()
|
||||
except IOError:
|
||||
release = "unknown"
|
||||
- releaseCon = newdoc.createTextNode(release)
|
||||
+ release = unicode(release, 'utf-8', errors='replace')
|
||||
+ releaseCon = newdoc.createTextNode(release.translate(xmlTrans))
|
||||
|
||||
logEl = newdoc.createElement("log")
|
||||
purposeEl = newdoc.createElement("purpose")
|
||||
--
|
||||
1.8.2.1
|
||||
|
Loading…
Reference in New Issue
Block a user