Author Topic: Extra files in testdisk?!  (Read 865 times)

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Extra files in testdisk?!
« on: November 06, 2011, 11:38:34 AM »
So I decided to take a stab at packaging testdisk. I downloaded the SRPM from the older version and it dose not contain folders ico or l. Inside ico is "photorec.ico" and "testdisk.ico" inside l is "linux" There is also fidentify, but this has two identical files to testdisk/photorec, so I assume it would be installed just like the other two.

In the changelog provided with the program it details added files like news, but doesn't mention anything about these two folders. fidentify, photorec, and testdisk all now have a .8 meanwhile the older version had a .1

This is as far as I got on the SPEC:
Code: [Select]
%define name    testdisk
%define version 6.12
%define rel     %mkrel 1

Summary: Tool to check and undelete partition
Summary(pl): Narzêdzie sprawdzaj±ce i odzyskuj±ce partycje
Summary(fr): Outil pour vérifier et restaurer des partitions
Name: %name
Version: %version
Release: %rel
License: GPLv2+
Group: System/Kernel and hardware
Source0: http://www.cgsecurity.org/%{name}-%{version}.tar.xz
URL: http://www.cgsecurity.org/wiki/TestDisk
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%package -n photorec
Summary: Data recovery software
Group: System/Kernel and hardware

%description
Tool to check and undelete partition. Works with the following
filesystems:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l pl
Narzêdzie sprawdzaj±ce i odzyskujace partycje. Pracuje z partycjami:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l fr
Outil pour vérifier et restaurer des partitions. Fonctionne avec les
systèmes de fichiers suivants :

    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS (Compressed File System)
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS et HFS+, Hierarchical File System
    * JFS, Système de fichier journalisé d'IBM
    * Linux Ext2 et Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 et 2)
    * LVM et LVM2, Linux Logical Volume Manager
    * Netware NSS
    * NTFS ( Windows NT/2K/XP/2003 )
    * ReiserFS 3.5, 3.6 et 4
    * Sun Solaris i386 disklabel
    * UFS et UFS2 (Sun/BSD/...)
    * XFS, Système de fichier journalisé de SGI

%description -n photorec
PhotoRec is file data recovery software designed to recover lost files
including video, documents and archives from Hard Disks and CDRom and lost
pictures (thus, its 'Photo Recovery' name) from digital camera memory.

PhotoRec ignores the filesystem and goes after the underlying data, so it
will still work even if your media's filesystem has been severely damaged
or re-formatted.

%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m 0755 testdisk_static $RPM_BUILD_ROOT/usr/sbin/testdisk
install -m 0755 photorec_static $RPM_BUILD_ROOT/usr/sbin/photorec
install -m 0755 fidentify_static $RPM_BUILD_ROOT/usr/sbin/fidentify

mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 testdisk.8 $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 photorec.8 $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 fidentify.8 $RPM_BUILD_ROOT/usr/share/man/man1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/testdisk
%_datadir/man/man1/testdisk.8.bz2


%files -n photorec
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/photorec
%_datadir/man/man1/photorec.8.bz2

%files -n fidentify
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/photorec
%_datadir/man/man1/fidentify.8.bz2


%changelog
* Sun Nov 06 2011 Glamdring <glamdring92 at gmail.com> 6.12-1pclos2011
- 6.12

* Wed Apr 13 2011 Texstar <texstar at gmail.com> 6.11.3-1pclos2011
- 6.11.3 and use static builds to prevent segfaults

* Fri Jan 22 2010 Texstar <texstar at gmail.com> 6.11-1pclos2010
- 6.11

As you can see I just adapted it to use .8 and added fidentify, I'm not sure if that is correct. But I'm really confused on the extra files.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Extra files in testdisk?!
« Reply #1 on: November 07, 2011, 05:33:14 AM »
New files need to be added to your spec under %files. Otherwise your build will end with an unpackaged files found error.     

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Extra files in testdisk?!
« Reply #2 on: November 07, 2011, 09:52:02 AM »
New files need to be added to your spec under %files. Otherwise your build will end with an unpackaged files found error.     

I'm aware of that, I was just trying to see if any knew anything about the new files or why so many things differed from current version. I was going to try and build this today after class, so I will let you know how it goes.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Extra files in testdisk?!
« Reply #3 on: November 07, 2011, 12:52:00 PM »
 :o Oops! I misunderstood your question. :-\  ::)   

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: Extra files in testdisk?!
« Reply #4 on: November 07, 2011, 01:34:10 PM »
New files need to be added to your spec under %files. Otherwise your build will end with an unpackaged files found error.     

