diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-23 20:51:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-23 20:51:24 +0100 |
commit | fceabcd48faf4c890719a14ac4ed93b6b7993364 (patch) | |
tree | 509e41dc22637aa99b763e5fc14944d8e235c304 /app-forensics | |
parent | 674b648c65d37f018cecade7f66ab3162ed94a8e (diff) |
gentoo auto-resync : 23:07:2022 - 20:51:24
Diffstat (limited to 'app-forensics')
-rw-r--r-- | app-forensics/Manifest.gz | bin | 4874 -> 4875 bytes | |||
-rw-r--r-- | app-forensics/scalpel/Manifest | 6 | ||||
-rw-r--r-- | app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch | 255 | ||||
-rw-r--r-- | app-forensics/scalpel/files/musl-error_h.patch | 83 | ||||
-rw-r--r-- | app-forensics/scalpel/metadata.xml | 29 | ||||
-rw-r--r-- | app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild | 44 |
6 files changed, 405 insertions, 12 deletions
diff --git a/app-forensics/Manifest.gz b/app-forensics/Manifest.gz Binary files differindex 39333e3d364b..600db5913e5c 100644 --- a/app-forensics/Manifest.gz +++ b/app-forensics/Manifest.gz diff --git a/app-forensics/scalpel/Manifest b/app-forensics/scalpel/Manifest index 5badbc5b9fa9..03920c043b7f 100644 --- a/app-forensics/scalpel/Manifest +++ b/app-forensics/scalpel/Manifest @@ -1,3 +1,7 @@ +AUX gcc-11-fix-literal-suffix.patch 10217 BLAKE2B 25e2767b566c506a57a455118f0bfdac75dde80ea64ccc66c5da597c7d0fc270d2e34d5a3e26e1c77cf1a1904b80b1a9cdfbcab1ed1de9804075fe312d669952 SHA512 c189ad720eced09010e64a19e0d87f7531b67ff5aa3d96bb5318b3937740de8e163bf1eb55a2fc76ed41eb432bd05861849dbfcd1d6b9b67c7bec4f564df810e +AUX musl-error_h.patch 1913 BLAKE2B 94f4f1bc8466180c1095ad52728736f760a678b59e6a10a9085b11612dfabf4bafd035ea4debbbb71e54d38a0154c2442744b00a37c811f468cee459f5cba93a SHA512 209a6278b046d75b2efe4a3a28e62263918a34abdbab9e6300a03f6d3b6b1902dc47fa4f8ff2dcd60c008ae49a953d4fb9be75fe00665be5f77f5c84f0c19332 DIST scalpel-2.0.tar.gz 1436379 BLAKE2B 7a645c1d6ea32fbd1b0bcfcbfa0f704b6eb58ebe091b8a7ef89f59756c18ce9937849f9754f6ab8548c805e3503f9eb3cc58a2f835956a1315668db5ce19c41f SHA512 7bf8e36f2fd22eb34e0f454c44a3ec3bc4e61dfd44ecda6ae93f0cc41cc3ad2b9fd9604637329bb96274a606812a578c968dd435d9d4a3ac5533613c849d321a +DIST scalpel-2.1_pre20210326.tar.gz 1445147 BLAKE2B f70e16d6854c6f781c2ec389b4595e25055bedc5c69b4c0713ae263d138f0bd9824641099e224cd1969688f6b0acb07c707072afe43955c8752391132eb9b84e SHA512 76811437f01125dcdb27e185ad4f82ba589461eb47638a32af4291b0b81803180e095ccf89440d6c50e35e641e9c3eed63d6ffb33715b5ebe0a3a73389c25e5f EBUILD scalpel-2.0.ebuild 610 BLAKE2B cf16769dbdbbb7e12a5e2605ff92d9816dbfe992c7d7c451fdf8b5e360b726a5024aee52d8d72192c1336eedbe4e1613ff67d56b76efba532ddb9990379b0f48 SHA512 d077b16affa31d02982f565810cd51cb7fc52300529bb2accf069aae3097df61b8000b5040f9289058647c4855a2d83fe3a0befd3b987326606a0eb2891731cd -MISC metadata.xml 682 BLAKE2B d9d7db4a66f4403da69ca5d8bed8a10a88316571ec283dea00d2f5fd9def7dd3b04d216c6b47594ac5245d8b991df1c97501e58c30d15d61d92c08c92cb5c535 SHA512 774e7e1afda73a13b70ef1a81b856efb49d9a76b2cda52788ecc5acf9db91a9a7143d34081ee272c50c564b969f105a8e6d2233e5d09b3fb17dffa135288e889 +EBUILD scalpel-2.1_pre20210326.ebuild 1085 BLAKE2B e20be72042129649fb3884ec69bcfa3c9b23454f07425629e008675b80d71bbf6509ae0cad60ab28504664c6a9d4ca096032034194fdf6c58dcb8f3d6c2d5028 SHA512 714d2fe1b92bf5d8b1e43e82993d60bffa9a19a7ab5010b9f7738f9f1d24f0c43bc008acd87fc0799732b19e9d1cfbe756b51a5cb3af7a079c26966ecf5c3dba +MISC metadata.xml 895 BLAKE2B dba0bae8f7c087e2c13d0f2f3f3985f965f6d74c9e0232048150a913b86fdb6f7605b261eef799e9dbbffb099216c4565e2ec1898bf0fa93476b93f22bd8e4e1 SHA512 b38df0fc4fd94fcfee6fd0b96b24045bd3e29e47b7be62fead1ad67ee0d38194a46b49aa1fad0e40aa75e8b9e8c01669284aa4a58199c344d1167178ba2912b1 diff --git a/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch b/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch new file mode 100644 index 000000000000..55809d58e178 --- /dev/null +++ b/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch @@ -0,0 +1,255 @@ +fix "invalid suffix on literal; C++11 requires a space between literal and string macro" + +--- a/src/dig.cpp ++++ b/src/dig.cpp +@@ -378,10 +378,10 @@ + + + if(state->skip) { +- fprintf(state->auditFile, "\nSkipped the first %"PRIu64 "bytes of %s...\n", ++ fprintf(state->auditFile, "\nSkipped the first %" PRIu64 "bytes of %s...\n", + state->skip, scalpelInputGetId(state->inReader)); + if(state->modeVerbose) { +- fprintf(stdout, "\nSkipped the first %"PRIu64 "bytes of %s...\n", ++ fprintf(stdout, "\nSkipped the first %" PRIu64 "bytes of %s...\n", + state->skip, scalpelInputGetId(state->inReader)); + } + } +@@ -448,7 +448,7 @@ + // found a header--record location in header offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s header was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s header was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + +@@ -478,7 +478,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "Memory reallocation performed, total header storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total header storage = %" PRIu64 "\n", + currentneedle->offsets.headerstorage); + } + } +@@ -494,7 +494,7 @@ + // found a footer--record location in footer offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s footer was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s footer was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + +@@ -524,7 +524,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total footer storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total footer storage = %" PRIu64 "\n", + currentneedle->offsets.footerstorage); + } + } +@@ -618,7 +618,7 @@ + // found a header--record location in header offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s header was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s header was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + } +@@ -647,7 +647,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total header storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total header storage = %" PRIu64 "\n", + currentneedle->offsets.headerstorage); + + } +@@ -756,7 +756,7 @@ + startLocation = offset + (foundat[needlenum][i] - readbuffer); + if(state->modeVerbose) { + +- fprintf(stdout, "A %s footer was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s footer was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + } +@@ -784,7 +784,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total footer storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total footer storage = %" PRIu64 "\n", + currentneedle->offsets.footerstorage); + } + } +@@ -991,7 +991,7 @@ + state->inReader)) > longestneedle - 1) { + + if(state->modeVerbose) { +- fprintf(stdout, "Read %"PRIu64 " bytes from image file.\n", bytesread); ++ fprintf(stdout, "Read %" PRIu64 " bytes from image file.\n", bytesread); + } + + if((err = scalpelInputGetError(state->inReader))) { +@@ -1106,7 +1106,7 @@ + + + if(state->modeVerbose) { +- fprintf(stdout, "Total file size is %"PRIu64 " bytes\n", filesize); ++ fprintf(stdout, "Total file size is %" PRIu64 " bytes\n", filesize); + } + + +@@ -1537,7 +1537,7 @@ + fprintf(stdout, "%s", currentneedle->endtext); + } + +- fprintf(stdout, "\" --> %"PRIu64 " files\n", currentneedle->numfilestocarve); ++ fprintf(stdout, "\" --> %" PRIu64 " files\n", currentneedle->numfilestocarve); + + + } +@@ -1915,7 +1915,7 @@ + (unsigned long + long)(ceil((double)filesize / (double)state->coverageblocksize)); + +- fprintf(stdout, "# of blocks in coverage blockmap is %"PRIu64 ".\n", ++ fprintf(stdout, "# of blocks in coverage blockmap is %" PRIu64 ".\n", + state->coveragenumblocks); + + +@@ -1970,7 +1970,7 @@ + (unsigned long long)ceil((double)filesize / + (double)state->coverageblocksize); + +- fprintf(stdout, "# of blocks in coverage blockmap is %"PRIu64 ".\n", ++ fprintf(stdout, "# of blocks in coverage blockmap is %" PRIu64 ".\n", + state->coveragenumblocks); + + fprintf(stdout, "Allocating and clearing in-core coverage bitmap.\n"); +@@ -2374,7 +2374,7 @@ + + if(state->modeVerbose && state->useCoverageBlockmap) { + fprintf(stdout, +- "Coverage map decreased current file position by %"PRIu64 " bytes.\n", ++ "Coverage map decreased current file position by %" PRIu64 " bytes.\n", + (unsigned long long)decrease); + } + } +@@ -2399,7 +2399,7 @@ + if(state->useCoverageBlockmap) { + if(state->modeVerbose) { + fprintf(stdout, +- "Issuing coverage map-based READ, wants %"PRIu64 " bytes.\n", ++ "Issuing coverage map-based READ, wants %" PRIu64 " bytes.\n", + neededbytes); + } + +@@ -2425,7 +2425,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "fread using coverage map to skip %"PRIu64 " bytes.\n", bytestoskip); ++ "fread using coverage map to skip %" PRIu64 " bytes.\n", bytestoskip); + } + + scalpelInputSeeko(inReader, (off64_t) bytestoskip, SCALPEL_SEEK_CUR); +@@ -2450,7 +2450,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "fread using coverage map found %"PRIu64 " consecutive bytes.\n", ++ "fread using coverage map found %" PRIu64 " consecutive bytes.\n", + bytestoread); + } + +@@ -2465,7 +2465,7 @@ + curpos += bytestoread; + + if(state->modeVerbose) { +- fprintf(stdout, "fread using coverage map read %"PRIu64 " bytes.\n", ++ fprintf(stdout, "fread using coverage map read %" PRIu64 " bytes.\n", + bytesread); + } + } +@@ -2879,7 +2879,7 @@ + } + + // # of headers +- if(fprintf(dbfile, "%"PRIu64 "\n", currentneedle->offsets.numheaders) ++ if(fprintf(dbfile, "%" PRIu64 "\n", currentneedle->offsets.numheaders) + <= 0) { + + fprintf(stderr, +@@ -2893,7 +2893,7 @@ + for(i = 0; i < currentneedle->offsets.numheaders; i++) { + #ifdef _WIN32 + if(fprintf +- (dbfile, "%"PRIu64 "\n", ++ (dbfile, "%" PRIu64 "\n", + positionUseCoverageBlockmap(state, + currentneedle->offsets. + headers[i])) <= 0) { +@@ -2913,7 +2913,7 @@ + } + + // # of footers +- if(fprintf(dbfile, "%"PRIu64 "\n", currentneedle->offsets.numfooters) ++ if(fprintf(dbfile, "%" PRIu64 "\n", currentneedle->offsets.numfooters) + <= 0) { + fprintf(stderr, + "Error writing to header/footer database file: %s\n", fn); +@@ -2925,7 +2925,7 @@ + // all footer positions for current suffix + for(i = 0; i < currentneedle->offsets.numfooters; i++) { + if(fprintf +- (dbfile, "%"PRIu64 "\n", ++ (dbfile, "%" PRIu64 "\n", + positionUseCoverageBlockmap(state, + currentneedle->offsets. + footers[i])) <= 0) { +--- a/src/helpers.cpp ++++ b/src/helpers.cpp +@@ -528,7 +528,7 @@ + if((scalpelInputSeeko(inReader, state->skip, SCALPEL_SEEK_SET))) { + + fprintf(stderr, +- "ERROR: Couldn't skip %"PRIu64 " bytes at the start of input file %s\n", ++ "ERROR: Couldn't skip %" PRIu64 " bytes at the start of input file %s\n", + state->skip, inputId); + + +@@ -543,7 +543,7 @@ + } + else { + +- fprintf(stderr, "\nSkipped the first %"PRIu64 " bytes of %s...\n", ++ fprintf(stderr, "\nSkipped the first %" PRIu64 " bytes of %s...\n", + state->skip, inputId); + + +--- a/src/scalpel_exec.cpp ++++ b/src/scalpel_exec.cpp +@@ -141,7 +141,7 @@ + } + + fprintf(stdout, +- "\nScalpel is done, files carved = %"PRIu64 ", elapsed = %ld secs.\n", ++ "\nScalpel is done, files carved = %" PRIu64 ", elapsed = %ld secs.\n", + state.fileswritten, (int)time(0) - starttime); + + destroy_threading_model(&state); +@@ -348,7 +348,7 @@ + numopts++; + state->skip = strtoull(optarg, NULL, 10); + fprintf(stdout, +- "Skipping the first %"PRIu64 " bytes of each image file.\n", state->skip); ++ "Skipping the first %" PRIu64 " bytes of each image file.\n", state->skip); + break; + + case 'c': diff --git a/app-forensics/scalpel/files/musl-error_h.patch b/app-forensics/scalpel/files/musl-error_h.patch new file mode 100644 index 000000000000..7f8139cf67a6 --- /dev/null +++ b/app-forensics/scalpel/files/musl-error_h.patch @@ -0,0 +1,83 @@ +https://raw.githubusercontent.com/gentoo/musl/master/dev-libs/elfutils/files/0.178/musl-error_h.patch + +From 9cb8fad40329cc6445233af0b6ac3f2adde19c65 Mon Sep 17 00:00:00 2001 +From: +Date: Thu, 12 Dec 2019 22:00:47 -0600 +Subject: [PATCH 9/9] Add hacked up error header for non GLIBC machines + +--- + lib/error.h | 27 +++++++++++++++++++++++++++ + src/error.h | 27 +++++++++++++++++++++++++++ + 2 files changed, 54 insertions(+) + create mode 100644 lib/error.h + create mode 100644 src/error.h + +diff --git a/lib/error.h b/lib/error.h +new file mode 100644 +index 0000000..ef06827 +--- /dev/null ++++ b/error.h +@@ -0,0 +1,27 @@ ++#ifndef _ERROR_H_ ++#define _ERROR_H_ ++ ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif /* _ERROR_H_ */ +diff --git a/src/error.h b/src/error.h +new file mode 100644 +index 0000000..ef06827 +--- /dev/null ++++ b/src/error.h +@@ -0,0 +1,27 @@ ++#ifndef _ERROR_H_ ++#define _ERROR_H_ ++ ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif /* _ERROR_H_ */ +-- +2.24.1 + diff --git a/app-forensics/scalpel/metadata.xml b/app-forensics/scalpel/metadata.xml index 578929e27035..8eb003b19ca6 100644 --- a/app-forensics/scalpel/metadata.xml +++ b/app-forensics/scalpel/metadata.xml @@ -1,15 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> - <longdescription lang="en"> - Scalpel is a fast file carver that reads a database of header and footer - definitions and extracts matching files or data fragments from a set of image - files or raw device files. Scalpel is filesystem-independent and will carve - files from FATx, NTFS, ext2/3, HFS+, or raw partitions. It is useful for both - digital forensics investigation and file recovery. - </longdescription> - <upstream> - <remote-id type="github">sleuthkit/scalpel</remote-id> - </upstream> + <maintainer type="person" proxied="yes"> + <email>martin.dummer@gmx.net</email> + <name>Martin Dummer</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Scalpel is a fast file carver that reads a database of header and footer + definitions and extracts matching files or data fragments from a set of image + files or raw device files. Scalpel is filesystem-independent and will carve + files from FATx, NTFS, ext2/3, HFS+, or raw partitions. It is useful for both + digital forensics investigation and file recovery. + </longdescription> + <upstream> + <remote-id type="github">sleuthkit/scalpel</remote-id> + </upstream> </pkgmetadata> diff --git a/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild b/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild new file mode 100644 index 000000000000..f2c5f97a0fa8 --- /dev/null +++ b/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild @@ -0,0 +1,44 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit autotools + +DESCRIPTION="A high performance file carver" +HOMEPAGE="https://github.com/sleuthkit/scalpel" +SCALPEL_COMMIT="35e1367ef2232c0f4883c92ec2839273c821dd39" +SRC_URI="https://github.com/sleuthkit/scalpel/archive/${SCALPEL_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/scalpel-${SCALPEL_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-libs/tre" +RDEPEND="${DEPEND}" +BDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/gcc-11-fix-literal-suffix.patch" ) +DOCS=( Changelog README ) + +src_prepare() { + # Set the default config file location + sed -e "s:scalpel.conf:/etc/\0:" -i src/scalpel.h || die "sed failed" + + sed -e 's|AM_CPPFLAGS =.*|AM_CPPFLAGS = -std=c++11|' -i Makefile.am src/Makefile.am || die "sed failed" + + # #716104 compile with musl misses error.h, solution borrowed from #701478 + if use elibc_musl; then + eapply "${FILESDIR}/musl-error_h.patch" + fi + + default + eautoreconf +} + +src_install() { + default + + insinto /etc + doins scalpel.conf +} |