From 787b71b5992784a2f6cc9fc49249da9739499b98 Mon Sep 17 00:00:00 2001 From: Petr Muller Date: May 09 2013 11:14:29 +0000 Subject: Fix journal breakage on release name with umlaut --- diff --git a/beakerlib.spec b/beakerlib.spec index 518ef0a..d6f0f66 100644 --- a/beakerlib.spec +++ b/beakerlib.spec @@ -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 - 1.7-2 +- Robustify journal to accept umlaut in distro release name + * Tue Apr 30 2013 Petr Muller - 1.7-1 - rebase to upstream 1.7 diff --git a/robust-distro-names.patch b/robust-distro-names.patch new file mode 100644 index 0000000..5932906 --- /dev/null +++ b/robust-distro-names.patch @@ -0,0 +1,27 @@ +From 42851022001773130ef8c4ad57089811f47b85ba Mon Sep 17 00:00:00 2001 +From: Petr Muller +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 +