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

seccomp filter are generated multible times #3393

Closed
rusty-snake opened this issue May 2, 2020 · 3 comments · Fixed by #3401
Closed

seccomp filter are generated multible times #3393

rusty-snake opened this issue May 2, 2020 · 3 comments · Fixed by #3401

Comments

@rusty-snake
Copy link
Collaborator

Describe the bug

The following block in the Makefile is called multiple times with make and make install.

firejail/Makefile.in

Lines 46 to 58 in 8c69eab

filters: $(SECCOMP_FILTERS) $(SBOX_APPS)
ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP)
$(SECCOMP_FILTERS): $(SBOX_APPS)
src/fseccomp/fseccomp default seccomp
src/fsec-optimize/fsec-optimize seccomp
src/fseccomp/fseccomp default seccomp.debug allow-debuggers
src/fsec-optimize/fsec-optimize seccomp.debug
src/fseccomp/fseccomp secondary 32 seccomp.32
src/fsec-optimize/fsec-optimize seccomp.32
src/fseccomp/fseccomp secondary block seccomp.block_secondary
src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx
src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32
endif

To Reproduce
Steps to reproduce the behavior:

  1. Add @echo HELLO I AM CALLED above
    src/fseccomp/fseccomp default seccomp
  2. Run ./configure && make && make install
  3. See HELLO I AM CALLED around 12 times

Expected behavior
seccomp filter are just generated once

cc @topimiettinen

@topimiettinen
Copy link
Collaborator

To me the Makefile looks just fine. Probably it isn't a bug in Make either. Running make --debug=m shows that rules don't work as expected though.

@rusty-snake
Copy link
Collaborator Author

To me the Makefile looks just fine.

I'm to a makefile expert, I don't see what's wrong, just that something is wrong.

topimiettinen added a commit to topimiettinen/firejail that referenced this issue May 4, 2020
Don't build all filters many times over but instead let them be built
in parallel.

Closes netblue30#3393
@topimiettinen
Copy link
Collaborator

I think the problem was with use of .PHONY.

glitsj16 pushed a commit that referenced this issue May 4, 2020
Don't build all filters many times over but instead let them be built
in parallel.

Closes #3393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants