Add a couple of upstream patches.

This commit is contained in:
Richard W.M. Jones 2020-01-29 12:06:23 +00:00
parent 566aa1148b
commit a8087fb6b5
3 changed files with 68 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 564a923a91d042e24e9259d86f69e0061f28ef4f Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <git@thecybershadow.net>
Date: Thu, 16 Jan 2020 12:11:20 +0000
Subject: [PATCH 1/2] Win::Hivex::Regedit: Accept CRLF line endings
---
perl/lib/Win/Hivex/Regedit.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/perl/lib/Win/Hivex/Regedit.pm b/perl/lib/Win/Hivex/Regedit.pm
index 34426f1..2b17036 100644
--- a/perl/lib/Win/Hivex/Regedit.pm
+++ b/perl/lib/Win/Hivex/Regedit.pm
@@ -144,6 +144,7 @@ sub reg_import
# this is fairly common in pasted regedit files.
$lineno++;
chomp;
+ s/\r$//;
if (s/\\\s*$//) {
$_ .= <$fh>;
redo unless eof ($fh);
--
2.24.1

View File

@ -0,0 +1,36 @@
From 003028c3c0d33e952430d3f4e1a987a777674eb3 Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <git@thecybershadow.net>
Date: Thu, 16 Jan 2020 12:11:21 +0000
Subject: [PATCH 2/2] Win::Hivex::Regedit: Ignore comments
---
perl/lib/Win/Hivex/Regedit.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/perl/lib/Win/Hivex/Regedit.pm b/perl/lib/Win/Hivex/Regedit.pm
index 2b17036..f0dbb50 100644
--- a/perl/lib/Win/Hivex/Regedit.pm
+++ b/perl/lib/Win/Hivex/Regedit.pm
@@ -153,8 +153,8 @@ sub reg_import
#print STDERR "reg_import: parsing <<<$_>>>\n";
if ($state eq "outer") {
- # Ignore blank lines, headers.
- next if /^\s*$/;
+ # Ignore blank lines, headers, comments.
+ next if /^\s*(;.*)?$/;
# .* is needed before Windows Registry Editor Version.. in
# order to eat a possible Unicode BOM which regedit writes
@@ -193,7 +193,7 @@ sub reg_import
my $value = _parse_value ("", $1, $encoding);
croak (_parse_error ($_, $lineno)) unless defined $value;
push @newvalues, $value;
- } elsif (/^\s*$/) { # blank line after values
+ } elsif (/^\s*(;.*)?$/) { # blank line after values
_merge_node ($hmap, \%params, $newnode, \@newvalues, \@delvalues);
$state = "outer";
} else {
--
2.24.1

View File

@ -10,7 +10,7 @@
Name: hivex Name: hivex
Version: 1.3.18 Version: 1.3.18
Release: 19%{?dist} Release: 20%{?dist}
Summary: Read and write Windows Registry binary hive files Summary: Read and write Windows Registry binary hive files
License: LGPLv2 License: LGPLv2
@ -26,6 +26,10 @@ Source1: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz.s
Source2: libguestfs.keyring Source2: libguestfs.keyring
%endif %endif
# Patches - all upstream since 1.3.18.
Patch0001: 0001-Win-Hivex-Regedit-Accept-CRLF-line-endings.patch
Patch0002: 0002-Win-Hivex-Regedit-Ignore-comments.patch
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl-devel BuildRequires: perl-devel
BuildRequires: perl-generators BuildRequires: perl-generators
@ -283,6 +287,9 @@ fi
%changelog %changelog
* Wed Jan 29 2020 Richard W.M. Jones <rjones@redhat.com> - 1.3.18-20
- Add a couple of upstream patches.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.18-19 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.18-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild