New upstream version 1.3.9.
- Remove patches which are now upstream.
This commit is contained in:
parent
cb1cc3bdf3
commit
7a90f6ad97
@ -1,27 +0,0 @@
|
||||
From 90ad0ca20e3dfddeb5e78008eb1909a27c581e8e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 10 Sep 2013 18:10:08 +0100
|
||||
Subject: [PATCH] lib: Add attribute((packed)) on inner struct.
|
||||
|
||||
Apparently this attribute is not "inherited" from the outer struct to
|
||||
the inner struct.
|
||||
---
|
||||
lib/hivex-internal.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h
|
||||
index 1d1083a..66ab65a 100644
|
||||
--- a/lib/hivex-internal.h
|
||||
+++ b/lib/hivex-internal.h
|
||||
@@ -155,7 +155,7 @@ struct ntreg_lf_record {
|
||||
struct {
|
||||
uint32_t offset; /* offset of nk-record for this subkey */
|
||||
char hash[4]; /* hash of subkey name */
|
||||
- } keys[1];
|
||||
+ } __attribute__((__packed__)) keys[1];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct ntreg_ri_record {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 72548197b17bf1027fe8578fdacdb09e0c7bfd4d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 10 Sep 2013 14:16:54 +0100
|
||||
Subject: [PATCH] lib/write: Add some debugging messages.
|
||||
|
||||
---
|
||||
lib/write.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/write.c b/lib/write.c
|
||||
index c4a8ddb..8515350 100644
|
||||
--- a/lib/write.c
|
||||
+++ b/lib/write.c
|
||||
@@ -559,8 +559,11 @@ insert_subkey (hive_h *h, const char *name,
|
||||
* indirectly from some ri-record in blocks[]. Since we can update
|
||||
* either of these in-place, we don't need to do this recursively.
|
||||
*/
|
||||
- if (le32toh (parent_nk->subkey_lf) + 0x1000 == old_offs)
|
||||
+ if (le32toh (parent_nk->subkey_lf) + 0x1000 == old_offs) {
|
||||
+ DEBUG (2, "replacing parent_nk->subkey_lf 0x%zx -> 0x%zx",
|
||||
+ old_offs, new_offs);
|
||||
parent_nk->subkey_lf = htole32 (new_offs - 0x1000);
|
||||
+ }
|
||||
else {
|
||||
for (i = 0; blocks[i] != 0; ++i) {
|
||||
if (BLOCK_ID_EQ (h, blocks[i], "ri")) {
|
||||
@@ -568,6 +571,8 @@ insert_subkey (hive_h *h, const char *name,
|
||||
(struct ntreg_ri_record *) ((char *) h->addr + blocks[i]);
|
||||
for (j = 0; j < le16toh (ri->nr_offsets); ++j)
|
||||
if (le32toh (ri->offset[j] + 0x1000) == old_offs) {
|
||||
+ DEBUG (2, "replacing ri (0x%zx) ->offset[%zu] 0x%zx -> 0x%zx",
|
||||
+ blocks[i], j, old_offs, new_offs);
|
||||
ri->offset[j] = htole32 (new_offs - 0x1000);
|
||||
goto found_it;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 30c130df972756d651b33a2e0adf8f35052843c6 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 10 Sep 2013 19:05:15 +0100
|
||||
Subject: [PATCH] ppc: Fix endianness bug which caused node_add_child to fail.
|
||||
|
||||
Code used:
|
||||
|
||||
le32toh (reg_field + 0x1000)
|
||||
|
||||
instead of the correct version:
|
||||
|
||||
le32toh (reg_field) + 0x1000
|
||||
|
||||
The first incorrect form adds 0x1000 to the possibly byte-swapped
|
||||
registry field, corrupting it.
|
||||
|
||||
I used the following command to look for problems in the remaining
|
||||
code but did not find any:
|
||||
|
||||
git grep -P 'le\d+toh\s*\([^)]*\+'
|
||||
|
||||
NOTE that 'htole32 (reg_field - 0x1000)' is correct.
|
||||
---
|
||||
lib/write.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/write.c b/lib/write.c
|
||||
index 8515350..bc2251c 100644
|
||||
--- a/lib/write.c
|
||||
+++ b/lib/write.c
|
||||
@@ -570,7 +570,7 @@ insert_subkey (hive_h *h, const char *name,
|
||||
struct ntreg_ri_record *ri =
|
||||
(struct ntreg_ri_record *) ((char *) h->addr + blocks[i]);
|
||||
for (j = 0; j < le16toh (ri->nr_offsets); ++j)
|
||||
- if (le32toh (ri->offset[j] + 0x1000) == old_offs) {
|
||||
+ if (le32toh (ri->offset[j]) + 0x1000 == old_offs) {
|
||||
DEBUG (2, "replacing ri (0x%zx) ->offset[%zu] 0x%zx -> 0x%zx",
|
||||
blocks[i], j, old_offs, new_offs);
|
||||
ri->offset[j] = htole32 (new_offs - 0x1000);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 8e31fd84cb1c7edcd897ddaaea407774de459b2e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 10 Sep 2013 17:25:30 +0100
|
||||
Subject: [PATCH] ppc: iconv: Source is UTF-16LE not just UTF-16.
|
||||
|
||||
On big endian architectures like PowerPC, "UTF-16" means "UTF-16BE"!
|
||||
---
|
||||
lib/utf16.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/utf16.c b/lib/utf16.c
|
||||
index 4115d30..d0f2e45 100644
|
||||
--- a/lib/utf16.c
|
||||
+++ b/lib/utf16.c
|
||||
@@ -32,7 +32,7 @@
|
||||
char *
|
||||
_hivex_windows_utf16_to_utf8 (/* const */ char *input, size_t len)
|
||||
{
|
||||
- iconv_t ic = iconv_open ("UTF-8", "UTF-16");
|
||||
+ iconv_t ic = iconv_open ("UTF-8", "UTF-16LE");
|
||||
if (ic == (iconv_t) -1)
|
||||
return NULL;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
29
hivex.spec
29
hivex.spec
@ -6,8 +6,8 @@
|
||||
%endif
|
||||
|
||||
Name: hivex
|
||||
Version: 1.3.8
|
||||
Release: 4%{?dist}
|
||||
Version: 1.3.9
|
||||
Release: 1%{?dist}
|
||||
Summary: Read and write Windows Registry binary hive files
|
||||
|
||||
License: LGPLv2
|
||||
@ -18,16 +18,6 @@ Source0: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz
|
||||
# Fix Perl directory install path.
|
||||
Patch0: %{name}-1.3.8-dirs.patch
|
||||
|
||||
# Use VENDOR*DIR instead of SITE*DIR (not yet upstream).
|
||||
Patch2: ruby-vendor-not-site.patch
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||
|
||||
# Various ppc64 bug fixes (all upstream after 1.3.8):
|
||||
Patch3: 0001-lib-Add-attribute-packed-on-inner-struct.patch
|
||||
Patch4: 0001-lib-write-Add-some-debugging-messages.patch
|
||||
Patch5: 0001-ppc-Fix-endianness-bug-which-caused-node_add_child-t.patch
|
||||
Patch6: 0001-ppc-iconv-Source-is-UTF-16LE-not-just-UTF-16.patch
|
||||
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-Test-Simple
|
||||
BuildRequires: perl-Test-Pod
|
||||
@ -166,17 +156,10 @@ ruby-%{name} contains Ruby bindings for %{name}.
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1 -b .dirs
|
||||
%patch2 -p1 -b .rubyvendor
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
autoreconf -i
|
||||
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
make V=1 INSTALLDIRS=vendor %{?_smp_mflags}
|
||||
|
||||
|
||||
%check
|
||||
@ -192,7 +175,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*hivex*
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor
|
||||
|
||||
# Remove unwanted libtool *.la file:
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/libhivex.la
|
||||
@ -279,6 +262,10 @@ rm $RPM_BUILD_ROOT%{python_sitearch}/libhivexmod.la
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 17 2014 Richard W.M. Jones <rjones@redhat.com> - 1.3.9-1
|
||||
- New upstream version 1.3.9.
|
||||
- Remove patches which are now upstream.
|
||||
|
||||
* Thu Sep 19 2013 Richard W.M. Jones <rjones@redhat.com> - 1.3.8-4
|
||||
- OCaml 4.01.0 rebuild.
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
--- hivex-1.3.8.old/ruby/Makefile.am 2013-07-25 15:09:00.000000000 +0100
|
||||
+++ hivex-1.3.8/ruby/Makefile.am 2013-07-25 23:17:05.888067146 +0100
|
||||
@@ -45,13 +45,13 @@
|
||||
$(RAKE) build
|
||||
$(RAKE) rdoc
|
||||
|
||||
-RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
|
||||
-RUBY_SITEARCH := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitearchdir']")
|
||||
+RUBY_VENDORLIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['vendorlibdir']")
|
||||
+RUBY_VENDORARCH := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['vendorarchdir']")
|
||||
|
||||
install:
|
||||
- $(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB)
|
||||
- $(MKDIR_P) $(DESTDIR)$(RUBY_SITEARCH)
|
||||
- $(INSTALL) -p -m 0644 lib/hivex.rb $(DESTDIR)$(RUBY_SITELIB)
|
||||
- $(INSTALL) -p -m 0755 ext/hivex/_hivex.so $(DESTDIR)$(RUBY_SITEARCH)
|
||||
+ $(MKDIR_P) $(DESTDIR)$(RUBY_VENDORLIB)
|
||||
+ $(MKDIR_P) $(DESTDIR)$(RUBY_VENDORARCH)
|
||||
+ $(INSTALL) -p -m 0644 lib/hivex.rb $(DESTDIR)$(RUBY_VENDORLIB)
|
||||
+ $(INSTALL) -p -m 0755 ext/hivex/_hivex.so $(DESTDIR)$(RUBY_VENDORARCH)
|
||||
|
||||
endif
|
Loading…
Reference in New Issue
Block a user