Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/foremost/files/, app-forensics/foremost/
Date: Fri, 28 Aug 2020 21:02:44
Message-Id: 1598648543.5f27cd2cfe23e244fc8164a2fec14dcf07c0dda6.asturm@gentoo
1 commit: 5f27cd2cfe23e244fc8164a2fec14dcf07c0dda6
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 20:55:20 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 21:02:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f27cd2c
7
8 app-forensics/foremost: Fix build with GCC-10/-fno-common
9
10 - EAPI-7 bump
11 - Drop unused eutils.eclass
12 - Drop filler word from description
13 - Apply best practice to LICENSE-SLOT-KEYWORDS-IUSE
14 - Break up emake block with some newlines
15 - Fix PATCHES indendation
16 - Add missing || die
17
18 Closes: https://bugs.gentoo.org/722196
19 Package-Manager: Portage-3.0.4, Repoman-3.0.1
20 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
21
22 .../foremost/files/foremost-1.5.7-fno-common.patch | 99 ++++++++++++++++++++++
23 app-forensics/foremost/foremost-1.5.7-r3.ebuild | 26 +++---
24 2 files changed, 115 insertions(+), 10 deletions(-)
25
26 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
27 new file mode 100644
28 index 00000000000..8506f59cf95
29 --- /dev/null
30 +++ b/app-forensics/foremost/files/foremost-1.5.7-fno-common.patch
31 @@ -0,0 +1,99 @@
32 +diff -up foremost-1.5.7/api.c.me foremost-1.5.7/api.c
33 +--- foremost-1.5.7/api.c.me 2020-02-06 14:15:48.218200745 +0100
34 ++++ foremost-1.5.7/api.c 2020-02-06 14:16:42.624853860 +0100
35 +@@ -20,6 +20,7 @@ int currFATblk;
36 + int highblk = 0;
37 + int block_list[OUR_BLK_SIZE / sizeof(int)];
38 + extern int errno;
39 ++struct DIRECTORY *dirlist, *dl;
40 +
41 + /*Inititialize those globals used by extract_ole*/
42 + void init_ole()
43 +diff -up foremost-1.5.7/extract.c.me foremost-1.5.7/extract.c
44 +--- foremost-1.5.7/extract.c.me 2020-02-06 14:10:30.446386101 +0100
45 ++++ foremost-1.5.7/extract.c 2020-02-06 14:15:14.736798823 +0100
46 +@@ -25,6 +25,7 @@ extern char *extract_name;
47 + extern int extract;
48 + extern int FATblk;
49 + extern int highblk;
50 ++extern struct DIRECTORY *dirlist, *dl;
51 +
52 + /********************************************************************************
53 + *Function: extract_zip
54 +diff -up foremost-1.5.7/main.h.me foremost-1.5.7/main.h
55 +--- foremost-1.5.7/main.h.me 2020-02-06 13:48:46.923922983 +0100
56 ++++ foremost-1.5.7/main.h 2020-02-06 13:50:08.001849830 +0100
57 +@@ -292,7 +292,7 @@ char *__progname;
58 + /* -----------------------------------------------------------------
59 + State Variable and Global Variables
60 + ----------------------------------------------------------------- */
61 +-char wildcard;
62 ++extern char wildcard;
63 + typedef struct f_state
64 + {
65 + off_t mode;
66 +@@ -344,7 +344,7 @@ typedef struct s_spec
67 + int written; /*used for -a mode*/
68 + }s_spec;
69 +
70 +-s_spec search_spec[50]; /*ARRAY OF BUILTIN SEARCH TYPES*/
71 ++extern s_spec search_spec[50]; /*ARRAY OF BUILTIN SEARCH TYPES*/
72 +
73 + typedef struct f_info {
74 + char *file_name;
75 +@@ -367,7 +367,7 @@ typedef struct f_info {
76 + } f_info;
77 +
78 + /* Set if the user hits ctrl-c */
79 +-int signal_caught;
80 ++extern int signal_caught;
81 +
82 + /* -----------------------------------------------------------------
83 + Function definitions
84 +@@ -433,7 +433,7 @@ off_t find_file_size(FILE *f);
85 + char *human_readable(off_t size, char *buffer);
86 + char *units(unsigned int c);
87 + unsigned int chop(char *buf);
88 +-void print_search_specs(f_state *s);
89 ++extern void print_search_specs(f_state *s);
90 + int memwildcardcmp(const void *s1, const void *s2,size_t n,int caseSensitive);
91 + int charactersMatch(char a, char b, int caseSensitive);
92 + void printx(unsigned char* buf,int start, int end);
93 +diff -up foremost-1.5.7/ole.h.me foremost-1.5.7/ole.h
94 +--- foremost-1.5.7/ole.h.me 2020-02-06 14:08:16.524783353 +0100
95 ++++ foremost-1.5.7/ole.h 2020-02-06 14:10:02.954056080 +0100
96 +@@ -84,8 +84,8 @@ struct DIRECTORY
97 + int s2;
98 + int d1;
99 + int d2;
100 +-}
101 +-*dirlist, *dl;
102 ++};
103 ++
104 +
105 + int get_dir_block(unsigned char *fd, int blknum, int buffersize);
106 + int get_dir_info(unsigned char *src);
107 +diff -up foremost-1.5.7/state.c.me foremost-1.5.7/state.c
108 +--- foremost-1.5.7/state.c.me 2020-02-06 14:06:44.514684887 +0100
109 ++++ foremost-1.5.7/state.c 2020-02-06 14:08:03.329625827 +0100
110 +@@ -2,6 +2,9 @@
111 +
112 + #include "main.h"
113 +
114 ++s_spec search_spec[50];
115 ++char wildcard;
116 ++
117 + int initialize_state (f_state * s, int argc, char **argv)
118 + {
119 + char **argv_copy = argv;
120 +diff -up foremost-1.5.7/main.c.me foremost-1.5.7/main.c
121 +--- foremost-1.5.7/main.c.me 2020-02-06 14:20:09.918342282 +0100
122 ++++ foremost-1.5.7/main.c 2020-02-06 14:20:42.531733786 +0100
123 +@@ -15,6 +15,7 @@
124 + *
125 + */
126 + #include "main.h"
127 ++int signal_caught;
128 +
129 + #ifdef __WIN32
130 +
131
132 diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
133 index 56cdeee6ed5..c3742c31553 100644
134 --- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild
135 +++ b/app-forensics/foremost/foremost-1.5.7-r3.ebuild
136 @@ -1,32 +1,38 @@
137 # Copyright 1999-2020 Gentoo Authors
138 # Distributed under the terms of the GNU General Public License v2
139
140 -EAPI=6
141 +EAPI=7
142
143 -inherit eutils toolchain-funcs
144 +inherit toolchain-funcs
145
146 -DESCRIPTION="A console program to recover files based on their headers and footers"
147 +DESCRIPTION="Console program to recover files based on their headers and footers"
148 HOMEPAGE="http://foremost.sourceforge.net/"
149 #SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
150 # starting to hate sf.net ...
151 SRC_URI="http://foremost.sourceforge.net/pkg/${P}.tar.gz"
152
153 -KEYWORDS="amd64 ppc x86"
154 -IUSE=""
155 LICENSE="public-domain"
156 SLOT="0"
157 -PATCHES=("${FILESDIR}/${PN}-1.4-config-location.patch"
158 - "${FILESDIR}/${PN}-1.5.7-format-security.patch"
159 - "${FILESDIR}/${PN}-1.5.7-set-but-unused.patch")
160 +KEYWORDS="amd64 ppc x86"
161 +IUSE=""
162 +
163 +PATCHES=(
164 + "${FILESDIR}/${PN}-1.4-config-location.patch"
165 + "${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038
166 + "${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886
167 + "${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196
168 +)
169
170 src_compile() {
171 - emake RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \
172 + emake \
173 + RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" \
174 + RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \
175 CONF=/etc
176 }
177
178 src_install() {
179 dobin foremost
180 - gunzip foremost.8.gz
181 + gunzip foremost.8.gz || die
182 doman foremost.8
183 insinto /etc
184 doins foremost.conf