From 39ef66dbfa465e453bb0fb4bc5649c2487ec731d Mon Sep 17 00:00:00 2001 From: Stefano Cotta Ramusino Date: Fri, 5 Jan 2024 22:31:12 +0100 Subject: [PATCH] update to 1.5.7 [release 1.5.7-1mamba;Mon Jun 25 2012] --- README.md | 8 +++++ foremost-1.5.6-fix_build.patch | 13 +++++++ foremost.spec | 64 ++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 foremost-1.5.6-fix_build.patch create mode 100644 foremost.spec diff --git a/README.md b/README.md index 451e9e0..ee8ad13 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # foremost +Foremost is a console program to recover files based on their headers, footers, and internal data structures. +This process is commonly referred to as data carving. +Foremost can work on image files, such as those generated by dd, Safeback, Encase, etc, or directly on a drive. +The headers and footers can be specified by a configuration file or you can use command line switches to specify built-in file types. +These built-in types look at the data structures of a given file format allowing for a more reliable and faster recovery. + +Originally developed by the United States Air Force Office of Special Investigations and The Center for Information Systems Security Studies and Research, foremost has been opened to the general public. + diff --git a/foremost-1.5.6-fix_build.patch b/foremost-1.5.6-fix_build.patch new file mode 100644 index 0000000..0320948 --- /dev/null +++ b/foremost-1.5.6-fix_build.patch @@ -0,0 +1,13 @@ +diff -Nru foremost-1.5.6.orig/main.h foremost-1.5.6/main.h +--- foremost-1.5.6.orig/main.h 2010-01-11 21:28:38.428203679 +0100 ++++ foremost-1.5.6/main.h 2010-01-11 21:28:59.701204009 +0100 +@@ -456,8 +456,7 @@ + size_t table[UCHAR_MAX + 1], int case_sen,int searchtype); + unsigned char *bm_search_skipn(unsigned char *needle, size_t needle_len,unsigned char *haystack, size_t haystack_len, + size_t table[UCHAR_MAX + 1], int casesensitive,int searchtype, int start_pos) ; +-#endif /* __FOREMOST_H */ +- ++ + /* BUILTIN */ + unsigned char* extract_file(f_state *s, u_int64_t c_offset,unsigned char *foundat, u_int64_t buflen, s_spec * needle, u_int64_t f_offset); + diff --git a/foremost.spec b/foremost.spec new file mode 100644 index 0000000..61f9cb4 --- /dev/null +++ b/foremost.spec @@ -0,0 +1,64 @@ +Name: foremost +Version: 1.5.7 +Release: 1mamba +Summary: A console program to recover files based on data carving +Group: Applications/File +Vendor: openmamba +Distribution: openmamba +Packager: Stefano Cotta Ramusino +URL: http://foremost.sourceforge.net/ +Source: http://foremost.sourceforge.net/pkg/foremost-%{version}.tar.gz +Patch0: foremost-1.5.6-fix_build.patch +License: Public Domain +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Foremost is a console program to recover files based on their headers, footers, and internal data structures. +This process is commonly referred to as data carving. +Foremost can work on image files, such as those generated by dd, Safeback, Encase, etc, or directly on a drive. +The headers and footers can be specified by a configuration file or you can use command line switches to specify built-in file types. +These built-in types look at the data structures of a given file format allowing for a more reliable and faster recovery. + +Originally developed by the United States Air Force Office of Special Investigations and The Center for Information Systems Security Studies and Research, foremost has been opened to the general public. + +%prep +%setup -q +%patch0 -p1 +sed -i -e "s,/usr/local,," config.c +sed -i -e "s,.*__U16_TYPE.*,," main.h + +%build +%make \ + RAW_CC=%{_target_platform}-gcc +# RAW_FLAGS="%{optflags} -DVERSION=\"\$(VERSION)\"" + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}{%{_bindir},%{_sysconfdir},%{_mandir}/man1} +%makeoldinstall \ + BIN=%{buildroot}%{_bindir} \ + CONF=%{buildroot}%{_sysconfdir} \ + MAN=%{buildroot}%{_mandir}/man1 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/foremost +%config(noreplace) %{_sysconfdir}/foremost.conf +%{_mandir}/man1/* +%doc CHANGES README + +%changelog +* Mon Jun 25 2012 Stefano Cotta Ramusino 1.5.7-1mamba +- update to 1.5.7 + +* Mon Jan 11 2010 Silvan Calarco 1.5.6-1mamba +- update to 1.5.6 + +* Wed Aug 29 2007 Stefano Cotta Ramusino 1.5-1mamba +- package created by autospec