mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
Overhaul build system and add support for disabling inetd support.
This patch adds support for a configure script and with it
support for disabling inetd support. See the output from
./configure --help
* Add configure script
* Sprinkle #ifdef fairy dust on svc.c when inetd support is disabled
* Use GCC built-in autodep calculator (-MMD -MP)
* Fix name space issue with include files, use relative paths
* Disable username/group name to uid/gid functions in static builds
* Bug out (error) if a user tries to build the bootmisc plugin static
Possibly fixes GitHub issue #5 and issue #6.
NOTE: The static build has not received any testing at all!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
a74b640507
commit
32587d341c
25 files changed
+392
-118
No files matched your search
+8
-9
@@ -1,24 +1,23 @@
|
||||
# Plugin based services architecture for finit
|
||||
CFLAGS += -fPIC -Os
|
||||
CPPFLAGS += -I..
|
||||
TOPDIR ?= $(shell pwd)
|
||||
CFLAGS += -fPIC
|
||||
LDFLAGS := $(filter-out -rdynamic, $(LDFLAGS))
|
||||
LDFLAGS += -shared
|
||||
ifneq ($(STATIC), 1)
|
||||
PLUGINS ?= initctl.so alsa-utils.so bootmisc.so dbus.so hwclock.so \
|
||||
resolvconf.so urandom.so x11-common.so tty.so time.so
|
||||
DEPS = $(addprefix .,$(PLUGINS:.so=.d))
|
||||
DEPS := $(PLUGINS:.so=.d)
|
||||
endif
|
||||
TOPDIR ?= $(shell pwd)
|
||||
|
||||
include ../common.mk
|
||||
|
||||
all: $(PLUGINS)
|
||||
|
||||
clean:
|
||||
-@$(RM) $(PLUGINS) *.o
|
||||
-@$(RM) $(PLUGINS)
|
||||
|
||||
distclean: clean
|
||||
-@$(RM) $(JUNK) $(DEPS)
|
||||
distclean:
|
||||
-@$(RM) *.o *.so $(JUNK) $(DEPS)
|
||||
|
||||
install: all
|
||||
@install -d $(DESTDIR)$(plugindir)
|
||||
@@ -34,6 +33,6 @@ uninstall:
|
||||
done
|
||||
-@rmdir $(DESTDIR)$(plugindir) 2>/dev/null
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include $(DEPS)
|
||||
ifneq ($(MAKECMDGOALS),distclean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
@@ -21,9 +21,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void save(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+7
-3
@@ -24,9 +24,13 @@
|
||||
#include <string.h>
|
||||
#include <utmp.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
#ifdef ENABLE_STATIC
|
||||
#error This plugin uses getuser(), which relies on dynamically linked GLIBC. Cannot be built statically!
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Setup standard FHS 2.3 structure in /var, and
|
||||
|
||||
+3
-3
@@ -21,9 +21,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+3
-3
@@ -21,9 +21,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void save(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+4
-4
@@ -29,10 +29,10 @@
|
||||
#include <unistd.h> /* read() */
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "sig.h"
|
||||
#include "finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "../sig.h"
|
||||
#include "../finit.h"
|
||||
|
||||
static void parse(void *arg, int fd, int events);
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
#include <unistd.h> /* STDIN_FILENO */
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "plugin.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
/* UNIX epoch starts midnight, 1st Jan, 1970 */
|
||||
#define EPOCH_OFFSET 2208988800ULL
|
||||
|
||||
+4
-4
@@ -28,10 +28,10 @@
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "tty.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "../tty.h"
|
||||
|
||||
static void watcher(void *arg, int fd, int events);
|
||||
|
||||
|
||||
+3
-3
@@ -25,10 +25,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "../finit.h"
|
||||
#include "libite/lite.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user