aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace
Commit message (Collapse)AuthorAge
...
* update ip addr list for --nettraceLibravatar netblue302022-09-26
|
* Merge pull request #5219 from kmk3/build-reduce-config-filesLibravatar netblue302022-06-30
|\ | | | | build: reduce autoconf input files from 32 to 2
| * makefiles: add generated files as dependenciesLibravatar Kelvin M. Klann2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous commit ("makefiles: stop failing when config.mk does not exist", 2022-06-23), make will not immediately fail when trying to build a target without having the proper compile-time flags (which are defined on common.mk). For example, when running the command below: make distclean && make It will throw an error only after (mis-)compiling multiple objects. So add a dependency on config.mk on every target that uses output variables (such as @NAME@ / $(NAME)) on its recipe. And add a dependency on config.sh on targets that call shell scripts that use output variables (such as @NAME@ / $NAME). Also, add a recipe for config.mk / config.sh telling to run ./configure, to make it a bit more obvious just in case. With this commit, make will abort earlier, by detecting that the config.mk / config.sh dependency does not exist. This happens before trying to execute the recipe. This also makes the dependencies more accurate, since if config.mk (which defines some CFLAGS) is changed, the CFLAGS may also have changed, so a target that uses CFLAGS should probably be considered out of date in this case anyway. Relates to #5140.
| * build: reduce autoconf input files from 32 to 2Libravatar Kelvin M. Klann2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure summary: autoconf essentially only parses configure.ac and generates the configure script (that is, the "./configure" shell script). The latter is what actually checks what is available on the system and internally sets the value of the output variables. It then, for every filename foo in AC_CONFIG_FILES (and for every output variable name BAR in AC_SUBST), reads foo.in, replaces every occurrence of `@BAR@` with the value of the shell variable `$BAR` and generates the file foo from the result. After this, configure is finished and `make` could be executed to start the build. Now that (as of #5140) all output variables are only defined on config.mk.in and on config.sh.in, there is no need to generate any makefile nor any other mkfile or shell script at configure time. So rename every "Makefile.in" to "Makefile", mkdeb.sh.in to mkdeb.sh, src/common.mk.in to src/common.mk and leave just config.mk and config.sh as the files to be generated at configure time. This allows editing and committing all makefiles directly, without potentially having to run ./configure in between. Commands used to rename the makefiles: $ git ls-files -z -- '*Makefile.in' | xargs -0 -I '{}' sh -c \ "git mv '{}' \"\$(dirname '{}')/Makefile\"" Additionally, from my (rudimentary) testing, this commit reduces the time it takes to run ./configure by about 20~25% compared to commit 72ece92ea ("Transmission fixes: drop private-lib (#5213)", 2022-06-22). Environment: dash 0.5.11.5-1, gcc 12.1.0-2, Artix Linux, ext4 on an HDD. Commands used for benchmarking each commit: $ : >time_configure && ./configure && make distclean && for i in $(seq 1 10); do { time -p ./configure; } 2>>time_configure; done $ grep real time_configure | awk '{ total += $2 } END { print total/NR }'
* | nettrace dixesLibravatar netblue302022-06-23
|/
* makefiles: define root dir and include relative to itLibravatar Kelvin M. Klann2022-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-absolute path on an include command is always treated as being relative to the directory in which "make" was started in, rather than being relative to the makefile that contains the command. For example, given the following project structure and file contents: * Makefile: include src/foo.mk * src/foo.mk: include bar.mk * src/bar.mk: Running "make" on the root project directory (that is, where "Makefile" is) yields the following: src/foo.mk:1: bar.mk: No such file or directory As "bar.mk" in "include bar.mk" is relative to the current (process) directory (that is, "./bar.mk") and not to where foo.mk is located in ("./src/bar.mk"). So on every makefile that contains an include command, define the root project directory in the ROOT variable and always include relative to it, to later enable any included mkfiles to include other mkfiles without having to worry about the correct path. Commands used to search and replace: $ git grep -Flz 'include ../common.mk' -- src | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\`sed 's|include ../common.mk|ROOT = ../..\ninclude \$(ROOT)/src/common.mk|' '{}'\`\" >'{}'" Environment: GNU make 4.3-3.1 on Artix Linux
* fixesLibravatar netblue302022-06-02
|
* hostnames.c: fix mismatched dealloc (fclose -> pclose)Libravatar Kelvin M. Klann2022-04-28
| | | | | | | | | | | | | | | | | | | Partial error log when building firejail-git (afee8603f) with --enable-fatal-warnings: hostnames.c: In function ‘retrieve_hostname’: hostnames.c:53:17: error: ‘fclose’ called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc] 53 | fclose(fp); | ^~~~~~~~~~ hostnames.c:38:20: note: returned from ‘popen’ 38 | FILE *fp = popen(cmd, "r"); | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:7: hostnames.o] Error 1 Environment: gcc 11.2.0-4 on Artix Linux. Added on commit 500a56efd ("more on nettrace", 2022-01-07).
* small fixesLibravatar netblue302022-04-10
|
* nettrace fixesLibravatar netblue302022-04-05
|
* netlocker fixesLibravatar netblue302022-02-02
|
* hostnames -> static-ip-mapLibravatar netblue302022-01-20
|
* compile fixLibravatar netblue302022-01-18
|
* nettrace fixesLibravatar netblue302022-01-18
|
* compile warningsLibravatar netblue302022-01-16
|
* more on nettraceLibravatar netblue302022-01-16
|
* fix warzone2100 (Debian 11)Libravatar netblue302022-01-13
|
* fix scan-buildLibravatar netblue302022-01-11
|
* fix scan-build/cppcheck warningsLibravatar netblue302022-01-11
|
* remove compile warningLibravatar netblue302022-01-10
|
* nettraceLibravatar netblue302022-01-09
|
* 2022 copyright updateLibravatar netblue302022-01-07
|
* more on nettraceLibravatar netblue302022-01-07
|
* nettrace/netlockLibravatar netblue302022-01-04
|
* remove compile warningsLibravatar netblue302021-12-28
|
* updatesLibravatar netblue302021-12-28
|
* nettrace/netlockLibravatar netblue302021-12-28