diff options
author | Juergen Beisert <j.beisert@pengutronix.de> | 2006-10-25 18:44:27 +0000 |
---|---|---|
committer | Juergen Beisert <j.beisert@pengutronix.de> | 2006-10-25 18:44:27 +0000 |
commit | 7878bbcc93929a4ab861fde16db4014e105690a8 (patch) | |
tree | 910afc86e6bac5f8e47828157d6b29250786e975 /rules | |
parent | a87842ba0970bbf8a10dd63767008344ee12ee9d (diff) | |
download | ptxdist-7878bbcc93929a4ab861fde16db4014e105690a8.tar.gz ptxdist-7878bbcc93929a4ab861fde16db4014e105690a8.tar.xz |
famd service added
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6224 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r-- | rules/Kconfig | 1 | ||||
-rw-r--r-- | rules/fam.in | 62 | ||||
-rw-r--r-- | rules/fam.make | 145 | ||||
-rw-r--r-- | rules/rootfs.make | 23 |
4 files changed, 228 insertions, 3 deletions
diff --git a/rules/Kconfig b/rules/Kconfig index 1b71a791a..9de2549c6 100644 --- a/rules/Kconfig +++ b/rules/Kconfig @@ -99,6 +99,7 @@ source "rules/cramfs.in" source "rules/bonniexx.in" source "rules/liblockfile.in" source "rules/unionfs.in" +source "rules/fam.in" endmenu menu "Communication Utilities " diff --git a/rules/fam.in b/rules/fam.in new file mode 100644 index 000000000..d958f0bee --- /dev/null +++ b/rules/fam.in @@ -0,0 +1,62 @@ +# fam File Alteration Monitor + +menuconfig FAM + bool + prompt "famd " + select PORTMAP + select GCCLIBS_CXX + select GCCLIBS_GCC_S + help + FAM (File Alteration Monitor) is a server which tracks changes to the + filesystem and relays these changes to interested applications. Its + efficiency comes from consolidating the polling for all applications + or, with kernel support, from obtaining kernel notifications of file + system changes. This also works for network filesystems, if the remote + host also runs a fam daemon. + + This version is patched so it uses kernel's DNOTIFY feature. Ensure this + feature is enabled in the kernel (search for symbol CONFIG_DNOTIFY) + + This daemon requires portmap to spread its service. + +config FAM_LIBRARY + bool + default n + prompt "Install libfam" + depends on FAM + help + If there is an application that is linked against libfam check this + entry to install this library also on the target + +comment "cvs runtime options ---" + depends on FAM + +config FAM_DEFAULT_CONF + bool + default y + prompt "Use default config file" + depends on FAM + help + This installs fam distribution's fam.conf file. Its almost generic and + usable. + +config FAM_INETD_SERVER + bool + default y + depends on FAM + prompt "Start from inetd" + help + This installs a startup configuration for famd from inetd. It adds to + the /etc/inetd.conf a line like this: + sgi_fam/1-2 stream rpc/tcp wait root /usr/sbin/famd famd -c /etc/fam.conf + Note: You must enable one of the two possible inet daemons: There is + one embedded in busybox and one in packet inetutils. + +config FAM_INETD_STRING + string + depends on FAM + depends on FAM_INETD_SERVER + prompt "inetd service entry" + default "sgi_fam/1-2 stream rpc/tcp wait root /usr/sbin/famd famd -c /etc/fam.conf" + help + This string is added to inetd's configuration /etc/inetd.conf. diff --git a/rules/fam.make b/rules/fam.make new file mode 100644 index 000000000..0eb92f4d7 --- /dev/null +++ b/rules/fam.make @@ -0,0 +1,145 @@ +# -*-makefile-*- +# $Id: template 6001 2006-08-12 10:15:00Z mkl $ +# +# Copyright (C) 2006 by Juergen Beisert +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_FAM) += fam + +# +# Paths and names +# +FAM_VERSION := 2.7.0 +FAM := fam-$(FAM_VERSION) +FAM_SUFFIX := tar.gz +FAM_URL := ftp://oss.sgi.com/projects/fam/download/stable//$(FAM).$(FAM_SUFFIX) +FAM_SOURCE := $(SRCDIR)/$(FAM).$(FAM_SUFFIX) +FAM_DIR := $(BUILDDIR)/$(FAM) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +fam_get: $(STATEDIR)/fam.get + +$(STATEDIR)/fam.get: $(fam_get_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +$(FAM_SOURCE): + @$(call targetinfo, $@) + @$(call get, FAM) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +fam_extract: $(STATEDIR)/fam.extract + +$(STATEDIR)/fam.extract: $(fam_extract_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(FAM_DIR)) + @$(call extract, FAM) + @$(call patchin, FAM) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +fam_prepare: $(STATEDIR)/fam.prepare + +FAM_PATH := PATH=$(CROSS_PATH) +FAM_ENV := $(CROSS_ENV) + +# +# autoconf +# +FAM_AUTOCONF := $(CROSS_AUTOCONF_USR) \ + --disable-dependency-tracking + +$(STATEDIR)/fam.prepare: $(fam_prepare_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(FAM_DIR)/config.cache) + cd $(FAM_DIR) && \ + $(FAM_PATH) $(FAM_ENV) \ + ./configure $(FAM_AUTOCONF) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +fam_compile: $(STATEDIR)/fam.compile + +$(STATEDIR)/fam.compile: $(fam_compile_deps_default) + @$(call targetinfo, $@) + cd $(FAM_DIR) && $(FAM_PATH) $(MAKE) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +fam_install: $(STATEDIR)/fam.install + +$(STATEDIR)/fam.install: $(fam_install_deps_default) + @$(call targetinfo, $@) + @$(call install, FAM) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +fam_targetinstall: $(STATEDIR)/fam.targetinstall + +$(STATEDIR)/fam.targetinstall: $(fam_targetinstall_deps_default) + @$(call targetinfo, $@) + + @$(call install_init, fam) + @$(call install_fixup,fam,PACKAGE,fam) + @$(call install_fixup,fam,PRIORITY,optional) + @$(call install_fixup,fam,VERSION,$(FAM_VERSION)) + @$(call install_fixup,fam,SECTION,base) + @$(call install_fixup,fam,AUTHOR,"Juergen Beisert <j.beisert\@pengutronix.de>") + @$(call install_fixup,fam,DEPENDS,) + @$(call install_fixup,fam,DESCRIPTION,missing) + + @$(call install_copy, fam, 0, 0, 0755, $(FAM_DIR)/src/famd, \ + /usr/sbin/famd) +ifdef PTXCONF_FAM_DEFAULT_CONF + @$(call install_copy, fam, 0, 0, 0755, $(FAM_DIR)/conf/fam.conf, \ + /etc/fam.conf, n) +endif +ifdef PTXCONF_FAM_LIBRARY + @$(call install_copy, fam, 0, 0, 0644, \ + $(FAM_DIR)/lib/.libs/libfam.so.0.0.0, \ + /usr/lib/libfam.so.0.0.0) + @$(call install_link, fam, /usr/lib/libfam.so.0.0.0, \ + /usr/lib/libfam.so.0) + @$(call install_link, fam, /usr/lib/libfam.so.0.0.0, \ + /usr/lib/libfam.so) +endif + @$(call install_finish,fam) + + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +fam_clean: + rm -rf $(STATEDIR)/fam.* + rm -rf $(IMAGEDIR)/fam_* + rm -rf $(FAM_DIR) + +# vim: syntax=make diff --git a/rules/rootfs.make b/rules/rootfs.make index bbd561687..59d14524f 100644 --- a/rules/rootfs.make +++ b/rules/rootfs.make @@ -217,7 +217,7 @@ endif ########################################################################################### ifdef PTXCONF_ROOTFS_GENERIC_INETD # does the user wants a generic file? - $(call install_copy, rootfs, 0, 0, 0644, \ + @$(call install_copy, rootfs, 0, 0, 0644, \ $(PTXDIST_TOPDIR)/generic/etc/inetd.conf, \ /etc/inetd.conf, n ) @$(call install_copy, rootfs, 0, 0, 0644, \ @@ -272,7 +272,7 @@ else @ROOT@, ) endif # add cvs service - $(call install_replace, rootfs, /etc/services, @CVSD@, "cvspserver 2401/tcp") + @$(call install_replace, rootfs, /etc/services, @CVSD@, "cvspserver 2401/tcp") else # remove all cvs entries if this service is not enabled @$(call install_replace, rootfs, /etc/inetd.conf, @CVSD@, ) @@ -301,12 +301,29 @@ else @CONFIG@, ) endif # add rsync service - $(call install_replace, rootfs, /etc/services, @RSYNCD@, "rsync 873/tcp" ) + @$(call install_replace, rootfs, /etc/services, @RSYNCD@, "rsync 873/tcp" ) else # remove all cvs entries if this service is not enabled @$(call install_replace, rootfs, /etc/inetd.conf, @RSYNCD@, ) @$(call install_replace, rootfs, /etc/services, @RSYNCD@, ) endif +################################ +# add famd if enabled +# +ifdef PTXCONF_FAM_INETD_SERVER +ifneq ($(PTXCONF_FAM_INETD_STRING),"") +# add user defined string to start famd server into inetd.conf + @$(call install_replace, rootfs, /etc/inetd.conf, \ + @FAMD@, $(PTXCONF_FAM_INETD_STRING) ) +else +# add default string to start the rsync server into inetd.conf + @$(call install_replace, rootfs, /etc/inetd.conf, \ + @FAMD@, "sgi_fam/1-2 stream rpc/tcp wait root /usr/sbin/famd famd -c /etc/fam.conf" ) +endif +else +# remove all famd entries if this service is not enabled + @$(call install_replace, rootfs, /etc/inetd.conf, @FAMD@, ) +endif # ########################################################################################### |