Hi. Found this patch today and made a addon package to the plain tar package. I don't think the patch itself messes too much with tar, but you never know. Anyway, I spent the time make the patching and packaging work for this addon, so I guess or hope it's worth looking into.
Patches attached. Chears. -- Regards // Oden Eriksson, Deserve-IT.com
gzrt-0.1.tar.bz2
Description: application/tbz
--- tar.spec 2003-01-02 13:16:14.000000000 +0100 +++ tar.spec.oden 2003-02-08 13:14:00.000000000 +0100 @@ -1,25 +1,28 @@ # rh-1.3.25-4 %define _bindir /bin -Summary: A GNU file archiving program. -Name: tar -Version: 1.13.25 -Release: 10mdk -License: GPL -Group: Archiving/Backup -URL: http://www.gnu.org/software/tar/tar.html -Source: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.bz2 -Patch0: tar-1.13.18-manpage.patch.bz2 -Patch1: tar-1.13.25-sock.patch.bz2 -Patch7: tar-1.13.19-error.patch.bz2 -Patch8: tar-1.13.19-absolutenames.patch.bz2 -Patch9: tar-1.13.25-automake.patch.bz2 -Patch10: tar-1.13.25-corruption-fix.patch.bz2 -Patch11: tar-dots.patch.bz2 -Patch105: tar-1.13.22-yIfilter.patch.bz2 +%define gzrt_ver 0.1 +Summary: A GNU file archiving program. +Name: tar +Version: 1.13.25 +Release: 11mdk +License: GPL +Group: Archiving/Backup +URL: http://www.gnu.org/software/tar/tar.html +Source0: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.bz2 +Source1: http://www.urbanophile.com/arenn/coding/gzrt/gzrt-%{gzrt_ver}.tar.bz2 +Patch0: tar-1.13.18-manpage.patch.bz2 +Patch1: tar-1.13.25-sock.patch.bz2 +Patch7: tar-1.13.19-error.patch.bz2 +Patch8: tar-1.13.19-absolutenames.patch.bz2 +Patch9: tar-1.13.25-automake.patch.bz2 +Patch10: tar-1.13.25-corruption-fix.patch.bz2 +Patch11: tar-dots.patch.bz2 +Patch105: tar-1.13.22-yIfilter.patch.bz2 Prereq: /sbin/install-info /sbin/rmt +Buildrequires: zlib-devel Buildroot: %{_tmppath}/%{name}-root %description @@ -39,8 +42,22 @@ compression and decompression utilities essential for working with files. +%package -n gzrecover +Summary: Recover data from a corrupted gzip file +Version: %{gzrt_ver} +Release: 1mdk +License: zlib License +Group: Archiving/Backup +URL: http://www.urbanophile.com/arenn/coding/gzrt/gzrt.html + +%description -n gzrecover +The gzip Recovery Toolkit v%{gzrt_ver}. + +gzrecover is a program that will attempt to extract any readable data +out of a gzip file that has been corrupted. + %prep -%setup -q +%setup -q -a1 %patch0 -p1 -b .manpage %patch1 -p1 -b .sock %patch105 -p1 -b .yIfilter @@ -50,6 +67,10 @@ %patch8 -p1 -b .absn %patch11 -p1 -b .dots +pushd src + patch -p1 < ../gzrt-%{gzrt_ver}/tar-recovery.patch +popd + %build unset LINGUAS || : export CFLAGS="$RPM_OPT_FLAGS -DHAVE_STRERROR -D_GNU_SOURCE" @@ -57,16 +78,28 @@ %make LIBS=-lbsd make check +# make the gzip recovery toolkit +pushd gzrt-%{gzrt_ver} + %make +popd + %install -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %makeinstall -ln -sf tar $RPM_BUILD_ROOT/bin/gtar -mkdir -p $RPM_BUILD_ROOT%_mandir/man1 -install -m644 tar.1 $RPM_BUILD_ROOT%_mandir/man1 +ln -sf tar %{buildroot}/bin/gtar +install -d %{buildroot}%{_mandir}/man1 +install -m644 tar.1 %{buildroot}%{_mandir}/man1/ # rmt is provided by rmt ... -rm -f $RPM_BUILD_ROOT/%_libdir/rmt +rm -f %{buildroot}%{_libdir}/rmt + +# install the gzip recovery toolkit +pushd gzrt-%{gzrt_ver} + install -m755 gzrecover %{buildroot}/bin/ +popd + +rm -f %{buildroot}%{_infodir}/dir %find_lang %{name} @@ -77,7 +110,7 @@ %_remove_install_info %{name}.info %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root) @@ -87,8 +120,15 @@ %{_infodir}/tar.info* %{_mandir}/man1/tar.1* +%files -n gzrecover +%defattr(-,root,root) +%doc gzrt-%{gzrt_ver}/README +/bin/gzrecover %changelog +* Sat Feb 08 2003 Oden Eriksson <[EMAIL PROTECTED]> 1.13.25-11mdk +- added S1 as a sub package addon + * Thu Jan 02 2003 Thierry Vignaud <[EMAIL PROTECTED]> 1.13.25-10mdk - fix unpackaged files - fix strange-permission @@ -283,3 +323,4 @@ * Thu May 29 1997 Michael Fulbright <[EMAIL PROTECTED]> - Fixed to include rmt +