Commit graph

57 commits

Author SHA1 Message Date
Kelvin M. Klann
381c3cf1a3 build: remove remnants of IDS/fids
Remove what remains of the Intrusion Detection System (IDS)/fids,
`--ids` commands and the `--enable-ids` configure option.

Commands:

* `--ids-check`
* `--ids-init`

Related commits:

* 5e962ff78 ("removed IDS feature, it was never enabled by default in
  our builds", 2025-12-17)

Relates to #6995.
2025-12-19 15:24:37 -03:00
netblue30
890b578bfd bwrap replacement - part2 2025-12-18 11:28:58 -05:00
Kelvin M. Klann
e150b8697a build: use *.tar.xz on .gitignore
Instead of `firejail-*.tar.xz`, to match `*.deb` and `*.rpm`.
2024-02-01 19:28:43 -03:00
Kelvin M. Klann
e665769f52 build: automatically generate header dependencies
Instead of manually specifying which source files depend on which
headers, use compiler flags to automatically generate depfiles (.d),
which declare the correct header (make) dependencies for each source
file (.c).

Use `-MMD` (which ignores system headers) to generate the dependencies
and `-MP` to prevent make from complaining when a header file is removed
while it is listed as a dependency in a depfile.

If depfiles exist, just include them.  If not, make each object file
(.o) unconditionally depend on all header files in its source directory
and in src/include, to ensure that rebuilds are done when needed.  The
latter case applies to the first build after `make clean` (which would
build everything anyway) and when the compiler does not support
generating depfiles.

Note that both gcc and clang have supported these options for a long
time.

Misc: This depends on the changes from commit 5b1bd33c7 ("build: use
full paths on compile/link targets", 2023-07-02) / PR #6158 to avoid
issues with make dependency tracking.
2024-01-22 18:05:47 -03:00
netblue30
f1d4cf9bfd cleanup 2023-07-27 19:47:24 -04:00
Kelvin M. Klann
76bd5ad0f8 build: simplify code related to man pages
Simplify the main targets and use wildcards instead of repeating the
filenames manually.

Also, restore the `man` target and building only when `HAVE_MAN` is
enabled.

Note: Make automatically removes intermediate files (.1 and .5), so in
general only the .gz files have to be cleaned.

Commands used to rename the man pages:

    cd src/man
    git mv firecfg.txt firecfg.1.in
    git mv firejail-login.txt firejail-login.5.in
    git mv firejail-profile.txt firejail-profile.5.in
    git mv firejail-users.txt firejail-users.5.in
    git mv firejail.txt firejail.1.in
    git mv firemon.txt firemon.1.in
    git mv jailcheck.txt jailcheck.1.in

This is kind of a follow-up to commit 9e206b7f2 ("rework src/man
Makefile", 2023-07-07).
2023-07-13 11:43:53 -03:00
netblue30
6fa19aab98 feature: use seccomp filters build at install time for --restrict-namespaces 2023-07-12 09:31:49 -04:00
netblue30
9e206b7f2c rework src/man Makefile 2023-07-07 14:01:20 -04:00
netblue30
e889db0958 build fix 2023-02-06 09:45:50 -05:00
Kelvin M. Klann
aad1351ab1 build: auto-generate syntax files
Changes:

* Generate firejail.vim from firejail.vim.in
* Generate firejail-profile.lang from firejail-profile.lang.in
* Update the manual syntax file steps on the new command checklist on
  CONTRIBUTING.md to use `make syntax` instead

Relates to #2679 #5502 #5577 #5612.
2023-01-28 00:05:54 -03:00
Kelvin M. Klann
c7c4f57d13 build: auto-generate syntax lists
Changes:

* Use the commands from contrib/vim/syntax/firejail.vim to create
  makefile targets to generate syntax lists in contrib/syntax/lists
* Add contrib/syntax/files/example.in as an example of how to generate
  syntax files
* Generate and add the syntax lists, to make it easier to spot if they
  are properly updated when a new command is added or if their recipes
  also need changes
* Add "syntax" and "contrib" makefile targets

Note: The generation commands are executed mostly silently to avoid
generating too much noise when also making other targets.

Note2: In some generation commands, a `$$` escape is used to pass `$` to
the shell, to avoid being interpreted by make as the start of a macro.

Note3: `@make_input@` is used in example.in to make it clear that the
file is generated (and that it is generated by make rather than
configure), similarly to how `@configure_input@` is used in configure
input files.  See also apparmor.vim:

    $ head -n 2 /usr/share/vim/vimfiles/syntax/apparmor.vim
    " generated from apparmor.vim.in by create-apparmor.vim.py
    " do not edit this file - edit apparmor.vim.in or create-apparmor.vim.py instead

Environment: apparmor 3.1.2-1 on Artix Linux.

Relates to #2679 #5502 #5577 #5612.
2023-01-27 23:58:30 -03:00
netblue30
3d3365cb31 removed grsecurity support 2022-10-24 09:06:01 -04:00
Kelvin M. Klann
30d55f030b build: add dist build directory to .gitignore
Ignore it only on the repository root path, as a directory that matches
`firejail-*` could eventually be added.

Note that the dist archive is already ignored since commit da6b131c3
("chore(.gitignore) ignore built packages", 2018-01-15) / PR #1733.

Example paths:

* build dir: firejail-0.9.71/
* archive:   firejail-0.9.71.tar.xz

See `$(NAME)-$(VERSION)` and `$(NAME)-$(VERSION).tar.xz` in the "dist"
target on the root Makefile.
2022-07-12 17:14:31 -03:00
Kelvin M. Klann
011d84b462 build: reduce autoconf input files from 32 to 2
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 }'
2022-06-30 05:30:14 -03:00
Kelvin M. Klann
95bfe7d71b mkdeb.sh.in: move configure-time vars into new config.sh.in
For better organization and so that they can be used by other shell
scripts by just sourcing config.sh.
2022-06-12 16:08:47 -03:00
Kelvin M. Klann
4e8244fb81 makefiles: deduplicate configure-time vars into new config.mk.in
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.
2022-06-12 16:08:47 -03:00
netblue30
54baf62b58 fix firemon, speed-up 2022-04-29 09:31:04 -04:00
netblue30
0674295d0c compile fix 2022-04-08 11:46:19 -04:00
netblue30
e9843593cb nettrace 2021-12-28 12:19:44 -05:00
netblue30
a627071b33 intrusion detection system 2021-07-28 08:30:24 -04:00
netblue30
b79e4416fe jailtest -> jailcheck (#4268) 2021-05-18 13:49:02 -04:00
netblue30
42e2db1275 jaitest - simple sandbox testing utility program 2021-02-20 10:06:58 -05:00
Harald Kubota
a37ffc3374 Add first version of zsh completion
Don't have duplicate descriptions and put = signs where they belong to

zsh completion function now dynamically adjusts for options (e.g. no --apparmor option without AppArmor configured)

No EXTRA_CFLAGS for cpp

Found main.c which does the argument processing. Moved some arguments into the correct #ifdef blocks

Profile selection now much better

Not more cpp. Using preproc.awk instead.

Updated bash firejail command completion to add profiles

ignore bash and zsh dynamically created completion scripts

Moved bash/zsh completions out of ALL_ITEMS to fix make install

Cleanup
2021-02-12 21:39:44 +09:00
Fred Barclay
99372cbd0b Block VS Code preferences from being committed 2020-10-15 14:02:14 -05:00
Reiner Herrmann
efa9a7eebe build: remove preproc from gitignore 2020-09-06 20:58:05 +02:00
startx2017
f624e289c5 preprocessor for man pages 2020-09-01 13:16:24 -04:00
Fred Barclay
b8934df60b ignore .DS_Store 2020-06-19 10:11:42 -05:00
Topi Miettinen
87e7b31399 Configure Debian package with AA and SELinux options
Configure Debian package with AA and SELinux options if they are
enabled.
2020-05-14 13:10:14 +00:00
rusty-snake
54d817c8a0 abiword and more gnome-games
- four-in-a-row
 - gnome-mahjongg
 - gnome-robots
 - gnome-sudoku
 - gnome-taquin
 - gnome-tetravex

harden gnome-chess
2020-03-29 16:47:21 +02:00
netblue30
61295cefe4 profile stats 2020-03-19 08:28:58 -04:00
KOLANICH
91cefc6a46
Fixed formatting (autopep8 + black + manual postprocessing). (#3208)
Added typing.
Replaced os.path with pathlib.
Made it work.
Fixes in .gitignore.
2020-02-07 22:06:34 +00:00
netblue30
19402cd2c3 gitignore 2019-10-31 11:49:33 -04:00
smitsohu
11d9e0a7c5 update gitignore 2019-08-07 14:42:14 +02:00
Fred-Barclay
6181f75e3f
Housekeeping
Make sure all files end with a newline
Strip extra newlines and trailing whitespace from files
2019-02-17 17:04:02 -06:00
startx2017
f9127a3b5c .gitignore update 2018-04-16 10:06:14 -04:00
netblue30
5f33cb0dce gitignore 2018-03-31 08:26:18 -04:00
netblue30
2af2fecc7a .gitignore 2018-01-16 21:46:03 -05:00
Daniel Schildt
da6b131c34 chore(.gitignore) ignore built packages
- Ignore built package archive files (.tar.gz and .deb) from Git repository
- Avoid accidentally committing unneeded files in the future
2018-01-15 19:08:21 +02:00
netblue30
f9c60d5a3a replacing seccomp printing with a seccomp disassembler 2017-12-28 12:28:08 -05:00
netblue30
77a891838f netfilter split, --netfilter.print, --netfilter6.print 2017-11-15 07:09:41 -05:00
netblue30
7b5d105a39 fixed systemd-resolved integration - bug #1531 2017-09-16 10:51:41 -04:00
Topi Miettinen
cb5d361a7b
Improve seccomp support for non-x86 architectures 2017-09-02 14:05:31 +03:00
Topi Miettinen
d01216de45
Feature: switch/config option to block secondary architectures
Add a feature for a new (opt-in) command line switch and config file
option to block secondary architectures entirely. Also block changing
Linux execution domain with personality() system call for the primary
architecture.

Closes #1479
2017-08-19 23:33:11 +03:00
netblue30
b858eb24cc .gitignore update 2017-08-04 11:20:14 -04:00
Fred Barclay
650a403fce
strip trailing whitespace 2 2017-05-24 14:40:42 -05:00
netblue30
b286a6bc3a merge #1100 from zackw: removed libconnect 2017-02-14 11:38:19 -05:00
netblue30
64431c712f seccomp work 1 2016-11-20 07:45:50 -05:00
netblue30
f233eee374 testing 2016-11-16 20:11:29 -05:00
netblue30
35004af7d8 testing 2016-11-09 19:17:06 -05:00
netblue30
f898290fd7 major cleanup 2016-10-30 15:54:05 -04:00