I'm aware of that, I was just trying to see if any knew anything about the new files or why so many things differed from current version. I was going to try and build this today after class, so I will let you know how it goes.

When a new package version has a lot of changes, I try to find the source rpm of the 'new' package from another distro. Often, someone else has already figured out what needs to happen with the changed files.

Galen

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Extra files in testdisk?!
« Reply #5 on: November 07, 2011, 02:02:07 PM »
New files need to be added to your spec under %files. Otherwise your build will end with an unpackaged files found error.     

I'm aware of that, I was just trying to see if any knew anything about the new files or why so many things differed from current version. I was going to try and build this today after class, so I will let you know how it goes.

When a new package version has a lot of changes, I try to find the source rpm of the 'new' package from another distro. Often, someone else has already figured out what needs to happen with the changed files.

Galen


Smart thinking, I didn't seen any :/

I will attempt building it and see how it works out.

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Extra files in testdisk?!
« Reply #6 on: November 07, 2011, 02:35:02 PM »
All went well until the end I get this:
Code: [Select]
installed but unpacked files found

It than list testdisk, and testdisk bz2 files.
« Last Edit: November 07, 2011, 02:38:35 PM by glamdring »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Extra files in testdisk?!
« Reply #7 on: November 07, 2011, 02:42:53 PM »
All files must be listed under %files, or you will get this error.     

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Extra files in testdisk?!
« Reply #8 on: November 07, 2011, 03:09:55 PM »
All files must be listed under %files, or you will get this error.    


I don't see what is missing here is my current SPEC. I removed the extra files for now to try and build it without them.
Code: [Select]
%define name    testdisk
%define version 6.12
%define rel     %mkrel 1

Summary: Tool to check and undelete partition
Summary(pl): Narzêdzie sprawdzaj±ce i odzyskuj±ce partycje
Summary(fr): Outil pour vérifier et restaurer des partitions
Name: %name
Version: %version
Release: %rel
License: GPLv2+
Group: System/Kernel and hardware
Source0: http://www.cgsecurity.org/%{name}-%{version}.tar.xz
URL: http://www.cgsecurity.org/wiki/TestDisk
Requires: libncurses-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%package -n photorec
Summary: Data recovery software
Group: System/Kernel and hardware

%description
Tool to check and undelete partition. Works with the following
filesystems:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l pl
Narzêdzie sprawdzaj±ce i odzyskujace partycje. Pracuje z partycjami:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l fr
Outil pour vérifier et restaurer des partitions. Fonctionne avec les
systèmes de fichiers suivants :

    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS (Compressed File System)
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS et HFS+, Hierarchical File System
    * JFS, Système de fichier journalisé d'IBM
    * Linux Ext2 et Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 et 2)
    * LVM et LVM2, Linux Logical Volume Manager
    * Netware NSS
    * NTFS ( Windows NT/2K/XP/2003 )
    * ReiserFS 3.5, 3.6 et 4
    * Sun Solaris i386 disklabel
    * UFS et UFS2 (Sun/BSD/...)
    * XFS, Système de fichier journalisé de SGI

%description -n photorec
PhotoRec is file data recovery software designed to recover lost files
including video, documents and archives from Hard Disks and CDRom and lost
pictures (thus, its 'Photo Recovery' name) from digital camera memory.

PhotoRec ignores the filesystem and goes after the underlying data, so it
will still work even if your media's filesystem has been severely damaged
or re-formatted.

%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m 0755 testdisk_static $RPM_BUILD_ROOT/usr/sbin/testdisk
install -m 0755 photorec_static $RPM_BUILD_ROOT/usr/sbin/photorec
install -m 0755 fidentify_static $RPM_BUILD_ROOT/usr/sbin/fidentify

mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 testdisk.8 $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 photorec.8 $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 fidentify.8 $RPM_BUILD_ROOT/usr/share/man/man1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/testdisk
%_datadir/man/man1/testdisk.8.bz2


%files -n photorec
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/photorec
%_datadir/man/man1/photorec.8.bz2

%files
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/fidentify
%_datadir/man/man1/fidentify.8.bz2


