[scalpel] Initial import (#581181).

rebus rebus at fedoraproject.org
Thu Sep 9 22:26:48 UTC 2010


commit 7210fd782f616444686dae8116856c5609988691
Author: Michal Ambroz <rebus at seznam.cz>
Date:   Fri Sep 10 00:26:51 2010 +0200

    Initial import (#581181).

 .gitignore             |    1 +
 scalpel-confpath.patch |   15 +++++++++
 scalpel.spec           |   78 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 4 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f40c983 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/scalpel-1.60.tar.gz
diff --git a/scalpel-confpath.patch b/scalpel-confpath.patch
new file mode 100644
index 0000000..90f1ed7
--- /dev/null
+++ b/scalpel-confpath.patch
@@ -0,0 +1,15 @@
+--- scalpel-1.60/scalpel.c.0conf	2006-12-08 20:22:07.000000000 +0100
++++ scalpel-1.60/scalpel.c	2010-09-01 02:04:26.000000000 +0200
+@@ -242,6 +242,12 @@
+   char *buffer = malloc((NUM_SEARCH_SPEC_ELEMENTS * MAX_STRING_LENGTH + 1) * sizeof(char));
+ 
+   f = fopen(state->conffile,"r");  
++  if ( (f == NULL) && strcmp(state->conffile, SCALPEL_DEFAULT_CONFIG_FILE) ) {
++      strncpy(state->conffile, "/etc/", MAX_STRING_LENGTH);
++      strncat(state->conffile, SCALPEL_DEFAULT_CONFIG_FILE, MAX_STRING_LENGTH-strlen(state->conffile));
++      f = fopen(state->conffile,"r");
++  }
++
+   if (f == NULL) {
+     fprintf (stderr,
+ 	     "ERROR: Couldn't open configuration file: %s -- %s\n", 
diff --git a/scalpel.spec b/scalpel.spec
new file mode 100644
index 0000000..bdb5543
--- /dev/null
+++ b/scalpel.spec
@@ -0,0 +1,78 @@
+Name:           scalpel
+Version:        1.60
+Release:        3%{?dist}
+Summary:        Fast file carver working on disk images
+
+Group:          Applications/System
+License:        GPLv2+
+URL:            http://www.digitalforensicssolutions.com/Scalpel/
+Source0:        http://www.digitalforensicssolutions.com/Scalpel/%{name}-%{version}.tar.gz
+
+#Patch to search for system wide configuration if conf is not in working directory
+#Sent to upstream on 20100824 - golden at digitalforensicssolutions.com
+Patch0:         %{name}-confpath.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+Scalpel is a fast file carver that reads a database of header and footer
+definitions and extracts matching files from a set of image files or raw
+device files. Scalpel is independent on used file-system and will carve
+files from FATx, NTFS, ext2/3, or raw partitions. It is useful for both
+digital forensics investigation and file recovery.
+
+%prep
+%setup -q
+%patch0 -p 1 -b .0conf
+
+#Remove Windows binary files
+rm -f *.exe *.dll
+
+#Modify conf to have some usable configuration out of the box
+#In distribution configuration everything is commented out
+#Sed script will uncomment common file extensions
+sed -i -e "s/^#[ ]*$//;
+           s/\t/        /g;
+           s/^#   [ ]*\([a-z][a-z] \)/        \1/;
+           s/^#   [ ]*\([a-z][a-z][a-z] \)/        \1/;
+           s/^#   [ ]*\([a-z][a-z][a-z][a-z] \)/        \1/;
+           s/^\(.*case[ ]*size\)/#\1/" %{name}.conf
+
+
+%build
+make %{?_smp_mflags} CC_OPTS="$RPM_OPT_FLAGS"
+
+%install
+rm -rf %{buildroot}
+
+install -d %{buildroot}%{_bindir}
+install -m 755 %{name} %{buildroot}%{_bindir}/%{name}
+
+install -d %{buildroot}%{_mandir}/man1
+install -m 644 %{name}.1* %{buildroot}%{_mandir}/man1/
+
+install -d %{buildroot}%{_sysconfdir}
+install -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc README gpl.txt changelog
+%config(noreplace) %{_sysconfdir}/%{name}.conf
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+
+
+%changelog
+* Tue Aug 24 2010 Michal Ambroz <rebus at, seznam.cz> 1.60-3
+- remove redundant attr permission definitions
+- regenerate patch
+
+* Tue Aug 24 2010 Michal Ambroz <rebus at, seznam.cz> 1.60-2
+- fix package review issues
+
+* Fri Apr 09 2010 Michal Ambroz <rebus at, seznam.cz> 1.60-1
+- initial build for Fedora
+
diff --git a/sources b/sources
index e69de29..a72d859 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a0ad1ae3f709bb42d30ba2dee992c3b0  scalpel-1.60.tar.gz


More information about the scm-commits mailing list