|
|
f82d66f |
# conditionalize Ocaml support
|
|
|
f82d66f |
%ifarch sparc64 s390 s390x
|
|
|
f82d66f |
%bcond_with ocaml
|
|
|
f82d66f |
%else
|
|
|
f82d66f |
%bcond_without ocaml
|
|
|
f82d66f |
%endif
|
|
|
f82d66f |
|
|
|
1fba63d |
Name: hivex
|
|
|
61eed46 |
Version: 1.2.4
|
|
|
448cbe3 |
Release: 4%{?dist}
|
|
|
1fba63d |
Summary: Read and write Windows Registry binary hive files
|
|
|
1fba63d |
|
|
|
1fba63d |
Group: Development/Libraries
|
|
|
1fba63d |
License: LGPLv2
|
|
|
1fba63d |
URL: http://libguestfs.org/
|
|
|
61eed46 |
Source0: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz
|
|
|
1fba63d |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
1fba63d |
|
|
|
1fba63d |
BuildRequires: perl
|
|
|
ea690fe |
BuildRequires: perl-Test-Simple
|
|
|
ea690fe |
BuildRequires: perl-Test-Pod
|
|
|
ea690fe |
BuildRequires: perl-Test-Pod-Coverage
|
|
|
ea690fe |
BuildRequires: perl-ExtUtils-MakeMaker
|
|
|
33837fc |
BuildRequires: perl-IO-stringy
|
|
|
ea690fe |
BuildRequires: perl-libintl
|
|
|
f82d66f |
%if %{with ocaml}
|
|
|
26b2b17 |
BuildRequires: ocaml
|
|
|
26b2b17 |
BuildRequires: ocaml-findlib-devel
|
|
|
f82d66f |
%endif
|
|
|
61eed46 |
BuildRequires: python-devel
|
|
|
1fba63d |
BuildRequires: readline-devel
|
|
|
1fba63d |
BuildRequires: libxml2-devel
|
|
|
1fba63d |
|
|
|
1fba63d |
# This library used to be part of libguestfs. It won't install alongside
|
|
|
1fba63d |
# the old version of libguestfs that included this library:
|
|
|
1fba63d |
Conflicts: libguestfs <= 1:1.0.84
|
|
|
1fba63d |
|
|
|
4fa487a |
# Fix Perl directory install path.
|
|
|
4fa487a |
Patch0: %{name}-1.2.3-dirs.patch
|
|
|
4fa487a |
|
|
|
4fa487a |
# Fix segfault in OCaml binding of Hivex.value_value.
|
|
|
f940d5b |
Patch1: hivex-1.2.4-fix-ocaml-value-value.patch
|
|
|
4fa487a |
|
|
|
1fba63d |
|
|
|
1fba63d |
%description
|
|
|
1fba63d |
Hive files are the undocumented binary blobs that Windows uses to
|
|
|
1fba63d |
store the Windows Registry on disk. Hivex is a library that can read
|
|
|
1fba63d |
and write to these files.
|
|
|
1fba63d |
|
|
|
1fba63d |
'hivexsh' is a shell you can use to interactively navigate a hive
|
|
|
1fba63d |
binary file.
|
|
|
1fba63d |
|
|
|
33837fc |
'hivexregedit' lets you export and merge to the textual regedit
|
|
|
33837fc |
format.
|
|
|
33837fc |
|
|
|
1fba63d |
'hivexml' can be used to convert a hive file to a more useful XML
|
|
|
1fba63d |
format.
|
|
|
1fba63d |
|
|
|
1fba63d |
In order to get access to the hive files themselves, you can copy them
|
|
|
1fba63d |
from a Windows machine. They are usually found in
|
|
|
1fba63d |
%%systemroot%%\system32\config. For virtual machines we recommend
|
|
|
1fba63d |
using libguestfs or guestfish to copy out these files. libguestfs
|
|
|
1fba63d |
also provides a useful high-level tool called 'virt-win-reg' (based on
|
|
|
1fba63d |
hivex technology) which can be used to query specific registry keys in
|
|
|
1fba63d |
an existing Windows VM.
|
|
|
1fba63d |
|
|
|
61eed46 |
For OCaml bindings, see 'ocaml-hivex-devel'.
|
|
|
61eed46 |
|
|
|
26b2b17 |
For Perl bindings, see 'perl-hivex'.
|
|
|
26b2b17 |
|
|
|
61eed46 |
For Python bindings, see 'python-hivex'.
|
|
|
26b2b17 |
|
|
|
1fba63d |
|
|
|
1fba63d |
%package devel
|
|
|
1fba63d |
Summary: Development tools and libraries for %{name}
|
|
|
1fba63d |
Group: Development/Libraries
|
|
|
1fba63d |
Requires: %{name} = %{version}-%{release}
|
|
|
1fba63d |
Requires: pkgconfig
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%description devel
|
|
|
1fba63d |
%{name}-devel contains development tools and libraries
|
|
|
1fba63d |
for %{name}.
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
2a49721 |
%package static
|
|
|
2a49721 |
Summary: Statically linked library for %{name}
|
|
|
2a49721 |
Group: Development/Libraries
|
|
|
2a49721 |
Requires: %{name} = %{version}-%{release}
|
|
|
2a49721 |
|
|
|
2a49721 |
|
|
|
2a49721 |
%description static
|
|
|
2a49721 |
%{name}-static contains the statically linked library
|
|
|
2a49721 |
for %{name}.
|
|
|
2a49721 |
|
|
|
2a49721 |
|
|
|
f82d66f |
%if %{with ocaml}
|
|
|
26b2b17 |
%package -n ocaml-%{name}
|
|
|
26b2b17 |
Summary: OCaml bindings for %{name}
|
|
|
26b2b17 |
Group: Development/Libraries
|
|
|
26b2b17 |
Requires: %{name} = %{version}-%{release}
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%description -n ocaml-%{name}
|
|
|
26b2b17 |
ocaml-%{name} contains OCaml bindings for %{name}.
|
|
|
26b2b17 |
|
|
|
26b2b17 |
This is for toplevel and scripting access only. To compile OCaml
|
|
|
26b2b17 |
programs which use %{name} you will also need ocaml-%{name}-devel.
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%package -n ocaml-%{name}-devel
|
|
|
26b2b17 |
Summary: OCaml bindings for %{name}
|
|
|
26b2b17 |
Group: Development/Libraries
|
|
|
26b2b17 |
Requires: ocaml-%{name} = %{version}-%{release}
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%description -n ocaml-%{name}-devel
|
|
|
26b2b17 |
ocaml-%{name}-devel contains development libraries
|
|
|
26b2b17 |
required to use the OCaml bindings for %{name}.
|
|
|
f82d66f |
%endif
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%package -n perl-%{name}
|
|
|
26b2b17 |
Summary: Perl bindings for %{name}
|
|
|
26b2b17 |
Group: Development/Libraries
|
|
|
26b2b17 |
Requires: %{name} = %{version}-%{release}
|
|
|
26b2b17 |
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%description -n perl-%{name}
|
|
|
26b2b17 |
perl-%{name} contains Perl bindings for %{name}.
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
61eed46 |
%package -n python-%{name}
|
|
|
61eed46 |
Summary: Python bindings for %{name}
|
|
|
61eed46 |
Group: Development/Libraries
|
|
|
61eed46 |
Requires: %{name} = %{version}-%{release}
|
|
|
61eed46 |
|
|
|
61eed46 |
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
61eed46 |
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
61eed46 |
|
|
|
61eed46 |
%description -n python-%{name}
|
|
|
61eed46 |
python-%{name} contains Python bindings for %{name}.
|
|
|
61eed46 |
|
|
|
61eed46 |
|
|
|
1fba63d |
%prep
|
|
|
1fba63d |
%setup -q
|
|
|
4fa487a |
|
|
|
e5ee831 |
%patch0 -p1 -b .dirs
|
|
|
4fa487a |
%patch1 -p1
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%build
|
|
|
2a49721 |
%configure
|
|
|
1fba63d |
make %{?_smp_mflags}
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%install
|
|
|
1fba63d |
rm -rf $RPM_BUILD_ROOT
|
|
|
1fba63d |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
1fba63d |
|
|
|
1fba63d |
# Remove unwanted libtool *.la file:
|
|
|
1fba63d |
rm $RPM_BUILD_ROOT%{_libdir}/libhivex.la
|
|
|
1fba63d |
|
|
|
26b2b17 |
# Remove unwanted Perl files:
|
|
|
26b2b17 |
find $RPM_BUILD_ROOT -name perllocal.pod -delete
|
|
|
26b2b17 |
find $RPM_BUILD_ROOT -name .packlist -delete
|
|
|
26b2b17 |
find $RPM_BUILD_ROOT -name '*.bs' -delete
|
|
|
26b2b17 |
|
|
|
61eed46 |
# Remove unwanted Python files:
|
|
|
61eed46 |
rm $RPM_BUILD_ROOT%{python_sitearch}/libhivexmod.a
|
|
|
61eed46 |
rm $RPM_BUILD_ROOT%{python_sitearch}/libhivexmod.la
|
|
|
61eed46 |
|
|
|
61eed46 |
if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
|
|
|
61eed46 |
mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
|
|
|
61eed46 |
mv $RPM_BUILD_ROOT%{python_sitearch}/hivex.py* \
|
|
|
61eed46 |
$RPM_BUILD_ROOT%{python_sitelib}/
|
|
|
61eed46 |
fi
|
|
|
61eed46 |
|
|
|
1fba63d |
%find_lang %{name}
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%clean
|
|
|
1fba63d |
rm -rf $RPM_BUILD_ROOT
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%post -p /sbin/ldconfig
|
|
|
1fba63d |
|
|
|
1fba63d |
%postun -p /sbin/ldconfig
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%files -f %{name}.lang
|
|
|
1fba63d |
%defattr(-,root,root,-)
|
|
|
1fba63d |
%doc README LICENSE
|
|
|
1fba63d |
%{_bindir}/hivexget
|
|
|
1fba63d |
%{_bindir}/hivexml
|
|
|
33837fc |
%{_bindir}/hivexregedit
|
|
|
1fba63d |
%{_bindir}/hivexsh
|
|
|
1fba63d |
%{_libdir}/libhivex.so.*
|
|
|
1fba63d |
%{_mandir}/man1/hivexget.1*
|
|
|
1fba63d |
%{_mandir}/man1/hivexml.1*
|
|
|
33837fc |
%{_mandir}/man1/hivexregedit.1*
|
|
|
1fba63d |
%{_mandir}/man1/hivexsh.1*
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
1fba63d |
%files devel
|
|
|
1fba63d |
%defattr(-,root,root,-)
|
|
|
1fba63d |
%doc LICENSE
|
|
|
1fba63d |
%{_libdir}/libhivex.so
|
|
|
1fba63d |
%{_mandir}/man3/hivex.3*
|
|
|
1fba63d |
%{_includedir}/hivex.h
|
|
|
1fba63d |
%{_libdir}/pkgconfig/hivex.pc
|
|
|
1fba63d |
|
|
|
1fba63d |
|
|
|
2a49721 |
%files static
|
|
|
2a49721 |
%defattr(-,root,root,-)
|
|
|
2a49721 |
%doc LICENSE
|
|
|
2a49721 |
%{_libdir}/libhivex.a
|
|
|
2a49721 |
|
|
|
2a49721 |
|
|
|
f82d66f |
%if %{with ocaml}
|
|
|
26b2b17 |
%files -n ocaml-%{name}
|
|
|
26b2b17 |
%defattr(-,root,root,-)
|
|
|
26b2b17 |
%doc README
|
|
|
26b2b17 |
%{_libdir}/ocaml/hivex
|
|
|
26b2b17 |
%exclude %{_libdir}/ocaml/hivex/*.a
|
|
|
26b2b17 |
%exclude %{_libdir}/ocaml/hivex/*.cmxa
|
|
|
26b2b17 |
%exclude %{_libdir}/ocaml/hivex/*.cmx
|
|
|
26b2b17 |
%exclude %{_libdir}/ocaml/hivex/*.mli
|
|
|
26b2b17 |
%{_libdir}/ocaml/stublibs/*.so
|
|
|
26b2b17 |
%{_libdir}/ocaml/stublibs/*.so.owner
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%files -n ocaml-%{name}-devel
|
|
|
26b2b17 |
%defattr(-,root,root,-)
|
|
|
26b2b17 |
%{_libdir}/ocaml/hivex/*.a
|
|
|
26b2b17 |
%{_libdir}/ocaml/hivex/*.cmxa
|
|
|
26b2b17 |
%{_libdir}/ocaml/hivex/*.cmx
|
|
|
26b2b17 |
%{_libdir}/ocaml/hivex/*.mli
|
|
|
f82d66f |
%endif
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
26b2b17 |
%files -n perl-%{name}
|
|
|
26b2b17 |
%defattr(-,root,root,-)
|
|
|
26b2b17 |
%{perl_vendorarch}/*
|
|
|
26b2b17 |
%{_mandir}/man3/Win::Hivex.3pm*
|
|
|
33837fc |
%{_mandir}/man3/Win::Hivex::Regedit.3pm*
|
|
|
26b2b17 |
|
|
|
26b2b17 |
|
|
|
61eed46 |
%files -n python-%{name}
|
|
|
61eed46 |
%defattr(-,root,root,-)
|
|
|
61eed46 |
%{python_sitearch}/*
|
|
|
61eed46 |
%{python_sitelib}/*.py
|
|
|
61eed46 |
%{python_sitelib}/*.pyc
|
|
|
61eed46 |
%{python_sitelib}/*.pyo
|
|
|
61eed46 |
|
|
|
61eed46 |
|
|
|
1fba63d |
%changelog
|
|
|
448cbe3 |
* Wed Jan 5 2011 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-4
|
|
|
448cbe3 |
- Rebuild against OCaml 3.12.0.
|
|
|
448cbe3 |
|
|
|
f940d5b |
* Thu Dec 16 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-3
|
|
|
4fa487a |
- Backport upstream patch to fix segfault in Hivex.value_value binding.
|
|
|
4fa487a |
|
|
|
61eed46 |
* Thu Dec 2 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-1
|
|
|
61eed46 |
- New upstream version 1.2.4.
|
|
|
61eed46 |
- This adds Python bindings (python-hivex subpackage).
|
|
|
61eed46 |
- Fix Source0.
|
|
|
61eed46 |
|
|
|
e5ee831 |
* Fri Nov 19 2010 Dan Horák <dan[at]danny.cz> - 1.2.3-3
|
|
|
e5ee831 |
- fix built with recent perl
|
|
|
e5ee831 |
|
|
|
f82d66f |
* Tue Sep 7 2010 Dan Horák <dan[at]danny.cz> - 1.2.3-2
|
|
|
f82d66f |
- conditionalize ocaml support
|
|
|
f82d66f |
|
|
|
9f1e264 |
* Fri Aug 27 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-1
|
|
|
9f1e264 |
- New upstream version 1.2.3.
|
|
|
9f1e264 |
|
|
|
2a49721 |
* Wed Aug 25 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-3
|
|
|
2a49721 |
- Create a hivex-static subpackage.
|
|
|
2a49721 |
|
|
|
6f4b18a |
* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.2.2-2
|
|
|
6f4b18a |
- Mass rebuild with perl-5.12.0
|
|
|
6f4b18a |
|
|
|
805d36f |
* Wed Apr 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-1
|
|
|
805d36f |
- New upstream version 1.2.2.
|
|
|
805d36f |
|
|
|
33837fc |
* Tue Mar 30 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.1-1
|
|
|
33837fc |
- New upstream version 1.2.1.
|
|
|
33837fc |
- Includes new tool for exporting and merging in regedit format.
|
|
|
33837fc |
|
|
|
ea690fe |
* Mon Mar 1 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-2
|
|
|
26b2b17 |
- New upstream version 1.2.0.
|
|
|
26b2b17 |
- This includes OCaml and Perl bindings, so add these as subpackages.
|
|
|
26b2b17 |
|
|
|
1fba63d |
* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-3
|
|
|
1fba63d |
- Missing Epoch in conflicts version fixed.
|
|
|
1fba63d |
|
|
|
1fba63d |
* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-2
|
|
|
1fba63d |
- Add Conflicts libguestfs <= 1.0.84.
|
|
|
1fba63d |
|
|
|
1fba63d |
* Mon Feb 22 2010 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-1
|
|
|
1fba63d |
- Initial Fedora RPM.
|