Francois-Xavier Le Bail [Fri, 17 Jan 2025 19:10:01 +0000 (20:10 +0100)]
Add a GitHub issue template
Create the .github/ISSUE_TEMPLATE directory and add in it:
- the issue_template.md file with some keywords (name, about, ...),
- the config.yml file containing "blank_issues_enabled: false".
Cirrus CI: Set LANG in coverity_task same as in linux_task
To avoid these warnings:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Denis Ovsienko [Fri, 30 Aug 2024 17:20:27 +0000 (18:20 +0100)]
autogen.sh: Allow to configure Autoconf warnings.
In autogen.sh translate AUTOCONF_WARNINGS to Autoconf WARNINGS
environment variable if set. During "make releasetar" instead of
autoreconf run autogen.sh to act upon the same environment variables as
the latter. Since all current Cirrus CI tasks run in VMs with Autoconf
2.71 or later, set the new variable there to suppress obsolete construct
warnings.
Fix an error on Solaris 10 like:
./mkdep: /opt/solarisstudio12.3/bin/cc -D_STDC_C99=: not found
When configure get some compiler option like:
checking for /opt/solarisstudio12.3/bin/cc option to accept ISO C99...
-D_STDC_C99=
Makefile will contain:
CC = /opt/solarisstudio12.3/bin/cc -D_STDC_C99=
And if we use '-c "$(CC)"' mkdep will set and try to run:
CC="/opt/solarisstudio12.3/bin/cc -D_STDC_C99=", which is incorrect.
Remove the quotes to allow mkdep to set CC with the compiler name and
set flags with the option.
It's helps to do VPATH builds, e.g. 32-bit, 64-bit in two directories.
(https://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html)
make releasecheck
/bin/sh: 10: git: not found
/bin/sh: 15: git: not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make: *** [Makefile:184: releasetar] Error 2
Use parallel build for macOS only, for FreeBSD and Coverity use a single
CPU core, for Linux use a minimal configuration and remove the build
matrix from the task.
Denis Ovsienko [Thu, 14 Mar 2024 18:41:41 +0000 (18:41 +0000)]
Address a few warnings from Sun C.
cc: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30
"./seek-tell.c", line 57: warning: implicit function declaration: fseeko
"./seek-tell.c", line 63: warning: implicit function declaration: ftello
"./tcpslice.c", line 183: warning: implicit function declaration: getopt
"./tcpslice.c", line 205: warning: statement not reached
"./tcpslice.c", line 302: warning: implicit function declaration: fileno
Guy Harris [Sat, 25 Nov 2023 21:45:16 +0000 (13:45 -0800)]
Look for the VERSION file in the source directory.
This matches libpcap and tcpdump.
It used to be necessary for out-of-tree builds. It's no longer needed
for that, but at least it means that attempts to build a release tarball
will fail with "you're not in a git clone directory" rather than "I
can't find the VERSION file".
Now that the configure script is no longer in the repository, but is
generated by autogen.sh, and given that configure.ac gets the package
version from the VERSION file, we should probably just use
PACKAGE_VERSION in Makefile.in rather than `cat $(srcdir)/VERSION`.
Francois-Xavier Le Bail [Mon, 30 Oct 2023 16:20:26 +0000 (17:20 +0100)]
instrument functions: Use two loop indexes with reduced scopes
The first is a long, comparison with the long 'symcount'.
The second is a int, comparison with the int 'profile_func_level'.
Moreover:
Add a cast to silence the following warning:
./instrument-functions.c:143:31: warning: implicit conversion changes
signedness: 'long' to 'unsigned long' [-Wsign-conversion]
symtab = (asymbol **)malloc(symsize);
~~~~~~ ^~~~~~~
(symsize is a long as return type of bfd_get_symtab_upper_bound().)
Denis Ovsienko [Sun, 7 May 2023 23:24:19 +0000 (00:24 +0100)]
Cirrus CI: Try to fix things after the previous commit.
Apparently, Clang 16 is not available on FreeBSD 12.4, let's see if
Clang 15 is. In the Linux task specify CC so Autoconf can generate the
Makefile (steps that do not involve any C compliling should not depend
on a C compiler presence, maybe in future this will have a better
solution).
Denis Ovsienko [Sun, 7 May 2023 23:03:43 +0000 (00:03 +0100)]
Cirrus CI: Bump a few versions up.
FreeBSD 13.2 was released almost a month ago, let's see if it is
available in this infrastructure. Try switching to Clang 16 in the
same go. Whilst at it, switch from default to the most recent compiler
versions on Ubuntu 22.04, which already works fine in Buildbot.
Denis Ovsienko [Sun, 26 Mar 2023 21:23:00 +0000 (22:23 +0100)]
Fix --static-pcap-only test on Solaris 10.
(Same as in tcpdump.)
Before:
checking for pcap-config... ../libpcap/pcap-config
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
checking for pcap_loop... no
configure: error: This is a bug, please follow...
After:
checking for pcap-config... ../libpcap/pcap-config
checking for pcap_loop... yes
Francois-Xavier Le Bail [Sun, 12 Mar 2023 17:59:24 +0000 (18:59 +0100)]
instrument functions: Use an environment variable instead of config files
If the environment variable INSTRUMENT is
- unset or set to an empty string, print nothing, like with no
instrumentation
- set to "all" or "a", print all the functions names
- set to "global" or "g", print only the global functions names
The configuration with --enable-instrument-functions remains.
Note that before this change, the default was to print all functions.
Now it is to print nothing.
This allows to run:
$ INSTRUMENT=a ./tcpslice ...
$ INSTRUMENT=g ./tcpslice ...
$ INSTRUMENT= ./tcpslice ...
or
$ export INSTRUMENT=global
$ ./tcpslice ...
This also allows to run the statically compiled binary on another host
after copying it.
It is no longer necessary to modify the configuration with:
$ make instrument_all
$ make instrument_global
$ make instrument_off
(Targets removed.)
Update .gitignore and Makefile.in accordingly.
Moreover:
Reduce the scope of a variable.
Rename a variable.
Remove '\n' in the perror() call.
Remove 2 spaces in function calls (style).