aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/Makefile.am2
-rwxr-xr-xcontrib/scripts/gnunet-bugreport314
-rwxr-xr-xcontrib/scripts/gnunet-chk.py.in2
-rw-r--r--contrib/scripts/gnunet-logread/Makefile.am2
-rwxr-xr-xcontrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in2
-rwxr-xr-xcontrib/scripts/gnunet-logread/gnunet-logread.in2
-rw-r--r--contrib/scripts/gnunet_janitor.py.in2
-rw-r--r--contrib/scripts/gnunet_pyexpect.py.in2
-rw-r--r--contrib/scripts/pydiffer.py.in2
-rwxr-xr-xcontrib/scripts/removetrailingwhitespace.py.in2
-rw-r--r--contrib/scripts/terminate.py.in2
11 files changed, 150 insertions, 184 deletions
diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am
index 91b2bcd5a..367e5c4c9 100644
--- a/contrib/scripts/Makefile.am
+++ b/contrib/scripts/Makefile.am
@@ -29,7 +29,7 @@ EXTRA_DIST = \
29CLEANFILES = \ 29CLEANFILES = \
30 $(noinst_SCRIPTS) 30 $(noinst_SCRIPTS)
31 31
32do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' 32do_subst = $(AWK) -v py="$(PYTHON)" '{gsub("@PYTHONEXE@",py); print $$0}'
33 33
34# Use SUFFIX Extension rules, they are more portable for every 34# Use SUFFIX Extension rules, they are more portable for every
35# implementation of 'make'. 35# implementation of 'make'.
diff --git a/contrib/scripts/gnunet-bugreport b/contrib/scripts/gnunet-bugreport
index 724c38e06..21808273a 100755
--- a/contrib/scripts/gnunet-bugreport
+++ b/contrib/scripts/gnunet-bugreport
@@ -1,4 +1,13 @@
1#!/bin/sh 1#!/usr/bin/env sh
2#
3# Caveats:
4# - checks with textprocessing assuming that system language is English.
5# - maybe check last return status instead?
6# - Do we need to set awk to which awk becomes available or is awk
7# always available as just awk?
8#
9# Dedicated to the Public Domain.
10# SPDX-License-Identifier: 0BSD
2 11
3progname=${0##*/} 12progname=${0##*/}
4 13
@@ -27,13 +36,15 @@ linemsg()
27 statusmsg "=========================================" 36 statusmsg "========================================="
28} 37}
29 38
30# It is okay to assume which(1) here because we provide 39errmsg=''
31# more than 1 fallback. 40
32TEST=`type type|grep not` 41# Check if shell supports builtin 'type'.
33if test -n "$TEST"; then 42if test -z "$errmsg"; then
34 WHICH=which 43 if ! (eval 'type type') >/dev/null 2>&1
35else 44 then
36 WHICH=type 45 errmsg='Shell does not support type builtin'
46 exit 1
47 fi
37fi 48fi
38 49
39os_check() 50os_check()
@@ -50,17 +61,17 @@ os_check()
50# awk isn't there it can't be found. 61# awk isn't there it can't be found.
51awk_check() 62awk_check()
52{ 63{
53 if test -n "`awk 2>&1 | tail -1 | awk '{print $1}'`"; then 64 if test -z "`type awk | awk '/not found/'`"; then
54 infomsg "awk : Found" 65 infomsg "awk : Found"
55 else 66 else
56 warningmsg "awk : Not found!" 67 warningmsg "awk : Not found!"
68 exit 1
57 fi 69 fi
58} 70}
59 71
60gcc_check() 72gcc_check()
61{ 73{
62 TEST=`$WHICH gcc | grep -v "not found" 2>/dev/null` 74 if test -z "`type gcc | awk '/not found/' 2>/dev/null`"; then
63 if test -n "$TEST"; then
64 VERS=`gcc --version 2>/dev/null | head -n 1` 75 VERS=`gcc --version 2>/dev/null | head -n 1`
65 infomsg "gcc : $VERS" 76 infomsg "gcc : $VERS"
66 elif test -n "`gcc 2>&1 | tail -1 | awk '{print $1}'`"; then 77 elif test -n "`gcc 2>&1 | tail -1 | awk '{print $1}'`"; then
@@ -73,8 +84,7 @@ gcc_check()
73 84
74cc_check() 85cc_check()
75{ 86{
76 TEST=`$WHICH cc | grep -v "not found" 2>/dev/null` 87 if test -z "`type cc | awk '/not found/' 2>/dev/null`"; then
77 if test -n "$TEST"; then
78 VERS=`cc --version 2>/dev/null | head -n 1` 88 VERS=`cc --version 2>/dev/null | head -n 1`
79 infomsg "cc : $VERS" 89 infomsg "cc : $VERS"
80 else 90 else
@@ -84,8 +94,7 @@ cc_check()
84 94
85cplusplus_check() 95cplusplus_check()
86{ 96{
87 TEST=`$WHICH c++ | grep -v "not found" 2>/dev/null` 97 if test -z "`type c++ | awk '/not found/' 2>/dev/null`"; then
88 if test -n "$TEST"; then
89 VERS=`c++ --version 2>/dev/null | head -n 1` 98 VERS=`c++ --version 2>/dev/null | head -n 1`
90 infomsg "c++ : $VERS" 99 infomsg "c++ : $VERS"
91 else 100 else
@@ -95,8 +104,8 @@ cplusplus_check()
95 104
96clang_check() 105clang_check()
97{ 106{
98 TEST=`$WHICH clang | grep -v "not found" 2>/dev/null` 107 TEST=`type clang | awk '/not found/' 2>/dev/null`
99 if test -n "$TEST"; then 108 if test -z "$TEST"; then
100 VERS=`clang --version 2>/dev/null | head -n 1` 109 VERS=`clang --version 2>/dev/null | head -n 1`
101 infomsg "clang : $VERS" 110 infomsg "clang : $VERS"
102 elif test -n "`clang 2>&1 | tail -1 | awk '{print $1}'`"; then 111 elif test -n "`clang 2>&1 | tail -1 | awk '{print $1}'`"; then
@@ -109,7 +118,7 @@ clang_check()
109 118
110clangplusplus_check() 119clangplusplus_check()
111{ 120{
112 TEST=`$WHICH clang++ | grep -v "not found" 2>/dev/null` 121 TEST=`type clang++ | awk '/not found/' 2>/dev/null`
113 if test -n "$TEST"; then 122 if test -n "$TEST"; then
114 VERS=`clang++ --version 2>/dev/null | head -n 1` 123 VERS=`clang++ --version 2>/dev/null | head -n 1`
115 infomsg "clang++ : $VERS" 124 infomsg "clang++ : $VERS"
@@ -123,35 +132,41 @@ clangplusplus_check()
123 132
124gmake_check() 133gmake_check()
125{ 134{
126 TEST=`$WHICH gmake | grep -v "not found" 2>/dev/null` 135 TEST=`type gmake | awk '/not found/' 2>/dev/null`
127 if test -n "$TEST" ; then 136 if test -z "$TEST" ; then
128 VER=$(gmake --version 2>/dev/null | awk '/GNU Make/ {print $3}') 137 VER=$(gmake --version 2>/dev/null | awk '/GNU Make/ {print $3}')
129 infomsg "gmake : $VER" 138 infomsg "gmake : $VER"
130 else 139 else
131 TEST=`make --version 2>/dev/null` 140 TEST=`make --version 2>/dev/null`
132 if test -n "$TEST"; then 141 if test -n "$TEST"; then
133 VER=$(make --version 2>/dev/null | awk '/GNU Make/ {print $3}') 142 VER=$(make --version 2>/dev/null | awk '/GNU Make/ {print $3}')
134 infomsg "gmake : $VER" 143 infomsg "gmake : $VER"
135 else 144 else
136 warningmsg "gmake : Not Found" 145 warningmsg "gmake : Not Found"
137 fi 146 fi
138 fi 147 fi
139} 148}
140 149
141# Applies for NetBSD make and possibly every make. 150# Applies at least for NetBSD make. This test is a little awkward,
151# we should probably grep the output of 'make -dA'. nbmake identifies,
152# NetBSD make from NetBSD (nbmake is portable, external) does not identify.
142make_check() 153make_check()
143{ 154{
144 if test -n "`make 2>/dev/null`"; then 155 TEST=`type make | awk '/not found/' 2>/dev/null`
145 infomsg "make : Found" 156 if test -z "$TEST"; then
146 else 157 VER=$(make --version 2>/dev/null | awk '// {print $0}')
147 warningmsg "make : Not Found" 158 if test -z "$VER"; then
159 infomsg "make : Found"
160 else
161 warningmsg "make : Not Found (unexpected result)"
162 fi
148 fi 163 fi
149} 164}
150 165
151autoconf_check() 166autoconf_check()
152{ 167{
153 TEST=`$WHICH autoconf | grep -v "not found" 2>/dev/null` 168 TEST=`type autoconf | awk '/not found/' 2>/dev/null`
154 if test -n "$TEST"; then 169 if test -z "$TEST"; then
155 autoconf --version |\ 170 autoconf --version |\
156 head -n 1 |\ 171 head -n 1 |\
157 awk '{\ 172 awk '{\
@@ -167,8 +182,8 @@ autoconf_check()
167 182
168automake_check() 183automake_check()
169{ 184{
170 TEST=`$WHICH automake | grep -v "not found" 2>/dev/null` 185 TEST=`type automake | awk '/not found/' 2>/dev/null`
171 if test -n "$TEST"; then 186 if test -z "$TEST"; then
172 VER=`automake --version 2>/dev/null | head -n 1 | awk '{print $4}'` 187 VER=`automake --version 2>/dev/null | head -n 1 | awk '{print $4}'`
173 infomsg "automake : $VER" 188 infomsg "automake : $VER"
174 else 189 else
@@ -179,8 +194,8 @@ automake_check()
179# TODO: More libtool variants. 194# TODO: More libtool variants.
180libtool_check() 195libtool_check()
181{ 196{
182 TEST=`$WHICH libtoolize | grep -v "not found" 2>/dev/null` 197 TEST=`type libtoolize | awk '/not found/' 2>/dev/null`
183 if test -n "$TEST"; then 198 if test -z "$TEST"; then
184 VER=`libtoolize --version 2>/dev/null | head -n 1 | awk '{print $4}'` 199 VER=`libtoolize --version 2>/dev/null | head -n 1 | awk '{print $4}'`
185 infomsg "libtool : $VER" 200 infomsg "libtool : $VER"
186 else 201 else
@@ -190,72 +205,48 @@ libtool_check()
190 205
191libextractor_check() 206libextractor_check()
192{ 207{
193 TEST=`$WHICH extract | grep -v "not found" 2>/dev/null` 208 TEST=`type extract | awk '/not found/' 2>/dev/null`
194 if test -n "$TEST"; then 209 if test -z "$TEST"; then
195 VER=`extract -v 2>/dev/null | head -n 1 | awk '{print $2}'` 210 TEST=`strings $(type extract | awk '{print $NF}') | awk '/EXTRACTOR_extract/' 2>/dev/null`
196 infomsg "libextractor : $VER" 211 if test -n "$TEST"; then
197 else 212 VER=`extract -v 2>/dev/null | awk '{gsub("v",""); print $NF}'`
198 warningmsg "libextractor : Not Found" 213 infomsg "libextractor : $VER"
199 fi
200}
201
202gnunet08_check()
203{
204 if test -x gnunetd; then
205 VER=`gnunetd -v | sed -e "s/v//" 2>/dev/null`
206 warningmsg "GNUnet 0.8 : $VER (may conflict!)"
207 else
208 infomsg "GNUnet 0.8 : Not Found (good)"
209 fi
210}
211
212gnunet09x_check()
213{
214 TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null`
215 if test -n "$TEST"; then
216 VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'`
217 VER9=`echo $VER | grep ^0\.9\.`
218 if test -n "$VER9"; then
219 warningmsg "GNUnet 0.9 : $VER"
220 else 214 else
221 infomsg "GNUnet 0.9 : Not Found (good)" 215 warningmsg "libextractor : Not Found"
222 fi 216 fi
223 else
224 infomsg "GNUnet 0.9 : Not Found (good)"
225 fi 217 fi
226} 218}
227 219
228gnunet010x_check() 220gnunet_version_check()
229{ 221{
230 TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null` 222 # historical, should not be matched
231 if test -n "$TEST"; then 223 T08=`type gnunetd | awk '/not found/' 2>/dev/null`
232 VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'` 224 if test -z "$T08"; then
233 VER10=`echo $VER | grep ^0\.10\.` 225 VER08=`gnunetd -v | awk '{if(/0.8/) { gsub("v",""); print $2}}'`
234 if test -n "$VER10"; then 226 infomsg "GNUnet 0.8 : Not Found (good)"
235 warningmsg "GNUnet 0.10 : $VER" 227 # else
236 else 228 # warningmsg "GNUnet 0.8 : $VER08 (may conflict!)"
237 infomsg "GNUnet 0.10 : Not Found (good)"
238 fi
239 else
240 infomsg "GNUnet 0.10 : Not Found (good)"
241 fi 229 fi
242} 230 TEST=`type gnunet-arm | awk '/not found/' 2>/dev/null`
243 231 if test -z "$TEST"; then
244gnunet011x_check() 232 gnunet-arm --version |\
245{ 233 awk '{\
246 TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null` 234 if (/not found/) {\
247 if test -n "$TEST"; then 235 print " INFO: GNUnet : Not found"\
248 VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'` 236 } else if (/[0-9]/) {\
249 infomsg "GNUnet 0.11 : $VER" 237 gsub("v",""); print " INFO: GNUnet : "$2\
238 } else {\
239 print " INFO: GNUnet : Test failed"\
240 }}'
250 else 241 else
251 warningmsg "GNUnet 0.11.x : Not Found" 242 warningmsg "GNUnet : Not Found"
252 fi 243 fi
253} 244}
254 245
255gitcommit_check() 246gitcommit_check()
256{ 247{
257 TEST=$(git | grep -v "not found" 2> /dev/null) 248 TEST=$(type git | awk '/not found/' 2> /dev/null)
258 if test -n "$TEST"; then 249 if test -z "$TEST"; then
259 VER=$(git rev-parse HEAD) 250 VER=$(git rev-parse HEAD)
260 infomsg "git commit : $VER" 251 infomsg "git commit : $VER"
261 else 252 else
@@ -265,8 +256,8 @@ gitcommit_check()
265 256
266gcrypt_check() 257gcrypt_check()
267{ 258{
268 TEST=`$WHICH libgcrypt-config | grep -v "not found" 2> /dev/null` 259 TEST=`type libgcrypt-config | awk '/not found/' 2> /dev/null`
269 if test -n "$TEST"; then 260 if test -z "$TEST"; then
270 VER=`libgcrypt-config --version 2> /dev/null` 261 VER=`libgcrypt-config --version 2> /dev/null`
271 infomsg "libgcrypt : $VER" 262 infomsg "libgcrypt : $VER"
272 else 263 else
@@ -276,8 +267,8 @@ gcrypt_check()
276 267
277mysql_check() 268mysql_check()
278{ 269{
279 TEST=`$WHICH mysql_config | grep -v "not found" 2> /dev/null` 270 TEST=`type mysql_config | awk '/not found/' 2> /dev/null`
280 if test -n "$TEST"; then 271 if test -z "$TEST"; then
281 VER=`mysql_config --version 2> /dev/null` 272 VER=`mysql_config --version 2> /dev/null`
282 infomsg "mysql : $VER" 273 infomsg "mysql : $VER"
283 else 274 else
@@ -287,18 +278,14 @@ mysql_check()
287 278
288pkgconf_check() 279pkgconf_check()
289{ 280{
290 TEST=`$WHICH pkgconf | grep -v "not found" 2> /dev/null` 281 TEST=`type pkgconf | awk '/not found/' 2> /dev/null`
291 if test -n "$TEST"; then 282 if test -z "$TEST"; then
292 pkgconf --version 2> /dev/null | awk '{print " INFO: pkgconf : "$1}' 283 pkgconf --version 2> /dev/null | awk '{print " INFO: pkgconf : "$1}'
293 else 284 else
294 infomsg "pkgconf : Not Found" 285 infomsg "pkgconf : Not Found"
295 fi 286 fi
296} 287 TEST=`type pkg-config | awk '/not found/' 2> /dev/null`
297 288 if test -z "$TEST"; then
298pkgconfig_check()
299{
300 TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
301 if test -n "$TEST"; then
302 VER=`pkg-config --version 2> /dev/null | awk '{print $1}'` 289 VER=`pkg-config --version 2> /dev/null | awk '{print $1}'`
303 infomsg "pkg-config : $VER" 290 infomsg "pkg-config : $VER"
304 else 291 else
@@ -308,8 +295,8 @@ pkgconfig_check()
308 295
309glib2_check() 296glib2_check()
310{ 297{
311 TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` 298 TEST=`type pkg-config | awk '/not found/' 2> /dev/null`
312 if test -n "$TEST"; then 299 if test -z "$TEST"; then
313 VER=`pkg-config --modversion glib-2.0 2> /dev/null | awk '{print $1}'` 300 VER=`pkg-config --modversion glib-2.0 2> /dev/null | awk '{print $1}'`
314 infomsg "glib2 : $VER" 301 infomsg "glib2 : $VER"
315 else 302 else
@@ -317,55 +304,47 @@ glib2_check()
317 fi 304 fi
318} 305}
319 306
320gtk2_check() 307gtk_check()
321{ 308{
322 TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null` 309 TEST=`type pkg-config | awk '/not found/' 2> /dev/null`
323 if test -n "$TEST"; then 310 if test -z "$TEST"; then
324 VER=`pkg-config --modversion gtk+-2.0 2> /dev/null | awk '{print $1}'` 311 VER=`pkg-config --modversion gtk+-2.0 2> /dev/null | awk '{print $1}'`
325 if test -n "$VER"; then 312 if test -n "$VER"; then
326 infomsg "gtk2+ : $VER" 313 infomsg "GTK2 : $VER"
327 else 314 else
328 infomsg "gtk2+ : Not found" 315 infomsg "GTK2 : Not found"
329 fi 316 fi
330 else 317 else
331 infomsg "gtk2+ : Not Found" 318 infomsg "GTK2 : Not Found"
332 fi 319 fi
333}
334 320
335gtk3_check() 321 if test -z "$TEST"; then
336{
337 TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
338 if test -n "$TEST"; then
339 VER=`pkg-config --modversion gtk+-3.0 2> /dev/null | awk '{print $1}'` 322 VER=`pkg-config --modversion gtk+-3.0 2> /dev/null | awk '{print $1}'`
340 if test -n "$VER"; then 323 if test -n "$VER"; then
341 infomsg "gtk3+ : $VER" 324 infomsg "GTK3 : $VER"
342 else 325 else
343 infomsg "gtk3+ : Not found" 326 infomsg "GTK3 : Not found"
344 fi 327 fi
345 else 328 else
346 infomsg "gtk3+ : Not Found" 329 infomsg "GTK3 : Not Found"
347 fi 330 fi
348}
349 331
350gtk4_check() 332 if test -z "$TEST"; then
351{
352 TEST=`$WHICH pkg-config | grep -v "not found" 2> /dev/null`
353 if test -n "$TEST"; then
354 VER=`pkg-config --modversion gtk+-4.0 2> /dev/null | awk '{print $1}'` 333 VER=`pkg-config --modversion gtk+-4.0 2> /dev/null | awk '{print $1}'`
355 if test -n "$VER"; then 334 if test -z "$VER"; then
356 infomsg "gtk4+ : $VER" 335 infomsg "GTK4 : $VER"
357 else 336 else
358 infomsg "gtk4+ : Not found" 337 infomsg "GTK4 : Not found"
359 fi 338 fi
360 else 339 else
361 infomsg "gtk4+ : Not Found" 340 infomsg "GTK4 : Not Found"
362 fi 341 fi
363} 342}
364 343
365gmp_check() 344gmp_check()
366{ 345{
367 TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null` 346 TEST=`type dpkg | awk '/not found/' 2> /dev/null`
368 if test -n "$TEST"; then 347 if test -z "$TEST"; then
369 LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null` 348 LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null`
370 if test "$LINES" = "1" 349 if test "$LINES" = "1"
371 then 350 then
@@ -375,15 +354,15 @@ gmp_check()
375 errormsg "GMP : dpkg: libgmp-dev not installed" 354 errormsg "GMP : dpkg: libgmp-dev not installed"
376 fi 355 fi
377 else 356 else
378 TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null` 357 TEST=`type rpm | awk '/not found/' 2> /dev/null`
379 if test -n "$TEST"; then 358 if test -z "$TEST"; then
380 rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ 359 rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \
381 infomsg "GMP : $1.rpm" 360 infomsg "GMP : $1.rpm"
382 else 361 else
383 infomsg "GMP : Test not available" 362 infomsg "GMP : Test not available"
384 fi 363 fi
385 TEST=$($WHICH pkg_info | grep -v "not found" 2> /dev/null) 364 TEST=$(type pkg_info | awk '/not found/' 2> /dev/null)
386 if test -n "$TEST"; then 365 if test -z "$TEST"; then
387 VER=$(pkg_info -e gmp) 366 VER=$(pkg_info -e gmp)
388 infomsg "GMP : $VER" 367 infomsg "GMP : $VER"
389 else 368 else
@@ -394,26 +373,26 @@ gmp_check()
394 373
395libunistring_check() 374libunistring_check()
396{ 375{
397 TEST=`$WHICH dpkg | grep -v "not found" 2> /dev/null` 376 TEST=`type dpkg | awk '/not found/' 2> /dev/null`
398 if test -n "$TEST"; then 377 if test -z "$TEST"; then
399 LINES=`dpkg -s libunistring-dev | grep Version | wc -l` 378 LINES=`dpkg -s libunistring-dev | awk '/Version/' | wc -l`
400 if test "$LINES" = "1" 379 if test "$LINES" = "1"
401 then 380 then
402 VERSION=`dpkg -s libunistring-dev | grep Version | awk '{print $2}'` 381 VERSION=`dpkg -s libunistring-dev | awk '/Version/ {print $2}'`
403 infomsg "libunistring : libunistring3-dev-$VERSION.deb" 382 infomsg "libunistring : libunistring3-dev-$VERSION.deb"
404 else 383 else
405 errormsg "libunistring : dpkg: libunistring3-dev not installed" 384 errormsg "libunistring : dpkg: libunistring3-dev not installed"
406 fi 385 fi
407 else 386 else
408 TEST=`$WHICH rpm | grep -v "not found" 2> /dev/null` 387 TEST=`type rpm | awk '/not found/' 2> /dev/null`
409 if test -n "$TEST"; then 388 if test -z "$TEST"; then
410 rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \ 389 rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \
411 awk '{print "libunistring : "$1.rpm}' 390 awk '{print "libunistring : "$1.rpm}'
412 else 391 else
413 infomsg "libunistring : Test not available" 392 infomsg "libunistring : Test not available"
414 fi 393 fi
415 TEST=$($WHICH pkg_info | grep -v "not found" 2> /dev/null) 394 TEST=$(type pkg_info | awk '/not found/' 2> /dev/null)
416 if test -n "$TEST"; then 395 if test -z "$TEST"; then
417 VER=$(pkg_info -e libunistring) 396 VER=$(pkg_info -e libunistring)
418 infomsg "libunistring : $VER" 397 infomsg "libunistring : $VER"
419 else 398 else
@@ -424,8 +403,8 @@ libunistring_check()
424 403
425gnugettext_check() 404gnugettext_check()
426{ 405{
427 TEST=`$WHICH gettext | grep -v "not found" 2> /dev/null` 406 TEST=`type gettext | awk '/not found/'`
428 if test -n "$TEST"; then 407 if test -z "$TEST"; then
429 if test -n "$(gettext --version 2>&1 | awk '/unknown option/')"; then 408 if test -n "$(gettext --version 2>&1 | awk '/unknown option/')"; then
430 infomsg "GNU gettext : Not found" 409 infomsg "GNU gettext : Not found"
431 else 410 else
@@ -437,40 +416,38 @@ gnugettext_check()
437 416
438gettext_check() 417gettext_check()
439{ 418{
440 if test -n "`$WHICH getext 2>/dev/null`"; then 419 if test -z "`type getext | awk '/not found/'`"; then
441 infomsg "gettext : Found" 420 infomsg "gettext : Found"
442 else 421 else
443 infomsg "gettext : Not Found" 422 infomsg "gettext : Not Found"
444 fi 423 fi
445} 424}
446 425
447# Merge curl_check + gnurl_check -> error if neither is 426gnurl_curl_check()
448# found (yes those systems exist)
449curl_check()
450{ 427{
451 TEST=`$WHICH curl-config | grep -v "not found" 2> /dev/null` 428 TESTCURL=`type curl-config | awk '/not found/' 2> /dev/null`
452 if test -n "$TEST"; then 429 if test -z "$TESTCURL"; then
453 VER=`curl-config --version | head -n1 2> /dev/null | awk '{print $2}'` 430 VER=`curl-config --version 2> /dev/null | awk '{print $NF}'`
454 infomsg "libcurl : $VER" 431 infomsg "libcurl : $VER"
455 else 432 else
456 infomsg "libcurl : Not found" 433 infomsg "libcurl : Not found"
457 fi 434 fi
458}
459 435
460gnurl_check() 436 TESTGNURL=`type gnurl-config | awk '/not found/' 2> /dev/null`
461{ 437 if test -z "$TESTGNURL"; then
462 TEST=`$WHICH gnurl-config | grep -v "not found" 2> /dev/null` 438 VER=`gnurl-config --version 2>&1 /dev/null | awk '{print $NF}'`
463 if test -n "$TEST"; then
464 VER=`gnurl-config --version | head -n1 2> /dev/null | awk '{print $2}'`
465 infomsg "libgnurl : $VER" 439 infomsg "libgnurl : $VER"
466 else 440 else
467 infomsg "libgnurl : Not found" 441 infomsg "libgnurl : Not found"
468 fi 442 fi
443
444 if test -z "$TESTCURL" -a "$TESTGNURL"; then
445 warningmsg "libgnurl or libcurl : Not found"
446 fi
469} 447}
470 448
471libmicrohttpd_check() 449libmicrohttpd_check()
472{ 450{
473 # TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX`
474 TMPFILE="bugreport-test_lmhd.c" 451 TMPFILE="bugreport-test_lmhd.c"
475 cat - >$TMPFILE <<EOF 452 cat - >$TMPFILE <<EOF
476#include <microhttpd.h> 453#include <microhttpd.h>
@@ -481,10 +458,10 @@ int main()
481 return 0; 458 return 0;
482} 459}
483EOF 460EOF
484 if test -x `$WHICH gcc | awk '{print $NF}'`; then 461 if test -x `type gcc | awk '{print $NF}'`; then
485 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin "$TMPFILE" 462 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin "$TMPFILE"
486 VER=`./"$TMPFILE".bin` 463 VER=`./"$TMPFILE".bin`
487 elif test -x `$WHICH cc | awk '{print $NF}'`; then 464 elif test -x `type cc | awk '{print $NF}'`; then
488 cc $CPPFLAGS $CFLAGS -o $TMPFILE.bin $TMPFILE 465 cc $CPPFLAGS $CFLAGS -o $TMPFILE.bin $TMPFILE
489 VER=`./$TMPFILE.bin` 466 VER=`./$TMPFILE.bin`
490 else 467 else
@@ -496,7 +473,6 @@ EOF
496 473
497glpk_check() 474glpk_check()
498{ 475{
499 # TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX`
500 TMPFILE="bugreport-glpk_check.c" 476 TMPFILE="bugreport-glpk_check.c"
501 cat - >$TMPFILE <<EOF 477 cat - >$TMPFILE <<EOF
502#include <glpk.h> 478#include <glpk.h>
@@ -507,10 +483,10 @@ int main()
507 return 0; 483 return 0;
508} 484}
509EOF 485EOF
510 if test -x `$WHICH gcc | awk '{print $NF}'`; then 486 if test -x `type gcc | awk '{print $NF}'`; then
511 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE 487 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
512 VER=`./$TMPFILE.bin` 488 VER=`./$TMPFILE.bin`
513 elif test -x `$WHICH cc | awk '{print $NF}'`; then 489 elif test -x `type cc | awk '{print $NF}'`; then
514 cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE 490 cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
515 VER=`./"$TMPFILE".bin` 491 VER=`./"$TMPFILE".bin`
516 else 492 else
@@ -522,7 +498,6 @@ EOF
522 498
523gnutls_check() 499gnutls_check()
524{ 500{
525 # TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX`
526 TMPFILE="bugreport-gnutls_check.c" 501 TMPFILE="bugreport-gnutls_check.c"
527 cat - >$TMPFILE <<EOF 502 cat - >$TMPFILE <<EOF
528#include <gnutls/gnutls.h> 503#include <gnutls/gnutls.h>
@@ -533,10 +508,10 @@ int main()
533 return 0; 508 return 0;
534} 509}
535EOF 510EOF
536 if test -x `$WHICH gcc | awk '{print $NF}'`; then 511 if test -x `type gcc | awk '{print $NF}'`; then
537 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE 512 gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
538 VER=`./"$TMPFILE".bin` 513 VER=`./"$TMPFILE".bin`
539 elif test -x `$WHICH cc | awk '{print $NF}'`; then 514 elif test -x `type cc | awk '{print $NF}'`; then
540 cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE 515 cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
541 VER=`./"$TMPFILE".bin` 516 VER=`./"$TMPFILE".bin`
542 else 517 else
@@ -554,8 +529,6 @@ main()
554 echo "CPPFLAGS='-I/usr/pkg/include' LDFLAGS='-L/usr/pkg/lib' ${progname}" 529 echo "CPPFLAGS='-I/usr/pkg/include' LDFLAGS='-L/usr/pkg/lib' ${progname}"
555 return 0 530 return 0
556 fi 531 fi
557 echo $LDFLAGS
558 echo $CPPFLAGS
559 infomsg "${progname} 0.11.0" 532 infomsg "${progname} 0.11.0"
560 infomsg 533 infomsg
561 infomsg "Please submit the following" 534 infomsg "Please submit the following"
@@ -568,31 +541,24 @@ main()
568 cplusplus_check 541 cplusplus_check
569 clang_check 542 clang_check
570 clangplusplus_check 543 clangplusplus_check
571 gmake_check
572 make_check 544 make_check
545 gmake_check
573 autoconf_check 546 autoconf_check
574 automake_check 547 automake_check
575 libtool_check 548 libtool_check
576 libextractor_check 549 libextractor_check
577 gnunet08_check 550 gnunet_version_check
578 gnunet09x_check
579 gnunet010x_check
580 gnunet011x_check
581 gitcommit_check 551 gitcommit_check
582 gcrypt_check 552 gcrypt_check
583 mysql_check 553 mysql_check
584 pkgconf_check 554 pkgconf_check
585 pkgconfig_check
586 glib2_check 555 glib2_check
587 gtk2_check 556 gtk_check
588 gtk3_check
589 gtk4_check
590 gmp_check 557 gmp_check
591 libunistring_check 558 libunistring_check
592 gnugettext_check 559 gnugettext_check
593 gettext_check 560 gettext_check
594 curl_check 561 gnurl_curl_check
595 gnurl_check
596 libmicrohttpd_check 562 libmicrohttpd_check
597 glpk_check 563 glpk_check
598 gnutls_check 564 gnutls_check
diff --git a/contrib/scripts/gnunet-chk.py.in b/contrib/scripts/gnunet-chk.py.in
index 7d2cf73d3..afc0924f4 100755
--- a/contrib/scripts/gnunet-chk.py.in
+++ b/contrib/scripts/gnunet-chk.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2013, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2013, 2018 Christian Grothoff (and other contributing authors)
4# 4#
diff --git a/contrib/scripts/gnunet-logread/Makefile.am b/contrib/scripts/gnunet-logread/Makefile.am
index 7903c07de..790b58fea 100644
--- a/contrib/scripts/gnunet-logread/Makefile.am
+++ b/contrib/scripts/gnunet-logread/Makefile.am
@@ -1,7 +1,7 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include 2AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
3 3
4do_subst = $(SED) -e 's,[@]PERL[@],$(PERL),g' 4do_subst = $(AWK) -v py="$(PERL)" '{gsub("@PERLEXE@",py); print $$0}'
5 5
6SUFFIXES = .in 6SUFFIXES = .in
7 7
diff --git a/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in b/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in
index f8b7dc735..72a1551ae 100755
--- a/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in
+++ b/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in
@@ -1,4 +1,4 @@
1#!@PERL@ 1#!@PERLEXE@
2 2
3# 1. Start sdedit and enable 'RT diagram server' in 'Global preferences'. 3# 1. Start sdedit and enable 'RT diagram server' in 'Global preferences'.
4# 4#
diff --git a/contrib/scripts/gnunet-logread/gnunet-logread.in b/contrib/scripts/gnunet-logread/gnunet-logread.in
index 9b1c65401..e27c1d3fc 100755
--- a/contrib/scripts/gnunet-logread/gnunet-logread.in
+++ b/contrib/scripts/gnunet-logread/gnunet-logread.in
@@ -1,4 +1,4 @@
1#!@PERL@ 1#!@PERLEXE@
2# helper tool to make gnunet logs more readable 2# helper tool to make gnunet logs more readable
3# try 'gnunet-logread -h' for usage 3# try 'gnunet-logread -h' for usage
4 4
diff --git a/contrib/scripts/gnunet_janitor.py.in b/contrib/scripts/gnunet_janitor.py.in
index d6834bfb4..9d28d38e6 100644
--- a/contrib/scripts/gnunet_janitor.py.in
+++ b/contrib/scripts/gnunet_janitor.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2011, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2011, 2018 Christian Grothoff (and other contributing authors)
4# 4#
diff --git a/contrib/scripts/gnunet_pyexpect.py.in b/contrib/scripts/gnunet_pyexpect.py.in
index 48f8acdc1..1124dc33c 100644
--- a/contrib/scripts/gnunet_pyexpect.py.in
+++ b/contrib/scripts/gnunet_pyexpect.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2010, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
4# 4#
diff --git a/contrib/scripts/pydiffer.py.in b/contrib/scripts/pydiffer.py.in
index 08f0f4ae6..5235df3f7 100644
--- a/contrib/scripts/pydiffer.py.in
+++ b/contrib/scripts/pydiffer.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2 2
3import os 3import os
4import sys 4import sys
diff --git a/contrib/scripts/removetrailingwhitespace.py.in b/contrib/scripts/removetrailingwhitespace.py.in
index e6c2d9014..6a133ecd0 100755
--- a/contrib/scripts/removetrailingwhitespace.py.in
+++ b/contrib/scripts/removetrailingwhitespace.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2 2
3import sys 3import sys
4import re 4import re
diff --git a/contrib/scripts/terminate.py.in b/contrib/scripts/terminate.py.in
index 2cb4a13c4..c82fdc981 100644
--- a/contrib/scripts/terminate.py.in
+++ b/contrib/scripts/terminate.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2011, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2011, 2018 Christian Grothoff (and other contributing authors)
4# 4#