Check-in [0a04450d6f]
Overview
Comment:Updated to not try to build seccomp dependencies unless seccomp is being used
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | seccomp
Files: files | file ages | folders
SHA1:0a04450d6f88b41ff3e87a6d459f5c61e8a85ffb
User & Date: rkeene on 2020-03-31 16:25:02
Other Links: manifest | tags
Context
2020-03-31
16:50
More Makefile cleanup and build more precompiled builds Leaf check-in: 64fcd6f371 user: rkeene tags: seccomp
16:25
Updated to not try to build seccomp dependencies unless seccomp is being used check-in: 0a04450d6f user: rkeene tags: seccomp
16:18
Disable seccomp support by default and cleanup check-in: 9184a4f1b9 user: rkeene tags: seccomp
Changes

Modified Makefile from [e9e57ad197] to [453d3ea362].

     1         -CC = gcc
     2         -CFLAGS = -I. -Wall -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $(FILED_EXTRA_CFLAGS)
     3         -LDFLAGS = -pthread $(FILED_EXTRA_LDFLAGS)
     4         -LIBS = -lpthread $(FILED_EXTRA_LIBS)
     5         -MIMETYPES = /etc/httpd/mime.types
            1  +CC        := gcc
            2  +CFLAGS    := -I. -Wall -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $(FILED_EXTRA_CFLAGS)
            3  +LDFLAGS   := -pthread $(FILED_EXTRA_LDFLAGS)
            4  +LIBS      := -lpthread $(FILED_EXTRA_LIBS)
            5  +MIMETYPES := /etc/httpd/mime.types
            6  +FILED_ADDITIONAL_DEPS = 
     6      7   
     7         -PREFIX = /usr/local
     8         -prefix = $(PREFIX)
            8  +PREFIX := /usr/local
            9  +prefix := $(PREFIX)
     9     10   bindir = $(prefix)/bin
    10     11   mandir = $(prefix)/share/man
    11     12   srcdir = .
    12     13   vpath %.c $(srcdir)
           14  +
           15  +ifeq ($(FILED_DO_SECCOMP),1)
           16  +CFLAGS += -DFILED_DO_SECCOMP=1
           17  +FILED_ADDTIONAL_DEPS += filed.seccomp.h
           18  +endif
    13     19   
    14     20   all: filed
    15     21   
    16     22   filed: filed.o
    17     23   	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)
    18     24   
    19         -filed.o: $(srcdir)/filed.c filed-mime-types.h filed.seccomp.h
           25  +filed.o: $(srcdir)/filed.c filed-mime-types.h $(FILED_ADDTIONAL_DEPS)
    20     26   
    21     27   filed-mime-types.h: $(srcdir)/generate-mime-types $(srcdir)/mime.types
    22     28   	'$(srcdir)/generate-mime-types' '$(MIMETYPES)' > filed-mime-types.h.new || \
    23     29   		'$(srcdir)/generate-mime-types' '$(srcdir)/mime.types' > filed-mime-types.h.new
    24     30   	mv filed-mime-types.h.new filed-mime-types.h
    25     31   
    26     32   filed.seccomp.h: $(srcdir)/filed.seccomp $(srcdir)/generate-seccomp-filter

Modified README from [a70a50af88] to [486e620538].

    75     75           argument to the "-r" or "--root" option prepended to them.
    76     76   
    77     77      5. Differing "index.html" handling (CFLAGS, -DFILED_DONT_REDIRECT_DIRECTORIES=1)
    78     78           Normally "filed" redirects users who request a directory to the
    79     79           index.html file in that directory so that no memory allocations are
    80     80           required;  This option lets the server generate the new path.
    81     81   
    82         -   6. Enable seccomp (CFLAGS, -DFILED_DO_SECCOMP=1)
           82  +   6. Enable seccomp (make FILED_DO_SECCOMP=1)
    83     83           Linux supports limiting the system calls that a process can make.
    84     84           This is called seccomp (SECure COMPuting).  Currently not all
    85     85           platforms have been tested with this so it is disabled by default.
    86     86   
    87     87      6. MIME Types (MIMETYPES)
    88     88   	For single-file convenience "filed" compiles the mapping of file
    89     89   	extensions (the string in the filename following its last dot ("."))