From f096a571b9ac7c24e6b54e944b2e8ac2159b10ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 17 Feb 2013 13:22:33 +0200 Subject: [PATCH] add memset patch from fedora, formatting cosmetics --- hfsplusutils.spec | 39 +++++++++++++++++++++++++++------------ memset.patch | 11 +++++++++++ 2 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 memset.patch diff --git a/hfsplusutils.spec b/hfsplusutils.spec index 5918013..a366e82 100644 --- a/hfsplusutils.spec +++ b/hfsplusutils.spec @@ -1,8 +1,10 @@ +# TODO +# - why disable shared? Summary: HFS+ volume utils Summary(pl.UTF-8): Narzędzia do woluminów HFS+ Name: hfsplusutils Version: 1.0.4 -Release: 0.1 +Release: 0.2 License: GPL Group: Applications/System Source0: ftp://ftp.penguinppc.org/users/hasi/hfsplus_%{version}.src.tar.bz2 @@ -11,7 +13,8 @@ Patch0: %{name}-nullisnotachar.patch Patch1: %{name}-errno.patch Patch2: %{name}-includes.patch Patch3: %{name}-gcc4.patch -URL: http://www.penguinppc.org +Patch4: memset.patch +URL: http://www.penguinppc.org/ BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -28,7 +31,7 @@ Narzędzia do woluminów HFS+. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 +%patch3 -p1 %build %{__libtoolize} @@ -43,17 +46,21 @@ Narzędzia do woluminów HFS+. %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man1} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/sbin -cp -f $RPM_BUILD_ROOT%{_bindir}/hpfsck $RPM_BUILD_ROOT/sbin/fsck.hfsplus +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfsp.la +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfsp.a -install -d $RPM_BUILD_ROOT%{_mandir}/man1 -install doc/man/hfsp.man $RPM_BUILD_ROOT%{_mandir}/man1/hfsp.1 -for a in hpcd hpcopy hpfsck hpls hpmkdir hpmount hppwd hprm hpumount fsck.hfsplus ; do - echo '.so hfsp.1' > $RPM_BUILD_ROOT%{_mandir}/man1/${a}.1 +# move to /sbin to allow separate %{_prefix} +mv $RPM_BUILD_ROOT%{_bindir}/hpfsck $RPM_BUILD_ROOT/sbin/fsck.hfsplus +ln -s /sbin/fsck.hfsplus $RPM_BUILD_ROOT%{_bindir}/hpfsck + +cp -p doc/man/hfsp.man $RPM_BUILD_ROOT%{_mandir}/man1/hfsp.1 +for a in hpcd hpcopy hpfsck hpls hpmkdir hpmount hppwd hprm hpumount fsck.hfsplus; do + echo '.so hfsp.1' > $RPM_BUILD_ROOT%{_mandir}/man1/$a.1 done %clean @@ -61,7 +68,15 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc AUTHORS NEWS README -%attr(755,root,root) %{_bindir}/* +%doc AUTHORS NEWS README %attr(755,root,root) /sbin/fsck.hfsplus -%{_mandir}/man?/* +%attr(755,root,root) %{_bindir}/hpcd +%attr(755,root,root) %{_bindir}/hpcopy +%attr(755,root,root) %{_bindir}/hpfsck +%attr(755,root,root) %{_bindir}/hpls +%attr(755,root,root) %{_bindir}/hpmkdir +%attr(755,root,root) %{_bindir}/hpmount +%attr(755,root,root) %{_bindir}/hppwd +%attr(755,root,root) %{_bindir}/hprm +%attr(755,root,root) %{_bindir}/hpumount +%{_mandir}/man1/* diff --git a/memset.patch b/memset.patch new file mode 100644 index 0000000..d2010e7 --- /dev/null +++ b/memset.patch @@ -0,0 +1,11 @@ +--- hfsplus-1.0.4/libhfsp/src/record.c~ 2002-03-17 17:20:01.000000000 +0000 ++++ hfsplus-1.0.4/libhfsp/src/record.c 2007-08-22 14:31:26.000000000 +0100 +@@ -654,7 +654,7 @@ int record_init_string(record* r, UInt16 + hfsp_cat_entry* entry = &r->record; + UInt16 ptype = parent->record.type; + +- memset(r, sizeof(record), 0); // **** Debugging only ++ memset(r, 0, sizeof(record)); // **** Debugging only + + r->tree = parent->tree; + r->node_index = 0; -- 2.44.0