Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: simplify code related to seccomp filters/man pages #5898

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Jul 13, 2023

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 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 9e206b7 ("rework src/man
Makefile", 2023-07-07).

This partially reverts commit 2b34747 ("generate seccomp filters at
install time", 2023-07-07).  See also commit 6fa19aa ("feature: use
seccomp filters build at install time for --restrict-namespaces",
2023-07-12).

The seccomp filters were always being built because
src/fseccomp/fseccomp (and other programs) are in `$(ALL_ITEMS)`, which
is incorrectly marked as phony.  This commit fixes that and restores the
previous target logic, for consistency with the other targets and so
that the seccomp filters are made at build time rather than at install
time.
@kmk3 kmk3 requested a review from netblue30 July 13, 2023 10:40
@kmk3 kmk3 force-pushed the build-simplify-man branch 2 times, most recently from b035430 to 26658b9 Compare July 13, 2023 11:56
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 9e206b7 ("rework src/man
Makefile", 2023-07-07).
@netblue30
Copy link
Owner

merging, thanks!

@netblue30 netblue30 merged commit 0d9c266 into netblue30:master Jul 13, 2023
@kmk3 kmk3 deleted the build-simplify-man branch July 14, 2023 06:42
kmk3 added a commit that referenced this pull request Jul 19, 2023
See the following commits:

* 6fa19aa ("feature: use seccomp filters build at install time for
* --restrict-namespaces", 2023-07-12) and commit
* 80eb284 ("build: restore seccomp filter targets", 2023-07-13)
* 76bd5ad ("build: simplify code related to man pages", 2023-07-12)

Relates to #5898.
kmk3 added a commit that referenced this pull request Aug 12, 2023
Change the old .txt paths into the new .in paths.

This amends commit 76bd5ad ("build: simplify code related to man
pages", 2023-07-12) / PR #5898.
@kmk3 kmk3 changed the title build: simplify code related to man pages build: simplify code related to seccomp/man pages Aug 24, 2024
@kmk3 kmk3 changed the title build: simplify code related to seccomp/man pages build: simplify code related to seccompfilters /man pages Aug 24, 2024
@kmk3 kmk3 changed the title build: simplify code related to seccompfilters /man pages build: simplify code related to seccomp filters/man pages Aug 24, 2024
kmk3 added a commit that referenced this pull request Aug 24, 2024
Related commits:

* 9e206b7 ("rework src/man Makefile", 2023-07-07)
* 2b34747 ("generate seccomp filters at install time", 2023-07-07)
* 1d5fff9 ("Makefile fix", 2023-07-10)
* 6fa19aa ("feature: use seccomp filters build at install time for
  --restrict-namespaces", 2023-07-12)
* a6172b7 ("build: remove extraneous blank lines in makefiles",
  2023-07-12)
* 80eb284 ("build: restore seccomp filter targets", 2023-07-13) /
  PR #5898
* 76bd5ad ("build: simplify code related to man pages", 2023-07-12) /
  PR #5898
* 8e79f18 ("build: add missing makefile dep", 2023-08-12) /
  PR #5956

Note: The issue with seccomp filters specifically was fixed on commit
80eb284 ("build: restore seccomp filter targets", 2023-07-13) /
PR #5898.

Relates to #5156 #5898 #5956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

2 participants