[gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
commit: 231b90fbc3ab287472363374377241a4eacf24cd Author: David Seifert gentoo org> AuthorDate: Wed Jul 13 18:12:06 2022 + Commit: David Seifert gentoo org> CommitDate: Wed Jul 13 18:12:06 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=231b90fb app-forensics/foremost: fix musl build Closes: https://bugs.gentoo.org/830473 Signed-off-by: David Seifert gentoo.org> .../foremost/files/foremost-1.5.7-musl.patch | 81 ++ app-forensics/foremost/foremost-1.5.7-r3.ebuild| 3 +- 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/app-forensics/foremost/files/foremost-1.5.7-musl.patch b/app-forensics/foremost/files/foremost-1.5.7-musl.patch new file mode 100644 index ..0f8994b2328f --- /dev/null +++ b/app-forensics/foremost/files/foremost-1.5.7-musl.patch @@ -0,0 +1,81 @@ +--- a/cli.c b/cli.c +@@ -4,7 +4,7 @@ + + void fatal_error (f_state * s, char *msg) + { +- fprintf(stderr, "%s: %s%s", __progname, msg, NEWLINE); ++ fprintf(stderr, "%s: %s%s", program_invocation_short_name, msg, NEWLINE); + if (get_audit_file_open(s)) + { + audit_msg(s, msg); +@@ -16,7 +16,7 @@ + void print_error(f_state *s, char *fn, char *msg) + { + if (!(get_mode(s, mode_quiet))) +- fprintf(stderr, "%s: %s: %s%s", __progname, fn, msg, NEWLINE); ++ fprintf(stderr, "%s: %s: %s%s", program_invocation_short_name, fn, msg, NEWLINE); + } + + void print_message(f_state *s, char *format, va_list argp) +--- a/helpers.c b/helpers.c +@@ -133,7 +133,7 @@ + if (ioctl(fd, BLKGETSIZE, &num_sectors)) + { + #if defined(__DEBUG) +- fprintf(stderr, "%s: ioctl call to BLKGETSIZE failed.%s", __progname, NEWLINE); ++ fprintf(stderr, "%s: ioctl call to BLKGETSIZE failed.%s", program_invocation_short_name, NEWLINE); + #endif + } + else +--- a/main.c b/main.c +@@ -55,18 +55,18 @@ + + void try_msg(void) + { +- fprintf(stderr, "Try `%s -h` for more information.%s", __progname, NEWLINE); ++ fprintf(stderr, "Try `%s -h` for more information.%s", program_invocation_short_name, NEWLINE); + } + + /* The usage function should, at most, display 22 lines of text to fit +on a single screen */ + void usage(void) + { +- fprintf(stderr, "%s version %s by %s.%s", __progname, VERSION, AUTHOR, NEWLINE); ++ fprintf(stderr, "%s version %s by %s.%s", program_invocation_short_name, VERSION, AUTHOR, NEWLINE); + fprintf(stderr, + "%s %s [-v|-V|-h|-T|-Q|-q|-a|-w-d] [-t ] [-s ] [-k ] \n\t[-b ] [-c ] [-o ] [-i
[gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
commit: 5f27cd2cfe23e244fc8164a2fec14dcf07c0dda6 Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Aug 28 20:55:20 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Aug 28 21:02:23 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f27cd2c app-forensics/foremost: Fix build with GCC-10/-fno-common - EAPI-7 bump - Drop unused eutils.eclass - Drop filler word from description - Apply best practice to LICENSE-SLOT-KEYWORDS-IUSE - Break up emake block with some newlines - Fix PATCHES indendation - Add missing || die Closes: https://bugs.gentoo.org/722196 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner gentoo.org> .../foremost/files/foremost-1.5.7-fno-common.patch | 99 ++ app-forensics/foremost/foremost-1.5.7-r3.ebuild| 26 +++--- 2 files changed, 115 insertions(+), 10 deletions(-) diff --git a/app-forensics/foremost/files/foremost-1.5.7-fno-common.patch b/app-forensics/foremost/files/foremost-1.5.7-fno-common.patch new file mode 100644 index 000..8506f59cf95 --- /dev/null +++ b/app-forensics/foremost/files/foremost-1.5.7-fno-common.patch @@ -0,0 +1,99 @@ +diff -up foremost-1.5.7/api.c.me foremost-1.5.7/api.c +--- foremost-1.5.7/api.c.me2020-02-06 14:15:48.218200745 +0100 foremost-1.5.7/api.c 2020-02-06 14:16:42.624853860 +0100 +@@ -20,6 +20,7 @@ int currFATblk; + int highblk = 0; + int block_list[OUR_BLK_SIZE / sizeof(int)]; + extern interrno; ++struct DIRECTORY *dirlist, *dl; + + /*Inititialize those globals used by extract_ole*/ + void init_ole() +diff -up foremost-1.5.7/extract.c.me foremost-1.5.7/extract.c +--- foremost-1.5.7/extract.c.me2020-02-06 14:10:30.446386101 +0100 foremost-1.5.7/extract.c 2020-02-06 14:15:14.736798823 +0100 +@@ -25,6 +25,7 @@ extern char *extract_name; + extern intextract; + extern intFATblk; + extern inthighblk; ++extern struct DIRECTORY *dirlist, *dl; + + / + *Function: extract_zip +diff -up foremost-1.5.7/main.h.me foremost-1.5.7/main.h +--- foremost-1.5.7/main.h.me 2020-02-06 13:48:46.923922983 +0100 foremost-1.5.7/main.h 2020-02-06 13:50:08.001849830 +0100 +@@ -292,7 +292,7 @@ char *__progname; + /* - +State Variable and Global Variables +- */ +-char wildcard; ++extern char wildcard; + typedef struct f_state + { + off_t mode; +@@ -344,7 +344,7 @@ typedef struct s_spec + int written; /*used for -a mode*/ + }s_spec; + +-s_spec search_spec[50]; /*ARRAY OF BUILTIN SEARCH TYPES*/ ++extern s_spec search_spec[50]; /*ARRAY OF BUILTIN SEARCH TYPES*/ + + typedef struct f_info { + char *file_name; +@@ -367,7 +367,7 @@ typedef struct f_info { + } f_info; + + /* Set if the user hits ctrl-c */ +-int signal_caught; ++extern int signal_caught; + + /* - +Function definitions +@@ -433,7 +433,7 @@ off_t find_file_size(FILE *f); + char *human_readable(off_t size, char *buffer); + char *units(unsigned int c); + unsigned int chop(char *buf); +-void print_search_specs(f_state *s); ++extern void print_search_specs(f_state *s); + int memwildcardcmp(const void *s1, const void *s2,size_t n,int caseSensitive); + int charactersMatch(char a, char b, int caseSensitive); + void printx(unsigned char* buf,int start, int end); +diff -up foremost-1.5.7/ole.h.me foremost-1.5.7/ole.h +--- foremost-1.5.7/ole.h.me2020-02-06 14:08:16.524783353 +0100 foremost-1.5.7/ole.h 2020-02-06 14:10:02.954056080 +0100 +@@ -84,8 +84,8 @@ struct DIRECTORY + int s2; + int d1; + int d2; +-} +-*dirlist, *dl; ++}; ++ + + int get_dir_block(unsigned char *fd, int blknum, int buffersize); + int get_dir_info(unsigned char *src); +diff -up foremost-1.5.7/state.c.me foremost-1.5.7/state.c +--- foremost-1.5.7/state.c.me 2020-02-06 14:06:44.514684887 +0100 foremost-1.5.7/state.c 2020-02-06 14:08:03.329625827 +0100 +@@ -2,6 +2,9 @@ + + #include "main.h" + ++s_spec search_spec[50]; ++char wildcard; ++ + int initialize_state (f_state * s, int argc, char **argv) + { + char**argv_copy = argv; +diff -up foremost-1.5.7/main.c.me foremost-1.5.7/main.c +--- foremost-1.5.7/main.c.me 2020-02-06 14:20:09.918342282 +0100 foremost-1.5.7/main.c 2020-02-06 14:20:42.531733786 +0100 +@@ -15,6 +15,7 @@ + * + */ + #include "main.h" ++int signal_caught; + + #ifdef __WIN32 + diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r3.ebuild index 56cdeee6ed5..c3742c31553 100644 -
[gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
commit: f165f8e07e457725b89c1ab479bf987f3af6c1cf Author: Mike Auty gentoo org> AuthorDate: Sun May 10 11:51:45 2020 + Commit: Mike Auty gentoo org> CommitDate: Sun May 10 11:51:45 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f165f8e0 app-forensics/foremost: Fixes issue 706886 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Mike Auty gentoo.org> .../files/foremost-1.5.7-set-but-unused.patch | 230 + app-forensics/foremost/foremost-1.5.7-r3.ebuild| 11 +- 2 files changed, 234 insertions(+), 7 deletions(-) diff --git a/app-forensics/foremost/files/foremost-1.5.7-set-but-unused.patch b/app-forensics/foremost/files/foremost-1.5.7-set-but-unused.patch new file mode 100644 index 000..59b52c68615 --- /dev/null +++ b/app-forensics/foremost/files/foremost-1.5.7-set-but-unused.patch @@ -0,0 +1,230 @@ +diff --git a/api.c b/api.c +index e3ee339..67463a6 100755 +--- a/api.c b/api.c +@@ -478,7 +478,7 @@ int dump_dirent(int which_one) + { + int i; + char*p; +- short unknown; ++ // shortunknown; + struct OLE_DIR *dir; + + dir = (struct OLE_DIR *) &buffer[which_one * sizeof(struct OLE_DIR)]; +@@ -493,7 +493,7 @@ int dump_dirent(int which_one) + p = dir->name; + if (*p < ' ') + { +- unknown = *((short *)p); ++ //unknown = *((short *)p); + + //fprintf (stderr, "%04x\t", unknown); + p += 2; /* step over unknown short */ +diff --git a/engine.c b/engine.c +index 85add5f..4a1ef13 100755 +--- a/engine.c b/engine.c +@@ -316,7 +316,6 @@ int search_chunk(f_state *s, unsigned char *buf, f_info *i, u_int64_t chunk_size + //u_int64_t buf_off = 0; + + unsigned char *foundat = buf; +- unsigned char *current_pos = NULL; + unsigned char *header_pos = NULL; + unsigned char *newbuf = NULL; + unsigned char *ind_ptr = NULL; +@@ -461,7 +460,6 @@ int search_chunk(f_state *s, unsigned char *buf, f_info *i, u_int64_t chunk_size + } + + c_offset = (foundat - buf); +- current_pos = foundat; + + /*Now lets analyze the file and see if we can determine its size*/ + +@@ -511,12 +509,12 @@ int search_chunk(f_state *s, unsigned char *buf, f_info *i, u_int64_t chunk_size + newbuf = read_from_disk(c_offset + f_offset, i, needle->max_len); + if (newbuf == NULL) + break; +- current_pos = extract_file(s, +- c_offset, +- newbuf, +- needle->max_len, +- needle, +- f_offset); ++ extract_file(s, ++ c_offset, ++ newbuf, ++ needle->max_len, ++ needle, ++ f_offset); + + /*Lets put the fp back*/ + fseeko(i->handle, saveme, SEEK_SET); +diff --git a/extract.c b/extract.c +index 9639117..4fecde5 100755 +--- a/extract.c b/extract.c +@@ -553,7 +553,6 @@ unsigned char *extract_htm(f_state *s, u_int64_t c_offset, unsigned char *founda + { + unsigned char *buf = foundat; + unsigned char *extractbuf = NULL; +- unsigned char *currentpos = NULL; + + int bytes_to_search = 0; + int i = 0; +@@ -582,7 +581,6 @@ unsigned char *extract_htm(f_state *s, u_int64_t c_offset, unsigned char *founda + } + + /*Store the current position and search for the HTML> tag*/ +- currentpos = foundat; + foundat = bm_search(needle->footer, + needle->footer_len, + foundat, +@@ -1146,15 +1144,15 @@ unsigned char *extract_mov