From 71fb3b32a39ba69f882500d0a2f159cd2da9ccf7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:21:39 +0100 Subject: [PATCH] update to 0.2.1 [release 0.2.1-1mamba;Sun Jan 12 2014] --- README.md | 17 +++++++ gpart-0.1h-arm-x86_64_build.patch | 12 +++++ gpart-0.1h-kernel-2.6.18.patch | 13 +++++ gpart-errno.patch | 25 ++++++++++ gpart.spec | 81 +++++++++++++++++++++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 gpart-0.1h-arm-x86_64_build.patch create mode 100644 gpart-0.1h-kernel-2.6.18.patch create mode 100644 gpart-errno.patch create mode 100644 gpart.spec diff --git a/README.md b/README.md index e4dcbe7..0bfee6b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # gpart +Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. +The guessed table can be written to a file or device. +Supported (guessable) filesystem or partition types: +* DOS/Windows FAT (FAT 12/16/32) +* Linux ext2 +* Linux swap partitions versions 0 and 1 (Linux >= v2.2.X) +* Linux LVM physical volume module (LVM by Heinz Mauelshagen) +* Reiser FS +* OS/2 HPFS +* Windows NT/2000 FS +* *BSD disklabels +* Solaris/x86 disklabels +* Minix FS +* SGI XFS on Linux +* BeOS filesystem +* QNX 4.x filesystem + diff --git a/gpart-0.1h-arm-x86_64_build.patch b/gpart-0.1h-arm-x86_64_build.patch new file mode 100644 index 0000000..ab03586 --- /dev/null +++ b/gpart-0.1h-arm-x86_64_build.patch @@ -0,0 +1,12 @@ +diff -ru gpart-0.1h.orig/src/gm_ntfs.h gpart-0.1h/src/gm_ntfs.h +--- gpart-0.1h.orig/src/gm_ntfs.h 2001-01-29 21:33:58.000000000 +0100 ++++ gpart-0.1h/src/gm_ntfs.h 2012-02-26 14:25:57.202524217 +0100 +@@ -29,7 +29,7 @@ + /* 'NTFS' in little endian */ + #define NTFS_SUPER_MAGIC 0x5346544E + +-#if defined(i386) || defined(__i386__) || defined(__alpha__) ++#if defined(i386) || defined(__i386__) || defined(__alpha__) || defined(__arm__) || defined(__x86_64__) + + /* unsigned integral types */ + #ifndef NTFS_INTEGRAL_TYPES diff --git a/gpart-0.1h-kernel-2.6.18.patch b/gpart-0.1h-kernel-2.6.18.patch new file mode 100644 index 0000000..58c7e03 --- /dev/null +++ b/gpart-0.1h-kernel-2.6.18.patch @@ -0,0 +1,13 @@ +diff -ru gpart-0.1h/src/l64seek.c gpart-0.1h-new/src/l64seek.c +gpart-0.1h/src/l64seek.c 2000-12-14 08:54:11.000000000 +1000 ++++ gpart-0.1h-new/src/l64seek.c 2006-10-28 21:37:36.000000000 +1000 +@@ -26,7 +26,11 @@static int osptr = -1; + + #if defined(__linux__) && defined(__i386__) +-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh) ++#include ++static int _llseek(uint fd, ulong hi, ulong lo, loff_t *res, uint wh) ++{ ++ return syscall(SYS__llseek, fd, hi, lo, res, wh); ++} + #endif diff --git a/gpart-errno.patch b/gpart-errno.patch new file mode 100644 index 0000000..c631ab0 --- /dev/null +++ b/gpart-errno.patch @@ -0,0 +1,25 @@ +Only in gpart-0.1h/src: .depend +diff -ru gpart-0.1h.orig/src/disku.c gpart-0.1h/src/disku.c +--- gpart-0.1h.orig/src/disku.c 2004-10-05 11:13:34.000000000 +0200 ++++ gpart-0.1h/src/disku.c 2004-10-05 11:17:02.000000000 +0200 +@@ -18,6 +18,7 @@ + + #include + #include ++#include + #include + #include "gpart.h" + +diff -ru gpart-0.1h.orig/src/l64seek.c gpart-0.1h/src/l64seek.c +--- gpart-0.1h.orig/src/l64seek.c 2004-10-05 11:13:34.000000000 +0200 ++++ gpart-0.1h/src/l64seek.c 2004-10-05 11:18:16.000000000 +0200 +@@ -15,7 +15,7 @@ + */ + + #include "l64seek.h" +- ++#include + + #define OSTACKLEN 16 + static struct +Only in gpart-0.1h/src: l64seek.o diff --git a/gpart.spec b/gpart.spec new file mode 100644 index 0000000..9f7ebeb --- /dev/null +++ b/gpart.spec @@ -0,0 +1,81 @@ +### AUTOUPDATE-OFF: 2 +Name: gpart +Version: 0.2.1 +Release: 1mamba +Summary: A tool which tries to recover the primary partition table +Group: System/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.stud.uni-hannover.de/user/76201/gpart/ +Source: https://github.com/baruch/gpart.git/v%{version}/gpart-%{version}.tar.bz2 +#Source: http://www.stud.uni-hannover.de/user/76201/gpart/%{name}-%{version}.tar.gz +Patch1: %{name}-errno.patch +Patch2: %{name}-0.1h-kernel-2.6.18.patch +Patch3: %{name}-0.1h-arm-x86_64_build.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. +The guessed table can be written to a file or device. +Supported (guessable) filesystem or partition types: +* DOS/Windows FAT (FAT 12/16/32) +* Linux ext2 +* Linux swap partitions versions 0 and 1 (Linux >= v2.2.X) +* Linux LVM physical volume module (LVM by Heinz Mauelshagen) +* Reiser FS +* OS/2 HPFS +* Windows NT/2000 FS +* *BSD disklabels +* Solaris/x86 disklabels +* Minix FS +* SGI XFS on Linux +* BeOS filesystem +* QNX 4.x filesystem + +%prep +%setup -q -n %{name}-%{version} +%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 + +%build +./autogen.sh +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_bindir}/gpart +%{_mandir}/man8/gpart.8* +%dir %{_datadir}/doc/gpart +%{_datadir}/doc/gpart/Changes +%{_datadir}/doc/gpart/README +%doc COPYING + +%changelog +* Sun Jan 12 2014 Silvan Calarco 0.2.1-1mamba +- update to 0.2.1 + +* Sun Oct 02 2011 Silvan Calarco 0.1h-4mamba +- specfile updated and rebuilt + +* Mon Jun 12 2006 Davide Madrisan 0.1h-3qilnx +- rebuilt + +* Thu Feb 24 2005 Silvan Calarco 0.1h-2qilnx +- fixed specfile Group entry + +* Tue Oct 05 2004 Silvan Calarco 0.1h-1qilnx +- package created by autospec