%changelog
* Sun Nov 06 2011 Glamdring <glamdring92 at gmail.com> 6.12-1pclos2011
- 6.12 add required libncurses-devel

* Wed Apr 13 2011 Texstar <texstar at gmail.com> 6.11.3-1pclos2011
- 6.11.3 and use static builds to prevent segfaults

* Fri Jan 22 2010 Texstar <texstar at gmail.com> 6.11-1pclos2010
- 6.11

And the old one:
Code: [Select]
%define name    testdisk
%define version 6.11.3
%define rel     %mkrel 1

Summary: Tool to check and undelete partition
Summary(pl): Narzêdzie sprawdzaj±ce i odzyskuj±ce partycje
Summary(fr): Outil pour vérifier et restaurer des partitions
Name: %name
Version: %version
Release: %rel
License: GPLv2+
Group: System/Kernel and hardware
Source0: http://www.cgsecurity.org/%{name}-%{version}.tar.xz
URL: http://www.cgsecurity.org/wiki/TestDisk
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%package -n photorec
Summary: Data recovery software
Group: System/Kernel and hardware

%description
Tool to check and undelete partition. Works with the following
filesystems:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l pl
Narzêdzie sprawdzaj±ce i odzyskujace partycje. Pracuje z partycjami:
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS, Compressed File System
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Ext2 and Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Mac partition map
    * Novell Storage Services NSS
    * NTFS ( Windows NT/2K/XP/2003/Vista )
    * ReiserFS 3.5, 3.6 and 4
    * Sun Solaris i386 disklabel
    * Unix File System UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System

%description -l fr
Outil pour vérifier et restaurer des partitions. Fonctionne avec les
systèmes de fichiers suivants :

    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS (Compressed File System)
    * DOS/Windows FAT12, FAT16 and FAT32
    * HFS et HFS+, Hierarchical File System
    * JFS, Système de fichier journalisé d'IBM
    * Linux Ext2 et Ext3
    * Linux Raid
          o RAID 1: mirroring
          o RAID 4: striped array with parity device
          o RAID 5: striped array with distributed parity information
          o RAID 6: striped array with distributed dual redundancy information
    * Linux Swap (versions 1 et 2)
    * LVM et LVM2, Linux Logical Volume Manager
    * Netware NSS
    * NTFS ( Windows NT/2K/XP/2003 )
    * ReiserFS 3.5, 3.6 et 4
    * Sun Solaris i386 disklabel
    * UFS et UFS2 (Sun/BSD/...)
    * XFS, Système de fichier journalisé de SGI

%description -n photorec
PhotoRec is file data recovery software designed to recover lost files
including video, documents and archives from Hard Disks and CDRom and lost
pictures (thus, its 'Photo Recovery' name) from digital camera memory.

PhotoRec ignores the filesystem and goes after the underlying data, so it
will still work even if your media's filesystem has been severely damaged
or re-formatted.

%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m 0755 testdisk_static $RPM_BUILD_ROOT/usr/sbin/testdisk
install -m 0755 photorec_static $RPM_BUILD_ROOT/usr/sbin/photorec

mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 testdisk.1 $RPM_BUILD_ROOT/usr/share/man/man1
install -m 0644 photorec.1 $RPM_BUILD_ROOT/usr/share/man/man1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/testdisk
%_datadir/man/man1/testdisk.1.bz2


%files -n photorec
%defattr(-,root,root)
%attr(755,root,root) %{_sbindir}/photorec
%_datadir/man/man1/photorec.1.bz2


%changelog
* Wed Apr 13 2011 Texstar <texstar at gmail.com> 6.11.3-1pclos2011
- 6.11.3 and use static builds to prevent segfaults

* Fri Jan 22 2010 Texstar <texstar at gmail.com> 6.11-1pclos2010
- 6.11

Error:
Code: [Select]
RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/sbin/testdisk
   /usr/share/man/man1/testdisk.8.bz2
« Last Edit: November 07, 2011, 03:25:35 PM by glamdring »

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: Extra files in testdisk?!
« Reply #9 on: November 07, 2011, 03:16:46 PM »
Texstar made a 64-bit one already, maybe I can get a hold of it and learn something from it.

EDIT: only thing I can find is the RPM not the SRPM and it's the beta 6.13 version not stable 6.12
« Last Edit: November 07, 2011, 03:23:23 PM by glamdring »