aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.mk.in
Commit message (Collapse)AuthorAge
* 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 }'
* makefiles: deduplicate configure-time vars into new config.mk.inLibravatar Kelvin M. Klann2022-06-12
| | | | | | | | | | | Currently, the configure-time variables (that is, the ones that assign to placeholders, such as "@HAVE_MAN@", which are set/replaced at configure-time) are defined on multiple files (such as on Makefile.in and on common.mk.in). To avoid duplication, centralize these variables on a single file (config.mk.in) and replace all of the other definitions of them with an include of config.mk.
* common.mk.in: fix comment about file usage intentLibravatar Kelvin M. Klann2022-06-12
| | | | | | | | | | | | | | | | | | It currently claims to contain "common definitions for all makefiles", but it is not included by all makefiles under src/ and it contains variable definitions that may possibly clash with the ones defined on certain makefiles. Mainly, the following makefiles (which are used for building shared objects) use a different set of CFLAGS compared to src/common.mk.in: * src/libpostexecseccomp/Makefile.in * src/libtrace/Makefile.in * src/libtracelog/Makefile.in Given the contents of common.mk.in, it seems to be intended only for makefiles that build C programs and/or non-shared objects (which are most of, but not all of the makefiles under src/), so put that in the comment instead.
* Removed IDS feature from the default build. To enable it, use --enable-ids ↵Libravatar netblue302022-05-25
| | | | at compile time.
* Add ability to disable user profiles at compile time.Libravatar Dmitry Chestnykh2022-02-28
|
* build: Normalize HAVE_SUIDLibravatar Kelvin M. Klann2021-11-25
| | | | | | | | | | | | | | See commit 15d793838 ("Try to fix #2310 -- Can't create run directory without suid-root", 2021-05-13) / PR #4273. It is the only "HAVE_" option whose value is set by if/else on a makefile. Also, it is set in different places to either "yes", "no", blank or "-DHAVE_SUID". Set the value only on configure.ac and only to either blank or to "-DHAVE_SUID". Misc: The `ifeq ($(HAVE_SUID),-DHAVE_SUID)` comparison that this adds is based on the existing `ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)` comparison on Makefile.in.
* build: Stop linking pthread (#4695)Libravatar Kelvin M. Klann2021-11-17
| | | | | | | | | | | | | Added on commit 137985136 ("Baseline firejail 0.9.28", 2015-08-08). See also commit ad6bb83fa ("consolidate makefiles", 2018-03-31). It is not used anywhere. And it looks like it has never been used anywhere: $ git log --oneline -Gpthread.h 137985136..master $ Issue mentioned by @rusty-snake: https://github.com/netblue30/firejail/issues/4642#issuecomment-955795463
* intrusion detection systemLibravatar netblue302021-07-28
|
* deprecated --disable-whitelist at compile timeLibravatar netblue302021-07-03
|
* Try to fix #2310 -- Can't create run directory without suid-rootLibravatar rusty-snake2021-05-14
|
* makefiles: replace character class with plain charLibravatar Kelvin M. Klann2021-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the "wildcard" internal functions. This usage has been present since the first "real" commit in the repository: commit 137985136 ("Baseline firejail 0.9.28"). > H_FILE_LIST = $(sort $(wildcard *.[h])) > C_FILE_LIST = $(sort $(wildcard *.c)) There is only a single character (i.e.: "h") inside the character class, so its usage should make no functional difference. It may stem from a construct that could have originally looked something like this: C_FILE_LIST = $(sort $(wildcard *.[ch])) Which would match both the implementation files and the headers. From Section 4.4, [Using Wildcard Characters in File Names][1] of the GNU make manual: > A single file name can specify many files using wildcard characters. > The wildcard characters in make are ‘*’, ‘?’ and ‘[…]’, the same as in > the Bourne shell. For example, *.c specifies a list of all the files > (in the working directory) whose names end in ‘.c’. See also Section 2.13, [Pattern Matching Notation][2] of POSIX.1-2017. Commands used to search, replace and clean up: $ find . -name .git -prune -o -type f \ \( -name Makefile -o -name Makefile.in \ -o -name '*.mk' -o -name '*.mk.in' \) -print0 | xargs -0 grep -Fl '$(wildcard *.[h])' | tr '\n' '\000' | xargs -0 sed -i.bak -e \ 's/\$(wildcard \*.\[h\])/$(wildcard *.h)/' $ find . -name .git -prune -o -type f \ -name '*.bak' -exec rm '{}' + Note: To make sure that this doesn't actually change anything functionally, I built firejail-git (AUR) on Artix from master and from this commit and diffing the resulting files produced no output (other than showing changes related to the build timestamps). Misc: Reference to the previous makefile-related changes: commit 2465f9248 ("makefiles: make all, clean and distclean PHONY") / https://github.com/netblue30/firejail/pull/4024 [1]: https://www.gnu.org/software/make/manual/html_node/Wildcards.html [2]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
* Add ./configure --enable-force-nonewprivsLibravatar rusty-snake2021-03-01
| | | | This will always set 'nonewprivs', 'caps.drop all' and 'nogroups'.
* compile time: enable LTSLibravatar startx20172021-02-28
|
* compile time: disable --outputLibravatar startx20172021-02-28
|
* compile time option to disable --private-cache and --tmpfs for regular userLibravatar netblue302020-10-27
|
* build: add -fPIE to LDFLAGSLibravatar Reiner Herrmann2020-10-08
| | | | | | | according to GCC documentation (https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html): "For predictable results, you must also specify the same set of options used for compilation (-fpie, -fPIE, or model suboptions) when you specify this linker option."
* build: remove -pie from CFLAGS, as it is a linker optionLibravatar Reiner Herrmann2020-10-01
| | | | building with clang printed a warning
* disable dbus proxy at compile time (default enabled) - part 1Libravatar netblue302020-09-09
|
* preprocessor for man pagesLibravatar startx20172020-09-01
|
* removed --disable-seccomp from ./configureLibravatar startx20172020-09-01
|
* Preserve CFLAGS given to configure in common.mk.inLibravatar Lior Stern2020-03-31
|
* Add support for SELinux labelingLibravatar Topi Miettinen2020-02-22
| | | | | | | | | | | | | | | | | | | | | | | Running `firejail --noprofile --private-bin=bash,ls ls -1Za /usr/bin` shows that the SELinux labels are not correct: ``` user_u:object_r:user_tmpfs_t:s0 . system_u:object_r:usr_t:s0 .. user_u:object_r:user_tmpfs_t:s0 bash user_u:object_r:user_tmpfs_t:s0 ls ``` After fixing this: ``` system_u:object_r:bin_t:s0 . system_u:object_r:usr_t:s0 .. system_u:object_r:shell_exec_t:s0 bash system_u:object_r:bin_t:s0 ls ``` Most copied files and created directories should now have correct labels (bind mounted objects keep their labels). This is useful to avoid having to change the SELinux rules when using Firejail.
* Profile builder helper should use correct firejail binary path.Libravatar Glenn Washburn2019-08-29
|
* fix make scan-build for debian 10 and archLibravatar netblue302019-07-22
|
* disable firetunnel at config time (#2793)Libravatar netblue302019-06-24
|
* HousekeepingLibravatar Fred-Barclay2019-02-17
| | | | | Make sure all files end with a newline Strip extra newlines and trailing whitespace from files
* removed --disable-bind configuration option; some ohter minor cleanupLibravatar startx20172018-08-22
|
* deprecated --git-install and --git-uninstallLibravatar netblue302018-04-04
|
* consolidate makefilesLibravatar netblue302018-03-31