public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
@ 2020-05-10 11:51 Mike Auty
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Auty @ 2020-05-10 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     f165f8e07e457725b89c1ab479bf987f3af6c1cf
Author:     Mike Auty <ikelos <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 11:51:45 2020 +0000
Commit:     Mike Auty <ikelos <AT> gentoo <DOT> org>
CommitDate: Sun May 10 11:51:45 2020 +0000
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 <ikelos <AT> 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 00000000000..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;
++	// short			unknown;
+ 	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(f_state *s, u_int64_t c_offset, unsigned char *founda
+ unsigned char *extract_wmv(f_state *s, u_int64_t c_offset, unsigned char *foundat, u_int64_t buflen,
+ 						   s_spec *needle, u_int64_t f_offset)
+ {
+-
+-	unsigned char	*currentpos = NULL;
++#ifdef DEBUG
++	u_int64_t			fileObjHeaderSize = 0;
++#endif
+ 	unsigned char	*header = foundat;
+ 	unsigned char	*extractbuf = NULL;
+ 	unsigned char	*buf = foundat;
+ 	unsigned int		size = 0;
+ 	u_int64_t		file_size = 0;
+ 	u_int64_t			headerSize = 0;
+-	u_int64_t			fileObjHeaderSize = 0;
+ 	int				numberofHeaderObjects = 0;
+ 	int				reserved[2];
+ 	int				bytes_to_search = 0;
+@@ -1184,7 +1182,6 @@ unsigned char *extract_wmv(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 		return foundat;
+ 		}
+ 
+-	currentpos = foundat;
+ 	if (buflen - (foundat - buf) >= needle->max_len)
+ 		bytes_to_search = needle->max_len;
+ 	else
+@@ -1201,7 +1198,9 @@ unsigned char *extract_wmv(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 	if (foundat)
+ 		{
+ 		foundat += 16;	/*jump to the headersize*/
++#ifdef DEBUG
+ 		fileObjHeaderSize = htoll(foundat, FOREMOST_LITTLE_ENDIAN);
++#endif
+ 		//printx(foundat,0,8);
+ 		foundat += 24;	//Jump to the file size obj
+ 		size = htoi(foundat, FOREMOST_LITTLE_ENDIAN);
+@@ -1401,7 +1400,6 @@ unsigned char *extract_gif(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 						   s_spec *needle, u_int64_t f_offset)
+ {
+ 	unsigned char	*buf = foundat;
+-	unsigned char	*currentpos = foundat;
+ 	unsigned char	*extractbuf = NULL;
+ 	int				bytes_to_search = 0;
+ 	unsigned short	width = 0;
+@@ -1420,7 +1418,6 @@ unsigned char *extract_gif(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 		sprintf(comment, " (%d x %d)", width, height);
+ 		strcat(needle->comment, comment);
+ 
+-		currentpos = foundat;
+ 		if (buflen - (foundat - buf) >= needle->max_len)
+ 			bytes_to_search = needle->max_len;
+ 		else
+@@ -1821,7 +1818,6 @@ unsigned char *extract_jpeg(f_state *s, u_int64_t c_offset, unsigned char *found
+ 							s_spec *needle, u_int64_t f_offset)
+ {
+ 	unsigned char	*buf = foundat;
+-	unsigned char	*currentpos = NULL;
+ 
+ 	unsigned char	*extractbuf = NULL;
+ 	unsigned short	headersize;
+@@ -1899,8 +1895,6 @@ unsigned char *extract_jpeg(f_state *s, u_int64_t c_offset, unsigned char *found
+ 		return buf + needle->header_len;
+ 	}
+ 
+-	currentpos = foundat;
+-
+ 	//sprintf("Searching for footer\n");
+ 	if (buflen < (foundat - buf)) {
+ #ifdef DEBUG
+@@ -2094,19 +2088,21 @@ unsigned char *extract_exe(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 	unsigned char	*extractbuf = NULL;
+ 	u_int64_t		file_size = 0;
+ 	unsigned short	pe_offset = 0;
+-	unsigned int	SizeOfCode = 0;
+-	unsigned int	SizeOfInitializedData = 0;
+-	unsigned int	SizeOfUninitializedData = 0;
+-	unsigned int	rva = 0;
+ 	unsigned int	offset = 0;
+ 	unsigned short	sections = 0;
+-	unsigned int	sizeofimage = 0;
+ 	unsigned int	raw_section_size = 0;
+-	unsigned int	size_of_headers = 0;
+ 	unsigned short	dll = 0;
+ 	unsigned int	sum = 0;
+ 	unsigned short	exe_char = 0;
++#ifdef DEBUG
++	unsigned int	SizeOfInitializedData = 0;
++	unsigned int	SizeOfUninitializedData = 0;
++	unsigned int	SizeOfCode = 0;
++	unsigned int	rva = 0;
++	unsigned int	sizeofimage = 0;
++	unsigned int	size_of_headers = 0;
+ 	unsigned int	align = 0;
++#endif
+ 	int				i = 0;
+ 	time_t			compile_time = 0;
+ 	struct tm		*ret_time;
+@@ -2167,14 +2163,16 @@ unsigned char *extract_exe(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 
+ 	foundat += 0x18;	/*Jump to opt header should be 0x0b 0x01*/
+ 
++#ifdef DEBUG
+ 	SizeOfCode = htoi(&foundat[4], FOREMOST_LITTLE_ENDIAN);
+ 	SizeOfInitializedData = htoi(&foundat[8], FOREMOST_LITTLE_ENDIAN);
+ 	SizeOfUninitializedData = htoi(&foundat[12], FOREMOST_LITTLE_ENDIAN);
+ 	rva = htoi(&foundat[16], FOREMOST_LITTLE_ENDIAN);
+ 	align = htoi(&foundat[36], FOREMOST_LITTLE_ENDIAN);
+-
+ 	sizeofimage = htoi(&foundat[56], FOREMOST_LITTLE_ENDIAN);
+ 	size_of_headers = htoi(&foundat[60], FOREMOST_LITTLE_ENDIAN);
++#endif
++
+ 	foundat += 224;
+ 
+ 	/*Start of sections*/
+@@ -2193,13 +2191,13 @@ unsigned char *extract_exe(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 		sum = offset + raw_section_size;
+ 		}
+ 
+-	/*
++#ifdef DEBUG
+     printf("rva is %d sum= %d\n",rva,sum);
+     printf("soi is %d,soh is %d \n",sizeofimage,size_of_headers);
+     printf("we are off by %d\n",sum-buflen);
+     printf("soc=%d ,soidr=%d, souid=%d\n",SizeOfCode,SizeOfInitializedData,SizeOfUninitializedData);
+     printf("fs=%d ,extr=%d\n",SizeOfCode+SizeOfInitializedData,SizeOfUninitializedData);
+-		*/
++#endif
+ 	file_size = sum;
+ 	if (file_size < 512 || file_size > 4 * MEGABYTE)
+ 		{
+@@ -2267,7 +2265,6 @@ unsigned char *extract_rar(f_state *s, u_int64_t c_offset, unsigned char *founda
+ {
+ 	unsigned char	*buf = foundat;
+ 	unsigned char	*extractbuf = NULL;
+-	u_int64_t		file_size = 0;
+ 	unsigned short	headersize = 0;
+ 	unsigned short	flags = 0;
+ 	unsigned int	filesize = 0;
+@@ -2424,8 +2421,6 @@ unsigned char *extract_rar(f_state *s, u_int64_t c_offset, unsigned char *founda
+ 
+ 		/*We found the EOF, write the file to disk and return*/
+ 		tot_file_size = (foundat - buf);
+-		if (tot_file_size > buflen)
+-			file_size = buflen;
+ 
+ 		extractbuf = buf;
+ 		write_to_disk(s, needle, tot_file_size, extractbuf, c_offset + f_offset);

diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
index 531cf1318f8..56cdeee6ed5 100644
--- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild
+++ b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -15,12 +15,9 @@ KEYWORDS="amd64 ppc x86"
 IUSE=""
 LICENSE="public-domain"
 SLOT="0"
-
-src_prepare() {
-	epatch "${FILESDIR}/${PN}-1.4-config-location.patch"
-	epatch "${FILESDIR}/${PN}-1.5.7-format-security.patch"
-	default_src_prepare
-}
+PATCHES=("${FILESDIR}/${PN}-1.4-config-location.patch"
+		"${FILESDIR}/${PN}-1.5.7-format-security.patch"
+		"${FILESDIR}/${PN}-1.5.7-set-but-unused.patch")
 
 src_compile() {
 	emake RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
@ 2020-08-28 21:02 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-08-28 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5f27cd2cfe23e244fc8164a2fec14dcf07c0dda6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 20:55:20 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 21:02:23 2020 +0000
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 <asturm <AT> 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 00000000000..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.me	2020-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 int		errno;
++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.me	2020-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 int	extract;
+ extern int	FATblk;
+ extern int	highblk;
++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.me	2020-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
--- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild
+++ b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
@@ -1,32 +1,38 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
-DESCRIPTION="A console program to recover files based on their headers and footers"
+DESCRIPTION="Console program to recover files based on their headers and footers"
 HOMEPAGE="http://foremost.sourceforge.net/"
 #SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 # starting to hate sf.net ...
 SRC_URI="http://foremost.sourceforge.net/pkg/${P}.tar.gz"
 
-KEYWORDS="amd64 ppc x86"
-IUSE=""
 LICENSE="public-domain"
 SLOT="0"
-PATCHES=("${FILESDIR}/${PN}-1.4-config-location.patch"
-		"${FILESDIR}/${PN}-1.5.7-format-security.patch"
-		"${FILESDIR}/${PN}-1.5.7-set-but-unused.patch")
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.4-config-location.patch"
+	"${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038
+	"${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886
+	"${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196
+)
 
 src_compile() {
-	emake RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \
+	emake \
+		RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" \
+		RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \
 		CONF=/etc
 }
 
 src_install() {
 	dobin foremost
-	gunzip foremost.8.gz
+	gunzip foremost.8.gz || die
 	doman foremost.8
 	insinto /etc
 	doins foremost.conf


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
@ 2022-07-13 18:12 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2022-07-13 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     231b90fbc3ab287472363374377241a4eacf24cd
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 18:12:06 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 18:12:06 2022 +0000
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 <soap <AT> 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 000000000000..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 <type>] [-s <blocks>] [-k <size>] \n\t[-b <size>] [-c <file>] [-o <dir>] [-i <file] %s%s",
+ 		CMD_PROMPT,
+-			__progname,
++			program_invocation_short_name,
+ 			NEWLINE,
+ 			NEWLINE);
+ 	fprintf(stderr, "-V  - display copyright information and exit%s", NEWLINE);
+@@ -233,10 +233,6 @@
+ 	char	**temp = argv;
+ 	DIR* 	dir;
+ 
+-#ifndef __GLIBC__
+-	__progname = basename(argv[0]);
+-#endif
+-
+ 	/*Initialize the global state struct*/
+ 	if (initialize_state(s, argc, argv))
+ 		fatal_error(s, "Unable to initialize state");
+--- a/main.h
++++ b/main.h
+@@ -187,12 +187,6 @@
+ #endif   /* ifdef _WIN32 */
+ 
+ 
+-/* On non-glibc systems we have to manually set the __progname variable */
+-#ifdef __GLIBC__
+-extern char *__progname;
+-#else
+-char *__progname;
+-#endif /* ifdef __GLIBC__ */
+ 
+ /* -----------------------------------------------------------------
+    Program Defaults

diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
index c3742c315533..7e998708b14f 100644
--- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild
+++ b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -21,6 +21,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038
 	"${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886
 	"${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196
+	"${FILESDIR}/${PN}-1.5.7-musl.patch" # bug 830473
 )
 
 src_compile() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-13 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 21:02 [gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-07-13 18:12 David Seifert
2020-05-10 11:51 Mike Auty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox